Hello guys, I dont know what happened to the thread i posted earlier, but i cant edit it or comment uder it so im posting again. Im making an autofighter script. So far i made it to attack monsters and eat sara brews and restore pots when needed. Im trying to make it loot "while (not inCombat)", but it wont click on the item, dont know why. Its on os-scape server, I want to make a nice procedure, that would always right click on bloodmoney and would pick whip first if available, then bloodmoney. Here is what i came up with so far.
Code:
procedure Loot;
var
TPA: TPointArray;
ATPA: T2DPointArray;
Loot: TColEx;
FoundPnt: TPoint;
begin
Loot.create(1056406, 0, 0.00, 0.00);
if Loot.findIn(AREA_MS, foundPnt) then
begin
ATPA := FloodFillTPA(TPA);
SortATPASize(ATPA, True);
SortATPAFrom(ATPA, Point(270,170));
SortATPAFromFirstPoint(ATPA, Point(270,170));
humanMMouse(FoundPnt, 0, 0);
if waitUptext('Blood', 100) then
begin
ClickMouse(x,y,mouse_right);
waitOption('Take Blood', 250);
wait(1000);
end;
end;
end;
I've tried running just this procedure while there were some loot next to me, but it wont click on the bloodmoney. Im using aerolib include btw.
Here is how the place looks:
Drop.png
EDIT: I've added SortATPASize and it clicks on the Blood money. How can i make it pick whip first instead of blood money if it sees it after right click?