Ir para conteúdo

Pergunta

Oi Gente :D

Meu Ot é Naruto 8.54

e queria saber se vcs conseguem arrumar um erro com spells

quase todas spells q eu uso da um erro no distro

e a spell fica sem exhausted

VVV

imagemrwo.png

 

Se Conseguiren Arrumar

Dou Rep+ uma semana

Pf Ajudem

Link para o comentário
https://xtibia.com/forum/topic/210325-erro-spells/
Compartilhar em outros sites

10 respostass a esta questão

Posts Recomendados

  • 0

Vai em data/lib, cria um arquivo.lua lá e coloca isso:

 

function getCooldown(cid, spellname)
local storage = tostring(getPlayerStorageValue(cid, 40001))
local spellname = '"' .. spellname .. '"'

return string.find(storage, spellname) and tonumber(string.match(storage, "%d+", string.find(storage, spellname) + #spellname)) - os.time() or 0
end

function setCooldown(cid, spellname, seconds)
local storage = getPlayerStorageValue(cid, 40001) == -1 and "" or tostring(getPlayerStorageValue(cid, 40001))
local spellname = '"' .. spellname .. '"'

if string.find(storage, spellname) then
local gsub = string.gsub(storage, string.match(storage, "%d+", string.find(storage, spellname) + #spellname), tostring(os.time() + seconds))
setPlayerStorageValue(cid, 40001, gsub)
else
setPlayerStorageValue(cid, 40001, storage .. spellname .. " " .. tostring(seconds + os.time()) .. " ")
end
end

function isExhausted(cid, spellname)
return getCooldown(cid, spellname) > 0
end

Link para o comentário
https://xtibia.com/forum/topic/210325-erro-spells/#findComment-1490898
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...