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
jluce7
Beginner


Joined: 20 Dec 2005
Posts: 22

PostPosted: Sat Feb 25, 2006 7:38 pm   

Stringlist / Reparse questions
 
Ok...is this right? I want all my afflictions added to ONE string called CurrentAfflictions.

So I do this:
#TRIGGER {^You are a big scripting dummy$} {#ADDI CurrentAfflictions dummy}

Then for the cure:

#TRIGGER {^You eat a dummyproofing berry.} {}
#COND {You are so damn stupid at this anymore.$(*)h, (*)m (*)-$} {#DELI CurrentAfflictions dummy}


Ok now say the dummyproofing berry has a lot of things it cures? Does this look right?


#TRIGGER {^You eat a dummyproofing berry.} {}
#COND {The confusion lifts from your mind.$(*)h, (*)m (*)-$} {#DELI CurrentAfflictions confusion} {looplines|param=1}
#COND {You are no longer dizzy.$(*)h, (*)m (*)-$} {#DELI CurrentAfflictions dizziness} {reparse}
#COND {You aren't such a damn clutz after all.$(*)h, (*)m (*)-$} {#DELI CurrentAfflictions clumsiness} {reparse}

Basically I want it to use the same "eating msg" but only remove it if it sees a curing message followed by the prompt. I just don't know if I am making proper use of REPARSE/LOOPLINES for this or not since the actual cure message could be ANY of the COND msgs and not in that order.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sat Feb 25, 2006 10:02 pm   
 
Personally I would use a condition that only matches the prompt with a loop pattern type and a low param value, like maybe 3. Then do your reparsing by checking the %line2 variable:
#TRIGGER {^You eat a dummyproofing berry.} {}
#COND {^(*)h, (*)m (*)-} {#CASE {%eval(%ismember(%line2,"The confusion lifts from your mind.|You are no longer dizzy.|You aren't such a damn clutz after all.")+1)} {#NOOP} {#DELI CurrentAfflictions confusion} {#DELI CurrentAfflictions dizziness} {#DELI CurrentAfflictions clumsiness}}} {} {looppat|param=3}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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