|
willmash Newbie
Joined: 13 May 2002 Posts: 0 Location: United Kingdom
|
Posted: 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. |
|
|
|
HariKari Wanderer
Joined: 16 Feb 2001 Posts: 57
|
Posted: 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. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
|
willmash Newbie
Joined: 13 May 2002 Posts: 0 Location: United Kingdom
|
Posted: Tue Apr 16, 2002 8:42 am |
Thank you very much for your time and effort, that worked out perfectly
|
|
|
|
|
|