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
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Thu Sep 05, 2013 5:17 pm   

Help with a trigger
 
I've been working at this trigger for several days now, and from all that i can tell it's written correctly, can someone show me another way to write or the correct way to write it to make it work? Please and Thanks!



Grinay's health status: HP: [1270/1281] SP: [105/522] <--- capture from the mud

&guard's health status~: HP~: ~[&ghp~/&gmaxhp~] SP~: ~[&gsp~/&gmaxsp~] <---trigger

#if (@gsp < 1000) {radiance %lower(@guard)}
#if (@ghp < 500) {invigorate %lower(@guard)} <--- actions to to send to mud


i've tried to write it out with regular expression, but i dont know enough to make it work.
Reply with quote
Quit
Wanderer


Joined: 19 Jul 2008
Posts: 59

PostPosted: Thu Sep 05, 2013 9:03 pm   
 
No errors when I try it.
Whats not working or what errors do you get ?
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Fri Sep 06, 2013 8:01 pm   
 
It will capture the first variable in the pattern but nothing past it..
ive tried it a dozen ways, everything short of pure regex, which i dont know.
also its not just this trigger, its all of my other triggers with variables captured.
Reply with quote
Quintus
Newbie


Joined: 29 Aug 2013
Posts: 4

PostPosted: Tue Sep 10, 2013 10:26 pm   
 
In the trigger you've got it written with ampersands (&guard, &ghp etc.) but in the script you're using at symbol (@guard, @ghp etc.). Sure you have those setup correctly?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Sep 11, 2013 10:50 pm   
 
The apostrophe might be interfering with the &varname syntax. Try quoting it.
_________________
EDIT: I didn't like my old signature
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Wed Sep 11, 2013 10:56 pm   
 
Hmm i've tried so many variations of this trigger i honestly cannot remember them all, however the problem seems to NOT be with the syntax of the script, as i simply added a #wa 10 (10 nano seconds?) and it fired on the first capture! I honestly dont comprehend why cmud needs a #WA to recognize the pattern from the mud, i also made sure my mudside prompt was on a new line as to not interfere with the capture. Can anyone thing of a single reason why cmud needs #WA??? And thank you all for you help!!!
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