SRL Archive - First Scripts

2 First scripts! Quick and dirty


o0Matthius0o

2014-09-06 00:01:18

Whats up guys! I have been working on this fighter for a while now. I have'nt polished it up quite yet. I mean to add a proggy and some other bells and whistles. Also going through a learning process to add the charm pick ups. I just could'nt wait to get something out there.

Please ignore most of the commented out code. A few things are commented out since tesseract is broken atm. Once that is fixed i will uncomment that and you can redownload.

SCRIPT DETAILS=====================================================
The starting point is really any closed off room with fire giants in it. Best spot is the resource dungeon behind the waterfall in baxtorian falls. Another good location but much more dangerous to get to is the chaos tunnels.

Have your actionbar set up with all the ultimate or high threshold skills to the right starting at 9. All other skills that do not require adrenaline put them to the left. Have your food set to the 'z' slot. Put regenerate in slot '0'.

I have been running this script for 3 days non stop and there hasnt been any failing aside from the logout function. So when its break time it will just open the options menu and sit there til it logs out on its own. It will resume after breaking is finished.

program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/LIB/SPS-RS3.simba}


const
//-------Login Settings-------//
PLAYER_FILE = 'Godlist';
NICKNAME = 'Main';
LOGIN_WORLD = 0;
//----------------------------//
//-------Break settings-------//
ENABLE_BREAKS = True;

MIN_PLAY_TIME = 45; //45
MAX_PLAY_TIME = 180; //180

MIN_BREAK_TIME = 5;
MAX_BREAK_TIME = 45;
//----------------------------//

var
//-------Global Variables-------//
TotalBreakTime, StatsTime, misClicked, monstDead : TTimeMarker; //Timers Here

BreakTimeTotal, BreakTime, Breaked, XpGained : integer; //Stats Here

//-------------------------------------------------------------------------------------------------------------------------------//
procedure resetBreakTimer();
begin
BreakTime := getSystemTime() + gaussRangeInt(MIN_PLAY_TIME * 60000, MAX_PLAY_TIME * 60000);
end;

//-------------------------------------------------------------------------------------------------------------------------------//



//-------------------------------------------------------------------------------------------------------------------------------//
procedure setup();

begin
smartEnableDrawing := true;
setupSRL();

players.Setup([NICKNAME], PLAYER_FILE);
currentPlayer := 0;
players[currentPlayer].world := LOGIN_WORLD;

exitTreasure();

resetBreakTimer();
TotalBreakTime.start();
TotalBreakTime.pause();
end;
//-------------------------------------------------------------------------------------------------------------------------------//

//-------------------------------------------------------------------------------------------------------------------------------//
function heal(): boolean;
var
heartBar, x, y : integer;
begin
heartBar := DTMFromString('mlwAAAHicY2dgYJjACMHTgbgTyu4G4qlAfA2ILwDxJSh9B4hvAPF1IJ6hJMvw6/YFhqOexgyvl9Qx1OsaMbSJCDOUWogz4AOMeDAUAABpNxL5');
if findDTM(heartBar, x, y, actionBar.getBounds()) = True then
begin
writeLn('In the HEAL procedure: Found the Heart');
sendKeys('0', 250, 40);
wait(randomRange(6000, 6500));
result := True;
exit;
end;

end;

//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
procedure healthEat();
var
heartBar, x, y : integer;
fhb : boolean;
begin
heartBar := DTMFromString('mlwAAAHicY2dgYJjACMHTgbgTyu4G4qlAfA2ILwDxJSh9B4hvAPF1IJ6hJMvw6/YFhqOexgyvl9Qx1OsaMbSJCDOUWogz4AOMeDAUAABpNxL5');
fhb := False;
if actionBar.getHPPercent() < 75 then
begin
if actionBar.getAdrenalinePercent() > 20 then
begin
writeLn('Using Heal');
repeat
heal();
until heal() = True;
writeLn('Healing is done. Hp: ', actionBar.getHPPercent());

exit;
End else
begin
exit;
end;
end;
if actionBar.getHPPercent() <= 50 then
begin
repeat
sendKeys('z', 250, 40);
until actionBar.getHPPercent() > 50;
end;

end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function antiBan(): boolean;
var
antiBanNum : integer;
begin
antiBanNum := random(1500);
if antiBanNum <= 100 then
begin
writeLn('Antiban Time!');

case antiBanNum of
1..10: boredHuman(false);
11..25: hoverRandomSkill();
26..31: hoverOnlineFriend();
32..52: mouseMovingObject();
53..69: mouseOffClient(4);
70..80: randomCameraAngle(MS_ANGLE_HIGH);
81..90: randomCompass(10, 40, True);
91..100: wait(randomRange(3000, 5000));

end;
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function timeUntilBreak() : string;
var
breakFromNow, H, M, S : integer;
begin
if ENABLE_BREAKS then
begin
breakFromNow := BreakTime - getSystemTime();
convertTime(breakFromNow, H, M, S);
result := (toStr(H) + 'h ' + toStr(M) + 'm ' + toStr(S) + 's');
end else
result := ('Breaking disabled');
end;
//-------------------------------------------------------------------------------------------------------------------------------//



//-------------------------------------------------------------------------------------------------------------------------------//
procedure takeBreak();
var
H, M, S, HH, MM, SS, breakFor, timeLeft : integer;
breakStartTimer : TTimeMarker;

begin
if not ENABLE_BREAKS then
exit;

if (getSystemTime() >= BreakTime) then
begin
TotalBreakTime.start();
writeLn('Taking a break');

if random(2) = 0 then
begin
//repeat
players[currentPlayer].logout();
//until not isLoggedIn();
end
else
begin
//repeat
players[currentPlayer].exitToLobby();
//until lobby.isOpen();
end;


breakFor := gaussRangeInt(MIN_BREAK_TIME * 60000, MAX_BREAK_TIME * 60000);
convertTime(breakFor, H, M, S);
writeLn('You are taking a break for: ' + toStr(H) + 'h ' + toStr(M) + 'm ' + toStr(S) + 's');

breakStartTimer.start();

repeat
timeLeft := breakFor - breakStartTimer.getTime();
convertTime(timeLeft, HH, MM, SS);
writeLn('Ending break in: ' + toStr(HH) + 'h ' + toStr(MM) + 'm ' + toStr(SS) + 's');
wait(25000 + random(4000));
until breakFor < breakStartTimer.getTime();

inc(Breaked);
resetBreakTimer();
TotalBreakTime.pause();
players[currentPlayer].login();
wait(gaussRangeInt(1500, 3500));
exitTreasure();
minimap.clickCompass();
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
procedure doAbilities();
var
i : integer;
keyStr : string;

begin
for i := 9 downto 1 do
begin
if (actionBar.getAbilityCooldown(i) = 1) then
begin
case i of
0..9: keyStr := intToStr(i);
10: keyStr := '0';
11: keyStr := '-';
12: keyStr := '=';
end;

SendKeys(keyStr[1], 60 + Random(60), 60 + Random(60));

exit;
end;
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function clickEnemy(): boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
hpDTM, hBarDTM, fightDTM: integer;
isMobDead : boolean;
begin
if isLoggedIn() then
begin
fightDTM := DTMFromString('mbQAAAHicY2VgYLgCxLqMDAxGQKwGxNpAfBgodgiITwPxJSA+A8SXJ0ky3Ll+ieHh3RsM0WYKDBUFsQzYACMWDAYAtIEOEA==');
hBarDTM := DTMFromString('mKgEAAHic42NgYFBhZGDwB+IgIP4J5P8GYkkgW5sRQmsBsQUQOwIxGxC/Bcp7AelzDBB8EYgvAPEZJHwJis8g0YeB+CgQ2wgLM2hzcsJpRTY2MI0L84lIMvCJSjFIgtxFBmYkE6MCAFnIFUE=');
hpDTM := DTMFromString('mbQAAAHicY2VgYFBhZWBQBmI1IFYFYiUg3gwUXw/EG4B4GxTbCAsz/D/NynB3AwuYDtMRZJAEiqNjRiwYDADI8wr3');
isMobDead := false;
repeat

if findDTM(fightDTM, x, y, mainscreen.getBounds()) = True then
begin
writeLn('Top of Procedure: You are in a fight'); //fix this statement. it just exits sometimes and the script gets stuck in a loop. doing nothing.
result := True;
exit;
end;
findColorsSpiralTolerance(x, y, TPA, 2571108, mainScreen.getBounds(), 14, colorSetting(2, 0.20, 0.82));
if length (TPA) < 1 then //If there are no monsters found it will terminate and rerun.
begin
exit;
end;
ATPA := TPA.toATPA(50, 50);
ATPA.sortFromMidPoint(mainscreen.playerPoint); //Chooses the closest monster to you.

smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do //Finds and draws all the monsters a debug box.
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ttack'], 500) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.optionsExist(['ttack']) then // attacks mob
begin
chooseOption.select(['ttack Fire giant']);
wait(randomRange(4000, 4500));
break;

end;
end;
end;
until findDTM(fightDTM, x, y, mainscreen.getBounds()) = True;
clearDebug();
writeLn('You are in a Fight');
smartImage.clear();
result := True;
exit;
End else
if not isLoggedIn() then
begin
writeLn('You are not logged in');
exit;
end;

end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function isMonsterDead(): boolean;
var
hpDTM, hBarDTM, x, y : integer;
isMobDead : boolean;
begin
hBarDTM := DTMFromString('mKgEAAHic42NgYFBhZGDwB+IgIP4J5P8GYkkgW5sRQmsBsQUQOwIxGxC/Bcp7AelzDBB8EYgvAPEZJHwJis8g0YeB+CgQ2wgLM2hzcsJpRTY2MI0L84lIMvCJSjFIgtxFBmYkE6MCAFnIFUE=');
hpDTM := DTMFromString('mbQAAAHicY2VgYFBhZWBQBmI1IFYFYiUg3gwUXw/EG4B4GxTbCAsz/D/NynB3AwuYDtMRZJAEiqNjRiwYDADI8wr3');
isMobDead := false;
if findDTM(hpDTM, x, y, mainScreen.getBounds()) then //Will keep fighting the monster til their health reaches 0
begin
writeLn('DTM found, Moster hp 0');
clearDebug();
if findDTM(hBarDTM, x, y, mainScreen.getBounds()) then
begin
writeLn('DTM 2 found, Monster Healthbar empty');
//wait(randomRange(3000, 3500));
isMobDead := True;
result := True;
end;
end;
end;

//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function pickUpCharms(): boolean;
var
x, y, i : integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
if IsLoggedIn() then
begin
wait(randomRange(3500, 4000));
writeLn('Searching for Charms');
findColorsSpiralTolerance(x, y, TPA, 13948655, mainScreen.getBounds(), 8, colorSetting(2, 0.16, 4.15));
if length (TPA) < 1 then //If there are no bones found it will terminate and rerun.
begin
exit;
end;
ATPA := TPA.toATPA(40, 40);
ATPA.sortFromMidPoint(mainscreen.playerPoint); //Chooses the closest drop to you.

smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
wait(1000);
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ake'], 500) then
begin
mouse(middleTPA(ATPA[i]), MOUSE_RIGHT); // picks up the bones at the closest point to you.
if chooseOption.optionsExist(['ake Gold charm']) then
begin
chooseOption.select(['ake Gold charm']);
tabBackPack.waitForShift(10000);
smartImage.clear();
result := True;
exit;
end
else if chooseOption.optionsExist(['ake Green charm']) then
begin
chooseOption.select(['ake Green charm']);
tabBackPack.waitForShift(10000);
smartImage.clear();
result := True;
exit;
end
else if chooseOption.optionsExist(['ake Crimson charm']) then
begin
chooseOption.select(['ake Crimson charm']);
tabBackPack.waitForShift(10000);
smartImage.clear();
result := True;
exit;
end
else
begin
smartImage.clear();
result := False;
exit;
end;

smartImage.clear();
break;
end;
end;
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
(*procedure buryBones();
var
slotNum, i : integer;
begin
if isLoggedIn() then
begin

slotNum := 28;
for i := 1 to slotNum do //for every time "i" is not equal to slotNum
begin //keep clicking the bones in the next box over.
tabBackPack.mouseSlot(i, MOUSE_LEFT);
wait(randomRange(1500, 2300)); //wait until the bones are out of the inventory
i + 1;
end;
end;
end;*)
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
procedure checkAngle();
var
angle : extended;

begin
angle := minimap.getAngleRadians();

if angle <> MM_DIRECTION_NORTH and MS_ANGLE_HIGH then // checks to see if the camera is in the correct position. If its not it will put it there.
begin
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;

end;
//-------------------------------------------------------------------------------------------------------------------------------//



//-------------------------------------------------------------------------------------------------------------------------------//
(*procedure monsterHealthDTM();
var
hpDTM: integer;
isMobDead : boolean;
begin
hpDTM := DTMFromString('mbQAAAHicY2VgYFBhZWBQBmI1IFYFYiUg3gwUXw/EG4B4GxTbCAsz/D/NynB3AwuYDtMRZJAEiqNjRiwYDADI8wr3');
end; *)
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//

//-------------------------------------------------------------------------------------------------------------------------------//



begin
setup();
repeat
if not isLoggedIn() then
begin
players[currentPlayer].login();
end;
until isLoggedIn();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
repeat
repeat

until clickEnemy() = True;
repeat
misClicked.reset();
misClicked.start();
doAbilities();
until isMonsterDead() = True or misClicked.getTime() > 90000;
healthEat();
antiBan();
takeBreak();
wait(randomRange(3000, 3500));
until(false);
end.


SECOND SCRIPT==================================================
Ok. I made this script quick and dirty. I wouldnt recommend running it for too long. Although i have been running it for 2 hours no problem. This one is a log cutter and banker. It will chop regular trees in varrock and bank them in varrock west bank outside the ge. If you notice i used a mousebox for banking the logs. This is because the built in functions for banking are not working right now. I will update them after the next SRL update.

DETAILS::

Put your hatchet in the first slot or equip it to the toolbelt. Start in varrock west bank outside the ge. Press play and you are good to go!

I will add breaking to this later on. But for now enjoy!

program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/LIB/SPS-RS3.simba}

const
//-------Login Settings-------//
PLAYER_FILE = 'Godlist';
NICKNAME = 'Miner2';
LOGIN_WORLD = 0;
//----------------------------//
//-------Break settings-------//
ENABLE_BREAKS = True;

MIN_PLAY_TIME = 45; //45
MAX_PLAY_TIME = 180; //180

MIN_BREAK_TIME = 5;
MAX_BREAK_TIME = 45;
//----------------------------//

var
//-------Global Variables-------//
TotalBreakTime : TTimeMarker; //Timers Here

BreakTimeTotal, BreakTime, Breaked, XpGained : integer; //Stats Here

//-------------------------------------------------------------------------------------------------------------------------------//
procedure resetBreakTimer();
begin
BreakTime := getSystemTime() + gaussRangeInt(MIN_PLAY_TIME * 60000, MAX_PLAY_TIME * 60000);
end;

//-------------------------------------------------------------------------------------------------------------------------------//
procedure takeBreak();
var
H, M, S, HH, MM, SS, breakFor, timeLeft : integer;
breakStartTimer : TTimeMarker;

begin
if not ENABLE_BREAKS then
exit;

if (getSystemTime() >= BreakTime) then
begin
TotalBreakTime.start();
writeLn('Taking a break');

if random(2) = 0 then
begin
//repeat
players[currentPlayer].logout();
//until not isLoggedIn();
end
else
begin
//repeat
players[currentPlayer].exitToLobby();
//until lobby.isOpen();
end;


breakFor := gaussRangeInt(MIN_BREAK_TIME * 60000, MAX_BREAK_TIME * 60000);
convertTime(breakFor, H, M, S);
writeLn('You are taking a break for: ' + toStr(H) + 'h ' + toStr(M) + 'm ' + toStr(S) + 's');

breakStartTimer.start();

repeat
timeLeft := breakFor - breakStartTimer.getTime();
convertTime(timeLeft, HH, MM, SS);
writeLn('Ending break in: ' + toStr(HH) + 'h ' + toStr(MM) + 'm ' + toStr(SS) + 's');
wait(25000 + random(4000));
until breakFor < breakStartTimer.getTime();

inc(Breaked);
resetBreakTimer();
TotalBreakTime.pause();
players[currentPlayer].login();
wait(gaussRangeInt(1500, 3500));
exitTreasure();
minimap.clickCompass();
end;
end;

function antiBan(): boolean;
var
antiBanNum : integer;
begin
antiBanNum := random(1500);
if antiBanNum <= 100 then
begin
writeLn('Antiban Time!');

case antiBanNum of
1..10: boredHuman(false);
11..25: hoverRandomSkill();
26..31: hoverOnlineFriend();
32..52: mouseMovingObject();
53..69: mouseOffClient(4);
70..80: randomCameraAngle(MS_ANGLE_HIGH);
81..90: randomCompass(10, 40, True);
91..100: wait(randomRange(3000, 5000));

end;
end;
end;

procedure findTree();
var
x, y, i: integer;
TPA, TPA2: TPointArray;
ATPA, ATPA2: T2DPointArray;
begin
//findColorsSpiralTolerance(x, y, TPA2, 5865656, mainScreen.getBounds(), 9, colorSetting(2, 0.05, 0.74));
//findColorsSpiralTolerance(x, y, TPA, 2770269, mainScreen.getBounds(), 8, colorSetting(2, 0.13, 0.46));
findColorsSpiralTolerance(x, y, TPA, 1845801, mainScreen.getBounds(), 1, colorSetting(2, 1.20, 2.67));
if length(TPA) < 1 then
exit;

ATPA := TPA.toATPA(60, 60);
ATPA.sortFromMidPoint(mainscreen.playerPoint);

smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do

begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ree'], 500) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.optionsExist(['hop down Tree']) then
begin
chooseOption.select(['hop down Tree']);
tabBackPack.waitForShift(10000);
smartImage.Clear();
exit;
end;
end
else if chooseOption.optionsExist(['']) then
begin
break();
end;
end;
end;


procedure setup();

begin
smartEnableDrawing := true;
setupSRL();

players.Setup([NICKNAME], PLAYER_FILE);
currentPlayer := 0;
players[currentPlayer].world := LOGIN_WORLD;

exitTreasure();

resetBreakTimer();
TotalBreakTime.start();
TotalBreakTime.pause();
end;

procedure walkToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit;

pathToBank :=[Point(207, 232), Point(214, 207), Point(223, 197), Point(216, 174), Point(239, 137), Point(272, 134), Point(288, 127), Point(287, 98)];
if SPS.walkPath(pathToBank) then
begin
minimap.waitPlayerMoving();
end
else
begin
writeLn('Failed walking to the bank');
end;
end;

procedure walkToTree();
var
pathToTree: TPointArray;
begin
if not isLoggedIn() then
exit;

pathToTree := [Point(287, 98), Point(288, 127), Point(272, 134), Point(239, 137), Point(216, 174), Point(223, 197), Point(214, 207), Point(207, 232)];
if SPS.walkPath(pathToTree) then
begin
minimap.waitPlayerMoving();
end
else
begin
writeLn('Failed walking to the tree');
end;
end;


function findCook() : boolean;
var
p : TPoint;

begin
if minimap.findSymbol(p, MM_SYMBOL_COOK, minimap.getBounds())then
begin
writeLn('Found the Cook');
result := True;
end
else
begin
writeLn('Cook Not Found');
result := False;
end;

end;

function findTanner() : boolean;
var
p : TPoint;

begin
if minimap.findSymbol(p, MM_SYMBOL_TANNER, minimap.getBounds())then
begin
writeLn('Found the Tanner');
result := True;
end
else
begin
writeLn('Tanner Not Found');
result := False;
end;

end;

procedure positionPlayer();
begin
if findCook() = False then
begin
walkToTree();
end;

if findTanner() = False then
begin
walkToTree();
end;
end;

procedure depositLogs();
var
x, y, i, count : integer;
TPA : TPointArray;
ATPA : T2DPointArray;
bankbox, closebox : TBox;
begin
bankbox := intToBox(603, 81, 630, 106);
closebox := intToBox(521, 16, 531, 27);
findColorsSpiralTolerance(x, y, TPA, 5385792, mainScreen.getBounds(), 14, colorSetting(2, 0.30, 0.74));
if length(TPA) < 1 then
exit;

ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ank'], 500) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.optionsExist(['ank Banker']) then
begin
chooseOption.select(['ank Banker']);
wait(randomRange(2000, 3000));
smartImage.clear();
mouseBox(bankbox, MOUSE_RIGHT);
if chooseOption.optionsExist(['eposit-1 Logs']) then
begin
chooseOption.select(['eposit-All Logs']);
wait(randomRange(500, 1000));
end;
mouseBox(closebox, MOUSE_LEFT);
wait(1000);
exit;
end;
end;
end;
end;

begin
clearDebug();
setup();
repeat
if not isLoggedIn() then
begin
players[currentPlayer].login();
end;
until isLoggedIn();
SPS.setup('WoodCut', RUNESCAPE_OTHER);
repeat
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
repeat
findTree();
positionPlayer();
antiBan();
until tabBackPack.isFull();
walkToBank();
depositLogs();
takeBreak();
until(false);
end.

I FORGOT THIS! Here is the SPS map that you will need to be able to run this script lol. Take this photo and save it in "C:\Simba\Includes\SPS\img\runescape_other"
Make sure this is saved as "WoodCut"
[ATTACH=CONFIG]23966[/ATTACH]

EDIT: I have now added breaking in the woodcutter script. I also fixed a bug to where it would sometimes walk to the top of the GE. I have also ran the script for over 6 hours. So its pretty safe. Other than other suspicious players.

The Mayor

2014-09-06 00:47:57

Paste this straight into your script and see if logout/exitToLobby works:


function TRSOptions.isOpen(): boolean; override;
begin
self.setBounds([300, 95, 499, 469]);
result := (countColorTolerance(379903, intToBox(self.x1, self.y1, self.x2, self.y1 + 30), 10) = 135);
end;

o0Matthius0o

2014-09-06 00:56:57

Wow, worked great actually. What is this black magic!?

TylerT

2014-09-06 01:48:45

From: o0Matthius0o
What is this black magic!?

He tends to do that.

o0Matthius0o

2014-09-06 01:56:50

From: TylerT
He tends to do that.

I know. i cant wait til i get on that level one day. You know. where scripting and programming is as easy as breathing. :sasmokin:

cosmasjdz

2014-09-06 03:47:50

else if chooseOption.optionsExist(['ake Green charm']) then


chooseOption.optionsExist(['charm']) is more than enough, i personally use this its universal, so no need ifs for all 4 charm types. Also shorter sentence means it less likely will read ir wrong. so instead of 99.9 percent it will work like 99.95 percent:D

also what i like to do is like chooseOption.optionsExist(['een d']) to fick green dragonhide, never seen it fail or other stuff like chooseOption.optionsExist(['ed eff']) to fick effigy chooseOption.optionsExist(['on bon']) dragon bone. This way writing last few letter and first few letters u shorten stuff.

Spaceblow

2014-09-06 05:18:03

This is definitely some nice stuff if these are really your first scripts. Did you write everything yourself? Keep up the good work! :)

o0Matthius0o

2014-09-06 14:46:07

From: Spaceblow
This is definitely some nice stuff if these are really your first scripts. Did you write everything yourself? Keep up the good work! :)


Thanks! I did write everything myself. Although i did get the ideas for the breaking system and the antiban from The Mayor. I just went into the simba docs and modified a few of the antiban methods in my script. I also referenced his tutorial for alot of things. I also got the idea for the way the abilities are used from bonsai seeing as how he is the god of fighters lol.

From: cosmasjdz
chooseOption.optionsExist(['charm']) is more than enough, i personally use this its universal, so no need ifs for all 4 charm types. Also shorter sentence means it less likely will read ir wrong. so instead of 99.9 percent it will work like 99.95 percent

also what i like to do is like chooseOption.optionsExist(['een d']) to fick green dragonhide, never seen it fail or other stuff like chooseOption.optionsExist(['ed eff']) to fick effigy chooseOption.optionsExist(['on bon']) dragon bone. This way writing last few letter and first few letters u shorten stuff.


Thanks! I will definately be changing that. As soon as i actually get the drop detection down. I always have trouble with it trying to find the bones before the fight is over. Not sure how to fix that quite yet.

cosmasjdz

2014-09-07 12:13:04

search for the yellow circle tpa inside red circle tpa, and save the pozition as tpoint, then look for the drop close to it. But its toocomplicated. actually just search for the bones using findcolorspiral tolerance, then filter it, and make sure always pick bones last so one drop finding function would always work. This is mone one searching for d bones and hides with little antiban inside:

procedure loot();
var
x, y,i,z,dist,kx,ky : integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: ttimemarker;
begin
if tabbackpack.isfull() then exit;
armires();// checking if i am dead custom function
if findColorTolerance(x, y, 1675987, 35, 8, 45, 20, 10) then exit; // searches if already fighting as i use to put mobs hp bar to the left corner
//searches for d bones color:
findColorsSpiralTolerance(x, y, TPA, 15129566, mainscreen.getbounds(), 7, colorSetting(2,1.45, 2.53));
// if finds less than 12 white dots exits, its must to not mistaken with amulet of glory, or crossbows.
if length(tpa)<12 then exit;
// srts tpoints to boxes
ATPA := TPA.toATPA(20, 20);
//filters out small boxes
ATPA.filterBetween(0, 5);
//sorts atpa this isnt must probably for you
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugTPA(TPA,true);
//merges atp
MergeATPA(Atpa);
smartImage.debugATPA(ATPA);
t.start();
if (length(ATPA) < 1) then exit;
repeat
wait(50+random(12));
until not length(TPA) < 1 or t.gettime()> 2900;
t.reset();
///////////////////// antiban using misclicks
dist:=distance(middleTPA(ATPA[0]),point(290,191));
if dist>35 then
begin
case random(13875)of
0..424: begin
kx:=middleTPA(ATPA[0]).x+(random(-20,20));
ky:=middleTPA(ATPA[0]).y+(random(10,20));
if kx<1 then kx:=random(3,9);
if ky<1 then ky:=random(1,7);
mouse(kx,ky,mouse_move);
if not ismouseovertext(['Take','ed bol',''], 500) then fastclick(mouse_right);
wait(gaussrangeint(180,350));
end;
425..874:
begin
kx:=middleTPA(ATPA[0]).x+(random(-20,20));
ky:=middleTPA(ATPA[0]).y-(random(10,20));
if kx<1 then kx:=random(3,9);
if ky<1 then ky:=random(1,7);
mouse(kx,ky,mouse_move);
if not ismouseovertext(['Take','ed bol',''], 500) then fastclick(mouse_right);
wait(gaussrangeint(180,350));
end;
875..1121:
begin
kx:=middleTPA(ATPA[0]).x+(random(-20,20));
ky:=middleTPA(ATPA[0]).y-(random(10,20));
if kx<1 then kx:=random(3,9);
if ky<1 then ky:=random(1,7);
mouse(kx,ky,mouse_move);
if not ismouseovertext(['Take','ed bol',''], 500) then fastclick(mouse_left);
wait(gaussrangeint(180,350));
end;
1122..1654:
begin
kx:=middleTPA(ATPA[0]).x+(random(-20,20));
ky:=middleTPA(ATPA[0]).y+(random(10,20));
if kx<1 then kx:=random(3,9);
if ky<1 then ky:=random(1,7);
mouse(kx,ky,mouse_move);
if not ismouseovertext(['Take','ed bol',''], 500) then fastclick(mouse_left);
wait(gaussrangeint(180,350));
end;
end;
end;

////////////////////
// main looting procedure which has quickloot if there is no charms in the pile.
mouse(middleTPA(ATPA[0]),MOUSE_MOVE);
if isMouseOverText(['Take','ed bol',''], 500) then
begin

fastClick(MOUSE_right);
if chooseOption.optionsExist(['charm']) then charm:=true else charm:=false;

if (charm= false) then
begin
case random(64) of
0..53: begin
statusas('______________________quick_________',300);
ChooseOption.select(['een dr']);
mouse(middletpa(atpa),mouse_right);
wait(random(157,234));
//minimap.waitplayermoving();
tabbackpack.waitforshift(3850);
ChooseOption.select(['gon bon']);
tabbackpack.waitForShift(400);
exit;
end;
54..63: begin
//fastClick(MOUSE_right);
wait(547);
statusas(tostring(charm),220);
ChooseOption.select(['een dr']);
wait(745);
minimap.waitplayermoving();
wait(random(200,250));
exit;
end;
end;
end
else
fastClick(MOUSE_right);
wait(547);
statusas(tostring(charm),220);
ChooseOption.select(['een dra']);
wait(745);
minimap.waitplayermoving();
wait(random(200,250));
//cals my loot charm function which has some antiban into it too, and lootcharms calls loot bones if i didnt loot with quickloot, ythis wy i always pick bones last.
lootc();

exit;
end;
end;


as you see i am kind of messy and like writing sometimes ven 200 lines procedures:D

o0Matthius0o

2014-09-07 16:17:01

From: cosmasjdz
search for the yellow circle tpa inside red circle tpa, and save the pozition as tpoint, then look for the drop close to it. But its toocomplicated. actually just search for the bones using findcolorspiral tolerance, then filter it, and make sure always pick bones last so one drop finding function would always work. This is mone one searching for d bones and hides with little antiban inside:



as you see i am kind of messy and like writing sometimes ven 200 lines procedures:D


Im loving the idea! I didnt think to use the circles for finding the drops. Im still learning how to split certain things from the TPA's. Thanks again man!

Also for everyone else. I have updated the woodcutter so check that out.

o0Matthius0o

2014-09-07 18:50:00

Ummm. dont use the woodcutter script for too long. I just had 2 accounts banned on it lol. but it was running for along time

Gunner

2014-09-07 20:22:41

From: o0Matthius0o
Ummm. dont use the woodcutter script for too long. I just had 2 accounts banned on it lol. but it was running for along time


Your login details are still in the scripts! Although, it sounds like they may have been banned, so it may not be a big deal. Also, it's just playerfile info, not enough to hack you, but depending on how you name your files, it may be enough to ban you in game.

In the future make sure to remove all personal details from your scripts, even if it's just playerfile nicknames.

o0Matthius0o

2014-09-07 21:19:05

From: Gunner
Your login details are still in the scripts! Although, it sounds like they may have been banned, so it may not be a big deal. Also, it's just playerfile info, not enough to hack you, but depending on how you name your files, it may be enough to ban you in game.

In the future make sure to remove all personal details from your scripts, even if it's just playerfile nicknames.


Yeah i didnt think that it mattered too much. Since nobody but me knows the actual log on details. But who knows. I only ran the woodcutter on the 2 accounts that got banned. luckily they werent anything important to me. still gonna try to appeal them though.

Incurable

2014-09-08 02:12:01

From: o0Matthius0o
Yeah i didnt think that it mattered too much. Since nobody but me knows the actual log on details. But who knows. I only ran the woodcutter on the 2 accounts that got banned. luckily they werent anything important to me. still gonna try to appeal them though.


Put it this way, if a Jagex employee reads these forums (which they undoubtedly do) and sees your username, then that's an instant ban right there. :p

The Mayor

2014-09-08 02:38:10

From: Incurable
Put it this way, if a Jagex employee reads these forums (which they undoubtedly do) and sees your username, then that's an instant ban right there. :p


Those aren't his details, just nickname. They wouldn't ban an account just from seeing the UN on a botting forum, they have to have evidence that that account actually botted.

Incurable

2014-09-08 02:54:18

From: The Mayor
Those aren't his details, just nickname. They wouldn't ban an account just from seeing the UN on a botting forum, they have to have evidence that that account actually botted.


Oh right, my mistake. Still, we'd think that they wouldn't, but I don't think we can really know what Jagex would do. If I were them, I'd ban any account that I saw on a botting forum (or at the very least, flag that account).

o0Matthius0o

2014-09-08 02:56:33

From: Incurable
Oh right, my mistake. Still, we'd think that they wouldn't, but I don't think we can really know what Jagex would do. If I were them, I'd ban any account that I saw on a botting forum (or at the very least, flag that account).


It would be nice to know their exact procedures for their decisions on things like this. I believe that they just guess. Thats what it seems like reading around about innocent people who got banned for playing a little too long.

Incurable

2014-09-08 03:05:39

From: o0Matthius0o
It would be nice to know their exact procedures for their decisions on things like this. I believe that they just guess. Thats what it seems like reading around about innocent people who got banned for playing a little too long.


Honestly, there's no such thing as an innocent person being banned for macroing. It has happened in the past, but Jagex is extremely confident that they don't ban innocent players. They have a team who double-checks accounts they're unsure of and decides whether to ban them or not. I agree that it would be nice to know, but that's why they don't tell us. :p

o0Matthius0o

2014-09-08 04:00:32

From: Incurable
Honestly, there's no such thing as an innocent person being banned for macroing. It has happened in the past, but Jagex is extremely confident that they don't ban innocent players. They have a team who double-checks accounts they're unsure of and decides whether to ban them or not. I agree that it would be nice to know, but that's why they don't tell us. :p


So i guess its safe to assume that i wont get my accounts back lol

cosmasjdz

2014-09-08 14:49:12

Personally i bot with zezima account no banyet :D



Actually i dont think nickname is enough to get banned, but to get on their watchlist it is. Also dont make bots same names and passwords too.

o0Matthius0o

2014-09-14 02:41:18

This is more for me than anything because im not sure if anyone is using it. Im just posting it here so i can use it on my laptop while i go on vacation.

But! In the offchance anyone wants to know i have modified the script to be easily changed to fight whatever you want. Instructions are in the script. You will have to have knowlege of how to use the ACA and the DTM editor. I have been using this for my slayer tasks and it has been working pretty great. So! Everyone is welcome to use it!







program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/LIB/SPS-RS3.simba}
(*RiddleSlayer*)
(*Input your info from the rafiki game manager
Then using the DTM editor you will pick a point within the
gold lock at the top left corner of the Monsters info
which you will see after you start a fight.

Then pick a few other points on their weakness icon which is just to the right
of the lock, after the name.

Then use the Auto Color Aid and pick your colors!
Be sure to use CST 2.

Now just go to your chosen location and start it up!*)
const
//-------Login Settings-------//
PLAYER_FILE = 'Godlist';
NICKNAME = 'Main';
LOGIN_WORLD = 0;
//----------------------------//
//-------Break settings-------//
ENABLE_BREAKS = True;

MIN_PLAY_TIME = 45;
MAX_PLAY_TIME = 180;

MIN_BREAK_TIME = 5;
MAX_BREAK_TIME = 45;
//----------------------------//
//-------Health settings-------//
REGENERATE = False;
EAT_FOOD = True;
//----------------------------//
//-------Monster settings-------//
COLOR = 13226065;
TOL = 6;
HUE = 7.73;
SAT = 2.21;
MONSTER_NAME = 'Greater';
MONSTER_NAME2 = '*Greater';
NUMBER_TO_KILL = 190;
//----------------------------//
var
//-------DTM For the fight-------//

fightDTM := DTMFromString('mggAAAHicY2NgYGgB4u9A/A+ImRkZGJiA+BuQPQuIlwDxXCCeAcTLgHg2EF+eJMlQ0rOOobMsnWFJsStDvpc+Q4yjOgMuwIgDQwAA+FQO0Q=='); // Place your DTM here

//-------Global Variables-------//
TotalBreakTime, StatsTime, misClicked, monstDead : TTimeMarker; //Timers Here

BreakTimeTotal, BreakTime, Breaked, XpGained : integer; //Stats Here

NumberKilled : integer; //For how many you have killed


//-------------------------------------------------------------------------------------------------------------------------------//
procedure resetBreakTimer();
begin
BreakTime := getSystemTime() + gaussRangeInt(MIN_PLAY_TIME * 60000, MAX_PLAY_TIME * 60000);
end;

//-------------------------------------------------------------------------------------------------------------------------------//



//-------------------------------------------------------------------------------------------------------------------------------//
procedure setup();

begin
smartEnableDrawing := true;
setupSRL();

players.Setup([NICKNAME], PLAYER_FILE);
currentPlayer := 0;
players[currentPlayer].world := LOGIN_WORLD;

exitTreasure();

resetBreakTimer();
TotalBreakTime.start();
TotalBreakTime.pause();
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function isMonsterDead(): boolean;
var
hpDTM, hBarDTM, x, y : integer;
isMobDead : boolean;
begin
hBarDTM := DTMFromString('mKgEAAHic42NgYFBhZGDwB+IgIP4J5P8GYkkgW5sRQmsBsQUQOwIxGxC/Bcp7AelzDBB8EYgvAPEZJHwJis8g0YeB+CgQ2wgLM2hzcsJpRTY2MI0L84lIMvCJSjFIgtxFBmYkE6MCAFnIFUE=');
hpDTM := DTMFromString('mbQAAAHicY2VgYFBhZWBQBmI1IFYFYiUg3gwUXw/EG4B4GxTbCAsz/D/NynB3AwuYDtMRZJAEiqNjRiwYDADI8wr3');
isMobDead := false;
if findDTM(hpDTM, x, y, mainScreen.getBounds()) then //Will keep fighting the monster til their health reaches 0
begin
writeLn('DTM found, Moster hp 0');
clearDebug();
if findDTM(hBarDTM, x, y, mainScreen.getBounds()) then
begin
writeLn('DTM 2 found, Monster Healthbar empty');
//wait(randomRange(3000, 3500));
inc(NumberKilled);
isMobDead := True;
result := True;
end;
end;
end;

//-------------------------------------------------------------------------------------------------------------------------------//

//-------------------------------------------------------------------------------------------------------------------------------//
function heal(): boolean;
var
heartBar, x, y : integer;
begin
heartBar := DTMFromString('mlwAAAHicY2dgYJjACMHTgbgTyu4G4qlAfA2ILwDxJSh9B4hvAPF1IJ6hJMvw6/YFhqOexgyvl9Qx1OsaMbSJCDOUWogz4AOMeDAUAABpNxL5');
if findDTM(heartBar, x, y, actionBar.getBounds()) = True then
begin
writeLn('In the HEAL procedure: Found the Heart');
sendKeys('0', 250, 40);
wait(randomRange(6000, 6500));
result := True;
exit;
end;

end;

//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
procedure healthEat();
var
heartBar, fightDTM, x, y : integer;
fhb : boolean;
begin
heartBar := DTMFromString('mlwAAAHicY2dgYJjACMHTgbgTyu4G4qlAfA2ILwDxJSh9B4hvAPF1IJ6hJMvw6/YFhqOexgyvl9Qx1OsaMbSJCDOUWogz4AOMeDAUAABpNxL5');
fhb := False;
if actionBar.getHPPercent() <= 50 then
begin
repeat
sendKeys('z', 250, 40);
until actionBar.getHPPercent() > 50;
end;
if actionBar.getHPPercent() < 75 then
begin
if actionBar.getAdrenalinePercent() > 20 then
begin

if isMonsterDead() = True then
begin
if findDTM(fightDTM, x, y, mainscreen.getBounds()) = True then
begin
repeat
heal();
until heal() = True;
writeLn('Using Heal');
end;
end;
writeLn('Healing is done. Hp: ', actionBar.getHPPercent());

exit;
End else
begin
exit;
end;
end;


end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function antiBan(): boolean;
var
antiBanNum : integer;
begin
antiBanNum := random(1500);
if antiBanNum <= 100 then
begin
writeLn('Antiban Time!');

case antiBanNum of
1..10: boredHuman(false);
11..25: hoverRandomSkill();
26..31: hoverOnlineFriend();
32..52: mouseMovingObject();
53..69: mouseOffClient(4);
70..80: randomCameraAngle(MS_ANGLE_HIGH);
81..90: randomCompass(10, 40, True);
91..100: wait(randomRange(3000, 5000));

end;
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function timeUntilBreak() : string;
var
breakFromNow, H, M, S : integer;
begin
if ENABLE_BREAKS then
begin
breakFromNow := BreakTime - getSystemTime();
convertTime(breakFromNow, H, M, S);
result := (toStr(H) + 'h ' + toStr(M) + 'm ' + toStr(S) + 's');
end else
result := ('Breaking disabled');
end;
//-------------------------------------------------------------------------------------------------------------------------------//



//-------------------------------------------------------------------------------------------------------------------------------//
procedure takeBreak();
var
H, M, S, HH, MM, SS, breakFor, timeLeft : integer;
breakStartTimer : TTimeMarker;

begin
if not ENABLE_BREAKS then
exit;

if (getSystemTime() >= BreakTime) then
begin
TotalBreakTime.start();
writeLn('Taking a break');

if random(2) = 0 then
begin
//repeat
players[currentPlayer].logout();
//until not isLoggedIn();
end
else
begin
//repeat
players[currentPlayer].exitToLobby();
//until lobby.isOpen();
end;


breakFor := gaussRangeInt(MIN_BREAK_TIME * 60000, MAX_BREAK_TIME * 60000);
convertTime(breakFor, H, M, S);
writeLn('You are taking a break for: ' + toStr(H) + 'h ' + toStr(M) + 'm ' + toStr(S) + 's');

breakStartTimer.start();

repeat
timeLeft := breakFor - breakStartTimer.getTime();
convertTime(timeLeft, HH, MM, SS);
writeLn('Ending break in: ' + toStr(HH) + 'h ' + toStr(MM) + 'm ' + toStr(SS) + 's');
wait(25000 + random(4000));
until breakFor < breakStartTimer.getTime();

inc(Breaked);
resetBreakTimer();
TotalBreakTime.pause();
players[currentPlayer].login();
wait(gaussRangeInt(1500, 3500));
exitTreasure();
minimap.clickCompass();
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
procedure doAbilities();
var
i : integer;
keyStr : string;

begin
for i := 9 downto 1 do
begin
if (actionBar.getAbilityCooldown(i) = 1) then
begin
case i of
0..9: keyStr := intToStr(i);
10: keyStr := '0';
11: keyStr := '-';
12: keyStr := '=';
end;

SendKeys(keyStr[1], 60 + Random(60), 60 + Random(60));

exit;
end;
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
function clickEnemy(): boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
hpDTM, hBarDTM, fightDTM: integer;
isMobDead : boolean;
begin
if isLoggedIn() then
begin
hBarDTM := DTMFromString('mKgEAAHic42NgYFBhZGDwB+IgIP4J5P8GYkkgW5sRQmsBsQUQOwIxGxC/Bcp7AelzDBB8EYgvAPEZJHwJis8g0YeB+CgQ2wgLM2hzcsJpRTY2MI0L84lIMvCJSjFIgtxFBmYkE6MCAFnIFUE=');
hpDTM := DTMFromString('mbQAAAHicY2VgYFBhZWBQBmI1IFYFYiUg3gwUXw/EG4B4GxTbCAsz/D/NynB3AwuYDtMRZJAEiqNjRiwYDADI8wr3');
isMobDead := false;
repeat

if findDTM(fightDTM, x, y, mainscreen.getBounds()) = True then
begin
writeLn('Top of Procedure: You are in a fight'); //fix this statement. it just exits sometimes and the script gets stuck in a loop. doing nothing.
result := True;
exit;
end;
findColorsSpiralTolerance(x, y, TPA, COLOR, mainScreen.getBounds(), TOL, colorSetting(2, HUE, SAT));
if length (TPA) < 1 then //If there are no monsters found it will terminate and rerun.
begin
exit;
end;
ATPA := TPA.toATPA(50, 50);
ATPA.sortFromMidPoint(mainscreen.playerPoint); //Chooses the closest monster to you.

smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do //Finds and draws all the monsters a debug box.
begin
mouse(middleTPA(ATPA[i]), MOUSE_RIGHT);
if chooseOption.optionsExist(['ttack']) then
begin
chooseOption.select([MONSTER_NAME, MONSTER_NAME2]);
wait(randomRange(4000, 4500));
clearDebug();
break;
end;
end;
until findDTM(fightDTM, x, y, mainscreen.getBounds()) = True;
clearDebug();
writeLn('You are in a Fight');
smartImage.clear();
result := True;
exit;
End else
if not isLoggedIn() then
begin
writeLn('You are not logged in');
exit;
end;

end;
//-------------------------------------------------------------------------------------------------------------------------------//



//-------------------------------------------------------------------------------------------------------------------------------//
function pickUpCharms(): boolean;
var
x, y, i : integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
if IsLoggedIn() then
begin
wait(randomRange(3500, 4000));
writeLn('Searching for Charms');
findColorsSpiralTolerance(x, y, TPA, 13948655, mainScreen.getBounds(), 8, colorSetting(2, 0.16, 4.15));
if length (TPA) < 1 then //If there are no bones found it will terminate and rerun.
begin
exit;
end;
ATPA := TPA.toATPA(40, 40);
ATPA.sortFromMidPoint(mainscreen.playerPoint); //Chooses the closest drop to you.

smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
wait(1000);
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ake'], 500) then
begin
mouse(middleTPA(ATPA[i]), MOUSE_RIGHT); // picks up the bones at the closest point to you.
if chooseOption.optionsExist(['ake Gold charm']) then
begin
chooseOption.select(['ake Gold charm']);
tabBackPack.waitForShift(10000);
smartImage.clear();
result := True;
exit;
end
else if chooseOption.optionsExist(['ake Green charm']) then
begin
chooseOption.select(['ake Green charm']);
tabBackPack.waitForShift(10000);
smartImage.clear();
result := True;
exit;
end
else if chooseOption.optionsExist(['ake Crimson charm']) then
begin
chooseOption.select(['ake Crimson charm']);
tabBackPack.waitForShift(10000);
smartImage.clear();
result := True;
exit;
end
else
begin
smartImage.clear();
result := False;
exit;
end;

smartImage.clear();
break;
end;
end;
end;
end;
//-------------------------------------------------------------------------------------------------------------------------------//


//-------------------------------------------------------------------------------------------------------------------------------//
procedure checkAngle();
var
angle : extended;

begin
angle := minimap.getAngleRadians();

if angle <> MM_DIRECTION_NORTH and MS_ANGLE_HIGH then // checks to see if the camera is in the correct position. If its not it will put it there.
begin
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;

end;
//-------------------------------------------------------------------------------------------------------------------------------//



//-------------------------------------------------------------------------------------------------------------------------------//



begin
setup();
repeat
if not isLoggedIn() then
begin
players[currentPlayer].login();
end;
until isLoggedIn();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
repeat
repeat

until clickEnemy() = True;
repeat
misClicked.reset();
misClicked.start();
doAbilities();
until isMonsterDead() = True or misClicked.getTime() > 90000;
healthEat();
antiBan();
takeBreak();
wait(randomRange(3000, 3500));
until(NUMBER_TO_KILL = NumberKilled);
end.