Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <talkaction words="!tp" event="script" value="noob.lua"/>
- -----------------------------------------------------------------
- noob.lua\/
- local waittime = 30 --Default (30 seconds)
- local storage = 50
- function onSay(cid, words, param, channel)
- if(param == "") then
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
- return TRUE
- end
- local pid = getPlayerByNameWildcard(param)
- if(pid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
- return TRUE
- end
- if getPlayerLevel(pid) < 50 then
- if exhaustion.get(cid, storage) == FALSE then
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " has been sent to temple.")
- doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
- exhaustion.set(cid, storage, waittime)
- else
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. exhaustion.get(cid, storage) .. " seconds.")
- end
- else
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The player is higer then lvl 50.")
- end
- return TRUE
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement