![](templates/Classic/images/spacer.gif) |
bebamedo Novice
Joined: 02 Aug 2006 Posts: 32
|
Posted: Mon Mar 24, 2008 6:58 pm
problems with %pos command |
Greets.
For some reason second half of my trigger si working ok, and the first not.
Here is trigger in full:
#TRIGGER {H:(%d) M:(%d) E:(%d) W:(%d) <(%w) (%w)>} {#VAR Advanced_Healing/prompt_status_trigger/statucheck1 %5;#VAR Advanced_Healing/prompt_status_trigger/statucheck2 %6;#VAR Advanced_Healing/prompt_status_trigger/statuslist1 {@statucheck1};#VAR Advanced_Healing/prompt_status_trigger/statuslist2 {@statucheck2};#IF (%pos(e,@statuslist1)) {#VAR Advanced_Healing/equilibrium 1} {#VAR Advanced_Healing/equilibrium 0};#IF (%pos(b,@statuslist1)) {#VAR Advanced_Healing/balance 1} {#VAR Advanced_Healing/balance 0};#IF (%pos(s,@statuslist2)) {#VAR Advanced_Healing/stunned 1} {#VAR Advanced_Healing/stunned 0};#IF (%pos(p,@statuslist2)) {#VAR Advanced_Healing/prone 1} {#VAR Advanced_Healing/prone 0};#IF (%pos(b,@statuslist2)) {#VAR Advanced_Healing/NonBlind 0} {#VAR Advanced_Healing/NonBlind 1};#IF (%pos(d,@statuslist2)) {#VAR Advanced_Healing/NonDeaf 0} {#VAR Advanced_Healing/NonDeaf 1}} "Advanced_Healing/prompt_status_trigger" {nocr|prompt}
Now, everything in connection with statuslist2 is working as it should.
BUT statuslist1 is not working. It never changes valuables to 0, if the letter is not part of the statuslist1 valuable.
ŽI added echos to present variables equilibrium and balance at certain moment. Here are two logs from game:
LOG1
A hulking mutant rat scurries between and around your feet, effectively
knocking you to the ground.
H:260 M:340 E:1380 W:1600 <e- pdb> stand
You must regain balance first.
balance 1
H:260 M:340 E:1380 W:1600 <e- pdb>
You have recovered balance.
H:260 M:340 E:1380 W:1600 <eb pdb> stand
You stand up and stretch your arms out wide.
LOG2
You focus on the light projected around you slightly distorting the vibration
with your mental will causing you to shimmer out of view.
H:287 M:320 E:1381 W:1598 <-b db> conjure cloak
equilibrium 1
balance 1
You must regain your equilibrium first.
H:287 M:320 E:1381 W:1599 <-b db>
equilibrium 1
balance 1
Any help would be appreciated. |
|
|
![](templates/Classic/images/spacer.gif) |
bebamedo Novice
Joined: 02 Aug 2006 Posts: 32
|
Posted: Tue Mar 25, 2008 9:35 pm |
correction to above trigger.
I found out that basic mistake is catching of letters and making statuslist variables. When prompt is full (like <eb pdb>), all ok. But when i get prompt with - sign, like <e- pdb>, it doesn't change contents of neither statuslist 1 or 2.
Any ideas what am i doing wrong? |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Mar 25, 2008 10:50 pm |
It's your pattern. You use something along the lines of <(%w) (%w)> at the end, so when the - appears it's not matching. To fix, change <(%w) (%w)> to <([%w-]) ([%w-])>.
You'll have to do something different if this part of the prompt can reach complete emptiness, though (as opposed to nothing but minus signs). |
|
_________________ EDIT: I didn't like my old signature |
|
|
![](templates/Classic/images/spacer.gif) |
bebamedo Novice
Joined: 02 Aug 2006 Posts: 32
|
Posted: Wed Mar 26, 2008 5:38 pm |
That works wonderfully!!!
Thanks MattLofton |
|
|
![](templates/Classic/images/spacer.gif) |
|
|