In the version I'm looking at, the function capture_move_cmd starts on line 1334, this is where you are going to want to focus your attention.
On line 1346, I see: local door = string.match(dir,"open (%a+)")
That bit of code compares the command sent to the pattern given, and stores the match contained in the parenthesis if found. You should be able to use line like that, with a different pattern, and a following if statement to check to see if you got a match, like this:
Code: Select all
local drive = string.match(dir,"drive (%a+)")
if drive then dir = drive end
Or, if you had a table of such commands you wanted to check against and strip out, you could do this:
Code: Select all
local special_cmd_tbl = {"drive","swim","climb"}
for i,v in ipairs(special_cmd_tbl) do
local str = string.match(dir, v .. " (%a+)")
if str then
dir = str
break
end
end
And then eventually that special table could be moved up to configurations somewhere, and incorporated into the official version, because as it stands, any time this script got updated, your changes would be wiped away, as this is a self updating script.