Page 1 of 1

Distance from mob

Posted: Sun Feb 13, 2011 10:58 am
by Rom Botter
So i made the bot run in limo today, but i noticed that the Sandstorm Yasheedees dont like u being so close to them... (they move away)

now i need something in my profile, probably at OnSkillCast about something like this...


if mob is Sandstorm Yasheedee then check distance;
if distance >50 come closer

or atleast that the distance must be ATLEAST 50, otherwhise the mobs will take a step back, and ur character wll keep getting closer ending up in a game of tag...

i just need a little help with how to code this in my profile :)

i was thinking of something like this?

player:getTarget();
if player:getTarget(Sandstorm Yasheedee); then
player:checkDistance(); (couldnt find if this exists...)
if player:checkDistance smaller then 50 then
step back

any help would be much appreciated ^^

rom botter

Re: Distance from mob

Posted: Sun Feb 13, 2011 11:13 am
by rock5
I think the problem is the default melee distance for the bot is 45. Try changing line 17 in settings.lua to 50.

Code: Select all

		MELEE_DISTANCE = 45,

Re: Distance from mob

Posted: Sun Feb 13, 2011 11:31 am
by Rom Botter
rock5 wrote:I think the problem is the default melee distance for the bot is 45. Try changing line 17 in settings.lua to 50.

Code: Select all

		MELEE_DISTANCE = 45,
no thats not it, i tried to do it manually, but couldnt remake it... the problem is that the bot walks all the way up to the mob to attack it, while when i use my skills manually, they all make my char stay 50 distance from mob, and the bot walks up to the bot with a distance of 0.

its ONLY at the mobs named Yasheedee, both the elite and the normal yasheedee mobs, step back when u come too close, mobs have never done this, so the bot isnt calculated for it (my guess...)

maybe, if i can let the bot start at melee distance, instead of start at a distance of 0 from mob, i think that will help?

edit

i tried changing melee distance to 75, didnt work either.

in player.lua i found at line 1003

Code: Select all

local hf_start_dist = 0;		-- distance to mob where we start the fight
if i change that, same problem occurs.