Boting in "small" places
Posted: Mon Oct 12, 2009 1:24 pm
Please can anyone tell me how to not target enemys behind walls.
Zilvermoon wrote some time ago:
TIA
Steinmeier
Zilvermoon wrote some time ago:
but since then player.lua changed and there are 3 lines withI just created some custom code for all those "small" places where you accidently target things behind wall's and stuff ... so your character end up running into the wall's ... with this piece of code you'll just clearTarget() if they are further away than you set up in your profile ... anyone interested?
"Normal" code in player.lua (around line 184 ... might be a line other that this got a few pieces of custom code in my files)Code: Select all
local dist = distance(self.X, self.Z, target.X, target.Z);
Change it to this:Code: Select all
local dist = distance(self.X, self.Z, target.X, target.Z);
if (settings.profile.options.WAYPOINTSMAXDISTANCE) then
local MaxDist = settings.profile.options.WAYPOINTSMAXDISTANCE;
if ( MaxDist < dist ) then
printf("Too far away\n");
player:clearTarget();
break;
end
end
and in your profile add this:
you can set the value to what ever you want it to be, and you mmight have to experiment a bit to get the value right depending of the place you are in...Code: Select all
<option name="WAYPOINTSMAXDISTANCE" value="200" />
Code: Select all
local dist = distance(self.X, self.Z, target.X, target.Z);
Steinmeier