Originally Posted by
nkd2009
Got it working! I only tried it on 1 floor color but it would be easily customizable for more situations with a simple color picker. So right now, it opens up the loot screen if there is a valuable item there, and takes the first item in the list (blindly) as I think the most valuable drop always appears first? (I hope). Then I guess the next logical step is to add a DTM for bones in the loot screen (big bones/ dbones?)
So what I have is before it looks for a fight, it quickly checks the mainscreen using a spiraltolerance atpa and then left clicks on it to open up the lootscreen. It just loots slot 1 and then closes. I'll try it in more situations (floor colorings) and let you know how it goes. It's not super dynamic for everyone to use but I think if you can pick a color it can work. If you'd like to see it i'd be happy to send you the code (pretty much just ripped the mayors atpa section out of his AIO tutorial =) thanks @themayor! and added loot lines (out of the mayors other tutorial).
I'm a pretty heavy user of ismouseovertext. if your loot interface popup is always in the same place you could set a mousecoord (or array of boxes to mouse through lets say the first 3 loot slots) to see what item it is
something I generally use might look like
Simba Code:
mousecircle(747,540,5, MOUSE_MOVE);
if isMouseOverText(['Raw shrimp','Raw anchovies','Big bones','Bandos Godsword'],500) then
begin
writeLn('Found raw shrimp');
foundShrimp := True;
//Insert action here (drop,click,etc..)
mousecircle(Next,Slot,5, MOUSE_MOVE); //Tbox would be best but you get the gist of it
end;
This is just a general example that would be a small step above blindly clicking a slot in the loot box because if there is nothing there, my example won't do anything because the "if" statement requires proper uptext.
EDIT: if you like the array idea this is something i ripped the above example out of
Simba Code:
var
s: integer;
if (foundShrimp = False) then
begin
for S := 2 to 27 do //Will go through slots 2 - 27 in the inventory but this only modifies the variable "S"
begin
if tabBackpack.isItemInSlot(S) then // This will stop the array early if there is nothing in the slot
// Lets say you had 11 items in the inventory and you have moused through 10 of them, this ^ would make sure you don't mouse through empty slots
begin
tabBackpack.mouseSlot((S), MOUSE_MOVE); // This is what makes the array mouse through the slots, because I use variable "s" here
wait(250+random(250));
if isMouseOverText(['Raw shrimp'],500) then
begin
shrimpSlot := S;
writeLn('There is raw shrimp in slot: ' + intToStr(S) + ' saving slot number for BurnAndCook');
foundShrimp := True;
mousecircle(747,540,5, MOUSE_LEFT);
break; //If the shrimp have been found, the array is finished and we will no longer mouse through the slots
end;
end;
end;
end;
This may look a little complicated because it is out of context but I hope it helps for reference