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
itsr0y
Beginner


Joined: 20 Jan 2002
Posts: 25

PostPosted: Sun Jan 20, 2002 6:30 pm   

Suggestion - SpeedRunning
 
I don't know if any other MUDs have this feature, but the one I play (Aardwolf) has a RUN command that moves you very fast with little lag. it is used in the format:
run 4n2eswu4n3d2w
Is there any way to implement this into zMUD so that instead of walking and going slowly, you can run? If so, this would be great.

Thanks.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jan 20, 2002 11:38 pm   
 
Standard speedwalking sends all commands to the MUD without waiting. You just need to prepend the directions with a ".", example:
.4n2eswu4n3d2w

If, however, what you want is to send the run command instead of doing normal speedwalking, then I will say that run is a three-letter word, plus a space that is needed, so the difference between that and standard speedwalking is three keystrokes. It is possible, nonetheless, to create an oninput trigger but you need to use another character besides the ".". Here's an example of the trigger:
#ONINPUT {`(%x)} {run %1}

Thus, entering into the command box this:
`4n2eswu4n3d2w

will result in:
run 4n2eswu4n3d2w

being sent to the MUD.

Kjata
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jan 21, 2002 3:09 am   
 
quote:

Standard speedwalking sends all commands to the MUD without waiting. You just need to prepend the directions with a ".", example:
.4n2eswu4n3d2w

If, however, what you want is to send the run command instead of doing normal speedwalking, then I will say that run is a three-letter word, plus a space that is needed, so the difference between that and standard speedwalking is three keystrokes. It is possible, nonetheless, to create an oninput trigger but you need to use another character besides the ".". Here's an example of the trigger:
#ONINPUT {`(%x)} {run %1}

Thus, entering into the command box this:
`4n2eswu4n3d2w

will result in:
run 4n2eswu4n3d2w

being sent to the MUD.

Kjata



You might want to use %a instead of %x, since %a ONLY captures letters and numbers (%x captures any non-whitespace character).

li'l shmoe of Dragon's Gate MUD
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jan 21, 2002 2:47 pm   
 
Yup, that's right, %a is better than %x. Thanks

Kjata
Reply with quote
itsr0y
Beginner


Joined: 20 Jan 2002
Posts: 25

PostPosted: Mon Jan 21, 2002 5:39 pm   
 
I'm sorry, I may not have been clear in my last post. I am talking about speedwalking when using the map. If I Right-Click on a room and click "SpeedWalk to this Location" I'd like to have it use RUN commands rather than simply going one room at a time. Is there any way to do this? If not, this is a suggestion for an option for a new feature (ability to change how speedwalks are performed.)

Thanks.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jan 21, 2002 6:16 pm   
 
If you do not use Room Scripts, you could set the Room Script for each room to:
run %right(%walk(roomNum), 1)

where roomNum is the number of each room. Of course, you are not going to set this by hand, so executing this alias should do it:
#ALIAS setRoomScripts {#LOOP 0,(%numrooms() - 1) {#NOOP %roomcom(%i, %concat("run %right(%walk(", %i, "), 1)"))};#SH Done.}

Now, instead of right-clicking and selecting Speedwalk to room, you right-click and select Execute Room Script.

Of course, you can still tell your suggestion to Zugg. A rewrite of the mapper is planned for very soon, so I guess he won't be making any changes until then. However, you can still drop by the Beta Forum and post your suggestion there so he consideres it for the new mapper.

Kjata
Reply with quote
itsr0y
Beginner


Joined: 20 Jan 2002
Posts: 25

PostPosted: Mon Jan 21, 2002 10:35 pm   
 
AH HA! I didn't realize there were functions to use the automapper (what an idiot I am.) Thank you so much! I can just use the following code:
#SH %replace(%walk(ROOMNUM),".","run ")

The only problem is I can't use it to go from one area to another. Is there any way to use the code above (or the equivalent) to travel from one zone to another?

Thanks
Reply with quote
itsr0y
Beginner


Joined: 20 Jan 2002
Posts: 25

PostPosted: Mon Jan 21, 2002 10:48 pm   
 
I just had one other thought... is there any way I can capture the .DIRECTIONS with a trigger before the automapper turns it into a speedwalk? What i was thinking is if i could have a trigger that replaces all periods at the beginning of a line to . with "run " then I could use my code instead of zMUD's. I don't think this is possible though. Any thoughts?

[EDIT]
Or, since the automapper has a built in feature to save a path from one room to another (right click on a room and hit save path) is there any way to use this information? Once you save it, you can simply do a replace and replace the .'s with "run "'s and you'd be set. I don't think you can, but its worth a shot.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Jan 22, 2002 3:08 am   
 
I don't think that zMUD passes the output it sends to the MUD when you select to speedwalk to a room within the mapper through the parser for triggers, so I'm guessing that a normal trigger won't work to replace the . with run.

However, if you want the functionality of speedwalking to a room by right-clicking on it and selecting something using the run command, then try using the script I posted above.

Kjata
Reply with quote
scobie
Beginner


Joined: 01 Nov 2002
Posts: 24
Location: Sweden

PostPosted: Sun Oct 12, 2003 10:53 am   
 
I love this funtion...
Made an alias like this:
Code:
#alias run2 {
  ~run %right( %walk( %1), 1)
  #FORALL %pathexpand( %right( %walk( %1), 1)) {#MOVE %i}
}


But there's a problem, if there's a door in the way it breaks...
instead of outputting (for example, the path is ".ne4sws;open south;.sws2w3sese"), but the alias only expands the first part...

run ne4sws;open south;.sws2w3sese
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Wed Aug 11, 2004 11:35 pm   Talk about beating an old horse
 
I know this is an OOOOOOOOLD question, but here is the work around for it as a room script:

Code:
#ALIAS setRoomScripts2 {#LOOP %numrooms {#NOOP %roomcom(%i, %replace( %walk( %i), ., "run "))};#SH Done.}

SHort coming of this is that it writes the sw to the room script and will only then work from the room that you executed it from. So best to be in the 1st room of the area after your speedwalk, and have it marked as current with this at the end of your Speedwalks:
Code:
#TE ROOM_VNUM_YOU_ARE_IN "AREA NAME ON MAP


And if you KNOW the rooms vnum you can use these 2
Code:
#ALIAS sw {#var path %walk( %1);#var path %replace( @path, ., "run ");#exec @path;#te %1}

#ALIAS swshow {#var path %walk( %1);#var path %replace( @path, ., "run ");#show @path}


sw will take you to the room in the area while swshow will show you the output.
Of course this is all dependent on you having the map open and have a current position set, but will set the NEW room as your current position.

If someone could tell me how to put in the SW code into the room desc it would be great.
Tried it, and it keeps crashing Zmud.
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