Ir para conteúdo
  • Cadastre-se

Posts Recomendados

fala ae glr, eu uso a base pokexcyan(PDA ) e gostaria de colocar a dex mostrando quando um pokemon foi capturado com uma simples bolinha do lado no nome 

e se possivel adicionar na pokedex no final da descriçaõ  , uma parte em que mostrasse o loot do pokemon .

 

 

segue minha  pokedex.lua.

Spoiler

local function checkDex(cid)
    local unlock = 0
        for i = 1, #oldpokedex do
                if getPlayerInfoAboutPokemon(cid, oldpokedex[1]).dex then
                       unlock = unlock + 1
                end
        end
    return unlock
end

local rate = 50
local rewards = {
    [10] = {{11638, 1}},
    [25] = {{11638, 1}},
    [50] = {{11639, 1}},
    [75] = {{11639, 1}},
    [100] = {{11640, 1}},
    [125] = {{11640, 1}},
    [150] = {{11641, 1}},
    [175] = {{11641, 1}},
    [270] = {{12339, 1}},
}
local sto = 63999

function onUse(cid, item, fromPos, item2, toPos)
     
    if not isCreature(item2.uid) then
        return true
    end
    
    local poke = getCreatureName(item2.uid)
    
        if isMonster(item2.uid) then
               local this = newpokedex[getCreatureName(item2.uid)]
               local myball = 0
               if isSummon(item2.uid) then
                      myball = getPlayerSlotItem(getCreatureMaster(item2.uid), ?
               end
               if not getPlayerInfoAboutPokemon(cid, poke).dex then
                      local exp = this.level * rate
                      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked ".. getCreatureName(item2.uid).." in your pokedex!")
                      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained "..exp.." experience points.")
                      doSendMagicEffect(getThingPos(cid), 210)
                      doPlayerAddExperience(cid, exp)
                      doAddPokemonInDexList(cid, poke)
               else
                      doShowPokedexRegistration(cid, item2, myball)
               end
               local list = checkDex(cid)
               local r = rewards
        
        
               if r and getPlayerStorageValue(cid, sto) < list then
                   for _, TABLE in ipairs(r) do
                         doPlayerAddItem(cid, TABLE[1], TABLE[2])
                       sendMsgToPlayer(cid, 27, "Voce ganhou "..TABLE[2].." ".. getItemNameById(TABLE[1]).."!")
                      end
                      setPlayerStorageValue(cid, sto, list)
            
               end
            return true
        end
    
    if not isPlayer(item2.uid) then return true end
    
        local kanto = 0
        local johto = 0
        local hoen = 0
        local sinoh = 0
                                        --alterado v1.7 \/\/
        for i = 1, #oldpokedex do
                if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[1]).dex then
                       if i <= 151 then
                              kanto = kanto+1
                       elseif i <= 251 then
                              johto = johto+1
                       elseif i <= 386 then
                                hoen = hoen+1
                       elseif i <= 494 then
                                sinoh = sinoh+1
                       end
                end
        end                                                      --alterado v1.6
    
        local player = getRecorderPlayer(toPos, cid)
    
        if cid == player then
                doPlayerSendTextMessage(cid, 27, "You has unlocked "..kanto.." kanto's and "..johto.." johto's and "..hoen.." hoen's and "..sinoh.." sinoh's pokémons until now.") 
                doPlayerSetVocation(cid, 9) --alterado v1.6
                openChannelDialog(cid)
        end
    
    return true
end

 

 

 

pokedex system.lua

Spoiler

local skills = specialabilities                                  

function doAddPokemonInDexList(cid, poke)
        if getPlayerInfoAboutPokemon(cid, poke).dex then return true end
            local a = newpokedex[poke]                                              
            local b = getPlayerStorageValue(cid, a.storage)
            setPlayerStorageValue(cid, a.storage, b.." dex,")
end

function getPokemonEvolutionDescription(name, next)
            local kev = poevo[name]
            local stt = {}
            if isInArray(specialevo, name) then
                       if name == "Poliwhirl" then
                                  if next then
                                             return "\nPoliwrath or Politoed, requires level 60."
                                  end   
                                  table.insert(stt, "Evolve Stone: Water Stone and Punch Stone or Water Stone and Earth Stone\n\n")
                                  table.insert(stt, "Evolutions:\nPoliwrath, requires level 60.\nPolitoed, requires level 60.")
                       elseif name == "Gloom" then
                                  if next then
                                             return "\nVileplume or Bellossom, requires level 50."
                                  end
                                  table.insert(stt, "Evolve Stone: 2 Leaf Stone or Leaf Stone and Venom Stone\n\n")
                                  table.insert(stt, "Evolutions:\nVileplume, requires level 50.\nBellossom, requires level 50.")
                          elseif name == "Nincada" then
                                  if next then
                                             return "\nNinjask or Shedinja, requires level 80."
                                  end
                                  table.insert(stt, "Evolve Stone: 2 Coccon Stone or Coccon Stone and Darkness Stone\n\n")
                                  table.insert(stt, "Evolutions:\nNinjask, requires level 80.\nShedinja, requires level 60.")
                       elseif name == "Slowpoke" then
                                  if next then
                                             return "\nSlowbro, requires level 50.\nSlowking, requires level 100."
                                  end
                                  table.insert(stt, "Evolve Stone: Enigma Stone or Ancient Stone\n\n")
                                  table.insert(stt, "Evolutions:\nSlowbro, requires level 50.\nSlowking, requires level 100.")
                       elseif name == "Eevee" then
                                  if next then
                                             return "\nVaporeon, requires level 60.\nJolteon, requires level 60.\nFlareon, requires level 60.\nUmbreon, requires level 60.\nEspeon, requires level 60.\nSylveon, requires level 100."
                                  end
                                  table.insert(stt, "Evolve Stone: Water Stone or Thunder Stone or Fire Stone or Darkness Stone or Enigma Stone or Shiny Stone\n\n")
                                  table.insert(stt, "Evolutions:\nVaporeon, requires level 60.\nJolteon, requires level 60.\nFlareon, requires level 60.\nUmbreon, requires level 60.\nEspeon, requires level 60.\nSylveon, requires level 100.")
                       elseif name == "Tyrogue" then
                                  if next then
                                             return "\nHitmonlee, requires level 60.\nHitmonchan, requires level 60.\nHitmontop, requires level 60."
                                  end
                                  table.insert(stt, "Evolve Stone: Punch Stone\n\n")   
                                  table.insert(stt, "Evolutions:\nHitmonlee, requires level 60.\nHitmonchan, requires level 60.\nHitmontop, requires level 60.")
                       end
            elseif kev then
                       if next then
                                  table.insert(stt, "\n"..kev.evolution..", requires level "..kev.level..".")
                                  return table.concat(stt)
                       end
                       local id = tonumber(kev.stoneid)
                       local id2 = tonumber(kev.stoneid2)
                       local stone = ""
                       if tonumber(kev.count) == 2 then
                                  stone = doConvertStoneIdToString(id).." (2x)"
                       else
                                  stone = id2 == 0 and doConvertStoneIdToString(id) or doConvertStoneIdToString(id).." and "..doConvertStoneIdToString(id2)
                       end
                       table.insert(stt, "Evolve Stone: "..stone.."\n\n")
                       table.insert(stt, "Evolutions:\n"..kev.evolution..", requeris level "..kev.level..".")
                       table.insert(stt, getPokemonEvolutionDescription(kev.evolution, true))
            else
                        if not next then
                                   table.insert(stt, "Evolutions:\nIt doen't evolve.")
                        end
            end   
        return table.concat(stt)
end

local function getMoveDexDescr(cid, name, number)
        local x = movestable[name]
        if not x then return "" end
         
        local z = "\n"
        local tables = {x.move1, x.move2, x.move3, x.move4, x.move5, x.move6, x.move7, x.move8, x.move9, x.move10, x.move11, x.move12}
        local y = tables[number]
        if not y then return "" end
         
        if not movesinfo[y.name] then
                print(""..y.name.." faltando")
                return "unknown error"
        end
        local txt = ""..z.." "..y.name.." (move "..number.."):\n Type: "..movesinfo[y.name].t.."\n #Cooldown: "..y.cd.." seconds.\n"
        return txt
end
                                                                                                                                 --alterado v1.8
local skillcheck = {"fly", "ride", "surf", "teleport", "rock smash", "cut", "dig", "light", "blink", "control mind", "transform", "levitate_fly"}
local passivas = {
        ["Shock Counter"] = {"Elekid", "Raikou", tpw = "electric"},
        ["Lava-Counter"] = {"Magby", "Entei", tpw = "fire"},
        ["Flame Bloody"] = {"Magmar", "Magmortar", "Chandelure", "Shiny Magmar", tpw = "fire"},
        ["Counter Helix"] = {"Scyther", "Shiny Scyther", tpw = "bug"},
        ["Giroball"] = {"Pineco", "Forretress", tpw = "steel"},
        ["Sturdy"] = {"Sudowoodo", "Aggron", tpw = "rock"},
        ["Counter Claw"] = {"Scizor", tpw = "bug"},
        ["Poison Reaction"] = {"Shiny Vileplume", tpw = "poison"},
        ["Prankster"] = {"Sableye", tpw = "ghost"},
        ["Static-Magnet"] = {"Electabuzz", "Shiny Electrode", "Shiny Electabuzz", tpw = "electric"},
        ["Counter Spin"] = {"Hitmontop", "Shiny Hitmontop", tpw = "fighting"},
        ["Demon Kicker"] = {"Hitmonlee", "Shiny Hitmonlee", "Gardestriker Shiny Hitmonlee", tpw = "fighting"},
        ["Demon Puncher"] = {"Hitmonchan", "Shiny Hitmonchan", "Gardestriker Shiny Hitmonchan", tpw = "unknow"},               --alterado v1.6
        ["Stunning Confusion"] = {"Psyduck", "Golduck", "Wobbuffet", tpw = "psychic"},
        ["Groundshock"] = {"Kangaskhan", tpw = "normal"},
        ["Electric Charge"] = {"Pikachu", "Raichu", "Shiny Raichu", tpw = "electric"},
        ["Melody"] = {"Wigglytuff", tpw = "normal"},
        ["Truant"] = {"Slaking", tpw = "normal"},
        ["Hyper Cutter"] = {"Gliscor", tpw = "flying"},
        ["Dragon Rage"] = {"Dratini", "Dragonair", "Dragonite", "Gyarados", "Shiny Gyarados", "Shiny Dratini", "Shiny Dragonair", "Shiny Dragonite", tpw = "dragon"},
        ["Fury"] = {"Persian", "Raticate", "Shiny Raticate", tpw = "normal"},
        ["Mega Drain"] = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Vileplume", "Shiny Tangela", tpw = "grass"},
        ["Spores Reaction"] = {"Oddish", "Gloom", "Tangrowth", "Vileplume", "Shiny Vileplume", tpw = "grass"},
        ["Amnesia"] = {"Wooper", "Quagsire", "Swinub", "Piloswine", tpw = "psychic"},
        ["Zen Mind"] = {"Slowking", tpw = "psychic"},
        ["Shed Skin"] = {"Seviper", tpw = "normal"}, 
        ["Magnet Rise"] = {"Electivire", "Pachirisu", "Magnezone", tpw = "electric"}, 
        ["Solid Rock"] = {"Rhyperior", "Camerupt", tpw = "rock"}, 
        ["Water Sport"] = {"Ludicolo", "Empoleon", tpw = "water"}, 
        ["Anticipation"] = {"Toxicroak", tpw = "fighting"}, 
        ["Mirror Coat"] = {"Wobbuffet", tpw = "psychic"},
        ["Lifesteal"] = {"Zubat", "Golbat", "Crobat", "Shiny Zubat", "Shiny Golbat", "Shiny Crobat", tpw = "poison"},
        ["Evasion"] = {"Scyther", "Scizor", "Hitmonlee", "Lucario", "Hitmonchan", "Ninjask", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Hitmontop", "Ledian", "Ledyba", "Sneasel", tpw = "normal"},
        ["Foresight"] = {"Machamp", "Shiny Hitmonchan", "Lucario", "Shiny Hitmonlee", "Shiny Hitmontop", "Hitmontop", "Hitmonlee", "Hitmonchan", tpw = "fighting"},
        ["Levitate"] = {"Gengar", "Haunter", "Gastly", "Misdreavus", "Bronzor", "Bronzong", "Weezing", "Koffing", "Unown", "Shiny Gengar", tpw = "ghost"},
        ["Bone Spin"] = {"Cubone", "Marowak", "Shiny Cubone", "Shiny Marowak", tpw = "ground"},
        ["Illusion"] = {"Misdreavus", tpw = "ghost"},
        ["Wond Guard"] = {"Shedinja", tpw = "ghost"},
        ["Ninja Slice"] = {"Ninjask", tpw = "bug"},
        ["Speed Boost"] = {"Ninjask", tpw = "normal"},
        ["Night Strike"] = {"Shedinja", tpw = "ghost"},
        ["Absolute Zero"] = {"Glalie", tpw = "ice"},
        ["Uproar"] = {"Whismur", "Loudred", "Shiny Dodrio", "Exploud", tpw = "normal"},
        ["Clorophyl"] = {"Shiny Vileplume", "Nuzleaf", "Shiftry", tpw = "grass"},
        ["Leftovers"] = {"Whismur", "Loudred", "Exploud", tpw = "normal"},
        ["Water Sport"] = {"Ludicolo", "Empoleon", tpw = "water"},
        ["Volt Absorb"] = {"Pachirisu", tpw = "electric"},
        ["Ion Deluge"] = {"Pachirisu", tpw = "electric"},
        ["Pixilate"] = {"Granbull", tpw = "fairy"},
        ["Solid Rock"] = {"Rhyperior", tpw = "rock"},
        ["Tick Fat"] = {"Venusaur", "Shiny Venusaur", "Grumpig", tpw = "rock"},
        ["Super Power"] = {"Lucario", "Riolu", tpw = "fighting"},
        ["Spike Skin"] = {"Qwilfish", tpw = "ground"},
        ["Flash Fire"] = {"Heatran", tpw = "psychic"},
        ["Imunity"] = {"Zangoose", tpw = "normal"},
        ["Magnet Field"] = {"Magnezone", tpw = "electric"},
}


function doShowPokedexRegistration(cid, pokemon, ball)
        local item2 = pokemon
        local virtual = false
        if type(pokemon) == "string" then
                virtual = true
        end
        local myball = ball
        local name = virtual and pokemon or getCreatureName(item2.uid)
        
        local v  = fotos[name]
        local stt = {}
        
        table.insert(stt, "Name: "..name.."\n")
        
        if pokes[name].type2 and pokes[name].type2 ~= "no type" then
                table.insert(stt, "Type: "..pokes[name].type.."/"..pokes[name].type2)
        else
                table.insert(stt, "Type: "..pokes[name].type)
        end
        
        if virtual then
                   table.insert(stt, "\nRequired level: "..pokes[name].level.."\n")
        else
                   table.insert(stt, "\nRequired level: ".. getPokemonLevel(item2.uid, true) .."\n")  --alterado v1.9
        end
        
        table.insert(stt, "\n"..getPokemonEvolutionDescription(name).."\n")
        
        table.insert(stt, "\nMoves:")
        
        if name == "Ditto" or name == "Shiny Ditto" then
                   if virtual then
                              table.insert(stt, "\nIt doesn't use any moves until transformed.")
                   elseif getPlayerStorageValue(item2.uid, 1010) == "Ditto" or getPlayerStorageValue(item2.uid, 1010) == -1 then
                              table.insert(stt, "\nIt doesn't use any moves until transformed.")
                              for a = 1, 15 do
                                         table.insert(stt, getMoveDexDescr(item2.uid, getPlayerStorageValue(item2.uid, 1010), a))
                              end
                   end
        else
                   for a = 1, 15 do
                              table.insert(stt, getMoveDexDescr(item2.uid, name, a))
                   end
        end
        
        for e, f in pairs(passivas) do
                   if isInArray(passivas[e], name) then
                              local tpw = passivas[e].tpw
                              if name == "Pineco" and passivas[e] == "Giroball" then
                                         tpw = "bug"
                              end
                              table.insert(stt, "\n"..e.." - passive - "..tpw)
                   end
        end
                    
        table.insert(stt, "\n\nAbility:\n") 
        local abilityNONE = true                   --alterado v1.8 \/
                    
        for b, c in pairs(skills) do
                   if isInArray(skillcheck, b) then
                              if isInArray(c, name) then
                                         table.insert(stt, (b == "levitate_fly" and "Levitate" or doCorrectString(b)).."\n")
                                         abilityNONE = false
                              end
                   end
        end
        if abilityNONE then
                   table.insert(stt, "None")
        end
                
        if string.len(table.concat(stt)) > 8192 then
                   print("Error while making pokedex info with pokemon named "..name..".\n   Pokedex registration has more than 8192 letters (it has "..string.len(stt).." letters), it has been blocked to prevent fatal error.")
                   doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.") 
                return true
        end    
        
        doShowTextDialog(cid, v, table.concat(stt))
end

 

 

 

LOOT

 

e a parte do loot eu editei uma script que ta mostrando o loot dos pokes certinho só que é por TalkAction gostaria de colocar na dex segue o script.

 

     function onSay(cid, words, param, channel)
         local monster = getMonsterInfo(param)
         
         if not monster then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Esse poke nao existe.")
            return true
         end 
         
         local header = "Monster info: " .. monster.name .. "\n\n"
         str = header .. "Loot:\n"
         local lootList = getMonsterLootList(param)
         for _, item in pairs(lootList) do
            str = str .. getItemNameById(item.id) .. " (Drop: " .. item.chance/100 .. "%)\n"
         end
         doPlayerPopupFYI(cid, str)
         return true
      end

 

 

se tiver como colocar esse loot na dex me ajudaria muito ^^  desde ja obrigado   

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

dex.png

loot.png

Link para o post
Compartilhar em outros sites
  • 2 months later...
  • 3 years later...

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 cloudrun2023
      CloudRun - Sua Melhor Escolha para Hospedagem de OTServer!
      Você está procurando a solução definitiva para hospedar seu OTServer com desempenho imbatível e segurança inigualável? Não procure mais! Apresentamos a CloudRun, sua parceira confiável em serviços de hospedagem na nuvem.
       
      Recursos Exclusivos - Proteção DDoS Avançada:
      Mantenha seu OTServer online e seguro com nossa robusta proteção DDoS, garantindo uma experiência de jogo ininterrupta para seus jogadores.
       
      Servidores Ryzen 7 Poderosos: Desfrute do poder de processamento superior dos servidores Ryzen 7 para garantir um desempenho excepcional do seu OTServer. Velocidade e estabilidade garantidas!
       
      Armazenamento NVMe de Alta Velocidade:
      Reduza o tempo de carregamento do jogo com nosso armazenamento NVMe ultrarrápido. Seus jogadores vão adorar a rapidez com que podem explorar o mundo do seu OTServer.
       
      Uplink de até 1GB:
      Oferecemos uma conexão de alta velocidade com até 1GB de largura de banda, garantindo uma experiência de jogo suave e livre de lag para todos os seus jogadores, mesmo nos momentos de pico.
       
      Suporte 24 Horas:
      Estamos sempre aqui para você! Nossa equipe de suporte está disponível 24 horas por dia, 7 dias por semana, para resolver qualquer problema ou responder a qualquer pergunta que você possa ter. Sua satisfação é a nossa prioridade.
       
      Fácil e Rápido de Começar:
      Configurar seu OTServer na CloudRun é simples e rápido. Concentre-se no desenvolvimento do seu jogo enquanto cuidamos da hospedagem.
       
      Entre em Contato Agora!
      Website: https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
      Email: [email protected]
      Telefone: (47) 99902-5147

      Não comprometa a qualidade da hospedagem do seu OTServer. Escolha a CloudRun e ofereça aos seus jogadores a melhor experiência de jogo possível. Visite nosso site hoje mesmo para conhecer nossos planos e começar!
       
      https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
       
      CloudRun - Onde a Velocidade Encontra a Confiabilidade!
       

    • Por FeeTads
      SALVE rapaziada do TK, esses dias vim pensando em novos scripts pro meu OT, e em um deles eu precisava que determinada area não contasse frag pro player que matasse outros, PORÉM eu precisava que os players que morressem nessa area ainda assim tivessem as penalidades da sua morte, procurei por ai, achei alguns scripts que apenas tiravam o SKULL e não realmente o FRAG do player.

      **script atualizado 22/10/2023** - melhorado e otimizado, levei o script pra puxar as infos por .lua / creatureScripts

      vou disponibilizar o code aqui, e o que fazer pra determinada area não contar frag.

      SOURCE OTX 2 / TFS 0.x, Funciona em TFS 1.x mudando as tags e ajeitando as sintaxes.

      vá em creatureevent.cpp

      procure por:
      else if(type == "preparedeath") _type = CREATURE_EVENT_PREPAREDEATH;
      Adiciona abaixo:
      else if(type == "nocountfrag") _type = CREATURE_EVENT_NOCOUNTFRAG;

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath";  
      Adicione abaixo: 
      case CREATURE_EVENT_NOCOUNTFRAG: return "noCountFragArea";

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList";
      Adicione abaixo:
      case CREATURE_EVENT_NOCOUNTFRAG: return "cid, target";

      agora no mesmo arquivo, vá até o final do arquivo e adicione essa função:
      uint32_t CreatureEvent::executeNoCountFragArea(Creature* creature, Creature* target) { //noCountFragArea(cid, target) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { env->setRealPos(creature->getPosition()); std::ostringstream scriptstream; scriptstream << "local cid = " << env->addThing(creature) << std::endl; scriptstream << "local target = " << env->addThing(target) << std::endl; if(m_scriptData) scriptstream << *m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ std::ostringstream desc; desc << creature->getName(); env->setEvent(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(creature->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(creature)); lua_pushnumber(L, env->addThing(target)); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::clog << "[Error - CreatureEvent::noCountFragArea] Call stack overflow." << std::endl; return 0; } }

      agora vá em creatureevent.h

      procure por:
      CREATURE_EVENT_PREPAREDEATH
      adicione abaixo:
      CREATURE_EVENT_NOCOUNTFRAG

      procure por:
      uint32_t executePrepareDeath(Creature* creature, DeathList deathList);
      Adicione abaixo:
      uint32_t executeNoCountFragArea(Creature* creature, Creature* target);

      agora vá em player.cpp

      procure por:
      bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
      abaixo de:
      War_t enemy; if(targetPlayer->getEnemy(this, enemy)) { if(entry.isLast()) IOGuild::getInstance()->updateWar(enemy); entry.setWar(enemy); }
      Adicione o seguinte código:
      if (targetPlayer){ CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_NOCOUNTFRAG); for (const auto &event : killEvents) { if (!event->executeNoCountFragArea(this, target)) { return true; } } }

      //

      Feito isso, tudo completo na sua source, agora é necessário adicionar o creaturescript dentro do servidor

      vá até creaturescripts/scripts
      crie um arquivo chamado, "noCountFragInArea.lua"
      e dentro dele cole o código:
       
      --[[ script feito por feetads / TibiaKing ]]-- --[[ discord: feetads / FeeTads#0246 ]]-- -- Add positions here for which you do not want to count frags local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, -- from = area superior esquerda / to = area inferior direita (formando um quadrado) } local onlyKillerInArea = false -- only killer need to be in area? function noCountFragArea(cid, target) if not isCreature(cid) or not isCreature(target) then return true end local posKiller = getPlayerPosition(cid) local posTarget = getPlayerPosition(target) for i = 1, #areas do local area = areas[i] if isInArea(posKiller, area.from, area.to) then if onlyKillerInArea then return false elseif isInArea(posTarget, area.from, area.to) then return false end end end return true end
      agora em creaturescripts.xml
      <event type="nocountfrag" name="fragarea" event="script" value="noCountFragInArea.lua"/>
      agora em creaturescripts/scripts/login.lua
       procure por OU semelhante a esse:
      registerCreatureEvent(cid, "AdvanceSave")
      e abaixo adicione:
      registerCreatureEvent(cid, "fragarea")

      //


      Agora tudo certo, quando quiser adiciona uma area que não pega frag, vá até o script e apenas coloque a area, igual o demonstrado no script

      Exemplo:
      local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, [2] = {from = {x = 1000, y = 1000, z = 7}, to = {x = 1100, y = 1100, z = 7}}, }
      assim somente colocando a area no script e abrindo o server ou dando /reload, já funcionará a area como não pegar frag.
      Esse sistema pode ser bom pra areas de pvp ativo, onde você ainda quer que o player que morrer perca os atributos, como se fosse uma morte normal, porém não conta frag pra quem matar.
      Bom pra sistemas tipo castle 48h (guild war), onde há diversas mortes e risco de pegar red, atrapalhando a war.

      Façam bom proveito dos scripts, e deixem os créditos no script rsrs

      **Eu fiz as alterações e o simples código por isso vim disponibilizar, créditos meus**
    • Por Muvuka
      Abri canal a força creaturescript acho que funcione no creaturescript cria script creaturescript
       
      <channel id="9" name="HELP" logged="yes"/>
      <channel id="12" name="Report Bugs" logged="yes"/>
      <channel id="13" name="Loot" logged="yes"/>
      <channel id="14" name="Report Character Rules Tibia Rules" logged="yes"/>
      <channel id="15" name="Death Channel"/>
      <channel id="6548" name="DexSoft" level="1"/>
      <channel id="7" name="Reports" logged="yes"/>
       
      antes de 
              if(lastLogin > 0) then adicione isso:
                      doPlayerOpenChannel(cid, CHANNEL_HELP) doPlayerOpenChannel(cid, 1,  2, 3) = 1,2 ,3 Channels, entendeu? NÃO FUNCIONA EU QUERO UM MEIO DE ABRI SEM USA A SOURCE
       
      EU NÃO CONSEGUI ABRI EU NÃO TENHO SOURCE
       
       
    • Por bolachapancao
      Rapaziada seguinte preciso de um script que ao utilizar uma alavanca para até 4 jogadores.
      Os jogadores serão teleportados para hunt durante uma hora e depois de uma hora os jogadores serão teleportados de volta para o templo.
       
      Observação: caso o jogador morra ou saia da hunt o evento hunt é cancelado.

      Estou a base canary
      GitHub - opentibiabr/canary: Canary Server 13.x for OpenTibia community.
       
    • Por RAJADAO
      .Qual servidor ou website você utiliza como base? 
      Sabrehaven 8.0
      Qual o motivo deste tópico? 
      Ajuda com novos efeitos
       
      Olá amigos, gostaria de ajuda para introduzir os seguintes efeitos no meu servidor (usando o Sabrehaven 8.0 como base), adicionei algumas runas novas (avalanche, icicle, míssil sagrado, stoneshower & Thunderstorm) e alguns novos feitiços (exevo mas san, exori san, exori tera, exori frigo, exevo gran mas frigo, exevo gran mas tera, exevo tera hur, exevo frigo hur) mas nenhum dos efeitos dessas magias parece existir no servidor, alguém tem um link para um tutorial ou algo assim para que eu possa fazer isso funcionar?
      Desculpe pelo mau inglês, sou brasileiro.

      Obrigado!


      AVALANCHE RUNE id:3161 \/
      (COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)

      STONESHOWER RUNE id:3175 \/
      (COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_STONES)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)

      THUNDERSTORM RUNE id:3202 \/
      (COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_E NERGYHIT)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)

      ICICLE RUNE id:3158 \/
      COMBAT_ICEDAMAGE
      CONST_ME_ICEAREA
      CONST_ANI_ICE

      SANTO MÍSSIL RUNA id:3182 \/
      (COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

      CONST_ME_PLANTATTACK (exevo gran mas tera)
      CONST_ME_ICETORNADO (exevo gran mas frigo)
      CONST_ME_SMALLPLANTS (exevo tera hur)
      CONST_ME_ICEAREA (exevo frigo hur)
      CONST_ME_ICEATTACK (exori frigo)
      CONST_ME_CARNIPHILA (exori tera)

      EXORI SAN \/
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
      CONST_ME_HOLYDAM IDADE

      EXEVO MAS SAN \/
      CONST_ME_HOLYAREA
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo