SCAR Code:
program new;
{.Include SRL\SRL.SCAR}
{.include SRL/SRL/Skill/Magic.scar}
const
Username = ''; //Your Runescape username
Password = ''; //Your Runescape password
Nickname = ''; //Few letters from your name Example: Username = 'Zezima' then the nickname would be 'Zez'
ToDo = 1000; //How many rings do you want to alch
logo = false; //Log out after doing the desired ammount of alches/Using all your nature runes?
var
x, y, a, b, counter, exp: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;
end;
procedure FindIrksol; // You should make this a function and make it return a boolen of whether Irksol is found or not.
var
TMT, Times: Integer;
begin
if not ShopScreen then
begin
Wait(2000 + Random(3000));
if FindSymbol(x, y, 'gem stall') then
begin
Writeln('Walking to gem stall');
Flag;
Mouse(x + 12, y, 0, 0, true);
Flag;
end;
repeat
Times := 0;
Inc(TMT);
if FindObjCustom(x, y, ['Talk-to Irk'], [2965826, 2965826], 4) then
begin
Wait(50 + Random(20));
Mouse(X, Y, 1, 1, false);
Wait(50 + Random(20));
if ChooseOption('rade') then
begin
repeat
Times := Times + 1;
Wait(100 + Random(100));
until ShopScreen or (Times > 20);
if ShopScreen then
begin
Writeln('Trading Irksol');
Exit;
end;
end;
end;
until (TMT > 5);
if not(ShopScreen) then
begin
if FindSymbol(x, y, 'gem stall') then
begin
Mouse(x + 12, y, 0, 0, True);
Players[CurrentPlayer].Loc := 'gem stall';
FindIrksol;
end;
end else
Writeln('Could Not Find Irksol.');
end else
Logout;
end;
Procedure BuyRings;
begin
FindIrksol; // Here you could use "if FindIrkSol then"
Wait(100 + Random(2000));
MouseBox(74, 101, 85, 111, 3);
if IsUpText('Ruby') then
begin
Writeln('Buying rings');
GetMousePos(x, y);
Wait(100 + Random(100));
Mouse(x, y, 0, 0, False);
ChooseOption('Buy X');
Wait(1000 + Random(200));
case Random(8) of
0: SendKeys('28'+chr(13));
1: SendKeys('32'+chr(13));
2: SendKeys('54'+chr(13));
3: SendKeys('55'+chr(13));
4: SendKeys('65'+chr(13));
5: SendKeys('65'+chr(13));
6: SendKeys('98'+chr(13));
7: SendKeys('87'+chr(13));
end;
CloseWindow;
end else
begin
MouseBox(50, 70, 116, 79, 1);
Wait(100 + Random(600));
BuyRings; // Infinity loop?
end;
Wait(400 + Random(100));
end;
procedure Progress;
begin
ClearDebug;
if not(LoggedIn) or (Counter > ToDo) then
begin
Writeln('----------------------------------------------');
Writeln(' _____________________________________________');
Writeln('- Sleziak''s Zanaris alcher ');
Writeln('- Ran for: ' + (TimeRunning) + ' ');
Writeln('- Alched ' +IntToStr(Counter)+ ' rings ');
Writeln('- You have gained ' + IntToStr(exp) + ' Exp!' );
Writeln('- Succesfully alched all requested rings ');
Writeln('- Post this proggy please ;) ');
Writeln('-_____________________________________________');
Writeln('----------------------------------------------');
TerminateScript;
end else
begin
ClearDebug;
if (Counter < ToDo) then
begin
Writeln('----------------------------------------------');
Writeln(' _____________________________________________');
Writeln('- Sleziak''s Zanaris alcher ');
Writeln('- Ran for: ' + (TimeRunning) + ' ');
Writeln('- Alched ' +IntToStr(Counter)+ ' rings ');
Writeln('- You have gained ' + IntToStr(exp) + ' Exp! ');
Writeln('- Still running! ');
Writeln('- Post this proggy please ;) ');
Writeln('-_____________________________________________');
Writeln('----------------------------------------------');
end;
end;
end;
procedure Checkrunes;
begin
if (FindBlackChatMessage('ature')) then
TerminateScript;
end;
Procedure Alch;
begin
repeat
if (not(LoggedIn)) then
LoginPlayer;
FindNonInventoryRandoms;
Wait(400 + random(100));
Cast('high level alchemy');
if FindColorTolerance(a, b, 1749707, 555, 213, 722, 453, 2) then
begin
MMouse(a + Random(5), b + Random(5), 0, 0);
Wait(1600 + Random(100));
end else
BuyRings;
Mouse(a, b, 0, 0, True);
CheckRunes;
exp := exp + 65;
counter := counter + 1;
Progress;
until(false); // Add failsafes
end;
Procedure ScriptTerminate;
begin
Progress;
WriteLn('Out of runes!');
if logo then
Logout
else
WriteLn('Finished script/Out of runes!');
end;
begin
SetUpSRL;
DeclarePlayers;
LoginPlayer;
Wait(2000 + Random(200));
repeat
SetAngle(True);
MakeCompass('N');
SetRun(True);
BuyRings;
Alch;
FindNormalRandoms;
CheckRunes;
Progress;
Wait(2000 + Random(200));
until(not(LoggedIn));
end.