Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Commit 8d24851

Browse files
committed
Add new menu bouton to send commands to all bots
1 parent 642a996 commit 8d24851

11 files changed

Lines changed: 309 additions & 0 deletions

Core/MultiBot.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,27 @@ MultiBot.tips.summon.group =
18631863
"|cffff0000Left-Click to execute Group-Summon|r\n"..
18641864
"|cff999999(Execution-Order: Raid, Party)|r";
18651865

1866+
-- ALL BOTS COMMANDS --
1867+
1868+
MultiBot.tips.allbots = {}
1869+
MultiBot.tips.allbots.sellallvendor = "Sell all vendorable Grey items (ALL BOTS)|cffffffff\n"
1870+
.. "All your bots (those listed in the Units panel) will sell all items\n"
1871+
.. "that can safely be sold to your current vendor target.\n"
1872+
.. "Protected items (keys, Hearthstone, etc.) are never sold.|r\n\n"
1873+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1874+
.. "|cff999999(Executed by: each Bot)|r"
1875+
1876+
MultiBot.tips.allbots.commandsallbots = "Allows you to send commands to all Bots|cffffffff\n"
1877+
.. "All your bots (those listed in the Units panel) will execute the command\n\n"
1878+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1879+
.. "|cff999999(Executed by: each Bot)|r"
1880+
1881+
MultiBot.tips.allbots.maintenanceallbots = "Maintenance (ALL BOTS)|cffffffff\n"
1882+
.. "All your bots (those listed in the Units panel) will run the 'maintenance' command.\n"
1883+
.. "Use this when you want every bot to perform its full maintenance routine at once.|r\n\n"
1884+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1885+
.. "|cff999999(Executed by: each Bot)|r"
1886+
18661887
-- INVENTORY --
18671888

18681889
MultiBot.tips.inventory = {}

Core/MultiBotEngine.lua

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,90 @@ MultiBot.addFrame = function(pName, pX, pY, pSize)
14721472
return tFrame
14731473
end
14741474

1475+
-- MULTIBOT: SELL ALL BOTS --
1476+
-- Envoie une commande de vente à tous les bots listés dans l’onglet "Units".
1477+
-- pCommand : "s *" (tout le gris) ou "s vendor" (tout ce qui est vendable).
1478+
MultiBot.SellAllBots = function(pCommand)
1479+
-- Par défaut : vendre tous les objets gris (safe)
1480+
pCommand = pCommand or "s *"
1481+
1482+
if not MultiBot.isTarget or not MultiBot.isTarget() then
1483+
return 0
1484+
end
1485+
1486+
local frames = MultiBot.frames
1487+
if not frames then return 0 end
1488+
1489+
local multiBar = frames["MultiBar"]
1490+
if not multiBar or not multiBar.frames or not multiBar.frames["Units"] then
1491+
return 0
1492+
end
1493+
1494+
local units = multiBar.frames["Units"]
1495+
if not units.buttons then
1496+
return 0
1497+
end
1498+
1499+
CancelTrade()
1500+
1501+
local count = 0
1502+
1503+
for key, btn in pairs(units.buttons) do
1504+
if type(btn) == "table" then
1505+
local botName = btn.name or (btn.getName and btn.getName()) or key
1506+
if botName and botName ~= "" then
1507+
SendChatMessage(pCommand, "WHISPER", nil, botName)
1508+
count = count + 1
1509+
end
1510+
end
1511+
end
1512+
1513+
-- Si une fenêtre d’inventaire est ouverte, on la rafraîchit pour le bot affiché
1514+
if MultiBot.inventory and MultiBot.inventory:IsVisible() and MultiBot.RefreshInventory then
1515+
MultiBot.RefreshInventory(0.5)
1516+
end
1517+
1518+
return count
1519+
end
1520+
1521+
-- MULTIBOT: MAINTENANCE ALL BOTS --
1522+
-- Envoie la commande "maintenance" à tous les bots listés dans l’onglet "Units".
1523+
MultiBot.MaintenanceAllBots = function()
1524+
local frames = MultiBot.frames
1525+
if not frames then return 0 end
1526+
1527+
local multiBar = frames["MultiBar"]
1528+
if not multiBar or not multiBar.frames or not multiBar.frames["Units"] then
1529+
return 0
1530+
end
1531+
1532+
local units = multiBar.frames["Units"]
1533+
if not units.buttons then
1534+
return 0
1535+
end
1536+
1537+
CancelTrade()
1538+
1539+
local count = 0
1540+
1541+
for key, btn in pairs(units.buttons) do
1542+
if type(btn) == "table" then
1543+
local botName = btn.name or (btn.getName and btn.getName()) or key
1544+
if botName and botName ~= "" then
1545+
SendChatMessage("maintenance", "WHISPER", nil, botName)
1546+
count = count + 1
1547+
end
1548+
end
1549+
end
1550+
1551+
-- Si une fenêtre d’inventaire est ouverte, on peut la rafraîchir pour refléter d’éventuels changements
1552+
if MultiBot.inventory and MultiBot.inventory:IsVisible() and MultiBot.RefreshInventory then
1553+
MultiBot.RefreshInventory(0.5)
1554+
end
1555+
1556+
return count
1557+
end
1558+
14751559
--[[MultiBot.addSelf = function(pClass, pName)
14761560
MultiBot.dprint("addSelf", pName, pClass) -- DEBUG
14771561
if(MultiBot.frames["MultiBar"].frames["Units"].buttons[pName] ~= nil) then return MultiBot.frames["MultiBar"].frames["Units"].buttons[pName] end

Core/MultiBotInit.lua

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,6 +3162,50 @@ tRight.addButton("Summon", 136, 0, "ability_hunter_beastcall", MultiBot.tips.sum
31623162
MultiBot.ActionToGroup("summon")
31633163
end
31643164

3165+
-- COMMANDS FOR ALL BOTS --
3166+
-- Bouton principal à droite qui ouvre un sous-menu de commandes globales.
3167+
local btnAllBots = tRight.addButton("AllBotsCommands", 170, 0,
3168+
"Temp",
3169+
MultiBot.tips.allbots.commandsallbots)
3170+
3171+
btnAllBots.doLeft = function(pButton)
3172+
local menu = tRight.frames and tRight.frames["AllBotsCommandsMenu"]
3173+
if not menu then
3174+
return
3175+
end
3176+
3177+
if menu:IsShown() then
3178+
menu:Hide()
3179+
else
3180+
menu:Show()
3181+
end
3182+
end
3183+
3184+
-- Sous-menu vertical qui s'ouvre au-dessus du bouton principal
3185+
local tAllBotsMenu = tRight.addFrame("AllBotsCommandsMenu", 170, 34, 32, 64)
3186+
tAllBotsMenu:Hide()
3187+
3188+
-- Bouton : Maintenance pour tous les bots
3189+
tAllBotsMenu.addButton("MaintenanceAllBots", 0, 34,
3190+
"achievement_halloween_smiley_01",
3191+
MultiBot.tips.allbots.maintenanceallbots)
3192+
.doLeft = function(pButton)
3193+
if MultiBot.MaintenanceAllBots then
3194+
MultiBot.MaintenanceAllBots()
3195+
end
3196+
end
3197+
3198+
-- Bouton : vendre tous les objets gris pour tous les bots (s *)
3199+
tAllBotsMenu.addButton("SellAllBotsGrey", 0, 0,
3200+
"inv_misc_coin_18",
3201+
MultiBot.tips.allbots.sellallvendor)
3202+
.doLeft = function(pButton)
3203+
if MultiBot.SellAllBots then
3204+
MultiBot.SellAllBots("s *")
3205+
end
3206+
end
3207+
3208+
31653209
-- INVENTORY --
31663210

31673211
MultiBot.inventory = MultiBot.newFrame(MultiBot, -700, -144, 32, 442, 884)

Locales/MultiBotLanguage-deDE.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,26 @@ MultiBot.tips.units.pvpstatstoraid =
11051105
.. "|cffff0000Linksklicken um Group-Summon auszuführen|r\n"
11061106
.. "|cff999999(Ausführreihenfolge: Raid, Party)|r"
11071107

1108+
-- ALL BOTS COMMANDS --
1109+
1110+
MultiBot.tips.allbots.sellallvendor = "Alle verkaufbaren grauen Gegenstände verkaufen (ALLE BOTS)|cffffffff\n"
1111+
.. "Alle deine Bots (die im Einheitenfenster aufgeführt sind) werden alle Gegenstände verkaufen,\n"
1112+
.. "die sicher an den aktuell anvisierten Händler verkauft werden können.\n"
1113+
.. "Geschützte Gegenstände (Schlüssel, Ruhestein usw.) werden niemals verkauft.|r\n\n"
1114+
.. "|cffff0000Betroffen sind alle Bots, die im Einheitenfenster aufgeführt sind.|r\n"
1115+
.. "|cff999999(Ausgeführt von: jedem Bot)|r"
1116+
1117+
MultiBot.tips.allbots.commandsallbots = "Ermöglicht dir, Befehle an alle Bots zu senden|cffffffff\n"
1118+
.. "Alle deine Bots (die im Einheitenfenster aufgeführt sind) werden den Befehl ausführen\n\n"
1119+
.. "|cffff0000Betroffen sind alle Bots, die im Einheitenfenster aufgeführt sind.|r\n"
1120+
.. "|cff999999(Ausgeführt von: jedem Bot)|r"
1121+
1122+
MultiBot.tips.allbots.maintenanceallbots = "Wartung (ALLE BOTS)|cffffffff\n"
1123+
.. "Alle deine Bots (die im Einheitenfenster aufgeführt sind) werden den 'maintenance'-Befehl ausführen.\n"
1124+
.. "Nutze dies, wenn du möchtest, dass jeder Bot seine vollständige Wartungsroutine gleichzeitig durchführt.|r\n\n"
1125+
.. "|cffff0000Betroffen sind alle Bots, die im Einheitenfenster aufgeführt sind.|r\n"
1126+
.. "|cff999999(Ausgeführt von: jedem Bot)|r"
1127+
11081128
-- INVENTORY --
11091129

11101130
MultiBot.tips.inventory.sell = "Items verkaufen|cffffffff\n"

Locales/MultiBotLanguage-enGB.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,26 @@ MultiBot.tips.units.pvpstatstoraid =
10401040
.. "|cffff0000Left-click to activate|r\n"
10411041
.. "|cff999999(Executed by: Raid, Party)|r"
10421042

1043+
-- ALL BOTS COMMANDS --
1044+
1045+
MultiBot.tips.allbots.sellallvendor = "Sell all vendorable Grey items (ALL BOTS)|cffffffff\n"
1046+
.. "All your bots (those listed in the Units panel) will sell all items\n"
1047+
.. "that can safely be sold to your current vendor target.\n"
1048+
.. "Protected items (keys, Hearthstone, etc.) are never sold.|r\n\n"
1049+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1050+
.. "|cff999999(Executed by: each Bot)|r"
1051+
1052+
MultiBot.tips.allbots.commandsallbots = "Allows you to send commands to all Bots|cffffffff\n"
1053+
.. "All your bots (those listed in the Units panel) will execute the command\n\n"
1054+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1055+
.. "|cff999999(Executed by: each Bot)|r"
1056+
1057+
MultiBot.tips.allbots.maintenanceallbots = "Maintenance (ALL BOTS)|cffffffff\n"
1058+
.. "All your bots (those listed in the Units panel) will run the 'maintenance' command.\n"
1059+
.. "Use this when you want every bot to perform its full maintenance routine at once.|r\n\n"
1060+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1061+
.. "|cff999999(Executed by: each Bot)|r"
1062+
10431063
-- INVENTORY --
10441064

10451065
MultiBot.tips.inventory.sell = "Sell Items|cffffffff\n"

Locales/MultiBotLanguage-enUS.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,26 @@ MultiBot.tips.units.pvpstatstoraid =
10401040
.. "|cffff0000Left-click to activate|r\n"
10411041
.. "|cff999999(Executed by: Raid, Party)|r"
10421042

1043+
-- ALL BOTS COMMANDS --
1044+
1045+
MultiBot.tips.allbots.sellallvendor = "Sell all vendorable Grey items (ALL BOTS)|cffffffff\n"
1046+
.. "All your bots (those listed in the Units panel) will sell all items\n"
1047+
.. "that can safely be sold to your current vendor target.\n"
1048+
.. "Protected items (keys, Hearthstone, etc.) are never sold.|r\n\n"
1049+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1050+
.. "|cff999999(Executed by: each Bot)|r"
1051+
1052+
MultiBot.tips.allbots.commandsallbots = "Allows you to send commands to all Bots|cffffffff\n"
1053+
.. "All your bots (those listed in the Units panel) will execute the command\n\n"
1054+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1055+
.. "|cff999999(Executed by: each Bot)|r"
1056+
1057+
MultiBot.tips.allbots.maintenanceallbots = "Maintenance (ALL BOTS)|cffffffff\n"
1058+
.. "All your bots (those listed in the Units panel) will run the 'maintenance' command.\n"
1059+
.. "Use this when you want every bot to perform its full maintenance routine at once.|r\n\n"
1060+
.. "|cffff0000Affects every bot listed in the Units panel.|r\n"
1061+
.. "|cff999999(Executed by: each Bot)|r"
1062+
10431063
-- INVENTORY --
10441064

10451065
MultiBot.tips.inventory.sell = "Sell Items|cffffffff\n"

Locales/MultiBotLanguage-esES.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,26 @@ MultiBot.tips.units.pvpstatstoraid =
11061106
.. "|cff999999(Orden de ejecución: Banda, Grupo)|r"
11071107
-- INVENTAIRE --
11081108

1109+
-- ALL BOTS COMMANDS --
1110+
1111+
MultiBot.tips.allbots.sellallvendor = "Vender todos los objetos grises vendibles (TODOS LOS BOTS)|cffffffff\n"
1112+
.. "Todos tus bots (los que aparecen en el panel de Unidades) venderán todos los objetos\n"
1113+
.. "que puedan venderse de forma segura al vendedor que tienes seleccionado.\n"
1114+
.. "Los objetos protegidos (llaves, Piedra de hogar, etc.) nunca se venden.|r\n\n"
1115+
.. "|cffff0000Afecta a todos los bots listados en el panel de Unidades.|r\n"
1116+
.. "|cff999999(Ejecutado por: cada Bot)|r"
1117+
1118+
MultiBot.tips.allbots.commandsallbots = "Te permite enviar comandos a todos los Bots|cffffffff\n"
1119+
.. "Todos tus bots (los que aparecen en el panel de Unidades) ejecutarán el comando\n\n"
1120+
.. "|cffff0000Afecta a todos los bots listados en el panel de Unidades.|r\n"
1121+
.. "|cff999999(Ejecutado por: cada Bot)|r"
1122+
1123+
MultiBot.tips.allbots.maintenanceallbots = "Mantenimiento (TODOS LOS BOTS)|cffffffff\n"
1124+
.. "Todos tus bots (los que aparecen en el panel de Unidades) ejecutarán el comando 'maintenance'.\n"
1125+
.. "Úsalo cuando quieras que cada bot realice su rutina completa de mantenimiento al mismo tiempo.|r\n\n"
1126+
.. "|cffff0000Afecta a todos los bots listados en el panel de Unidades.|r\n"
1127+
.. "|cff999999(Ejecutado por: cada Bot)|r"
1128+
11091129
MultiBot.tips.inventory.sell = "Vender Objetos|cffffffff\n"
11101130
.. "Activa el modo de venta del inventario.\n"
11111131
.. "Debes seleccionar un comerciante.\n"

Locales/MultiBotLanguage-frFR.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,26 @@ MultiBot.tips.units.pvpstatstoraid =
11081108
.. "|cffff0000Clic gauche pour exécuter Invocation de Groupe|r\n"
11091109
.. "|cff999999(Ordre d'exécution : Raid, Groupe)|r"
11101110

1111+
-- ALL BOTS COMMANDS --
1112+
1113+
MultiBot.tips.allbots.sellallvendor = "Vendre tous les objets gris vendables (TOUS LES BOTS)|cffffffff\n"
1114+
.. "Tous vos bots (ceux listés dans le panneau des unités) vendront tous les objets\n"
1115+
.. "qui peuvent être vendus en toute sécurité au vendeur que vous ciblez actuellement.\n"
1116+
.. "Les objets protégés (clés, Pierre de foyer, etc.) ne sont jamais vendus.|r\n\n"
1117+
.. "|cffff0000Affecte chaque bot listé dans le panneau des unités.|r\n"
1118+
.. "|cff999999(Exécuté par : chaque Bot)|r"
1119+
1120+
MultiBot.tips.allbots.commandsallbots = "Vous permet d’envoyer des commandes à tous les Bots|cffffffff\n"
1121+
.. "Tous vos bots (ceux listés dans le panneau des unités) exécuteront la commande\n\n"
1122+
.. "|cffff0000Affecte chaque bot listé dans le panneau des unités.|r\n"
1123+
.. "|cff999999(Exécuté par : chaque Bot)|r"
1124+
1125+
MultiBot.tips.allbots.maintenanceallbots = "Maintenance (TOUS LES BOTS)|cffffffff\n"
1126+
.. "Tous vos bots (ceux listés dans le panneau des unités) exécuteront la commande 'maintenance'.\n"
1127+
.. "Utilisez ceci lorsque vous souhaitez que chaque bot effectue sa routine complète de maintenance en même temps.|r\n\n"
1128+
.. "|cffff0000Affecte chaque bot listé dans le panneau des unités.|r\n"
1129+
.. "|cff999999(Exécuté par : chaque Bot)|r"
1130+
11111131
-- INVENTAIRE --
11121132

11131133
MultiBot.tips.inventory.sell = "Vendre des Objets|cffffffff\n"

Locales/MultiBotLanguage-koKR.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,26 @@ MultiBot.tips.units.pvpstatstoraid =
11111111
.. "|cffff0000팀 소환을 수행하려면 왼쪽 클릭|r\n"
11121112
.. "|cff999999(명령어 실행: team, team)|r"
11131113

1114+
-- ALL BOTS COMMANDS --
1115+
1116+
MultiBot.tips.allbots.sellallvendor = "판매 가능한 모든 회색 아이템 판매 (전체 봇)|cffffffff\n"
1117+
.. "모든 봇(유닛 패널에 표시된 봇)이 현재 선택한 상인에게\n"
1118+
.. "안전하게 판매할 수 있는 모든 아이템을 판매합니다.\n"
1119+
.. "보호된 아이템(열쇠, 귀환석 등)은 절대 판매되지 않습니다.|r\n\n"
1120+
.. "|cffff0000유닛 패널에 표시된 모든 봇에게 적용됩니다.|r\n"
1121+
.. "|cff999999(실행 주체: 각 Bot)|r"
1122+
1123+
MultiBot.tips.allbots.commandsallbots = "모든 봇에게 명령을 보낼 수 있습니다|cffffffff\n"
1124+
.. "모든 봇(유닛 패널에 표시된 봇)이 해당 명령을 실행합니다\n\n"
1125+
.. "|cffff0000유닛 패널에 표시된 모든 봇에게 적용됩니다.|r\n"
1126+
.. "|cff999999(실행 주체: 각 Bot)|r"
1127+
1128+
MultiBot.tips.allbots.maintenanceallbots = "정비 (전체 봇)|cffffffff\n"
1129+
.. "모든 봇(유닛 패널에 표시된 봇)이 'maintenance' 명령을 실행합니다.\n"
1130+
.. "모든 봇이 동시에 전체 정비 루틴을 수행하도록 하고 싶을 때 사용하세요.|r\n\n"
1131+
.. "|cffff0000유닛 패널에 표시된 모든 봇에게 적용됩니다.|r\n"
1132+
.. "|cff999999(실행 주체: 각 Bot)|r"
1133+
11141134
-- INVENTORY --
11151135

11161136
MultiBot.tips.inventory.sell = "판매중인 상품 |cffffffff\n"

Locales/MultiBotLanguage-ruRU.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,26 @@ MultiBot.tips.units.pvpstatstoraid =
11241124
.. "|cffff0000Левый клик - групповой призыв|r\n"
11251125
.. "|cff999999(Порядок выполнения: Рейд, Группа)|r"
11261126

1127+
-- ALL BOTS COMMANDS --
1128+
1129+
MultiBot.tips.allbots.sellallvendor = "Продать все серые предметы, пригодные для продажи (ВСЕ БОТЫ)|cffffffff\n"
1130+
.. "Все ваши боты (указанные на панели юнитов) продадут все предметы,\n"
1131+
.. "которые можно безопасно продать выбранному вами торговцу.\n"
1132+
.. "Защищённые предметы (ключи, Камень возвращения и т.д.) никогда не продаются.|r\n\n"
1133+
.. "|cffff0000Затрагивает всех ботов, указанных на панели юнитов.|r\n"
1134+
.. "|cff999999(Выполняется: каждым Ботом)|r"
1135+
1136+
MultiBot.tips.allbots.commandsallbots = "Позволяет отправлять команды всем Ботам|cffffffff\n"
1137+
.. "Все ваши боты (указанные на панели юнитов) выполнят эту команду\n\n"
1138+
.. "|cffff0000Затрагивает всех ботов, указанных на панели юнитов.|r\n"
1139+
.. "|cff999999(Выполняется: каждым Ботом)|r"
1140+
1141+
MultiBot.tips.allbots.maintenanceallbots = "Обслуживание (ВСЕ БОТЫ)|cffffffff\n"
1142+
.. "Все ваши боты (указанные на панели юнитов) выполнят команду 'maintenance'.\n"
1143+
.. "Используйте это, когда хотите, чтобы каждый бот выполнил полный цикл обслуживания одновременно.|r\n\n"
1144+
.. "|cffff0000Затрагивает всех ботов, указанных на панели юнитов.|r\n"
1145+
.. "|cff999999(Выполняется: каждым Ботом)|r"
1146+
11271147
-- INVENTORY --
11281148

11291149
MultiBot.tips.inventory.sell = "Продажа предметов|cffffffff\n"

0 commit comments

Comments
 (0)