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
zamponia
Newbie


Joined: 15 Apr 2007
Posts: 2

PostPosted: Sun Apr 15, 2007 11:00 pm   

Trigger help needed
 
I am using Zmud 5.5
I am playing in a mud where wimpy does not work for higher level players.

I need a trigger that does the following.

If HP < 450 then flee and quaff healing potion.

Thanks for your help.

Zamponia
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Sun Apr 15, 2007 11:12 pm   
 
Need an example of your prompt for that first, for being able to get maximum hp and current amount of hp. Then, you can do a trigger for action when hp is at some bad point for you.

Code:


#class {Autoheal}
#trigger {HP:%d/(%d)} {#if (%1<450) {flee;quaff heal;#T- Autoheal}}
#class 0

#class {Autoheal2}
#trigger {Healing message you see when you quaff the potion} {#T+ Autoheal}
#class 0



First class quaffs a healing potion and flees prior to that when hp hits less than 450. Then it turns the class off to avoid the endless loop of you quaffing healing potion and trying to flee. The second class is there to avoid this - Once you quaff a potion/or flee (can do it in your case for whichever line you see fit) it turns the autoheal class back on for next time.

Btw, I used a general prompt line for getting your hp. Your prompt may vary but you get the general idea I hope.

Enjoy.


Prog
Reply with quote
zamponia
Newbie


Joined: 15 Apr 2007
Posts: 2

PostPosted: Sun Apr 15, 2007 11:28 pm   
 
Thanks for the quick reply.
Here is my current prompt

< 1264hp 1088mana 246mv >
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Sun Apr 15, 2007 11:39 pm   
 
OK,


In that case change the part about hp to this:

Code:


#trigger {~< (%d)hp} {#if (%1<450) {flee;quaff healing potion;#T- Autoheal}

ps Leave everything else as it was in my last post.



I'm not completely sure wheather it will work, because there's a space between < and number, though.


Prog
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Apr 16, 2007 1:08 am   
 
Also, why 5.5? Upgrading is free, it can't hurt. The current version is 7.21 - 5.5 is actually more than 8 years old.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Apr 16, 2007 2:30 am   
 
And 7.21 is alot better... with more features. Faster too.
_________________
Asati di tempari!
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