|
Rastamutti Beginner
Joined: 27 Jun 2012 Posts: 17
|
Posted: Fri Aug 24, 2012 1:26 pm
Wildcard trigger patterns. |
Alright, I've got one prompt that can be four multiple ways. Below are examples
"grid57467" the empathic grid 100% / no damage [Rastamutti]
"grid57467" the empathic grid 100% / no damage
"grid57467" the empathic grid 100% / no damage [Rastamutti] PARASITE!
"grid57467" the empathic grid 100% / no damage PARASITE!
So far, I've got this for parsing the data:
Code: |
~"(%w)(%d)~"%s(*)%s(%d)~%%s/%s(*)%s{~[(%w)~]|}{(%w)~!|} |
for my checks, I'd like to make it go,
Code: |
#if (!%null( %6)) {#say Parasite on %6 %1%2} {#say Parasite on empty %1%2} |
Problem being, I can't use %null. what should I be trying to use? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Aug 24, 2012 6:56 pm |
You can just use:
A variable or other parameter will evaluate as FALSE if it is zero or null. |
|
|
|
meddlesome Wanderer
Joined: 24 Aug 2012 Posts: 70
|
Posted: Sun Aug 26, 2012 4:32 am |
~"(%w)(%d)~"%s(*)%s(%d)~%%s/%s(*)%s{~[(%w)~]|}{(%w)~!|}
That forward slash needs to be ~/ and I assume you have it set to trigger on prompt. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sun Aug 26, 2012 3:42 pm |
You don't need to quote slashes, they're not special characters. It won't hurt, but it doesn't matter if you leave it out (same with the exclamation point at the end).
|
|
|
|
|
|