Ir para conteúdo

Bruno Rezende

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Curtir
    Bruno Rezende deu reputação a L3K0T em PISO QUE REMOVE PAREDE   
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        local time = 30 -- em segundos
        local item_id = 1543 -- ID da parede
        local requiredItemCount = 100 -- Quantidade necessária do item ID 4848
        
        local wallPositions = {
            {x = 186, y = 54, z = 7},
            {x = 187, y = 54, z = 7},
            {x = 186, y = 55, z = 7},
            {x = 187, y = 55, z = 7},
            -- Adicione mais posições de paredes aqui conforme necessário
            {x = 188, y = 55, z = 7},
            {x = 189, y = 55, z = 7},
            -- Adicione mais posições de paredes aqui conforme necessário
            -- Continue adicionando mais 100 posições de paredes
        }
        
        -- Verifica se o jogador possui a quantidade necessária do item
        if getPlayerItemCount(cid, 4848) < requiredItemCount then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa ter 100 itens do ID 4848 para usar esta alavanca.")
            return true
        end
        
        local removedCount = 0
        
        for i = 1, #wallPositions do
            local wallpos = wallPositions[i]
            local tile = getTileItemById(wallpos, item_id)
            
            if tile and tile.uid > 0 then
                doRemoveItem(tile.uid)
                doSendMagicEffect(wallpos, CONST_ME_POFF)
                addEvent(doCreateItem, time * 1000, item_id, 1, wallpos)
                removedCount = removedCount + 1
            end
        end
        
        if removedCount > 0 then
            -- Remove os 100 itens do ID 4848 do inventário do jogador
            doPlayerRemoveItem(cid, 4848, requiredItemCount)
            return true
        else
            return false
        end
    end
     
    Foi removido o erro que você citou e adicionado verificação do item que você pediu
     
  2. Curtir
    Bruno Rezende deu reputação a L3K0T em PISO QUE REMOVE PAREDE   
    Se a parede for outro id cópia e faça com outro id, só seguir esse codigo
     
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        local time = 30 -- em segundos
        local item_id = 1543 -- ID da parede
        
        local wallPositions = {
            {x = 186, y = 54, z = 7},
            {x = 187, y = 54, z = 7},
            {x = 186, y = 55, z = 7},
            {x = 187, y = 55, z = 7},
            -- Adicione mais posições de paredes aqui conforme necessário
            {x = 188, y = 55, z = 7},
            {x = 189, y = 55, z = 7},
            -- Adicione mais posições de paredes aqui conforme necessário
            -- Continue adicionando mais 100 posições de paredes
        }
        
        for i = 1, #wallPositions do
            local wallpos = wallPositions[i]
            local tile = getTileItemById(wallpos, item_id)
            
            if tile then
                doRemoveItem(tile.uid)
                doSendMagicEffect(wallpos, CONST_ME_POFF)
                addEvent(doCreateItem, time * 1000, item_id, 1, wallpos)
            end
        end
        
        return true
    end
     
  3. Curtir
    Alguem tem a solução desse bug? Não consigo encontrar em lugar nenhum.
  4. Gostei
    Bruno Rezende recebeu reputação de Vodkart em [OTX] New Auto Loot Unlimited Edition 2.0   
    Sim, inclusive funciona. Como eu falei, acontece esporadicamente.
  5. Gostei
    Bruno Rezende recebeu reputação de Vodkart em Problema Task System 4.0 - Vodkart   
    O "peso" eu falo por muitas pessoas consultarem simultaneamente um arquivo externo no disco, não o tamanho em si. O erro te mandei acima.
  6. Gostei
    Bruno Rezende recebeu reputação de Vodkart em Problema Task System 4.0 - Vodkart   
    Meu mod está resetando as tasks no meio dela, tá estranho.

    <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Simple Task" version="4.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="task_func"><![CDATA[ task_sys = { [1] = {name = "Trolls", start = 176201, monsters_list = {"Troll"}, level = 8, count = 40, points = 1, items = {}, reward = {}, exp = 20000, money = 2000}, [2] = {name = "rotworms", start = 176202, monsters_list = {"rotworm"}, level = 12, count = 50, points = 1, items = {}, reward = {}, exp = 25000, money = 3000}, [3] = {name = "Minotaurs", start = 176216, monsters_list = {"minotaur","minotaur guard","minotaur archer","minotaur mage"}, level = 15, count = 150, points = 2, items = {}, reward = {}, exp = 30000, money = 10000}, [4] = {name = "cyclops", start = 176203, monsters_list = {"cyclops"}, level = 19, count = 60, points = 2, items = {}, reward = {{2486,1}}, exp = 30000, money = 3000}, [5] = {name = "Dwarves", start = 176210, monsters_list = {"dwarf","dwarf soldier","dwarf guard","dwarf geomancer"}, level = 42, count = 150, points = 4, items = {}, reward = {}, exp = 200000, money = 15000}, [6] = {name = "Terror Birds", start = 176206, monsters_list = {"Terror Bird"}, level = 30, count = 120, points = 3, items = {}, reward = {}, exp = 100000, money = 5000}, [7] = {name = "Stone Golems", start = 176207, monsters_list = {"Stone Golem"}, level = 33, count = 130, points = 4, items = {}, reward = {}, exp = 120000, money = 7000}, [8] = {name = "Carniphilas", start = 176208, monsters_list = {"carniphila"}, level = 36, count = 135, points = 4, items = {}, reward = {}, exp = 80000, money = 8000}, [9] = {name = "Elephants", start = 176209, monsters_list = {"elephant"}, level = 40, count = 150, points = 4, items = {}, reward = {}, exp = 120000, money = 8200}, [10] = {name = "Green Djinn", start = 176204, monsters_list = {"Green Djinn","Efreet"}, level = 23, count = 80, points = 3, items = {}, reward = {}, exp = 100000, money = 5000}, [11] = {name = "Blue Djinn", start = 176205, monsters_list = {"Blue Djinn","Marid"}, level = 25, count = 80, points = 3, items = {}, reward = {}, exp = 100000, money = 5000}, [12] = {name = "Necromancer" ,start = 176213, monsters_list = {"Necromancer"}, level = 60, count = 200, points = 5, items = {}, reward = {}, exp = 200000, money = 15000}, [13] = {name = "Bonebeasts" ,start = 176214, monsters_list = {"Bonebeast"}, level = 63, count = 250, points = 5, items = {}, reward = {}, exp = 250000, money = 11000}, [14] = {name = "Vampires", start = 176211, monsters_list = {"vampire"}, level = 46, count = 170, points = 5, items = {}, reward = {}, exp = 80000, money = 8500}, [15] = {name = "Dragons", start = 176212, monsters_list = {"dragon"}, level = 50, count = 120, points = 5, items = {}, reward = {}, exp = 90000, money = 9000}, [16] = {name = "Heroes", start = 176240, monsters_list = {"Hero"}, level = 50, count = 320, points = 7, items = {}, reward = {}, exp = 200000, money = 30000}, [17] = {name = "Giant Spider" ,start = 176215, monsters_list = {"Giant Spider","The old widow"}, level = 80, count = 500, points = 6, items = {}, reward = {}, exp = 200000, money = 32000}, [18] = {name = "Hellspawn" ,start = 176232, monsters_list = {"Hellspawn"}, level = 80, count = 500, points = 7, items = {}, reward = {}, exp = 300000, money = 52000}, [19] = {name = "Dragon Lords" ,start = 176219, monsters_list = {"Dragon lord"}, level = 88, count = 650, points = 6, items = {}, reward = {}, exp = 35000, money = 35000}, [20] = {name = "Hydras" ,start = 176222, monsters_list = {"Hydra"}, level = 100, count = 700, points = 7, items = {{4850,10}}, reward = {}, exp = 400000, money = 40000}, [21] = {name = "Serpent Spawn" ,start = 176223, monsters_list = {"Serpent Spawn"}, level = 103, count = 720, points = 7, items = {{2445,1}}, reward = {}, exp = 500000, money = 45000}, [22] = {name = "Behemoths" ,start = 176224, monsters_list = {"Behemoth"}, level = 108, count = 800, points = 8, items = {}, reward = {}, exp = 5000000, money = 200000}, [23] = {name = "Demons" ,start = 176225, monsters_list = {"Demon"}, level = 110, count = 6666, points = 20, items = {}, reward = {{2495,1}}, exp = 6660000, money = 500000}, [24] = {name = "Ashmunrah" ,start = 176233, monsters_list = {"Ashmunrah"}, level = 110, count = 500, points = 20, items = {}, reward = {}, exp = 1500000, money = 200000}, [25] = {name = "Rahemos" ,start = 176234, monsters_list = {"Rahemos"}, level = 110, count = 500, points = 20, items = {}, reward = {}, exp = 1500000, money = 200000}, [26] = {name = "Thalas" ,start = 176235, monsters_list = {"Thalas"}, level = 110, count = 500, points = 20, items = {}, reward = {}, exp = 1500000, money = 200000}, [27] = {name = "Dipthrah" ,start = 176236, monsters_list = {"Dipthrah"}, level = 110, count = 500, points = 20, items = {}, reward = {}, exp = 1500000, money = 200000}, [28] = {name = "Mahrdis" ,start = 176237, monsters_list = {"Mahrdis"}, level = 110, count = 500, points = 20, items = {}, reward = {}, exp = 1500000, money = 200000}, [29] = {name = "Omruc" ,start = 176238, monsters_list = {"Omruc"}, level = 110, count = 500, points = 20, items = {}, reward = {}, exp = 1500000, money = 200000}, [30] = {name = "Morguthis" ,start = 176239, monsters_list = {"Morguthis"}, level = 110, count = 500, points = 20, items = {}, reward = {}, exp = 1500000, money = 200000}, [31] = {name = "Orshabaals" ,start = 176226, monsters_list = {"Orshabaal"}, level = 120, count = 300, points = 10, items = {}, reward = {{2341,1},{5114,1}}, exp = 9960000, money = 800000}, [32] = {name = "Ferumbras" ,start = 176227, monsters_list = {"Ferumbras"}, level = 130, count = 100, points = 10, items = {}, reward = {{5161,1}}, exp = 6660000, money = 666000}, [33] = {name = "Golden Knights" ,start = 176228, monsters_list = {"Golden Knight"}, level = 200, count = 100, points = 10, items = {}, reward = {{2646,1}}, exp = 10660000, money = 900000}, [34] = {name = "Cacheros" ,start = 176229, monsters_list = {"Cachero"}, level = 200, count = 500, points = 10, items = {}, reward = {{2646,1}}, exp = 10000000, money = 300000}, [35] = {name = "Eternal Oblivions" ,start = 176230, monsters_list = {"Eternal Oblivion"}, level = 500, count = 200, points = 10, items = {}, reward = {{2646,1}}, exp = 10000000, money = 300000}, [36] = {name = "Infernus" ,start = 176231, monsters_list = {"Infernus"}, level = 200, count = 300, points = 15, items = {}, reward = {{5149,3}}, exp = 10000000, money = 300000} } daily_task = { [1] = {name = "Orcs" ,monsters_list = {"Orc Berserker","Orc Rider","Orc Leader","Orc Warlord", "Orc", "Orc Spearman", "Orc Warrior"}, count = 100, points = 2, reward = {}, exp = 50000, money = 10000}, [2] = {name = "Rotworms" ,monsters_list = {"Rotworm"}, count = 220, points = 2, reward = {}, exp = 90000, money = 12000}, [3] = {name = "Cyclops" ,monsters_list = {"Cyclops"}, count = 165, points = 3, reward = {}, exp = 9000, money = 15000}, [4] = {name = "Minotaurs" ,monsters_list = {"minotaur","minotaur guard","minotaur archer","minotaur mage"}, count = 185, points = 3, reward = {}, exp = 90000, money = 15000}, [5] = {name = "Ghouls" ,monsters_list = {"Ghoul"}, count = 150, points = 3, reward = {}, exp = 90000, money = 11000}, [6] = {name = "Dragons" ,monsters_list = {"Dragon"}, count = 150, points = 3, reward = {}, exp = 20000, money = 10000}, [7] = {name = "Vampires" ,monsters_list = {"Vampire"}, count = 200, points = 3, reward = {}, exp = 200000, money = 25000}, [8] = {name = "Ancient Scarabs" ,monsters_list = {"Ancient Scarab"}, count = 180, points = 5, reward = {}, exp = 220000, money = 18000}, [9] = {name = "Behemoths" ,monsters_list = {"Behemoth"}, count = 300, points = 5, reward = {}, exp = 500000, money = 60000}, [10] = {name = "Heroes" ,monsters_list = {"Hero"}, count = 260, points = 5, reward = {}, exp = 400000, money = 55000}, [11] = {name = "Black Knights" ,monsters_list = {"Black Knight"}, count = 260, points = 5, reward = {}, exp = 400000, money = 55000}, [12] = {name = "Giant Spiders" ,monsters_list = {"Giant Spider"}, count = 350, points = 5, reward = {}, exp = 60000, money = 70000}, [13] = {name = "Warlocks" ,monsters_list = {"Warlock"}, count = 700, points = 5, reward = {{2173,1}}, exp = 90000, money = 120000}, [14] = {name = "Hydras" ,monsters_list = {"Hydra"}, count = 700, points = 5, reward = {}, exp = 100000, money = 160000}, [15] = {name = "Dragon Lords" ,monsters_list = {"Dragon Lord"}, count = 400, points = 5, reward = {{2445,1}}, exp = 1300000, money = 200000}, [16] = {name = "Frost Dragons" ,monsters_list = {"Frost Dragon"}, count = 400, points = 5, reward = {{2445,1}}, exp = 1300000, money = 200000}, [17] = {name = "Serpent Spawns" ,monsters_list = {"Serpent Spawn"}, count = 400, points = 5, reward = {{2445,1}}, exp = 1300000, money = 200000}, [18] = {name = "Juggernauts" ,monsters_list = {"Juggernaut"}, count = 600, points = 5, reward = {{5156,1}}, exp = 1000000, money = 200000}, [19] = {name = "Undead Dragons" ,monsters_list = {"Undead Dragon"}, count = 600, points = 8, reward = {{5154,1}}, exp = 1000000, money = 200000}, [20] = {name = "Hellhounds" ,monsters_list = {"Hellhound"}, count = 600, points = 8, reward = {{5159,1}}, exp = 1000000, money = 200000}, [21] = {name = "Cacheros" ,monsters_list = {"Cachero"}, count = 600, points = 10, reward = {}, exp = 10000000, money = 300000} } task_sys_storages = {176601, 176602, 176603, 176604, 176605, 176606, 176607, 176608} -- task, points, count, daily task, daily count, daily time , daily start, contador function getTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[1]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[1]) end function getDailyTaskMission(cid) return getPlayerStorageValue(cid,task_sys_storages[4]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[4]) end function getTaskPoints(cid) return getPlayerStorageValue(cid,task_sys_storages[2]) < 0 and 0 or getPlayerStorageValue(cid,task_sys_storages[2]) end function doRandomDailyTask(cid) local t = { [{6,80}] = {1,5}, [{81,149}] = {6,12}, [{150,250}] = {13,17}, [{251,math.huge}] = {18,21} } for a , b in pairs(t) do if getPlayerLevel(cid) >= a[1] and getPlayerLevel(cid) <= a[2] then return math.random(b[1], b[2]) end end return 0 end function GetRankTask(cid) local ranks = { [{1, 20}] = "Huntsman", [{21, 50}] = "Ranger", [{51, 100}] = "Big Game Hunter", [{101, 200}] = "Senior Hunter", [{201, math.huge}] = "Extreme Hunter" } for v , r in pairs(ranks) do if getTaskPoints(cid) >= v[1] and getTaskPoints(cid) <= v[2] then return r end end return 0 end function getItemsFromList(items) local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. getItemNameById(items[i][1]) if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function doRemoveItemsFromList(cid,items) local count = 0 if table.maxn(items) > 0 then for i = 1, table.maxn(items) do if getPlayerItemCount(cid,items[i][1]) >= items[i][2] then count = count + 1 end end end if count == table.maxn(items) then for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[i][1],items[i][2]) end else return false end return true end function getMonsterFromList(monster) local str = '' if #monster > 0 then for i = 1, #monster do str = str .. monster[i] if i ~= #monster then str = str .. ', ' end end end return str end function GiveRewardsTask(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function isSummon(cid) if(not isCreature(cid)) then return false end return getCreatureMaster(cid) ~= cid end ]]></config> <event type="login" name="TaskLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "KillTask") registerCreatureEvent(cid, "TaskLook") return true end]]></event> <talkaction words="/task;!task" event="buffer"><![CDATA[ domodlib('task_func') param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid) if isInArray({"counter","contador"},param) then setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] The counter was "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "enabled" or "disabled")..".") return true elseif isInArray({"daily","diaria"},param) then if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then doPlayerSendCancel(cid, "Sorry, but you are not on any Task Daily.") return true elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then doPlayerSendCancel(cid,"Sorry, you didn't finish the Daily Task in time! Please go back to NPC Task and start a new Daily Task.") return true end return doShowTextDialog(cid, 1961, "[->] CURRENT DAILY TASK INFO [<-]\n\nName: "..daily_task[daily].name.."\nProgress: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nDelivery time: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonsters to hunt: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperience: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].points.."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "None")..".") end if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then doPlayerSendCancel(cid, "You are not on any task.") return true end return doShowTextDialog(cid, 1961, "-> TASK POINTS [" .. getTaskPoints(cid).. "] <- \n\n-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "None")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..((tonumber(task_sys[task].money) and tonumber(task_sys[task].money) > 0) and task_sys[task].money or 0).."\nReward Experience: "..((tonumber(task_sys[task].exp) and tonumber(task_sys[task].exp) > 0) and task_sys[task].exp or 0).."\nReward Points: "..task_sys[task].points.."\nReward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "None")..".") ]]></talkaction> <event type="look" name="TaskLook" event="script"><![CDATA[ domodlib('task_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and getTaskPoints(thing.uid) > 0 then doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").. " is a "..GetRankTask(thing.uid)) end return true end]]></event> <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower())then local ab = getPlayerStorageValue(cid, task_sys_storages[3]) == -1 and tonumber(0) or tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) if tonumber(ab) and tonumber(ab) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], ab <= 0 and tonumber(1) or tonumber(ab+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] You defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) .. "/" .. t.count .. "] of the Task of the " .. t.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Congratulations! You have finished the Task of "..t.name..", go back to NPC to get your reward.") end end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) then local cd = getPlayerStorageValue(cid, task_sys_storages[5]) == -1 and tonumber(0) or tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) if tonumber(cd) and cd < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], cd <= 0 and tonumber(1) or tonumber(cd+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] You defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) .. "/" .. daily.count .. "] of the Task of the " .. daily.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Congratulations! You have finished the Task of "..daily.name..", go back to NPC to get your reward.") end end end return true end return true end]]></event> </mod>  
  7. Gostei
    Bruno Rezende deu reputação a Naze em Otimizado: AutoLoot in Sources for Otx(2 ou menor)   
    Uns dos problemas das maiorias dos otserv casual que estão online é o autoloot, alguns com erros e defeito na checagem dos containers e sempre consumindo muito por ser em lua fazendo checagens de tile, corpo, itens e etc. Por isso decidi da uma contribuição a essa comunidade que me evoluiu bastante um autoloot diretamente na source na função que insere os itens no corpo, otimizando em 100% na hr da entrega do item, e não tendo problemas ocasionais como corpos sobre corpos ou varias bags.
     
         Esse sistema já é bem comum quando comprado, mas gratuito acredito que ainda não tinha disponível, então fiz esse totalmente do 0 na source tfs 0.4 rev 3999 (do yan) e passei para Otx corrigindo alguns erros de compatibilidade.
        
        Atenção na instalação! Qualquer problema pra compilar que envolva as linhas presente no código verifique novamente se instalou corretamente antes de pedir ajuda para evitar flood. Qualquer bug, erro ou mal funcionamento encontrado pode postar que estarei corrigindo, mas não irei customizar a seu agrado, você consegue fazer isso sozinho com atenção e calma, e se precisa de ajuda é só posta as duvidas.
     
    Imagens do Sistema:
     
    Características: 
    -> Otimizado executando apenas funções necessarias -> Comandos simples e praticos -> !autoloot on/off //Autoloot estara sempre ligado, e caso queria desliga use '!autoloot off' -> !autoloot bank/bag //Define para onde ira o dinheiro coletado, direto banco ou no inventario -> !autoloot list //Lista todos itens adicionados para coleta -> !autoloot clear/clean //Remove todos itens da lista -> !autoloot add, name item, name item, ... //Adiciona itens na lista, podendo adicionar quantos quiser de uma vez. Ele retorna um messagem dizendo os itens que foram adicionados e os que deram erro e não foram adicionados, talvez por escrito errado, ja existente na lista, na lista de bloquados, etc. -> !autoloot remove, item name, item name, ... //Remove itens da lista, com a mesma logica do add. -> Opções configuravel pelo Config.lua -> AutoLoot_MoneyIDs //IDs dos Itens Moedas do servidor como gold coins, platinium coins, crystal coins. -> AutoLoot_BlockIDs //IDs dos itens bloqueados para autoloot -> AutoLoot_MaxItem //Quantidade maxima de itens para adicionar a lista -> Sistema livres de bugs ou logs de erros.  
    Instalação:
    Toda instalação será feita na source, exceto por 1 linha em talkactions.xml e 3 variáveis no config.lua
     
    Otx :
     
    Link para TFS -> https://tibiaking.com/forums/topic/101079-otimizado-autoloot-in-sources-for-tfs-036-tfs-04/
     
    Caso ocorra algum erro na compilação so mandar que ajudo a resolver, testei apenas em uma otx que tenho então nao sei se pode sugir outros problemas. Nas versões atual da Otx para servidores 10+ não ira funcionar pois algumas funções são diferente e não irei corrigir agora, em breve passo o mesmo pra tfs 1.3 e otx3.
     
    Esse sistema foi totalmente feito por mim, mas dou créditos também ao @Mathias Kenfi por me ajudar muito na evolução em lua/c++ e a tabela sql é a mesma usada no quick autoloot 1.3 postado por Pedriinz
  8. Gostei
    Bruno Rezende deu reputação a Vodkart em [8.6] Task System 4.0! (Task system + Daily Task System)   
    Sim, mas preciso ver os erros, qual distro é, etc... me manda seu discord
  9. Gostei
    Bruno Rezende recebeu reputação de So volto tarde em (Resolvido)[0.3.6] Item que boosta skills   
    --<action itemid="XXXX" event="script" value="script.lua"/> local config = { level = false, remove = true, time = 30, -- Time is in minutes message = {MESSAGE_EVENT_ADVANCE, "You feel the power growing."}, conditions = {} } -- Sorcerer config.conditions[1] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(config.conditions[1], CONDITION_PARAM_TICKS, config.time * 1000 * 60) setConditionParam(config.conditions[1], CONDITION_PARAM_STAT_MAGICLEVEL, 5) setConditionParam(config.conditions[1], CONDITION_PARAM_BUFF, true) -- Druid config.conditions[2] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(config.conditions[2], CONDITION_PARAM_TICKS, config.time * 1000 * 60) setConditionParam(config.conditions[2], CONDITION_PARAM_STAT_MAGICLEVEL, 5) setConditionParam(config.conditions[2], CONDITION_PARAM_BUFF, true) -- Paladin config.conditions[3] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(config.conditions[3], CONDITION_PARAM_TICKS, config.time * 1000 * 60) setConditionParam(config.conditions[3], CONDITION_PARAM_SKILL_DISTANCE, 15) setConditionParam(config.conditions[3], CONDITION_PARAM_STAT_MAGICLEVEL, 3) setConditionParam(config.conditions[3], CONDITION_PARAM_BUFF, true) -- Knight config.conditions[4] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(config.conditions[4], CONDITION_PARAM_TICKS, config.time * 1000 * 60) setConditionParam(config.conditions[4], CONDITION_PARAM_SKILL_CLUB, 30) setConditionParam(config.conditions[4], CONDITION_PARAM_SKILL_SWORD, 30) setConditionParam(config.conditions[4], CONDITION_PARAM_SKILL_AXE, 30) setConditionParam(config.conditions[4], CONDITION_PARAM_BUFF, true) function onUse(cid, item, fromPosition, itemEx, toPosition) if config.level then if getPlayerLevel(cid) < config.level then return doPlayerSendCancel(cid, "You need to be level " .. config.level .. " or higher.") end end if hasCreatureCondition(cid, CONDITION_ATTRIBUTES) then return doPlayerSendCancel(cid, "You cannot use this item more than once.") end if config.remove then doRemoveItem(item.uid, 1) end if config.message then doPlayerSendTextMessage(cid, config.message[1], config.message[2]) end local voc = (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5) and 1 or (getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6) and 2 or (getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7) and 3 or (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) and 4 doAddCondition(cid, config.conditions[voc]) return true end Resolvi com esse código
  10. Gostei
    Bruno Rezende recebeu reputação de Vodkart em [7.72] Info Monster - Talkaction   
    .Qual servidor ou website você utiliza como base? 
    The OTX Server Version: (2.100 - 6000) - Codename: (FINAL)
    Qual o motivo deste tópico? 
    Estou disponibilizando um script muito interessante mas preciso de um ajuste final, nessa talkaction, quando você digita /info nome.monstro ele trás as informações de vida, exp e loot. Quando você digita um nome incorreto, ele abre uma janela dizendo que o nome do monstro está incorreto e trás a lista de monstros. Tudo está funcional, porém quando a pessoa digita o nome do monstro incorreto, dá um erro na minha console:
     
     
    Está surgindo algum erro? Se sim coloque-o aqui. 
     
    Você tem o código disponível? Se tiver publique-o aqui: 
      function getDirMonsterByNameMonster(name) t = {} local monster = io.open("data/monster/monsters.xml", "r") for i in monster:read("*a"):gmatch('<monster name="'..tostring(name)..'" file="(.-)"/>') do table.insert(t, tostring(i)) end return t[1] or 0 end function getMonsterLootItens(name) local dir = "data/monster/"..getDirMonsterByNameMonster(name).."" local monster = io.open(""..dir.."", "r") str = "" for i in monster:read("*a"):gmatch('id="(.-)"') do str = ""..str.." - "..getItemNameById(i).."" end return str end function getAllMonster() local str = "" local monster = io.open("data/monster/monsters.xml", "r") str = "Voce digitou incorretamente o nome do monstro veja a lista de monstro\n" for i in monster:read("*a"):gmatch('<monster name="(.-)"') do str = ""..str.." - "..i.."" end return str end function getAttrMonster(name) return "Life = "..getMonsterInfo(name).health.."\nExp = "..getMonsterInfo(name).experience.."\n" end function onSay(cid, words, param, channel) if param == "" or not param or param == " " then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce precisa dizer o nome do monstro") return true end local name = param:lower() if getMonsterInfo(name) then name = name:gsub("(%l)(%w*)", function(a,b) return string.upper(a)..b end) doShowTextDialog(cid, 1397, "Info Monster "..name.."\n"..getAttrMonster(name).."\n\nLoots = "..getMonsterLootItens(name).."") else doShowTextDialog(cid, 1397, getAllMonster()) return true end return true end Poderiam me ajudar para remover esse erro da console? Segue script da talkaction, obrigado.
    Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
     

  11. Gostei
    Bruno Rezende recebeu reputação de Vodkart em [7.72]MOD Autoloot - mostrar comandos   
    Consegui fazer funcionar. Nessa versão não existe a janela For Your Information (FYI), então o código foi alterado para um texto comum:
     
    Trocado
    return doPlayerPopupFYI(cid, str) Para:
    doShowTextDialog(cid, 1961, str)  

Informação Importante

Confirmação de Termo