SRL Archive - OSR Help

Need Help With Cow Killing Script


tiggerred

2013-03-03 20:00:30

Okay I am a beginer and I want some help with my scrip. If anybody would skype with me that would be great. It just compiles sucessfully but doesnt click anything.
program CowSlaughterer;
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}

Procedure Camera;
Begin
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
End;
Procedure findcow;
var
x, y: Integer;
begin
if (FindColorSpiralTolerance(x, y, 8620173 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 1849409 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 4609385 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 3491935 , 1, 1, 1, 1, 1)) then
Begin
wait(1000);
MoveMouse(x, y);
wait(1000);
ClickMouse(x, y, mouse_right);
wait(1000);
end;
end;

begin;
findcow; camera;
end.;

Skype ~ nickthemaster101

Ian

2013-03-03 21:07:35

Try adding some debugging things like WriteLn to help see what's going on. For example:

program CowSlaughterer;
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}

procedure Camera;
begin
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
end;
procedure FindCow;
var
x, y: Integer;
begin
if (FindColorSpiralTolerance(x, y, 8620173 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 1849409 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 4609385 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 3491935 , 1, 1, 1, 1, 1)) then
begin
WriteLn('Found the color');
wait(1000);
MoveMouse(x, y);
wait(1000);
ClickMouse(x, y, mouse_right);
wait(1000);
end else //See how I changed it to end else? this means that if the above condition is false, then if will do this next line instead.
WriteLn('Did not find the color!');
end;

begin;
FindCow;
Camera;
end. //I removed a semi-colon here that didn't need to be there

tiggerred

2013-03-03 21:58:46

From: BMWxi
Try adding some debugging things like WriteLn to help see what's going on. For example:

program CowSlaughterer;
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}

procedure Camera;
begin
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
end;
procedure FindCow;
var
x, y: Integer;
begin
if (FindColorSpiralTolerance(x, y, 8620173 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 1849409 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 4609385 , 1, 1, 1, 1, 1)) or
(FindColorSpiralTolerance(x, y, 3491935 , 1, 1, 1, 1, 1)) then
begin
WriteLn('Found the color');
wait(1000);
MoveMouse(x, y);
wait(1000);
ClickMouse(x, y, mouse_right);
wait(1000);
end else //See how I changed it to end else? this means that if the above condition is false, then if will do this next line instead.
WriteLn('Did not find the color!');
end;

begin;
FindCow;
Camera;
end. //I removed a semi-colon here that didn't need to be there


When i try to run it a tab that says color pops up and the error in the debug box says
[Error] C:\Simba\Includes\SRL/SRL/core/color.simba(133:11): Unknown identifier 'FindDTMRotated' at line 132
Compiling failed.

remember me

2013-03-04 12:16:07

open C:\Simba\Includes\SRL/SRL/core/color.simba and look to that identifier and maybe give the script so we can help you better