|
Stowslee Wanderer
Joined: 20 Apr 2008 Posts: 69 Location: Watervliet, NY
|
Posted: Sat Jul 18, 2009 1:59 am
Trigger issues |
For certain aspects of the system I have I use triggers to set the value of variables, pretty basic. But when I started getting a little more complicated I have run into a strange error.
I use a variable with the following stored in it:
Hmmmm. Why is everything so difficult to figure out?|The mind numbing roars of (%w) dull your thoughts.|* casts a net of stupidity over your mind.|Your mind feels somewhat slower and more plodding.|Your senses dull as the Mhun Captain of the Guard connects a painful uppercut to your jaw.
Then I use the following trigger:
^{@AfflictStupidity}$
All the aspects without wildcards work fine, but anything WITH a wildcard fails to match. Any ideas as to why? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Jul 18, 2009 3:33 am |
Check your preferences, make sure the "Allow Wildcards within {}" is turned on.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Stowslee Wanderer
Joined: 20 Apr 2008 Posts: 69 Location: Watervliet, NY
|
Posted: Sat Jul 18, 2009 3:35 am |
Awesome, thank you very much!
|
|
|
|
Stowslee Wanderer
Joined: 20 Apr 2008 Posts: 69 Location: Watervliet, NY
|
Posted: Wed Jul 22, 2009 12:28 am |
I am working on another issue with triggers along the same lines. All my trigger lines are stored as string lists, as before. But the issue I am having now is with one in particular.
The code for it looks like this:
Code: |
You feel your limbs stiffen and lock in response to an unseen power.|Frustratingly, your body won't respond to your call to action.|You are paralysed and cannot do that.|You are paralysed and unable to do that.|You are paralysed and are unable to drop anything.|Your body suddenly feels stiff.|Your muscles stiffen and lock as a ghast brushes you with a finger.|Your state of paralysis prevents you from doing that.|You are paralysed and unable to move.|The gaze of a vampiric blood sentry locks with yours momentarily before being broken, but you feel your limbs rapidly stiffen afterward.|The gaze of a vampiric sentry locks with yours momentarily before being broken, but you feel your limbs rapidly stiffen afterward.|The gaze of a vampiric warrior locks with yours momentarily before being broken, but you feel your limbs rapidly stiffen afterward.|({A|*} {p|*}{r|*}{i|*}{c|*}{k|*}{l|*}{y|*} {s|*}{t|*}{i|*}{n|*}{g|*}{i|*}{n|*}{g|*} {o|*}{v|*}{e|*}{r|*}{w|*}{h|*}{e|*}{l|*}{m|*}{s|*} {y|*}{o|*}{u|*}{r|*} {b|*}{o|*}{d|*}{y|*}{,|*} {f|*}{a|*}{d|*}{i|*}{n|*}{g|*} {a|*}{w|*}{a|*}{y|*} {i|*}{n|*}{t|*}{o|*} {n|*}{u|*}{m|*}{b|*}{n|*}{e|*}{s|*}{s|*}{.|*}) |
Any idea why none of the strings above will fire, I assume it has something to do with the last string. I tried to remove it and make it its own trigger, but when I do ZMud crashes. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Wed Jul 22, 2009 12:40 am |
zMUD doesnt support nested string lists I don't believe.
You will need a separate trigger to catch the bit with the wildcards, and quote them out as well. (~*) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jul 22, 2009 6:02 am |
Remove the prickly one from the rest of the list. Then use this trigger:
#REGEX {^[ ,.a-ik-pr-wy*]{67}$} {#IF (%numwords(%line,"*")<14) {#IF (%match("A prickly stinging overwhelms your body, fading away into numbness.",%replace(%line,"*","?"))) {paralyzed stuff}}}
What that is doing is picking up all the possible characters and making sure it is exactly the right length. It then counts the number of asterisks in the matched line to make sure it is a reasonable number. Finally it checks to see if the matched line is able to match with the formal text. You will have to fill in the 'paralyzed stuff' that you want to do. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|