Ir para conteúdo
  • Cadastre-se

Problema nas Skills que está fazendo lagar o server todo!


Posts Recomendados

[27/12/2020 19:53:00] [Error - TalkAction Interface] 
[27/12/2020 19:53:00] In a timer event called from: 
[27/12/2020 19:53:00] data/talkactions/scripts/move1.lua:onSay
[27/12/2020 19:53:00] Description: 
[27/12/2020 19:53:00] (luaGetThingFromPos) Tile not found

 

Queria uma solução pra isso, por favor, está lagando muito o server.

 

SCRIPT:

 

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
        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 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, 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
        
    doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_ORANGE_1)
    
    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)
    doCreatureAddCondition(cid, playerexhaust)

    if useKpdoDlls then
        doUpdateCooldowns(cid)
    end

return 0
end

Editado por Igor Suzuki (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Este tópico foi movido para a seção de Suporte Otserv Alternativo

 

 

 

 

 

                                                                                                                                                     tumblr_nwmv2z4VEM1ujiquxo1_100.gif.2db64bb36f0f565e68ff2a90cb98f439.gif.59f4c4cf234d2f6906621cac0553a862.gif

https://github.com/italoxxx1

 

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 Gabriel CM
      No tibia 8.6 é possivel editar o dat do tibia para que ao clicar no mapa o boneco passe por cima de fire field, etc. (https://tibialife.forumeiros.com/t20-seu-tibiabotng-nao-passa-em-cima-de-posion-fire-entre-aqui)

      tem como fazer isso em client 13+?
    • Por Kazuya9629
      LINK
      https://br.ccm.net/download/baixaki-409-adobe-air
       
      Scaner
      https://www.virustotal.com/gui/file/6718308e10a45176155d0ecc8458bd3606308925b91f26a7d08c148cf52c9db3?nocache=1
       
      Diretorio
      AdobeAIRInstaller-32.0.exe
    • Por Savidotti
      local object_itemid = { [16487] = {transform_to = 16488, premium = true, useWith=true}, [16488] = {transform_to = 16487, premium = true, useWith=false}, [16490] = {transform_to = 16491, premium = true, useWith=true}, [16491] = {transform_to = 16490, premium = true, useWith=false}, [16493] = {transform_to = 16494, premium = true, useWith=true}, [16494] = {transform_to = 16493, premium = true, useWith=false}, [16496] = {transform_to = 16497, premium = true, useWith=true}, [16497] = {transform_to = 16496, premium = true, useWith=false}, [16499] = {transform_to = 16500, premium = true, useWith=true}, [16500] = {transform_to = 16499, premium = true, useWith=false}, [16502] = {transform_to = 16503, premium = true, useWith=true}, [16503] = {transform_to = 16502, premium = true, useWith=false}, [16505] = {transform_to = 16506, premium = true, useWith=true}, [16506] = {transform_to = 16505, premium = true, useWith=false}, [16508] = {transform_to = 16509, premium = true, useWith=true}, [16509] = {transform_to = 16508, premium = true, useWith=false}, [16511] = {transform_to = 16512, premium = true, useWith=true}, [16512] = {transform_to = 16511, premium = true, useWith=false}, [16514] = {transform_to = 16515, premium = true, useWith=true}, [16515] = {transform_to = 16514, premium = true, useWith=false}, [16517] = {transform_to = 16518, premium = true, useWith=true}, [16518] = {transform_to = 16517, premium = true, useWith=false}, [16520] = {transform_to = 16521, premium = true, useWith=true}, [16521] = {transform_to = 16520, premium = true, useWith=false}, [16523] = {transform_to = 16524, premium = true, useWith=true}, [16524] = {transform_to = 16523, premium = true, useWith=false}, [16526] = {transform_to = 16527, premium = true, useWith=true}, [16527] = {transform_to = 16526, premium = true, useWith=false}, [16529] = {transform_to = 16530, premium = true, useWith=true}, [16530] = {transform_to = 16529, premium = true, useWith=false}, [16532] = {transform_to = 16533, premium = true, useWith=true}, [16533] = {transform_to = 16532, premium = true, useWith=false}, [16535] = {transform_to = 16536, premium = true, useWith=true}, [16536] = {transform_to = 16535, premium = true, useWith=false}, [16538] = {transform_to = 16539, premium = true, useWith=true}, [16539] = {transform_to = 16538, premium = true, useWith=false}, [16541] = {transform_to = 16542, premium = true, useWith=true}, [16542] = {transform_to = 16541, premium = true, useWith=false}, [16163] = {transform_to = 16164, premium = true, useWith=true}, [16164] = {transform_to = 16163, premium = true, useWith=false}, [16165] = {transform_to = 16166, premium = true, useWith=true}, [16166] = {transform_to = 16165, premium = true, useWith=false}, [16167] = {transform_to = 16168, premium = true, useWith=true}, [16168] = {transform_to = 16167, premium = true, useWith=false}, [16169] = {transform_to = 16170, premium = true, useWith=true}, [16170] = {transform_to = 16169, premium = true, useWith=false}, [16171] = {transform_to = 16172, premium = true, useWith=true}, [16172] = {transform_to = 16171, premium = true, useWith=false}, [16173] = {transform_to = 16174, premium = true, useWith=true}, [16174] = {transform_to = 16173, premium = true, useWith=false}, [16185] = {transform_to = 16186, premium = true, useWith=true}, [16186] = {transform_to = 16185, premium = true, useWith=false}, [16187] = {transform_to = 16188, premium = true, useWith=true}, [16188] = {transform_to = 16187, premium = true, useWith=false}, [16189] = {transform_to = 16190, premium = true, useWith=true}, [16190] = {transform_to = 16189, premium = true, useWith=false}, [16191] = {transform_to = 16192, premium = true, useWith=true}, [16192] = {transform_to = 16191, premium = true, useWith=false}, [16455] = {transform_to = 16456, premium = true, useWith=true}, [16456] = {transform_to = 16455, premium = true, useWith=false}, [16457] = {transform_to = 16458, premium = true, useWith=true}, [16458] = {transform_to = 16457, premium = true, useWith=false}, [16461] = {transform_to = 16462, premium = true, useWith=true}, [16462] = {transform_to = 16461, premium = true, useWith=false}, } function onUse(cid, item, frompos, item2, topos) local storage = 789561 local time = 1 local sendEffect = true -- true or false local EffectId = 1 local item_from_table = object_itemid[item.itemid] if exhaustion.check(cid, storage) then return false end if item_from_table then if getPlayerGroupId(cid) == 1 then if item_from_table.premium and not isPremium(cid) then return true and doPlayerSendCancel(cid, "Voce nao e vip.") end end doRemoveItem(item.uid,1) if item_from_table.useWith then doCreateItem(item_from_table.transform_to,1,topos) else doCreateItem(item_from_table.transform_to,1,frompos) end if sendEffect then doSendMagicEffect(getThingPos(cid), EffectId) end end return true and exhaustion.set(cid,storage,time) end Este é o Script, o que ocorre é que sempre que reinicia o servidor os carpets somem, pelo que percebi quando o carpet é colocado no piso esta acontecendo como se fosse uma alteração de mapa e não como decoração sobre o piso atual.. e por isso quando reinicia o servidor eles somem.. como qualquer outra alteração de mapa com jogo online.. por favor alguém pode ajudar?

    • Por Darkwonn
      Estou editando a base ZRing, porém me deparei com um erro quando dois ou mais players estão na mesma localidade, em muitos testes já percebemos que é um erro meio aleatório, porém na maioria das vezes acontece quando começam a se movimentar. Este é o único erro apresentado no Terminal do Cliente. A distro está limpa.
       
      Estou disposto a pagar pela solução. Entrar em contato pelo tópico ou via Discord 
      Arkain#7143

    • Por Imperius
      Tinha visto isso no servidor do MegaTibia / Kaldrox e achei bem interessante.
       
      Todos os tópicos que encontrei sobre o assunto de alterar a cor das mensagens dos GMs, CMs e ADM no channel Help para vermelho, falavam que tinham que fazer uma configuração na própria source do servidor.
       
      Fiz uma gambiarra que funciona, sem a necessidade de mexer na source do servidor e de utilizar comandos para isso. Testei somente em TFS 0.4 e funciona tranquilamente.
       
      segue abaixo como configurar em seu otserver:
       
      data > talkactions > scripts > crie um arquivo chamado gmsayred.lua e cole o código abaixo:
       
      function onSay(cid, words, param, channel) if channel == CHANNEL_HELP then for _, pid in ipairs(getPlayersOnline()) do doPlayerSendChannelMessage(pid, '', "".. getCreatureName(cid) .. ": ".. words, TALKTYPE_CHANNEL_R1, CHANNEL_HELP) end return true end end  
      em talkactions.xml cole a tag abaixo:

       
      <!-- Gamemasters --> <talkaction default="yes" filter="quotation" logged="no" access="3" event="script" value="gmsayred.lua"/>    
      e pronto! Agora é só enviar alguma mensagem no Help que a mensagem ficará em vermelho.
       

       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo