jkrules22
03-23-2012, 12:16 AM
Ok so I've been trying to learn to script from YoHoJo's tutorials, Im getting a [Error] (99:27): Type mismatch at line 98, Im not sure what to do to fix this. If somebody would lend me a hand I would highly appreciate it. Heres what my script looks like:( I underlined the line it says the error is in.)
Program PowerChopper;
//{$DEFINE SMART}
{$i SRL\SRL.simba}
Const
SRLSTATS_USERNAME = ''; // SRL Stats Username.
SRLSTATS_PASSWORD = ''; // SRL Stats Password.
BreakEvery= 120; // How many minutes to break after.
BreakFor= '5'; // How long to break for.
NumbOfPlayers= 1; // How many players are you using?
StartPlayer= 0; // Player to start autoing with.
Version= '1.0'; // NO TOUCHY!
procedure DeclarePlayers;
begin;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin;
Name := ''; // Player Username
Pass := ''; // Player Password
Pin := ''; //Pin for bank
Active := true;
end;
end;
Procedure StatsGuise(wat:String);
Begin;
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin;
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;
Procedure FailSafe(Reason:String);
Begin;
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
Function ChopDown:Boolean;
Var
x, y, PlusOne, TreeCounter:Integer;
Begin
PlusOne:= InvCount + 1;
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 2;
x:=MSCY;
y:=MSCY;
If FindObjTPA(x, y, 2965842, 10, 1, 15, 60, 600, ['Chop']) Then
Begin;
WriteLn('FK yea Ive found a tree, ima cut yu down!');
GetMousePos(x, y);
Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;
end;
end;
Procedure DropLogs;
var
x, y, I, LogDTM:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin;
LogDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIAOI4IC4G4iogLg PiHCDWZWRg0ARiUyg2BmIlIFYGYm8LRaBuJhwYN2DEg6EAAGDp BQY=');
LogPattern:=[1,5,9,13,17,21,2,6,10,14,18,22,3,7,11,15,19,23,4,8 ,12,16,20,24];
For I:=0 To 27 Do
Begin;
SlotBox:=InvBox(LogPattern(I));
If FindDTm(OreMid, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2)
FindDTM() Then
Begin;
MouseItem(LogPattern(I),False);
ChooseOption('Dro');
End;
End;
Flag;
Repeat;
MarkTime(TreeCounter);
Antiban;
Wait(1000);
If InvCount=PlusOne Then;
Writeln('Muwahahaha!');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000);
End;
End;
begin
ActivateClient;
SetupSRL;
DeclarePlayers;
Repeat;
ChopDown;
Until(False);
DropLogs;
end.
Program PowerChopper;
//{$DEFINE SMART}
{$i SRL\SRL.simba}
Const
SRLSTATS_USERNAME = ''; // SRL Stats Username.
SRLSTATS_PASSWORD = ''; // SRL Stats Password.
BreakEvery= 120; // How many minutes to break after.
BreakFor= '5'; // How long to break for.
NumbOfPlayers= 1; // How many players are you using?
StartPlayer= 0; // Player to start autoing with.
Version= '1.0'; // NO TOUCHY!
procedure DeclarePlayers;
begin;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin;
Name := ''; // Player Username
Pass := ''; // Player Password
Pin := ''; //Pin for bank
Active := true;
end;
end;
Procedure StatsGuise(wat:String);
Begin;
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin;
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;
Procedure FailSafe(Reason:String);
Begin;
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
Function ChopDown:Boolean;
Var
x, y, PlusOne, TreeCounter:Integer;
Begin
PlusOne:= InvCount + 1;
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 2;
x:=MSCY;
y:=MSCY;
If FindObjTPA(x, y, 2965842, 10, 1, 15, 60, 600, ['Chop']) Then
Begin;
WriteLn('FK yea Ive found a tree, ima cut yu down!');
GetMousePos(x, y);
Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;
end;
end;
Procedure DropLogs;
var
x, y, I, LogDTM:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin;
LogDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIAOI4IC4G4iogLg PiHCDWZWRg0ARiUyg2BmIlIFYGYm8LRaBuJhwYN2DEg6EAAGDp BQY=');
LogPattern:=[1,5,9,13,17,21,2,6,10,14,18,22,3,7,11,15,19,23,4,8 ,12,16,20,24];
For I:=0 To 27 Do
Begin;
SlotBox:=InvBox(LogPattern(I));
If FindDTm(OreMid, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2)
FindDTM() Then
Begin;
MouseItem(LogPattern(I),False);
ChooseOption('Dro');
End;
End;
Flag;
Repeat;
MarkTime(TreeCounter);
Antiban;
Wait(1000);
If InvCount=PlusOne Then;
Writeln('Muwahahaha!');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000);
End;
End;
begin
ActivateClient;
SetupSRL;
DeclarePlayers;
Repeat;
ChopDown;
Until(False);
DropLogs;
end.