|
DarkKnight0002 Beginner
Joined: 21 Jan 2002 Posts: 10 Location: USA
|
Posted: Mon Jan 21, 2002 6:01 am
A Trigger of sorts |
Hello everyone,
I know its pretty bad to ask someone else to make this for me, I felt however, that I would learn how to do this if someone first showed me how. I can't make a trigger that takes the movement of my character and makes it do something else. I.E. I'm doing something and its eating lots of movement for so long. The trigger I'm after would be triggered when my movement points reach or go below a certain point. Any clues on how to make that? |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Mon Jan 21, 2002 6:15 am |
Well, you'd have to give us a prompt example, but if it's like most muds, then try something like this:
#trigger {~<%d/%dHP %d/%dMA (%d)/(%d)MV~>} {#if ((%1*100/%2)<30) {#say You need to rest up your movement!!!}}
You might have to play around with it a bit, in the Options tab, you might have to check the box for Trigger on Prompt instead of Trigger on Newline.
Untested code, may not work, heh.
Iljhar |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jan 21, 2002 6:20 am |
#TR {(%d) movement points} {#IF (%1 < some number) {do something else}}
Of course, you'll need to come up with a trigger phrase that actually matches something on your MUD that shows your movement points, a cutoff value for the #IF command, and a trigger value that has the actual commands you want when your movement gets low.
LightBulb
All scripts untested unless otherwise noted |
|
|
|
DarkKnight0002 Beginner
Joined: 21 Jan 2002 Posts: 10 Location: USA
|
Posted: Mon Jan 21, 2002 6:21 am |
Here's the prompt example you wanted :)
1041(1041) 1536(1536) 570(570) (13675) (236 47)>
current hp (max hp) current mana (max mana) current move (max move) (exp to next level) and the last is (gold silver)>
Thanks :) |
|
|
|
DarkKnight0002 Beginner
Joined: 21 Jan 2002 Posts: 10 Location: USA
|
Posted: Mon Jan 21, 2002 9:05 am |
Yeah I got that to do something after my prompt was changed. Cept it seems to tell me I'm low on mana after every prompt update rather than when I run low on mana. The information is posted in previously if you would like to modify for that. Much thanks.
DarkKnight
#trigger {~<%d/%dHP %d/%dMA (%d)/(%d)MV~>} {#if ((%1*100/%2)<30) {#say You need to rest up your movement!!!}}
Iljhar |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jan 21, 2002 1:47 pm |
Well, like iljhar said, you need to enable the Trigger on Prompt option for that trigger. Go into the Settings Editor and look for the trigger you created. When editing this trigger, there is a tab called Options. Under this tab you will find a section that says Trigger On: and then it has three options. Make sure Prompt is selected.
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jan 21, 2002 5:09 pm |
It will, naturally, continue to tell you your movement (or mana?) is low at every prompt until you have recovered enough to get back above the trigger. If you only want to be told once, you'll need to put the trigger in a class which can be turned off after it fires (add #T- classname to the trigger commands) and then you'll probably need another trigger that turns it back on later.
LightBulb
All scripts untested unless otherwise noted |
|
|
|
DarkKnight0002 Beginner
Joined: 21 Jan 2002 Posts: 10 Location: USA
|
Posted: Mon Jan 21, 2002 9:14 pm |
Hey, Yeah I did actually turn on prompt, sorry about that. And actually even at full movement its going off every time I get a new prompt :(. I haven't the faitest on how to fix it, was thinking maybe the <30 was the problem but I have no clue actually
|
|
|
|
DarkKnight0002 Beginner
Joined: 21 Jan 2002 Posts: 10 Location: USA
|
Posted: Fri Jan 25, 2002 11:25 am |
Hmmm lets see if I can get more specific. The trigger I want needs me to flee out then restore my movement with the refresh food I have and then return back into the fight. But I also need it to flee and eat/drink if that occurs as well (which is bound to happen) so that the character doesn't die from no food or water. Perhaps this is a bit much to be askin for, but figured I should at least try :).
Matthew |
|
|
|
|
|