Simba Code:
program new;
{
var
x, y : integer; //x and y are very common variable names, so it's bad practice to use them as global variables
}
{
const
lowpray :=2070783; //typically '=' is used for constants, not ':='
combat :=37890; //and the constant name is all caps
col :=37890;
}
const
LOWPRAY = 2070783;
COMBAT = 37890;
COL = 37890;
{
function LowPrayer(var x, y: Integer; lowpray, 739, 69, 756, 80: Integer): Boolean;
}
//you are trying to insert an already defined constant into this functions parameters, which just doesn't make any sense
//you have a function called 'LowPrayer', and a procedure below called 'lowprayer', which doesn't make sense. also this function has no implementation
{
function InCombat(var x, y: Integer; combat, 13, 33, 16, 48: Integer): Boolean;
}
//(same comments as function LowPrayer..)
{
procedure lowprayer; //all you need to do is change this to a function
var
x, y : integer;
begin
if FindColorTolerance(x, y, lowpray, 739, 69, 756, 80, 0) then
begin
writeLn('low prayer');
//prayer;
wait(2000);
end;
end;
}
function LowPrayer(): Boolean; //this is a function. 'Boolean' is the return type
var
x, y : integer;
begin
Result := FindColorTolerance(x, y, LOWPRAY, 739, 69, 756, 80, 0);
//'Result' is a sort of implicit variable that will be returned when you call a function
//in this case, it's a boolean that will be true if 'FindColorTolerance' is true
end;
{
procedure combat;
var
x, y : integer;
begin
if FindColorTolerance(x, y, col, 13, 33, 16, 48, 5) then
begin
writeln('in combat');
wait(500);
end
end
}
function InCombat(): Boolean; //same as 'LowPrayer'
var
x, y: Integer;
begin
Result := FindColorTolerance(x, y, col, 13, 33, 16, 48, 5);
end;
begin
ClearDebug();
repeat
while (LowPrayer or InCombat) do
wait (100 + Random(100));
wait(100);
until (false);
end.