Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <talkaction words="!tp" event="script" value="noob.lua"/>
  2. -----------------------------------------------------------------
  3. noob.lua\/
  4.  
  5. local waittime = 30 --Default (30 seconds)
  6. local storage = 50
  7. function onSay(cid, words, param, channel)
  8. if(param == "") then
  9. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
  10. return TRUE
  11. end
  12. local pid = getPlayerByNameWildcard(param)
  13. if(pid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
  14. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
  15. return TRUE
  16. end
  17. if getPlayerLevel(pid) < 50 then
  18. if exhaustion.get(cid, storage) == FALSE then
  19. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " has been sent to temple.")
  20. doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
  21. exhaustion.set(cid, storage, waittime)
  22. else
  23. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. exhaustion.get(cid, storage) .. " seconds.")
  24. end
  25. else
  26. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The player is higer then lvl 50.")
  27. end
  28. return TRUE
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement