|
Crymson4 Novice
Joined: 20 Nov 2001 Posts: 35 Location: USA
|
Posted: Fri Nov 23, 2001 4:45 am
Calling a trigger like a goto statement? |
Is it possible to have zmud call another trigger, from within one?
Let's say that I have a %rand speech pattern set up.
Suppose it was "I'm hungry, Let's eat, or Where's the beef?"
And I wanted it to rotate between the text msg. That's simple enough, the %rand.
Well, let's say then, that I wanted to effect a trigger to "eat meat sack" when I said either of the three things.
I don't want to make 3 triggers based on what I said. Can I just create a command list, in a macro or something, and zmud call it on it's own? Just tell it where to go, and execute the commands contained within?
Thanks.
-Crymson |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Nov 23, 2001 6:13 am |
quote:
Is it possible to have zmud call another trigger, from within one?
Let's say that I have a %rand speech pattern set up.
Suppose it was "I'm hungry, Let's eat, or Where's the beef?"
And I wanted it to rotate between the text msg. That's simple enough, the %rand.
Well, let's say then, that I wanted to effect a trigger to "eat meat sack" when I said either of the three things.
I don't want to make 3 triggers based on what I said. Can I just create a command list, in a macro or something, and zmud call it on it's own? Just tell it where to go, and execute the commands contained within?
Thanks.
-Crymson
This is using a message from the MUD I play:
#trigger {Your stomach growls.} {#case %rand(1,3) {'I'm hungry} {'Let's eat} {'Where's the beef?}}
li'l shmoe of Dragon's Gate MUD |
|
|
|
Crymson4 Novice
Joined: 20 Nov 2001 Posts: 35 Location: USA
|
Posted: Fri Nov 23, 2001 6:39 am |
That wasn't quite what I meant.
So it'll do the cast %rand and say one of the three, but then, how do I get zmud to "eat meat sack" reguardless of what I say, without setting up another trigger on the pattern of "You say 'I'm hungry'" another on on "You say 'Where's the beef?'" etc etc.
I want to know if I can make the "eat meat sack" a "function" and have that function called when I say one of the 3 cases. |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Fri Nov 23, 2001 7:37 am |
I could be misunderstanding you too, but wouldn't it be far easier to just have it as a second value in your trigger. put a ";" after the first one and then just put "eat meat sack" there.
Acaila |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Nov 23, 2001 4:10 pm |
Taking Matt's and Acaila's suggestions together, you'd get something like:
#TR {Your stomach growls.} {#CASE %rand(1,3) {'I'm hungry} {'Let's eat} {'Where's the beef?};eat meat sack}
LightBulb |
|
|
|
Crymson4 Novice
Joined: 20 Nov 2001 Posts: 35 Location: USA
|
Posted: Fri Nov 23, 2001 8:01 pm |
Heh, once again simplicity rules over idiocy.
I was making far too hard on myself. Thanks to all you guys who helped me pull my head out my rear and make it work. :)
-=Crymson
Reality is the effect of alcohol deficiency |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Nov 24, 2001 7:29 am |
quote:
That wasn't quite what I meant.
So it'll do the cast %rand and say one of the three, but then, how do I get zmud to "eat meat sack" reguardless of what I say, without setting up another trigger on the pattern of "You say 'I'm hungry'" another on on "You say 'Where's the beef?'" etc etc.
I want to know if I can make the "eat meat sack" a "function" and have that function called when I say one of the 3 cases.
I totally forgot about the eating part, but it should have been obvious or rather easy to figure out. At any rate, what I wrote could be used as a sort of personal tell to remind you of things. Heh, sometimes it's just plain rude to whip out your brown-bag lunch in the fancy restaurant you took your spouse/important business client to.
li'l shmoe of Dragon's Gate MUD |
|
|
|
|
|