[ _____ _ _
______ | ____ \ |_| ___| |___
/ _____\ ____ _____ | \ \| _ |___ ___|
/ | / __\ / __ \ | \ \| | | | |
\ \____ | | | / __| | \___\| | | | |
\______\ |_| | \____ \______/ |_| |_| 2 FOR HELP
\_____/
SMARTZKID AND SEROKO whiteshadow
{.include SRL\SRL.Scar}
{.include SRL\SRL\Skill\Fighting.Scar}
var
CaveColor: array[0..2] of Integer;
SwitchMark, IntTime, i: Integer;
CCFound: Boolean;
Const
VerNumber = '1.0'; // Version Number
iPlay = 5; // Minutes until switch player
{ ---------------------------------------------------------------------------- ]
[ Procedure DeclarePlayers - Declares Players. ]
[ ---------------------------------------------------------------------------- }
Procedure DeclarePlayers;
Begin
HowManyPlayers := 4;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Integer1 := 2; //1 - 4 fightmode.
Players[0].Active := True;
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Integer1 := 1; //1 - 4 fightmode.
Players[1].Active := True;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Integer1 := 1; //1 - 4 fightmode.
Players[2].Active := True;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Integer1 := 1; //1 - 4 fightmode.
Players[3].Active := True;
end;
{ ---------------------------------------------------------------------------- ]
[ Function AttackType - Sets attack type. ]
[ ---------------------------------------------------------------------------- }
Function AttackType : String;
Begin
case Players[CurrentPlayer].Integer1 of
1 : Result:= 'attack';
2 : Result:= 'strength';
3 : Result:= 'hitpoints';
4 : Result:= 'defence';
end;
end;
{ ---------------------------------------------------------------------------- ]
[ Procedure LoadScript - By: WhiteShadow ]
[ ---------------------------------------------------------------------------- }
Procedure LoadScript;
Begin
ClearDebug;
SetUpSRL;
DeclarePlayers;
BenMouse:= True;
MouseSpeed:= 7 + random(3);
cavecolor[0]:= 6645101;
cavecolor[1]:= 7829376;
cavecolor[2]:= 8750479;
if(not(LoggedIn)) then
LoginPlayer;
End;
Begin
LoadScript;
repeat
if(LoggedIn)then
begin
CCFound := false;
for i := 0 to Length(CaveColor) - 1 do
if(FindColorTolerance(x, y, cavecolor[i], MSX1, MSY1, MSX2, MSY2, 10))then
CCFound := true
if(CCFound)then
Begin
Mouse(x, y, 5, 5, true); //click on cavecolor
//other stuff to do after cavecolor has been clicked
end else
begin
Writeln('Could not find cave color');
Logout;
end;
end else
begin
MouseSpeed:= 7 + random(3);
NextPlayer(False);
MarkTime(SwitchMark);
SetFightMode(Players[CurrentPlayer].Integer1);
SetRun(True);
GameTab(4);
HighestAngle;
IntTime:= (iPlay * 60000) + random(5 * 60000);
end;
if(TimeFromMark(SwitchMark) > IntTime)then
begin
MouseSpeed:= 7 + random(3);
NextPlayer(True);
MarkTime(SwitchMark);
SetFightMode(Players[CurrentPlayer].Integer1);
SetRun(True);
GameTab(4);
HighestAngle;
IntTime:= (iPlay * 60000) + random(5 * 60000);
end;
until(False)
End.






Reply With Quote







Currently Learning the Basics of Scar 