|
Logic Beginner
Joined: 30 May 2002 Posts: 17 Location: Denmark
|
Posted: Wed Mar 24, 2004 5:40 pm
Trigger help |
Hi
When I type Where Worker the output is:
Code: |
Farm worker Path along the Lake |
How can I put the farm worker in a variable and the room name path along the lake in another veriable ? |
|
|
|
Ryntrax Wanderer
Joined: 15 Mar 2004 Posts: 55 Location: USA
|
Posted: Wed Mar 24, 2004 5:44 pm |
Use the #addkey.
You can make Farm worker the key and still add a value as Path along the Lake. keep in mind that you cannot have any duplicate keys. |
|
|
|
Logic Beginner
Joined: 30 May 2002 Posts: 17 Location: Denmark
|
Posted: Wed Mar 24, 2004 6:14 pm |
But I dont want to use the database, just a trigger with 2 variable that catch the name and the place, I dont know how to catch a line from a respons I tell the mud plus there is alot of spaces between the name and the place.
|
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Wed Mar 24, 2004 6:31 pm |
Try this. The trigger becomes active when you type the where command, and captures a line with at least 7 spaces between 2 sets of words.
#alias where {~where %-1;#T+ WhereCapture}
#class WhereCapture
#trigger {(*)%s %s(*)} {#var MobileNames {%additem(%1,@MobileNames)};#var MobileLocation {%additem(%2,@MobileLocation)};#T- WhereCapture}
#class 0 |
|
|
|
Logic Beginner
Joined: 30 May 2002 Posts: 17 Location: Denmark
|
Posted: Wed Mar 24, 2004 6:39 pm |
Thanks alot, it works fine fine :)
|
|
|
|
|
|