Postado Março 16, 2021 4 anos Boa noite, tenho um script que da exp ao matar player, como posso configurar a quantidade dessa exp? é possivel dividir essa exp entre todos os player que atacaram o mesmo jogador? function onKill(cid, target, lastHit) if(isPlayer(cid) and isPlayer(target)) then if getPlayerIp(cid) ~= getPlayerIp(target) then doPlayerAddExperience(cid, (getPlayerExperience(target))) -- you will likely want to introduce a formula here else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You will not receive anything for killing players of the same IP.") end end return true end tfs 0.4 3777 Editado Março 16, 2021 4 anos por Lost666 tfs (veja o histórico de edições)
Postado Março 16, 2021 4 anos function onKill(cid, target, lastHit) local EXP = 100 -- experience que o player vai receber, somada a experience do target if(isPlayer(cid) and isPlayer(target)) then if getPlayerIp(cid) ~= getPlayerIp(target) then doPlayerAddExperience(cid, (getPlayerExperience(target)+EXP)) -- you will likely want to introduce a formula here else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You will not receive anything for killing players of the same IP.") end end return true end
Postado Março 16, 2021 4 anos Autor está ganhando muita exp, tipo uns 10 level matando personagem do mesmo level é possivel multiplicar pelo level do personagem? tipo ali na basa local exp 100 * level do personagem
Postado Março 16, 2021 4 anos Autor consegui alterando a linha doPlayerAddExperience(cid, (X * getPlayerLevel(target))) porem não mostra a exp ganha pelo personagem ao matar, como posso adicionar isso?
Postado Março 17, 2021 4 anos Spoiler tabela = { config = "no", -- # irá ganhar level ao matar? se sim coloque yes ## -- quantidade = 2 -- ## level caso você tenha colocado em yes ## -- } function onKill(cid, target, lastHit) if isPlayer(target) then if getPlayerIp(cid) ~= getPlayerIp(target) then if ( tabela.config == "no" ) then doPlayerAddExperience(cid, (getPlayerExperience(target) / 5)) doSendAnimatedText(getPlayerPosition(cid), "+EXP" ..(getPlayerExperience(target) / 5) , COLOR_RED) else doPlayerAddSkill(cid, 8, tabela.quantidade) doSendAnimatedText(getPlayerPosition(cid), "+LVL " ..tabela.quantidade, COLOR_RED) end else doPlayerSendCancel(cid, "You will not receive anything for killing players of the same IP.") end end return true end @Lost666 você pode deixar tanto para receber em level, quanto em XP, lembrando que ele irá receber a exp do target DIVIDIDO por 5 e irá aparecer um texto animado no jogador contendo essa quantia de exp ganha! já caso você queira apenas deixar ganhando level, ele irá aparecer um texto animado no jogador contendo a quantia de level ganho! Editado Março 17, 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.