Simba Code:
program Soul_Color; // SRL's first colour SW script
{$DEFINE SMART}
{$i SRL\SRL.scar}
{
ATTEMPT NUMBER 1
}
const
SERVER = 143; //Game server to load in SMART. 143 = Default Soul Wars world.
_DEBUG = True; //Debug information.
procedure Debug(s: string); //Global debugging function.
begin
if (_DEBUG) then
WriteLn(s);
end;
procedure PreGameSetup; //pre-game check list.
begin
if (not LoggedIn) then //please start logged in
begin
Debug('Not logged in...');
Exit;
end;
FindNormalRandoms; //Check randoms....
Debug('Pre-game setup...');
Debug('Setting compass true.');
ClickNorth(True);
Debug('Checking Equip..');
GameTab(tab_Equip);
if (GetCurrentTab = tab_Equip) then //Cape's can not be worn in Soul Wars!
begin
Debug('Checking if we''re wearing a cape..');
if (WearingItem(2)) then
begin
Debug('please take cape off and try again ');
Logout;
TerminateScript;
end else
Debug('Cape check sucsessful, we shall begin');
end else
Debug('Failed to open equip tab.');
Debug('Going to home tab.');
GameTab(tab_Inv); //Home tab..
end;
procedure HandleRun;
var
color: string;
RunAmount: Integer;
begin
if (not LoggedIn) then //please start logged in?
begin
Debug('Not logged in.');
Exit;
end;
Debug('Checking Run.');
if (CountColorTolerance(3467501, 720, 117, 723, 119, 80) < 1) then //If run is not on.
begin
RunAmount := GetMMLevels('run', color);
Debug('RunAmount: ' + IntToStr(RunAmount));
if (RunAmount > 80) then //More energy than 80...
begin
Debug('Run Amount >80, running shall commence.);
SetRun(True); //Lets run!
end else
Debug('...less than 80...'); //Not enough energy, will try again soon.
end else
Debug('Already running. o.O'); //Running, waiting untill it runs out.
end;
begin
Smart_Server := SERVER;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
repeat //Test loop. DO NO USE.
if (not LoggedIn) then
LogInPlayer;
PreGameSetup;
HandleRun;
until not LoggedIn;
end.
can admin tell me if this is ok?