Identifying bound items?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Velsharon
Posts: 12
Joined: Wed May 26, 2010 8:59 pm

Identifying bound items?

#1 Post by Velsharon » Fri Oct 22, 2010 11:58 am

Is there a flag or variable identifying an item in a bag slot is bound or would I have to read in the tool tip of the bag slot item and search for the word "Bound"? Or is there another way?

Andreas_B
Posts: 40
Joined: Fri Oct 22, 2010 6:46 pm

Re: Identifying bound items?

#2 Post by Andreas_B » Fri Oct 22, 2010 7:38 pm

You can parse the item link.

Code: Select all

local itemLink = RoMScript("GetBagItemLink("..index..")");
if ( itemLink ~= nil ) then
    local bound = tonumber(itemLink:match("^|H.-:[0-9a-f]+ ([0-9a-f])"), 16);
    if bound == 0 then
        -- bound
    elseif bound == 1 then
        -- nonbindable
    elseif bound == 2 then
        -- cs - item
    elseif bound == 3 then
        -- bound on equip    
    end;
end;

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Identifying bound items?

#3 Post by rock5 » Fri Oct 22, 2010 8:11 pm

The items do have a bound status flag. It's called BoundStatus. I think it can equal the values as listed by Andreas_B.

So, using Andreas_B example, you would do this insteas;

Code: Select all

    local bound = inventory.BagSlot[ slotnumber ].BoundStatus;
    if bound == 0 then
        -- bound
    elseif bound == 1 then
        -- nonbindable
    elseif bound == 2 then
        -- cs - item
    elseif bound == 3 then
        -- bound on equip   
    end;
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Velsharon
Posts: 12
Joined: Wed May 26, 2010 8:59 pm

Re: Identifying bound items?

#4 Post by Velsharon » Fri Oct 22, 2010 8:59 pm

Thanks for the info guys.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests