Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- em talkactions.xml:
- <talkaction words="!bug" event="script" value="tp.lua"/>
- em scripts crie um arquivo chamado tp.lua e cole:
- local config = {
- battle = true,
- storage = 19420,
- tempo = 60,
- }
- function onSay(cid, words, param, channel)
- if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
- doPlayerSendCancel(cid, "Você esta em battle!!")
- return true
- end
- if getPlayerStorageValue(cid, 878781) == 1 then --pvp
- doPlayerSendCancel(cid, "You can't do that in the Pvp")
- return true
- end
- if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then
- setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*1))
- else
- doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can telport again.")
- return true
- end
- doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
- doSendMagicEffect(getThingPos(cid), 21)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement