Identifying bound items?
Identifying bound items?
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?
Re: Identifying bound items?
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;
Re: Identifying bound items?
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;
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
Re: Identifying bound items?
Thanks for the info guys.
Who is online
Users browsing this forum: Google [Bot] and 4 guests