SRL Archive - OSR Help

Help compileing


rya

2010-03-26 20:37:26

Probly just a end or something i missed/cant find but im geting a Identifier expected




Function FightMonster:Boolean;
Var x,y,b,i,h :Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
Begin

X := MSCX
Y := MSCY
SetColours(WhichMonster);

If Not AreaAndMonster Then
Change;

FindColorsSpiralTolerance(x, y, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Toll);
ATPA := TPAtoATPA(TPA, 7);

If Length(ATPA) = 0 Then //If no points were found
Begin
WriteLn('No colour found :(');
Result := False;
Exit;
End;

H := High(ATPA);
For I := 0 To H Do
Begin
MiddleTPAEx(ATPA[I], X, Y); //Used to get the middle of the current sorted tpa
Inc(b);
MMouse(x,y,6,6);
Wait(250+Random(500));
If IsUpText(SetText) Then
Begin
WriteLn('UpextFound');
If Not Random(34)=4 Then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,True);
End Else Begin
GetMousePos(x,y);
Mouse(x,y,0,0,False);
ChooseOption('ttack');
End;
End;
If (b=25) Then
Begin
WriteLn('Tryed 25 times with no uptext :(');
Result := False;
Exit;
End;
End;
Thanks

~Rya

i luffs yeww

2010-03-26 20:41:42


function FightMonster: Boolean;
var x, y, b, i, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
x := MSCX
y := MSCY
SetColours(WhichMonster);
if not AreaAndMonster then
Change;
FindColorsSpiralTolerance(x, y, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Toll);
ATPA := TPAtoATPA(TPA, 7);
if Length(ATPA) = 0 then //If no points were found
begin
WriteLn('No colour found :(');
Result := False;
Exit;
end;
h := High(ATPA);
for i := 0 to h do
begin
MiddleTPAEx(ATPA[i], x, y); //Used to get the middle of the current sorted tpa
Inc(b);
MMouse(x, y, 6, 6);
Wait(250 + Random(500));
if IsUpText(SetText) then
begin
WriteLn('UpextFound');
if not Random(34)=4 then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
end else
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('ttack');
end;
end;
if b = 25 then
begin
WriteLn('Tryed 25 times with no uptext :(');
Result := False;
Exit;
end;
end;
end;