|
lewdpotato Novice
Joined: 16 May 2002 Posts: 48 Location: USA
|
Posted: Tue May 21, 2002 4:33 am
trade wars trigger |
I have made a couple of basic triggers, now Im working on a harder one. I have used this type in another helper but Im having trouble figuring it out in mudd
what I and wanting to do is pull a number out of a line of text that is being sent by the mudd (or twgs server) so I can move there within the script. the number will be random from 11 to 2000, the text being sent (pattern) that will set off the trigger is
Deployed fighters report sector ####. I need to pull this number out and use it in the command. I have used an echo command to do this in another program but I cant figure out what I need to do here. any help would be great. thanks |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue May 21, 2002 4:48 am |
zMUD uses the #TRIGGER command for this purpose. %d is a wildcard which will match any number of digits. It's enclosed in parentheses to indicate that it should be saved as a parameter. Since it's the first one saved, it will be %1. You didn't give the actual command you want to use, so I made one up.
#TR {deployed fighters report sector (%d)} {move to %1}
LightBulb
Vague questions get vague answers |
|
|
|
lewdpotato Novice
Joined: 16 May 2002 Posts: 48 Location: USA
|
Posted: Tue May 21, 2002 5:00 am |
great that is exacly what I was looking for I just about had it, I had the wildcard but couldnt figure out what to do next. this is way easier than I thought. now I need to add an #IF in there to make sure I have a fighter still there before I warp there. I think I can figure that out. thank you very much.
|
|
|
|
|
|