Shorlen2006-07-26 09:00:26
QUOTE(Enigmatic Eggplant @ Jul 25 2006, 10:17 PM) 311666
Bleh, still not working...New code, also doesn't work....
Please read my above post - you are still not telling your prompt trigger to trigger on the prompt.
Laysus2006-07-26 11:02:40
try this:
#VARIABLE balances right|left|bal|equilibrium
#ALIAS balancescan {#IF ((%ismember( left, @balances) and %ismember( right, @balances) and %ismember( bal, @balances) and %ismember( equilibrium, @balances))) {#SAY %ansi(blue,white)---Tengen Houmen---}
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en, (%d)w (w%)-} {#if (%pos( x, %7)) {add balances bal} {del balances bal};#IF (%pos( e, %7)) {add balances equilibrium} {del balances equilibrium};#IF (%pos( r, %7)) {add balances right} {del balances right};#IF (%pos( l, %7)) {add balances left} {del balances left}} "" {nocr|prompt}
#TRIGGER {^You have recovered (*)} {#GA;#IF (%match(%1,"balance on your left arm.")) {add balances left};#IF (%match(%1,"balance on your right arm.")) {add balances right};#IF (%match(%1,"balance on all limbs.")) {add balances bal};#IF (%match(%1,equilibrium.)) {add balances equilibrium};balancescan}}
I haven't tested it, so no promises. Just neatened things up a bit.
You also left out a space before (%d)w in the prompt trigger.
CODE
#VARIABLE balances right|left|bal|equilibrium
#ALIAS balancescan {#IF ((%ismember( left, @balances) and %ismember( right, @balances) and %ismember( bal, @balances) and %ismember( equilibrium, @balances))) {#SAY %ansi(blue,white)---Tengen Houmen---}
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en, (%d)w (w%)-} {#if (%pos( x, %7)) {add balances bal} {del balances bal};#IF (%pos( e, %7)) {add balances equilibrium} {del balances equilibrium};#IF (%pos( r, %7)) {add balances right} {del balances right};#IF (%pos( l, %7)) {add balances left} {del balances left}} "" {nocr|prompt}
#TRIGGER {^You have recovered (*)} {#GA;#IF (%match(%1,"balance on your left arm.")) {add balances left};#IF (%match(%1,"balance on your right arm.")) {add balances right};#IF (%match(%1,"balance on all limbs.")) {add balances bal};#IF (%match(%1,equilibrium.)) {add balances equilibrium};balancescan}}
I haven't tested it, so no promises. Just neatened things up a bit.
You also left out a space before (%d)w in the prompt trigger.
Unknown2006-07-26 12:00:17
Tried the code Laysus provided. Problem still remains, that when I import, the triggers aren't implemented.
Unknown2006-07-26 21:14:44
Laysus got a %w transposed as w% near the end of that prompt trigger pattern. Try fixing that and see if it works then.
Laysus2006-07-26 21:19:31
That's a remnant from his actually, I didn't notice it
Unknown2006-07-26 22:11:57
Er....Still doesn't even bring in the triggers...Code as follows...For the entire system so far...
CODE
#CLASS {Tenkai}
#CLASS {Tenkai|Balances}
#VARIABLE balances right|left|bal|equilibrium
#ALIAS balancescan {#IF ((%ismember( left, @balances) and %ismember( right, @balances) and %ismember( bal, @balances) and %ismember( equilibrium, @balances))) {#SAY %ansi(blue,white)---Tengen Houmen---}
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en, (%d)w (%w)-} {#if (%pos( x, %7)) {add balances bal} {del balances bal};#IF (%pos( e, %7)) {add balances equilibrium} {del balances equilibrium};#IF (%pos( r, %7)) {add balances right} {del balances right};#IF (%pos( l, %7)) {add balances left} {del balances left}} "" {nocr|prompt}
#TRIGGER {^You have recovered (*)} {#GA;#IF (%match(%1,"balance on your left arm.")) {add balances left};#IF (%match(%1,"balance on your right arm.")) {add balances right};#IF (%match(%1,"balance on all limbs.")) {add balances bal};#IF (%match(%1,equilibrium.)) {add balances equilibrium};balancescan}}
#CLASS 0
#CLASS {Tenkai|Balances}
#VARIABLE balances right|left|bal|equilibrium
#ALIAS balancescan {#IF ((%ismember( left, @balances) and %ismember( right, @balances) and %ismember( bal, @balances) and %ismember( equilibrium, @balances))) {#SAY %ansi(blue,white)---Tengen Houmen---}
#TRIGGER {^(%d)h, (%d)m, (%d)e, (%d)p, (%d)en, (%d)w (%w)-} {#if (%pos( x, %7)) {add balances bal} {del balances bal};#IF (%pos( e, %7)) {add balances equilibrium} {del balances equilibrium};#IF (%pos( r, %7)) {add balances right} {del balances right};#IF (%pos( l, %7)) {add balances left} {del balances left}} "" {nocr|prompt}
#TRIGGER {^You have recovered (*)} {#GA;#IF (%match(%1,"balance on your left arm.")) {add balances left};#IF (%match(%1,"balance on your right arm.")) {add balances right};#IF (%match(%1,"balance on all limbs.")) {add balances bal};#IF (%match(%1,equilibrium.)) {add balances equilibrium};balancescan}}
#CLASS 0
Laysus2006-07-27 09:56:47
Try putting it all in using the gui rather than the command line.
Unknown2006-07-27 11:24:38
I import all my scripts from the menu: Settings -> Import -> Script (ASCII) and then load a file with the commands in it (and properly formatted without extra carriage returns and what-not). Entering zScript commands on the command-line is a crapshoot and you can't be sure it's going to go well for you.
And, if that's your -entire- script, you'll need to add aliases "add" and "del" to handle the balances string list or just replace them with "#additem" and "#delitem"...
And, if that's your -entire- script, you'll need to add aliases "add" and "del" to handle the balances string list or just replace them with "#additem" and "#delitem"...
Unknown2006-07-27 14:34:40
I NEVER use the command line to put in scripts...I do use the Import thing...
And the fact remains, as many edits as I can make to it, put in more stuff, the triggers in there themselves won't come in. I'll open up Settings, check the Balances folder, and all that will be there is the @balances and the alias for balancescan.
And the fact remains, as many edits as I can make to it, put in more stuff, the triggers in there themselves won't come in. I'll open up Settings, check the Balances folder, and all that will be there is the @balances and the alias for balancescan.
Laysus2006-07-27 16:05:08
use the settings window to put it in is my advice.
Unknown2006-07-28 13:02:43
Look at your balancescan alias in your settings and you'll see that both of your triggers are sitting in there. Your balancescan alias needs another } at the end. And your trigger for "You have recovered (*)" has an extra } at the end, so maybe that's where the missing one went?