Jump to content

Question

Alguém sabe o motivo da minha mana ficar negativa?

No sample da database ta como máximo de mana: 6(é o máximo que pode ter para não bugar os pokemon) e mana: 0 

quando crio conta ok tudo de boa mais quando eu passo pelo tile com action para ganhar meu pokémon(cada poke ocupa 1 de mana)

da esse erro: 

 

21/08/2016 14:44:05] [Error - MoveEvents Interface] 
[21/08/2016 14:44:05] data/movements/scripts/inicial/inicial.lua:onStepIn
[21/08/2016 14:44:05] Description: 
[21/08/2016 14:44:05] (luaDoTransformItem) Item not found

 

já troquei tfs para ver se removia mais não deu resultado.

Alguém sabe o motivo da mana ficar negativa? como ja falei ela ta normal ai quado cria conta e pega o poke inicial ou reloga a mana desce para -389 na database

Alguém? é urgente

8nhiuXP.png

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/
Share on other sites

14 answers to this question

Recommended Posts

  • 0
local starterpokes = {  ["charmander"] = {x = 1055, y = 1917, z = 6},  ["squirtle"] = {x = 1055, y = 1919, z = 6},  ["bulbasaur"] = {x = 1055, y = 1921, z = 6},  ["torchic"] = {x = 1056, y = 1923, z = 6},  ["treecko"] = {x = 1060, y = 1923, z = 6},  ["cyndaquil"] = {x = 1061, y = 1917, z = 6},  ["totodile"] = {x = 1061, y = 1919, z = 6},  ["chikorita"] = {x = 1061, y = 1921, z = 6},  ["mudkip"] = {x = 1058, y = 1923, z = 6},} local btype = "normal" local storage = 4812394function onStepIn(cid, fromPosition, toPos)local pokemon = ""     for a, b in pairs (starterpokes) do        if isPosEqualPos(toPos, b) then            pokemon = a         end    end     	      if pokemon == "" then return true end  if getPlayerStorageValue(cid, storage) <= 0 then     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Pronto, agora puxe sua pokeball para o slot, e de Use pra chamar seu pokémon!")		doPlayerSendTextMessage(cid, 22, pokemon)     addPokeToPlayer(cid, pokemon, 0, nil, btype, false)     doPlayerAddItem(cid, 2394, 20)      doPlayerAddItem(cid, 2148, 50)      doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))	 setPlayerStorageValue(cid, storage, 1)	 doSendMagicEffect(getThingPos(cid), 21)	 else	 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou seu Pokémon inicial.")	 doTeleportThing(cid, fromPosition, TRUE)   return trueend end

Eu acho que não tem nada haver isso com a mana mais OK.

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702222
Share on other sites

  • 0
19 minutos atrás, LukasRSilvah disse:
local starterpokes = {  ["charmander"] = {x = 1055, y = 1917, z = 6},  ["squirtle"] = {x = 1055, y = 1919, z = 6},  ["bulbasaur"] = {x = 1055, y = 1921, z = 6},  ["torchic"] = {x = 1056, y = 1923, z = 6},  ["treecko"] = {x = 1060, y = 1923, z = 6},  ["cyndaquil"] = {x = 1061, y = 1917, z = 6},  ["totodile"] = {x = 1061, y = 1919, z = 6},  ["chikorita"] = {x = 1061, y = 1921, z = 6},  ["mudkip"] = {x = 1058, y = 1923, z = 6},} local btype = "normal" local storage = 4812394function onStepIn(cid, fromPosition, toPos)local pokemon = ""     for a, b in pairs (starterpokes) do        if isPosEqualPos(toPos, b) then            pokemon = a         end    end     	      if pokemon == "" then return true end  if getPlayerStorageValue(cid, storage) <= 0 then     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Pronto, agora puxe sua pokeball para o slot, e de Use pra chamar seu pokémon!")		doPlayerSendTextMessage(cid, 22, pokemon)     addPokeToPlayer(cid, pokemon, 0, nil, btype, false)     doPlayerAddItem(cid, 2394, 20)      doPlayerAddItem(cid, 2148, 50)      doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))	 setPlayerStorageValue(cid, storage, 1)	 doSendMagicEffect(getThingPos(cid), 21)	 else	 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou seu Pokémon inicial.")	 doTeleportThing(cid, fromPosition, TRUE)   return trueend end

Eu acho que não tem nada haver isso com a mana mais OK.

Aparentemente a funçao addPokeToPlayer chama a funçao doTransformItem. Ela provavelmente tá sendo chamada errada, ocasionando em bugs.

Tu mexeu nesse script? Que base tu tá usando? E como assim tu trocou de TFS? o.O 

E só de segurança, põe o mínimo de mana em 0 e o maximo em 7.

Edited by Gabriel Netto
Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702223
Share on other sites

  • 0

O servidor era PDA mano, eu simplesmente estou adptando para um Open Source versão 0.3.6 8.54.

Não mexi na função não, eu acho que o erro pode ser nas sources sim sobre a Mana pq cada poke ocupa 1 de mana o máximo de pokes é 6 então o max de mana é 6 e por acaso a mana está - -389 (negativa) por isso não consegue pegar pokémon no Inventario, Com conta GOD funciona de boa o poké vem.

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702224
Share on other sites

  • 0
Agora, LukasRSilvah disse:

O servidor era PDA mano, eu simplesmente estou adptando para um Open Source versão 0.3.6 8.54.

Não mexi na função não, eu acho que o erro pode ser nas sources sim sobre a Mana pq cada poke ocupa 1 de mana o máximo de pokes é 6 então o max de mana é 6 e por acaso a mana está - -389 (negativa) por isso não consegue pegar pokémon no Inventario, Com conta GOD funciona de boa o poké vem.

Entendi. O god pode ter qnts Pokémons ele quiser no PDA, né? Se for isso, o problema tá na verificaçao do máximo de Pokémons.

Tem que achar onde esse limite tá, pq se isso foi feito na source, fica foda arrumar, vai saber o que kct o Brunn fez pra conseguir td funcionando direito :v

 

Só comentando mesmo, tu ia estar direcionando melhor teu esforço trabalhando numa base dash, como o v6, do que tentando adaptar um TFS pro PDA ;p

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702225
Share on other sites

  • 0
2 minutos atrás, LukasRSilvah disse:

O problema é na mana :/

Só precisava de ajuda na mana que ela parasse de setar -389 e ficasse normal.

Foda :/

Tenta achar algum script que ponha limite no número de Pokémons q da pra carregar, se tu nao achar, bem, vai ficar complexo....

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702227
Share on other sites

  • 0
1 minuto atrás, Gabriel Netto disse:

Foda :/

Tenta achar algum script que ponha limite no número de Pokémons q da pra carregar, se tu nao achar, bem, vai ficar complexo....

Creio eu que seja na source não?

 

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702228
Share on other sites

  • 0
Agora, LukasRSilvah disse:

Creio eu que seja na source não?

 

Ent, se tu não achar o script isso foi feito nas sources, e aí seria quase impossível ajeitar isso. Mas eu acho que foi feito em script, já q o catch por exemplo, foi feito em script ;p

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702229
Share on other sites

  • 0

Eu sei onde fica a função de adicionar Poke

function addPokeToPlayer(cid, pokemon, boost, gender, ball, unique)             --alterado v1.9 \/ peguem ele todo...local genders = {["male"] = 4,["female"] = 3,[1] = 4,[0] = 3,[4] = 4,[3] = 3,}if not isCreature(cid) then return false endlocal pokemon = doCorrectString(pokemon)if not pokes[pokemon] then return false end   local GENDER = (gender and genders[gender]) and genders[gender] or getRandomGenderByName(pokemon)   local btype = (ball and pokeballs[ball]) and ball or isShinyName(pokemon) and "shinynormal" or "normal"   local happy = 250   if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then       item = doCreateItemEx(11826)   else      item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1)      end   if not item then return false end   doItemSetAttribute(item, "poke", pokemon)   doItemSetAttribute(item, "hp", 1)   doItemSetAttribute(item, "happy", happy)   doItemSetAttribute(item, "gender", GENDER)   doSetItemAttribute(item, "hands", 0)   doItemSetAttribute(item, "description", "Contains a "..pokemon..".")   doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")    if boost and tonumber(boost) and tonumber(boost) > 0 and tonumber(boost) <= 50 then      doItemSetAttribute(item, "boost", boost)   end   if unique then      doItemSetAttribute(item, "unique", getCreatureName(cid))   end                                                                                if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then      doPlayerSendMailByName(getCreatureName(cid), item, 1)      sendMsgToPlayer(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.")   end   if (isShinyName(pokemon) or (boost and tonumber(boost) and tonumber(boost) >= 10)) and pokeballs["shiny"..btype] then      doTransformItem(item, pokeballs["shiny"..btype].on)   else      doTransformItem(item, pokeballs[btype].on)   endreturn trueend 

Sobre essa função ai é nela onde deve estar o problema ou na mana por que ai diz.

sendMsgToPlayer(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.")

é a mesma mensagem que aparece quando pego o poke, ele não vai pro inventário e sim vai pro DP, quando tento mover ele do Dp para bag não vai, ele aparece como ball morta.

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702230
Share on other sites

  • 0
12 minutos atrás, LukasRSilvah disse:

Eu sei onde fica a função de adicionar Poke

function addPokeToPlayer(cid, pokemon, boost, gender, ball, unique)             --alterado v1.9 \/ peguem ele todo...local genders = {["male"] = 4,["female"] = 3,[1] = 4,[0] = 3,[4] = 4,[3] = 3,}if not isCreature(cid) then return false endlocal pokemon = doCorrectString(pokemon)if not pokes[pokemon] then return false end   local GENDER = (gender and genders[gender]) and genders[gender] or getRandomGenderByName(pokemon)   local btype = (ball and pokeballs[ball]) and ball or isShinyName(pokemon) and "shinynormal" or "normal"   local happy = 250   if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then       item = doCreateItemEx(11826)   else      item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1)      end   if not item then return false end   doItemSetAttribute(item, "poke", pokemon)   doItemSetAttribute(item, "hp", 1)   doItemSetAttribute(item, "happy", happy)   doItemSetAttribute(item, "gender", GENDER)   doSetItemAttribute(item, "hands", 0)   doItemSetAttribute(item, "description", "Contains a "..pokemon..".")   doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")    if boost and tonumber(boost) and tonumber(boost) > 0 and tonumber(boost) <= 50 then      doItemSetAttribute(item, "boost", boost)   end   if unique then      doItemSetAttribute(item, "unique", getCreatureName(cid))   end                                                                                if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then      doPlayerSendMailByName(getCreatureName(cid), item, 1)      sendMsgToPlayer(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.")   end   if (isShinyName(pokemon) or (boost and tonumber(boost) and tonumber(boost) >= 10)) and pokeballs["shiny"..btype] then      doTransformItem(item, pokeballs["shiny"..btype].on)   else      doTransformItem(item, pokeballs[btype].on)   endreturn trueend 

Sobre essa função ai é nela onde deve estar o problema ou na mana por que ai diz.

sendMsgToPlayer(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.")

é a mesma mensagem que aparece quando pego o poke, ele não vai pro inventário e sim vai pro DP, quando tento mover ele do Dp para bag não vai, ele aparece como ball morta.

A ball morta acontece até com o adm?

Olha essa parte aq: getPlayerFreeCap(cid) >= 6. Seguindo a lógica, o limite de Pokémons é por cap e nao por mana o.O

Ta com uns bug bem fodido pra confundir cap com mana

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702232
Share on other sites

  • 0

Ue que estranho até por que o cap do player ta acima de 500 que é alto D+

e testei com a Tfs do pda a que vem em todos servers e a mana fica normal

Tive que criar um comando para ver a mana pra não ter que ficar indo na database

e quando estou com a tfs adaptada aparece vc tem -389 de mana

e na do pda normal vc tem 1 de mana *usando um poke*

vc tem 0 de mana *sem usar nenhum poke*

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702233
Share on other sites

  • 0
33 minutos atrás, LukasRSilvah disse:

Ue que estranho até por que o cap do player ta acima de 500 que é alto D+

e testei com a Tfs do pda a que vem em todos servers e a mana fica normal

Tive que criar um comando para ver a mana pra não ter que ficar indo na database

e quando estou com a tfs adaptada aparece vc tem -389 de mana

e na do pda normal vc tem 1 de mana *usando um poke*

vc tem 0 de mana *sem usar nenhum poke*

A mana deve verificar se tu ta usando um pokemon ou nao.

Se for isso, eu acho q é algo no go/goback

Link to comment
https://xtibia.com/forum/topic/241839-bug-mana-negativa/#findComment-1702235
Share on other sites

×
×
  • Create New...