i found only this API on romwiki
Code: Select all
API:GetEquipSlotInfo
/script DEFAULT_CHAT_FRAME:AddMessage(GetEquipSlotInfo(11))i tryed
Code: Select all
function arrow_knife()
local bow = GetEquipSlotInfo(11)
if bow == "interface\CharacterFrame\Equipment-RangedSlot" then
EquipItem(11) -- unequip bow
UseItemByName("Stone") -- equip projectiles
SendSystemMsg("|H|h|cff00FF00PROJECTILES EQUIPED|h")
else
EquipItem(10) -- unequip projectiles
UseItemByName("Rune War Bow") -- equip bow
UseItemByName("Obsidian Arrow") -- equip arrows
SendSystemMsg("|H|h|cff00FF00RANGED WEAPON EQUIPED|h")
end
endany idea?