Ir para conteúdo

Featured Replies

Postado

Alguem sabe me informar pq não funciona esse script..

 

Spoiler

local config = {
tempo = 3 -- tempo, em segundos que o efeito demorará para sair.
}

function msg(cid)
local monster = "Ice Pet" 
if isCreature and getCreatureName(cid) == monster then
doSendMagicEffect(getThingPos(cid), 37)
doSendAnimatedText(getThingPos(cid), "level: ".. getPlayerStorageValue(cid, RegenPercent.stora) .. "", 147)
LoopReg(cid)
addEvent(function() msg(cid) end, config.tempo)
end
end

function onThink(cid, interval)
if getPlayerStorageValue(cid, 70070) ~= 1 then
return true
end
if (getPlayerStorageValue(cid, 70070) - os.time()) <= 0 then --164334 é para guardar o intervalo de tempo.
msg(cid)
setPlayerStorageValue(cid, 70070, config.tempo + os.time())
else
return true
end
return TRUE
end
 

 

  • Respostas 10
  • Visualizações 890
  • Created
  • Última resposta

Top Posters In This Topic

Postado

@Tchuka 

 

Ve se funciona esse

 

Spoiler

local config = {
tempo = 3 -- tempo, em segundos que o efeito demorará para sair.
timeleft = os.time() + tempo*1000
}
function msg(cid)
local monster = "Ice Pet" 
if isCreature and getCreatureName(cid) == monster then
doSendMagicEffect(getThingPos(cid), 37)
doSendAnimatedText(getThingPos(cid), "level: ".. getPlayerStorageValue(cid, RegenPercent.stora) .. "", 147)
LoopReg(cid)
addEvent(function() msg(cid) end, config.tempo)
end
end
function onThink(cid, interval)
if getPlayerStorageValue(cid, 70070) ~= 1 then
return true
end
if (getPlayerStorageValue(cid, 70070)) <= 0 then --164334 é para guardar o intervalo de tempo.
msg(cid)
setPlayerStorageValue(cid, 70070, config.timeleft)
else
return true
end
return TRUE
end

 

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo