Alertness with mudlet mapper and gmcp

Share your scripts and packages with other Mudlet users.
Post Reply
Mosr
Posts: 30
Joined: Wed Jul 21, 2010 1:24 pm

Alertness with mudlet mapper and gmcp

Post by Mosr »

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.

Code: [show] | [select all] lua
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.
Attachments
room_parse.xml.xml
(2.26 KiB) Downloaded 474 times

Post Reply