Hi, is it possible to use the speedwalk_fixer with the slow_speedwalk plugin?
I tried to get the script from speedwalk_fixer and tried to use it in slow_speedwalk, but it doesn't seem to work.
If there is a way to use both at the same time so that !* command of the slow_speedwalk plugin would change the direction commands of "north|south|..." to "n|s|.... it would be much appreciated!
BTW, how do I change the title of a posting?
I accidently pressed tab x3 and enter, which just saved it immediately, and I can't change the title or delete it :)
-- main function called when you type a speedwalk
function func_handle_speedwalk (name, line, wildcards)
wait.make (function () --- coroutine below here
sw = EvaluateSpeedwalk (wildcards [1])
if string.sub (sw, 1, 1) == "*" then
ColourNote ("white", "red", string.sub (sw, 2))
return
end -- if
Insert these new lines:
local conversions = {
north = "n",
south = "s",
east = "e",
west = "w",
up = "u",
down = "d",
}
sw = string.gsub (sw, "%f[%a]%a+%f[%A]", conversions)
That will use string.gsub to replace whole words in the table above, with the replacement letter. The %f stuff is a "frontier" pattern used to make sure we are matching on a whole word.