Hello everyone,
I am trying to make a simple script that will kill a monster and loot the money it drops.
Game: OS-Scape PvP
Monster: Abbysal demon
Drop: Blood Money
Here is what my code looks like
Code:
program DemonKiller
{$I SRL-6/SRL.simba}
//srl-6 override function
function waitClientReady(): boolean;override;begin result:= true;end
var
x, y, demonClick: integer;
procedure ClickDemon;
var
x, y : integer;
begin
if FindColorTolerance(x, y, 1973824, 156, 165, 469, 264, 3) then
begin
MoveMouse(x, y);
wait(250);
ClickMouse(x, y, MOUSE_LEFT);
end;
end;
procedure lootMoney;
var
x, y : integer;
begin
if FindColorTolerance(x, y, 1781723, 206, 319, 228, 323, 50) then
begin
MoveMouse(x, y);
wait(250);
ClickMouse(x, y, MOUSE_LEFT);
end;
end;
begin
setupSRL();
repeat
lootMoney;
ClickDemon;
until (false)
end.
The procedure ClickDemon works, but it just spam clicks the abbysal demons even if I'm in combat.
How can I make a fuction that waits till I'm done fighting the monster before it starts clicking another?
The Procedure lootMoney doesn't work at all... I commented out the ClickDemon and dropped the money and it doesn't click it at all. Even though I did the same steps as with clicking the demon..
Any help is much appreciated!!