|
Yourmom Beginner
Joined: 06 Jan 2003 Posts: 10
|
Posted: Mon Jan 06, 2003 1:09 pm
More complicated triggers |
I have another question...=P
If the text from my mud says "You wield blah blib boo" and I want the trigger to change a variable (is that what I should be using?" to 'blah blib boo' and not just 'blah', how do I do that? The purpose is so that I can write another triger that returns "wield blah blib boo" if I get disarmed.
There's obviously other good uses of such a technique, I just can't remember what I wanted to do with it. What I do remember is being frustrated that I couldn't do it...=P Sorry about the wierd place fillers...=P
Thanks! |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jan 06, 2003 2:16 pm |
#TRIGGER {You wield (*)} {#VAR myvar "%1"}
Kjata |
|
|
|
Yourmom Beginner
Joined: 06 Jan 2003 Posts: 10
|
Posted: Mon Jan 06, 2003 10:05 pm |
Thanks!
|
|
|
|
hukster Newbie
Joined: 06 Jan 2003 Posts: 4 Location: USA
|
Posted: Mon Jan 06, 2003 10:45 pm |
Kjata,
Can you help me with a similar trigger?
Lets say i am wielding a longsword.
Some one disarms me and pattern is
Knight disarms you. You drop your longsword
Is there a way to setup up the trigger so i can auto pick up and wield any weapon that was disarmed?
Thanks |
|
|
|
Maddux31 Beginner
Joined: 03 Jan 2003 Posts: 12 Location: USA
|
Posted: Mon Jan 06, 2003 10:53 pm |
I am not Kjata but I this might be a possible fix.
#tr {^(*) disarms you. You drop your %1} {get %1;wield %1} |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Mon Jan 06, 2003 10:59 pm |
Most places wont allow you to wield the short name but a keyword:
#TRIGGER {^* disarms you. You drop your (*)} {get %word(%1,%numwords(%1));wield %word(%1,%numwords(%1))}
Ton Diening |
|
|
|
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: Mon Jan 06, 2003 11:54 pm |
quote:
I am not Kjata but I this might be a possible fix.
#tr {^(*) disarms you. You drop your %1} {get %1;wield %1}
You should NOT be using %1 through %99 in a trigger pattern... They're not intended for that use, this trigger should read:
#tr {^* disarms you. You drop your (%w)} {get %1;wield %1}
This would match any single word...
%1 in a trigger pattern is fairly unpredictable, and since it's not a proper usage, may stop working at any time(ie: Zugg could fix it so this doesn't work) |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jan 07, 2003 6:25 am |
Because the last word in the weapon's name might sometimes not be its keyword, it's usually best to get the variable when you wield the weapon in the first place, instead of when it's disarmed.
#AL wield {#VAR wield %1;~wield %1}
#TR {disarms you. You drop your} {get @wield;~wield @wield}
This also helps when you want to be sure of getting back your "King Alfred's longsword" (keywords = king, alfred, or longsword) using the keyword alfred instead of the "commoner's longsword" that you made your opponent drop by casting heat metal.
LightBulb
Senior Member |
|
|
|
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: Tue Jan 07, 2003 4:32 pm |
Ah, but what if you're wielding a shortsword in one hand, and a dagger in the other, huh?
*ducks* |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jan 07, 2003 6:29 pm |
Make a second alias for the other one of course.
#AL wield2 {#VAR wield2 %1;~wield %1}
#TR {disarms you. You drop your} {get @wield;~wield @wield;get @wield2;~wield @wield2}
LightBulb
Senior Member |
|
|
|
|
|