So, I've been messing with a few ways to do this and just couldn't really figure out a good way to do it. Regardless of how I try, it always feels very roundabout. But here are the results of tinkering with alertness, gmcp, and mapper functions.
If you know of a better way please, PLEASE post it because this is driving me nuts.
room_parse = function ()
adjacentRooms = {}
for k,v in pairs(gmcp.Room.Info.exits) do
adjacentRooms[getRoomName(v)] = k
end
end
isHere = function (name,place)
if place == gmcp.Room.Info.name then
aInfo(name .. "<green> here.")
else
if adjacentRooms[place] then
aInfo(name.." <green>" .. mmp.ranytolong(adjacentRooms[place]))
end
end
end
aInfo = function (stuff)
cecho("\n<gray>[<blue>ALERTNESS<gray>]: "..stuff)
end
The name of the script is room_parse and it updates on the gmcp.Room.Info event.