SRL Archive - Help and Support

Items slots in the inventory


mat_de_b

2011-05-23 14:35:01

Hi, i was just wondering if anyone else was having trouble with which slots are where in the inventory, and which procedures/functions to use?

For example:

Until(R_ItemSlotExists(6));

On my Pc/simba (using SRL) this only recognises the 7th inventory slot. So if i'm saying pick up an item until the 7th inventory slot is used up then i have to use this. Instead of what i would expect to be correct which would be.

Until(R_ItemSlotExists(7));

On top of this i re-use the function for item slot 14. (i use each one in a row so i pick up 7 of one thing and then 7 of the next) However if i ask if the item exists in slot 13 it then only gets me 6 (which it should if i ask for slot 13) But then when i ask about slot 14 it picks up 8?

Hopefully i explained that well enough?

thanks, Dom

Jakkle

2011-05-24 11:39:27

Can't you just count the item your collecting to know how many of that item fills inventory spaces.

Like
Until(R_CountItem(TheItem) = 7);
Or
Until(R_ItemExistsEx(IDs, TheItem) = 7);

Thats if your trying to pick up so many of an item ?

mat_de_b

2011-05-24 12:11:25

That would work also, however it would involve the creation of 4 new bitmaps. Considering i have the free time i will try and do that now.

  Repeat
FindObj(x, y, Bleh, Col1, Tol);
Mouse(x,y,15,15,True);
Wait(800+Random(100));
FindNPCChatText(Bleh,ClickLeft)
Wait(200+Random(100));;
Until(R_ItemSlotExists(6));
Repeat
FindObj(x, y, Bleh, Col1, Tol);
Mouse(x,y,15,15,True);
Wait(800+Random(100));
FindNPCChatText('Bleh',ClickLeft);
Wait(200+Random(100));
Until(R_ItemSlotExists(14));
Repeat
FindObj(x, y, Bleh, Col1, Tol);
Mouse(x,y,15,15,True);;
Wait(800+Random(100));
FindNPCChatText('BLeh',ClickLeft);
Wait(200+Random(100));
Until(R_ItemSlotExists(21));
End;

That was the part of the script i'm having trouble with. So even if i use your solution, somone should know that those item slots aren't working or positioned correctly. (and if some cases it wouldn't even recognize that the slot was used at all and end up filling the inventory).

i've currently blocked out the items i'm picking up with the word bleh. after i'm done with this script and i give it a once over (the formatting is pretty ugly and i'm not sure how reliable it is) then i'll post it up.