mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-24 00:15:02 +02:00
Updated to OTCv8 3.0 rev 19
This commit is contained in:
31
modules/game_bot/default_configs/vBot/cavebot/supply.lua
Normal file
31
modules/game_bot/default_configs/vBot/cavebot/supply.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
CaveBot.Extensions.Supply = {}
|
||||
|
||||
local ui
|
||||
|
||||
-- first function called, here you should setup your UI
|
||||
CaveBot.Extensions.Supply.setup = function()
|
||||
--ui = UI.createWidget('SupplyItemList')
|
||||
--local widget = UI.createWidget('SupplyItem', ui.list)
|
||||
--widget.item.onItemChange = function(newItem)
|
||||
--widget.fields.min.onTextChange = function(newText)
|
||||
--widget.fields.max.onTextChange = function(newText)
|
||||
--make it similar to UI.Container, so if there are no free slots, add another one, keep min 4 slots, check if value min/max is number after edit
|
||||
end
|
||||
|
||||
-- called when cavebot config changes, configData is a table but it can be nil
|
||||
CaveBot.Extensions.Supply.onConfigChange = function(configName, isEnabled, configData)
|
||||
if not configData then return end
|
||||
|
||||
end
|
||||
|
||||
-- called when cavebot is saving config, should return table or nil
|
||||
CaveBot.Extensions.Supply.onSave = function()
|
||||
return {}
|
||||
end
|
||||
|
||||
-- bellow add you custom functions
|
||||
-- this function can be used in cavebot function waypoint as: return Supply.run(retries, prev)
|
||||
-- there are 2 useful parameters - retries (number) and prev (true/false), check actions.lua to learn more
|
||||
CaveBot.Extensions.Supply.run = function(retries, prev)
|
||||
return true
|
||||
end
|
||||
Reference in New Issue
Block a user