Code:
procedure dropItems();
var
dropTimer: TTimeMarker;
uselessDTMs: TIntegerArray;
uselessNames: TStringArray;
x, y, i, invcount: integer;
begin
if (not isLoggedIn()) then
exit;
gameTabs.openTab(TAB_BACKPACK); // Should be open anyway
uselessDTMs := [DTMFromString('m1gAAAHic42JgYFjIxsCwFIhXAPFqIJ4DxMuAeAMQTwLi2UA8H4iFmRgY2IGYA4i5gFgZiKWBWBBKCwAxDxAbx1gATWUiiOWAJDGYkUiMAAAvCAlz'), // Mint cake
DTMFromString('mwQAAAHic42RgYKhgY2AoA+IaIK4F4noouwiIC6C0JBMDAxsQ8wCxGBBLA7EyFIsDMR8Qh2fxAU1jwovlgCQjFTAcAADpIAZd')]; // Agility potion
uselessNames := ['int c', 'gility po'];
for i := 0 to high(uselessDTMs) do
begin
if findDTM(uselessDTMs[i], x, y, tabBackpack.getBounds()) then
begin
setStatus('Dropping stuff');
repeat
dropTimer.reset();
dropTimer.start();
smartImage.debugDTM(uselessDTMs[i], tabBackpack.getBounds(), clAqua);
mouse(x, y, 3, 3, MOUSE_MOVE);
if isMouseOverText([uselessNames[i]], 150, false) then // Could search for entirety of uselessNames
begin
invcount := tabBackpack.count();
fastClick(mouse_Right);
chooseOption.select(['rop'], 100);
repeat // Better than waiting a set amount of time when things can influence when the icon leaves backpack
wait(randomRange(100, 260));
until (not (tabBackpack.count() = invcount)) or (dropTimer.getTime() > 10000);
clearMufasa();
smartImage.debugDTM(uselessDTMs[i], tabBackpack.getBounds(), clAqua);
end;
until (not findDTM(uselessDTMs[i], x, y, tabBackpack.getBounds())) or (dropTimer.getTime() > 20000);
end;
end;
freeDTMs(uselessDTMs);
end;
Although this isnt from a script I have written (its from the qhefin scrpit)
When mint cakes are randomly given, sometimes the script will continuously right click on the cake and not drop it..
Im not quite sure why it would do so but im assuming it has something to do with this section of the script.. can anyone look over it and see if there is anything that sticks out?