[MudWalker] Feature Request
Michael Beatty
proto
Thu Sep 23 14:44:37 PDT 2004
On Sep 23, 2004, at 5:16 PM, Tim burke wrote:
> Trigger groups, with the ability to enable and disable groups of
> triggers. Also, control clicking of triggers with an edit option from
> the Triggers window.
It definitely would be nice to group triggers by group.
> Also, speedwalking would be nice, this is a zMud
> feature, example:
Here's one of the speedwalk aliases I use. You'll need to modify it a
little to work with your mud if it uses more than the six cardinal
directions, or if you need to open / close doors in between.
Make sure the alias is type Lua.
alias: &
-- script start
-- current direction
local dir
-- hold number of steps, eg '9s'
local num = 0
-- current character
local cur
-- swalk is our speedwalk string, eg "9s3e12w"
local swalk
-- set up a list of direction names
dirname[ "n" ] = "north"
dirname[ "s" ] = "south"
dirname[ "w" ] = "west"
dirname[ "e" ] = "east"
dirname[ "u" ] = "up"
dirname[ "d" ] = "down"
-- if we're not standing or floating, get up
if stance ~= "stand" and stance ~= "float" then
send( "stand" )
end
-- sw is global map of speedwalks - for instance, sw[ "ju2dm" ] =
"8w8n2e3n4w3n2w2n5w"
-- the sw map is initialized in the connection script
-- if we input something like "& ju2dm" then execute the stored
speedwalk otherwise treat as literal
if sw[ arg[1] ] then
swalk = sw[ arg[1] ]
else
swalk = arg[1]
end
-- continue executing as long as swalk is not empty
while swalk and swalk ~= "" do
-- store first character in cur
cur = string.sub( swalk, 1, 1 )
-- store all but first character back into swalk
swalk = string.sub( swalk, 2,
string.len( swalk ) )
if tonumber( cur ) then
num = num * 10 + tonumber( cur )
else
dir = cur
if num == 0 then
send( dirname[dir] )
else
for i = 1, num do
send( dirname[dir] )
end
num = 0
end
end
end
-- script end
To use this, just type "& 2e4s5u3w" into the mudwalker window. The
script would send:
east
east
south
south
south
south
up
up
up
up
up
west
west
west
Note that the script sends the entire speedwalk at once - this can
cause you to lag or possibly only execute part of the speedwalk for
very long speedwalks. I don't think Mudwalker currently has any way to
pause between messages.
--
Michael Beatty | proto at beattys.us
More information about the MudWalker
mailing list