Simba Code:
program Superheater;
//{$DEFINE SMART}
{$i SRL/SRL.simba}
{$i SRL/SRL/SKILL/Magic.simba}
//{$IFDEF SMART}
// {$i srl/srl/mis/paintsmart.simba}
//{$ENDIF}
//MIX1, MIY1, MIX2, MIY2 - main inventory coords
//MSX1, MSY1, MSX2, MSY2 - main screen coords
//MBX1, MBY1, MBX2, MBY2 - main bank coords
//DBX1, DBY1, DBX2, DBY2 - deposit box coords
//MSCX, MSCY - main screen center coords
//xs, ys, xe, ye - whole screen coords
var
fs, fs1, x, y, MagicXPH, SmithingXPH, InvOre, InvBars, {LevelsGained,}
Superheats, SuperheatsPH, AntiBans, AntiBansPH :Integer;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~ ---=< Setup >=---
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const
VERSION = '0.4'; //Script Version
SUPERHEATSTODO = 1000; //How many ores to Superheat
SRLStats_User = ''; //SRLStats Username
SRLStats_Password = ''; //SRLStats Password
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:= True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'ssence'];
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~ ---=< Progress Report >=---
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procedure OnFinish;
var
MagicXP :Integer;
begin
AntiBansPH := Round((AntiBans * 3600) / (GetTimeRunning / 1000));
MagicXP := Superheats * 53;
MagicXPH := Round((MagicXP * 3600) / (GetTimeRunning / 1000));
//SmithingXP := ;
//SmithingXPH := Round((SmithingXP * 3600) / (GetTimeRunning / 1000));
SuperheatsPH := Round((Superheats * 3600) / (GetTimeRunning / 1000));
Writeln('');
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Writeln(' Thank you for using Superheater');
Writeln(' Version: '+ version);
Writeln(' Author: Wreck');
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Writeln('Time Running: ' + TimeRunning);
Writeln('AntiBans Done: ' + IntToStr(AntiBans));
Writeln('AntiBans/Hour: ' + IntToStr(AntiBansPH));
//Writeln('Levels Gained: ' + IntToStr(LevelsGained));
Writeln('Superheats Done: ' + IntToStr(Superheats));
Writeln('Superheats/Hour: ' + IntToStr(SuperheatsPH));
Writeln('Magic XP Gained: ' + IntToStr(MagicXP));
Writeln('Magic XP/Hour: ' + IntToStr(MagicXPH));
//Writeln('Smithing XP Gained: ' + IntToStr(SmithingXP));
//Writeln('Smithing XP/Hour: ' + IntToStr(SmithingXPH));
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Logout;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~ ---=< AntiBan >=---
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procedure FindRandoms;
begin
FindNonInventoryRandoms;
FindNormalRandoms;
end;
procedure AntiBan;
begin
case random(400) of
1: Begin HoverSkill('magic', False); AntiBans := AntiBans + 1; End;
2: Begin HoverSkill('random', False); AntiBans := AntiBans + 1; End;
3: Begin Boredhuman; AntiBans := AntiBans + 1; End;
4: Begin Wait(2500 + random(4500)); AntiBans := AntiBans + 1; End;
5: Begin HoverSkill('smithing', False); AntiBans := AntiBans + 1; End;
6: Begin PickUpMouse; AntiBans := AntiBans + 1; End;
7: Begin RandomMovement; AntiBans := AntiBans + 1; End;
8: Begin RandomRClick; AntiBans := AntiBans + 1; End;
end;
end;
function Failsafes: Boolean;
begin
if (fs >= 5) then
Result := false else
if (fs1 >= 5) then
Result := false else
Result := true;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~ ---=< Main Script >=---
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function FindNatureRunes: Boolean;
var
NatureRuneDTM :Integer;
begin
NatureRuneDTM := DTMFromString('mrAAAAHic42BgYOBlQAA2IBYEYkkglgFiaSBmBmJGIOYE' +
'YiEgFgFifiBmh+oRqgKJMOHEcgz4ASMBDAMAui4Bmg==');
if (not (GameTab(tab_inv))) then
GameTab(tab_inv) else
if FindDTM(NatureRuneDtm, x, y, MIX1, MIY1,MIX2,MIY2) then
begin
writeln('Nature runes found - Starting Script');
Result := True;
end else
begin
writeln('Unable to find nature runes - Ending Script');
Result := False;
end;
FreeDTM(NatureRuneDTM);
end;
procedure InventoryCount; //Will create shorter DTMs soon.
var
IronOreDTM, IronBarDTM:Integer;
begin
IronOreDTM := DTMFromString('mKgEAAHicncxJCoAwEETRjkoIiEZdOOB4CO9/Nn+wNi5Nwds' +
'0Vd2aWURACYdatw4LVsyy4cKuTdTOY8KIAT0a/QpS2Zv7TM3' +
'it8Py4jJ98wAHJwJd');
IronBarDTM := DTMFromString('m1gAAAHic42JgYOADYnYgZmSAAEkgFgBiLiAWAWJZIJYCYlY' +
'gZoKq54RiISAWhIqxQPU72dtDVeLHcgzEAUYiMQIAACAQAfU' +
'=');
InvOre := CountItems('dtm', IronOreDTM, []);
InvBars := CountItems('dtm', IronBarDTM, []);
FreeDTM(IronOreDTM);
FreeDTM(IronBarDTM);
end;
procedure Bank;
var
IronOreDTM, IronBarDTM :Integer;
begin
IronOreDTM := DTMFromString('mKgEAAHicncxJCoAwEETRjkoIiEZdOOB4CO9/Nn+wNi5Nwds' +
'0Vd2aWURACYdatw4LVsyy4cKuTdTOY8KIAT0a/QpS2Zv7TM3' +
'it8Py4jJ98wAHJwJd');
IronBarDTM := DTMFromString('m1gAAAHic42JgYOADYnYgZmSAAEkgFgBiLiAWAWJZIJYCYlY' +
'gZoKq54RiISAWhIqxQPU72dtDVeLHcgzEAUYiMQIAACAQAfU=');
if (not (BankScreen)) then
begin
OpenBankChest(SRL_BANK_SW);
wait(500+RandomRange(50,250));
end else
if (PinScreen) then
InPin(Players[0].Pin) else
if ((InvBars >= 1) and (InvOre = 0)) then
if WaitFindDTMEx(IronBarDtm, x, y, MIX1, MIY1, MIX2, MIY2, 50, 500) then
begin
Mouse(x, y, 10, 10, mouse_Right);
if WaitOption('-All Ir', 500) then
begin
wait(750+RandomRange(50,250));
InventoryCount;
end
else
writeln('Depositing Failed');
end
else
writeln('FindDTM unable to find IronBarDtm');
if ((InvOre = 0) and (InvBars = 0)) then
if WaitFindDTMEx(IronOreDtm, x, y, MBX1, MBY1, MBX2, MBY2, 50, 500) then
begin
Mouse(x, y, 10, 10, mouse_Right);
if WaitOption('-All Ir', 500) then
begin
wait(750+RandomRange(50,250));
InventoryCount;
end
else
writeln('Withdrawing Failed');
end
else
writeln('FindDTM unable to find IronOreDtm');
FreeDTM(IronOreDTM);
FreeDTM(IronBarDTM);
end;
procedure Superheat;
var
SuperheatDTM, IronOreDTM :Integer;
begin
SuperheatDTM := DTMFromString('mlwAAAHicY2dgYOAAYnYgZgZiQSAWYIAARiDmg7LZgJgTK' +
'scPxDxA/O71BgY9RmasWI4BN2DEg6EAAISYBF4=');
IronOreDTM := DTMFromString('mKgEAAHicncxJCoAwEETRjkoIiEZdOOB4CO9/Nn+wNi5Nwds' +
'0Vd2aWURACYdatw4LVsyy4cKuTdTOY8KIAT0a/QpS2Zv7TM3' +
'it8Py4jJ98wAHJwJd');
if (not (GameTab(tab_magic))) then
begin
FindRandoms;
writeln('Unable to find spell - Selecting Spellbook');
GameTab(tab_magic);
end else
if WaitFindDTMEx(SuperheatDTM, x, y, MIX1, MIY1, MIX2, MIY2, 50, 500) then
begin
fs := 0;
Mouse(x, y, 7, 7, mouse_Left);
FindRandoms;
if WaitFindDTMEx(IronOreDTM, x, y, MIX1, MIY1,MIX2,MIY2, 50, 500) then
begin
fs1 := 0;
MMouse(x, y, 10, 10);
//if IsUpText('ast Sup') then
if WaitUpTextMulti(['ast Sup', 'ron ore'], 500) then
begin
InventoryCount;
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_Left);
Superheats := Superheats + 1;
InvOre := InvOre - 1;
InvBars := InvBars + 1;
//WaitFindDTM(x, y, SuperheatDTM, 1000+RandomRange(150,250));
WaitFindDTMEx(SuperheatDTM, x, y, MIX1, MIY1,MIX2,MIY2, 50, (1000+RandomRange(150,250)));
end;
end else
fs1 := fs1 + 1;
end else
fs := fs + 1;
FreeDTM(SuperheatDTM);
FreeDTM(IronOreDTM);
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~ ---=< Main Loop >=---
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetUpSRL;
ActivateClient;
DeclarePlayers;
if not(LoggedIn) then
LoginPlayer else
if FindNatureRunes then
begin
MakeCompass('W');
SetAngle(SRL_ANGLE_HIGH);
InventoryCount;
SetSpellMode(False, False, False, True);
SortBook(BOOKSORT_COMBAT);
repeat
if (InvOre = 0) then
Bank else
if ((InvOre >= 1) and BankScreen) then
CloseBank else
Superheat;
Antiban;
until (Superheats = SUPERHEATSTODO) or (Failsafes = False);
OnFinish;
end;
end.