Code:
program HighAlcher;
{.include srl/srl.scar}
{.include SRL/SRL/skill/Magic.scar}
var
Alchs, x, y, TimesSlepted, utoh, LaLa : integer;
const
DirectionToSprint = 'W';//direction to run from fight?
Your_SRL_ID = ''; // don't have this? go to:
Your_SRL_Pass = ''; // http://www.stats.srl-forums.com/
//Note the above is uneeded but very nice!
////////////////////////////////////////////////////////////////////////////////
procedure SetupPlayers;
begin
NumberOfPlayers(1);//Don't Change This
CurrentPlayer := 0;//Int!
Players[0].Name := 'Username'; //UserName
Players[0].Pass := 'Password'; //Password
Players[0].Nick := 'sern'; //Nick Name
Players[0].Active := True; //Use This Player [ True / False ]
Players[0].Integers[1] := 25; //Sleep Every How Many Minutes?
Players[0].Integers[2] := 1; //Sleep For How Long? [ Minutes ]
Players[0].Booleans[1] := False; //Use Sleeps? [True | False]
end;
////////////////////////////////////////////////////////////////////////////////
procedure ProgressReport; forward;
////////////////////////////////////////////////////////////////////////////////
procedure ScriptTerminate;
begin
ProgressReport;
SendSRLReport;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
function Stop : boolean;
begin
Result := False;
if not(LoggedIn) then Result := True;
if utoh >= 5 then
begin
Writeln('utoh');
Result := True;
end;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
procedure WaitAround;
var
I : integer;
begin
if not(LoggedIn) then TerminateScript;
repeat
Wait(100);
Inc(i);
until FindColor(x, y, 1778795, 732, 178, 732, 178) or (I >= 10);
for I := 0 to 2 do
begin
wait(550 + random(40));
if FindTalk then
begin
SRLRandomsReport;
break;
end;
end;
if FindNonInventoryRandoms then SRLRandomsReport;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
function AntiBan : boolean;
begin
if not(LoggedIn) then TerminateScript;
case random(200) of
4, 5, 6: Begin
KeyDown(VK_Left);
Wait(random(1000));
KeyUp(VK_Left);
WaitARound;
Result := True;
end;
7, 8, 9: Begin
KeyDown(VK_Right);
Wait(random(1000));
KeyUp(VK_Right);
WaitAround;
Result := True;
end;
10, 11, 12: begin
KeyDown(VK_Down);
Wait(235+ random(235));
KeyUp(VK_Down);
KeyDown(VK_Up);
KeyDown(VK_Left);
Wait(1000 + random(1000));
KeyUp(VK_Up);
Wait(500 + random(800));
KeyUp(VK_Left);
if FindNonInventoryRandoms then SRLRandomsReport;
Result := True;
end;
13, 14, 15, 16: begin
HoverSkill('magic', False);
if FindNonInventoryRandoms then SRLRandomsReport;
Result := True;
end;
17: begin
BoredHuman;
if FindNonInventoryRandoms then SRLRandomsReport;
Result := True;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
{Nice little funct to find if there are noted yew longs}
function NotesThere : boolean;
var
yewnote : integer;
begin
yewnote := DTMFromString('78DA63B4676260F0666440058C4824903605A' +
'AF14515C350630E54E347408D2D504D0C0135AE4035B104D4F803' +
'D5441350E307541344404D00C2EFB8D40000EEF504E9');
result := (GetCurrentTab = 4) and FindDTM(yewnote, x, y, 562, 320, 594, 355);
freedtm(yewnote);
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
function FindIvenRands : boolean;
begin
Result := False;
if not(LoggedIn) then TerminateScript;
if (FindInventoryRandoms) then
begin
MouseBox(738, 208, 756, 463, 1);
wait(50+random(50));
if (SolveBox) then
begin
Result := True;
SRLRandomsReport;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
function CastHAlch : boolean;
var
Halch :integer;
foundit :boolean;
begin
if not(GetCurrentTab = 7) then
begin
GameTab(7);
wait(400+random(200));
end;
if not(GetCurrentTab = 7) then EXIT;
Halch := DTMFromString('78DA63B465626048606440058C482490B606A' +
'A894315C350E304541343408D11504D320135AE84D500004B8A03' +
'34');
foundit := FindDTM(Halch, x, y, 559, 338, 584, 361);
freedtm(Halch);
if foundit then
begin
MouseBox(567, 342, 578, 352, 1);
end;
result := foundit;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
function OnLongbows : boolean;
var
I : integer;
begin
wait(300+random(50));
if not(LoggedIn) then TerminateScript;
if (FindIvenRands) then
begin
SRLRandomsReport;
EXIT;
end;
if not(NotesThere) then
begin
Writeln('No Notes That Time');
EXIT;
end;
getMousePos(x, y);
Mouse(x, y, 0, 0, true);
Alchs := Alchs + 1;
ReportVars[0] := ReportVars[0] + 65;
ReportVars[1] := ReportVars[1] + 1;
Result := True;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
procedure WaitWhileAlching;
begin
if not(LoggedIn) then TerminateScript;
if AntiBan then EXIT;
WaitAround;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
procedure SleepTime;
begin
if not(TimeFromMark(Lala) >= Players[CurrentPlayer].Integers[1] * (60000))
or not Players[CurrentPlayer].Booleans[1] = True then EXIT;
Writeln('Sleeping For Anti-BAN');
Logout;
MarkTime(LaLa);
wait((Players[CurrentPlayer].Integers[2] * 60000) + random(60000));
LoginPlayer;
Writeln('Just Took A break for: ' + IntToStr(Players[CurrentPlayer].Integers[2] * 60000));
inc(TimesSlepted);
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Var LRT : Integer;
Procedure ProgressReport;
begin
if (TimeFromMark(LRT) >= 310000) then
begin
SendSRLReport;
MarkTime(LRT);
end;
Writeln('==========================================');
Writeln(' -§ Longbow High Alchemy: FootBalljds §- ');
Writeln('- Thanks SRL Team!!! -');
Writeln('==========================================');
Writeln('Been High Alching For You For ');
Writeln(TimeRunning );
if (TimesSlepted > 0) then Writeln('Slepted: ' + IntToStr(TimesSlepted) + ' Times');
Writeln('High Alched ' + IntToStr(Alchs) );
Writeln('Gained ' + IntToStr(Alchs * 65) + ' Exp ');
Writeln('==========================================');
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
procedure MainLoop;
begin
if not LoggedIn then
begin
LoginPlayer;
SetAngle(True);
FindNormalRandoms;
Writeln('just logged in, waiting 2-5 seconds');
wait(randomRange(2000, 5000));
end;
repeat
MouseSpeed := 12 + random(3) + random(-2);
if FindFight then
begin
RunAway(DirectionToSprint, True, 1, 5000);
SRLRandomsReport;
end;
if (FindNonInventoryRandoms) then SRLRandomsReport;
if CastHAlch then
begin
Status('Casting HighAlch');
if OnLongbows then WaitWhileAlching else Inc(utoh);
utoh := 0;
Status('Casting HighAlch: on longbows');
end else Inc(utoh);
ProgressReport;
SleepTime;
until Stop;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
begin
SetupSRL;
{SmartSetupEx(144, true, true, false);
wait(10000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);}
ActivateClient;
ScriptId := '549';
SRLID := Your_SRL_ID;
SRLPassword := Your_SRL_Pass;
wait(500);
SetupPlayers;
MarkTime(LRT);
MarkTime(LaLa);
MainLoop;
Logout;
end.
////////////////////////////////////////////////////////////////////////////////
my problem is itl run but it after 0-6 alchs it moves the mouse outside of rs and stucks lol.... help would be nice