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


Joined: 05 Sep 2004
Posts: 8

PostPosted: Sun Sep 05, 2004 4:00 pm   

Automapper help
 
Is it possible to get the MUD to automatically grab certain info off the screen and throw it into the properties of a room? Like if I walk into a room that is a store or that has a trainer, can it automatically pull the list of items to be bought, or skills to be trained off the screen and put them into the the properties of the room? And on top of that, change the room color depending on what type of room it is? like a store would be blue, and a trainer would be yellow? Not sure if it has that capability.
Reply with quote
Seldon
Newbie


Joined: 05 Sep 2004
Posts: 3

PostPosted: Sun Sep 05, 2004 9:38 pm   From MUD to map
 
Hi.

The short and sweet answer is YES, IT IS. After some quick studing of the help files, I devised my own trigger to add color and movement cost information to the map I was making. Here is the trigger I used:

#TRIGGER {Your current terrain is: Forest.} {#VAR stuff %roomcol( %roomnum( ), $008200);#VAR stuff %roomcost( %roomnum( ), %int( 2));#UNVAR stuff}

This trigger works when it sees the line of text 'Your current terrain is: Forest.'

It then creates a variable called 'stuff' and using the %roomcol function to color the current room. The $008200 is a hexidecimal color value (looks like a dark green)

After that, it uses the %roomcost function to set the number of movement points that it costs to move through forest terrain (2 movement points in this case)

Finally, I get rid of my variable 'stuff' and its done!

Hope this helps

Edit: Oh, one more thing: Make sure you are in 'Edit' mode of your map.. I don't think this works otherwise. Also, I use v.7.05 of zMud; I don't know how well this works on previous versions.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Sep 06, 2004 5:30 am   
 
Seldon is quite right, everything you want to do is possible; but without much more information the only thing I can add is that the %roomnote field is probably the best place to put the lists for shops and trainers.

Additionally a better method for changing information in the mapper is to use #NOOP or #CALL. Also the use of '%roomnum()' is unnecessary as blank in the vNum arguement will be interpretted as current room giving the same result. A quick rewrite of Seldon's trigger for example:
#TRIGGER {Your current terrain is: Forest.} {#NOOP %roomcol(, $008200) %roomcost(, 2)}

For further reading you might want to search the forums for onroomcreate. I always recommend using this alias for the types of additions you want to make to your map. The reason being that the information you are adding is often captured before the room has been created. I seem to recall helping someone through setting up such additions before.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Seldon
Newbie


Joined: 05 Sep 2004
Posts: 3

PostPosted: Mon Sep 06, 2004 9:45 am   Additional
 
Also noting your other questions.. Use the Walkscript tab (Edit > Properties > Text > Walkscript) to carry out commands particular to a room.

For your shop or trainer, write whatever command brings up the list of items you want to see in the textbox, and it will do that everytime you enter the room.

You can color individual rooms to denote what kind they are as well (Edit > Properties > Appearance > Roomcolor) and I used to do that with my maps too, but you might want to consider setting the Short Name for the room (Edit > Properties > Other > Short Name for room) to the type of room it is and then setting the room label position to make the name visible on the map.

Its personal preferance, but when I do it this way, I can stuff more information into my map (say, labeling all the shops as well as showing what the terrain type for all the rooms are). An added benefit is that I can use the short names as reference points to walk to. I use the following alias for this:

Code:
#ALIAS go {#WAL %1}


Supposing I had a room with a Short Name of 'inn' and I was wandering around in the city but suddenly I had to log: all I would have to do would be to type 'go inn'.

Of course, with this alias, you have to be a bit careful.. on large map projects where you have labeled rooms in different zones with the same name, it is a good idea to include the zone name after the short name in the alias.
Reply with quote
alaric_tynan
Newbie


Joined: 05 Sep 2004
Posts: 8

PostPosted: Mon Sep 06, 2004 1:36 pm   
 
Thank you all for your help, I really appreciate it. I will see if I can come up with what I wanted now. If not, I'll show you what I come up with and see if we can work it out. Thanks again.

Something else, what command will get the Mapper to copy the list of items from my window into the Notes section of the properties? Example:

Code:
Item/Price
An engraved silver wristband (brand new), a medium silver treasure, for 9 gold.
An engraved silver neck chain (brand new), a medium silver treasrure, for 9 gold.
etc....


I want it to grab that, and throw it into the notes. What will make it do that? just %roomnote? or what?
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