dervin13
Active Member
- Joined
- Apr 26, 2008
- Messages
- 458
- Solutions
- 1
- Reaction score
- 28
Anyone can help to convert this talkaction? I already tried some changes but didn't work thanks
Code:
local temple = {x=100, y=100, z=7} -- Lugar onde será teleportado
local level = 100 -- Level minimo para poder usar o item
local pz = true -- players precisam estar em protection zone para usar? (true ou false)
local storage = 212290 -- Storage para dar exhausted
function onSay(cid, words, param)
if pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then
return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Você precisa estar em protection zone pra poder teleportar.")
end
if getPlayerStorageValue(cid, storage) > os.time() then
return doPlayerSendCancel(cid, "Espere " .. getPlayerStorageValue(cid, storage) - os.time() .. " segundos.")
end
if getPlayerLevel(cid) <= level then
doTeleportThing(cid, temple, TRUE)
doSendMagicEffect(temple,10)
doSendAnimatedText(temple, "Events!", 5)
setPlayerStorageValue(cid, storage, os.time() + 10) -- tempo em segundos.
else
doPlayerSendCancel(cid, "Desculpe, você precisa ser menor que o level "..level.." para ser teleportado.")
end
return TRUE
end