Marcus
User.postCount++;
If you have an unique id in the map that you can't really locate, or you need to find it fast, you can use this talkaction to teleport your gm directly to where it is.
/uid 4444
will bring you to whatever item has unique id 4444
talkactions.xml
go_to_uid.lua
/uid 4444
will bring you to whatever item has unique id 4444
talkactions.xml
PHP:
<talkaction words="/uid" separator=" " script="go_to_uid.lua" />
go_to_uid.lua
PHP:
function onSay(player, words, param)
if player:getGroup():getId() < 3 then
return true
end
item = Item(math.floor(param))
if item then
pos = item:getPosition()
if pos then
pos.x = pos.x+1
player:teleportTo(pos)
else
player:sendTextMessage(18, "position not found")
end
else
player:sendTextMessage(18, "Item not found")
end
return true
end