Postado Março 10, 2021 4 anos Autor nenhum dos 3 script funfou =C nao acontece nada (tambem n da error na distro) o script original seria esse: (sem o elfseif) function onKill(cid, target, lastHit) local storage = getPlayerStorageValue(target, 2310) if getPlayerLevel(cid) <= getPlayerLevel(target) and isPlayer(cid) and isPlayer(target) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(cid, (getPlayerExperience(target) / 500)) return true end
Postado Março 10, 2021 4 anos vai na sua src em creatureevent.cpp procure por onKill e veja se tem Lasthit @poko360 se puder me falar como funciona esse pvp enforced tbm Have no idea! freelance? go to my discord: sun#8860
Postado Março 10, 2021 4 anos Autor @Sun seria isso? bool Creature::onKilledCreature(Creature* target, DeathEntry& entry) o script funciona assim: quando 1 ou mais players participarem de uma kill, o script vai pegar a exp total do target e dividir por 500 (configuravel no script) e distribuir igualmente essa xp pra todos os participantes da kill oq eu queria é somente distribuir pro player que fragou a kill
Postado Março 11, 2021 4 anos Solução function onDeath(cid, corpse, deathList) local position = getPlayerPosition(deathList[1]) local target = getCreatureTarget(deathList[1]) local mLevel = getPlayerLevel(cid) <= getPlayerLevel(target) and 500 or 5000 if getPlayerStorageValue(target, 2310) == -1 then return true end doSendAnimatedText(position, "+" .. tostring((getPlayerExperience(target) / mLevel) .. "exp", COLOR_RED) doCreatureAddHealth(deathList[1], 1000) doPlayerAddExperience(deathList[1], (getPlayerExperience(target) / mLevel)) return true end perdão a demora, está ai o script! não se esqueça de registrar no login.lua e colocar a tag no xml! <event type="death" name="PvpEnforced" event="script" value="death.lua"/> e em login.lua registerCreatureEvent(cid, "PvpEnforced") lembrando!, não altere nada no script, você pode alterar apenas a storage tá ai o funcionamento!. @poko360 lembrando se te ajudei rep+ e coloque como {Solução} Editado Março 11, 2021 4 anos por Sun (veja o histórico de edições) Have no idea! freelance? go to my discord: sun#8860
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.