Buff keeps on casting

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Buff keeps on casting

#1 Post by botje »

Code: Select all

<onSkillCast><![CDATA[
		player:updateBuffs("player")
		if player.Class1 == CLASS_KNIGHT then
			if not player:hasBuff("Enhanced Armor") then
				player:cast(KNIGHT_ENHANCED_ARMOR);
			end
		else
			if not player:hasBuff("Blocking Stance") then
				player:cast("WARRIOR_BLOCKING_STANCE");
			end
		end
	]]></onSkillCast>
this SHOULD only cast when its not there, but it keeps casting O.o

Code: Select all

<skill name="WARRIOR_BLOCKING_STANCE"     modifier="" hotkey="VK_9" priority="0" />
or is there something i have to change here?

Botje
User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: Buff keeps on casting

#2 Post by Giram »

This has been working but haven't been able to witness lately.

Code: Select all

<skill name="ROGUE_SHADOW_STEP"        hotkey="VK_9" autouse="false" />

Code: Select all

	<onSkillCast><![CDATA[
	player:update()
	if player.Fighting then
		if( os.difftime(os.time(), player.lastHitTime) > 5 ) then -- more than 5 sec without damaging target
			player:cast("ROGUE_SHADOW_STEP");
		end
	end
	]]></onSkillCast>
Even if you set priority to 0 it still casts it. That just defines order when each skill is casted.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Buff keeps on casting

#3 Post by rock5 »

botje wrote:this SHOULD only cast when its not there, but it keeps casting O.o

or is there something i have to change here?

Botje
If you are saying you want it to only caste when this code casts it, then add autouse="false"

Code: Select all

<skill name="WARRIOR_BLOCKING_STANCE"     modifier="" hotkey="VK_9" priority="0" autouse="false" />
Edit: Oops. I just noticed that Giram already mentioned 'autouse'.
  • 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
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Buff keeps on casting

#4 Post by botje »

nice thanx ^^

Botje
Post Reply