zertunami
2008-08-15 22:38:02
I put together this little script for some much needed practice in SCAR scripting. Obviously not a very great script, but whatever:) Tell me anything that should/could be included within the script. All constructive criticism and help is appreciated.
program Auotcurser;
{.include srl/srl.scar}
{.include srl/srl/skill/magic.scar}
Const
Spells = 3;// how many times you want it cast?
Var
Ax, Ay, i : Integer;
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
CurrentPlayer:= 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := ''; // Username.
Players[0].Pass := ''; // Password.
Players[0].Nick := ''; // 2-4 letters of Username (that are not capital letters or numbers).
Players[0].Active := True;
end;
Procedure OnceloggedIn;
Begin
makecompass('w');
setAngle(true);
end;
Procedure CastCurse;
Begin
Begin
i:=0
GameTab(7);
Wait(500+Random(600))
Cast('curse');
wait(1000+random(500))
;FindObjCustom(Ax, Ay, ['onk, orak'], [3752096], 10)
Mouse(Ax, Ay, 4, 4, true);
i:=i+1
wait(1000+random(3000))
If i = Spells Then
Logout;
end;
end;
Procedure Logsout;
Begin
If (i=Spells) Then WriteLn('Finished casting spells... logging out...');
Logout;
end;
Procedure Randoms;
Begin
FindNormalRandoms;
end;
Procedure AntiBan;
begin
case random(100) of
0: RandomRClick;
1: BoredHuman;
2: HoverSkill('Magic', False);
3:
Begin
Logout;
Writeln('Status : Sleeping for a few minutes')
Wait(60000+random(300000))
LoginPlayer;
End;
4: PickUpMouse;
end;
end;
Procedure Proggy;
Begin
WriteLn('[-------------------------------------]')
WriteLn('[-----Zertunami"s Test AutoCurser-----]')
WriteLn('[-------------------------------------]')
WriteLn('[ Ran for ' + TimeRunning + ' ]')
WriteLn('[ Cast ' + IntToStr(i) + ' Curses ]')
WriteLn('[-------------------------------------]')
End;
Begin
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
OnceloggedIn;
repeat
CastCurse;
until(i=Spells)
Randoms;
AntiBan;
Logsout;
Proggy;
end.
Procedure FeedBack;
Begin
WriteLn(' Please send me a message about any advice, bugs, suggestions,etc... about the script. Thanks!');
end;