Ola pessoal Tudo bem, estou precisando de um Ring q faça a pessoa se Transformar e tenha um limite de tempo alguem poderia me ajudar, é para um otserver 8.60 clasico. se puder deixe bem explicado obg
Postado em maio 17, 2019
Ola pessoal Tudo bem, estou precisando de um Ring q faça a pessoa se Transformar e tenha um limite de tempo alguem poderia me ajudar, é para um otserver 8.60 clasico. se puder deixe bem explicado obg
O player se transformava em que?
local ring = {
outfit = 123, -- outfit que ele ganha
efeito = 1, -- efeito que fica nele
iditem = 123, -- id do ring
tempo = 1, -- tempo que ele fica transformado
waittime = 1.5, -- tempo que pode usar dnv
storage = 12345, -- não mexa
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
addEvent(function()
if exhaustion.check(cid, storage) then
doPlayerSendCancel(cid, "Espere um pouco")
elseif ring.iditem == ring.iditem then
doPlayerAddOutfit(cid, ring.outfit)
doPlayerRemoveOutfit(cid, ring.tempo, ring.outfit)
return false
end
end, ring.tempo)
não sei bem se irá funcionar
Segue o script, a configuração é alto explicativo, mas se tiver alguma duvida é só falar.
local ring = { storage = 55691, timer = 10, outfit = 428 } function onUse(cid, item, fromPosition, itemEx, toPosition) local storageTimer = os.time() - getPlayerStorageValue(cid, ring.storage) if storageTimer >= ring.timer then setPlayerStorageValue(cid, ring.storage, os.time()) doSetCreatureOutfit(cid, { lookType = ring.outfit}, ring.timer*1000) else doPlayerSendCancel(cid, "Aguarde "..(ring.timer-storageTimer).." segundos para usar novamente.") end return true end