Well, I was hunting someone, and I kept on passing them - I just couldn't bloody catch him. But he kept going RIGHT by me everytime I switched directions (I.e. Spam "e", he spams "w", I spam "w", he spams "e"). I was wondering if there is a known trigger so that you can target someone, and then when that name is seen, the trigger would automaticly input 'kill/murder [person]'.
Also... I was wondering how one goes about creating a health/mana/movement bar (If that's possible).
Thanks.
You match what you see and tell it to respond in some way. Try experimenting. It is hard for us to help more as you haven't pasted what you see, so we would be guessing.
Match Text: (this is what the mud displays to "fire" the trigger).
Send: This is what you send once the trigger fires.
Triggers can include variables, denoted with an asteriks (*). You then can use these variables in the send field, by %# where # is the number of the variable:
* walks in wearing *.
would match:
Bill walks in wearing a hat.
and %1 would contain 'Bill'
%2 would contain 'a hat'
Thats basically the basics of triggers. Otherstuff is fairly self explainatory. Punctuation/spacing and other things are important. You really need to become a stickler for details while writing triggers.
More info can be found in the help file (either the online one, or the one included with mushclient).
The target's name is [A-Za-z]+, this means match any word. If you want someone specific, you can set that to the name, e.g. Poromenos. You can also make a variable, for example @target, and this way it will match on whatever is in the variable. You could set an alias so you would type "target <person>" and it would only kill the person you specified.
Ok, so I tried it out, and replaced "[A-Za-z]+" with "A cow" (Heck... I have very little idea what's going on here, so I figured, instead of bugging you, I would give a stab at it, and try to figure it out myself... It didn't work.), this of course produced little, as there is no doubt in my mind that this was not the correct thing to do. This is the test that I used:
Fields of grain
You stand amid colossal fields of grain. Around you, long
stalks of wheatgrass rise well above your head. The yellow
grains tend to sway slowly back and forth like waves as
the mountain winds sigh through them. You have to hack and
chop your way through here to make a path, but you can see
hundreds of large scarecrows set up here.
[Exits: north south]
A cow is here, chewing her cud.
Is there something special I would have to do for this one? As I see, the trigger has "sitting" and "resting" in it, so I would sort of assume that something along the lines of "chewing her cud" might have to be thrown in there... In anycase, I just need to find out how to work this trigger, because I've heard of MANY people dying from their own triggers.
Regular expressions can be a bit overwhelming if you're new. There are also the normal triggers which just match something like:
* walks in.
You could use those, or you could read the document about regular expressions which comes with MC. It is very helpful, and it's in the \docs catalog in the MC directory.
Do you want just to kill * (whoever), i have a trigger
which automatically saves another mudder's character name
in a variable. Then an alias to attack.
Demonica sprays you with Venom
non regexp:
* sprays you with *
(you need to add punctuation, etc)
Regexp:
^(.*) sprays you with (.*)$
(again, add punctuation, and anything else)
Send to: Script
Send:
setvariable "var1", %1
setvariable "var2", %2