IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> self defense triggers
Dowd
post Dec 15 2005, 07:18 AM
Post #1


Newbie
*

Group: Members
Posts: 4
Joined: 12-December 05
Member No.: 85



Greetings all.
I've just switched from Rapscallion and I trying to extract how to transfer some of my self defense triggers into Savitar.
My old trigger would trigger on:
^%s starts casting a fireball at you!

my script would read something like:

kick %1

It would seem that I could do this in Savitar, but I'm unable to determine how.
The "^" would make it only trigger if the extracted string was the first word in the line so no one could set off this trigger simply by saying or telling me the phrase.

Would someone please give me a $1.25 and show me the way to the clue bus?


--------------------
Dowd
Go to the top of the page
 
+Quote Post
Dowd
post Feb 19 2006, 02:47 PM
Post #2


Newbie
*

Group: Members
Posts: 4
Joined: 12-December 05
Member No.: 85



No one?



tongue.gif


--------------------
Dowd
Go to the top of the page
 
+Quote Post
Dowd
post Mar 10 2006, 02:23 AM
Post #3


Newbie
*

Group: Members
Posts: 4
Joined: 12-December 05
Member No.: 85



I feel lonely.


--------------------
Dowd
Go to the top of the page
 
+Quote Post
jay
post Mar 11 2006, 02:08 PM
Post #4


Administrator
***

Group: Admin
Posts: 168
Joined: 2-May 03
From: New Hampshire
Member No.: 1



Dowd,

If you use Savitar's regular expression matching option, the caret (^) will in fact match for start of line. Did you select "regular expression" as your match type?

If regex isn't your cup of joe, then you can use "Line starts with" and take out that caret.

See the manual for further examples.

/Jay
Go to the top of the page
 
+Quote Post
Guest_Guest_*
post May 28 2006, 11:47 PM
Post #5





Guests






First of all, the default macros on Savitar start with %%, not %. If you haven't changed the default macro trigger from %% (and I've found no reason to), then this is your problem.

To transfer this trigger to Savitar, write a trigger like so:

Output, Regular expression of

(^)(.*) starts casting a fireball at you

and in the trigger pane, put

kick %%2

The reason I didn't finish off that regex above is because I'm not sure if ! is a special character for regex. I know that if you want to use a period (.) in a regex, you have to put a backslash (\) before it, i.e. if you want to attack a trigger to going to sleep, the regex would look like this:

(^)You go to sleep\.($)

Because in regexes the . denotes any character. Most characters in regexes equal themselves, so 'Jake' wouldn't translate to anything special, but . denotes any character.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 26th November 2024 - 08:50 AM