Problem if distance to mob is between 50 & 60

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Mushroomstamp
Posts: 210
Joined: Wed Oct 27, 2010 11:34 am

Problem if distance to mob is between 50 & 60

#1 Post by Mushroomstamp »

For the warrior skill Surprise Attack to work, character has to be at least 60 distance from mob. Melee distance, of course, is 50. If I keep Surprise Attack in my profile, and character ends up between 50 and 60 distance to multiple mobs, he endlessly cycles between targeting the different mobs, never inflicting any damage. Under this specific circumstance, Bot calls for surprise attack, (since it's my only ranged attack), but since distance to mob is NOT greater than 60, the skill isn't performed. Since distance IS greater than 50, bot will not attempt any other skills, even though surprise attack is my lowest priority. After a few seconds, bot clears target and selects another target, restarting the problem if new target mob is also between 50 & 60 distance. I've tried all combinations of "COMBAT_TYPE" and "COMBAT_RANGED_PULL" to no avail. Anyone have any suggestions on how to get around this problem? Currently, I'm just not using Surprise Attack.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Problem if distance to mob is between 50 & 60

#2 Post by rock5 »

You might have to use <onPreSkillCast> in your profile.

Code: Select all

<onPreSkillCast>
    if arg1.Name == "WARRIOR_SURPRISE_ATTACK" then
        local target = player:getTarget()
        if 60 > distance(player.X, player.Z, target.X, target.Z) then
            return false -- doesn't use the skill
        end
    end
    return true
</onPreSkillCast>
I don't use onPreSkillCast myself but that should work.
  • 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