Loop

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
trias
Posts: 13
Joined: Sun Jan 15, 2012 6:21 am

Loop

#1 Post by trias » Sat Apr 14, 2012 7:30 am

I'm trying to do some script to my profile but it seems to get in loop everytime I try to use it.

Code: Select all

<onSkillCast><![CDATA[
	   while(true) do
		      if (player:hasBuff("High Voltage III")) then 
		      player:cast("WARRIOR_LIGHTNINS_TOUCH")
		else
		player:cast("WARRIOR_ELECTRICAL_RAGE")
		end
	end
	]]></onSkillCast>
Any suggestion to fix this problem?
-Keep up good work, I wouldn't be playing RoM if there is no Rom Bot-

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

Re: Loop

#2 Post by rock5 » Sat Apr 14, 2012 8:31 am

That "while" loop has no exit. It just goes round and round checking that buff indefinately. Probably you don't want the "while" loop, just if "if" statement. That way, everytime you cast a skill, it will check that buff once.
  • 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
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Loop

#3 Post by silinky » Sat Apr 14, 2012 9:18 am

also, it is in the wrong section (^_^)

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

Re: Loop

#4 Post by rock5 » Sat Apr 14, 2012 9:54 am

silinky wrote:also, it is in the wrong section (^_^)
So it is.

Moved.
  • 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

trias
Posts: 13
Joined: Sun Jan 15, 2012 6:21 am

Re: Loop

#5 Post by trias » Wed Apr 18, 2012 9:27 am

Sorry and thanks. :oops:
But now it works like I intended :)
-Keep up good work, I wouldn't be playing RoM if there is no Rom Bot-

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests