I tested it with a ranged damage dealer. It will not work, if you are in a group and get aggro becaus of a group member (I suggest not create a group even if botting with more then one char).
Insert in player.lua before line 160 'v:use();':
Code: Select all
-- modif break cast in last moment / works not for groups !!!
self:update();
local target = self:getTarget();
if( self.TargetPtr ~= 0 ) then target:update(); end;
-- der Client liefert den self.battling und das Ziel des Zieles erst nach dem 2.ten Cast, wir sind einfach
-- zu schnell, aber warten würde uns langsamer machen
if( self.Battling == true and -- we have aggro
target.TargetPtr ~= self.Address and -- but not from our target
hf_castcount == 0 ) then -- and we dont cast before
cprintf(cli.green, "1Aggro while first strik/cast, abort that cast/target: %s\n", target.Name);
self:clearTarget();
return;
end;
-- end of modif break cast in last moment
Code: Select all
-- STEPH07 modif break cast in last moment
if( self.TargetPtr ~= 0 ) then target:update(); end;
if( self.Battling == true and -- STEPH07 we have aggro
target.TargetPtr ~= self.Address and -- STEPH07 but not from our target
hf_castcount == 1 ) then -- STEPH07 and we dont cast before
keyboardPress(settings.hotkeys.JUMP.key); -- STEPH07
cprintf(cli.green, "2Aggro while first strik/cast, abort that cast/target: %s\n", target.Name); -- STEPH07
self:clearTarget(); -- STEPH07
return; -- STEPH07
end; -- STEPH07
-- STEPH07 end of modif break cast in last moment
Code: Select all
-- STEPH07 modif break cast in last moment
if( self.TargetPtr ~= 0 ) then target:update(); end;
if( self.Battling == true and -- STEPH07 we have aggro
target.TargetPtr ~= self.Address and -- STEPH07 but not from our target
hf_castcount == 1 ) then -- STEPH07 and we dont cast before
keyboardPress(settings.hotkeys.JUMP.key); -- STEPH07
cprintf(cli.green, "3Aggro while first strik/cast, abort that cast/target: %s\n", target.Name); -- STEPH07
self:clearTarget(); -- STEPH07
return; -- STEPH07
end; -- STEPH07
-- STEPH07 end of modif break cast in last moment
Code: Select all
hf_castcount = hf_castcount + 1; -- STEPH02 <<< NEW LINE
Code: Select all
hf_castcount = 0; -- Modif STEPH02 counter for casts at your target