BoundStatus

Talk about anything in Runes of Magic. This does not need to pertain to botting.
Post Reply
Message
Author
BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

BoundStatus

#1 Post by BillDoorNZ » Mon Nov 28, 2011 8:04 pm

Hey guys,

Been fixing up some of my enumerations and have been trying to figure out how BoundStatus works.

So far I've figured that its at least a 16-bit bitmask value (no, not an 8 bit one). with the bits as follows (the resulting description is what it means if the bit is SET - i.e. a 1 as opposed to a 0):
  • 01 - item is not bound
  • 02 - item is Bind on Equip
  • 03 -
  • 04 -
  • 05 - item is an ItemShop item
  • 06 -
  • 07 -
  • 08 -
  • 09 -
  • 10 - item has its ItemSetSkill extracted
  • 11 -
  • 12 -
  • 13 -
  • 14 -
  • 15 -
  • 16 -
I noticed that I get a few items coming through with the 16th bit set to a 1 (Holy source gear and a few others). Not sure if this is just junk in the data or if it is consistent - will restart the game client and check again).

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: BoundStatus

#2 Post by BillDoorNZ » Mon Nov 28, 2011 8:09 pm

ok. restarted the game and mm etc. Same items still have that 16th bit. No idea what that bit represents as yet tho!!!!

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: BoundStatus

#3 Post by lisa » Mon Nov 28, 2011 8:30 pm

I just want to make sure you meant bit and not byte =)
if you meant bit then there is actually 32 bits, that is how I found the indicators for inparty/pvp/chest open and all that good stuff.
Looks like this

When I go hunting for indicators I use this function. Just uncomment out the offsets to do logs for.
I have played around with it since last time I used it but it should still work.

Code: Select all


function pawnlogs(_name,_comment)
--[[local offsets = {
"0x240","0x244","0x248","0x24C",
"0x250","0x254","0x258","0x25C",
"0x260","0x264","0x268","0x26C",
"0x270","0x274","0x278","0x27C",
"0x280","0x284","0x288","0x28C",
"0x290","0x294","0x298","0x29C",
"0x300","0x304","0x308","0x30C",
"0x310","0x314","0x318","0x31C",
"0x320","0x324","0x328","0x32C",
"0x330","0x334","0x338","0x33C",
"0x340","0x344","0x348","0x34C",
"0x350","0x354","0x358","0x35C",
"0x260","0x264","0x268","0x26C",
"0x160","0x164","0x168","0x16C",

}]]
--[[local offsets = { 
"0x10","0x14","0x18","0x1C",
"0x20","0x24","0x28","0x2C",
"0x30","0x34","0x38","0x3C",
"0x40","0x44","0x48","0x4C",
"0x50","0x54","0x58","0x5C",
"0x60","0x64","0x68","0x6",
"0x70","0x74","0x78","0x7C",
"0x80","0x84","0x88","0x8C",
"0x90","0x94","0x98","0x9C",
"0x100","0x104","0x108","0x10C",
}]]

--[[local offsets = { 
"0x410","0x414","0x418","0x41C",
"0x420","0x424","0x428","0x42C",
"0x430","0x434","0x438","0x43C",
"0x440","0x444","0x448","0x44C",
"0x450","0x454","0x458","0x45C",
"0x460","0x464","0x468","0x46C",
"0x470","0x474","0x478","0x47C",
"0x480","0x484","0x488","0x48C",
"0x490","0x494","0x498","0x49C",
"0x4A0","0x4A4","0x4A8","0x4AC",
"0x4B0","0x4B4","0x4B8","0x4BC",
"0x4C0","0x4C4","0x4C8","0x4CC",
"0x4D0","0x4D4","0x4D8","0x4DC",
"0x4E0","0x4E4","0x4E8","0x4EC",
"0x4F0","0x4F4","0x4F8","0x4FC",
}]]

local offsets = { 
0x164,0x168,0x260,0x264
}

	local objectList = CObjectList();
	objectList:update();
	local objSize = objectList:size()
	for i,v in pairs(offsets) do
		local filename = getExecutionPath() .. "/logs/pawn/pawnlog"..v..".txt";
		local file, err = io.open(filename, "a+");
		if( not file ) then
			error(err, 0);
		end
		
		for i = 0,objSize do 
			obj = objectList:getObject(i);
			if obj.Name == _name then
				local flags = memoryReadRepeat("int", proc, obj.Address + v) or 0;
				local bitnum=0x80000000
				local bitstring=""
				if bitAnd(flags,0x80000000) then
					file:write("Bits,1,")
				else
					file:write("Bits,0,")
				end
				
				repeat
					bitnum = bitnum / 2
					if bitAnd(flags,bitnum) then
						bitstring = bitstring .. "1,"
					else
						bitstring = bitstring .. "0,"
					end
				until bitnum == 1
				file:write(bitstring)
				if _comment ~= nil then 
					file:write(obj.Name..",".._comment.."\n")
				else
					file:write(obj.Name.."\n")
				end
			end
		end
		file:close();
	end
end

you get

Code: Select all

Bits,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,0,0,0,
which can be loaded into excel using comma as seperator =)

That code is for objects in the world, such as NPC/mobs/chests, not for items in bag like you are looking at, I figured I would post it for you anyway.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: BoundStatus

#4 Post by BillDoorNZ » Mon Nov 28, 2011 8:53 pm

cool, thanks lisa.

Isn't really what I need at this point as I just convert the number using some .net code anyway. I display my characters inventory in a data-bound table and had originally misunderstood the comment about BoundStatus in items.lua.

So I'd ended up creating an enumeration with all of the values Rom had been using (for my characters inventory anyway). Every now and again I'd get an error as a new value came out and it was then that i realised it was a bit-masked value that was being returned so set about working out what the different bits were representing for an item.

As you can see in my first post, thats about all I've been able to discover to date. I'm not sure what the 16th bit is representing, but its not a random value (I've restarted computer and rom and mm and moved the items around my backpack in case any of that was causing a 'glitch'). So now I'm just trying to figure out what it represents :( - shouldn't frown, I enjoy doing it anyway :)

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

Re: BoundStatus

#5 Post by rock5 » Tue Nov 29, 2011 7:44 am

I noticed, once, that the bound status was not very informative. We should really be checking the first bit so we can make it true or not true.
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest