View Full Version : Waitfor being skipped
TheOne
08-24-2012, 07:14 AM
I'm trying to get the below script to work, but my waitfor after starting waggle always gets skipped. Can anyone tell me why?
=begin
WagMed - Eats bread, waggles, meditates, then waggles some more!
=end
WaggleScript = "waggle2"
BreadType = "travel biscuit"
put "prep 203"
put "summon #{BreadType}"
fput "eat my #{BreadType}"
fput "eat my #{BreadType}"
fput "eat my #{BreadType}"
fput "eat my #{BreadType}"
fput "eat my #{BreadType}"
start_script(WaggleScript)
waitfor " [#{WaggleScript}: waiting for mana or stamina...]"
stop_script(WaggleScript)
fput "meditate"
wait_until{(Spell.active?("Meditate"==true))}
start_script(WaggleScript)
Snoopy Dogg
08-24-2012, 09:51 AM
=begin
WagMed - Eats bread, waggles, meditates, then waggles some more!
=end
WaggleScript = "waggle2"
BreadType = "travel biscuit"
put "prep 203"
put "summon #{BreadType}"
5.times {fput "eat my #{BreadType}"}
start_script(WaggleScript)
waitfor "waiting for mana or stamina"
stop_script(WaggleScript)
fput "meditate"
wait_until{(Spell.active?("Meditate"==true))}
start_script(WaggleScript)
^ try that
TheOne
08-24-2012, 09:59 AM
Yeah it doesn't skip that way but it doesn't match the message I get from waggle when it's pausing. I guess it must be something with me using the symbols in the string.
Ibidmb
08-24-2012, 10:20 AM
Meditate is a flat 2 minutes before it starts right? Why not just put in a pause 120 and see if that works.
Snoopy Dogg
08-24-2012, 10:20 AM
yea, you have to put some slashes or something in there when your trying to match periods and stuff like that.. always simpler to just take that crazy stuff out
TheOne
08-24-2012, 10:22 AM
I'll just have to figure out the regex for it. Fuck I hate regex.
TheOne
08-24-2012, 10:26 AM
Ibid, just saw your comment. The wait_until works fine, it's the waitfor before the meditate that has the issues.
Snoopy Dogg
08-24-2012, 10:42 AM
try using matchwait /waiting for mana or stamina/ instead of the waitfor
Ibidmb
08-24-2012, 10:54 AM
Oh, wasn't sure when it stopped
TheOne
08-24-2012, 11:17 AM
I've got what I think should match with regex but it's still not working...I'm starting to wonder if echoes from other scripts are seen by Lich's match methods.
I tried your idea Snoopy but no luck.
I guess I could just have it kill the script once my mana is below 25 or something like that, but I was really hoping to let waggle finish all the way and start resting before I meditated.
subzero
08-24-2012, 06:23 PM
I'm starting to wonder if echoes from other scripts are seen by Lich's match methods.
Pretty sure that's your problem. Also, your variables should probably not start capitalized. My medwag script paused waggle when I hit a certain percentage of mana, meditated, and then unpaused the waggle script. Try somethin like:
start_script(waggleScript)
while running? { "#{waggleScript}" }
if percentmana <= 20 && !Spell[9043].active
pause_script "#{waggleScript}"
fput "meditate"
wait_while { Spell[9042].active }
if !Spell[9043].active
fput "scowl"
echo "Someone or something broke meditation early. Kill them!"
## add your own crap to deal with meditate not finishing
end
end
end
unpause_script(waggleScript)
TheOne
08-24-2012, 07:35 PM
Haha, awesome. Will give it a shot i'm in game next time. Thanks sub!
subzero
08-24-2012, 07:51 PM
Eh, looking at it again, you'll probably need to move the unpause part.
start_script(waggleScript)
while running? { "#{waggleScript}" }
if percentmana <= 20 && !Spell[9043].active
pause_script "#{waggleScript}"
fput "meditate"
wait_while { Spell[9042].active }
if !Spell[9043].active
fput "scowl"
echo "Someone or something broke meditation early. Kill them!"
## add your own crap to deal with meditate not finishing
end
unpause_script(waggleScript)
end
end
Tillmen
08-27-2012, 09:29 PM
script.want_script_output = true
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.