keypad goes through a script instead of just sending "north"

Posted by Faolong on Sat 26 Oct 2002 11:12 AM — 4 posts, 20,460 views.

USA #0
i think that the keypad should be able to go through a script just in case to stop the user from going that direction if there was anything dangerous that way...

and oh yeah, world.Pause(true) is suppose to pause the world... right??? and world.Pause(false) is suppose to unpause them??? or am i just totally not getting the idea.... please clarify because it just doesn't seem to work for me...
#1
Pausing just pauses the output screen so that it doesn't move, even though you are still getting data from the server(mud).

Try this set of events:

/world.pause true

Look at the bottom right hand corner of mushclient. There should be somethign showing "PAUSE"

As the server(mud) sends more text to you, it will change to a black background with grey text and read "MORE"

You can then turn it off by pressing
CTRL-PAGE DOWN

or by the scripting command:

/world.pause false


If you want to see it in action quickly, initiate combat or go somewhere where you're sure there will be activity, maybe people walking around or conversation, and try it there.

#2
For the primary question, this may be doable easily in a plugin.

Check here:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1692

Primarily of interest is OnPluginSend which will be processed for EVERY command that is sent to the mud.

You could use a plugin to monitor your movements and limit them if you felt necessary.
Amended on Sat 26 Oct 2002 02:45 PM by Vaejor
Australia Forum Administrator #3
The simple solution to the keypad problem is to make an alias to match each direction. Keypad commands (and macros) are processed for aliases. eg. make an alias:

^(n|north)$

(A regular expression) and in it call a script to see if you can go north. This has the added benefit that it will also work if you type "n" rather than use the numeric keypad.

Vaejor is right about what "pause" does. If you were hoping for a command to pause a script, there isn't one. If you need to build in pauses in your output, use the "world.DoAfter" function to send text after a time elapses.