Postado Fevereiro 7, 2019 6 anos Como eu coloco pra ganhar EXP nesse creaturescript somente se FRAGAR? ele funciona perfeitamente, porem se ele morrer na arena ele continua dando xp tem alguma forma de colocar a exp somente pro player que fragar? Spoiler <event type="kill" name="pvpenf" event="script" value="pvpenf.lua"/> Spoiler function onKill(cid, target, lastHit) local exp1 = 25000000 local exp2 = 25000000 local exp3 = 50000000 local lvl = getPlayerLevel(target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then doCreatureSay(cid, "Voce nao recebe EXP por matar MC", TALKTYPE_ORANGE_1) return true end if getPlayerLevel(target) < getPlayerLevel(cid) then doCreatureSay(cid, "Voce recebeu EXP por matar um player MENOR que seu level", TALKTYPE_ORANGE_1) doSendAnimatedText(getPlayerPosition(cid), "50000000", 215) doPlayerAddExperience(cid, exp1 * lvl) elseif getPlayerLevel(target) == getPlayerLevel(cid) then doCreatureSay(cid, "Voce recebeu EXP por matar um player do MESMO level", TALKTYPE_ORANGE_1) doSendAnimatedText(getPlayerPosition(cid), "50000000", 215) doPlayerAddExperience(cid, exp1 * lvl) elseif getPlayerLevel(target) > getPlayerLevel(cid) then doCreatureSay(cid, "Voce recebeu EXP por matar um player MAIOR que seu level", TALKTYPE_ORANGE_1) doSendAnimatedText(getPlayerPosition(cid), "100000000", 215) doPlayerAddExperience(cid, exp3 * lvl) end end return true end Editado Fevereiro 7, 2019 6 anos por poko360 (veja o histórico de edições)
Postado Fevereiro 7, 2019 6 anos @poko360 bloqueia as areas de arena no código, são quantas? [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Fevereiro 7, 2019 6 anos Autor @Vodkart tipo, sao varias, mas tem outro probleminha ainda, eu queria que nao funcionasse se matar player yellow skull, porque (tem como "burlar" o sistema sem pegar frag, matando yellow skull) dai o player pega yellow e morre pro char main e fica upando infinito Editado Fevereiro 7, 2019 6 anos por poko360 (veja o histórico de edições)
Postado Fevereiro 8, 2019 6 anos 17 horas atrás, poko360 disse: @Vodkart tipo, sao varias, mas tem outro probleminha ainda, eu queria que nao funcionasse se matar player yellow skull, porque (tem como "burlar" o sistema sem pegar frag, matando yellow skull) dai o player pega yellow e morre pro char main e fica upando infinito Eu uso um sistema assim tambem, mas ele não bloqueia a arena tambem, e só quem ta o ultimo hit ganha o Level. local max_lvl = 4000 function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) and getPlayerLevel(cid) <= max_lvl and getPlayerLevel(cid) <= getPlayerLevel(target) then local expForUp = getExperienceForLevel(getPlayerLevel(cid) + 5) - getPlayerExperience(cid) doPlayerAddExp(cid, expForUp) end return true end <event type="kill" name="KillPlayer" event="script" value="killPlayer.lua"/>
Postado Fevereiro 11, 2019 6 anos Autor Reformulei o script do jeito que lvl baixo nao desse exp e level alto desse mais level. So que ta dando uns error na distro e nao sei resolver, alguem pode da um help?@Vodkart@Zzyzx Spoiler function onKill(cid, target, lastHit) local exp1 = 1 local exp11 = 2 local exp2 = 3 local exp22 = 6 local exp3 = 9 local exp33 = 18 local exp4 = 27 local exp44 = 54 local exp5 = 81 local exp55 = 162 local exp6 = 243 local lvl = getPlayerLevel(target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then doCreatureSay(cid, "Voce nao recebe EXP por matar MC", TALKTYPE_ORANGE_1) return true end if getPlayerLevel(target) > 1 and getPlayerLevel(target) < 5000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "10000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp1 * lvl) elseif getPlayerLevel(target) > 5000 and getPlayerLevel(target) < 10000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "20000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp11 * lvl) elseif getPlayerLevel(target) > 10000 and getPlayerLevel(target) < 15000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "30000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp2 * lvl) elseif getPlayerLevel(target) > 15000 and getPlayerLevel(target) < 20000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "40000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp22 * lvl) elseif getPlayerLevel(target) > 20000 and getPlayerLevel(target) < 25000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "50000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp3 * lvl) elseif getPlayerLevel(target) > 25000 and getPlayerLevel(target) < 30000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "60000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp33 * lvl) elseif getPlayerLevel(target) > 30000 and getPlayerLevel(target) < 35000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "70000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp4 * lvl) elseif getPlayerLevel(target) > 35000 and getPlayerLevel(target) < 40000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "80000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp44 * lvl) elseif getPlayerLevel(target) > 40000 and getPlayerLevel(target) < 45000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "90000000", 215) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp5 * lvl) elseif getPlayerLevel(target) > 45000 and getPlayerLevel(target) < 50000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "100000000", 210) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp55 * lvl) elseif getPlayerLevel(target) > 50000 and getPlayerLevel(target) < 90000 and getPlayerLevel(cid) > 1 then doSendAnimatedText(getPlayerPosition(cid), "110000000", 210) doPlayerAddExperience(cid, getPlayerLevel(cid) * exp6 * lvl) end end return true end Editado Fevereiro 11, 2019 6 anos por poko360 (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.