|
filthyreg Beginner
Joined: 14 Oct 2003 Posts: 14 Location: Canada
|
Posted: Wed Oct 15, 2003 5:13 pm
Trigger Help please |
Alright, first off this is for Medievia and I run ZMud 6.62. Anyways here's my problem. I'm trying to write a script for grabbing variables off what comes off the screen. And I'm getting stuck someplace.... here's what I want the script to be triggered from:
The wizard looks at a magic orb placed here by Vryce....
The wizard telepaths you, 'Let's see here... I see an entrance at...'.
The wizard telepaths you, 'A Rocky Cliff Path'.
The wizard telepaths you, 'in the general vicinity of'.
The wizard telepaths you, 'The Cliff of Berkovic'.
The wizard telepaths you, 'The entrance was found fairly recently.'
and here is what I got so far:
#trig {^The wizard telepaths you, 'let's see here... I see an entrance at...'.} {} {combst}
#trig {^The wizard telepaths you, '&rvar'} {} {combst}
#trig {^The wizard telepaths you, 'in the general vicinity of'.} {} {combst}
#trig {^The wizard telepaths you, '&zvar'} {} {combst}
#trig {^The wizard telepaths you, '&tvar'} {} {combst}
#alias {combsinfo} {#showme {Combs ~[Zone~] $zvar ~[Room~] $rvar ~[Age~] $tvar}} {combst}
#alias {clcombs} {clan Combs ~[Zone~] $zvar ~[Room~] $rvar ~[Age~] $tvar} {combst}
#alias {saycombs} {say Combs ~[Zone~] $zvar ~[Room~] $rvar ~[Age~] $tvar} {combst}
#alias {towncombs} {town Combs ~[Zone~] $zvar ~[Room~] $rvar ~[Age~] $tvar} {combst}
#alias {chatcombs} {ca Combs ~[Zone~] $zvar ~[Room~] $rvar ~[Age~] $tvar} {combst}
when I try and use it, it keeps listing only the last telepath variable captured, in this example 'The entrance was found fairly recently.' Any help any of you could give would be greatly appreciated.
Thanks. |
|
|
|
StackAdder Wanderer
Joined: 30 Sep 2003 Posts: 77 Location: United Kingdom
|
Posted: Thu Oct 16, 2003 2:48 am |
Well I can tell you why it does that - you have 3 triggers all firing on the same text. Because the last piece of text matches them all, all three variables get set to the same thing.
If you combine them into a state trigger (I only know how to do this via the editor I am afraid - copy and paste the trigger patterns into successive lines in the editor) it will magically put the values you seek into the variables as required.
I think you want @ signs in your aliases too...
eg
say Combs ~[Zone~] @zvar ~[Room~] @rvar ~[Age~] @tvar
Hope this helps |
|
|
|
filthyreg Beginner
Joined: 14 Oct 2003 Posts: 14 Location: Canada
|
Posted: Thu Oct 16, 2003 5:35 am |
Thanks for your insight, but I still can't get it to work, I was already aware of the actual problem but I don't know how to fix it... I need to know how I can get those triggers to fire off in order... so like it fires on the first line and captures, then moves to the next line and the next line triggers another capture for different info.... etc.
Any more suggestions, would be greatly appreciated. |
|
|
|
zyran Beginner
Joined: 16 Apr 2003 Posts: 17 Location: USA
|
Posted: Thu Oct 16, 2003 7:32 am |
Like Stackadder said. You have to make a multi-state trigger. Like so
#TRIGGER {The wizard looks at a magic orb placed here by Vryce....} {}
#COND {The wizard telepaths you, 'Let's see here... I see an entrance at...'.} {}
#COND {The wizard telepaths you, '&rvar'} {}
#COND {The wizard telepaths you, 'in the general vicinity of'} {}
#COND {The wizard telepaths you, '&zvar'} {}
#COND {The wizard telepaths you, '&tvar'} {}
and if you want your aliases to work too you need to change the $ signs to @ signs. |
|
|
|
StackAdder Wanderer
Joined: 30 Sep 2003 Posts: 77 Location: United Kingdom
|
Posted: Thu Oct 16, 2003 12:24 pm |
Ah thanks for the command line version zyran :-)
|
|
|
|
filthyreg Beginner
Joined: 14 Oct 2003 Posts: 14 Location: Canada
|
Posted: Thu Oct 16, 2003 4:15 pm |
I'm aware of the @ symbol... I Tried the state trigger but it still isn't working so... obviously I'm doing something wrong. Incidentally, my version that I just created, looks just like yours, but still doesn't work.
But I'll look at it again. Thanks for your replies. |
|
|
|
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Thu Oct 16, 2003 10:00 pm |
#cond isn't something you would see inside the 'value' field. go into the 'states' tab to check it out. If you see #cond inside the value field you need to put it into the states tab or recreate the trigger on the command bar.
|
|
|
|
filthyreg Beginner
Joined: 14 Oct 2003 Posts: 14 Location: Canada
|
Posted: Thu Oct 16, 2003 11:25 pm |
Ok, I finally got it to work... and it wasn't a matter of how I typed things in to the state trigger... it was just some of the damn characters that were halting the trigger... ah well. here's the finished product if anyone wants:
#CLASS {Combs}
#ALIAS chatcombs {ca Combs Zone: @zone Room: @room Age: @time}
#ALIAS clcombs {cl Combs ~[Zone~] @zone ~[Room~] @room ~[Age~] @time}
#ALIAS combsinfo {#show Combs ~[Zone~] @zone ~[Room~] @room ~[Age~] @time}
#ALIAS fcombs {f Combs ~[Zone~] @zone ~[Room~] @room ~[Age~] @time}
#ALIAS saycombs {say Combs ~[Zone~] @zone ~[Room~] @room ~[Age~] @time}
#ALIAS towncombs {town Combs ~[Zone~] @zone ~[Room~] @room ~[Age~] @time}
#TRIGGER {The wizard looks at a magic orb placed here by Vryce....} {}
#COND {The wizard telepaths you, ~'Let's see here... I see an entrance at...~'.} {}
#COND {The wizard telepaths you, ~'&room~'.} {}
#COND {The wizard telepaths you, ~'in the general vicinity of~'.} {}
#COND {The wizard telepaths you, ~'&zone~'.} {}
#COND {The wizard telepaths you, ~'&time~'.} {}
#CLASS 0
P.S. Thanks to all who helped me get this thing working... it was greatly appreciated. |
|
|
|
|
|