Ir para conteúdo
  • Cadastre-se

Suporte estou com 2 bugs que estão travando o game


Posts Recomendados

.Qual servidor ou website você utiliza como base? 

 

Qual o motivo deste tópico? 

 

Está surgindo algum erro? Se sim coloque-o aqui. 

Citar

2bugs causando (lags(travamentos)) vou mostrar nas fotos

 

Você tem o código disponível? Se tiver publique-o aqui: 

 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

erro 2.png

error.png

Link para o post
Compartilhar em outros sites

Goback:

Spoiler

local EFFECTS = {
    --[OutfitID] = {Effect}
    ["Magmar"] = 35,   
    ["Jynx"] = 17,          --alterado v1.5
    ["Shiny Jynx"] = 17, 
    ["Piloswine"] = 205,  --alterado v1.8
    ["Swinub"] = 205,   
}

function onUse(cid, item, frompos, item2, topos)

    if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

    if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 
        or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1  then    --alterado v1.9 <<
        return false                                                                                                                        
    end

    local ballName = getItemAttribute(item.uid, "poke")
    local btype = getPokeballType(item.itemid)
    local usando = pokeballs[btype].use

    local effect = pokeballs[btype].effect
    if not effect then
        effect = 21
    end
        
    unLock(item.uid) --alterado v1.8

    if item.itemid == usando then                           
        if getPlayerStorageValue(cid, 990) == 1 then -- GYM
            doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")
            return true
        end
        if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v1.6
            if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then  
                BackTeam(cid)       
            end
        end   
        if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
            doPlayerSendCancel(cid, "You can't do that while is controling a mind")
            return true     --alterado v1.5
        end
        if #getCreatureSummons(cid) <= 0 then
            if isInArray(pokeballs[btype].all, item.itemid) then
                doTransformItem(item.uid, pokeballs[btype].off)
                doItemSetAttribute(item.uid, "hp", 0)
                doPlayerSendCancel(cid, "This pokemon is fainted.")
                return true
            end
        end

        local cd = getCD(item.uid, "blink", 30)
        if cd > 0 then
           setCD(item.uid, "blink", 0)
        end
        
        local z = getCreatureSummons(cid)[1]

        if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
           return true
        end
        doReturnPokemon(cid, z, item, effect)

    elseif item.itemid == pokeballs[btype].on then

        if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
            doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
            return true
        end

        local thishp = getItemAttribute(item.uid, "hp")

        if getItemAttribute(item.uid, "hp") == 0 then
            if isInArray(pokeballs[btype].all, item.itemid) then
                doTransformItem(item.uid, pokeballs[btype].off)
                doItemSetAttribute(item.uid, "hp", 0)
                doPlayerSendCancel(cid, "This pokemon is fainted.")
                return true
            end
        end

        local pokemon = getItemAttribute(item.uid, "poke")

        if not pokes[pokemon] then
            return true
        end

        local x = pokes[pokemon]
        local boost = getItemAttribute(item.uid, "boost") or 0

        if getPlayerLevel(cid) < (x.level) then
           doPlayerSendCancel(cid, "You need level "..(x.level).." to use this pokemon.")
           return true
        end
        
        local pk = getCreatureSummons(cid)[1]
        
        doSummonMonster(cid, pokemon)
        doItemSetAttribute(item.uid, "pokeballusada", 0)

        local pk = getCreatureSummons(cid)[1]
        if not isCreature(pk) then return true end
        

        if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited
            local left = getItemAttribute(item.uid, "transLeft")
            local name = getItemAttribute(item.uid, "transName")

            if left and left > 0 then
                setPlayerStorageValue(pk, 1010, name)
                doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
                addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
                doItemSetAttribute(item.uid, "transBegin", os.clock())
            else
                setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto")     --edited
            end
        end

        if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

        doCreatureSetLookDir(pk, 2)
        doCreatureSetNick(pk, nick)    
        
        adjustStatus(pk, item.uid, true, true, true)
        doAddPokemonInOwnList(cid, pokemon)

        doTransformItem(item.uid, item.itemid+1)
        

        local pokename = getPokeName(pk) --alterado v1.7 

        if getPlayerLanguage(cid) == 2 then
            local mgoen = gobackmsgsen[math.random(1, #gobackmsgsen)].go:gsub("doka", pokename)
            doCreatureSay(cid, mgoen, 19)
        elseif getPlayerLanguage(cid) == 0 then
            local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
            doCreatureSay(cid, mgo, 19)
        elseif getPlayerLanguage(cid) == 1 then
            local mgoes = gobackmsgses[math.random(1, #gobackmsgses)].go:gsub("doka", pokename)
            doCreatureSay(cid, mgoes, 19)
        end
    
        doSendMagicEffect(getCreaturePosition(pk), effect)
        
        if useOTClient then
           doPlayerSendCancel(cid, '12//,show') --alterado v1.7
        end
        
        -- ADDON SYSTEM
        local pk = getCreatureSummons(cid)[1]
        local pb = getPlayerSlotItem(cid, 8).uid
        local look = getAddonValue(pb, "addon")

        if look > 0 then
            doSetCreatureOutfit(pk, {lookType = look}, -1)
        end
    else
        doPlayerSendCancel(cid, "Seu pokémon está desmaiado.")
    end
    
    if useKpdoDlls then
        doUpdateMoves(cid)
        doUpdatePokemonsBar(cid)
        end
    return true
end

 

Move1:

 

Spoiler

local msgs = {"use ", ""}

function doAlertReady(cid, id, movename, n, cd)
    if not isCreature(cid) then return true end
    local myball = getPlayerSlotItem(cid, ?
    if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then
    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
        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, 26, "Você precisa de um pokémon para usar 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 move = 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
        move = movestable[name].move2
    elseif it == "3" then
        move = movestable[name].move3
    elseif it == "4" then
        move = movestable[name].move4
    elseif it == "5" then
        move = movestable[name].move5
    elseif it == "6" then
        move = movestable[name].move6
    elseif it == "7" then
        move = movestable[name].move7
    elseif it == "8" then
        move = movestable[name].move8
    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, 26, "Seu pokémon não reconhece esse move.")
    return true
    end
    
    if getPlayerLevel(cid) < move.level then
       doPlayerSendTextMessage(cid, 26, "Você precisa ser level "..move.level.." para usar este 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, 26, "Você tem que esperar "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." segundos para usar "..move.name.." novamente.")
    return true
    end

    if getTileInfo(getThingPos(mypoke)).protection then
        doPlayerSendCancel(cid, "Você não atacar em PZ.")
    return true
    end
                                      --alterado v1.6                  
    if (move.name == "Team Slice" or move.name == "Team Claw") and #getCreatureSummons(cid) < 2 then       
        doPlayerSendCancel(cid, "Os seus pokemon precisa estar em uma equipe para usar este move!")
    return true
    end
                                                                     --alterado v1.7 \/\/\/


if move.target == 1 then

    if not isCreature(getCreatureTarget(cid)) then
    doPlayerSendTextMessage(cid, 26, "Você não tem um alvo.")
    return 0
    end

    if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then
    return 0
    end

    if getCreatureHealth(getCreatureTarget(cid)) <= 0 then
    doPlayerSendTextMessage(cid, 26, "Você já derrotou o seu alvo.")
    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, "Aproxime-se o alvo de usar este 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_ORANGE, "Sorry you can't do that right now.")
            return 0
        else
            newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd)
        end
        
    --doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", 19)
    
    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[i]) and getPlayerStorageValue(cid, 637501) >= 1 then
          docastspell(summons[i], move.name)        --alterado v1.6
       end
    end 

    docastspell(mypoke, move.name)

    if useKpdoDlls then
        doUpdateCooldowns(cid)
    end

return 0
end

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por braianlomas
      Como faço para corrigir esse problema para meu cliente, eu uso o tfs 0.3.6  
      Quero resolver esse problema que tenho no meu cliente, como e onde posso resolver?  
      Eu uso o tfs 0.3.6, não tenho as fontes do cliente, se você puder me dar eu vou amá-las para sempre  
       

       
    • Por A.Mokk
      Ola pessoal, estou tentando compilar o TFS 1.5 Downgrade para 8.60 atraves do MSVC 2022, ao tentar compilar da o seguinte erro:
       
       
      Fiz o download do MSVC, GitDash, TFS-SDK-3.2, e de varios boosts que tentei, ao fazer o seguinte procedimento no GitDash:
       
      Ao chegar em ./bootstrap-vcpkg.bat o GitDash nao consegue realizar o procedimento corretamente, alguem poderia me ajudar ?

      Tentei de diversas formas mas o mesmo erro sempre persiste, atualmente meu servidor utiliza TFS 0.4, consigo compilar sem nenhum problema no MSVC 2010, porem, as limitações do TFS 0.4 estão me fazendo precisar atualizar, se alguem souber como corrigir esses erros eu agradeço !

      Tutoriais utilizados :
      Compiling on Windows (vcpkg) · otland/forgottenserver Wiki · GitHub
      Compiling on Windows · otland/forgottenserver Wiki · GitHub
      Compilando TFS 1.3 com vídeo-aula - Tutoriais Infraestrutura & Proteção - Tibia King - Tudo sobre Tibia, OTServ e Bots!
      Compilar TFS 1.3 Vcpkg - Tutoriais Infraestrutura & Proteção - Tibia King - Tudo sobre Tibia, OTServ e Bots!
       
      O que acontece no Powershell:
       
    • Por thunmin
      .Qual servidor ou website você utiliza como base? 
      Canary 2.3.6
      Qual o motivo deste tópico? 
      Queria fazer com que os players não pudessem mexer no aleta sio, pois, agora os mesmos estão conseguindo mexer nos itens
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
      Você tem o código disponível? Se tiver publique-o aqui: 
         
      Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
       
    • Por thunmin
      .Qual servidor ou website você utiliza como base? 
      canary para o cliente 13.16
      Qual o motivo deste tópico? 
      Não consigo encontrar onde ajusta
      to com o problema no 13.16  o exausted, por exemplo os kinas era pra combar exori, erori gran e exori min, porém não ta indo ta dando exausted o char ta soltando magia ou runa e não consegue usar as potions
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
      Você tem o código disponível? Se tiver publique-o aqui: 
         
      Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
       
    • Por Andersontatuador
      Olá galera da TK, me chamo Anderson estou procurando alguém profissional em otservs e site.
      Já tenho um servidor o site e o cliente preciso só de uma pessoal competente, que esteja empenhado a trabalhar,
      não quero nada de graça, pois nessa onda fui mais roubado do quer eu pagar um profissional.
      caso alguém se interesse entrar em contato comigo através do whatsapp
      82 9 9304-9462
       
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
      Você tem o código disponível? Se tiver publique-o aqui: 
         
      Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo