What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Equip item in combat?

jim87

New Member
Joined
Aug 26, 2011
Messages
445
Hello!

According to WoWWiki, the function EquipItemByName since 3.3.0 acts differently if in combat or out of combat. In the latter case, it will equip the item, in the former it will pickup the item, thus not equipping it.

Is there another way to equip items if we're in combat thus, maybe a HB implementation?

Thanks!
 
Hello!

According to WoWWiki, the function EquipItemByName since 3.3.0 acts differently if in combat or out of combat. In the latter case, it will equip the item, in the former it will pickup the item, thus not equipping it.

Is there another way to equip items if we're in combat thus, maybe a HB implementation?

Thanks!
im pretty sure you cant equip things while the combat flag is up, it prevents people from hot swapping trinkets.

im pretty sure WoWiki is out of date, since WoWProgramming dost mention InCombat Equips.
EquipItemByName - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

might be usefull
CancelPendingEquip - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons
 
Hello!

According to WoWWiki, the function EquipItemByName since 3.3.0 acts differently if in combat or out of combat. In the latter case, it will equip the item, in the former it will pickup the item, thus not equipping it.

Is there another way to equip items if we're in combat thus, maybe a HB implementation?


Indeed, this was a change in WoW that caused much frustration with it was initially introduced.

The only time you can actually equip something while in combat may be weapons, and if you have no weapon already equipped. I'm not sure on all the 'rules' imposed by WoW now, but basically you can't change any gear while in combat any more. Also, I'm not certain if the 'rules' are enforced client-side, server-side, or both.

Even if you figure out a way to bypass a client-side check with the HB API, I wouldn't use it. This would be an easy vector for the Warden (or server-side analysis) to detect a 'hack' and get people banned. I'm not saying Bliz does or does not do this particular vector test; however, it is certainly possible.


cheers,
chinajade
 
Last edited:
I was sure I could equip weapons in combat, evidently I was wrong ^^ thanks for the links and the tips!

EDIT: I can actually right-click on the item in the bags and equip it (main & off hand)!
 
you can easily swap main/off hands and relics in combat with "/use " macros
 
Last edited:
If I do ingame /script RunMacroText("equip myweapon"); I get an error saying the client prevented an illegal call of macro, trying it in HB results in nothing.
 
Isn't there an HB method to simulate the interaction with a WoWItem?
 
Yes, there is. However it won't switch items for you while in combat. Nothing you can do can change this other than getting OUT of combat, once you get in it.
 
well, actually /use ITEM_NAME won't equip it, just tried in-game. And RunMacroText (RunMacro requires the macro name or id) will return the abort error.
 
Blocked that too, I have to suppose blizzard don't want scripts call macros equipping items in any case.
 
PHP:
Lua.DoString("RunMacroText(\"/equipslot 16 Abomination Knuckles\")");
works perfectly fine on my 82 hunter shooting dummy.
 
PHP:
        static public void equipItem(string name)
        {
            Lua.DoString("RunMacroText(\"/equipslot 16 {0}\")", name);  
        }

I'm using this method to let the character equip an item on the main hand. It works if written in chat (/equipslot 16 Fishing Pole), but it won't if used within the bot. If used like /script RunMacroText("/equipslot 16 Fishing Pole") a popup fires with this written: "A macro script has been blocked from an action only available to the Blizzard UI"... Am I missing anything?
 
World of Warcraft API - Wowpedia - Your wiki guide to the World of Warcraft

WoW Api - RunMacroText() is Protected function, meaning only Blizzard UI is allowed to run it, meaning you can't simply "/run" or "/script" it in game.
Even though only Blizzard UI is allowed to, Honorbuddy can run all WoW Api functions (from what i know).
You can check how any function works with HB Console, including both WoW Lua and C# code.

EDIT:
PHP:
public static void EquipWeaponSet(string mainHandItemName, string offHandItemName)
{
    EquipItem(16, mainHandItemName);
    EquipItem(17, offHandItemName);
}

public static void EquipItem(uint slot, string itemName)
{
    if (StyxWoW.Me.Inventory.Equipped.GetItemBySlot(slot-1).Name != itemName)
        Lua.DoString("RunMacroText(\"/equipslot {0} {1}\")", slot, itemName);
}

Works just fine while fighting dummy.
 
Last edited:
Back
Top