|
Snikten Newbie
Joined: 23 Nov 2006 Posts: 2
|
Posted: Thu Nov 23, 2006 12:11 am
Help me out with a trigger |
Need some help, how do i make a trigger that executes when
My mana reaches over 1300 AND my hp over 400?
here's the prompt
(433/433hp 1385/1385mp 485mv 806tnl) |
|
|
|
xenapan Wanderer
Joined: 26 May 2004 Posts: 68
|
Posted: Thu Nov 23, 2006 12:53 am |
you need two triggers. first is one that captures your prompt.
^~(&hp/&maxhphp &mana/&maxmanamp
should be your pattern. it will store the numbers to the corresponding variables.
then...
you need some pattern here. to trigger it.
#if(@mana>1300) {#if (@hp>400) {do what you want here}{}} {}
thing is... most muds tend to show the prompt EVERY time you hit a command. which will cause your trigger to activate as many times before it actually does something. |
|
_________________ Player on Realms of Despair. realms.game.org port 4000. Join us today! |
|
|
|
Snikten Newbie
Joined: 23 Nov 2006 Posts: 2
|
Posted: Thu Nov 23, 2006 1:40 am |
thx for the quick response
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Nov 23, 2006 4:20 am |
#VAR prompttriggered 0 0
#if ((@mana>1300) and (@hp>400) and (!@prompttriggered)) {do what you want here;#VAR prompttriggered 1;#TEMP prompttriggeredreseter {You cast boo} {#VAR prompttriggered 0}}
You might want to consider a flag for when or not to when to fire the trigger. If you get a prompt with mana>1300 and hp>400 four times in a row, due to lag, then you'll cast four times. You might want a toggler that turns on and off. |
|
|
|
|
|