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


Joined: 13 May 2002
Posts: 0
Location: United Kingdom

PostPosted: Fri Apr 12, 2002 8:53 am   

A newbie needing help with triggers
 
I play Achaea, in this mud you are given afflictions and depending on what afflictions you have means that you arent able to cure something else.

eg

Someone swings a shining steel longsword at you with all his might.
You stumble as your right leg shrivels into a useless appendage.
apply mending
Lightning-quick, Someone jabs you with a dwarven battleaxe.
You notice that your sweat glands have begun to rapidly secrete a foul, oily
substance.
smoke valerian
You take out some salve and quickly rub it on your skin.
The salve slides off your oily skin.

Is there a way to cure it in a reverse order? If I have normal triggers, the slikness stops you from applying the mending successfully. I need a way to smoke the valerian right before I apply the mending. Is this possible? Any help would be appreciated.
Reply with quote
HariKari
Wanderer


Joined: 16 Feb 2001
Posts: 57

PostPosted: Fri Apr 12, 2002 10:10 am   
 
Maybe... there is probably more output than what you gave for your example.
If you get a blank line or a prompt after each round..

eg:
Someone swings a shining steel longsword at you with all his might.
You stumble as your right leg shrivels into a useless appendage.
Lightning-quick, Someone jabs you with a dwarven battleaxe.
You notice that your sweat glands have begun to rapidly secrete a foul, oily
substance.

50hp 50mana 50mv 50br>
smoke valerian
apply mending

The salve slides off your oily skin.
You take out some salve and quickly rub it on your skin.

You could make some triggers and variables to store what you have to do.

#TRIGGER {You stumble as your right leg shrivels into a useless appendage.} {thingsToDo = %push("apply mending",@thingsToDo)}
#TRIGGER {You notice that your sweat glands have begun to rapidly secrete a foul, oily substance.} {thingsToDo = %push("smoke valerian",@thingsToDo)}
#TRIGGER {$} {#forall {@thingsToDo} {%i};thingsToDo = ""}

That will create a stack of commands to do. First in, Last out.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Apr 12, 2002 12:17 pm   
 
Since %push is not in 6.16 and you may not always want to cure from last to first, you should create the queue system like HariKari suggested and the use %additem when you are hit with an affliction to add the cure to the list. Then you go through the list and perform each cure as you are able. If, however, you are hit with an affliction that requires immediate curing, then you can do:
%concat("affliction cure|", @queueName)

and that particular cure will be added to the front of the list.

Kjata
Reply with quote
willmash
Newbie


Joined: 13 May 2002
Posts: 0
Location: United Kingdom

PostPosted: Tue Apr 16, 2002 8:42 am   
 
Thank you very much for your time and effort, that worked out perfectly
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