Ir para conteúdo
  • 0

Erros PDA


Pergunta

Bom minha net caiu e nao postou --'

irei escreber denovo porem + resumido

gente, tenho 1 PDA on a 9 meses... fiz tantas mudanças q é impossivel lembrar de tudo

mas nada daba error nao... ultimamente o servidor msm estando en host fica dando MUIIIIITO erro no log e por isto o jogo fica muito lag...

tanto lag assim q nem eu to querendo logar no jogo...

enfim quem tiver como me ajudar eu agradesceria muito irei postar alguns dos MUITOS erros aki

 

  Mostrar conteúdo oculto

mais erros

  Mostrar conteúdo oculto

 

Editado por josegvb
Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/
Compartilhar em outros sites

Posts Recomendados

  • 0

Poste o código das seguintes funções:

onPokeHealthChange(cid)
doPlayerChangeModeIcon(cid)
No código do goback, troque:
local usando = pokeballs[btype].use
por:
local usando = pokeballs[btype]
if not usando then
    doPlayerSendTextMessage(cid, 27, "Error in your pokeball.")
    print(getCreatureName(cid).."'s pokeball presented error. Pokeball type: "..btype.." - NOT IN pokeballs TABLE (lib)")
    return true
end
usando = usando.use
Em some functions.lua, troque os códigos das funções doRegenerateWithY e doCureWithY por:
  Mostrar conteúdo oculto

 

 

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685678
Compartilhar em outros sites

  • 0
  Em 12/02/2016 em 20:42, zipter98 disse:

Poste o código das seguintes funções:

onPokeHealthChange(cid)
doPlayerChangeModeIcon(cid)
No código do goback, troque:
local usando = pokeballs[btype].use
por:
local usando = pokeballs[btype]
if not usando then
    doPlayerSendTextMessage(cid, 27, "Error in your pokeball.")
    print(getCreatureName(cid).."'s pokeball presented error. Pokeball type: "..btype.." - NOT IN pokeballs TABLE (lib)")
    return true
end
usando = usando.use
Em some functions.lua, troque os códigos das funções doRegenerateWithY e doCureWithY por:
  Mostrar conteúdo oculto

 

 

 

valeu Zipter o cure e regen paresce estar funfando perfeitamente sem erro algum!

se tiver como me falar aonde achar essas funçoes onPokeHealthChange e doPlayerChangeModeIcon eu passo pra vc rapidao ^^ serio que nos 17:09 82 player(s) online tudos agradesce muito pra você! e tenha certeza q o credito é tudo teu pela ajuda!

no caso q estiver em 050-function, ja procurei la e nao tem isso la x.x

 

lembrando desse

[12/02/2016 17:05:20] [Error - CreatureScript Interface]
[12/02/2016 17:05:20] data/creaturescripts/scripts/login.lua:onLogin
[12/02/2016 17:05:20] Description:
[12/02/2016 17:05:20] (luaGetItemAttribute) Item not found
q ta dando sempre que alguem logar acho q é a 1 das causas desse lag tb, é estranho as veces os caras tb ficam bugados 1 que outro char quando ele summona o pokemon o servidor fica travado por uns 3 segundos mas só quando esse char chama o pokemon
Editado por josegvb
Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685682
Compartilhar em outros sites

  • 0

Esse erro é referente às funções que solicitei. Quanto a localização do código delas, não sei dizer. Talvez em algum arquivo relacionado ao sistema de ícones, ou até mesmo no some functions (eu não procurei todas as funções nele). Dê uma procurada rápida nos arquivos da lib que você encontrará.

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685688
Compartilhar em outros sites

  • 0
  Em 12/02/2016 em 22:41, zipter98 disse:

Esse erro é referente às funções que solicitei. Quanto a localização do código delas, não sei dizer. Talvez em algum arquivo relacionado ao sistema de ícones, ou até mesmo no some functions (eu não procurei todas as funções nele). Dê uma procurada rápida nos arquivos da lib que você encontrará.

 

onPokeHealthChange

 

  Mostrar conteúdo oculto

doPlayerChangeModeIcon
  Mostrar conteúdo oculto
function doPlayerChangeModeIcon(cid)
if getPlayerStorageValue(cid, 8955) >= 1 then
local x = icons[getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")]
local y = icons[getItemAttribute(getPlayerSlotItem(cid, 3).uid, "poke")]
if x and getPlayerSlotItem(cid, 8).itemid == 11826 then -- Pokeball
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11828 then -- Pokeball Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11827 then -- Pokeball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11829 then -- Ultraball
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11831 then -- Ultraball Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11830 then -- Ultraball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11835 then -- Superball
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11837 then -- Superball Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11836 then -- Superball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11832 then -- Greatball
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11834 then -- Greatball Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11833 then -- Greatball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 10975 then -- Saffariball
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 10977 then -- Saffariball Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 10976 then -- Saffariball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12826 then -- Darkball
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12828 then -- Darkball Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12827 then -- Darkball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11740 then -- Shiny Greatball
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11742 then -- Shiny Greatball Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11741 then -- Shiny Greatball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11743 then -- Shiny Super
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11745 then -- Shiny Super Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11744 then -- Shiny Superball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11746 then -- Shiny Ultra
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11748 then -- Shiny Ultra Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11747 then -- Shiny Ultraball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11737 then -- Shiny Poke
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11739 then -- Shiny Poke Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 11738 then -- Shiny Pokeball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12621 then -- Shiny Saffari
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12623 then -- Shiny Saffari Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12622 then -- Shiny Saffariball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12829 then -- Shiny Dark
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12831 then -- Shiny Dark Morta
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
elseif x and getPlayerSlotItem(cid, 8).itemid == 12830 then -- Shiny Darkball Usada
doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
end
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
local balls = getItemsInContainerById(bp.uid, 11826) ------ Pokeball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11828) --- Pokeball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
--------------------------------
local balls = getItemsInContainerById(bp.uid, 11829) ------ Ultraball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11831) --- Ultraball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
------------------------------
local balls = getItemsInContainerById(bp.uid, 11835) ------ Superball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11837) --- Superball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
-----------------------------
local balls = getItemsInContainerById(bp.uid, 11834) ------ Greatball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(balll, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11832) --- Greatball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
-----------------------------
local balls = getItemsInContainerById(bp.uid, 10975) ------ Saffariball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(balll, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 10977) --- Saffariball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
-----------------------------
local balls = getItemsInContainerById(bp.uid, 12826) ------ Darkball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 12828) --- Darkball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
-----------------------------------
local balls = getItemsInContainerById(bp.uid, 11740) ------ Shiny Great
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11742) ------ Shiny Greatball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11746) ------ Shiny Ultraball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11748) ------ Shiny Ultraball morta
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 11737) -- Shiny Pokeball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11739) -- Shiny Pokeball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
--doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 11740) -- Shiny Greatball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11742) -- Shiny Greatball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 11743) -- Shiny Superball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 11745) -- Shiny Super
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 12621) -- Shiny Saffariball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 12623) -- Shiny Saffari
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 12829) -- Shiny Darkball
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.on)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "no")
doItemSetAttribute(ball, "Icone", "yes")
end
end
local balls = getItemsInContainerById(bp.uid, 12831) -- Shiny Dark
if #balls >= 1 then
for _, ball in pairs (balls) do
local x = icons[getItemAttribute(ball, "poke")]
doTransformItem(ball, x.off)
doItemSetAttribute(ball, "ball", "Icone")
doItemSetAttribute(ball, "morta", "yes")
doItemSetAttribute(ball, "Icone", "yes")
end
end
else
local pokeball = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ball")
local mortano = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "morta")
local y = icons[getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")]
if pokeball == "normal" and mortano == "no" then -- Pokeball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11826)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "normal" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11828)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Pokeball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11829)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11831)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Pokeball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11835)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11837)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Pokeball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11832)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11834)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- saffariball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 10975)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 10977)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- darkball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 12826)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 12828)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- saffariball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11737)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11739)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Pokeball
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11746)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11748)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Shiny super
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11743)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11745) --- Shiny superr
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Shiny great
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11740)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 11742)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Shiny saffari
doTransformItem(getPlayerSlotItem(cid, 8).uid, 12621)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 12623)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then -- Shiny dark
doTransformItem(getPlayerSlotItem(cid, 8).uid, 12829)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(getPlayerSlotItem(cid, 8).uid, 12831)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
end
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
x = { }
for a = 1, #x do
local balls = getItemsInContainerById(bp.uid, x[a])
for _, ball in pairs (balls) do
local pokeball = getItemAttribute(ball, "ball")
local mortano = getItemAttribute(ball, "morta")
if getItemAttribute(ball, "ball") == "Icone" and getItemAttribute(ball, "morta") == "no" then -- Ultra ball
doTransformItem(ball, 11829)
doItemSetAttribute(ball, "Icone", "no")
elseif getItemAttribute(ball, "ball") == "Icone" and getItemAttribute(ball, "morta") == "yes" then -- Ultra ball morta
doTransformItem(ball, 11831)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 11826)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 11828)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 11835)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 11837)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 11832)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 11834)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 10975)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 10977)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 12826)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 12828)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 11737)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 11739)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 11740)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 11742)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 11743)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 11745)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 11746)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 11748)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 12621)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 12623)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then
doTransformItem(ball, 12829)
doItemSetAttribute(ball, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
doTransformItem(ball, 12831)
doItemSetAttribute(ball, "Icone", "no")
end
end
end
end
end

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685689
Compartilhar em outros sites

  • 0

ee45071262030725e59bdc9506c0944e.gif

 

irei testar muito obrigado @zipter98 no caso que esses bugs continuarem irei postar dnovo ^^ acho que com isso ja ira parar tds ou quase tds os bugs la vamo ver

pd: como prometi dei o credito pela ajuda ^^

edit2: login perfeito tudo mundo entrou e nao deu aquele bug q tava dando


  Em 12/02/2016 em 23:16, zipter98 disse:

 

Abaixo de:
function doPlayerChangeModeIcon(cid)
coloque:
if getPlayerSlotItem(cid, 8).uid < 1 then
    return true
end

 

 

tira uma duvida, tem alguns erros q ainda estao dando la no log

no caso que precisar adicionarlo (tem alguns na msm lista) iria precisar criar novo topico?

 

alguns erros aki:

[12/02/2016 23:54:48] [Error - Action Interface] 
[12/02/2016 23:54:48] In a timer event called from: 
[12/02/2016 23:54:48] data/actions/scripts/catch.lua:onUse
[12/02/2016 23:54:48] Description: 
[12/02/2016 23:54:48] (luaDoItemSetAttribute) Invalid data type

[12/02/2016 23:54:59] [Error - Action Interface] 
[12/02/2016 23:54:59] In a timer event called from: 
[12/02/2016 23:54:59] data/actions/scripts/goback.lua:onUse
[12/02/2016 23:54:59] Description: 
[12/02/2016 23:54:59] (luaDoCreatureAddHealth) Creature not found

[12/02/2016 23:54:59] [Error - Action Interface] 
[12/02/2016 23:54:59] In a timer event called from: 
[12/02/2016 23:54:59] data/actions/scripts/goback.lua:onUse
[12/02/2016 23:54:59] Description: 
[12/02/2016 23:54:59] (luaGetThingPosition) Thing not found
Editado por josegvb
Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685697
Compartilhar em outros sites

  • 0

Se possível, poste seu catch.lua (actions) e catch system.lua (lib).

Só haveria necessidade de criar um novo tópico caso o assunto seja diferente do tratado neste. Bem, aparentemente, não é o caso.

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685703
Compartilhar em outros sites

  • 0
  Em 13/02/2016 em 00:37, zipter98 disse:

Se possível, poste seu catch.lua (actions) e catch system.lua (lib).

Só haveria necessidade de criar um novo tópico caso o assunto seja diferente do tratado neste. Bem, aparentemente, não é o caso.

pronto!

catch.lua

 

  Mostrar conteúdo oculto

catch system.lua (lib)
  Mostrar conteúdo oculto
failmsgs = {
"Sorry, you didn't catch that pokemon.",
"Sorry, your pokeball broke.",
"Sorry, the pokemon escaped.",
}
function doBrokesCount(cid, str, ball) --alterado v1.9 \/
if not isCreature(cid) then return false end
local tb = {
{b = "normal", v = 0},
{b = "great", v = 0},
{b = "super", v = 0},
{b = "ultra", v = 0},
{b = "saffari", v = 0},
{b = "dark", v = 0},
}
for _, e in ipairs(tb) do
if e.b == ball then
e.v = 1
break
end
end
local string = getPlayerStorageValue(cid, str)
local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-), dark = (.-);"
local t2 = ""
for n, g, s, u, s2, d in string:gmatch(t) do
t2 = "normal = "..(n+tb[1].v)..", great = "..(g+tb[2].v)..", super = "..(s+tb[3].v)..", ultra = "..(u+tb[4].v)..", saffari = "..(s2+tb[5].v)..", dark = "..(d+tb[6].v)..";"
end
return setPlayerStorageValue(cid, str, string:gsub(t, t2))
end
function sendBrokesMsg(cid, str, ball)
if not isCreature(cid) then return false end
local string = getPlayerStorageValue(cid, str)
local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-), dark = (.-);"
local msg = {}
table.insert(msg, "You have wasted: ")
for n, g, s, u, s2, d in string:gmatch(t) do
if tonumber(n) and tonumber(n) > 0 then
table.insert(msg, tostring(n).." Poke ball".. (tonumber(n) > 1 and "s" or ""))
end
if tonumber(g) and tonumber(g) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(g).." Great ball".. (tonumber(g) > 1 and "s" or ""))
end
if tonumber(s) and tonumber(s) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(s).." Super ball".. (tonumber(s) > 1 and "s" or ""))
end
if tonumber(u) and tonumber(u) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(u).." Ultra ball".. (tonumber(u) > 1 and "s" or ""))
end
if tonumber(s2) and tonumber(s2) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." Saffari ball".. (tonumber(s2) > 1 and "s" or ""))
end
if tonumber(d) and tonumber(d) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(d).." Dark ball".. (tonumber(d) > 1 and "s" or ""))
end
end
if #msg == 1 then
return true
end
if string.sub(msg[#msg], 1, 1) == "," then
msg[#msg] = " and".. string.sub(msg[#msg], 2, #msg[#msg])
end
table.insert(msg, " trying to catch it.")
sendMsgToPlayer(cid, 27, table.concat(msg))
end --alterado v1.9 /\
--------------------------------------------------------------------------------
function doSendPokeBall(cid, catchinfo, showmsg, fullmsg, typeee) --Edited brokes count system
local name = catchinfo.name
local pos = catchinfo.topos
local topos = {}
topos.x = pos.x
topos.y = pos.y
topos.z = pos.z
local newid = catchinfo.newid
local catch = catchinfo.catch
local fail = catchinfo.fail
local rate = catchinfo.rate
local basechance = catchinfo.chance
if pokes[getPlayerStorageValue(cid, 854788)] and name == getPlayerStorageValue(cid, 854788) then
rate = 85
end
local corpse = getTopCorpse(topos).uid
if not isCreature(cid) then
doSendMagicEffect(topos, CONST_ME_POFF)
return true
end
doItemSetAttribute(corpse, "catching", 1)
local level = getItemAttribute(corpse, "level") or 0
local levelChance = level * 0.02
local totalChance = math.ceil(basechance * (1.2 + levelChance))
local thisChance = math.random(0, totalChance)
local myChance = math.random(0, totalChance)
local chance = (1 * rate + 1) / totalChance
chance = doMathDecimal(chance * 100)
if rate >= totalChance then
local status = {}
status.gender = getItemAttribute(corpse, "gender")
status.happy = 500
doRemoveItem(corpse, 1)
doSendMagicEffect(topos, catch)
addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee)
return true
end
if totalChance <= 1 then totalChance = 1 end
local myChances = {}
local catchChances = {}
for cC = 0, totalChance do
table.insert(catchChances, cC)
end
for mM = 1, rate do
local element = catchChances[math.random(1, #catchChances)]
table.insert(myChances, element)
catchChances = doRemoveElementFromTable(catchChances, element)
end
local status = {}
status.gender = getItemAttribute(corpse, "gender")
status.happy = 500
doRemoveItem(corpse, 1)
local doCatch = false
for check = 1, #myChances do
if thisChance == myChances[check] then
doCatch = true
end
end
if doCatch then
doSendMagicEffect(topos, catch)
addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee)
else
addEvent(doNotCapturePokemon, 3000, cid, name, typeee)
doSendMagicEffect(topos, fail)
end
end
function doCapturePokemon(cid, poke, ballid, status, typeee)
if not isCreature(cid) then
return true
end
local list = getCatchList(cid)
if not isInArray(list, poke) and not isShinyName(poke) then
doPlayerAddSoul(cid, 1)
end
doAddPokemonInOwnList(cid, poke)
doAddPokemonInCatchList(cid, poke)
if pokes[poke] then
local test = io.open("data/catch.txt", "a+")
local read = ""
if test then
read = test:read("*all")
test:close()
end
if string.find(poke, "Shiny") then
read = read.."\n\n\nName: "..getCreatureName(cid).." - Pokémon: "..poke..""
else
read = read.."\nName: "..getCreatureName(cid).." - Pokémon: "..poke..""
end
if newpokedex[poke].stoCatch ~= -1 then
local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);"
local msg = {}
storage = getPlayerStorageValue(cid, newpokedex[poke].stoCatch)
for n, g, s, u, s2 in storage:gmatch(t) do
if tonumber(n) and tonumber(n) > 0 then
table.insert(msg, tostring(n).." Poke ball".. (tonumber(n) > 1 and "s" or ""))
end
if tonumber(g) and tonumber(g) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(g).." Great ball".. (tonumber(g) > 1 and "s" or ""))
end
if tonumber(s) and tonumber(s) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(s).." Super ball".. (tonumber(s) > 1 and "s" or ""))
end
if tonumber(u) and tonumber(u) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(u).." Ultra ball".. (tonumber(u) > 1 and "s" or ""))
end
if tonumber(s2) and tonumber(s2) > 0 then
table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." Saffari ball".. (tonumber(s2) > 1 and "s" or ""))
end
end
read = read.." - "..table.concat(msg)..""
end
local reopen = io.open("data/catch.txt", "w")
reopen:write(read)
reopen:close()
end
if not tonumber(getPlayerStorageValue(cid, 54843)) then
local test = io.open("data/sendtobrun123.txt", "a+")
local read = ""
if test then
read = test:read("*all")
test:close()
end
read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
local reopen = io.open("data/sendtobrun123.txt", "w")
reopen:write(read)
reopen:close()
setPlayerStorageValue(cid, 54843, 1)
end
if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
setPlayerStorageValue(cid, 54843, 1)
else
setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
end
if icons[poke] then
ballid = icons[poke].on
end
local description = "Contains a "..poke.."."
local gender = status.gender
local happy = 200
--alterado v1.9 \/
if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
item = doCreateItemEx(ballid)
else
item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1)
end
doItemSetAttribute(item, "poke", poke)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "fakedesc", description)
doItemSetAttribute(item, "description", description)
doItemSetAttribute(item, "addon", 0)
if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then
doItemSetAttribute(item, "hands", 0)
doItemSetAttribute(item, "morta", "no")
doItemSetAttribute(item, "Icone", "yes")
doItemSetAttribute(item, "ball", "Icone")
--doTransformItem(item, icons[getItemAttribute(item, "poke")].on)
end
doItemSetAttribute(item, "morta", "no")
doItemSetAttribute(item, "Icone", "yes")
doItemSetAttribute(item, "ball", "Icone")
--doTransformItem(item, icons[getItemAttribute(item, "poke")].on)
----------- task clan ---------------------
if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then
sendMsgToPlayer(cid, 27, "Quest Done!")
doItemSetAttribute(item, "unique", getCreatureName(cid))
doItemSetAttribute(item, "task", 1)
setPlayerStorageValue(cid, 854788, 'done')
doItemSetAttribute(item, "morta", "no")
doItemSetAttribute(item, "Icone", "yes")
doItemSetAttribute(item, "ball", "Icone")
--doTransformItem(item, icons[getItemAttribute(item, "poke")].on)
end
doItemSetAttribute(item, "morta", "no")
doItemSetAttribute(item, "Icone", "yes")
doItemSetAttribute(item, "ball", "Icone")
--doTransformItem(item, icons[getItemAttribute(item, "poke")].on)
------------------------------------------- --alterado v1.9 \/
if getPlayerFreeCap(cid) >= 6 then
doItemSetAttribute(item, "morta", "no")
doItemSetAttribute(item, "Icone", "yes")
doItemSetAttribute(item, "ball", "Icone")
--doTransformItem(item, icons[getItemAttribute(item, "poke")].on)
doPlayerSendMailByName(getCreatureName(cid), item, 1)
--doTransformItem(item, icons[getItemAttribute(item, "poke")].on)
doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a pokemon ("..poke..")!")
doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.")
doPlayerSendTextMessage(cid, 27, "Digite !save para evitar perdas!")
end
local storage = newpokedex[poke].stoCatch
sendBrokesMsg(cid, storage, typeee)
setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0; dark = 0;") --alterado v1.9 /\
if #getCreatureSummons(cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)
if catchMakesPokemonHappier then
setPlayerStorageValue(getCreatureSummons(cid)[1], 1008, getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) + 20)
if useOTClient then
doCreatureExecuteTalkAction(cid, "/salvar")
end
end
else
doSendMagicEffect(getThingPos(cid), 173)
end
doIncreaseStatistics(poke, true, true)
end
function doNotCapturePokemon(cid, poke, typeee)
if not isCreature(cid) then
return true
end
if not tonumber(getPlayerStorageValue(cid, 54843)) then
local test = io.open("data/sendtobrun123.txt", "a+")
local read = ""
if test then
read = test:read("*all")
test:close()
end
read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
local reopen = io.open("data/sendtobrun123.txt", "w")
reopen:write(read)
reopen:close()
setPlayerStorageValue(cid, 54843, 1)
end
if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
setPlayerStorageValue(cid, 54843, 1)
else
setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
end
doPlayerSendTextMessage(cid, 27, failmsgs[math.random(#failmsgs)])
if #getCreatureSummons(cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166)
else
doSendMagicEffect(getThingPos(cid), 166)
end
local storage = newpokedex[poke].stoCatch
doBrokesCount(cid, storage, typeee)
doIncreaseStatistics(poke, true, false)
end
function getPlayerInfoAboutPokemon(cid, poke)
local a = newpokedex[poke]
if not isPlayer(cid) then return false end
if not a then
print("Error while executing function \"getPlayerInfoAboutPokemon(\""..getCreatureName(cid)..", "..poke..")\", "..poke.." doesn't exist.")
return false
end
local b = getPlayerStorageValue(cid, a.storage)
if b == -1 then
setPlayerStorageValue(cid, a.storage, poke..":")
end
local ret = {}
if string.find(b, "catch,") then
ret.catch = true
else
ret.catch = false
end
if string.find(b, "dex,") then
ret.dex = true
else
ret.dex = false
end
if string.find(b, "use,") then
ret.use = true
else
ret.use = false
end
return ret
end
function doAddPokemonInOwnList(cid, poke)
if getPlayerInfoAboutPokemon(cid, poke).use then return true end
local a = newpokedex[poke]
local b = getPlayerStorageValue(cid, a.storage)
setPlayerStorageValue(cid, a.storage, b.." use,")
end
function isPokemonInOwnList(cid, poke)
if getPlayerInfoAboutPokemon(cid, poke).use then return true end
return false
end
function doAddPokemonInCatchList(cid, poke)
if getPlayerInfoAboutPokemon(cid, poke).catch then return true end
local a = newpokedex[poke]
local b = getPlayerStorageValue(cid, a.storage)
setPlayerStorageValue(cid, a.storage, b.." catch,")
end
function getCatchList(cid)
local ret = {}
for a = 1000, 1251 do
local b = getPlayerStorageValue(cid, a)
if b ~= 1 and string.find(b, "catch,") then
table.insert(ret, oldpokedex[a-1000][1])
end
end
return ret
end
function getStatistics(pokemon, tries, success)
local ret1 = 0
local ret2 = 0
local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30))..""
local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt"
local arq = io.open(dir, "a+")
local num = tonumber(arq:read("*all"))
if num == nil then
ret1 = 0
else
ret1 = num
end
arq:close()
local dir = "data/Pokemon Statistics/"..poke.." Catches.txt"
local arq = io.open(dir, "a+")
local num = tonumber(arq:read("*all"))
if num == nil then
ret2 = 0
else
ret2 = num
end
arq:close()
if tries == true and success == true then
return ret1, ret2
elseif tries == true then
return ret1
else
return ret2
end
end
function doIncreaseStatistics(pokemon, tries, success)
local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30))..""
if tries == true then
local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt"
local arq = io.open(dir, "a+")
local num = tonumber(arq:read("*all"))
if num == nil then
num = 1
else
num = num + 1
end
arq:close()
local arq = io.open(dir, "w")
arq:write(""..num.."")
arq:close()
end
if success == true then
local dir = "data/Pokemon Statistics/"..poke.." Catches.txt"
local arq = io.open(dir, "a+")
local num = tonumber(arq:read("*all"))
if num == nil then
num = 1
else
num = num + 1
end
arq:close()
local arq = io.open(dir, "w")
arq:write(""..num.."")
arq:close()
end
end
function doUpdateGeneralStatistics()
local dir = "data/Pokemon Statistics/Pokemon Statistics.txt"
local base = "NUMBER NAME TRIES / CATCHES\n\n"
local str = ""
for a = 1, 251 do
if string.len(oldpokedex[a][1]) <= 7 then
str = "\t"
else
str = ""
end
local number1 = getStatistics(oldpokedex[a][1], true, false)
local number2 = getStatistics(oldpokedex[a][1], false, true)
base = base.."["..threeNumbers(a).."]\t"..oldpokedex[a][1].."\t"..str..""..number1.." / "..number2.."\n"
end
local arq = io.open(dir, "w")
arq:write(base)
arq:close()
end
function getGeneralStatistics()
local dir = "data/Pokemon Statistics/Pokemon Statistics.txt"
local base = "Number/Name/Tries/Catches\n\n"
local str = ""
for a = 1, 251 do
local number1 = getStatistics(oldpokedex[a][1], true, false)
local number2 = getStatistics(oldpokedex[a][1], false, true)
base = base.."["..threeNumbers(a).."] "..oldpokedex[a][1].." "..str..""..number1.." / "..number2.."\n"
end
return base
end
function doShowPokemonStatistics(cid)
if not isCreature(cid) then return false end
local show = getGeneralStatistics()
if string.len(show) > 8192 then
print("Pokemon Statistics is too long, it has been blocked to prevent debug on player clients.")
doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.")
return false
end
doShowTextDialog(cid, math.random(2391, 2394), show)
end

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685704
Compartilhar em outros sites

  • 0

O bug de catch.lua acontece aleatoriamente ou após executar alguma ação (por exemplo, jogar uma pokeball em determinado pokémon)? Afeta alguma coisa a jogabilidade?

Quanto ao erro de goback.lua, as mesmas perguntas: acontece de forma aleatória ou após o jogador realizar alguma ação (como retornar e/ou lançar o pokémon. Se for o caso, especifique sobre qual destes movimentos induzem ao bug).

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685705
Compartilhar em outros sites

  • 0
  Em 13/02/2016 em 01:10, zipter98 disse:

O bug de catch.lua acontece aleatoriamente ou após executar alguma ação (por exemplo, jogar uma pokeball em determinado pokémon)? Afeta alguma coisa a jogabilidade?

Quanto ao erro de goback.lua, as mesmas perguntas: acontece de forma aleatória ou após o jogador realizar alguma ação (como retornar e/ou lançar o pokémon. Se for o caso, especifique sobre qual destes movimentos induzem ao bug).

 

o erro aparesce no log nem tenho certeza (se for com tds as balls) mas pelo menos com a Dark Ball, em qualquer poke quando usa da esse erro, e o erro aparesce muito no log entao acho que debe ser com qualquer ball mesmo

acho que nao laga o servidor nao porem estou com esse outro aqui q ta lagando sim

 

[13/02/2016 01:20:44] [Error - TalkAction Interface]
[13/02/2016 01:20:44] data/talkactions/scripts/move1.lua:onSay
[13/02/2016 01:20:44] Description:
[13/02/2016 01:20:44] (luaAddEvent) Callback parameter should be a function.
[13/02/2016 01:20:44] [Error - TalkAction Interface]
[13/02/2016 01:20:44] data/talkactions/scripts/move1.lua:onSay
[13/02/2016 01:20:44] Description:
[13/02/2016 01:20:44] (luaAddEvent) Callback parameter should be a function.
move1.lua
  Mostrar conteúdo oculto
local msgs = {"use ", ""}
function doAlertReady(cid, id, movename, n, cd)
if not isCreature(cid) then return true end
local myball = getPlayerSlotItem(cid, 8)
if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!")
return true
end
local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
if not p or #p <= 0 then return true end
for a = 1, #p do
if getItemAttribute(p[a], cd) == "cd:"..id.."" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!")
return true
end
end
end
function onSay(cid, words, param, channel)
if param ~= "" then return true end
if string.len(words) > 3 then return true end
if #getCreatureSummons(cid) == 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.")
return 0
end
--alterado v1.5
local mypoke = getCreatureSummons(cid)[1]
if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end
if getCreatureName(mypoke) == "Evolution" then return true end
if getCreatureName(mypoke) == "Ditto" or getCreatureName(mypoke) == "Shiny Ditto" then
name = getPlayerStorageValue(mypoke, 1010) --edited
else
name = getCreatureName(mypoke)
end
--local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke)
local it = string.sub(words, 2, 3)
local idd = getPlayerSlotItem(cid, 8).uid
local move = getCreatureName(mypoke) == "Smeargle" and getItemAttribute(idd, "skt1") and movestable[getItemAttribute(idd, "skt1")].move1 or movestable[name].move1
if getPlayerStorageValue(mypoke, 212123) >= 1 then
cdzin = "cm_move"..it..""
else
cdzin = "move"..it.."" --alterado v1.5
end
if it == "2" then
if getItemAttribute(idd, "skt2") then
move = movestable[getItemAttribute(idd, "skt2")].move2
else
move = movestable[name].move2
end
elseif it == "3" then
if getItemAttribute(idd, "skt3") then
move = movestable[getItemAttribute(idd, "skt3")].move3
else
move = movestable[name].move3
end
elseif it == "4" then
if getItemAttribute(idd, "skt4") then
move = movestable[getItemAttribute(idd, "skt4")].move4
else
move = movestable[name].move4
end
elseif it == "4" then
if getItemAttribute(idd, "skt4") then
move = movestable[getItemAttribute(idd, "skt4")].move4
else
move = movestable[name].move4
end
elseif it == "5" then
if getItemAttribute(idd, "skt5") then
move = movestable[getItemAttribute(idd, "skt5")].move5
else
move = movestable[name].move5
end
elseif it == "6" then
if getItemAttribute(idd, "skt6") then
move = movestable[getItemAttribute(idd, "skt6")].move6
else
move = movestable[name].move6
end
elseif it == "7" then
if getItemAttribute(idd, "skt7") then
move = movestable[getItemAttribute(idd, "skt7")].move7
else
move = movestable[name].move7
end
elseif it == "8" then
if getItemAttribute(idd, "skt8") then
move = movestable[getItemAttribute(idd, "skt8")].move8
else
move = movestable[name].move8
end
elseif it == "9" then
move = movestable[name].move9
elseif it == "10" then
move = movestable[name].move10
elseif it == "11" then
move = movestable[name].move11
elseif it == "12" then
move = movestable[name].move12
elseif it == "13" then
move = movestable[name].move13
end
if not move then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.")
return true
end
if getPlayerLevel(cid) < move.level then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need be atleast level "..move.level.." to use this move.")
return true
end
if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use "..move.name.." again.")
return true
end
if getTileInfo(getThingPos(mypoke)).protection then
doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.")
return true
end
if getPlayerStorageValue(mypoke, 3894) >= 1 then
return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3
end
--alterado v1.6
if (move.name == "Team Slice" or move.name == "Team Claw") and #getCreatureSummons(cid) < 2 then
doPlayerSendCancel(cid, "Your pokemon need be in a team for use this move!")
return true
end
--alterado v1.7 \/\/\/
if isCreature(getCreatureTarget(cid)) and isInArray(specialabilities["evasion"], getCreatureName(getCreatureTarget(cid))) then
local target = getCreatureTarget(cid)
if math.random(1, 100) <= passivesChances["Evasion"][getCreatureName(target)] then
if isCreature(getMasterTarget(target)) then --alterado v1.6
doSendMagicEffect(getThingPos(target), 211)
doSendAnimatedText(getThingPos(target), "TOO BAD", 215)
doTeleportThing(target, getClosestFreeTile(target, getThingPos(mypoke)), false)
doSendMagicEffect(getThingPos(target), 211)
doFaceCreature(target, getThingPos(mypoke))
return true --alterado v1.6
end
end
end
if move.target == 1 then
if not isCreature(getCreatureTarget(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.")
return 0
end
if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then
return 0
end
if getCreatureHealth(getCreatureTarget(cid)) <= 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.")
return 0
end
if not isCreature(getCreatureSummons(cid)[1]) then
return true
end
if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.")
return 0
end
if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then
return 0
end
end
local newid = 0
if isSleeping(mypoke) or isSilence(mypoke) then --alterado v1.5
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't do that right now.")
return 0
else
newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd)
end
if getPlayerStorageValue(mypoke, 93828) > os.time() then
return doPlayerSendCancel(cid, "Your pokemon can't use moves right now.")
end
doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY)
local summons = getCreatureSummons(cid) --alterado v1.6
addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)
for i = 2, #summons do
if isCreature(summons) and getPlayerStorageValue(cid, 637501) >= 1 then
docastspell(summons, move.name) --alterado v1.6
end
end
docastspell(mypoke, move.name)
doCreatureAddCondition(cid, playerexhaust)
if useKpdoDlls then
doUpdateCooldowns(cid)
end
return 0
end

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685706
Compartilhar em outros sites

  • 0

Apenas para confirmarmos onde está a causa do erro, remova temporariamente a seguinte linha e veja se o erro continua:

addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)
Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685761
Compartilhar em outros sites

  • 0
  Em 13/02/2016 em 18:51, zipter98 disse:

 

Apenas para confirmarmos onde está a causa do erro, remova temporariamente a seguinte linha e veja se o erro continua:

addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)

 

effectivamente @zipter98 paresce que não esta dando + o erro no log, 10 mins on com 50 online no momento e nao saiu + o erro

mas esta dando aquele q achei que tinha resolvido

 

[13/02/2016 20:53:33] [Error - Action Interface]
[13/02/2016 20:53:33] In a timer event called from:
[13/02/2016 20:53:34] data/actions/scripts/goback.lua:onUse
[13/02/2016 20:53:34] Description:
[13/02/2016 20:53:34] (luaDoCreatureAddHealth) Creature not found
[13/02/2016 20:53:34] [Error - Action Interface]
[13/02/2016 20:53:34] In a timer event called from:
[13/02/2016 20:53:34] data/actions/scripts/goback.lua:onUse
[13/02/2016 20:53:34] Description:
[13/02/2016 20:53:34] (luaGetThingPosition) Thing not found
[13/02/2016 21:02:10] [Error - Action Interface]
[13/02/2016 21:02:10] In a timer event called from:
[13/02/2016 21:02:10] data/actions/scripts/goback.lua:onUse
[13/02/2016 21:02:10] Description:
[13/02/2016 21:02:10] (luaDoCreatureSetSkullType) Creature not found

 

 

edit: 1h e media despois, 90 on

[13/02/2016 22:13:51] [Error - TalkAction Interface]
[13/02/2016 22:13:51] data/talkactions/scripts/move1.lua:onSay
[13/02/2016 22:13:51] Description:
[13/02/2016 22:13:51] (luaAddEvent) Callback parameter should be a function.
[13/02/2016 22:13:51] [Error - TalkAction Interface]
[13/02/2016 22:13:51] data/talkactions/scripts/move1.lua:onSay
[13/02/2016 22:13:51] Description:
[13/02/2016 22:13:51] (luaAddEvent) Callback parameter should be a function.
  Em 13/02/2016 em 18:51, zipter98 disse:

 

Apenas para confirmarmos onde está a causa do erro, remova temporariamente a seguinte linha e veja se o erro continua:

addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)

 

teria como me dar 1 ajuda aki

modifiquei o script order do lib pra tirar 1 bug enquanto fly com scyther, que se voce da fly e dpois usa shedder team, e sober ira travar o servidor com um erro... consegui fazer o script nao deixar fazer isso mas ta dando 1 erro no log e ainda ta bem lagado pelos outros :|

 

order do lib:

 

  Mostrar conteúdo oculto

bug:
[14/02/2016 03:04:59] [Error - Action Interface] 
[14/02/2016 03:04:59] In a timer event called from: 
[14/02/2016 03:04:59] data/actions/scripts/order.lua:onUse
[14/02/2016 03:05:00] Description: 
[14/02/2016 03:05:00] (luaGetCreatureMaster) Creature not found

[14/02/2016 03:05:00] [Error - Action Interface] 
[14/02/2016 03:05:00] In a timer event called from: 
[14/02/2016 03:05:00] data/actions/scripts/order.lua:onUse
[14/02/2016 03:05:01] Description: 
[14/02/2016 03:05:01] (luaGetCreatureStorage) Creature not found

[14/02/2016 03:05:01] [Error - Action Interface] 
[14/02/2016 03:05:01] In a timer event called from: 
[14/02/2016 03:05:01] data/actions/scripts/order.lua:onUse
[14/02/2016 03:05:01] Description: 
[14/02/2016 03:05:02] data/lib/order.lua:342: attempt to compare number with boolean
[14/02/2016 03:05:02] stack traceback:
[14/02/2016 03:05:02] 	data/lib/order.lua:342: in function <data/lib/order.lua:341>
Editado por josegvb
Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685777
Compartilhar em outros sites

  • 0

Acima de:

if getPlayerStorageValue(getCreatureMaster(sid), 637500) >= 1 or getPlayerStorageValue(getCreatureMaster(sid), 637501) >= 1 then

coloque:

if not isCreature(sid) or not isCreature(getCreatureMaster(sid)) then return true end

Darei uma olhada no erro de go/back logo. Quanto ao move1.lua, suponho que o problema esteja localizado em pokemon moves.lua (lib) ou na função doUpdateCooldowns. Infelizmente, o relatório de bugs da distro é muito vago em casos como esse, tornando o encontro do erro muito difícil.

Ah, como a remoção daquela linha não resolveu o problema, já pode colocá-la de volta.

Editado por zipter98
Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685899
Compartilhar em outros sites

  • 0
  Em 14/02/2016 em 21:42, zipter98 disse:

Acima de:

if getPlayerStorageValue(getCreatureMaster(sid), 637500) >= 1 or getPlayerStorageValue(getCreatureMaster(sid), 637501) >= 1 then

coloque:

if not isCreature(sid) or not isCreature(getCreatureMaster(sid)) then return true end

Darei uma olhada no erro de go/back logo. Quanto ao move1.lua, suponho que o problema esteja localizado em pokemon moves.lua (lib) ou na função doUpdateCooldowns. Infelizmente, o relatório de bugs da distro é muito vago em casos como esse, tornando o encontro do erro muito difícil.

Ah, como a remoção daquela linha não resolveu o problema, já pode colocá-la de volta.

 

:D paresce q deu certo, nem esta dando + erro, pelo menos esse de order no log

Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1685918
Compartilhar em outros sites

  • 0
  Em 14/02/2016 em 21:42, zipter98 disse:

Acima de:

if getPlayerStorageValue(getCreatureMaster(sid), 637500) >= 1 or getPlayerStorageValue(getCreatureMaster(sid), 637501) >= 1 then

coloque:

if not isCreature(sid) or not isCreature(getCreatureMaster(sid)) then return true end

Darei uma olhada no erro de go/back logo. Quanto ao move1.lua, suponho que o problema esteja localizado em pokemon moves.lua (lib) ou na função doUpdateCooldowns. Infelizmente, o relatório de bugs da distro é muito vago em casos como esse, tornando o encontro do erro muito difícil.

Ah, como a remoção daquela linha não resolveu o problema, já pode colocá-la de volta.

 

@[member=zipter98], esperando muito isso ^^ tem algum jeito de ver o log pelos crash? (O Servidor parou de funcionar!)

ultimamente esta dando muitos crash e não tem como eu ver oque faz o servidor crashar :/ ou pelo menos nem sei o porque

Olá, estou tendo alguns novos bugs no servidor, e são muito estranhos irei explicar:

 

o primer bug é o siguente... quando alguem tiver MUITOS ITEMS encima (acho q é só a grana pois tudo mundo tem milhoes de grana) o servidor começa a travar, mas trava toda vez que ele COLOCA o seu pokemon, quando tira nao acontece nada, mas quando coloca denovo ai o servidor da uma travada de uns 4 segundos... ja tentei colocar um sistema de "depositall" porem quando tiram a grana de la, ela se buga e se torna em tipo 225 TD e assim... mas só quando tiver muito...

 

e o segundo bug é o siguente... apos algumas horas de o server ficar ON, nem sei pq o catch se torna bugado... começa a dar muito bug no log, fiz burrice e nao salvei o erro irei pegar quando bugar denovo... mas esse bug tem 2 maneiras diferentes de fazer merda, a primeira você taca MB ou UB qualquer ball em qualquer poke, e mesmo que você der catch você nao ira pegar ele, ele simplemente nao aparesce.... e a segunda é quando você taca ball no pokemon morto a ball faz o seu "effeito" mas o corpo n some, e nem aparesce nemhum msg da ball, ai nao da pra tacar mais balls...

 

 

esses bugs sao muitos estranhos e nem faço idea de como resolver... talves ja aconteceu alguma vez pra voce? @@zipter98,

 

Editado por josegvb
Link para o comentário
https://xtibia.com/forum/topic/239375-erros-pda/#findComment-1686346
Compartilhar em outros sites

×
×
  • Criar Novo...