Lolsen
2011-12-17 21:22:08
Hi guys Here's my script so far
It fails and says this
How can I get past this?
program Stun;
{$DEFINE SMART}
{$i SRL/SRL.scar}
{$i SRL\SRL\Misc\Stats.simba}
const
SRLStatsUserName = '';
SRLStatsPassword = '';
Version = '1.0 Beta'; (* Please do not touch *)
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
for i := 0 to (1-1) do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Active := True;
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Function CheckAndClick(UpText:String; X,Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption('own', 2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Magic', 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;
TerminateScript;
End;
Function Stun:Boolean;
Begin
If FindObjCustom(x, y, ['Cast', 'Stun'], [142, 236, 130], 10); Then
Writeln ('Yay we found stun');
End
Begin
SetupSRL;
DeclarePlayers;
Repeat
Stun;
Until(false);
EndIt fails and says this
[Error] (80:20): Unknown identifier 'x' at line 79
Compiling failed.
How can I get past this?