Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Boa tarde, estou com o problema no meu Prey System, onde todos os chares sempre ficam com a mesma Prey independente do monstro.

Alguem sabe o que pode ter de errado?

 

Prey = {
    Credits = "System remake: Westwol ~ Packet logic: Cjaker ~  Formulas: slavidodo",
    Version = "4.0",
    LastUpdate = "07/07/19",
}

CONST_PREY_SLOT_FIRST = 0
CONST_PREY_SLOT_SECOND = 1
CONST_PREY_SLOT_THIRD = 2

CONST_MONSTER_TIER_BRONZE = 0
CONST_MONSTER_TIER_SILVER = 1
CONST_MONSTER_TIER_GOLD = 2
CONST_MONSTER_TIER_GOLD = 3
CONST_MONSTER_TIER_PLATINUM = 4

CONST_BONUS_DAMAGE_BOOST = 0
CONST_BONUS_DAMAGE_REDUCTION = 1
CONST_BONUS_XP_BONUS = 2
CONST_BONUS_IMPROVED_LOOT = 3

Prey.Config = {
    ListRerollPrice = 2000
}

Prey.S_Packets = {
    ShowDialog = 0xED,
    PreyRerollPrice = 0xE9,
    PreyData = 0xE8,
    PreyTimeLeft = 0xE7
}

Prey.StateTypes = {
    LOCKED = 0,
    INACTIVE = 1,
    ACTIVE = 2,
    SELECTION = 3,
    SELECTION_CHANGE_MONSTER = 4
}

Prey.UnlockTypes = {
    PREMIUM_OR_STORE = 0,
    STORE = 1,
    NONE = 2
}

Prey.Actions = {
    NEW_LIST = 0,
    NEW_BONUS = 1,
    SELECT = 2,
}

Prey.C_Packets = {
    RequestData = 0xED,
    PreyAction = 0xEB
}

Prey.Bonuses = {
    [CONST_BONUS_DAMAGE_BOOST] = {step = 2, min = 7, max = 25},
    [CONST_BONUS_DAMAGE_REDUCTION] = {step = 2, min = 12, max = 30},
    [CONST_BONUS_XP_BONUS] = {step = 3, min = 13, max = 40},
    [CONST_BONUS_IMPROVED_LOOT] = {step = 3, min = 13, max = 40}
}

Prey.MonsterList = {
    [CONST_MONSTER_TIER_BRONZE] = {
        "Rotworm", "Carrion Worm", "Skeleton", "Ghoul", "Cyclops", "Cyclops Drone", "Cyclops Smith", "Dark Magician",
        "Beholder", "Dragon", "Dragon Hatchling", "Dwarf", "Dwarf Guard", "Dwarf Geomancer", "Dwarf Soldier", "Earth Elemental",
        "Fire Elemental", "Gargoyle", "Merlkin", "Minotaur", "Minotaur Guard", "Minotaur Mage", "Minotaur Archer", "Nomad",
        "Amazon", "Hunter", "Orc", "Orc Berserker", "Orc Leader", "Orc Shaman", "Orc Spearman", "Orc Warlord", "Panda",
        "Rotworm Queen", "Tarantula", "Scarab", "Skeleton Warrior", "Smuggler"
    },
    [CONST_MONSTER_TIER_SILVER] = {
         "Pirate Buccaneer", "Pirate Ghost", "Pirate Marauder", "Pirate Skeleton", "Dragon Lord Hatchling", "Frost Dragon Hatchling",
        "Behemoth", "Faun", "Dark Faun", "Dragon Lord", "Frost Dragon", "Hydra", "Hero", "Bullwark", "Giant Spider", "Crystal Spider",
        "Deepling Brawler", "Deepling Elite", "Deepling Guard", "Deepling Master Librarian", "Deepling Tyrant", "Deepling Warrior",
        "Wyrm", "Elder Wyrm", "Fleshslicer", "Frost Giant", "Ghastly Dragon", "Ice Golem", "Infernalist", "Warlock", "Lich",
        "Lizard Chosen", "Lizard Dragon Priest", "Lizard High Guard", "Lizard Legionnaire", "Lizard Zaogun", "Massive Energy Elemental",
        "Massive Fire Elemental", "Massive Water Elemental", "Minotaur Amazon", "Execowtioner", "Minotaur Hunter", "Mooh'Tah Warrior",
        "Mutated Bat", "Mutated Human", "Necromancer", "Nightmare", "Nightmare Scion", "Ogre Brute", "Ogre Savage", "Ogre Shaman",
        "Orclops Doomhauler", "Orclops Ravager", "Quara Constrictor", "Quara Constrictor Scout", "Quara Hydromancer", "Quara Mantassin",
        "Quara Pincher", "Quara Predator", "Sea Serpent", "Shaper Matriarch", "Silencer", "Spitter", "Worker Golem", "Werewolf",
        "Hellspawn", "Shadow Tentacle", "Vampire Bride", "Dragonling", "Shock Head", "Frazzlemaw",
    },
    [CONST_MONSTER_TIER_GOLD] = {
        "Plaguesmith", "Demon", "Crystal Spider", "Defiler", "Destroyer", "Diamond Servant", "Draken Elite",
        "Draken Spellweaver", "Draken Warmaster", "Draken Abomination", "Feversleep", "Terrorsleep", "Draptor",
        "Grim Reaper", "Guzzlemaw", "Hellfire Fighter", "Hand of Cursed Fate", "Hellhound", "Juggernaut",
        "Sparkion", "Dark Torturer", "Undead Dragon", "Retching Horror", "Choking Fear", "Choking Fear",
        "Shiversleep", "Sight Of Surrender", "Demon Outcast", "Blightwalker", "Grimeleech", "Vexclaw", "Grimeleech",
        "Dawnfire Asura", "Midnight Asura", "Frost Flower Asura", "True Dawnfire Asura", "True Frost Flower Asura",
        "True Midnight Asura"
    }
}

-- Communication functions
function Player.sendResource(self, resourceType, value)
    local typeByte = 0
    if resourceType == "bank" then
        typeByte = 0x00
    elseif resourceType == "inventory" then
        typeByte = 0x01
    elseif resourceType == "prey" then
        typeByte = 0x0A
    end
    local msg = NetworkMessage()
    msg:addByte(0xEE)
    msg:addByte(typeByte)
    msg:addU64(value)
    msg:sendToPlayer(self)
end

function Player.sendErrorDialog(self, error)
    local msg = NetworkMessage()
    msg:addByte(Prey.S_Packets.ShowDialog)
    msg:addByte(0x15)
    msg:addString(error)
    msg:sendToPlayer(self)
end

-- Core functions
function Player.setRandomBonusValue(self, slot, bonus, typeChange)
    local type = self:getPreyBonusType(slot)

    local min = Prey.Bonuses[type].min
    local max = Prey.Bonuses[type].max
    local step = Prey.Bonuses[type].step

    if bonus then
        if typeChange then
            self:setPreyBonusValue(slot, math.random(min, max))
        else
            local oldValue = self:getPreyBonusValue(slot)
            if (oldValue + step >= max) then
                self:setPreyBonusValue(slot, max)
            else
                while (self:getPreyBonusValue(slot) - oldValue < step) do
                    self:setPreyBonusValue(slot, math.random(min, max))
                end
            end
        end
    else
        self:setPreyBonusValue(slot, math.random(min, max))
    end

    self:setPreyBonusGrade(slot, math.floor((self:getPreyBonusValue(slot) - min) / (max - min) * 10))
    if (self:getPreyBonusGrade(slot) == 10 and self:getPreyBonusValue(slot) < max) then
        self:setPreyBonusGrade(slot, self:getPreyBonusGrade(slot) - 1)
    end
end

function Player.getMonsterTier(self)
    if self:getLevel() > 0 and self:getLevel() < 60 then
        return CONST_MONSTER_TIER_BRONZE
    elseif self:getLevel() >= 60 and self:getLevel() < 160 then
        return CONST_MONSTER_TIER_SILVER
    elseif self:getLevel() >= 160 then
        return CONST_MONSTER_TIER_GOLD
    end
end

function Player.createMonsterList(self)
    -- Do not allow repeated monsters
    local repeatedList = {}
    for slot = CONST_PREY_SLOT_FIRST, CONST_PREY_SLOT_THIRD do
        if (self:getPreyCurrentMonster(slot) ~= '') then
            repeatedList[#repeatedList + 1] = self:getPreyCurrentMonster(slot)
        end
        if (self:getPreyMonsterList(slot) ~= '') then
            local currentList = self:getPreyMonsterList(slot):split(";")
            for i = 1, #currentList do
                repeatedList[#repeatedList + 1] = currentList
            end
        end
    end
    -- Generating monsterList
    local monsters = {}
    while (#monsters ~= 9) do
        local randomMonster = Prey.MonsterList[self:getMonsterTier()][math.random(#Prey.MonsterList[self:getMonsterTier()])]
        -- Verify that monster actually exists
        if MonsterType(randomMonster) and not table.contains(monsters, randomMonster) and not table.contains(repeatedList, randomMonster) then
            monsters[#monsters + 1] = randomMonster
        end
    end
    return table.concat(monsters, ";")
end

function Player.resetPreySlot(self, slot, from)
    self:setPreyMonsterList(slot, self:createMonsterList())
    self:setPreyState(slot, from)
    return self:sendPreyData(slot)
end

function Player.getMinutesUntilFreeReroll(self, slot)
    local currentTime = os.time()
    if (self:getPreyNextUse(slot) <= currentTime) then
        return 0
    end
    return math.floor((self:getPreyNextUse(slot) - currentTime) / 60)
end

function Player.getRerollPrice(self)
    return (self:getLevel() / 2) * 100
end

function onRecvbyte(player, msg, byte)
    if (byte == Prey.C_Packets.RequestData) then
        player:sendPreyData(CONST_PREY_SLOT_FIRST)
        player:sendPreyData(CONST_PREY_SLOT_SECOND)
        player:sendPreyData(CONST_PREY_SLOT_THIRD)
    elseif (byte == Prey.C_Packets.PreyAction) then
        player:preyAction(msg)
    end
end

function Player.preyAction(self, msg)

    local slot = msg:getByte()
    local action = msg:getByte()

    if not slot then
        return self:sendErrorDialog("Sorry, there was an issue, please relog-in.")
    end

    -- Verify whether the slot is unlocked
    if (self:getPreyUnlocked(slot) ~= 1) then
        return self:sendErrorDialog("Sorry, you don't have this slot unlocked yet.")
    end

    -- Listreroll
    if (action == Prey.Actions.NEW_LIST) then

        -- Verifying state
        if (self:getPreyState(slot) ~= Prey.StateTypes.ACTIVE and self:getPreyState(slot) ~= Prey.StateTypes.SELECTION and self:getPreyState(slot) ~= Prey.StateTypes.SELECTION_CHANGE_MONSTER) then
            return self:sendErrorDialog("This is slot is not even active.")
        end

        -- If free reroll is available
        if (self:getMinutesUntilFreeReroll(slot) == 0) then
            self:setPreyNextUse(slot, os.time() + 20 * 60 * 60)
        elseif (not self:removeMoneyNpc(self:getRerollPrice())) then
            return self:sendErrorDialog("You do not have enough money to perform this action.")
        end

        self:setPreyCurrentMonster(slot, "")
        self:setPreyMonsterList(slot, self:createMonsterList())
        self:setPreyState(slot, Prey.StateTypes.SELECTION_CHANGE_MONSTER)

    -- Bonus reroll
    elseif (action == Prey.Actions.NEW_BONUS) then

        -- Verifying state
        if (self:getPreyState(slot) ~= Prey.StateTypes.ACTIVE) then
            return self:sendErrorDialog("This is slot is not even active.")
        end

        if (self:getPreyBonusRerolls() < 1) then
            return self:sendErrorDialog("You don't have any bonus rerolls.")
        end

        -- Removing bonus rerolls
        self:setPreyBonusRerolls(self:getPreyBonusRerolls() - 1)

        -- Calculating new bonus
        local oldType = self:getPreyBonusType(slot)
        self:setPreyBonusType(slot, math.random(CONST_BONUS_DAMAGE_BOOST, CONST_BONUS_IMPROVED_LOOT))
        self:setRandomBonusValue(slot, true, (oldType ~= self:getPreyBonusType(slot) and true or false))

    -- Select monster from list
    elseif (action == Prey.Actions.SELECT) then

        local selectedMonster = msg:getByte()
        local monsterList = self:getPreyMonsterList(slot):split(";")

        -- Verify if the monster exists.
        local monster = MonsterType(monsterList[selectedMonster + 1])
        if not monster then
            return self:sendPreyData(slot)
        end

        -- Verifying slot state
        if (self:getPreyState(slot) ~= Prey.StateTypes.SELECTION and self:getPreyState(slot) ~= Prey.StateTypes.SELECTION_CHANGE_MONSTER) then
            return self:sendErrorDialog("This slot can't select monsters.")
        end

        -- Proceeding to prey monster selection
        self:selectPreyMonster(slot, monsterList[selectedMonster + 1])
    end

    -- Perfom slot update
    return self:sendPreyData(slot)
end

function Player.selectPreyMonster(self, slot, monster)

    -- Verify if the monster exists.
    local monster = MonsterType(monster)
    if not monster then
        return self:sendPreyData(slot)
    end

    local msg = NetworkMessage()

    -- Only first/expired selection list gets new prey bonus
    if (self:getPreyState(slot) == Prey.StateTypes.SELECTION) then
        -- Generating random prey type
        self:setPreyBonusType(slot, math.random(CONST_BONUS_DAMAGE_BOOST, CONST_BONUS_IMPROVED_LOOT))
        -- Generating random bonus stats
        self:setRandomBonusValue(slot, false, false)
    end

    -- Setting current monster
    self:setPreyCurrentMonster(slot, monster:getName())
    -- Setting preySlot state
    self:setPreyState(slot, Prey.StateTypes.ACTIVE)
    -- Cleaning up monsterList
    self:setPreyMonsterList(slot, "")
    -- Time left
    self:setPreyTimeLeft(slot, 7200) -- 2 hours
end

function Player.sendPreyData(self, slot)
    if not slot then
        return true
    end

    local slotState = self:getPreyState(slot)

    local msg = NetworkMessage()
    msg:addByte(Prey.S_Packets.PreyData) -- packet header
    msg:addByte(slot) -- slot number
    msg:addByte(slotState) -- slot state

    -- This slot will preserve the same bonus and % but the monster might be changed
    if slotState == Prey.StateTypes.SELECTION_CHANGE_MONSTER then

        -- This values have to be stored on each slot
        msg:addByte(self:getPreyBonusType(slot))
        msg:addU16(self:getPreyBonusValue(slot))
        msg:addByte(self:getPreyBonusGrade(slot))

        -- MonsterList already exists in the slot
        local monsterList = self:getPreyMonsterList(slot):split(";")
        msg:addByte(#monsterList)
        for i = 1, #monsterList do
            local monster = MonsterType(monsterList)
            if monster then
                msg:addString(monster:getName())
                msg:addU16(monster:getOutfit().lookType or 21)
                msg:addByte(monster:getOutfit().lookHead or 0x00)
                msg:addByte(monster:getOutfit().lookBody or 0x00)
                msg:addByte(monster:getOutfit().lookLegs or 0x00)
                msg:addByte(monster:getOutfit().lookFeet or 0x00)
                msg:addByte(monster:getOutfit().lookAddons or 0x00)
            else
                -- Reset slot as it got bugged
                return self:resetPreySlot(slot, Prey.StateTypes.SELECTION_CHANGE_MONSTER)
            end
        end


    -- This slot will have a new monsterList and a random bonus
    elseif slotState == Prey.StateTypes.SELECTION then

        -- If list is empty, then we will create a new one and assign it to the monsterList or timeleft = 0
        local preyMonsterList = self:getPreyMonsterList(slot)
        if preyMonsterList == '' then
            self:setPreyMonsterList(slot, self:createMonsterList())
            -- Resending this preySlot as there was a change.
            return self:sendPreyData(slot)
        end

        local monsterList = preyMonsterList:split(";")
        msg:addByte(#monsterList)
        for i = 1, #monsterList do
            local monster = MonsterType(monsterList)
            if monster then
                msg:addString(monster:getName())
                msg:addU16(monster:getOutfit().lookType or 21)
                msg:addByte(monster:getOutfit().lookHead or 0x00)
                msg:addByte(monster:getOutfit().lookBody or 0x00)
                msg:addByte(monster:getOutfit().lookLegs or 0x00)
                msg:addByte(monster:getOutfit().lookFeet or 0x00)
                msg:addByte(monster:getOutfit().lookAddons or 0x00)
            else
                -- Reset slot as it got bugged
                return self:resetPreySlot(slot, Prey.StateTypes.SELECTION)
            end
        end

    -- This slot is active and will show current monster and bonus
    elseif slotState == Prey.StateTypes.ACTIVE then

        -- Getting current monster
        local monster = MonsterType(self:getPreyCurrentMonster(slot))
        if monster then
            msg:addString(monster:getName())
            msg:addU16(monster:getOutfit().lookType or 21)
            msg:addByte(monster:getOutfit().lookHead or 0x00)
            msg:addByte(monster:getOutfit().lookBody or 0x00)
            msg:addByte(monster:getOutfit().lookLegs or 0x00)
            msg:addByte(monster:getOutfit().lookFeet or 0x00)
            msg:addByte(monster:getOutfit().lookAddons or 0x00)
            msg:addByte(self:getPreyBonusType(slot))
            msg:addU16(self:getPreyBonusValue(slot))
            msg:addByte(self:getPreyBonusGrade(slot))
            msg:addU16(self:getPreyTimeLeft(slot))
        else
            -- Reset slot as it got expired or bugged.
            return self:resetPreySlot(slot, Prey.StateTypes.SELECTION)
        end

    -- This slot is inactive and will not take any extra bytes
    elseif slotState == Prey.StateTypes.INACTIVE then


    elseif slotState == Prey.StateTypes.LOCKED then
        msg.addByte(Prey.UnlockTypes.PREMIUM_OR_STORE) -- Store unlock method
    end

    -- Resources and times are always sent
    msg:addU16(self:getMinutesUntilFreeReroll(slot)) -- next prey reroll here
    -- Client 11.9+ compat, feature unavailable.
    if self:getClient().version >= 1190 then
        msg:addByte(0x00) -- preyWildCards
    end
    msg:addByte(0xEC)
    self:sendResource("prey", self:getPreyBonusRerolls())
    self:sendResource("bank", self:getBankBalance())
    self:sendResource("inventory", self:getMoney())
    -- List reroll price
    msg:addByte(Prey.S_Packets.PreyRerollPrice)
    msg:addU32(self:getRerollPrice())
    -- Client 11.9+ compat, feature unavailable.
    if self:getClient().version >= 1190 then
        msg:addByte(0x00)
        msg:addByte(0x00)
    end
    -- Sending message to client
    msg:sendToPlayer(self)
end
 

Sem título.png

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 pota
      Desenvolvi por muito tempo uma base Pokémon do 0 (parti do TFS 1.2 e fui implementando tudo até chegar nessa versão que estou disponibilizando). O resultado é um servidor extremamente leve e estável (já testado com 100+ players e por mais de 1 mês sem cair). Basicamente, ele suporta tranquilamente 1k+ players e não tem nenhum bug conhecido que faça com que ele caia.
       
      Esse servidor ficou no ar por muito tempo (mais de 2 anos) e era conhecido como PokeDash. Acabei ficando sem tempo para administrar o servidor, o que fez com que a maioria dos players parassem de jogar e com que eu fechasse de vez.
       
      Pensei por muito tempo sobre o que fazer com ele, e decidi disponibilizar para a comunidade. Trata-se de algo único (eu ao menos nunca vi um servidor de Pokémon construído a partir do TFS 1.2)!
       
      Como desenvolvi todos os sistemas do 0, tomei cuidado para fazer tudo da melhor maneira possível e para que possa ser facilmente modificado e atualizado. Basicamente, os Pokémons podem ser criados a partir de um único arquivo XML (como monstros do Tibia), e nesse arquivo você pode especificar tudo, desde level máximo e mínimo de spawn, loots, tipos (fogo, agua, etc), se ele pode usar habilidades (surf, fly, etc), moves (quando alguém captura), ataques (quando selvagem), evoluções, chance de catch, etc.
      Exemplo de Pokemon
      Resumo de alguns sistemas (tem muita coisa, então coloquei os principais)
      ✅ Pokemons com level, status e boost. O level do player/boost também influencia no status dos pokes.
      ✅ Sistema de Love (seu poke fica mais forte que os demais quando upa de level matando pokemons mais fortes que ele).
      ✅ Base propria com Shinys e Ancients.
      ✅ Cada player pode conseguir ancient stone para evoluir 1 shiny para ancient através de quest.
      ✅ Moves bar e pokemon bar (troca de pokemon com 1 click).
      ✅ Autoloot agrupando em bags.
      ✅ Ganho de exp ao capturar/dar dex em pokes com um bonus adicional para o primeiro catch de cada poke.
      ✅ Mapa original com mais de 40 quests, incluindo outland com Ancients.
      ✅ Eventos diários automáticos: Futebol todo dia 19:30, arena PVP todo dia 20:00, golden arena aos sabados 17:00, bag premiada aos domingos/feriados 17:00.
      ✅ Profissões (facilmente customizáveis):
      Catcher: 3.5% mais chance de capturar um Pokemon. Hunter: 10% mais status de dano para o seu Pokemon (tanto magico quanto fisico). Blocker: 25% mais vida para seus Pokemons. Healer: 100% mais cura que aplica tanto em potions quando moves dos seus Pokemons. Explorer: 15% mais experiencia para seu personagem durante a caça. ✅ Task diária de catch/loot dando Tokens. Os tokens podem ser trocados por itens raros (dentre eles premier ball e bags personalizadas) além de pagar seu curso com o NPC Job Manager para aprender uma das profissões acima. Uma das maneiras de conseguir tokens é fazendo tasks diárias.
      ✅ Muito mais!
      Screenshots

       

      Download
      Baixe o pack contendo o servidor, cliente, site, editor de mapa e editor de itens clique aqui!. Caso considere minha contribuição interessante para a comunidade, considere realizar uma doação para a chave pix: [email protected]
      GM account: gm/gmgmgm
      O projeto será atualizado em sua homepage: https://pokedashpota.vercel.app/
       
      SCAN
       
      ---EDIT---
      Download sources
      SCAN
       
       Problemas e soluções
      GroupID não existe ao tentar logar no server.
       
      Erros ao importar o schema.sql.
       
      Comando /cb não funcionando:
       
    • Por Treyff
      Olá pessoas do TibiaKing,
       
      A comunidade tibia king tem me ajudado por meses com conhecimentos para o meu server de tibia, então hoje ocorreu um problema lá no meu servidor e não havia nada atualizado para me suprir, o problema foi o seguinte: "Um player x lá era vip donatadaço" pegou red morreu e perdeu tudo! então para evitar problemas no pagseguro e na vida real eu decidi criar um AOL vip.
       
      e hoje vou ensinar a vocês como eu resolvi o problema:
       
      Eu apenas adicionei essas linhas no arquivo: "data/creaturescripts/scripts/others/droploot.lua"
      --AOL VIP local amulet = player:getSlotItem(CONST_SLOT_NECKLACE) if amulet and amulet.itemid == 24683 ) then local isPlayer = false if killer then if killer:isPlayer() then isPlayer = true else local master = killer:getMaster() if master and master:isPlayer() then isPlayer = true end end end Em "if amulet and amulet.itemid == 24683" é só mudar 24683 para o id do amuleto que você queira.
       
      bom dá pra ver que eu segui o exemplo do AOL e removi os requisitos para ele não funcionar.
       
      Espero que isso ajude alguém e desculpe o péssimo post pois esse aqui é meu primeiro conteúdo de agradecimento.
    • Por tataboy67
      Dungeon System v1.1

      A pedido de um usuário em meu Discord, resolvi ajuda-lo e desenvolver um sistema totalmente interativo e de qualidade aqui para vocês.
      Bom, o sistema se baseia em uma ActionID que ao clicar, podemos ai entrar em uma dungeon, tendo tempo para finaliza-la e até um cooldown, caso queira entrar novamente.

      Imagens do sistema:
       

      Vamos ao Código:

      Em actions, crie um arquivo com o nome de: Dungeon Actions.lua
       
      Em creaturescripts, crie um arquivo com o nome de: Dungeon Creaturescript.lua
       
      Ainda em creaturescripts, crie outro arquivo com o nome de: Type Dungeon Creaturescript.lua
       
       Na LIB, crie um arquivo com o nome de Dungeon System Lib.lua, e adicione:
       
      Em creaturescripts.xml, adicione:
       
       
      Em actions.xml, adicione:
       Em libs.lua, adicione:
      dofile('data/lib/Dungeon System Lib.lua')  
      v1.1 (Nova atualização, agora pode spawnar mobs dentro da DG, e ao sair, eles são removidos)

      (CREDITOS TOTAIS A MIM: @tataboy67)

      Essa é a primeira versão. Ainda pretendo colocar para nascer mobs, remover mobs ao entrar, etc etc...
       
    • Por tiroleivi
      Estou com os seguintes erros : 
       

    • Por JuremaFox
      Olá pessoal venho aqui postar o script de loteria mostrando os itens e os resultados na página do gesior, pesquisei no forum mas não achei o sistema com a página no gesior compatível com TFS 1.2 (os que achei não mostrava o resultado no site ou deu algum erro no distro). Achei o script em um forum gringo e a página do gesior aqui no forum, mas modifiquei porque haviam erros. Peço que se eu estiver enganado me avisem que removerei esse tópico. NÃO DAREI SUPORTE, PRA QUEM ENTENDE O BÁSICO DE SCRIPT SERÁ FÁCIL CONFIGURAR.
       
      Vamos lá primeiramente crie um arquivo lua em globalevent/scripts com o nome lottery.lua e adicione


       
      em seguida em globalevents.xml adicione


       
      agora crie uma página no seu gesior com o nome lottery.php e coloque


       
      agora vá na sua database e execute o comando SQL


       
       
      pronto o sistema está ok, configurado para sortear 1 dos membros online de 3 em 3 horas, editar no globalevent e na página do gesior os itens que será sorteado. Agora a imagem de como ficará no site.

       
      Créditos : Shyzoul do forum gringo pelo script.
                      WalaceBz pela página do gesior, que fiz uma pequena modificação, o script original dele é encontrado nesse post AQUI.
                      Eu por trazer ao forum e funcionando perfeitamente em TFS 1.2
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo