 |
brinlong Newbie
Joined: 13 Mar 2004 Posts: 8 Location: USA
|
Posted: Sat Mar 13, 2004 5:30 am
Strings of items |
Heres an odd trigger question. lets say i have 20 chests, and I want to pick them all. I know the output it shows when it picks the chest. Is there a syntax so that the trigger would run:
->pick chest
you pick the lock on the iron chest
->pick chest+1
you failed
->pick chest+1
you pick the lock on the wood chest
->pick chest+2
And so on? I know the syntax for the pattern would be {you pick the lock on the (%1) chest} but what would I put for the output to the pattern? |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Mar 13, 2004 9:13 pm |
No, a trigger Pattern should not use %1. Use * for a general wildcard or the appropriate specific wildcard when you have a better idea what type of text will need to be matched.
#VAR chests 1 1
#VAR pick 0 0
#AL picks {#VAR chests %1;#T+ PickChest;#IF (%numparam() > 1) {pick chest~+%2} {#VAR pick 0;pick chest}}
#CLASS PickChest
#TR {you pick the lock on the * chest} {#ADD pick 1;#IF (@pick < @chests) {picks @chests @pick} {#T- PickChest}}
#TR {you failed} {#IF (@pick > 0) {picks @chests @pick} {picks @chests}}
#CLASS 0 |
|
|
|
 |
brinlong Newbie
Joined: 13 Mar 2004 Posts: 8 Location: USA
|
Posted: Sat Mar 13, 2004 10:55 pm |
Thanks man 
|
|
|
|
 |
|
|
|