|
jtviper456 Novice
Joined: 17 Jan 2003 Posts: 37
|
Posted: Tue Jul 20, 2004 7:20 pm
Simple Multiline Trigger |
Seeing how I don't really understand any other topics on Multiline Triggering, I figured I'd post a new one. I want a simple multiline trigger, but am unsure how to do it.
Anyway, heres the strings:
%1 tells you: mana
query_mana
Kusado whispers: I have %2 points at the moment.
tell %1 Kusado has %2 points at the moment.
I would like to combine those lines into one trigger, but am VERY unsure how to do it. Any suggestion would be greatly appreciated.
-------------------------------------------------------------------------------------------
Jtviper456 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jul 20, 2004 9:17 pm |
I would suggest looking up Pattern Matching, Predefined Variables, #TRIGGER, and #CONDITION. Use standard wildcards (which don't include %1-%99) in the patterns. Use the predefined variables %1-%99 and %t1-%t99 in the commands.
Other than that, I'd suggest just doing it. Put the first pattern and first command in the #TRIGGER. Put the second pattern and second command in the #CONDITION. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Wed Jul 21, 2004 2:33 pm |
LightBulb is right. You should study the help files that come with zMUD - they're wonderful with great examples and full of cross reference hyperlinks.
As I understand your need, you want the trigger to run the alias "query_mana" when someone says "mana" to you, then respond to that person when Kusado tells you how much he has. This will do just that, but doesn't have any flexibility - it will only work for Kusado's mana. Again, look at the help docs to decipher what each of the symbols does.
Quote: |
#TR {^(*) tells you: mana$} {query_mana}
#COND {^Kusado whispers: I have (%d) points at the moment.$} {tell %param1 Kusado has %1 points at the moment} |
|
|
_________________ .geniusclown |
|
|
|
jtviper456 Novice
Joined: 17 Jan 2003 Posts: 37
|
Posted: Thu Jul 22, 2004 9:16 pm Multiline |
So I'm reading up on this and I've learned a few things, but for some reason, zmud keeps reading all of my strings as %1, which causes the kusado strings to fail. Seems the trigger is telling kusados mana points to kusados mana points.
Mishra tells you: mana
[^(*) tells you: mana$-> query_mana]
query_mana
Kusado whispers: I have 1983 points at the moment.
[^Kusado whispers: I have (%d) points at the moment.$-> tell %param1 Kusado: 1983]
tell 1983 Kusado: 1983
|100|100| That person doesn't seem to be around...
This is pretty much what I'm getting from the trigger, and have been on it for hours |
|
|
|
Jellybear Newbie
Joined: 08 Jul 2004 Posts: 8 Location: USA
|
Posted: Fri Jul 23, 2004 1:45 am |
try [^Kusado whispers: I have (%d) points at the moment.$-> tell %lower(%param1) Kusado: 1983]
none of the muds I play let you type in the names with a capital letter |
|
_________________ mmmm....jellybears |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jul 23, 2004 3:00 am |
I recommended %1-%99 and %t1-%t99.
Replace %param1 with %t1.
%1 is okay, but you can replace it with %t2 if you find that less confusing.
#TR {^(*) tells you: mana$} {query_mana}
#COND {^Kusado whispers: I have (%d) points at the moment.$} {tell %t1 Kusado has %1 points at the moment} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
jtviper456 Novice
Joined: 17 Jan 2003 Posts: 37
|
Posted: Sat Jul 24, 2004 11:11 pm |
Thanks for all the help, but seems when the mud lags a bit it sticks on the second state of the trigger instead of going back to the first...any way to fix this?
|
|
|
|
|
|