diff --git a/Core/MultiBot.lua b/Core/MultiBot.lua index 7229619..5763a67 100644 --- a/Core/MultiBot.lua +++ b/Core/MultiBot.lua @@ -1863,6 +1863,27 @@ MultiBot.tips.summon.group = "|cffff0000Left-Click to execute Group-Summon|r\n".. "|cff999999(Execution-Order: Raid, Party)|r"; +-- ALL BOTS COMMANDS -- + +MultiBot.tips.allbots = {} + MultiBot.tips.allbots.sellallvendor = "Sell all vendorable Grey items (ALL BOTS)|cffffffff\n" + .. "All your bots (those listed in the Units panel) will sell all items\n" + .. "that can safely be sold to your current vendor target.\n" + .. "Protected items (keys, Hearthstone, etc.) are never sold.|r\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + + MultiBot.tips.allbots.commandsallbots = "Allows you to send commands to all Bots|cffffffff\n" + .. "All your bots (those listed in the Units panel) will execute the command\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + + MultiBot.tips.allbots.maintenanceallbots = "Maintenance (ALL BOTS)|cffffffff\n" + .. "All your bots (those listed in the Units panel) will run the 'maintenance' command.\n" + .. "Use this when you want every bot to perform its full maintenance routine at once.|r\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + -- INVENTORY -- MultiBot.tips.inventory = {} diff --git a/Core/MultiBotEngine.lua b/Core/MultiBotEngine.lua index f5a3527..b580f01 100644 --- a/Core/MultiBotEngine.lua +++ b/Core/MultiBotEngine.lua @@ -1472,6 +1472,90 @@ MultiBot.addFrame = function(pName, pX, pY, pSize) return tFrame end +-- MULTIBOT: SELL ALL BOTS -- +-- Envoie une commande de vente à tous les bots listés dans l’onglet "Units". +-- pCommand : "s *" (tout le gris) ou "s vendor" (tout ce qui est vendable). +MultiBot.SellAllBots = function(pCommand) + -- Par défaut : vendre tous les objets gris (safe) + pCommand = pCommand or "s *" + + if not MultiBot.isTarget or not MultiBot.isTarget() then + return 0 + end + + local frames = MultiBot.frames + if not frames then return 0 end + + local multiBar = frames["MultiBar"] + if not multiBar or not multiBar.frames or not multiBar.frames["Units"] then + return 0 + end + + local units = multiBar.frames["Units"] + if not units.buttons then + return 0 + end + + CancelTrade() + + local count = 0 + + for key, btn in pairs(units.buttons) do + if type(btn) == "table" then + local botName = btn.name or (btn.getName and btn.getName()) or key + if botName and botName ~= "" then + SendChatMessage(pCommand, "WHISPER", nil, botName) + count = count + 1 + end + end + end + + -- Si une fenêtre d’inventaire est ouverte, on la rafraîchit pour le bot affiché + if MultiBot.inventory and MultiBot.inventory:IsVisible() and MultiBot.RefreshInventory then + MultiBot.RefreshInventory(0.5) + end + + return count +end + +-- MULTIBOT: MAINTENANCE ALL BOTS -- +-- Envoie la commande "maintenance" à tous les bots listés dans l’onglet "Units". +MultiBot.MaintenanceAllBots = function() + local frames = MultiBot.frames + if not frames then return 0 end + + local multiBar = frames["MultiBar"] + if not multiBar or not multiBar.frames or not multiBar.frames["Units"] then + return 0 + end + + local units = multiBar.frames["Units"] + if not units.buttons then + return 0 + end + + CancelTrade() + + local count = 0 + + for key, btn in pairs(units.buttons) do + if type(btn) == "table" then + local botName = btn.name or (btn.getName and btn.getName()) or key + if botName and botName ~= "" then + SendChatMessage("maintenance", "WHISPER", nil, botName) + count = count + 1 + end + end + end + + -- Si une fenêtre d’inventaire est ouverte, on peut la rafraîchir pour refléter d’éventuels changements + if MultiBot.inventory and MultiBot.inventory:IsVisible() and MultiBot.RefreshInventory then + MultiBot.RefreshInventory(0.5) + end + + return count +end + --[[MultiBot.addSelf = function(pClass, pName) MultiBot.dprint("addSelf", pName, pClass) -- DEBUG if(MultiBot.frames["MultiBar"].frames["Units"].buttons[pName] ~= nil) then return MultiBot.frames["MultiBar"].frames["Units"].buttons[pName] end diff --git a/Core/MultiBotInit.lua b/Core/MultiBotInit.lua index 5752a23..69723de 100644 --- a/Core/MultiBotInit.lua +++ b/Core/MultiBotInit.lua @@ -3162,6 +3162,50 @@ tRight.addButton("Summon", 136, 0, "ability_hunter_beastcall", MultiBot.tips.sum MultiBot.ActionToGroup("summon") end +-- COMMANDS FOR ALL BOTS -- +-- Bouton principal à droite qui ouvre un sous-menu de commandes globales. +local btnAllBots = tRight.addButton("AllBotsCommands", 170, 0, + "Temp", + MultiBot.tips.allbots.commandsallbots) + +btnAllBots.doLeft = function(pButton) + local menu = tRight.frames and tRight.frames["AllBotsCommandsMenu"] + if not menu then + return + end + + if menu:IsShown() then + menu:Hide() + else + menu:Show() + end +end + +-- Sous-menu vertical qui s'ouvre au-dessus du bouton principal +local tAllBotsMenu = tRight.addFrame("AllBotsCommandsMenu", 170, 34, 32, 64) +tAllBotsMenu:Hide() + +-- Bouton : Maintenance pour tous les bots +tAllBotsMenu.addButton("MaintenanceAllBots", 0, 34, + "achievement_halloween_smiley_01", + MultiBot.tips.allbots.maintenanceallbots) +.doLeft = function(pButton) + if MultiBot.MaintenanceAllBots then + MultiBot.MaintenanceAllBots() + end +end + +-- Bouton : vendre tous les objets gris pour tous les bots (s *) +tAllBotsMenu.addButton("SellAllBotsGrey", 0, 0, + "inv_misc_coin_18", + MultiBot.tips.allbots.sellallvendor) +.doLeft = function(pButton) + if MultiBot.SellAllBots then + MultiBot.SellAllBots("s *") + end +end + + -- INVENTORY -- MultiBot.inventory = MultiBot.newFrame(MultiBot, -700, -144, 32, 442, 884) diff --git a/Locales/MultiBotLanguage-deDE.lua b/Locales/MultiBotLanguage-deDE.lua index be308e0..d9a30e9 100644 --- a/Locales/MultiBotLanguage-deDE.lua +++ b/Locales/MultiBotLanguage-deDE.lua @@ -1105,6 +1105,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cffff0000Linksklicken um Group-Summon auszuführen|r\n" .. "|cff999999(Ausführreihenfolge: Raid, Party)|r" +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "Alle verkaufbaren grauen Gegenstände verkaufen (ALLE BOTS)|cffffffff\n" + .. "Alle deine Bots (die im Einheitenfenster aufgeführt sind) werden alle Gegenstände verkaufen,\n" + .. "die sicher an den aktuell anvisierten Händler verkauft werden können.\n" + .. "Geschützte Gegenstände (Schlüssel, Ruhestein usw.) werden niemals verkauft.|r\n\n" + .. "|cffff0000Betroffen sind alle Bots, die im Einheitenfenster aufgeführt sind.|r\n" + .. "|cff999999(Ausgeführt von: jedem Bot)|r" + + MultiBot.tips.allbots.commandsallbots = "Ermöglicht dir, Befehle an alle Bots zu senden|cffffffff\n" + .. "Alle deine Bots (die im Einheitenfenster aufgeführt sind) werden den Befehl ausführen\n\n" + .. "|cffff0000Betroffen sind alle Bots, die im Einheitenfenster aufgeführt sind.|r\n" + .. "|cff999999(Ausgeführt von: jedem Bot)|r" + + MultiBot.tips.allbots.maintenanceallbots = "Wartung (ALLE BOTS)|cffffffff\n" + .. "Alle deine Bots (die im Einheitenfenster aufgeführt sind) werden den 'maintenance'-Befehl ausführen.\n" + .. "Nutze dies, wenn du möchtest, dass jeder Bot seine vollständige Wartungsroutine gleichzeitig durchführt.|r\n\n" + .. "|cffff0000Betroffen sind alle Bots, die im Einheitenfenster aufgeführt sind.|r\n" + .. "|cff999999(Ausgeführt von: jedem Bot)|r" + -- INVENTORY -- MultiBot.tips.inventory.sell = "Items verkaufen|cffffffff\n" diff --git a/Locales/MultiBotLanguage-enGB.lua b/Locales/MultiBotLanguage-enGB.lua index be409d6..f4e4df7 100644 --- a/Locales/MultiBotLanguage-enGB.lua +++ b/Locales/MultiBotLanguage-enGB.lua @@ -1040,6 +1040,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cffff0000Left-click to activate|r\n" .. "|cff999999(Executed by: Raid, Party)|r" +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "Sell all vendorable Grey items (ALL BOTS)|cffffffff\n" + .. "All your bots (those listed in the Units panel) will sell all items\n" + .. "that can safely be sold to your current vendor target.\n" + .. "Protected items (keys, Hearthstone, etc.) are never sold.|r\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + + MultiBot.tips.allbots.commandsallbots = "Allows you to send commands to all Bots|cffffffff\n" + .. "All your bots (those listed in the Units panel) will execute the command\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + + MultiBot.tips.allbots.maintenanceallbots = "Maintenance (ALL BOTS)|cffffffff\n" + .. "All your bots (those listed in the Units panel) will run the 'maintenance' command.\n" + .. "Use this when you want every bot to perform its full maintenance routine at once.|r\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + -- INVENTORY -- MultiBot.tips.inventory.sell = "Sell Items|cffffffff\n" diff --git a/Locales/MultiBotLanguage-enUS.lua b/Locales/MultiBotLanguage-enUS.lua index a947cb5..e588f7f 100644 --- a/Locales/MultiBotLanguage-enUS.lua +++ b/Locales/MultiBotLanguage-enUS.lua @@ -1040,6 +1040,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cffff0000Left-click to activate|r\n" .. "|cff999999(Executed by: Raid, Party)|r" +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "Sell all vendorable Grey items (ALL BOTS)|cffffffff\n" + .. "All your bots (those listed in the Units panel) will sell all items\n" + .. "that can safely be sold to your current vendor target.\n" + .. "Protected items (keys, Hearthstone, etc.) are never sold.|r\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + + MultiBot.tips.allbots.commandsallbots = "Allows you to send commands to all Bots|cffffffff\n" + .. "All your bots (those listed in the Units panel) will execute the command\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + + MultiBot.tips.allbots.maintenanceallbots = "Maintenance (ALL BOTS)|cffffffff\n" + .. "All your bots (those listed in the Units panel) will run the 'maintenance' command.\n" + .. "Use this when you want every bot to perform its full maintenance routine at once.|r\n\n" + .. "|cffff0000Affects every bot listed in the Units panel.|r\n" + .. "|cff999999(Executed by: each Bot)|r" + -- INVENTORY -- MultiBot.tips.inventory.sell = "Sell Items|cffffffff\n" diff --git a/Locales/MultiBotLanguage-esES.lua b/Locales/MultiBotLanguage-esES.lua index 2ad5646..432d465 100644 --- a/Locales/MultiBotLanguage-esES.lua +++ b/Locales/MultiBotLanguage-esES.lua @@ -1106,6 +1106,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cff999999(Orden de ejecución: Banda, Grupo)|r" -- INVENTAIRE -- +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "Vender todos los objetos grises vendibles (TODOS LOS BOTS)|cffffffff\n" + .. "Todos tus bots (los que aparecen en el panel de Unidades) venderán todos los objetos\n" + .. "que puedan venderse de forma segura al vendedor que tienes seleccionado.\n" + .. "Los objetos protegidos (llaves, Piedra de hogar, etc.) nunca se venden.|r\n\n" + .. "|cffff0000Afecta a todos los bots listados en el panel de Unidades.|r\n" + .. "|cff999999(Ejecutado por: cada Bot)|r" + + MultiBot.tips.allbots.commandsallbots = "Te permite enviar comandos a todos los Bots|cffffffff\n" + .. "Todos tus bots (los que aparecen en el panel de Unidades) ejecutarán el comando\n\n" + .. "|cffff0000Afecta a todos los bots listados en el panel de Unidades.|r\n" + .. "|cff999999(Ejecutado por: cada Bot)|r" + + MultiBot.tips.allbots.maintenanceallbots = "Mantenimiento (TODOS LOS BOTS)|cffffffff\n" + .. "Todos tus bots (los que aparecen en el panel de Unidades) ejecutarán el comando 'maintenance'.\n" + .. "Úsalo cuando quieras que cada bot realice su rutina completa de mantenimiento al mismo tiempo.|r\n\n" + .. "|cffff0000Afecta a todos los bots listados en el panel de Unidades.|r\n" + .. "|cff999999(Ejecutado por: cada Bot)|r" + MultiBot.tips.inventory.sell = "Vender Objetos|cffffffff\n" .. "Activa el modo de venta del inventario.\n" .. "Debes seleccionar un comerciante.\n" diff --git a/Locales/MultiBotLanguage-frFR.lua b/Locales/MultiBotLanguage-frFR.lua index 7687030..e4b51ed 100644 --- a/Locales/MultiBotLanguage-frFR.lua +++ b/Locales/MultiBotLanguage-frFR.lua @@ -1108,6 +1108,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cffff0000Clic gauche pour exécuter Invocation de Groupe|r\n" .. "|cff999999(Ordre d'exécution : Raid, Groupe)|r" +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "Vendre tous les objets gris vendables (TOUS LES BOTS)|cffffffff\n" + .. "Tous vos bots (ceux listés dans le panneau des unités) vendront tous les objets\n" + .. "qui peuvent être vendus en toute sécurité au vendeur que vous ciblez actuellement.\n" + .. "Les objets protégés (clés, Pierre de foyer, etc.) ne sont jamais vendus.|r\n\n" + .. "|cffff0000Affecte chaque bot listé dans le panneau des unités.|r\n" + .. "|cff999999(Exécuté par : chaque Bot)|r" + + MultiBot.tips.allbots.commandsallbots = "Vous permet d’envoyer des commandes à tous les Bots|cffffffff\n" + .. "Tous vos bots (ceux listés dans le panneau des unités) exécuteront la commande\n\n" + .. "|cffff0000Affecte chaque bot listé dans le panneau des unités.|r\n" + .. "|cff999999(Exécuté par : chaque Bot)|r" + + MultiBot.tips.allbots.maintenanceallbots = "Maintenance (TOUS LES BOTS)|cffffffff\n" + .. "Tous vos bots (ceux listés dans le panneau des unités) exécuteront la commande 'maintenance'.\n" + .. "Utilisez ceci lorsque vous souhaitez que chaque bot effectue sa routine complète de maintenance en même temps.|r\n\n" + .. "|cffff0000Affecte chaque bot listé dans le panneau des unités.|r\n" + .. "|cff999999(Exécuté par : chaque Bot)|r" + -- INVENTAIRE -- MultiBot.tips.inventory.sell = "Vendre des Objets|cffffffff\n" diff --git a/Locales/MultiBotLanguage-koKR.lua b/Locales/MultiBotLanguage-koKR.lua index b749c90..50e9b4e 100644 --- a/Locales/MultiBotLanguage-koKR.lua +++ b/Locales/MultiBotLanguage-koKR.lua @@ -1111,6 +1111,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cffff0000팀 소환을 수행하려면 왼쪽 클릭|r\n" .. "|cff999999(명령어 실행: team, team)|r" +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "판매 가능한 모든 회색 아이템 판매 (전체 봇)|cffffffff\n" + .. "모든 봇(유닛 패널에 표시된 봇)이 현재 선택한 상인에게\n" + .. "안전하게 판매할 수 있는 모든 아이템을 판매합니다.\n" + .. "보호된 아이템(열쇠, 귀환석 등)은 절대 판매되지 않습니다.|r\n\n" + .. "|cffff0000유닛 패널에 표시된 모든 봇에게 적용됩니다.|r\n" + .. "|cff999999(실행 주체: 각 Bot)|r" + + MultiBot.tips.allbots.commandsallbots = "모든 봇에게 명령을 보낼 수 있습니다|cffffffff\n" + .. "모든 봇(유닛 패널에 표시된 봇)이 해당 명령을 실행합니다\n\n" + .. "|cffff0000유닛 패널에 표시된 모든 봇에게 적용됩니다.|r\n" + .. "|cff999999(실행 주체: 각 Bot)|r" + + MultiBot.tips.allbots.maintenanceallbots = "정비 (전체 봇)|cffffffff\n" + .. "모든 봇(유닛 패널에 표시된 봇)이 'maintenance' 명령을 실행합니다.\n" + .. "모든 봇이 동시에 전체 정비 루틴을 수행하도록 하고 싶을 때 사용하세요.|r\n\n" + .. "|cffff0000유닛 패널에 표시된 모든 봇에게 적용됩니다.|r\n" + .. "|cff999999(실행 주체: 각 Bot)|r" + -- INVENTORY -- MultiBot.tips.inventory.sell = "판매중인 상품 |cffffffff\n" diff --git a/Locales/MultiBotLanguage-ruRU.lua b/Locales/MultiBotLanguage-ruRU.lua index 79f7370..a1af151 100644 --- a/Locales/MultiBotLanguage-ruRU.lua +++ b/Locales/MultiBotLanguage-ruRU.lua @@ -1124,6 +1124,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cffff0000Левый клик - групповой призыв|r\n" .. "|cff999999(Порядок выполнения: Рейд, Группа)|r" +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "Продать все серые предметы, пригодные для продажи (ВСЕ БОТЫ)|cffffffff\n" + .. "Все ваши боты (указанные на панели юнитов) продадут все предметы,\n" + .. "которые можно безопасно продать выбранному вами торговцу.\n" + .. "Защищённые предметы (ключи, Камень возвращения и т.д.) никогда не продаются.|r\n\n" + .. "|cffff0000Затрагивает всех ботов, указанных на панели юнитов.|r\n" + .. "|cff999999(Выполняется: каждым Ботом)|r" + + MultiBot.tips.allbots.commandsallbots = "Позволяет отправлять команды всем Ботам|cffffffff\n" + .. "Все ваши боты (указанные на панели юнитов) выполнят эту команду\n\n" + .. "|cffff0000Затрагивает всех ботов, указанных на панели юнитов.|r\n" + .. "|cff999999(Выполняется: каждым Ботом)|r" + + MultiBot.tips.allbots.maintenanceallbots = "Обслуживание (ВСЕ БОТЫ)|cffffffff\n" + .. "Все ваши боты (указанные на панели юнитов) выполнят команду 'maintenance'.\n" + .. "Используйте это, когда хотите, чтобы каждый бот выполнил полный цикл обслуживания одновременно.|r\n\n" + .. "|cffff0000Затрагивает всех ботов, указанных на панели юнитов.|r\n" + .. "|cff999999(Выполняется: каждым Ботом)|r" + -- INVENTORY -- MultiBot.tips.inventory.sell = "Продажа предметов|cffffffff\n" diff --git a/Locales/MultiBotLanguage-zhCN.lua b/Locales/MultiBotLanguage-zhCN.lua index 62a4e16..e6ec7c2 100644 --- a/Locales/MultiBotLanguage-zhCN.lua +++ b/Locales/MultiBotLanguage-zhCN.lua @@ -1103,6 +1103,26 @@ MultiBot.tips.units.pvpstatstoraid = .. "|cffff0000左键单击执行团队召唤|r\n" .. "|cff999999(执行命令: 团队, 队伍)|r" +-- ALL BOTS COMMANDS -- + + MultiBot.tips.allbots.sellallvendor = "出售所有可出售的灰色物品(全部机器人)|cffffffff\n" + .. "所有你的机器人(在单位面板中列出的那些)将出售所有\n" + .. "可以安全卖给你当前目标商人的物品。\n" + .. "受保护的物品(钥匙、炉石等)永远不会被出售。|r\n\n" + .. "|cffff0000影响单位面板中列出的所有机器人。|r\n" + .. "|cff999999(执行者:每个机器人)|r" + + MultiBot.tips.allbots.commandsallbots = "允许你向所有机器人发送指令|cffffffff\n" + .. "所有你的机器人(在单位面板中列出的那些)将执行该指令\n\n" + .. "|cffff0000影响单位面板中列出的所有机器人。|r\n" + .. "|cff999999(执行者:每个机器人)|r" + + MultiBot.tips.allbots.maintenanceallbots = "维护(全部机器人)|cffffffff\n" + .. "所有你的机器人(在单位面板中列出的那些)将执行“maintenance”指令。\n" + .. "当你希望所有机器人同时执行完整的维护流程时使用此功能。|r\n\n" + .. "|cffff0000影响单位面板中列出的所有机器人。|r\n" + .. "|cff999999(执行者:每个机器人)|r" + -- 物品 -- MultiBot.tips.inventory.sell = "出售物品 |cffffffff\n"