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


Joined: 09 Nov 2007
Posts: 8

PostPosted: Fri Nov 09, 2007 5:45 am   

Logging Room Name With Zone Name
 
I've been beating my head against the wall the entire week. I hope someone can help me.

From the following results from a where cmd.

{ 1 400 } [Builder], [Zone Name]
Players near you:
MyName [Room Name]


How can I make a trigger to take the Zone name and Room name and put it into a database so I can check it later to see what room is in what zone?

Thanks!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Nov 09, 2007 8:26 am   
 
Without more information on what that output means, what values are unique, or combination of values will be unique. I can't actually suggest a specific method. Also out of 6 different ways I can think of storing the information some methods will be useless for certain purposes. If you post again with everything you can imagine doing with the data, and some more details on what the number mean then I am sure one of us can provide a tailored solution.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Nov 09, 2007 12:15 pm   
 
Much, much easier than trying to do all this manually would be to just use zMUD's mapper. Then you can use the mapper's Find function to see what zones different rooms are in.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
natural24
Newbie


Joined: 09 Nov 2007
Posts: 8

PostPosted: Fri Nov 09, 2007 4:21 pm   
 
Vijilante wrote:
Without more information on what that output means, what values are unique, or combination of values will be unique. I can't actually suggest a specific method. Also out of 6 different ways I can think of storing the information some methods will be useless for certain purposes. If you post again with everything you can imagine doing with the data, and some more details on what the number mean then I am sure one of us can provide a tailored solution.



Really want I hope to do is when I drag my bot thru areas on my mud as I xp the bot will log the room as being in the zone. What I hope to do with this data is write a alias to find out what room is in what area if I want to walk back to that certain room.

The reason I used where is it would list the room name + the zone name all in one command so I had hope to write some trigger off that. I just figured I could have the bot use where every time it enters the room.
Reply with quote
natural24
Newbie


Joined: 09 Nov 2007
Posts: 8

PostPosted: Fri Nov 09, 2007 4:23 pm   
 
My only problem with using the mapper is it does not tell when I enter a new zone. I would have to make a new zone. I have hopes to make this a completely automatically (ie: i'm lazy) done solution with little intervention from me.
Reply with quote
Iceclaw
Apprentice


Joined: 11 Sep 2005
Posts: 124

PostPosted: Fri Nov 09, 2007 4:39 pm   
 
Zmapper's scripting options probably allow for the automated creation and moving of a new zone, but I don't know the specifics, perhaps someone who has this product can chime in.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Nov 09, 2007 5:25 pm   
 
And really, it's a small price to pay for the convenience - a script to do what you're after is going to very complicated indeed if you don't use the mapper. It'd be much easier to just set up the zones manually (you could make a trigger to send the command to the MUD that tells you the zone every time you change zone, for example). And oftentimes you want to group zones together (I have one "Highways" zone even though the roads between different places are separate zones with separate names).
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
natural24
Newbie


Joined: 09 Nov 2007
Posts: 8

PostPosted: Fri Nov 09, 2007 5:34 pm   
 
so I'm best to use zmapper?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Nov 09, 2007 5:49 pm   
 
Using zMapper will make the automation you wanted easier, but if you can tolerate pressing Ctrl-Z occasionally, there's no reason you can't just use the built-in one.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
natural24
Newbie


Joined: 09 Nov 2007
Posts: 8

PostPosted: Fri Nov 09, 2007 5:51 pm   
 
Ok how would i do this with zmapper?
Reply with quote
natural24
Newbie


Joined: 09 Nov 2007
Posts: 8

PostPosted: Fri Nov 09, 2007 8:39 pm   
 
Ok someone helped me on the mud but I got a question.

My trigs are:

Pattern -
Natural24 %s (*)
Value -
say %1

Pattern -
} (%w), (%w)
Value -
say %2

Note: I just use say to test to see if it works which it shoots back the results.

I got the database set up. 2 fields Room and Area

First trig is for Room. Second is for area. How would I go about putting it in a database? I tried #new but nothing I do seem to work.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri Nov 09, 2007 9:46 pm   
 
Frankly, I reckon using zMapper is going to be more difficult than building your own scripts and (database) record variable, and it doesn't give you the exact same result - you may not want to have your map separated into zones the same way the mud has them split. I know I have several mud zones in most of my map zones - otherwise I'd have to keep changing zone on the mapper to find anything.

You shouldn't actually need a full database if you only have two columns of data: RoomNumber and ZoneNumberOrName, so long as the RoomNumber is globally unique. You can use a record variable.
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