Ir para conteúdo
  • Cadastre-se

Posts Recomendados

To adicionando uns scripts no me servidor, sistemas e to achando super dahora e vejo que não tem por aqui, vim disponibilizar pra vocês.

 

Citar

Ao pescar, você tem a chance de pegar um monstro em vez de um peixe. O script usa a mesma fórmula do script de pesca oficial do TFS 1.1, quando você pega algo, você recebe um monstro ou um peixe.

 

actions.xml

 

<action itemid="2580" script="monsterFishing.lua" allowfaruse="1"/>

scripts/monsterFishing.lua

 

local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 7236, 10499, 15401, 15402}
local lootTrash = {2234, 2238, 2376, 2509, 2667}
local lootCommon = {2152, 2167, 2168, 2669, 7588, 7589}
local lootRare = {2143, 2146, 2149, 7158, 7159}
local lootVeryRare = {7632, 7633, 10220}
local useWorms = true
 
-- Config for monster fishing
local config = {
    enabled = true, -- ativar ou desativar a pesca monstro
    debug = false, -- ativar mensagens de depuração no console
    verifyMonsters = false, -- desabilite isso se você estiver tendo problemas com o Monster fishing :: Warning - Invalid monster name
    chance = 50, -- chance de pegar um monstro em% - 50 significa que você tem 50/50 de chance de pegar um monstro ou um peixe
    bossLevel = 300, -- nível mínimo para pegar um "boss"
    bossSkill = 90, -- min habilidade de pesca para pegar um "boss"
    monsters = {
        -- [minLevel] = {"monster", "names", "for", "level"}
        [100] = {"Quara Hydromancer", "Quara Constrictor", "Quara Mantassin", "Idontexist"},
        [150] = {"Quara Pincher", "Quara Predator"},
        [200] = {"Serpent Spawn", "Wyrm"},
        [300] = {"Sea Serpent"},
    },
    bosses = {
        -- Monsters that can only be caught with atleast "bossLevel" and "bossSkill"
        "Titan Goddess of Water",
    }
}
 
-- Validate monsters configuration
if config.verifyMonsters then
    local m = {}
    for minLevel, monsters in pairs(config.monsters) do
        m[minLevel] = {}
        if config.debug then print("#monsters", #monsters) end
        for i = 1, #monsters do
            if MonsterType(monsters[i]) then
                table.insert(m[minLevel], monsters[i])
            else
                print("Monster fishing::Warning - Invalid monster name:", monsters[i])
            end
        end
        if config.debug then print("Monster fishing::Debug - #monsters added", #m[minLevel]) end
    end
    config.monsters = m
end
 
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
    local targetId = itemEx.itemid
    if not isInArray(waterIds, itemEx.itemid) then
        return false
    end
 
    if targetId == 10499 then
        local targetItem = Item(itemEx.uid)
        local owner = targetItem:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER)
        if owner ~= 0 and owner ~= player:getId() then
            player:sendTextMessage(MESSAGE_STATUS_SMALL, "You are not the owner.")
            return true
        end
 
        toPosition:sendMagicEffect(CONST_ME_WATERSPLASH)
        targetItem:remove()
 
        local rareChance = math.random(1, 100)
        if rareChance == 1 then
            player:addItem(lootVeryRare[math.random(#lootVeryRare)], 1)
        elseif rareChance <= 3 then
            player:addItem(lootRare[math.random(#lootRare)], 1)
        elseif rareChance <= 10 then
            player:addItem(lootCommon[math.random(#lootCommon)], 1)
        else
            player:addItem(lootTrash[math.random(#lootTrash)], 1)
        end
        return true
    end
 
    if targetId ~= 7236 then
        toPosition:sendMagicEffect(CONST_ME_LOSEENERGY)
    end
 
    if targetId == 493 or targetId == 15402 then
        return true
    end
 
    player:addSkillTries(SKILL_FISHING, 1)
    if math.random(1, 100) <= math.min(math.max(10 + (player:getEffectiveSkillLevel(SKILL_FISHING) - 10) * 0.597, 10), 50) then
        if useWorms and not player:removeItem("worm", 1) then
            return true
        end
 
        if targetId == 15401 then
            local targetItem = Item(itemEx.uid)
            targetItem:transform(targetId + 1)
            targetItem:decay()
 
            if math.random(1, 100) >= 97 then
                player:addItem(15405, 1)
                return true
            end
        elseif targetId == 7236 then
            local targetItem = Item(itemEx.uid)
            targetItem:transform(targetId + 1)
            targetItem:decay()
 
            local rareChance = math.random(1, 100)
            if rareChance == 1 then
                player:addItem(7158, 1)
                return true
            elseif rareChance <= 4 then
                player:addItem(2669, 1)
                return true
            elseif rareChance <= 10 then
                player:addItem(7159, 1)
                return true
            end
        end
        if config.enabled and math.random(100) <= config.chance then
            local level = player:getLevel()
            local skill = player:getSkillLevel(SKILL_FISHING)
            local tmpMonsters = {}
 
            for minLevel, monsters in pairs(config.monsters) do
                if config.debug then print("Monster fishing::Debug - Level check:", level, ">=", minLevel) end
                if level >= minLevel then
                    if config.debug then print("Monster fishing::Debug - Level check passed - #monsters:", #monsters) end
                    for i = 1, #monsters do
                        if config.debug then print("Monster fishing::Debug - Found monster:", monsters[i]) end
                        table.insert(tmpMonsters, monsters[i])
                    end
                end
            end
 
            if level >= config.bossLevel and skill >= config.bossSkill then
                for i = 1, #config.bosses do
                    table.insert(tmpMonsters, config.bosses[i])
                end
            end
            if config.debug then print("Monster fishing::Debug - #tmpMonsters: "..#tmpMonsters) end
            if #tmpMonsters > 0 then
                local pos = player:getPosition()
                Game.createMonster(tmpMonsters[math.random(1, #tmpMonsters)], pos)
                return true
            end
        end
        player:addItem("fish", 1)
    end
    return true
end

 

Caso na hora de pescar venha esse item ao invés do fish, é por causa dos items.xml, dai é só você mudar  player:addItem("2667", 1) e adicionar o ID do fish.

 

RTHIJ8k.png

 

Citar

créditos ao forgee, pelo script.

 

Link para o post
Compartilhar em outros sites

Parabéns, seu tópico de conteúdo foi aprovado!
Muito obrigado pela sua contribuição, nós do Tibia King agradecemos.
Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.

Spoiler

Congratulations, your content has been approved!
Thank you for your contribution, we of Tibia King we are grateful.
Your content will help many other users, you received +1 REP.

 

Talvez você queira ver:

BestBaiak

[FAQ]Remere's Map Editor - Dúvidas e soluções de bugs 

 

Contato:

1.png.dadb3fc3ee6ffd08292705b6a71e3d88.png Discord:

Link para o post
Compartilhar em outros sites
  • 6 months later...
15 horas atrás, kasemaru1 disse:

Cara aqui eu pesco e n acontece nada, n acusa nada na distro pode me ajudar?

Posta o problema ai amigão, fica mais fácil de quem for ajudar entender do que se trata ?

E fala qual TFS tu usa

 

Programador/Scripter/Mapper nível NOOB ?

 

Untitltasadasded-1.png.e24703844a8ee56fadbf0cdcf82cd9c7.png

Link para o post
Compartilhar em outros sites

@Pedro. pretende fazer um downgrade para versão 0.4? achei muito bacana

Compre seus Scripts Agora totalmente seguro e de forma rápida, aceitamos também encomendas.

discord.gg/phJZeHa2k4

 

Projeto ATS (Naruto)

Informações Abaixo

Facebook

Youtube
Discord

 

Tutoriais / Conteúdos

Clique Aqui

Link para o post
Compartilhar em outros sites
Em 28/11/2020 em 14:11, Xiolones disse:

Posta o problema ai amigão, fica mais fácil de quem for ajudar entender do que se trata ?

E fala qual TFS tu usa

Consegui arrumar tive q mudar o script quase todo kkkkkk mas vlw

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 Imperius
      Olá, pessoal! Acabei encontrando um script que tinha feito a um tempo atrás. Estou compartilhando aqui para quem quiser usar ou melhorar.
       
      É bem parecido com os outros sistemas de roleta, igual deste tópico: https://tibiaking.com/forums/topic/101557-action-cassino-roleta-de-items/
       
      Como funciona?
       
      O "Treasure Chest" é um item custom, onde o jogador têm a possibilidade de ganhar itens raros ou bem meia boca. Tudo dependerá da sorte.
       
      O jogador precisa tacar o treasure chest na bancada e acionar a alavanca. O treasure chest irá se transformar em vários itens de forma randômica no qual o jogador poderá ou não ganhar. No final, apenas um item é entregue ao jogador.
       
      Para entender melhor o seu funcionamento, segue o GIF abaixo:
       

       
       
      em data > actions > actions.xml
       
       
      em data > actions > scripts > crie um arquivo chamado leverTreasureChest.lua
       
       
      no banco de dados do servidor, adicione o seguinte código em "SQL":
       
       
       

      Também estou disponibilizando uma página PHP, para quem quiser usar no site do servidor. Na página tem informações sobre o funcionamento, quais são os possíveis prêmios e a lista de jogadores que ganharam os itens raros.
       

       
       
      Espero ter ajudado de alguma forma! : )
       
      treasure_chest.php
    • Por PokemonXdemon
      [Quest System]
       
       
      Estava ontem analisando minha base, aonde tinha várias quests em arquivos separados.
      Então, pq não organizar tudo em apenas um arquivo exemplo:
      Então fiz esse script, meio simples mas útil para organizar tudo.
       
       
      Agora vamos entender oq precisamos fazer!
       
       Uma pequena atualização,  agora fica em um lugar separado a configuração para ficar mais  fácil modificar.
      Agora pode adicionar o boost que voce deseja no pokemon.
       
      Bem é isso.
    • Por Anderson Sacani
      Venho publicar uma alteração que eu e minha equipe fizemos no script já existente do Canary.
      O arquivo do script se chama quest_system1.lua.
      Fizemos essa alteração, porque o sistema original não entregava chave com actionid ao jogador. A chave vinha com o código 0000, ou seja, não abria nenhuma porta.
      A alteração que fizemos foi justamente para arrumar esse bug, por tanto, agora quando o quest ter uma chave com actionid dentro do baú, o jogador receberá essa mesma chave com o actionid definido.
       
      local specialQuests = { -- {x = 32752, y = 32343, z = 14} [52167] = Storage.DreamersChallenge.Reward, -- {x = 32806, y = 32230, z = 11} [52003] = Storage.PitsOfInferno.WeaponReward, -- {x = 32311, y = 32211, z = 8} [51400] = Storage.ThievesGuild.Reward, [51324] = Storage.WrathoftheEmperor.mainReward, -- {x = 32232, y = 31066, z = 7} [51715] = Storage.SvargrondArena.RewardGreenhorn, -- {x = 32232, y = 31059, z = 7} [51716] = Storage.SvargrondArena.RewardScrapper, -- {x = 32232, y = 31052, z = 7} [51717] = Storage.SvargrondArena.RewardWarlord } local questsExperience = { [3101] = 1 -- dummy values } local questLog = { [8213] = Storage.HiddenCityOfBeregar.DefaultStart } local tutorialIds = { [50080] = 5, [50082] = 6, [50084] = 10, [50086] = 11 } local hotaQuest = { 50950, 50951, 50952, 50953, 50954, 50955 } local questSystem1 = Action() function questSystem1.onUse(player, item, fromPosition, target, toPosition, isHotkey) local storage = specialQuests[item.actionid] if not storage then storage = item.uid if storage > 65535 then return false end end if storage == 23644 or storage == 24632 or storage == 14338 then player:setStorageValue(Storage.SvargrondArena.PitDoor, -1) end if player:getStorageValue(storage) > 0 and player:getAccountType() < ACCOUNT_TYPE_GOD then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The ' .. ItemType(item.itemid):getName() .. ' is empty.') return true end local function copyContainer(originalContainer, newContainer) for i = 0, originalContainer:getSize() - 1 do local originalItem = originalContainer:getItem(i) local newItem = Game.createItem(originalItem.itemid, originalItem.type) newItem:setActionId(originalItem:getActionId()) newItem:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, originalItem:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)) if originalItem:isContainer() then copyContainer(Container(originalItem.uid), Container(newItem.uid)) end newContainer:addItemEx(newItem) end end local items, reward = {} local size = item:isContainer() and item:getSize() or 0 if size == 0 then local actionId = item:getActionId() reward = Game.createItem(item.itemid, item.type) reward:setActionId(actionId) reward:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, item:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)) else local container = Container(item.uid) for i = 0, container:getSize() - 1 do local originalItem = container:getItem(i) local newItem = Game.createItem(originalItem.itemid, originalItem.type) newItem:setActionId(originalItem:getActionId()) newItem:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, originalItem:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)) if originalItem:isContainer() then copyContainer(Container(originalItem.uid), Container(newItem.uid)) end items[#items + 1] = newItem end if size == 1 then reward = items[1] end end local result = '' if reward then local ret = ItemType(reward.itemid) if ret:isRune() then result = ret:getArticle() .. ' ' .. ret:getName() .. ' (' .. reward.type .. ' charges)' elseif ret:isStackable() and reward:getCount() > 1 then result = reward:getCount() .. ' ' .. ret:getPluralName() elseif ret:getArticle() ~= '' then result = ret:getArticle() .. ' ' .. ret:getName() else result = ret:getName() end else if size > 20 then reward = Game.createItem(item.itemid, 1) elseif size > 8 then reward = Game.createItem(2854, 1) else reward = Game.createItem(2853, 1) end for i = 1, size do local tmp = items[i] if reward:addItemEx(tmp) ~= RETURNVALUE_NOERROR then Spdlog.warn("[questSystem1.onUse] - Could not add quest reward to container") end end local ret = ItemType(reward.itemid) result = ret:getArticle() .. ' ' .. ret:getName() end if player:addItemEx(reward) ~= RETURNVALUE_NOERROR then local weight = reward:getWeight() if player:getFreeCapacity() < weight then player:sendCancelMessage(string.format('You have found %s weighing %.2f oz. You have no capacity.', result, (weight / 100))) else player:sendCancelMessage('You have found ' .. result .. ', but you have no room to take it.') end return true end if questsExperience[storage] then player:addExperience(questsExperience[storage], true) end if questLog[storage] then player:setStorageValue(questLog[storage], 1) end if tutorialIds[storage] then player:sendTutorial(tutorialIds[storage]) if item.uid == 50080 then player:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 3) end end if isInArray(hotaQuest, item.uid) then if player:getStorageValue(Storage.TheAncientTombs.DefaultStart) ~= 1 then player:setStorageValue(Storage.TheAncientTombs.DefaultStart, 1) end end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have found ' .. result .. '.') player:setStorageValue(storage, 1) return true end for index, value in pairs(specialQuests) do questSystem1:aid(index) end questSystem1:aid(2000) questSystem1:register()  
    • Por Anderson Sacani
      local config = { scrollId = 14758, premiumDays = 30, } local days = config.premiumDays local premiumScroll = Action() function premiumScroll.onUse(player, item, fromPosition, target, toPosition, isHotkey) player:addPremiumDays(days) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voce recebeu " .. days .. " dias de conta premium.") item:remove(1) addEvent(function() if player:isPlayer() then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "No total voce tem " .. player:getPremiumDays() .. " dias de conta premium.") end end, 2500) return true end premiumScroll:id(config.scrollId) premiumScroll:register() Percebi que alguns servidores estão vindo sem o script do premium scroll, então criei esse script para adicionar 30 dias de premium na conta do jogador que usar o premium scroll.
    • Por amoxicilina
      Action: Remover skull
       
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo