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


Joined: 13 Aug 2009
Posts: 7

PostPosted: Thu Aug 13, 2009 6:50 pm   

capturing room exits
 
I am having problems with my subs and echo's as the room exits change from boot to boot....
example.
A large room(s, n, w and e)
might show up as
A large room(n, s, e and w)
in the next boot, I am trying to figure out a trigger to capture the room exits inside ( ) so I do not have to make new sub/echo triggers everytime the mud reboots. Can anyone be of assistance?
Reply with quote
vitriol29
Newbie


Joined: 13 Aug 2009
Posts: 7

PostPosted: Thu Aug 13, 2009 6:56 pm   
 
this is one of my triggers
{A bridge over the Morgulduin(se, s and n) [w, e, sw and nw]}
#sub {%ansi(yellow)Morgulduin %ansi(white,bold)(%ansi(bold,blue)s,n and se%ansi(white,bold)) %ansi(purple)Morg1 %ansi(white,bold)- %ansi(purple)Morg2%ansi(white,bold)%ansi(white,bold)(%ansi(high,red)Demonic%ansi(white,bold)) %ansi(white,bold)- %ansi(purple)Morg3%ansi(white,bold)(%ansi(high,red)TrueDemonic%ansi(white,bold))}
Reply with quote
vitriol29
Newbie


Joined: 13 Aug 2009
Posts: 7

PostPosted: Thu Aug 13, 2009 7:10 pm   
 
oh this is zmud btw.. for some reason my cmud laggs my system down :\ *boggle*
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Aug 13, 2009 8:38 pm   
 
#trigger {^([%w%s])~(([ansewud,%s])~)$} {Roomname = "%1";Roomexits = "%2";#tag name "%1";#tag exit @exits}

What is the #sub for? If all that text is for describing room properties, you might want to explore the use of the mapper and the various room fields to store them. The mapper window will need to be open and in either follow or explore mode (I recommend follow, as the worst that will happen in follow is the wrong room script will execute), but if you don't want it blocking your view you can either roll it up or simply unclick the safetypin icon that represents stayontop mode.
_________________
EDIT: I didn't like my old signature
Reply with quote
vitriol29
Newbie


Joined: 13 Aug 2009
Posts: 7

PostPosted: Thu Aug 13, 2009 10:42 pm   
 
I use a mapper, the subs are for huntbreaks and lockups. I am looking to make a trigger that captures the room short and the exits.. The room name never changes while the room exits change order randomly. So I still need it to capture A Large room for the room short and then the exits will vary from boot to boot. Currently I have to enter in new triggers with the correct room exits each time the mud boots.
Reply with quote
vitriol29
Newbie


Joined: 13 Aug 2009
Posts: 7

PostPosted: Thu Aug 13, 2009 10:46 pm   
 
I am rather noobish at coding in zmud. do I have to make variables for that trigger to work. I have no idea what that trigger does . sorry
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Aug 13, 2009 11:59 pm   
 
The trigger pattern matches every room name line that is of the style you posted (not just "A large room"), and makes the order of the exits not matter. So, even though you might move to different rooms or the game might shuffle up the exits this one trigger is still able to capture it all with no issues.

The trigger code first assigns the room name and exits to the appropriate variables (you may have to move them to the proper folder, but ZMud should automatically create them for you) and then uses the #tag commands on each part to tell the mapper what to use for room name and exits. If you already have #tag triggers or there are no issues with the autoconfiguration, just remove them. It looks like you're maybe attempting to set up a sort of room scanner as a heads-up about which room is in which direction, so you will need to re-add that to the trigger.

If you wish to use the tagging info, be sure to make a trigger to match your prompt and use the #TAG prompt command and run the reconfiguration wizard to apply the #TAG changes.
_________________
EDIT: I didn't like my old signature
Reply with quote
vitriol29
Newbie


Joined: 13 Aug 2009
Posts: 7

PostPosted: Fri Aug 14, 2009 3:37 am   
 
the subs and echo's are for telling me which huntbreaks and lockups are close to that particular room, each place that I am trying to trigger are Signposts or town entrances which have huntbreaks around them and lockups for would be assassins. So the subs and echos are merely a heads up as to what alias names I need to run in order to either break or lock an assassin. I can't seem to get your trigger to work with my own. also my editing screen seems to have broken into two seperate parts and I can not get it back as one window very annoying
Reply with quote
vitriol29
Newbie


Joined: 13 Aug 2009
Posts: 7

PostPosted: Fri Aug 14, 2009 3:40 am   
 
sorry man you lost me completely with the # TAG command, I'm completely retarded...
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Aug 14, 2009 10:42 pm   
 
Quote:

~(([ansewud,%s])~)


That's the relevant part you originally asked for. Change all your triggers by removing the part of your pattern dealing with the exits and replacing it with that. If you have multiple triggers for the same room, as long as they are not doing anything different you can safely delete them. The above pattern is called a range pattern, which means it only looks for the specific characters between the square brackets but doesn't care about the specific order that they come in. This particular range is limited to the exit letters, the letter a, the comma, and the space--"n, s, w and ne" and "ne, w, s and n" are both matched by this one pattern.
_________________
EDIT: I didn't like my old signature
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