Q: How to clear Last_ignore_target_ptr ?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Q: How to clear Last_ignore_target_ptr ?

#1 Post by kkulesza » Wed Dec 14, 2011 7:28 pm

Sometimes, when there are obstacles betwin bot and target, bot moves on and ignores that particular mob and doesn't try to fight again even if there is no obstacle anymore.
I've found this code in player.lua :

Code: Select all

if(address == player.Last_ignore_target_ptr  and
	   os.difftime(os.time(), player.Last_ignore_target_time)  < 10 )then
and i believe it is responsible for that behavior.
It looks like it ignores a mob for 10 seconds.

10 secs is too long for me. And i have to kill all mobs on my way.
So i want to shorten that time to 4 seconds, to let the bot go to the next wp and then try to fight again.
I've put the code below in the onload section of my file, but it looks like it doesn't work (bot still ignores a mob)

Code: Select all

function clearIgnored()
	player.Last_ignore_target_ptr=nil;
	return
end
-- Default 10 secs is too long. Bot can pass a mob and then the chest will not spawn. 
registerTimer("clearIgnored", secondsToTimer(4), clearIgnored);
Is there something wrong in this code?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Q: How to clear Last_ignore_target_ptr ?

#2 Post by rock5 » Wed Dec 14, 2011 9:37 pm

I can't see anything wrong with it. Maybe your not attacking for some other reason such as the mobs becoming out of range after those 4 seconds?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest