Simba Code:
program AIOBonfire;
{$DEFINE SMART}
{$DEFINE PAINT}
{$i SRL\SRL.simba}
{$I SRL/SRL/Misc/SmartGraphics.Simba}
{$i sps/sps.simba}
{Instuctions:
1. Fill out the constants right under this. (Make sure you do it right)
2. Have logs to burn in first bank slot.
3. Fill in DeclarePlayers if you want script to log you in. ( You kind of have to if you want pin support)
4. Hit run.
5. Enjoy the script :)}
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 41; // Enter "0" to pick a random server.
MEMBERS = True;
NUMBOFPLAYERS = 1;
STARTPLAYER = 0;
BANK = 'GE'; // Can be Draynor, FaladorEast, FaladorWest, Varrock, GE or CastleWars
LOG = 'Maple'; // Can be Willow, Maple, Oak, NormalLog, Yew
LEFTCLICK = 'True'; // True for left click then select add to bonfire
var
LogsAdded, Rewards, TotalEXP, Start, Level, Final, x, y, Willow, Maple, NormalLog, Oak, Yew, Shantay, CellarChest: Integer;
aFound: Extended;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP'];
With Players[0] do
begin
Name := ''; //Username.
Pass := ''; //Password.
Pin := ''; //Bank Pin.
Active := True;
end;
end;
procedure GetStartExp;
begin
Start := GetXPBarTotal
end;
procedure GetEndExp;
begin
Final := GetXPBarTotal
end;
procedure RewardsGotten;
begin
if FindBlackChatMessage('reward') then
Inc(Rewards);
end;
procedure LevelsGained;
begin
if (LevelUp) then
Inc(Level);
Writeln('Gained a Firemaking level');
end;
function AddingLogs: Boolean;
begin
if FindBlackChatMessage('add') then
begin
Result := True;
end else Result := False;
end;
procedure AddedLogs;
begin
if FindBlackChatMessage('You add a log to the fire') then
Inc(LogsAdded);
Writeln('Log was added');
end;
function FireColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.69, 0.58);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 3514875, MSX1, MSY1, MSX2, MSY2, 2);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 50.13) and (X <= 56.41) and (Y >= 39.92) and (Y <= 52.93) and (Z >= 7.53) and (Z <= 11.68) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function FindFire(x, y: Integer): Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.69, 0.58);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3514875, MSX1, MSY1, MSX2, MSY2, 2);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
if High(TPA) > 100 then
MMouse(x, y, 2, 2);
If(IsUpTextMultiCustom(['ore', 'ptions'])) then
begin
Result := True;
GetMousePos(x, y);
Break;
ColorToleranceSpeed(CTS);
end;
end;
end;
function FindSpirit(x, y: Integer): Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.01, 0.22);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 4748455, MSX1, MSY1, MSX2, MSY2, 5);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
if High(TPA) > 100 then
MMouse(x, y, 2, 2);
If(IsUpTextMultiCustom(['ollect', 'pirit'])) then
begin
Result := True;
GetMousePos(x, y);
Break;
ColorToleranceSpeed(CTS);
end;
end;
end;
function FindObject(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.11, 2.05);
if not(FindColorsTolerance(arP, 4497123, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 27.65) and (X <= 58.02) and (Y >= 25.81) and (Y <= 55.24) and (Z >= 7.46) and (Z <= 24.23) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 20, 20);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Walk')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;
GetMousePos(fx, fy);
end;
function FindSpirit2(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.16);
if not(FindColorsTolerance(arP, 4614308, MSX1, MSY1, MSX2, MSY2, 6)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 16.47) and (X <= 26.73) and (Y >= 14.19) and (Y <= 22.90) and (Z >= 6.56) and (Z <= 10.42) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 15, 15);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Collect')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;
GetMousePos(fx, fy);
end;
procedure AntiBan;
begin
if (LogsAdded = 20) then
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
begin
WriteLn('Skill Check');
HoverSkill('Random', False);
Wait(1000 + Random(200));
end;
end;
end;
procedure GetLogs;
begin
if InvEmpty then
begin
case BANK of
'Draynor':
begin
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4202, 3683));
OpenBankFast('db');
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
Writeln('Got logs');
end;
end;
end;
'FaladorEast':
begin
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(3883, 3234));
OpenBankFast('feb');
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
end;
end;
end;
'FaladorWest':
begin
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(3626, 3185));
OpenBankFast('fwb');
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
end;
end;
end;
'VarrockEast':
begin
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4841, 2972));
OpenBankFast('veb');
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
end;
end;
end;
'VarrockWest':
begin
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4566, 2900));
OpenBankFast('vwb');
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
end;
'GE':
begin
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4553, 2724));
SetAngle(SRL_ANGLE_LOW);
OpenBankNPC;
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
SetAngle(SRL_ANGLE_HIGH);
end;
end;
end;
'CastleWars':
begin
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(1619, 4335));
OpenBankChest(SRL_BANK_CW);
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
end;
end;
end;
'Shantay':
begin
SPS_WalktoPos(Point(5068, 4178));
if FindDTMRotated(Shantay, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
MMouse(x, y, 1, 1);
if IsUpText('pen') then
begin
ClickMouse2(True);
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
Writeln('Got logs');
end;
end;
end;
end;
end;
'Lumbridge':
begin
if FindDTMRotated(CellarChest, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
MMouse(x, y, 1, 1);
if IsUpText('ank') then
begin
ClickMouse2(True);
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
repeat
InPin(Players[0].Pin);
until (BankScreen);
if (BankScreen) then
begin
DepositAll;
Withdraw(0, 0, 0);
CloseBank;
Writeln('Got logs');
end;
end;
end;
end;
end;
end;
end;
end;
procedure DTMS;
begin
Willow := DTMFromString('mLgAAAHicY2JgYPjPyMDAysTAEAekg4HY1VaUwdlahIEVKAfCjFDMwAAAXc0C8g==');
Maple := DTMFromString('mLgAAAHicY2JgYGBlYmDgBmJ9RgYGNSAONOVmiLHhZWAFyQExIxQzMAAAK4EBsA==');
Oak := DTMFromString('mLgAAAHicY2JgYLjByMDwEIj1gVgLiMsjTRgqo00ZWIFyIMwIxQwMAIFuBDI=');
Yew := DTMFromString('mLgAAAHicY2JgYAhhYmBIBmJjRgYGZSDOjzRksNbmYGAFyoEwIxQzMAAASzYCiQ==');
NormalLog := DTMFromString('mLgAAAHicY2JgYNBiYmAwAWJ9RgYGHSAOtldlcDCQYWAFyoEwIxQzMAAAOcMCEQ==');
Shantay := DTMFromString('mGQAAAHicY2RgYPBiYmCwZGRgqMlPYGAG8oFMBgYAGgUB1w==');
CellarChest := DTMFromString('mLgAAAHicY2JgYDBlZGCwB+K9QPZRIC7PiWYozY5iYAWyQZgRihkYAHzLBH8=');
end;
procedure FrDTMS;
begin
FreeDTMS([Willow, Maple, Oak, Yew, NormalLog, Shantay, CellarChest]);
end;
procedure StartFire;
var
x, y: integer;
begin
case LOG of
'Willow':
begin
if FindDTM(Willow, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 2, 2);
if IsUpText('og') then
begin
ClickMouse2(mouse_right);
WaitOption('ight', 200);
end;
end;
end;
'Maple':
begin
if FindDTM(Maple, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 2, 2);
if IsUpText('og') then
begin
ClickMouse2(mouse_right);
WaitOption('ight', 200);
end;
end;
end;
'Oak':
begin
if FindDTM(Oak, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 2, 2);
if IsUpText('og') then
begin
ClickMouse2(mouse_right);
WaitOption('ight', 200);
end;
end;
end;
'NormalLog':
begin
if FindDTM(NormalLog, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 2, 2);
if IsUpText('og') then
begin
ClickMouse2(mouse_right);
WaitOption('ight', 200);
end;
end;
end;
'Yew':
begin
if FindDTM(Yew, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 2, 2);
if IsUpText('og') then
begin
ClickMouse2(mouse_right);
WaitOption('ight', 200);
end;
end;
end;
end;
end;
procedure GoToBurningSpot;
begin
if InvFull then
begin
case BANK of
'Draynor':
begin
FindNormalRandoms;
//Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4208, 3663));
end;
'FaladorEast':
begin
FindNormalRandoms;
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(3886, 3210));
end;
'FaladorWest':
begin
FindNormalRandoms;
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(3618, 3155));
end;
'VarrockEast':
begin
FindNormalRandoms;
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4850, 2937));
end;
'VarrockWest':
begin
FindNormalRandoms;
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4585, 2340));
end;
'GE':
begin
FindNormalRandoms;
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(4564, 2709));
end;
'CastleWars':
begin
FindNormalRandoms;
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(1607, 4334));
end;
'Shantay':
begin
FindNormalRandoms;
Wait(RandomRange(200, 300));
SPS_WalkToPos(Point(5047, 4177));
end;
end;
end;
end;
procedure GetReward;
var
x, y: integer;
begin
if IsChatBoxTextAnyLine('A fire spirit emerges from the bonfire.', 397249) then
begin
AntiBan;
if (FindSpirit(x, y) or FindSpirit2(x, y)) then
begin
MMouse(x, y, 1, 1);
if IsUpText('pirit') then
begin
ClickMouse2(mouse_right);
WaitOption('ollect', 200);
end;
end;
end;
end;
procedure Report;
begin
TotalEXP := ((Final) - (Start));
Writeln('############### Guccis Bonfires #############');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Exp Gained : ' + IntToStr(TotalEXP));
Writeln('|= Logs Burned : ' + IntToStr(LogsAdded));
Writeln('|= Rewards Gotten : ' + IntToStr(Rewards));
Writeln('|= Levels Gained : ' + IntToStr(Level));
Writeln('###############################################');
end;
procedure AddLogs;
var
x, y: integer;
begin
case LEFTCLICK of
'False':
begin
if InvEmpty then
GetLogs;
if (not((FindObject(x, y)) or (FindFire(x, y)) or (FindObjCustom(x, y, ['alk', 'ere'], [3514875, 2860024, 2782179] , 5)))) then
begin
Writeln('Fire not found');
StartFire;
end;
AddingLogs;
if (AddingLogs = False) then
begin
GetReward;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
StartFire;
if ((FindObject(x, y)) or (FindFire(x, y)) or (FindObjCustom(x, y, ['alk', 'ere'], [3514875, 2860024, 2782179] , 5))) then
begin
Writeln('Found Fire');
ClickMouse2(mouse_right);
WaitOption('dd', 500);
GetReward;
end;
repeat
AddLogs;
GetReward;
until(InvEmpty)
end;
end;
'True':
begin
case LOG of
'Maple':
begin
if InvEmpty then
GetLogs;
if FindBlackChatMessage('There are no bonfires within range') then
begin
StartFire;
end;
AddingLogs;
if (AddingLogs = False) then
begin
GetReward;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
StartFire;
if FindDTM(Maple, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
ClickMouse2(True);
GetReward;
Wait(RandomRange(2000, 2500));
Mouse(376, 419, 1, 1, True);
Wait(500 + Random(1500));
end;
repeat
AddLogs;
GetReward;
until(InvEmpty)
end;
end;
'Willow':
begin
if InvEmpty then
GetLogs;
AddingLogs;
if (AddingLogs = False) then
begin
GetReward;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
StartFire;
if FindDTM(Willow, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
ClickMouse2(True);
GetReward;
Wait(RandomRange(2000, 2500));
Mouse(376, 419, 1, 1, True);
Wait(500 + Random(1500));
end;
repeat
AddLogs;
GetReward;
until(InvEmpty)
end;
end;
'Oak':
begin
if InvEmpty then
GetLogs;
AddingLogs;
if (AddingLogs = False) then
begin
GetReward;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
StartFire;
if FindDTM(Oak, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
ClickMouse2(True);
GetReward;
Wait(RandomRange(2000, 2500));
Mouse(376, 419, 1, 1, True);
Wait(500 + Random(500));
end;
repeat
AddLogs;
GetReward;
until(InvEmpty)
end;
end;
'NormalLog':
begin
if InvEmpty then
GetLogs;
AddingLogs;
if (AddingLogs = False) then
begin
GetReward;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
StartFire;
if FindDTM(NormalLog, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
ClickMouse2(True);
GetReward;
Wait(RandomRange(2000, 2500));
Mouse(376, 419, 1, 1, True);
Wait(500 + Random(500));
end;
repeat
AddLogs;
GetReward;
until(InvEmpty)
end;
end;
'Yew':
begin
if InvEmpty then
GetLogs;
AddingLogs;
if (AddingLogs = False) then
begin
GetReward;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
StartFire;
if FindDTM(Yew, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
ClickMouse2(True);
GetReward;
Wait(RandomRange(2000, 2500));
Mouse(376, 419, 1, 1, True);
Wait(500 + Random(500));
end;
repeat
AddLogs;
GetReward;
until(InvEmpty)
end;
end;
end;
end;
end;
end;
begin
ClearDebug;
ActivateClient;
SetupSRL;
DTMS;
FindObject(x, y);
FindSpirit2(x, y);
FireColor;
SPS_Setup(RUNESCAPE_SURFACE, ['9_8', '9_7', '10_9', '11_7', '10_7', '11_6', '4_10', '12_10']);
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
SelectWorld(100);
Wait(4000+random(400));
SetAngle(SRL_ANGLE_HIGH);
Repeat
GetStartExp;
GetLogs;
GoToBurningSpot;
StartFire;
AddingLogs;
if (not(FindObject(x, y)) or (FindFire(x, y)) or (FindObjCustom(x, y, ['alk', 'ere'], [3514875, 2860024, 2782179] , 5))) then
begin
StartFire;
end;
AddLogs;
AddingLogs;
GetEndExp;
AddedLogs;
GetReward;
RewardsGotten;
Report;
AntiBan;
Until(False)
FrDTMS;
end.