Postado Maio 29, 2018 6 anos deleta esse script ai que vc tem e a tag dele tbm. ai coloca esse: fulllifepvp.lua function isInPvpFight(cid) return getPlayerStorageValue(cid, 887568) - os.time() <= 0 and false or true end function onLogin(cid) registerCreatureEvent(cid, "InFightAdvance") registerCreatureEvent(cid, "InFightCombat") setPlayerStorageValue(cid, 887568, 0) return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL and not isInPvpFight(cid) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) end return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then local time = 120 -- 2 minutos que demora pra sair o pvp, modifique ali o tempo setPlayerStorageValue(cid, 887568, os.time()+time) end return true end TAG <event type="login" name="InFightLogin" event="script" value="fulllifepvp.lua"/> <event type="advance" name="InFightAdvance" event="script" value="fulllifepvp.lua"/> <event type="combat" name="InFightCombat" event="script" value="fulllifepvp.lua"/> [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Maio 29, 2018 6 anos Aqui no TibiaKing mensagens como UP e BUMP são proibidas, utilize o botão subir este tópico. Esta é uma mensagem automática!Pedimos que leia as regras do fórum! Spoiler Here in TibiaKing messages like UP and BUMP are prohibited, use the button raise this topic. This is an automated message!Please read the forum rules.
Postado Junho 10, 2018 6 anos Autor Em 28/05/2018 em 21:55, Vodkart disse: deleta esse script ai que vc tem e a tag dele tbm. ai coloca esse: fulllifepvp.lua function isInPvpFight(cid) return getPlayerStorageValue(cid, 887568) - os.time() <= 0 and false or true end function onLogin(cid) registerCreatureEvent(cid, "InFightAdvance") registerCreatureEvent(cid, "InFightCombat") setPlayerStorageValue(cid, 887568, 0) return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL and not isInPvpFight(cid) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) end return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then local time = 120 -- 2 minutos que demora pra sair o pvp, modifique ali o tempo setPlayerStorageValue(cid, 887568, os.time()+time) end return true end TAG <event type="login" name="InFightLogin" event="script" value="fulllifepvp.lua"/> <event type="advance" name="InFightAdvance" event="script" value="fulllifepvp.lua"/> <event type="combat" name="InFightCombat" event="script" value="fulllifepvp.lua"/> @Vodkart só tive tempo de testar agora, pois estava com muitas outras tarefas no sv, enfim vod não funcionou, ele não tá healando, se eu removo o and not isInPvpFight(cid) ele funciona normal... (testando sem estar sendo atacado por player)
Postado Junho 12, 2018 6 anos function isInPvpFight(cid) if getPlayerStorageValue(cid, 887568) - os.time() <= 0 then return false else return true end end Tenta alterar a função assim Edit Outra coisa, a storage só está sendo adicionada à pessoa que ataca e não ao atacado, logo inclua a linha no script: setPlayerStorageValue(target, 887568, os.time()+time) Talvez nem seja necessário alterar a função, uma vez que ela faz exatamente a mesma coisa só escrita de uma forma diferente. Editado Junho 12, 2018 6 anos por luiz.marsilio (veja o histórico de edições)
Postado Julho 10, 2019 5 anos Autor . Editado Julho 10, 2019 5 anos por You Know Nothing (veja o histórico de edições)
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.