pattern: ^You see (?:a single )?exits? leading
script:local dirs = {}
dirs["n"] = "north"
dirs["ne"] = "northeast"
dirs["e"] = "east"
dirs["se"] = "southeast"
dirs["s"] = "south"
dirs["sw"] = "southwest"
dirs["w"] = "west"
dirs["nw"] = "northwest"
dirs["u"] = "up"
dirs["d"] = "down"
dirs["in"] = "in"
dirs["out"] = "out"
local areaHere = mmp.getAreaName(gmcp.Room.Info.num)
for k,v in pairs(gmcp.Room.Info.exits) do
if k ~= "x" then
local areaNew = mmp.getAreaName(v)
if areaNew ~= areaHere and areaNew ~= "?" then
selectCurrentLine()
for s,l in pairs(dirs) do
if k == s then
selectString(" "..l.." ",1)
replace(" "..l.."("..areaNew..") ",true)
deselect()
selectString(" "..l..".",1)
replace(" "..l.."("..areaNew..").",true)
deselect()
selectString(" "..l..",",1)
replace(" "..l.."("..areaNew.."),",true)
end
end
end
end
end
<br><br>*edit* Sorry for the formatting.
Comments