Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
bebamedo
Novice


Joined: 02 Aug 2006
Posts: 32

PostPosted: 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.
Reply with quote
bebamedo
Novice


Joined: 02 Aug 2006
Posts: 32

PostPosted: 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?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
bebamedo
Novice


Joined: 02 Aug 2006
Posts: 32

PostPosted: Wed Mar 26, 2008 5:38 pm   
 
That works wonderfully!!!
Thanks MattLofton
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net