|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: 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. |
|
|
|
Quit Wanderer
Joined: 19 Jul 2008 Posts: 59
|
Posted: Thu Sep 05, 2013 9:03 pm |
No errors when I try it.
Whats not working or what errors do you get ? |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: 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. |
|
|
|
Quintus Newbie
Joined: 29 Aug 2013 Posts: 4
|
Posted: 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?
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: 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!!!
|
|
|
|
|
|