1- a exp dos pokes são configuradas tudo no xml de cada pokemon
info
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino

então mano, eu botei ali que o problema é justamente esse... eu ja alterei o XP no XML do pokemon tambem e nada muda
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Em 20/04/2020 em 17:45, adrianokk disse:Não sei se coloquei no lugar correto e com Tipo correto, então peço desculpas se teve erro.
Vou soltar logo 3 problemas aqui para não ter que ficar criando varias publicações, creio que é um incomodo para o fórum também.
1- Estou com um problema no XP que os pokemons estão dando ao morrer.
(A algum tempo atrás eu vi um cara falando sobre uma correção de XP dos pokemons na base DXP, mas já dorei atras por 3 dias em todas os cantos do Xtibia e nada..)
se alguém souber como faço para conseguir mudar o multiplicador de XP, por favor..
![]()
OBs: ja mudei a XP no config.lua, botei XP: 1 mas o pokemon ainda ta dando 7500 de xp e o xp no arquio XML do pokemon é apenas 250.
2-O código da minha loja no pokemon etá funcionando corretamente. "POREM" existe um contador na loja que mostra quantas moedas vips o jogados tem no inventario.
so que esse contador não esta funcionando, ele fica marcando 0 "Zero" o tempo todo. alguns poderias me ajudar a achar o erro? faz uns dias que eu to tentando arrumar ja.
mas é tanta coisa que as vezes eu fico abitolado e nao acho o erro.
Item id: 2145
Codigo:function terminate() disconnect(g_game, { onGameEnd = onGameEnd }) ProtocolGame.unregisterExtendedOpcode(103) shopWindow:destroy() shopButton:destroy() end function sendRequestShow(op) g_game.getProtocolGame():sendExtendedOpcode(103, op) end function onGameEnd() if shopWindow:isVisible() then shopWindow:hide() end end function show() shopWindow:show() shopWindow:raise() shopWindow:focus() addEvent(function() g_effects.fadeIn(shopWindow, 250) end) playerEmeralds:setText("x"..g_game.getLocalPlayer():getItemsCount(2145)) end function hide() addEvent(function() g_effects.fadeOut(shopWindow, 250) end) scheduleEvent(function() shopWindow:hide() end, 250) end function toggle() if shopWindow:isVisible() then hide() else show() end end function onClickInItem(cost, self) if g_game.getLocalPlayer():getItemsCount(2145) >= cost then g_game.getProtocolGame():sendExtendedOpcode(103, string.explode(self:getStyleName(), "B")[1] .. '|' .. self:getParent():getChildIndex(self)) else displayInfoBox(tr('Gold Shop'), tr('Voce nao tem Vip Gold suficiente!')) end end function onBuyFailed(protocol, opcode, buffer) if toboolean(buffer) then displayInfoBox(tr('Gold Shop'), tr('A compra foi feita com sucesso...')) playerEmeralds:setText(g_game.getLocalPlayer():getItemsCount(2145)) else displayInfoBox('Gold Shop', buffer) end end
3- Meu ultimo problema é, se algum sabe me indicar onde eu posso aprender a Encriptar os arquivos do cliente.
Primeiramente, não é correto criar um tópico para vários problemas diferentes, se fosse dúvidas ou erros que fossem correlatas ai não teria problema, mas as suas duas outras dúvidas tem haver com cliente (do shop provavelmente).
Sobre sua primeira pergunta, o problema é que em algumas bases ele multiplicam o exp do pokémon que fica no xml por algum valor, por isso não recebe a exp desejada que está no xml do pokémon. Se sua base for DXP, vai em Data/Creaturescripts/Scripts e abra o arquivo pokeexp.lua, em seguida procura por está parte:
elseif not isInParty(pk) then
E abaixo dela estará a atribuição de experiência dependendo o level, provavelmente vai ter um variável chamada givenexp que pega a exp do xml do pokémon e ela vai estar sendo multiplicada por algum valor, é só remover a multiplicação. Caso não consiga, posta o script que te ajudo a arrumar.
Sobre suas outras duas dúvidas, crie um tópico para cada na área correta.
Editado Abril 23 por Yan18
Em 23/04/2020 em 14:39, Yan18 disse:Primeiramente, não é correto criar um tópico para vários problemas diferentes, se fosse dúvidas ou erros que fossem correlatas ai não teria problema, mas as suas duas outras dúvidas tem haver com cliente (do shop provavelmente).
Sobre sua primeira pergunta, o problema é que em algumas bases ele multiplicam o exp do pokémon que fica no xml por algum valor, por isso não recebe a exp desejada que está no xml do pokémon. Se sua base for DXP, vai em Data/Creaturescripts/Scripts e abra o arquivo pokeexp.lua, em seguida procura por está parte:
elseif not isInParty(pk) thenE abaixo dela estará a atribuição de experiência dependendo o level, provavelmente vai ter um variável chamada givenexp que pega a exp do xml do pokémon e ela vai estar sendo multiplicada por algum valor, é só remover a multiplicação. Caso não consiga, posta o script que te ajudo a arrumar.
Sobre suas outras duas dúvidas, crie um tópico para cada na área correta.
ajuda to com mismo error
local function playerAddExp(cid, exp) doPlayerAddExp(cid, exp) doSendAnimatedText(getThingPos(cid), exp, 215) end function onDeath(cid, corpse, deathList) --if not isCreature(cid) then return true end if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8 local givenexp = getWildPokemonExp(cid) ---local killer = getItemAttribute(corpse.uid, "corpseowner") if givenexp > 0 then for a = 1, #deathList do local pk = deathList[a] --- local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) if isCreature(pk) then local expTotal = math.floor(givenexp * getDamageMapPercent(pk, cid)) local party = getPartyMembers(pk) if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then expTotal = math.floor(expTotal/#party) --alterado v1.6.1 for i = 1, #party do if isInArray(list, party[i]) then if getPlayerLevel(pk) <= 50 then playerAddExp(party[i], expTotal * 2000) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(party[i], expTotal * 1300) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(party[i], expTotal * 800) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(party[i], expTotal * 400) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(party[i], expTotal * 200) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(party[i], expTotal * 100) elseif getPlayerLevel(pk) >= 351 then playerAddExp(party[i], expTotal * 50) end end end elseif not isInParty(pk) then if getPlayerLevel(pk) <= 50 then playerAddExp(pk, math.floor(200 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(pk, math.floor(130 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(pk, math.floor(80 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(pk, math.floor(40 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(pk, math.floor(20 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(pk, math.floor(10 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 351 then playerAddExp(pk, math.floor(5 * givenexp * getDamageMapPercent(pk, cid))) return true end end end end end if isNpcSummon(cid) then local master = getCreatureMaster(cid) doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000)) doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1) doRemoveCreature(cid) return false end if corpse.itemid ~= 0 then --alterado v1.8 doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid)) doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid)) end return true end
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

18 minutos atrás, KaboFlow disse:
ajuda to com mismo error
local function playerAddExp(cid, exp) doPlayerAddExp(cid, exp) doSendAnimatedText(getThingPos(cid), exp, 215) end function onDeath(cid, corpse, deathList) --if not isCreature(cid) then return true end if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8 local givenexp = getWildPokemonExp(cid) ---local killer = getItemAttribute(corpse.uid, "corpseowner") if givenexp > 0 then for a = 1, #deathList do local pk = deathList[a] --- local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) if isCreature(pk) then local expTotal = math.floor(givenexp * getDamageMapPercent(pk, cid)) local party = getPartyMembers(pk) if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then expTotal = math.floor(expTotal/#party) --alterado v1.6.1 for i = 1, #party do if isInArray(list, party[i]) then if getPlayerLevel(pk) <= 50 then playerAddExp(party[i], expTotal * 2000) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(party[i], expTotal * 1300) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(party[i], expTotal * 800) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(party[i], expTotal * 400) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(party[i], expTotal * 200) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(party[i], expTotal * 100) elseif getPlayerLevel(pk) >= 351 then playerAddExp(party[i], expTotal * 50) end end end elseif not isInParty(pk) then if getPlayerLevel(pk) <= 50 then playerAddExp(pk, math.floor(200 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(pk, math.floor(130 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(pk, math.floor(80 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(pk, math.floor(40 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(pk, math.floor(20 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(pk, math.floor(10 * givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 351 then playerAddExp(pk, math.floor(5 * givenexp * getDamageMapPercent(pk, cid))) return true end end end end end if isNpcSummon(cid) then local master = getCreatureMaster(cid) doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000)) doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1) doRemoveCreature(cid) return false end if corpse.itemid ~= 0 then --alterado v1.8 doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid)) doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid)) end return true end
local function playerAddExp(cid, exp) doPlayerAddExp(cid, exp) doSendAnimatedText(getThingPos(cid), exp, 215) end function onDeath(cid, corpse, deathList) --if not isCreature(cid) then return true end if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8 local givenexp = getWildPokemonExp(cid) ---local killer = getItemAttribute(corpse.uid, "corpseowner") if givenexp > 0 then for a = 1, #deathList do local pk = deathList[a] --- local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) if isCreature(pk) then local expTotal = math.floor(givenexp * getDamageMapPercent(pk, cid)) local party = getPartyMembers(pk) if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then expTotal = math.floor(expTotal/#party) --alterado v1.6.1 for i = 1, #party do if isInArray(list, party[i]) then if getPlayerLevel(pk) <= 50 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 351 then playerAddExp(party[i], expTotal) end end end elseif not isInParty(pk) then if getPlayerLevel(pk) <= 50 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 351 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) return true end end end end end if isNpcSummon(cid) then local master = getCreatureMaster(cid) doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000)) doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1) doRemoveCreature(cid) return false end if corpse.itemid ~= 0 then --alterado v1.8 doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid)) doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid)) end return true end
Pronto, já tirei a exp extra tanto em party quanto fora, e agora pega a exp exata do pokémon selvagem (definido no arquivo xml) mas deixei para multiplicar pela função getDamageMapPercente, que é uma função que pega porcentagem do monstro de acordo com o dano que ele deu em um pokémon (isso só se aplica quando mais de um jogador ataca o mesmo pokémon, quem dar mais dano fica com o pokémon). Se matar um monstro sozinho no seu servidor vai ver que vai pegar a exp exata do pokémon, porém se outro player atacar ele, vai ver que a exp não vai vir exata, mas de acordo com o tanto que você atacou o pokémon. E a função getDamageMapPercent não sei o valor da porcentagem que trabalha porque é uma função feita na source, mas sempre que atacar sozinho um pokémon, vai vir 100% da exp dele.
7 minutos atrás, Yan18 disse:
local function playerAddExp(cid, exp) doPlayerAddExp(cid, exp) doSendAnimatedText(getThingPos(cid), exp, 215) end function onDeath(cid, corpse, deathList) --if not isCreature(cid) then return true end if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8 local givenexp = getWildPokemonExp(cid) ---local killer = getItemAttribute(corpse.uid, "corpseowner") if givenexp > 0 then for a = 1, #deathList do local pk = deathList[a] --- local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) if isCreature(pk) then local expTotal = math.floor(givenexp * getDamageMapPercent(pk, cid)) local party = getPartyMembers(pk) if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then expTotal = math.floor(expTotal/#party) --alterado v1.6.1 for i = 1, #party do if isInArray(list, party[i]) then if getPlayerLevel(pk) <= 50 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(party[i], expTotal) elseif getPlayerLevel(pk) >= 351 then playerAddExp(party[i], expTotal) end end end elseif not isInParty(pk) then if getPlayerLevel(pk) <= 50 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) elseif getPlayerLevel(pk) >= 351 then playerAddExp(pk, math.floor(givenexp * getDamageMapPercent(pk, cid))) return true end end end end end if isNpcSummon(cid) then local master = getCreatureMaster(cid) doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000)) doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1) doRemoveCreature(cid) return false end if corpse.itemid ~= 0 then --alterado v1.8 doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid)) doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid)) end return true endPronto, já tirei a exp extra tanto em party quanto fora, e agora pega a exp exata do pokémon selvagem (definido no arquivo xml) mas deixei para multiplicar pela função getDamageMapPercente, que é uma função que pega porcentagem do monstro de acordo com o dano que ele deu em um pokémon (isso só se aplica quando mais de um jogador ataca o mesmo pokémon, quem dar mais dano fica com o pokémon). Se matar um monstro sozinho no seu servidor vai ver que vai pegar a exp exata do pokémon, porém se outro player atacar ele, vai ver que a exp não vai vir exata, mas de acordo com o tanto que você atacou o pokémon. E a função getDamageMapPercent não sei o valor da porcentagem que trabalha porque é uma função feita na source, mas sempre que atacar sozinho um pokémon, vai vir 100% da exp dele.
mais qero qe meu server te x5 a exp ta x0
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

4 minutos atrás, KaboFlow disse:
mais qero qe meu server te x5 a exp ta x0
Você não falou que queria a exp x5, só disse que estava com mesmo erro, e no caso deu a entender que queria exp que define no xml do pokémon.
Substitua o script por esse:
local function playerAddExp(cid, exp) doPlayerAddExp(cid, exp) doSendAnimatedText(getThingPos(cid), exp, 215) end function onDeath(cid, corpse, deathList) --if not isCreature(cid) then return true end if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8 local givenexp = getWildPokemonExp(cid) ---local killer = getItemAttribute(corpse.uid, "corpseowner") if givenexp > 0 then for a = 1, #deathList do local pk = deathList[a] --- local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) if isCreature(pk) then local expTotal = math.floor(givenexp * getDamageMapPercent(pk, cid)) local party = getPartyMembers(pk) if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then expTotal = math.floor(expTotal/#party) --alterado v1.6.1 for i = 1, #party do if isInArray(list, party[i]) then if getPlayerLevel(pk) <= 50 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 351 then playerAddExp(party[i], expTotal * 50) end end end elseif not isInParty(pk) then if getPlayerLevel(pk) <= 50 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 351 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) return true end end end end end if isNpcSummon(cid) then local master = getCreatureMaster(cid) doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000)) doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1) doRemoveCreature(cid) return false end if corpse.itemid ~= 0 then --alterado v1.8 doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid)) doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid)) end return true end
Testa e vê se é assim que quer, deixei para multiplicar a exp do pokémon que está no xml por 5, exemplo, a exp do Charizard está definido no xml como 1500, então a exp vai ser 1500 * 5 = 7500.
4 minutos atrás, Yan18 disse:Você não falou que queria a exp x5, só disse que estava com mesmo erro, e no caso deu a entender que queria exp que define no xml do pokémon.
Substitua o script por esse:
local function playerAddExp(cid, exp) doPlayerAddExp(cid, exp) doSendAnimatedText(getThingPos(cid), exp, 215) end function onDeath(cid, corpse, deathList) --if not isCreature(cid) then return true end if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8 local givenexp = getWildPokemonExp(cid) ---local killer = getItemAttribute(corpse.uid, "corpseowner") if givenexp > 0 then for a = 1, #deathList do local pk = deathList[a] --- local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) if isCreature(pk) then local expTotal = math.floor(givenexp * getDamageMapPercent(pk, cid)) local party = getPartyMembers(pk) if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then expTotal = math.floor(expTotal/#party) --alterado v1.6.1 for i = 1, #party do if isInArray(list, party[i]) then if getPlayerLevel(pk) <= 50 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(party[i], expTotal * 5) elseif getPlayerLevel(pk) >= 351 then playerAddExp(party[i], expTotal * 50) end end end elseif not isInParty(pk) then if getPlayerLevel(pk) <= 50 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) elseif getPlayerLevel(pk) >= 351 then playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid)))) return true end end end end end if isNpcSummon(cid) then local master = getCreatureMaster(cid) doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000)) doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1) doRemoveCreature(cid) return false end if corpse.itemid ~= 0 then --alterado v1.8 doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid)) doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid)) end return true endTesta e vê se é assim que quer, deixei para multiplicar a exp do pokémon que está no xml por 5, exemplo, a exp do Charizard está definido no xml como 1500, então a exp vai ser 1500 * 5 = 7500.
misma exp 1500
to usando base d DXP
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

8 horas atrás, KaboFlow disse:
misma exp 1500
to usando base d DXP
Realmente não estava mudando, vi aqui e esse arquivo pokeexp.lua nem é usado. Vai em Data/Creaturescripts/Scripts/Player e abre o arquivo pokeDeath.lua, procure essa linha:
playerAddExp(player, math.ceil(percent * xp / 100) * heldExp)
E troque por :
playerAddExp(player, math.ceil(percent * xp / 100) * heldExp * 5)
Agora está dando 5x a exp.
29 minutos atrás, Yan18 disse:Realmente não estava mudando, vi aqui e esse arquivo pokeexp.lua nem é usado. Vai em Data/Creaturescripts/Scripts/Player e abre o arquivo pokeDeath.lua, procure essa linha:
playerAddExp(player, math.ceil(percent * xp / 100) * heldExp)E troque por :
playerAddExp(player, math.ceil(percent * xp / 100) * heldExp * 5)Agora está dando 5x a exp.
vlw ajudo muito mais ja avia solucionado iso mais vo testear e suo...
muito boom mano ajudo mais ache umo aqi mais op
exp free x5
exp vip x10
ese ta mais op mais vlw pro ajuda vo d Rp
Editado Maio 8 por KaboFlow






info
Grupo: Artesão
Registrado: 15/03/07
Posts: 106
Reputação: +1
Gênero: Masculino
Não sei se coloquei no lugar correto e com Tipo correto, então peço desculpas se teve erro.
Vou soltar logo 3 problemas aqui para não ter que ficar criando varias publicações, creio que é um incomodo para o fórum também.
1- Estou com um problema no XP que os pokemons estão dando ao morrer.
(A algum tempo atrás eu vi um cara falando sobre uma correção de XP dos pokemons na base DXP, mas já dorei atras por 3 dias em todas os cantos do Xtibia e nada..)
se alguém souber como faço para conseguir mudar o multiplicador de XP, por favor..
OBs: ja mudei a XP no config.lua, botei XP: 1 mas o pokemon ainda ta dando 7500 de xp e o xp no arquio XML do pokemon é apenas 250.
2-O código da minha loja no pokemon etá funcionando corretamente. "POREM" existe um contador na loja que mostra quantas moedas vips o jogados tem no inventario.
so que esse contador não esta funcionando, ele fica marcando 0 "Zero" o tempo todo. alguns poderias me ajudar a achar o erro? faz uns dias que eu to tentando arrumar ja.
mas é tanta coisa que as vezes eu fico abitolado e nao acho o erro.
Item id: 2145
Codigo:
3- Meu ultimo problema é, se algum sabe me indicar onde eu posso aprender a Encriptar os arquivos do cliente.
Editado Abril 20 por adrianokk