i see u didnt use my 'find cave'
EDIT: is now multiplayer
program FightCaver;
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/users.scar}
VAR
Runs, StartXP, EndXP,AntiBans : Integer;
CONST
StartPlayer = 0;
Version = '0.1b';
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 consecutive letters of your user
Players[0].Active := True; //use this player
end;
{*******************************************************************************
Procedure : ID(Text: String)
Creater : Dr D. Dervish
Use : Informal Disguise, informs the user of the input Text
Example : ID(TimeRunning);
*******************************************************************************}
Procedure ID(Text: String);
BEGIN
Writeln(Text);
Status(Text);
Disguise(Text);
END;
{*******************************************************************************
Procedure : MRWait(Minutes : Integer);
Creater : Dr D. Dervish
Use : Waits the input time with randomness.
*******************************************************************************}
Procedure MRWait(Minutes: Integer);
VAR
FinalWT: Integer;
BEGIN
FinalWT := Minutes*(60000);
Wait(FinalWT+Random(180000)-Random(360000));
END;
{*******************************************************************************
Procedure : MouseAntiBan(Kind : String)
Creater : Dr D. Dervish
Use : AntiBan using the mouse
*******************************************************************************}
Procedure MouseAntiBan(Kind : string);
VAR
x,y,Times : Integer;
BEGIN
CASE Kind of
'examining': BEGIN
REPEAT
MMouse(0,0,700,500);
If IsUpText('ptions') then
BEGIN
GetMousePos(x,y);
Wait(100+random(200));
Mouse(x,y,0,0,true);
Wait(300+random(500));
ChooseOption('xamin');
Wait(500+random(500));
END;
Times := Times +1;
UNTIL(Times = 5+random(10));
Times := 0;
END;
'moving' : BEGIN
REPEAT
MMouse(0,0,700,500);
MMouse(0,0,700,500);
MMouse(0,0,700,500);
Times := Times +1
UNTIL(Times = 5+random(10));
Times := 0;
END;
END;
Wait(2500+random(1000));
END;
{*******************************************************************************
Procedure : CompassAntiBan
Creater : Dr D. Dervish
Use : AntiBan using compass rotation
*******************************************************************************}
Procedure CompassAntiBan;
VAR
Times: integer;
BEGIN
REPEAT
MakeCompass(IntToStr(0+random(500)));
Wait(500+random(2500));
CASE Random(5) of
0: MouseAntiban('moving');
1: MouseAntiban('examining');
END;
Times := Times +1;
UNTIL(Times = 5+random(10));
Times := 0;
Wait(2500+random(1000));
END;
{*******************************************************************************
Procedure : AntiBan
Creater : Dr D. Dervish
Use : Handles the AntiBan functions
*******************************************************************************}
Procedure AntiBan;
BEGIN
if (not (LoggedIn)) then
Exit;
BEGIN
MouseSpeed := 15+random(15);
AntiBans:=AntiBans+1;
ID('Doing AntiBan');
CASE random(20) of
1,2,3 : MouseAntiban('moving');
4 : SleepAndMoveMouse(400+random(200));
5,7,8 : MouseAntiban('examining');
9,11,13 : CompassAntiBan;
10 : BoredHuman ;
12 : CASE random(9) of
0 : HoverSkill('Defence', False);
4 : HoverSkill('Attack', False);
8 : HoverSkill('Strength', False);
END;
14 : RandomRClick;
18 : PickUpMouse;
19 : BEGIN
GameTab(1+random(12));
Wait(1500+random(500));
END;
END;
EndXP:=GetXP(Players[CurrentPlayer].Strings[1]);
END;
Wait(2500+random(1000));
END;
{*******************************************************************************
Function : IsOutsideCaves
Creater : Dr D. Dervish
Use : Checks if the player is outside the Caves
*******************************************************************************}
Function IsOutsideCaves: Boolean;
VAR
x,y: Integer;
BEGIN
If (FindSymbol(x,y,'bank') and
FindSymbol(x,y,'minigame')) then
BEGIN
Result := True;
END;
END;
{*******************************************************************************
Procedure : EnterCave
Creater : Dr D. Dervish
Use : Enters the FightCaves
*******************************************************************************}
Procedure EnterCave;
VAR
X,Y,Z: Integer;
TP : TPoint;
TPA : TPointArray;
BEGIN
if (not(LoggedIn)) then
Exit;
if (not(FindSymbol(x,y,'bank'))) then
Exit;
if (not(FindSymbol(x,y,'minigame'))) then
Exit;
FindNormalRandoms;
FindColorsTolerance(TPA,8618893,MSX1,MSY1,MSX2,MSY2,5);
If (Length(TPA) = 0) then
BEGIN
FindColorsTolerance(TPA,7895169,MSX1,MSY1,MSX2,MSY2,5);
If (Length(TPA) = 0) then
BEGIN
FindColorsTolerance(TPA,9276824,MSX1,MSY1,MSX2,MSY2,5);
If (Length(TPA) = 0) then
BEGIN
ID('Error : could not find cave.');
TerminateScript;
END;
END;
END;
For Z:=0 to High(TPA) do
BEGIN
TP:=TPA[Z]
MMouse(TP.x,TP.y,5,5);
If (IsUpTextMultiCustom(['nter','ave','ntra','trance'])) then
BEGIN
GetMousePos(X,Y);
CASE Random(2) of
1: Mouse(X,Y,0,0,True);
2: BEGIN
Mouse(X,Y,0,0,False);
ChooseOption('nter');
Wait(250);
END;
END;
ID('Entered Cave.');
Runs:=Runs+1;
END;
Exit;
END;
Wait(500+random(500));
END;
{*******************************************************************************
Procedure : Handle Cave
Creater : Dr D. Dervish
Use : Makes sure you do not log out during
the caves, and gets through it.
*******************************************************************************}
Procedure HandleCave;
VAR
x,y: Integer;
BEGIN
If (Not(LoggedIn)) then
Exit;
FindNormalRandoms;
REPEAT
CASE Random(5) of
1: AntiBan;
2: CompassAntiBan;
3: CASE Random(3) of
1: MouseAntiBan('moving');
2: MouseAntiBan('examining');
END;
4: GameTab(1+random(12));
END;
UNTIL(FindSymbol(x,y,'minigame') or
FindSymbol(x,y,'bank'));
END;
{*******************************************************************************
Function : RunsUntilSleep : Integer;
Creater : Dr D. Dervish
Use : Calculates a random amount of Runs until it should sleep.
*******************************************************************************}
Function RunsUntilSleep: Integer;
BEGIN
Result := 30+Random(15);
END;
{*******************************************************************************
Procedure : Sleep
Creater : Dr D. Dervish
Use : Sleeps for antiban
*******************************************************************************}
Procedure HandleSleep;
BEGIN
If (Not(Players[CurrentPlayer].Booleans[0])) then
Exit;
If ((IsOutsideCaves) and
(Runs = RunsUntilSleep))then
BEGIN
ID('Sleeping.');
LogOut;
MRWait(15);
LoginPlayer;
END;
RunsUntilSleep;
END;
{*******************************************************************************
Procedure : Setup
Creater : Dr D. Dervish
Use : Sets up the script
*******************************************************************************}
Procedure Setup;
VAR
X,Y: Integer;
BEGIN
Writeln('Welcome to Dr D. Dervish"s Fight Caver.');
Writeln('Fight Caver X Infinite ! Version : '+Version);
Playsound('C:/windows/media/tada.wav');
Wait(1000);
ID('Setting Up');
SRLPlayerForm(true,['Sleep ?',
'Change attack mode ?','Set chat ?',
'Use Special Attack ?'],
['Runs ?'],
['Weapon type ? (Melee/Ranged)',
'Skill to train ? (attack, strength, defence)','SRL Stats ID',
'SRL Stats Password'],[]);
LoginPlayer;
Wait(300+random(200));
FindNormalRandoms;
If (Players[CurrentPlayer].Booleans[2]) then
SetAllChats('off','off','off','off','off');
GameTab(1);
Retaliate(True);
If (Players[CurrentPlayer].Booleans[1]) then
BEGIN
CASE Players[CurrentPlayer].Strings[1] of
'attack' : SetFightMode(1);
'strength': SetFightMode(2);
'defence' : SetFightMode(4);
END;
END;
StartXP := GetXP(LowerCase(Players[CurrentPlayer].Strings[1]));
GameTab(4);
If (not(FindSymbol(X,Y,'minigame'))) then
BEGIN
ID('Error : could not find minigame symbol.');
TerminateScript;
END;
MakeCompass(IntToStr(150+random(60)));
SetRun(True);
END;
{*******************************************************************************
Procedure : Report
Creater : Dr D. Dervish
Use : Reports the progress of the script.
*******************************************************************************}
Procedure Report;
BEGIN
Writeln('=========================');
Writeln(Padr('||Fight Caver X Infinite',23)+'||');
Writeln(Padr('|| V0.1',23)+'||');
Writeln(Padr('|| by : Dr D. Dervish',23)+'||');
Writeln('=========================');
Writeln(Padr('||Ran for :',23)+'||');
Writeln(Padr('||'+TimeRunning,23)+'||');
Writeln('=========================');
Writeln(Padr('||Runs : '+IntToStr(Runs),23)+'||');
Writeln('=========================');
Writeln(Padr('||XP Gain : '+ IntToStr(EndXP-StartXP),23)+'||');
Writeln('=========================');
Writeln(Padr('||Damage dealt : '+ IntToStr((EndXP-StartXP)/4),23)+'||');
Writeln('=========================');
Writeln(Padr('||Post Progress Reports',23)+'||');
Writeln('=========================');
END;
BEGIN
Setup;
RunsUntilSleep;
Repeat
EnterCave;
HandleCave;
Report;
HandleSleep;
if not (loggedIn) then
begin
logout;
nextplayer(false);
LoginPlayer;
end;
//end;
begin
logout;
if howManyPlayers = 1 then
wait(random(600000));
nextplayer(true);
LoginPlayer;
end;
until (false);
end.
EDIT: urgh didnt see the form. duhhh me. sorry