Page 1 of 1

Speedwalk

PostPosted: Tue Dec 10, 2013 7:45 pm
by DarkArtist
Alias Speedwalk

Pattern:
^([0-9neswdu]+)$

for count, direction in string.gmatch(matches[2], "([0-9]*)([neswdu])") do
count = (count == "" and 1 or count)
for i=1, count do send(direction,false) end
end

--Except that this matches on the opening screen when you hit 1 to enter the game. If anyone can figure out how to fix the pattern to not match on a single \d, pls post it.

to correct this i added:

if matches[1]="1" then send("1") else ...

It'd be better to just fix the pattern tho.

Re: Speedwalk

PostPosted: Wed Dec 11, 2013 3:49 pm
by Avar
Maybe this will work:
^([0-9neswud]*[neswud]+)$

Re: Speedwalk

PostPosted: Thu Dec 12, 2013 8:41 am
by DarkArtist
Yup, thanks :)