-
trias
- Posts: 13
- Joined: Sun Jan 15, 2012 6:21 am
#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-
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#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.”
-
silinky
- Posts: 213
- Joined: Mon Nov 23, 2009 5:07 am
#3
Post
by silinky » Sat Apr 14, 2012 9:18 am
also, it is in the wrong section (^_^)
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#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.”
-
trias
- Posts: 13
- Joined: Sun Jan 15, 2012 6:21 am
#5
Post
by trias » Wed Apr 18, 2012 9:27 am
Sorry and thanks.
But now it works like I intended
-Keep up good work, I wouldn't be playing RoM if there is no Rom Bot-
Who is online
Users browsing this forum: Bing [Bot] and 2 guests