ollie
2006-05-12 13:19:33
ok basically ima noob and i hate shitty errors i cant get rid of, like this one.
MY ERROR:
Failed when compiling
Line 306: [Error] (11864:55): Type mismatch in script C:\Documents and Settings\Ollie\Desktop\myrange.scar
THAT LINE:
If FindColorTolerance(x,y,ThiefColour,0,0,510,333,10) then Found:= True;
THE WHOLE SCRIPT
MY ERROR:
Failed when compiling
Line 306: [Error] (11864:55): Type mismatch in script C:\Documents and Settings\Ollie\Desktop\myrange.scar
THAT LINE:
If FindColorTolerance(x,y,ThiefColour,0,0,510,333,10) then Found:= True;
THE WHOLE SCRIPT
program JailRanger;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{.include SRL/SRL/Misc/PlayerForm.Scar}
{=-=-=-=- VARS =-=-=-=-}
{ ThiefColour, PirateColour, ThiefColour2, PirateColour2: Integer;
FightMode, StartPlayer, tol: Integer; }
var
StartPlayer, FightStyle, FightMode: Integer;
Fighting: Boolean;
Start, Found: Boolean;
var
Form : TForm;
Style : TComboBox;
Done, ManageThePlayers : TButton;
ThiefColour, PirateColour, ThiefColour2, PirateColour2 : TEdit;
{ Setup
procedure Setup;
begin
ThiefColour:=0; // Colour Of Thief Top
ThiefColour2:=0; // Colour Of Thief Trouser/Hair
PirateColour:=0; // Colour Of Pirate Top
PirateColour2:=0; // Colour Of Pirate Trouser/Hair
FightMode:=2; // 1 - Accurate 2 - Rapid 3 - LongRange
StartPlayer:=0; // Which player to start at.
tol:=10; // The Tolerance for finding the monster
end;
}
{++++========Dont touch below PLEASE unless a scritper========++++}
procedure SaveForm(Sender: TObject);
begin
Form.ModalResult:= MrOk;
// FightStyle := Style.Text;
If(Style.Text = 'Attack Style')then
case 1 + Random (3) of
1 : FightStyle := 1;
2 : FightStyle := 2;
3 : FightStyle := 3;
end;
Start:= true;
end;
procedure ManageTheChars(Sender : TObject);
begin
SetUpPlayers;
end;
procedure Paint;
var
Canvas: TCanvas;
begin
Canvas:= GetBitmapCanvas(LoadBitmap('bkgr.Bmp'));
CopyCanvas(Canvas, Form.Canvas, 0, 0, 318, 318, 0, 0, 318, 318);
end;
procedure FormPaint(Sender: TObject);
begin
Paint;
end;
procedure Load;
begin
Form := CreateForm;
Form.Left := 436;
Form.Top := 303;
Form.BorderStyle := bsDialog;
Form.Caption := '.:: Ollies Jail Ranger ::.';
Form.OnPaint := @FormPaint;
Form.ClientHeight := 187;
Form.ClientWidth := 318;
Form.Color := clBtnFace;
Form.Font.Color := clBlack;
Form.Font.Height := -11;
Form.Font.Name := 'Comic Sans Ms';
Form.Font.Style := [];
Form.Visible := False;
Form.PixelsPerInch := 100;
Style := TComboBox.Create(Form);
Style.Parent := Form;
Style.Left := 10;
Style.Top := 20;
Style.Width := 100;
Style.Height := 24;
Style.Style := csDropDown;
Style.ItemHeight := 16;
Style.TabOrder := 8;
Style.ShowHint := True;
Style.Hint := 'The Attack Style You Wish To Use For Every Account';
Style.Items.Add('Attack');
Style.Items.Add('Strength');
Style.Items.Add('Defence');
Style.Text:= 'Attack Style';
Done := TButton.Create(Form);
Done.Parent := Form;
Done.Left := 226;
Done.Top := 164;
Done.Width := 90;
Done.Height := 21;
Done.Caption := 'Finished';
Done.TabOrder := 10;
Done.ShowHint := True;
Done.Hint := 'Are You Ready To Get Ranging?';
Done.OnClick:= @SaveForm;
ManageThePlayers := TButton.Create(Form);
ManageThePlayers.Parent := Form;
ManageThePlayers.Left := 226;
ManageThePlayers.Top := 141;
ManageThePlayers.Width := 90;
ManageThePlayers.Height := 21;
ManageThePlayers.Caption := 'Player Manager';
ManageThePlayers.TabOrder := 10;
ManageThePlayers.ShowHint := True;
ManageThePlayers.Hint := 'Setup All Of Your Accounts Here!';
ManageThePlayers.OnClick:= @ManageTheChars;
ThiefColour := TEdit.Create(Form);
ThiefColour.Parent := Form;
ThiefColour.Left := 10;
ThiefColour.Top := 70;
ThiefColour.Width := 100;
ThiefColour.Height := 18;
ThiefColour.Text := 'Thief Colour';
ThiefColour.ShowHint := True;
ThiefColour.Hint := 'The Colour of his Top';
ThiefColour2 := TEdit.Create(Form);
ThiefColour2.Parent := Form;
ThiefColour2.Left := 10;
ThiefColour2.Top := 100;
ThiefColour2.Width := 100;
ThiefColour2.Height := 18;
ThiefColour2.Text := 'Thief Colour2';
ThiefColour2.ShowHint := True;
ThiefColour2.Hint := 'The The Colour of His Trousers';
PirateColour := TEdit.Create(Form);
PirateColour.Parent := Form;
PirateColour.Left := 10;
PirateColour.Top := 130;
PirateColour.Width := 100;
PirateColour.Height := 18;
PirateColour.Text := 'Pirate Colour';
PirateColour.ShowHint := True;
PirateColour.Hint := 'The Colour of his Top';
PirateColour2 := TEdit.Create(Form);
PirateColour2.Parent := Form;
PirateColour2.Left := 10;
PirateColour2.Top := 160;
PirateColour2.Width := 100;
PirateColour2.Height := 18;
PirateColour2.Text := 'Pirate Colour';
PirateColour2.ShowHint := True;
PirateColour2.Hint := 'The Colour of his Trousers';
end;
procedure SafeIntForm;
var
V : TvariantArray;
begin
Setarraylength(V, 0);
ThreadSafeCall('Load', v);
end;
procedure ShowFormModel;
begin
Form.ShowModal;
end;
procedure SafeShowFormModel;
var
v: TvariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModel', v);
end;
procedure LoadForm;
begin
SafeIntForm;
SafeShowFormModel;
end;
procedure AntiRandoms;
begin
RotateEvery(1+random(5))
FindNormalRandoms;
CloseWindow;
ClickToContinue;
FindLamp('ranged');
SetChat('Off', 1);
SetChat('Friends', 2);
SetChat('Friends', 3);
end;
procedure BanProtection;
begin
RandomChatEvery(10 + Random(5));
RotateEvery(20 + Random(10));
LeaveScreenEvery(5 + Random(5));
HoverEvery(15 + Random(5),'random');
end;
procedure RandomTab;
var ac, at:Integer;
begin
ac:=1+random(50)
if(ac<=7)then
begin
GameTab(ac);
case ac of
1: SetFightMode(1+random(3))
2: hoverskill('random');
4: UseItem(2+random(27))
end;
WWait(3000+random(2000));
at:= 1+random(8);
GameTab(at);
WWait(3000+random(2000));
end;
end;
procedure Scribble(time: integer);
var
StartTime: longint;
reduce, align: integer;
Next, Vector: PPoint;
Last, Cur, Center: TPoint;
begin
StartTime:= GetSystemTime;
GetMousePos(Last.X, Last.Y);
GetClientDimensions(Center.X, Center.Y);
Center.X:= Center.X / 2;
Center.Y:= Center.Y / 2;
Next.R:= 5.0;
Next.T:= Random(360);
while GetSystemTime - StartTime < Time do
begin
if reduce = 0 then Next.R:= Next.R + ((Random(20) - 10) / 10);
if (reduce > 0) and (Next.R > 0) then Next.R:= Next.R + ((Random(20) - 20) / 10);
if (reduce > 0) and (Next.R < 0) then Next.R:= Next.R - ((Random(20) - 20) / 10);
if Abs(Next.R) > 7 then reduce:= 10;
Next.T:= FixD((Next.T + (Random(60) - 30)));
Vector:= ToPolarOffset(Last, Center);
Cur:= ToCartOffset(Next, Last);
MoveMouse(Cur.X, Cur.Y);
if (align > 0) or (Cur.X < 20) or (Cur.Y < 20) or (Cur.X > (Center.X * 2) - 20) or (C
begin
// Next.T:= AvgAngles(Next.T, Vector.T, 4, 3);
if align = 0 then align:= 20;
end;
Last.X:= Cur.X;
Last.Y:= Cur.Y;
if reduce <> 0 then reduce:= reduce - 1;
if align <> 0 then align:= align - 1;
end;
end;
Procedure SetFighting;
Begin
SendKeysSilent('Yehaaa! Setting My FightMode To ' + Style.Text);
Mouse(559,177,7,7,True)
Wait(500+Random(1000))
Case FightStyle Of
1:
Begin
Status('FightMode = 1')
Mouse(598,285,10,10,true)
Wait(1000+Random(1000))
End;
2:
Begin
Status('FightMode = 2')
Mouse(600,325,10,10,true)
Wait(1000+Random(1000))
End;
3:
Begin
Status('FightMode = 3')
Mouse(597,366,10,10,true)
Wait(1000+Random(1000))
End;
4:
Begin
Status('FightMode = 4')
Mouse(600,406,10,10,true)
Wait(1000+Random(1000))
End;
End;
End;
Procedure Find;
Begin
if (Loggedin) then
Begin
If FindColorTolerance(x,y,ThiefColour,0,0,510,333,10) then Found:= True;
FindColorTolerance(x,y,ThiefColour2,0,0,510,333,10) then Found:= True;
FindColorTolerance(x,y,PirateColour,0,0,510,333,10) then Found:= True;
FindColorTolerance(x,y,PirateColour2,0,0,510,333,10)then Found:= True;
else
Begin
MMouse(x,y,1+Random(6),3+Random(2))
Wait(20+Random(20))
If IsTextInAreaEx(53,6,117,22,x,y,'Thief',100,UpChars,True,false,0,1,57054) then Found
IsTextInAreaEx(53,6,117,22,x,y,'Pirate',100,UpChars,True,false,0,1,57054) then Found:=
if(Found) then
Begin
GetMousePos(x,y)
Mouse(x,y,1,1,True)
AntiRandoms;
Wait(1600+Random(900))
End;
End;
if(not(Loggedin) or (WeAreDead)) then break;
Wait(16000+Random(60000))
LoginPlayer;
SetupAndMainLoop;
End;
Procedure Engine;
Begin
Repeat
Wait(20+Random(20))
If FindColorTolerance(x,y,65280,0,0,508,330,10) Then
Begin
Fighting:=True;
End
If Not FindColorTolerance(x,y,65280,0,0,508,330,10) Then
Begin
Fighting:=False;
End
If Fighting=False Then
Begin
Find;
End;
If Fighting=True Then
Begin
AntiRandoms;
End;
Until(False);
End;
procedure SetupAndMainLoop;
begin
CurrentPlayer:= 0;
PlStartTime:= ((GetSystemTime / 1000) / 60);
LoginPlayer;
ChatsOff;
s:= GetPage('http://ollie.ahbhost.com/scar/news.txt');
if(s = '')then
begin
Writeln('Some kind of connection error');
end else
PerfectNorth;
end;
begin
SetupSRL;
LoadForm;
OpenWebPage('http://revilofot.co.nr')
if(Start)then
begin
setupandmainloop;
repeat
Engine;
if (not (Loggedin)) then
LoginPlayer;
NickNameBMP:=CreateBitmapMaskFromText(Players[CurrentPlayer].Nick,UpChars);
AntiRandoms;
Until(False)
end.