mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-11-03 04:16:23 +01:00
Updated to OTCv8 3.1 rev 224
This commit is contained in:
46
modules/game_bot/default_configs/vBot_4.7/vBot/tools.lua
Normal file
46
modules/game_bot/default_configs/vBot_4.7/vBot/tools.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
-- tools tab
|
||||
setDefaultTab("Tools")
|
||||
|
||||
if type(storage.moneyItems) ~= "table" then
|
||||
storage.moneyItems = {3031, 3035}
|
||||
end
|
||||
macro(1000, "Exchange money", function()
|
||||
if not storage.moneyItems[1] then return end
|
||||
local containers = g_game.getContainers()
|
||||
for index, container in pairs(containers) do
|
||||
if not container.lootContainer then -- ignore monster containers
|
||||
for i, item in ipairs(container:getItems()) do
|
||||
if item:getCount() == 100 then
|
||||
for m, moneyId in ipairs(storage.moneyItems) do
|
||||
if item:getId() == moneyId.id then
|
||||
return g_game.use(item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local moneyContainer = UI.Container(function(widget, items)
|
||||
storage.moneyItems = items
|
||||
end, true)
|
||||
moneyContainer:setHeight(35)
|
||||
moneyContainer:setItems(storage.moneyItems)
|
||||
|
||||
UI.Separator()
|
||||
|
||||
macro(60000, "Send message on trade", function()
|
||||
local trade = getChannelId("advertising")
|
||||
if not trade then
|
||||
trade = getChannelId("trade")
|
||||
end
|
||||
if trade and storage.autoTradeMessage:len() > 0 then
|
||||
sayChannel(trade, storage.autoTradeMessage)
|
||||
end
|
||||
end)
|
||||
UI.TextEdit(storage.autoTradeMessage or "I'm using OTClientV8!", function(widget, text)
|
||||
storage.autoTradeMessage = text
|
||||
end)
|
||||
|
||||
UI.Separator()
|
||||
Reference in New Issue
Block a user