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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Fergal1982
Wanderer


Joined: 08 Aug 2005
Posts: 70

PostPosted: Sat Dec 22, 2007 8:34 pm   

Triggers Issue
 
Hi guys, I've just reinstalled CMUD after a format, and copied the xly and pkg files from the old image into the new install of cmud. I then set the session to use those files.

I've loaded it up, and most of it seems to be fine, but the capture tells i have, dont seem to be working correctly. Below is the xml export of the tells

Code:

- <class name="City Capture">
- <trigger name="Citcapture" priority="1830">
  <pattern>^The Citizens of The Forest of Ysallyra:</pattern>
  <value>:City:#Clr;:City:#sayp %time(hh:mm)%Char(13);#t+ Citymulti-line</value>
- <trigger>
  <pattern>^There are therefore currently %n citizens in Akanbar.</pattern>
  <value>#cap City;#gag;#T- Citymulti-line</value>
  </trigger>
  </trigger>
- <trigger name="Citymulti-line" priority="1850" enabled="false">
  <pattern>^(*)</pattern>
  <value>#cap City;#gag</value>
  </trigger>
  </class>
- <class name="Who Capture">
- <trigger name="WhoCapture" priority="1870">
  <pattern>^Denizens of Akanbar are as follows:</pattern>
  <value>:who:#Clr;:who:#sayp %time(hh:mm)%Char(13);#t+ WhoMulti-line</value>
- <trigger>
  <pattern>~></pattern>
  <value>#T- WhoMulti-line</value>
  </trigger>
  </trigger>
- <trigger name="WhoMulti-line" priority="1890" enabled="false">
  <pattern>(*)</pattern>
  <value>#Cap Who;#gag</value>
  </trigger>
  </class>
- <class name="Tells Capture">
- <trigger name="TellsCapture" priority="1960">
  <pattern>%w tells you, ~"</pattern>
  <value>:tells:#sayp %time( hh:mm)%char(32);#T+ TellsMulti-Line;#beep</value>
- <trigger>
  <pattern>~></pattern>
  <value>#T- TellsMulti-Line</value>
  </trigger>
  </trigger>
- <trigger name="TellsMulti-Line" priority="1980" enabled="false">
  <pattern>^(*)</pattern>
  <value>#Cap Tells;#gag</value>
  </trigger>
  </class>


As you can see, they are all based off the same code, but for some reason they arent capturing the text.

I tried to recreate the triggers using an old script i found:

Code:

#Show Setting City Capture Triggers
#TRIGGER "Citcapture" {^The Citizens of The Forest of Ysallyra:} {:City:#Clr;:City:#sayp %time(hh:mm)%Char(13);#t+ Citymulti-line} "City Capture"
#CONDITION {^There are therefore currently %n citizens in Akanbar.} {#cap City;#gag;#T- Citymulti-line}
#TRIGGER "Citymulti-line" {^(*)$} {#cap City;#gag} "City Capture" {disable}

#Show Setting Who Capture Triggers
#TRIGGER "WhoCapture" {^Denizens of Akanbar are as follows:} {:who:#Clr;:who:#sayp %time(hh:mm)%Char(13);#t+ WhoMulti-line} "Who Capture"
#CONDITION {~>} {#T- WhoMulti-line}
#TRIGGER "WhoMulti-line" {(*)$} {#Cap Who;#gag} "Who Capture" {disable}

#Show Setting BB and Sleeping Triggers to prevent querying Who and Cit whilst sleeping or in BB
#TRIGGER "BBENTERED" {^You have entered the Bulletin Board.} {#Var Sleeping 1} "Capture Polling"
#TRIGGER "ExitBB" {^You quit out of the bulletin board.} {#Var Sleeping 0} "Capture Polling"
#Trigger "Awake" {^You wake from your deep slumber.} {#Var Sleeping 0} "Capture Polling"
#Trigger "Sleeping" {^You stretch out on the floor, and fall asleep.} {#Var Sleeping 1} "Capture Polling"

#Show Setting Tells Capture Trigger
#Trigger "TellsCapture" {%w tells you, ~"} {:tells:#sayp %time( hh:mm)%char(32);#T+ TellsMulti-Line;#beep} "Tells Capture"
#COndition {~"$} {#Cap Tells;#Gag;#T- TellsMulti-Line}
#Trigger "TellsMulti-Line" {^(*)$} {#Cap Tells;#gag} "Tells Capture" {disable}

#Show Setting Repeating Alarm to poll Cit and Who every 60 seconds.
#Alarm "DenizensAlarm" {*60} {#If (@Sleeping = 0) {who;#Alarm +5 {cit}}} "Capture Polling"


But Im getting an 'unclosed braces' error on the parsing of this, on the CitCapture line

Can anyone help with this? Im running v2.18
Reply with quote
Fergal1982
Wanderer


Joined: 08 Aug 2005
Posts: 70

PostPosted: Sat Dec 22, 2007 8:45 pm   
 
Ok. I figured out that it was the semi-colons causing the problem. manual editing of the triggers solved the problem.

However, I could still use the help figuring out the problem with the script.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Dec 22, 2007 10:02 pm   
 
So is it fixed, or isn't it? What exactly is the trouble you're still having? Your previous post was difficult to understand - you used "problem" three times, it's quite hard to tell what you mean in each case.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Fergal1982
Wanderer


Joined: 08 Aug 2005
Posts: 70

PostPosted: Sun Dec 23, 2007 12:48 am   
 
Fair point. Im still rebuilding the machine, so trying to do about 10 things at once.

I managed to sort the issue with the triggers not firing correctly, by removing the semi-colons separating the commands. I have no idea why CMud couldnt deal with it, since the pkg file was taken directly from my previous install (although admittedly that was an older version of CMud). But its sorted.

Using the script to enter triggers is still not working, however, it still throws up the same error (unclosed braces). Whilst its not exactly vital, should I ever wipe out my triggers trying something out, it would be nice to have the script working correctly.

I've used it before (although I think that specific version was put together for my ZMud install, rather than for CMud), so Im not sure whats causing it to error this time.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Dec 23, 2007 2:38 am   
 
This seems to be a problem with the :windowname:command syntax. I'm not sure what it is about these commands that's doing it, but I can confirm that the text you have above is failing, and removing the :windowname:command syntax starts it working (though probably not how you'd like).
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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