If you're playing a rogue and run out of poison the bot will keep trying to apply poisons resulting in it walking a few inches to the next waypoint and stopping over and over. Would it be possible to stop trying to cast the buff if you run out of poisons?
Thanks
Rogue Poison
Re: Rogue Poison
You could check your inventory before the skill is cast. Try adding this to your onPreCast section of your profile. Add it if it doesn't already exist.
Code: Select all
<onPreSkillCast>
if player.Class1 == CLASS_ROGUE then
if arg1.Name == "ROGUE_POISON" and inventory:itemTotalCount("Poison Bottle") == 0 then
return false
end
end
return true
</onPreSkillCast>- 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
-
Mushroomstamp
- Posts: 210
- Joined: Wed Oct 27, 2010 11:34 am
Re: Rogue Poison
I have two questions about this;
Bot should only attempt to cast Poison if the character is a Rogue, so why bother with the class check?
And
Why the "return true" at the end when I thought it automatically returns true?
Bot should only attempt to cast Poison if the character is a Rogue, so why bother with the class check?
And
Why the "return true" at the end when I thought it automatically returns true?
Re: Rogue Poison
Um... Good point. I guess I'm used to using that in other sections where it's needed.Mushroomstamp wrote:Bot should only attempt to cast Poison if the character is a Rogue, so why bother with the class check?
Leave that out.
I think you're right. I just wasn't 100% sure and was bein thorough. I don't make use of onprecastskill so I'm not used to it.Mushroomstamp wrote:Why the "return true" at the end when I thought it automatically returns true?
You can leave that out too.
- 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
Who is online
Users browsing this forum: Bing [Bot] and 1 guest