Why won't this simple script I made click?
procedure Attack;
var x, y: integer;
begin
if findobj(x, y, 'iant', 12040108, 5) then
begin
Mouse(x, y, 5, 5, true);
ClickMouse2(Mouse_left);
end;
end;
Why won't this simple script I made click?
procedure Attack;
var x, y: integer;
begin
if findobj(x, y, 'iant', 12040108, 5) then
begin
Mouse(x, y, 5, 5, true);
ClickMouse2(Mouse_left);
end;
end;
You did not add the procedure to the main loop also check your color
Here is my full code;
program KillSomething;
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}
procedure Attack;
var x, y: Integer;
begin
if findobj(x, y, 'iant', 12040108, 25) then
begin
Mouse(x, y, 5, 5, true);
ClickMouse2(Mouse_Left);
end;
end;
begin
SetupP07Include;
ActivateClient;
Attack;
end.
First:
Simba Code:Mouse(x, y, 5, 5, true);
ClickMouse2(Mouse_Left);
"Mouse" moves the mouse and clicks, so you don't need ClickMouse.
If you are using the P07 include then you need to change
toSimba Code:if findobj(x, y, 'iant', 12040108, 25) then
Simba Code:if P07_findobj(x, y, 'iant', 12040108, 25) then
If that doesn't work, you may have the incorrect color for what you are trying to find.
Thank you very much I figured this out before you posted. Any way to get Right click and Attack working? I only have left click :/
P07_chooseoptionmuilti[('ttack')] to choose the attack option
There are currently 1 users browsing this thread. (0 members and 1 guests)