rock5 wrote:I think you misunderstood me here. Let me try to explain it again.
You were searching for the numbers 61-120 which is what is stored in item.BagId (what the romwiki calls Inventory Index). You didn't find those numbers because the list is in that order so the Inventory Index can be inferred by the order, which is what I understand you have done. If so then the item.SlotNumber (what the romwiki calls the Bag Index) ie values 1-60, should be stored somewhere in the item data. Have you searched for matching 1-60 numbers in the item table? If you can find them then we will also have the item.SlotNumbers.
You're absolutely right, misundestood your sentence, and i was in a rush because i was leaving and wanted to post an answer ^^
No, slot numbers are not that easy to find, i checked for numbers starting at 1 to 240 and have absolutely no luck finding any type of "map" or table, nothing points to an address in inventory nor maps numbers that way, not that i can see and i have seen alot of this game memory lately... I'm not saying it doesn't exist but i belive its that function what does the trick (GetItemInfo) well, no particulary that one, but the function that one uses to map indexes i can, maybe, debug the assembler to check it but that has to be another time, i think with what we have now we can work pretty well, i'll say much better than old inventory... we even have more data, as cost an dura, no eed to parse tooltip to get dura anymore, we can get stats from inv data too (not done yet but data is there), we have the cost (how much it cost to buy from an NPC) and worth (how much an NPC will pay for it (is just 10% of cost), we can check if item is in use, we get itemcount, no need to manually decrease consumables anymore...
If we work a bit on it i think we can get this done in no time...
[quote="rock5W]What you are saying is we don't need item.SlotNumber but the slotnumber (ie. Bag Index) is used in a few places in the rombot eg with the profile settings 'INV_AUTOSELL_FROMSLOT' and 'INV_AUTOSELL_TOSLOT' which I use. Those options won't work without the slotnumbers.[/quote]
Yes, slotNumber are used for autosell but that is almost all done by igf, only checks are done in the inventory and i think we can safelly move it completely to igf and we have no problems...
rock5 wrote:Or maybe you could use this instead to get both values;
Code: Select all
quality, tier = math.modf (ByTE/16); tier =tier *16
Nice, i'll try that, my string method works but is far from optimal
Thing is i'm so used to shift bits that i forgot math exists just for that, solving problems ^^
Ok then i have almost everything working i'm even mapping quality to color to keep backwards compatibility...