Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. local configTo = {
  2. [30001] = { -- ActionID | Storage
  3. msgTo = "Voce foi teleportado para o PVP.", -- Msg ao entrar
  4. teleportTo = {x = 2187, y = 2035, z = 5}, -- Teleport de ida
  5. teleportBack = {x = 992, y = 1023, z = 7}, -- Teleport de volta
  6. },
  7. [30002] = { -- ActionID | Storage
  8. msgTo = "Voce foi teleportado para o PVP.", -- Msg ao entrar
  9. teleportTo = {x = 2187, y = 2035, z = 5}, -- Teleport de ida
  10. teleportBack = {x = 1022, y = 797, z = 7}, -- Teleport de volta
  11. },
  12. }
  13.  
  14. local actionID_Back = 30000 -- ActionID (Dentro do PvP)
  15. local msgBack = "Voce voltou." -- Msg ao voltar
  16.  
  17. function onStepIn(cid, item, position, fromPosition)
  18. for k, v in pairs(configTo) do
  19. if item.actionid == k then
  20. if getPlayerStorageValue(cid, k) < 1 then
  21. doTeleportThing(cid, v.teleportTo, true)
  22. setPlayerStorageValue(cid, v.storage, 1)
  23. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, v.msgTo)
  24. end
  25. return true
  26. end
  27. if item.actionid == actionID_Back then
  28. doTeleportThing(cid, v.teleportBack, true)
  29. setPlayerStorageValue(cid, v.storage, 0)
  30. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msgBack)
  31. break
  32. end
  33. end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement