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
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Mon Jun 21, 2004 7:23 pm   

Alias, Temp, and ReParse
 
I'm working on a script, and it's nearly complete, except that I can't get conditions of a temp trigger to reparse. Here's the chunk of the alias that's not working quite right:
quote:

#TEMP {You feel the transfer beginning} {#ADDITEM Transferring {@Takingit}}
#COND {^You sense that *$} {}
#COND {^You sense that <@Patient's@Takenit> {is|are} fully healed.} {#DELITEM Transferring {<@takingit>}} "" {ReParse}
#COND {^You sense that there are no more injuries to transfer from the<@Wound>.} {#DELITEM Transferring {<@takingit>}} "" {ReParse}


The trigger is created as expected, except that the last 2 conditions are patterns instead of ReParse.

Any thoughts?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jun 22, 2004 12:52 am   
 
I don't think #COND is meant to have a class parameter. Try removing the "" place holder you have. After that I would so do it all in one condition with an #IF and %match setup, or make it a permanent trigger that you disable when not needed.
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Tue Jun 22, 2004 1:32 am   
 
Thanks, Vijilante... taking out the "" worked. But, how can I get the temp trigger to go to a class without using #CLASS? Whenever I add on conditions, the whole trigger gets sucked back to the base level.

This script started out with a whole bunch of triggers that misfired, which is why I'm trying to get them into one multi-state trigger. When I'm done with it, it'll be unfeasable to use a single condition, because that would require matching nested lists, which just doesn't happen.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Tue Jun 22, 2004 2:45 am   
 
You can make a temp trigger with the same basic parameters as a regular trigger #TEMP {pattern} {command} "class" {options}...
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Tue Jun 22, 2004 3:42 pm   
 
That works if it's a simple temp trigger. But as soon as I add #COND's to it, the temp trigger moves to the root class.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jun 22, 2004 4:19 pm   
 
1. What's wrong with using the #CLASS command? You aren't likely to make #TEMP triggers from the command line very often, and using #CLASS as part of a trigger script won't require any extra effort on your part once the script is finished.

2. I haven't actually tried it, but I can't see the #CONDITION command altering the Class assignment of any trigger, temporary or not. Are you sure this puts the trigger in the root class?
#TEMP {You feel the transfer beginning} {#ADDITEM Transferring {@Takingit}} "Temporary"
#COND {^You sense that *$} {}
#COND {^You sense that <@Patient's@Takenit> {is|are} fully healed.} {#DELITEM Transferring {<@takingit>}} "" {ReParse}
#COND {^You sense that there are no more injuries to transfer from the<@Wound>.} {#DELITEM Transferring {<@takingit>}}
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Wed Jun 23, 2004 3:19 pm   
 
1. I am using the #CLASS command at the moment, but it just seems odd that I should have to.

2. Yes, it does alter the class assignment. I don't understand why, but I've run a multitude of tests trying different things. Basically, if a #TR or #TEMP is assigned to a class, it goes there. But as soon as you add a #COND, the trigger gets unclassed - i.e. it's identical except the location, and has the new state tagged onto it.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jun 24, 2004 6:41 pm   
 
Recovered from the 23 error and was able to test and confirm this behavior. You should submit a bugrep on this if you haven't already done so.

The #CONDITION command doesn't have a Class field, so the #CLASS command will have to do. Thanks for bringing this up, it will affect everyone who is using the #CONDITION command with subclass triggers.
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Thu Jun 24, 2004 8:54 pm   
 
Thanks for the help LightBuld, yet again. I've submitted the bug report as you suggested, and I'll just use the #CLASS commands until it's fixed.
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