Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. em talkactions.xml:
  2. <talkaction words="!bug" event="script" value="tp.lua"/>
  3.  
  4.  
  5. em scripts crie um arquivo chamado tp.lua e cole:
  6. local config = {
  7. battle = true,
  8. storage = 19420,
  9. tempo = 60,
  10. }
  11.  
  12. function onSay(cid, words, param, channel)
  13. if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
  14. doPlayerSendCancel(cid, "Você esta em battle!!")
  15. return true
  16. end
  17. if getPlayerStorageValue(cid, 878781) == 1 then --pvp
  18. doPlayerSendCancel(cid, "You can't do that in the Pvp")
  19. return true
  20. end
  21. if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then
  22. setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*1))
  23. else
  24. doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can telport again.")
  25. return true
  26. end
  27. doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
  28. doSendMagicEffect(getThingPos(cid), 21)
  29. return true
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement