 |
w98 Newbie
Joined: 11 May 2004 Posts: 3 Location: USA
|
Posted: Tue May 11, 2004 11:46 pm
need help with a skill loop |
Using v7.05
Modified from a previous loop about how not to use #UNTIL, I came up with this:
#ALIAS myhide {hide;#wait (1000);#T+ hideTrig}
#TRIGGER "hideTrig" {hide yourself} {hide;#wait (1000)}
#TRIGGER {attempt to hide but exhaust} {#T- hideTrig;sleep;#wait (30000);wake;#T+ hideTrig;hide}
What I'm ATTEMPTING is this:
1. hide
2. if not exhausted, repeat step 1, else go to step 3
3. sleep
4. #WAIT (30000)
5. wake up, and go to step 1
ANYHOW, what I'd ultimately like would be the use of #VAR strings for "success", "fail", and "time to rest" to customize the loop quicker for other skills but not familiar with where/how I'd plug that into my triggers/alias.
Thanks for any assistance. If I can get this working, I'll be super-pleased with zMUD and am much more likely to buy it  |
|
|
 |
w98 Newbie
Joined: 11 May 2004 Posts: 3 Location: USA
|
Posted: Wed May 12, 2004 12:09 am |
Oh yeah, and how do I STOP this from running? It runs over and over and over ... I need some way to stay "okay, enough" and do something else. Other than turning off triggers, that is. [:I]
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed May 12, 2004 4:39 pm |
Don't use #WAIT in triggers.
#CLASS HidePractice disable
#ALA HideAlarm *1 {hide}
#TR {attempt to hide but exhaust} {#T- HideAlarm;sleep}
#COND {} {#T+ HideAlarm} {Wait|Param=30000}
#CLASS 0
#T- HidePractice
#AL HidePrac {#IF (%lower( "%1") = "off") {#T- HidePractice} {#T+ HidePractice}} |
|
|
 |
w98 Newbie
Joined: 11 May 2004 Posts: 3 Location: USA
|
Posted: Fri May 14, 2004 7:00 pm |
Thanks, your code works great.
I need a way to stop it from looping though. I'd like to manually type an "emote" command that I can build a trigger with to disable the triggers from this code sample you've written up.
"emote is ready"
will print:
Mycharname is ready
... to the MUD. How can I write a trigger to disable this from looping forever? |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri May 14, 2004 10:21 pm |
I already gave you an alias to do it, you don't even need to emote.
hideprac off |
|
|
 |
|
|