mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-30 03:09:20 +02:00
17 lines
694 B
Lua
17 lines
694 B
Lua
local context = G.botContext
|
|
local Panels = context.Panels
|
|
|
|
Panels.TradeMessage = function(parent)
|
|
context.macro(60000, "Send message on trade", nil, function()
|
|
local trade = context.getChannelId("advertising")
|
|
if not trade then
|
|
trade = context.getChannelId("trade")
|
|
end
|
|
if context.storage.autoTradeMessage:len() > 0 and trade then
|
|
context.sayChannel(trade, context.storage.autoTradeMessage)
|
|
end
|
|
end, parent)
|
|
context.addTextEdit("autoTradeMessage", context.storage.autoTradeMessage or "I'm using OTClientV8 - https://github.com/OTCv8/otclientv8", function(widget, text)
|
|
context.storage.autoTradeMessage = text
|
|
end, parent)
|
|
end |