|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Tue Dec 27, 2005 2:53 pm
multiline trigger and setting a variable with multiple words |
Ok, in aliases, I have used single words in the %1 variable such as typing k monster and using an alias to target that monster, but how do I do that with multiple words, becuase when I use the %1, it has only set that variable to the first word.. for instance if i have an alias set up for "say", i might "say high how are you doing" so my script command would be say %1 but it would only then "say high"... ??? any help would be good...
Also, how does one creat a trigger that triggers on multiple lines of text that are always above/below each other? |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Tue Dec 27, 2005 4:25 pm |
"%-1" for the alias part
|
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Tue Dec 27, 2005 5:41 pm |
Thanks for that part, it works great!!!
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Dec 28, 2005 1:22 am |
Quote: |
Also, how does one creat a trigger that triggers on multiple lines of text that are always above/below each other?
|
If the lines always come in a specific order, you do this with multi-state triggers. The first (zero) state of the trigger will be a normal #TRIGGER/#MXPTRIG/etc trigger command. All of the following states use the #CONDITION command:
#trigger "name of trigger" {pattern goes here} {code goes here} blah-blah-yakkety-shmakkety
#condition {pattern goes here} {code goes here} blah-blah-yakkety-shmakkety |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Wed Dec 28, 2005 5:04 am |
I've tried a couple ways to use #condition but havnt been able to make it work.... so ill just throw it out there.
This is the text i receive from my mud
A young mage has been slain! Death stalks this place!
You receive 146 experience points.
I would like to make a trigger that fires on the "has been slain" part,and assign "A young mage" to one variable and "146" to another.
The trigger i currently have is
#TRIGGER {(*) has been slain!} {#file 1 kills.txt;#wri 1 %time( mm/dd/yy),%time( hh:nn:ss),%1,exps,%roomvnum,%roomname}
which will log the time and name of the kill into my text file however it doesnt pick up the "146" xps part which I would also like to write. please provide as much guidance as possible and thanks for looking. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Wed Dec 28, 2005 6:26 am |
Quote: |
please provide as much guidance as possible and thanks for looking |
#HELP
Its all there....
#TRIGGER {(*) has been slain} {}
#COND {You receive (%d) experience points.} {
#FILE 1 kills.txt
#WRITE 1 %time( mm/dd/yy),%time( hh:nn:ss),%t1,%1,%roomvnum,%roomname
} {within|param=1}
//%t1 refers to the first captured () in the whole conditional set.
//%1 referes to the the first captured () in the current trigger of the conditional set |
|
|
|
|
|