Rogue Poison

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Dsanchez
Posts: 77
Joined: Thu Aug 04, 2011 11:20 pm

Rogue Poison

#1 Post by Dsanchez » Wed Aug 24, 2011 3:15 pm

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

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

Re: Rogue Poison

#2 Post by rock5 » Wed Aug 24, 2011 8:25 pm

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

#3 Post by Mushroomstamp » Thu Aug 25, 2011 8:58 am

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?

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

Re: Rogue Poison

#4 Post by rock5 » Thu Aug 25, 2011 10:04 am

Mushroomstamp wrote:Bot should only attempt to cast Poison if the character is a Rogue, so why bother with the class check?
Um... Good point. I guess I'm used to using that in other sections where it's needed.

Leave that out.
Mushroomstamp wrote:Why the "return true" at the end when I thought it automatically returns true?
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.

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest