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
neferpea
Newbie


Joined: 05 Aug 2005
Posts: 6

PostPosted: Wed Sep 13, 2006 4:42 pm   

following and the map?
 
On my mud when I'm following someone it will say "You follow suchandsuch west." Now is there a way I can set it up so that the map will follow along too? Thanks for the help!!!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Sep 13, 2006 10:01 pm   
 
Use a #trigger matching the above line, and have it #MOVE you in the appropriate direction.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Sep 14, 2006 1:39 pm   
 
#trigger {You follow %w (%w).} {#move %1}
_________________
http://www.Aardwolf.com
Reply with quote
neferpea
Newbie


Joined: 05 Aug 2005
Posts: 6

PostPosted: Thu Sep 14, 2006 7:54 pm   
 
Beautiful!! Thank you so very very much!!! :)
Reply with quote
qwst_dxhans5
Newbie


Joined: 16 Sep 2006
Posts: 1

PostPosted: Sat Sep 16, 2006 1:58 am   
 
Take this one step further...I have an output on my MUD as follows:

JimBob leaves west.
You follow JimBob.

I have tried to set the trigger to go off on line 1, however, it will trigger anyone that leaves the room whether I'm following them or not. I have set the trigger to go off on line 2, however, it doesn't know what directly to go on.

I'm thinking that this would work (this trigger will go off when I originally begin to follow someone), however I"m at work and not able to try it:

#trigger {You begin to follow (*).} {#va leader %1}
#trigger {(*) leaves (*).} {#if %1=@leader} {#move %2}

What's the best way of setting this up?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Sep 16, 2006 2:48 am   
 
Multi-state trigger.

#trigger {(%w) leaves ({north|west|south|east}).} {}
#condition {You follow %w.} {#if ("%t1" = @leader) {#move %t2} {#noop not the leader}} {withinlines|param=1}

%t1...%t99 = all the captured pattern pieces from all the states of the trigger. If the %w in the #CONDITION were surrounded in parentheses, you could refer to it as %1 or %t3, for example.
_________________
EDIT: I didn't like my old signature
Reply with quote
neferpea
Newbie


Joined: 05 Aug 2005
Posts: 6

PostPosted: Fri Sep 22, 2006 7:26 pm   
 
Quote:
#trigger {You follow %w (%w).} {#move %1}

This worked wonderful until I was following something that have more than one word to its name, such as 'You follow the ugly man east.' Any ideas on how to fix this? Thank you :)
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Fri Sep 22, 2006 8:14 pm   
 
hrmm

#var followdirections {north|south|east|west}
#trigger {You follow %* (%w).} {#if (%ismember(%1,@followdirections))} {#move %1}

try that?
if you got diagonals like NE/northeast or something add that to the followdirections var.
of course this will break for special exits like out, enter, etc...
_________________
http://www.Aardwolf.com
Reply with quote
neferpea
Newbie


Joined: 05 Aug 2005
Posts: 6

PostPosted: Sun Sep 24, 2006 6:34 pm   
 
Quote:

hrmm

#var followdirections {north|south|east|west}
#trigger {You follow %* (%w).} {#if (%ismember(%1,@followdirections))} {#move %1}

try that?
if you got diagonals like NE/northeast or something add that to the followdirections var.
of course this will break for special exits like out, enter, etc...


Got it! Thanks again!! :)
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