Page 1 of 1
powwow subs
Posted: Mon Jan 19, 2009 6:53 pm
by wiseman
I've been setting up some powwow subs lately for arrives/leaves/etc and I can't seem to figure out how to get them to actually sub and not just display on a new line below the game message.
For example, this is how my subs current work:
Code: Select all
A scholar has arrived from the west.
ARRIVES FROM THE > W E S T <
I'm trying to figure out how I can get them to just show:
Code: Select all
A scholar ARRIVES FROM THE > W E S T <
Any powwow experts out there know how to do this. or if it's even possible?
Re: powwow subs
Posted: Mon Jan 19, 2009 7:37 pm
by Jahara
This isn't exactly what you want, since I use regular expression to match for any of the directions and then leave the text as it is.
Code: Select all
#action %+arrived ^(.+) has arrived from (above|below|the west|the east|the north|the south)(.+)={#print (\$2 + " has ARRIVED FROM >> " + \$3 + \$4 + " <<")}
#action %+s_arrived ^(.+) has suddenly arrived.={#print (\$2 + " has SUDDENLY ARRIVED.")}
In order for it to do what you want you would need to modify it similar to this:
Code: Select all
#action %+arrived ^(.+) has arrived from the west(.+)={#print (\$2 + " has ARRIVED FROM THE >> W E S T << " + \$3)}
Re: powwow subs
Posted: Mon Jan 19, 2009 7:54 pm
by Elestir
You don't need to use regexp actions for that btw.
But as Jahara showed, you need to print an expression, such as: (\$2 + " some text " + \$3)
The backslashes in front of $2 and $3 prevent immediate (premature) substitution of the variables with their respective contents. I prefer to use $(2) and $(3) notation for the same purpose (since Cosmos, the author of powwow, told me about the possibility). Backslashes get messy when you have nested definitions.
Re: powwow subs
Posted: Mon Jan 19, 2009 9:00 pm
by wiseman
Jahara wrote:This isn't exactly what you want, since I use regular expression to match for any of the directions and then leave the text as it is.
Code: Select all
#action %+arrived ^(.+) has arrived from (above|below|the west|the east|the north|the south)(.+)={#print (\$2 + " has ARRIVED FROM >> " + \$3 + \$4 + " <<")}
#action %+s_arrived ^(.+) has suddenly arrived.={#print (\$2 + " has SUDDENLY ARRIVED.")}
In order for it to do what you want you would need to modify it similar to this:
Code: Select all
#action %+arrived ^(.+) has arrived from the west(.+)={#print (\$2 + " has ARRIVED FROM THE >> W E S T << " + \$3)}
Thanks! That will get me started quite nicely.