Simba Code:
program iBandits;
{$DEFINE SMART}
{$i srl-6/srl.simba}
///////////////////////////////////Start setting up the script here. Refer to the comments if you don't know what you're doing.
///////////////////////////////////
///// Start Setup ///////
///////////////////////////////////
///////////////////////////////////Start setting up the script here. Refer to the comments if you don't know what you're doing.
const
(* player info *)
playerNames = ['psy']; //Put your player name (or nickname, if you set one) here.
playerFile = 'default'; //Put your playerfile's name here. Default is 'default'.
desiredWorld = 0;
(* globals *)
antipatternInterval = 250000;
(* options *)
///////////////////////////////////Don't modify the script ANY FURTHER unless you know what you're doing. You could break stuff!
///////////////////////////////////
///// Stop Setup ///////
///////////////////////////////////
///////////////////////////////////Don't modify the script ANY FURTHER unless you know what you're doing. You could break stuff!
var
lastPerformedAntipattern:TTimeMarker;
antipatternsPerformed:integer;
procedure getInfo;
begin;
writeLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
writeLn('Welcome to iBandits by KeepBotting!');
writeLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
writeLn('This script is 100% credits to KeepBotting, unless otherwise noted.');
writeLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;
procedure initScript; //adapted from bonsai's init procedure
var i:integer;
begin
addOnTerminate('scriptTerminate');
clearDebug();
smartEnableDrawing := true;
setupSrl();
smartForceNewClient := true; //thanks olly
players.setup(playerNames, playerFile);
currentPlayer := 0;
for i := 0 to high(players) do
begin
players[i].world := desiredWorld;
players[i].isActive := true;
end;
while (players.getActive() > 0) do
begin
if (not isLoggedIn()) then
begin
if (not players[currentPlayer].login()) then break;
exitTreasure();
end;
end;
end;
procedure antipattern;
begin
lastPerformedAntipattern.Start;
case random(30) of
0:
begin
hoverRandomSkill;
end;
1:
begin
hoverSkill(SKILL_DEFENCE);
end;
2:
begin
hoverSkill(SKILL_ATTACK);
end;
3:
begin
hoverSkill(SKILL_HITPOINTS);
end;
4:
begin
hoverSkill(SKILL_STRENGTH);
end;
5:
begin
randomGameTab;
end;
6:
begin
randomRClickItem;
end;
end;
inc(antipatternsPerformed);
end;
procedure waitAntipattern(timeToWait:integer);
begin
if random(10) < 3 then
begin
sleepAndMoveMouse(timeToWait + random(500));
end else begin
wait(timeToWait + random(500) + round(timeToWait * (random(10) / 100.0)));
end;
if random(antipatternInterval) < lastPerformedAntipattern.GetTime then
begin
antipattern;
end;
end;
procedure useAbility;
begin
if (actionBar.getAdrenalinePercent() > 49) then
begin
case random(2) of
0:
begin
actionBar.clickSlot(1);
end;
1:
begin
actionBar.clickSlot(2);
end;
end;
end;
end;
begin
getInfo;
initScript;
repeat
useAbility;
antipattern;
waitantipattern(5000);
until(false);
end.
Not entirely sure it works; it may need some tweaking. Do with it what you will.