SamSatanas
2012-04-25 11:06:55
Script is working fine but I am getting the message of 'Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
Function AttackingCow:Boolean;
Var
x,y,i:Integer;
CowColor:Array [0..3] of Integer;
begin
CowColor[0]:=6915485;
CowColor[1]:=5397355;
CowColor[2]:=4543321;
CowColor[3]:=9738395;
x:=MSX1;
y:=MSY1;
begin
For i:=0 to 3 do
If FindObjCustom(x,y,['ttack'],[CowColor[i]],6) then
Begin
If IsUpText('Cow') Then
begin
GetMousePos(x,y);
Case random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('ttack', 500);
if (InFight) then
writeln('We are in a fight');
wait(1000+ random(300))
end;
End;
End;
end;
end;
end;