Simba Code:
program SlayerAFKer;
{$I SRL/SRL.Simba}
{$I RLInclude.Simba}
{$i ObjectDTM\ObjDTMInclude.simba}
// If only using Rocktails for health set both to false
Const //Set both to false if not using Prayer at all
UsingPrayer = False; // Set to false if not using prayer
UsingSoulSplit = False; // Set to false if not using Soul Split
MaxHP = 990; //Your Total HP
StartEating = 24; // This will start eating food at 24% of your total HP
StopEating = 90; // This will sttop eating food at 90% of your total HP
MaxPrayer = 990; //Your Total HP
StartDrinking = 24; // This will start eating food at 24% of your total HP
StopDrinking = 90; // This will sttop eating food at 90% of your total HP
Var
PrayerPot, RockTail, AteRocktail, DrankPrayerPot, HPLevel, StartEatHP, StopEatHP, PrayerPoints, StartDrinkPP,
StopDrinkPP, SafeSpot, BankDepositAll, BankCloseButton, HoundSpawnSpot:Integer;
ColourString:String;
// Drinks Prayer Pots when low PP \\
procedure DrinkPrayerPot;
var
X, Y:Integer;
ColourString:String;
begin
if UsingPrayer = True then
begin
PrayerPoints := GetMMLevels('prayer', ColourString);
StartDrinkPP := Round(MaxPrayer / 100 * StartDrinking);
StopDrinkPP := Round(MaxPrayer / 100 * StopDrinking);
if (PrayerPoints <= StartDrinkPP) then // if the value we get is lower than 20% start eating.
begin
Repeat
if FindDTM(PrayerPot, X, Y, MIX1, MIY1,MIX2, MIY2) then
begin
MMouse(x, y, 0, 0);
ClickMouse2(True);
wait(1500);
WriteLn('Drinking Prayer Pot..');
inc(DrankPrayerPot);
PrayerPoints := GetMMLevels('prayer', ColourString); //Call this again, to get new value
end else Exit; //Exits the procedure if we CANNOT find food , failsafe.
Until(PrayerPoints >= StopDrinkPP) // until we get the value of 80%
end;
end;
end;
// Eat Rockatils when low HP \\
procedure EatRocktail;
var
X, Y:Integer;
ColourString:String;
begin
if UsingSoulSplit = False then
begin
HPLevel := GetMMLevels('HP', ColourString);
StartEatHP := Round(MaxHP / 100 * StartEating);
StopEatHP := Round(MaxHP / 100 * StopEating);
if (HPLevel <= StartEatHP) then // if the value we get is lower than 20% start eating.
begin
Repeat
if FindDTM(RockTail, X, Y, MIX1, MIY1,MIX2, MIY2) then
begin
MMouse(x, y, 0, 0);
ClickMouse2(True);
wait(1500);
WriteLn('Eating Rocktail...');
inc(AteRocktail);
Wait(250);
ClearDebug;
HPLevel := GetMMLevels('hp', ColourString); //Call this again, to get new value
end else Exit; //Exits the procedure if we CANNOT find food , failsafe.
Until(HPLevel >= StopEatHP) // until we get the value of 80%
end;
end;
end;
// Withdraws Rocktails when it can't find any \\
procedure WithdrawRocktails;
Var
X, Y:Integer;
begin
if UsingPrayer = False then
if not FindDTM(RockTail, X, Y, MIX1, MIY1,MIX2, MIY2) then
begin
ClickDTMRotatedIn(SafeSpot, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
if FlagPresent = True then
begin
Repeat
WriteLn('Waiting..');
Wait(500);
Until FlagPresent = False
end;
TypeSend('::bank');
Wait(500);
if FindDTM(BankDepositAll, X, Y, MSX1, MSY1,MSX2, MSY2) then
begin
MMouse(X, Y, 0, 0);
Wait(200);
ClickMouse2(True)
end;
if FindDTM(RockTail, X, Y, MSX1, MSY1,MSX2, MSY2) then
begin
MMouse(X, Y, 0, 0);
Wait(200);
ClickMouse2(False)
ChooseOption('Withdraw-All');
end;
if FindDTM(BankCloseButton, X, Y, MSX1, MSY1,MSX2, MSY2) then
begin
MMouse(X, Y, 0, 0);
Wait(200);
ClickMouse2(True)
end;
KeyDown(112);
wait(200);
KeyUp(112);
wait(2000);
if FindDTM(RockTail, X, Y, MIX1, MIY1,MIX2, MIY2) then
ClickDTMRotatedIn(HoundSpawnSpot, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_left);
end;
end;
// Progress Report \\
procedure ProgressReport;
begin
wait(500);
ClearDebug;
WriteLn('***************PROGRESS REPORT*************************************');
WriteLn('* Script has run for : '+ TimeRunning +'');
WriteLn('* Current HP '+ IntToStr(GetMMLevels('hp', ColourString)) +'');
if UsingPrayer = True then
begin
WriteLn('* Current Prayer Points '+ IntToStr(GetMMLevels('prayer', ColourString)) +'');
WriteLn('* Will start drinking pots at '+ IntToStr(StartDrinkPP) +' Prayer Points');
end;
if UsingSoulSplit = False then
begin
WriteLn('* Ate Rocktails '+ IntToStr(AteRocktail) +' times');
WriteLn('* Will start eating at '+ IntToStr(StartEatHP) +' HP');
end;
if UsingPrayer = True then
begin
WriteLn('* Drank Prayer Pots '+ IntToStr(DrankPrayerPot) +' times');
end;
WriteLn('*******************************************************************');
end;
// Main Loop \\
begin
SetupSRL;
ObjDTM_Setup;
ClearDebug;
PrayerPot := DTMFromString('mlwAAAHicY2dgYHjGzMDwEIjfMEPYz4H4IxDfBWINRgYGeSAWBWJ+INZlhIiBsNWhfqBuJqyYlQE3YMSDoQAAVjMI/Q==');
RockTail := DTMFromString('mlwAAAHicY2dgYOABYlEozcUAAfxALA7lc0PlJYBYACrPDMSaAqxAkgkrhpmDDTDiwVAAAHZxARU=');
SafeSpot := DTMFromString('mbQAAAHicY2VgYJjCBMG9QDwHiDuAuBwong/EtUBcAsRZQMy02ZaBnY0ZBWMDjFgwGAAAEvAGYQ==');
BankDepositAll := DTMFromString('mggAAAHicY2NgYKhkZGCoB+IkIE4G4gYgbgJiYyDWgGIHKDYB4r0L0oG6GLFg7ACbSoRqAD+mBdg=');
BankCloseButton := DTMFromString('mbQAAAHicY2VgYHjFyMDwAYofA/FDIFYEimsCsQwQawGxNIgtIcrAxcUFx4ZaSgzYACMWDAYAMDwGaQ==');
HoundSpawnSpot := DTMFromString('mbQAAAHicY2VgYEhmYmCoAeIQII5jgvCbgeINQNwExBFAvAKIY2JCGXg0NRi41VQYPrAxM3x6+4KBGSiOjhmxYDAAAKyiChw=');
Repeat
EatRocktail;
ProgressReport;
DrinkPrayerPot;
WithdrawRocktails;
Until IsKeyDown(123)
FreeDTM(RockTail);
FreeDTM(PrayerPot);
FreeDTM(SafeSpot);
FreeDTM(BankDepositAll);
FreeDTM(BankCloseButton);
FreeDTM(HoundSpawnSpot);
end.