SCAR Code:
program SuperHeat;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/magic.scar}
{
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| This Script Superheat Mithril Ores! |
|==========================================================================|
Created for scar 3.15+ and you must have the latest SRL
1. Use Runescape with Low Detail, Very Bright.
2. Set up in falador West Bank with...
3. Fire staff equiped.
4. Nature runes in your last inventory space.
5. Set up so u have withdraw-22 as an option in your bank.
(Just click withdraw-X then type 22... then restore that item.)
6. Have your coins in the 1st bank space, mithril ore in 2nd and coal in 3rd.
7. Prefered that you stand next to a bank booth with the bank screen up.
8. Have fun =)
==========================================================================
}
var
l, loads, x, y, nat: integer;
const
StartPlayer = 0; // Determines who will play first
MSpeed = 1000; //speed of the mouse (lower=lower higher=higher)
// MySRLID = ''; // Must be a string!
// MySRLPassword = ''; // Must be a string!
VersionNumber = 1; // No need to change
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer := StartPlayer; // CurrentPlayer = Array Index
Players[0].Name := 'user'; //username
Players[0].Pass := 'pass'; //password
Players[0].Nick := 'Nick'; //3-4 consecutive letters of your user name(NOT First letter)
Players[0].Strings[0] := 'mithril'; //type of bar bronze,iron,steel,mith,adamantite,runite,gold,silver,
Players[0].integers[0] := 5; //how many times to cast superheat
Players[0].Active := True; //are you going to use this player
end;
function FindOre(oreType: string; var rx, ry: integer; x1, y1, x2, y2: integer):
boolean;
var
ore, oreColor: integer;
oreMP: TDTMPointDef;
oreSP: array of TDTMPointDef;
oreSkel: TDTM;
begin
case lowercase(oreType) of
'coal': oreColor := 2570553;
'mithril': oreColor := 7425357;
else
begin
writeln('ore type not found');
exit;
end;
end;
setarraylength(oreSP, 4);
oreMP.x := 580;
oreMP.y := 229;
oreMP.areasize := 1;
oreMP.areashape := 0;
oreMP.color := oreColor;
oreMP.tolerance := 15;
oreSP[0].x := 576;
oreSP[0].y := 227;
oreSP[0].areasize := 0;
oreSP[0].areashape := 0;
oreSP[0].color := 65536;
oreSP[0].tolerance := 0;
oreSP[1].x := 574;
oreSP[1].y := 229;
oreSP[1].areasize := 0;
oreSP[1].areashape := 0;
oreSP[1].color := 65536;
oreSP[1].tolerance := 0;
oreSP[2].x := 563;
oreSP[2].y := 230;
oreSP[2].areasize := 0;
oreSP[2].areashape := 0;
oreSP[2].color := 65536;
oreSP[2].tolerance := 0;
oreSP[3].x := 592;
oreSP[3].y := 227;
oreSP[3].areasize := 0;
oreSP[3].areashape := 0;
oreSP[3].color := 65536;
oreSP[3].tolerance := 0;
oreSkel.MainPoint := oreMP;
oreSkel.SubPoints := oreSP;
ore := AddDTM(oreSkel);
result := findDTM(ore, rx, ry, x1, y1, x2, y2);
freeDTM(ore);
end;
procedure WithdrawOres;
begin;
l := 0
if (not (Loggedin)) then exit;
if (not (bankscreen)) then exit;
case lowercase(players[currentplayer].Strings[0]) of
'mithril':
begin
if findOre('mithril', x, y, msx1, msy1, msx2, msy2) then
else
begin
writeln('Can not find mithril');
terminatescript;
end;
begin
Withdraw(2,1,5);
wait(100 + random(100));
end;
wait(500 + random(500));
if findOre('coal', x, y, msx1, msy1, msx2, msy2) then
else
begin
writeln('Can not find coal');
terminatescript;
end;
begin
Withdraw(3,1,22);
wait(100 + random(100));
CloseBank;
begin
end;
end;
end;
end;
end;
procedure CastSuperheat1;
begin
if (not (Loggedin)) then exit;
Cast('Superheat Item');
Wait(700 + random(150));
if findOre(players[currentplayer].Strings[0], x, y, MIX1, MIY1, MIX2, MiY2) then
begin
MMouse(x, y, 2, 2);
wait(50 + random(150));
if IsUpText('ith') then
begin
Mouse(x, y, 5, 5, True);
Wait(450 + random(150));
end else Writeln('uptext not right');
end else
begin
writeln('Can not find ore');
exit;
end;
end;
procedure CastSuperheat2;
begin
if (not (Loggedin)) then exit;
Cast('Superheat Item');
Wait(700 + random(150));
if findOre(players[currentplayer].Strings[0], x, y, MIX1, MIY1, MIX2, MiY2) then
begin
MMouse(x, y, 2, 2);
wait(50 + random(150));
if IsUpText('ith') then
begin
Mouse(x, y, 5, 5, True);
Wait(450 + random(150));
end else Writeln('uptext not right');
end else
begin
writeln('Can not find ore');
exit;
end;
end;
procedure CastSuperheat3;
begin
if (not (Loggedin)) then exit;
Cast('Superheat Item');
Wait(700 + random(150));
if findOre(players[currentplayer].Strings[0], x, y, MIX1, MIY1, MIX2, MiY2) then
begin
MMouse(x, y, 2, 2);
wait(50 + random(150));
if IsUpText('ith') then
begin
Mouse(x, y, 5, 5, True);
Wait(450 + random(150));
end else Writeln('uptext not right');
end else
begin
writeln('Can not find ore');
exit;
end;
end;
procedure CastSuperheat4;
begin
if (not (Loggedin)) then exit;
Cast('Superheat Item');
Wait(700 + random(150));
if findOre(players[currentplayer].Strings[0], x, y, MIX1, MIY1, MIX2, MiY2) then
begin
MMouse(x, y, 2, 2);
wait(50 + random(150));
if IsUpText('ith') then
begin
Mouse(x, y, 5, 5, True);
Wait(450 + random(150));
end else Writeln('uptext not right');
end else
begin
writeln('Can not find ore');
exit;
end;
end;
procedure CastSuperheat5;
begin
if (not (Loggedin)) then exit;
Cast('Superheat Item');
Wait(700 + random(150));
if findOre(players[currentplayer].Strings[0], x, y, MIX1, MIY1, MIX2, MiY2) then
begin
MMouse(x, y, 2, 2);
wait(50 + random(150));
if IsUpText('ith') then
begin
Mouse(x, y, 5, 5, True);
Wait(450 + random(150));
end else Writeln('uptext not right');
end else
begin
writeln('Can not find ore');
exit;
end;
end;
procedure Bank;
var
Bar, time: Integer;
begin
Bar := DTMFromString('78DA63946660601062400113DBDB19B880342' +
'310FF0702460520839B010D302291401A648E0C01353C40429880' +
'1A652021825F0D00B24D0699');
MarkTime(time);
repeat
if (not (Loggedin)) then break;
OpenBankQuiet('feb')
until (BankScreen or (TimeFromMark(time) > 120000));
if Bankscreen then
else terminatescript;
begin
IsUpText('Mithril')
Deposit(1, 10, True);
loads := + 1
end;
FreeDTM(Bar);
end;
procedure ProgressReport;
begin
ClearDebug;
Writeln('<|~-+[]<------The Super Superheater!------>[]+-~|>');
Writeln(' / \ ( ) /0 0\ = _____');
Writeln(' < + > /\ \ \__/ = /___ /|');
Writeln(' \ / /\ \ \ \ \ = [Mith|/');
Writeln(' / \ V \ \/ =');
Writeln(' Auto mithril Superheater version 1 by: wtfwtfwtf');
Writeln(' Worked for ' + TimeRunning);
Writeln(' Banked ' + inttostr(Loads) + ' times');
Writeln('<|~-+[]<----For Smelting Mithril Bars!---->[]+-~|>');
Writeln('Thanks to Shuttleu for helpping solve the last prob.');
end;
procedure Setup;
begin;
SetupSRL;
ActivateClient;
Mousespeed := Mspeed;
DeclarePlayers;
LoginPlayer;
MakeCompass('n');
SetAngle(true);
OpenBankQuiet('feb');
end;
begin
setup;
repeat
OpenBankQuiet('feb');
WithdrawOres;
CastSuperheat1;
CastSuperheat2;
CastSuperheat3;
CastSuperheat4;
CastSuperheat5;
FindNormalRandoms;
Bank;
ProgressReport;
until (Loads = Players[currentplayer].integers[0]);
if (LoggedIn) then
LogOut;
if (Players[CurrentPlayer].Active = false) then
terminatescript;
end.