|
Alexiel Novice
Joined: 05 Mar 2007 Posts: 33 Location: Paulsboro,NJ
|
Posted: Thu Apr 23, 2009 12:50 am
Help with a trigger |
I had this running, and it worked great when I was taking the tokens out of a container, but refused to work when I would loot a token from a corpse, any ideas on where I went wrong?
Code: |
#TRIGGER {^You take a crystal token from the corpse of %1, the Archon Hunter.} {#math @crystal+1} "stats"
#TRIGGER {^You take an admantite token from the corpse of %1, the Archon Hunter.} {#math @admantite+1} "stats"
#TRIGGER {^You take a copper token from the corpse of %1, the Archon Hunter.} {#math @copper+1} "stats"
#TRIGGER {^You take an obsidian token from the corpse of %1, the Archon Hunter.} {#math @obsidian+1} "stats"
#TRIGGER {^You take a platinum token from the corpse of %1, the Archon Hunter.} {#math platinum+1} "stats"
#TRIGGER {^You take a golden token from the corpse of %1, the Archon Hunter.} {#math @golden+1} "stats"
#TRIGGER {^You take %1 of a crystal token from +The Corpse of a Fallen Angel+.} {#var crystal %1} "stats"
#TRIGGER {^You take %1 of an admantite token from +The Corpse of a Fallen Angel+.} {#var admantite %1} "stats"
#TRIGGER {^You take %1 of a copper token from +The Corpse of a Fallen Angel+.} {#var copper %1} "stats"
#TRIGGER {^You take %1 of an obsidian token from +The Corpse of a Fallen Angel+.} {#var obsidian %1} "stats"
#TRIGGER {^You take %1 of a platinum token from +The Corpse of a Fallen Angel+.} {#var platinum %1} "stats"
#TRIGGER {^You take a golden token from +The Corpse of a Fallen Angel+.} {#var golden %1} "stats"
#TRIGGER {^You take a crystal token from +The Corpse of a Fallen Angel+.} {#var crystal 1} "stats"
#TRIGGER {^You take an admantite token from +The Corpse of a Fallen Angel+.} {#var admantite 1} "stats"
#TRIGGER {^You take a copper token from +The Corpse of a Fallen Angel+.} {#var copper 1} "stats"
#TRIGGER {^You take an obsidian token from +The Corpse of a Fallen Angel+.} {#var obsidian 1} "stats"
#TRIGGER {^You take a platinum token from +The Corpse of a Fallen Angel+.} {#var platinum 1} "stats"
#STAT {Quest Points: @qptotal ~(@questsdone completed~) Practices: @practices Till Next QP Item ~(@qpitem~): @qpneeded Tokens: Crystal:@crystal | Admantite:@admantite | Copper:@copper | Obsidian:@obsidian | Platinum:@platinum | Golden:@golden} "stats"
#var {crystal} {}
#var {admantite} {}
#var {copper} {}
#var {obsidian} {}
#var {platinum} {}
#var {golden} {}
|
Thanks in advance :) |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Apr 23, 2009 2:25 am |
I can't tell the difference between the containers and the corpses there. Which triggers work and which don't, and what text should set them off?
I suspect the problem stems from %1 not being a proper wildcard, but it could really be any number of things. |
|
|
|
Alexiel Novice
Joined: 05 Mar 2007 Posts: 33 Location: Paulsboro,NJ
|
Posted: Thu Apr 23, 2009 3:26 am |
#TRIGGER {^You take a crystal token from the corpse of %1, the Archon Hunter.} {#math @crystal+1} "stats"
#TRIGGER {^You take an admantite token from the corpse of %1, the Archon Hunter.} {#math @admantite+1} "stats"
#TRIGGER {^You take a copper token from the corpse of %1, the Archon Hunter.} {#math @copper+1} "stats"
#TRIGGER {^You take an obsidian token from the corpse of %1, the Archon Hunter.} {#math @obsidian+1} "stats"
#TRIGGER {^You take a platinum token from the corpse of %1, the Archon Hunter.} {#math platinum+1} "stats"
#TRIGGER {^You take a golden token from the corpse of %1, the Archon Hunter.} {#math @golden+1} "stats"
These are the corpses, and the ones not working =( |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Apr 23, 2009 3:40 am |
First of all, the correct syntax would be:
#MATH golden %eval(@golden+1)
Second, like Fang said, %1 is not a proper wildcard, and is actually a bug. You should change it to at least *, or %w if it's a single word, or %n if it's a number.
Charneus |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Apr 23, 2009 3:41 am |
Check that the triggers are firing first by adding a #say to them. If they're firing, there's something wrong with the script - for example, it might be having trouble locating the right variable. If it's not firing, then it's a problem with the pattern, and to help you there we'll need to see some examples of lines those triggers are meant to match.
|
|
|
|
Alexiel Novice
Joined: 05 Mar 2007 Posts: 33 Location: Paulsboro,NJ
|
Posted: Thu Apr 23, 2009 5:35 am |
Its not firing from the looting at all, I changed the %1 to %w.
The line when an I loot an archon hunter looks like:
You take 10,464 gold coins.
You take an obsidian token from the corpse of Taitana, the Archon Hunter. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Apr 23, 2009 5:54 am |
Did you fix the #MATH part like I said? It won't work if you keep doing it that way.
If the corpse of (whatever) is always just one word, you can use %w. Otherwise, use *.
Charneus |
|
|
|
Alexiel Novice
Joined: 05 Mar 2007 Posts: 33 Location: Paulsboro,NJ
|
Posted: Thu Apr 23, 2009 8:23 am |
Did the math as you said, and its always <name>, the archon hunter
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Apr 23, 2009 9:07 am |
Show us some real text from the MUD; the problem's not going to be obvious until we see it.
|
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Thu Apr 23, 2009 6:04 pm |
Out of curiosity why do you have "stats" as part of them all? That looks like the old (pre v5) way of doing classes.... though I could be wrong since that has been sooo many years ago. What version are you using?
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
Alexiel Novice
Joined: 05 Mar 2007 Posts: 33 Location: Paulsboro,NJ
|
Posted: Thu Apr 23, 2009 9:57 pm |
Aravan bashes Tawaite, the Archon Hunter over the head with a typhoon shield.
Tawaite, the Archon Hunter has been slain!
Aravan's bash slams Tawaite, the Archon Hunter's head into a rock with such force that it kills her.
Your blood freezes as you hear Tawaite, the Archon Hunter's death cry.
You receive 21 archon points.
Tawaite, the Archon Hunter collapses lifeless to the ground.
The sliced leg of Tawaite, the Archon Hunter falls to the ground.
You take a crystal token from the corpse of Tawaite, the Archon Hunter.
This is how it looks when I loot. The "stats" is for folders. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri Apr 24, 2009 3:10 am |
What exactly is not firing about it? The variables not getting added? They should, though...
Try using this as a trigger:
#TRIGGER {^You take a crystal token from the corpse of %w, the Archon Hunter.} {#ADD crystal 1}
You could also simplify your triggers to the following:
#REGEX {^You take an? (\w+) token from the corpse of \w+, the Archon Hunter.} {#ADD %1 1}
But we need to know what it's not doing. As a debug, add a #SAY Fired! to the script to see if it fires each time you loot a corpse.
One thing that it might be is making sure check boxes are checked properly on the options panel. The following two boxes should be checked: Trigger on Trigger and Trigger on Newline.
Good luck.
Charneus |
|
|
|
Alexiel Novice
Joined: 05 Mar 2007 Posts: 33 Location: Paulsboro,NJ
|
Posted: Fri Apr 24, 2009 10:32 pm |
I got this working
|
|
|
|
|
|