Warcraft III resources & community, 2003–2006 · archived

GetItemSlot

not rated
Submitted by shadow1500Functions0 downloads
will return which slot the item is in. the return value is in GUI format, meaning 1 = first slot, 6 = last slot. will return 0 if the unit doesnt have the item.

Source

function GetItemSlot takes unit whichUnit, item whichItem returns integer
    local integer x = 1
    loop
        exitwhen x > 6
        if UnitItemInSlotBJ(whichUnit, x) == whichItem then
            return x
        endif
        set x = x + 1
    endloop
    return 0
endfunction

Comments

0

No comments.