Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Logic
Beginner


Joined: 30 May 2002
Posts: 17
Location: Denmark

PostPosted: 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 ?
Reply with quote
Ryntrax
Wanderer


Joined: 15 Mar 2004
Posts: 55
Location: USA

PostPosted: 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.
Reply with quote
Logic
Beginner


Joined: 30 May 2002
Posts: 17
Location: Denmark

PostPosted: 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.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: 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
Reply with quote
Logic
Beginner


Joined: 30 May 2002
Posts: 17
Location: Denmark

PostPosted: Wed Mar 24, 2004 6:39 pm   
 
Thanks alot, it works fine fine :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net