Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
chrisk360
Newbie


Joined: 16 Jan 2002
Posts: 1
Location: USA

PostPosted: Wed Jan 16, 2002 11:21 pm   

Simple health monitoring trigger
 
I need a trigger that will loop in this way:
1.sleep till health is 100 (health looks like this on the mud (100)
2.go to certain location
3.do multiple tasks, such as train, (about 60 times)
4.when mud sends info that "You can't. You are to tired to train anymore" I need to go back to the starting location and sleep.

Any help someone could offer would be greatly appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jan 17, 2002 5:46 pm   
 
You'll have to substitute your own directions or path, I just made one up. Adjust the alarm to match the time it takes to train.

#TR {~(100~)} {wake;w;se;n;w;w;s;#T+ train}
#CLASS train
#ALARM *5 {train}
#CLASS 0
#TR {You can't. You are to tired to train anymore} {#T- train;n;e;e;s;nw;e;sleep}


LightBulb
All scripts untested unless otherwise noted
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Thu Jan 17, 2002 7:05 pm   
 
Just a thought, perhaps the last trigger can be put inside the Train class and maybe make it so it can all be triggered with an alias:

#CLASS Train {disable}
#ALARM *5 {train}
#TR {You can't. You are to tired to train anymore} {#T- train;n;e;e;s;nw;e;dotraining}
#CLASS 0
#ALIAS {dotraining} {sleep;#TEMP {~(100~)} {wake;w;se;n;w;w;s;#T+ train}}

This would start a loop that would go on indefinitely which appears to be what you want. In order to break the loop, you need to disable the Train class and delete the temporary trigger (if you are currently sleeping).

 - Charbal
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net