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


Joined: 01 Apr 2005
Posts: 4

PostPosted: Fri Apr 01, 2005 2:36 pm   

Need help putting together a script
 
This one is for the mapper that comes with zMUD. Not the zMapper.
The game Im playing has elevators, and I cant figure out how to make the mapper reconize that my character has moved to another floor of the building and not "just the same room."
the way the elevator works is that you input "push 1" (while in the elevator) and it will take you to the 1st floor.
anyone who's better than me at this, feal free to help me out Rolling Eyes
Reply with quote
dkotas
Beginner


Joined: 03 Sep 2004
Posts: 23

PostPosted: Fri Apr 01, 2005 4:13 pm   
 
You could use a room scripts oninput and the teleport command to work around this problem.

#ONINPUT {Push 1} {#teleport roomnum}

where roomnumber is the room number for the first floor
quick and simple... wont work great with double clicking on the map however.

You could also use an alias in the "other" direction command which would enable you to teleport that way... If you have alot of elevators and the like you quickly end up with a slew of aliases dedicated to working around the problem.

#alias {125push1} {#teleport roomnum}

I added the 125 at the begining as an example to show how you would isolate the push1 alias for each elevator. You could room script alias ontop of that so you wouldn't need to remember the isolation portion of the alias such as...

#alias {push1} {125push1}

Very quickly you end up with a lot aliases assuming you have a few elevators in your game.

You could get more creative with #if's in your alias and compare your roomnumber and fire diffrent #teleports based upon your current room as well.

Personally I spent 20 on ZMapper which allowed me to create custom scripts for exits and add more exit types. This fixed the HUGE number of weird exits my favorite mud uses.

In ZMapper you could create an unlimited number of exit types so could make a special exit type per room should you choose, similar to making a huge number of aliases but the mapper will behave much nicer this way. That is you can type "push 1" and it will link to the first floor, not a teleport.

Hopefully I have given you some ideas as to how you might attack your problem based on how many elevators your game has, you scripting confidence level, or you pocketbook.

Personally, after spending the 20 on the mapper I have found it to be worth the couple bucks for the multiple exits types alone.
Reply with quote
chaotic_deckard
Newbie


Joined: 01 Apr 2005
Posts: 4

PostPosted: Fri Apr 01, 2005 4:24 pm   
 
Thank you much! Ill look into it Razz
Reply with quote
chaotic_deckard
Newbie


Joined: 01 Apr 2005
Posts: 4

PostPosted: Fri Apr 01, 2005 5:20 pm   
 
I tried that code snippet you gave, it doesnt seemt to work.

it looks like this: #ONINPUT {Push 1} {#teleport 68}
That's in the room script for the 1st floor elevator room.
When I type "push 1" I get the response from the MUD wondering what im trying to do. Im not too hot with scripts.
I tried the zMapper again and it seems a little complex for my simple mind.
FYI, the MUD is called "Awake 2062" It's a Shadowrun game.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Apr 01, 2005 6:59 pm   
 
When mapping just go to the room where you have to push the button and do this

>push 1>u

And it should make a new room up that to get to you have to "push 1".
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
chaotic_deckard
Newbie


Joined: 01 Apr 2005
Posts: 4

PostPosted: Fri Apr 01, 2005 7:44 pm   
 
Crying or Very sad Crying or Very sad I cant get this.
I guess I will just have to manualy update where i am everytime I use an elevator.
Reply with quote
harowen
Newbie


Joined: 04 Apr 2005
Posts: 3

PostPosted: Mon Apr 04, 2005 8:24 am   
 
What I do for this is change the exit direction to "other" (instead of nesw etc) and change the "other com" to be the command for the movement.

Another option is to put a trigger in the room script on whatever the message is that happens when you do the non-standard movement, but this only works if the message is unique. Room scripted triggers or aliases only function in that particular room.

The MUD I play has a large amount of special keywords, I put the following in the room script of all those rooms:

#show I put the keywords here, to jog my memory
#al doa {the exact command}

This way I just walk into the room, the #show alerts me to the special command, and typing doa (short for do action) does the command. This also makes it so that in rooms that have the exit direction as a specific command I am assured of typing the full exit information and having the map update.
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