|
Talanvor Newbie
Joined: 19 Apr 2004 Posts: 1 Location: USA
|
Posted: Mon Apr 19, 2004 7:22 am
Little help with a goto trigger. |
Hi, I tried making a little trigger that'd help me with clan building, but it's giving me some grief so I'm looking for a little help. Here's what I've got so far:
Pattern: goto %1
Value:
#IF (%1 = "clan1") {Goto 100}
#IF (%1 = "clan2") {Goto 200}
#IF (%1 = "clan3") {Goto 300}
etc. etc.
The problem occurs when I try to goto something with two names, say like a dwarven slave, then all of the #IF's are true and takes me to all of the vnums. Any help would be really appreciated. |
|
|
|
Selorien Newbie
Joined: 02 Apr 2004 Posts: 3
|
Posted: Mon Apr 19, 2004 8:31 am |
I'm not completely sure, but i think it would work if you used %-1 instead:
#IF {%-1 = "clan1"} {goto 100}
etc... |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Apr 19, 2004 11:20 am |
I believe you want an #ALIAS and not a #TRIGGER.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Apr 19, 2004 4:25 pm |
USE DELIMITERS!!!!!
#IF ("%1" = "clan1")
After substitution, your condition (with no delimiters around %1):
#IF (dwarven slave = "clan1")
Grouping the above gives:
#IF ((dwarven) (slave = "clan1"))
Since 'dwarven' is not a defined condition, it is not evaluated further. 'slave = "clan1"' is false. After evaluating, the condition becomes:
#IF (dwarven 0)
Since there is no operator between dwarven and the 0, this is a string. Strings of 1 or more characters are true. This makes your condition always true when %1 consists of more than one word. |
|
|
|
|
|