|
Legion Beginner
Joined: 09 Dec 2000 Posts: 22 Location: USA
|
Posted: Fri May 23, 2003 1:12 am
Single Loot trigger for multiple Corpse types |
On this particular mud, there are two different corpse types. One is a "corpse", the other is "remains".
the following are 4 examples of both.
A police borg is dead! R.I.P.
A cyborg is dead! R.I.P.
A mob is dead! R.I.P.
Mob is dead! R.I.P.
i have been trying to set up a trigger with the pattern:
%1 is dead! R.I.P.
using an #IF command, i'm looking to have it determine if the word "borg" is within %1. If it is, i want it to loot remains, if not, loot corpse. Anyone happen to have suggestions to this? I've tried the following to no avail:
#IF (%1 = ("A" %2 "borg" | "A" %2"borg") {loot remains} {loot corpse}
*this didn't work*
I've tried a few other variations of this which didn't work. Any suggestions? thanks.
Out of the darkness
rises a storm, a Legion
of nightmares. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri May 23, 2003 3:39 am |
Which helpfile told you to use %1 in your trigger pattern?
Which helpfile said you could just invent %2 in an #IF condition?
These patterns may have worked on some other client you've used, but I'm certain they aren't anywhere in the zMUD help.
You have an unmatched parenthesis.
You are comparing a string (%1) to the result of a logic operation ("A" %2 "borg" | "A" %2"borg"). What, exactly, will be compared by the OR isn't entirely clear, but the final result is almost guaranteed to be not-equal to %1.
Correct syntax does matter.
I have two suggestions:
1. Just do both actions, and let the MUD tell you "I don't see that here" for the inappropriate one.
#TR {is dead! R.I.P.} {loot remains;loot corpse}
2. Use correct syntax and appropriate conditions:
#TR {(%w) is dead! R.I.P} {#IF (%ends( %1, "borg")) {loot remains} {loot corpse}}
LightBulb
Advanced Member |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|