evalTarget

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
WhiteTiger
Posts: 84
Joined: Tue Jun 22, 2010 8:06 am

evalTarget

#1 Post by WhiteTiger »

Is there a way to make an own evalTarget function and use it to the normal fight system instead of evalTargetDefault? If I try to rewrite it in the player class the bot stop working.
Thx in advance
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: evalTarget

#2 Post by rock5 »

So you are not talking about using your own evalfunc when using player:fight() yourself, you are talking about using your own evalfunc when the bot is running around and auto targeting mobs, right?

I think the easiest way would be to start with the evaltargetDefault function and just edit it to do the checks you want.
  • 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
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: evalTarget

#3 Post by Administrator »

You could just write your eval function in a userfunction script, and set evalTargetDefault to your new function. Basically, just hook it.

Code: Select all

local originalEval = evalTargetDefault;
evalTargetDefault = function(address)
 -- stuff here
end
WhiteTiger
Posts: 84
Joined: Tue Jun 22, 2010 8:06 am

Re: evalTarget

#4 Post by WhiteTiger »

thx :P, forgot that u could overwrite functions in userfuctions
Post Reply