Simba Code:
{$DEFINE SMART}
{$i AeroLib/AeroLib.Simba}
var
ab_count, test, noOver, rock_cake,exp_check_rng, xp_p_h, str_begin, str_now, str_gained, over, absorb, pray: Integer;
exp_timer, total_timer, fail_safe, prayer_timer: Timer;
input, skill_to_train, skill_tracker, timeRan: string;
procedure setup;
begin
input := 'defence'; // strength, attack, defence
end;
/////////////////////////////////////////////////////////////
// INSTRUCTIONS //
// Start inside NMZ with overload and absorption in inv //
// choose you attack style ingame and add input above //
// Have rockcake in you inventory, too //
// XP trackin needs some time to get accurate ~ 20min //
/////////////////////////////////////////////////////////////
procedure debug(s : string);
begin
clearDebug;
xp_p_h := Round((str_gained*3600) DIV (GetTimeRunning DIV 1000));
writeLn('Time running: ' + timeRan);
//if xp_p_h > 0 then
//begin
writeLn('Exp per hour: ' + intToStr(xp_p_h));
// end else
// writeLn('wait a bit for xp per hour.. please note it is only accurate after at least ~20mins');
// if str_gained > 0 then
// begin
writeLn(input + ' exp gained: ' + intToStr(str_gained));
// end else
// writeLn('wait a bit for first xp check..');
writeLn('Status: ' + s);
test := (exp_check_rng - exp_timer.timeElapsed) DIV 1000;
writeLn('Time till exp check: '+ intToStr(test));
end;
procedure checkExp;
begin
if exp_timer.timeElapsed > exp_check_rng then
begin
debug('Checking exp');
str_gained := GetSkillXp(input) - str_begin;
// exp_timer.start;
exp_timer.start;
exp_check_rng := randomRange(600000, 900000);
end;
end;
procedure drinkAbsorb;
var
i, xi, yi: Integer;
begin
while ab_count < 10 do
begin
gameTab(TAB_INV);
if (fail_safe.timeElapsed > 20000) or (fail_safe.timeElapsed = 0) then
begin
if FindDTM(absorb, xi, yi, 561, 210, 728, 462) then
begin
debug('Drinking Absorb');
HumanMMouse(Point(xi, yi), 5, 5);
fastClick(MOUSE_LEFT);
ab_count := ab_count + 1;
end else
begin
debug('No more absorbs, shutting down script');
logoutPlayer;
terminateScript;
end;
fail_safe.Reset;
fail_safe.Pause;
end;
end;
end;
procedure needDrinkAbsorb;
var
x, y: Integer;
begin
gameTab(TAB_INV);
if not findColor(x, y, 16777215, 18, 40, 65, 65) then
begin
ab_count := 0;
drinkAbsorb;
end;
end;
procedure firstAbsorb;
var
xi, yi: integer;
begin
if FindDTM(absorb, xi, yi, 561, 210, 728, 462) then
begin
HumanMMouse(Point(xi, yi), 5, 5);
fastClick(MOUSE_LEFT);
sleep(100);
end else
begin
debug('Seems you forgot the absorbs bud, sorry have to shut down..');
logoutPlayer;
terminateScript;
end;
end;
procedure prayerFlick;
var
x, y: integer;
pray_p: TPoint;
begin
if prayer_timer.timeElapsed > 55000 then
begin
debug('Prayer flicking');
HumanMMouse(Point(554, 101), 5, 5);
FastClick(MOUSE_LEFT);
sleep(250);
FastClick(MOUSE_LEFT);
prayer_timer.start;
end;
end;
procedure needRockCake;
var
cake_p: TPoint;
x, y: integer;
begin
gameTab(TAB_INV);
if (fail_safe.timeElapsed > 25000) or (fail_safe.timeElapsed = 0) then
begin
if (getCurrentHealth < 50) or (noOver = 1) then
begin
if getCurrentHealth > 1 then
begin
begin
while getCurrentHealth > 1 do
begin
if findDTM(rock_cake, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
debug('Eating rock cake');
HumanMMouse(Point(x, y), 5, 5);
fastClick(MOUSE_RIGHT);
ChooseOption('Guzzle');
sleep(500);
fail_safe.start;
fail_safe.Pause;
needDrinkAbsorb;
end;
end;
end;
end;
end;
end;
end;
procedure stillinNmz;
var
x, y: Integer;
begin
if findColorTolerance(x, y, 2329461, 566, 15, 709, 130, 27) then
begin
debug('Died? if not, something went wrong and you left NMZ... (probably your set broke)');
logoutPlayer;
terminateScript;
end;
end;
procedure drinkOverload;
var
xi, yi: Integer;
begin
gameTab(TAB_INV);
if getCurrentHealth > 50 then
begin
debug('Taking overload');
if FindDTM(over, xi, yi, 561, 210, 728, 462) then
begin
fail_safe.Start;
HumanMMouse(Point(xi, yi), 5, 5);
fastClick(MOUSE_LEFT);
sleep(10000);
end else
begin
debug('no overload');
noOver := 1;
end;
end else
needDrinkAbsorb;
needRockCake;
end;
procedure isPrayOn;
var
count: integer;
begin
count := CountColorTolerance(11645867, 538, 84, 568, 115, 126);
if (count > 250) then
begin
HumanMMouse(Point(554, 101), 5, 5);
fastClick(MOUSE_LEFT);
sleep(500+randomRange(500,1000));
end;
end;
procedure declare_stuff;
begin
debug('declaring stuff...');
setup;
prayer_timer.start;
total_timer.start;
gameTab(TAB_STATS);
str_begin := getSkillXp(input);
gameTab(TAB_INV);
exp_timer.start;
exp_check_rng := 10000;
noOver:= 0;
absorb := DTMFromString('mggAAAHicY2NgYPBiY2BwBuJAIA4AYg8gDgbiKCagGBD7AbELEDsCcQQQb913GKiLEQMbMWAHmCohGAIARp4GSQ==');
over := DTMFromString('mggAAAHicY2NgYEhmYWCIBeJ4II4G4lwgzgBiD2YGBnsgNmOGsN2B2BqIhfj4gLoYsWDsAJtKhGoAvFEEQA==');
pray := DTMFromString('mlwAAAHicY2dgYOAGYn4gFgJiHiBmAWImBggQA2JxqBwDVJwXiEWB2PDQJCDJiBXzM+AG2HVAMBQAAN8AAko=');
rock_cake := DTMFromString('mrAAAAHic42BgYNjPxMCwGYj3AvERID4NxKeYIOJbQeKMQDYQbwHizUC8D4iPAPEpKJ2X4gU0hREnNmLAD3DrhGAYAAAFRw1t');
firstAbsorb;
end;
begin
InitAL;
LoginPlayer(False);
declare_stuff;
while isLoggedIn do
begin
stillinNmz;
needDrinkAbsorb;
drinkOverload;
prayerFlick;
isPrayOn;
sleep(1000);
timeRan := MSToTime(total_timer.timeElapsed, 1);
writeLn(timeRan);
checkExp;
debug('idling');
end else
begin
writeLn('logging off');
terminateScript;
end;
end.