Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local configTo = {
- [30001] = { -- ActionID | Storage
- msgTo = "Voce foi teleportado para o PVP.", -- Msg ao entrar
- teleportTo = {x = 2187, y = 2035, z = 5}, -- Teleport de ida
- teleportBack = {x = 992, y = 1023, z = 7}, -- Teleport de volta
- },
- [30002] = { -- ActionID | Storage
- msgTo = "Voce foi teleportado para o PVP.", -- Msg ao entrar
- teleportTo = {x = 2187, y = 2035, z = 5}, -- Teleport de ida
- teleportBack = {x = 1022, y = 797, z = 7}, -- Teleport de volta
- },
- }
- local actionID_Back = 30000 -- ActionID (Dentro do PvP)
- local msgBack = "Voce voltou." -- Msg ao voltar
- function onStepIn(cid, item, position, fromPosition)
- for k, v in pairs(configTo) do
- if item.actionid == k then
- if getPlayerStorageValue(cid, k) < 1 then
- doTeleportThing(cid, v.teleportTo, true)
- setPlayerStorageValue(cid, v.storage, 1)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, v.msgTo)
- end
- return true
- end
- if item.actionid == actionID_Back then
- doTeleportThing(cid, v.teleportBack, true)
- setPlayerStorageValue(cid, v.storage, 0)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgBack)
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement