Hey, small question. I want to make a trigger that reads a number off in my prompt and compares it to another number, and then performs a command accordingly. ie,
If "hp" < 1000 then
(do some command)
end if
I tried putting <*hp *mp *mv *Exp to Level> (my prompt) in the trigger box, and this in the send box:
Alright, basically, this is the trigger I did (copied and pasted as it appears in the trigger):
Trigger box: <*hp *mp *mv *Exp to Level>
Send box:
if %1 < 1000 then
tell sparafucile Your alt is dying!
End If
I basically coppied my prompt exactly as it appears in the mud, except I replaced the numbers with *. I tried checking the Regular Expression on and off, but neither worked. And there's no error message: it just does nothing.
I know its a pretty silly trigger, since it'll just keep spamming me with tells from myself, but I don't want the alt dying :P
You need to change the "send to" dropdown menu to script.
and then your second line needs to be:
send "tell sparafucile Your alt is dying!"
You can also copy WHOLE triggers, from the triggers dialog (the one with the list of all triggers) highlight the trigger and click 'copy' then paste the text here.
If you mean the enable script checkbox in the Scripting>Scripts window, then yes, it's checked on. The scripting language is set to VBscript, if that helps.
Here's a sample output:
[Obvious Exits: north east northeast (southwest)]
A Wooden Bench sits at the edge of the Plaza.
<5000hp 50mp 498mv 586Exp to Level>
Again, MUSH gives me no error messages or anything, it just keeps going as if the trigger did not exist.
Haha, that's so strange. That did it. There was indeed a space at the end of the prompt. I also had to uncheck the regular expression box. Thanks everyone :)