local action = 50045
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition)
if not isPlayer(cid) or isPlayerGhost(cid) then
return true
end
if item.actionid == action then
local title = "Teleport Confirmation"
local message = "Are you sure you want to be teleported?"
local window = ModalWindow(1001, title, message)
window:addButton(100, "Yes")
window:addButton(101, "No")
window:setDefaultEnterButton(100)
window:setDefaultEscapeButton(101)
window:sendToPlayer(cid)
return true
end
return true
end
function onModalWindow(cid, modalWindowId, buttonId, choiceId)
if modalWindowId == 1001 then
if buttonId == 100 then
doTeleportThing(cid, {x = 100, y = 100, z = 7})
end
end
end