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
Thinjon100
Apprentice


Joined: 12 Jul 2004
Posts: 190
Location: Canada

PostPosted: Mon Jul 12, 2004 2:53 am   

Overriding speedwalk function
 
On the MUD I play on, there exists a built-in "run" command which uses the syntax

run 3s4wnu7e

to run speedwalks within tha game. This has the advantage of the MUD automatically NOT listing the descriptions of the rooms you pass through, cuts down on time taken to get to my target location, reduces spam, and generally keeps the bandwidth down for the MUD.
What I'm trying to figure out is a way to override (or create a new function for) the built-in ZMud speedwalking to take ZMud line-by-line direction output and generate a valid "run" command.

So far the best beginning I have seen to accomplish this ( though I have yet to figure out how to complete the function) is to use something like

@tempsw = %exec(#WALK roomnum zonename)

and then create some heavy string-parsing function to reduce multiple-adjacent directions into numerically-prefixed strings.

Even if I can build such a function, how can I then interface that with the Automapper so that I can graphically choose the room on the map and have the mapper enter in the correct run command?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jul 12, 2004 6:13 pm   
 
Why not use the built-in functions? It's not difficult to replace a period.
#AL rush {{%replace( %walk( %1, %2), ., "run "))}
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