Simba Code:
program FFACW;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/sps-rs3.simba}
{$I srl-6/lib/misc/srlplayerform.simba}
var
Treess, multii, runedtm, red, lobbyyy, tries: integer;
PEOPLE: TStringArray = ['ttack'];
ATTACK: integer = 1;
LOCATION: string = 'NORMAL';
WORLD: integer = 3;
PRAYERS: integer = 1;
PLAYERNAME: string = 'pkinghappy';
MULTI, ATTACKUSR, ANTILURE, ATTALL, TALKPPL: boolean;
xpthen, xpnow, gainedxp, deaths, randnum, vexsclosed, redwarningclosed, relogs, rests, nsesAttacked: integer = 0;
limit: integer = 10;
talked: integer = 0;
ATTACK_USER: TStringArray;
procedure writeStatus(status: string);
begin
with (smartImage) do
begin
clearArea(Mainscreen.getBounds());
drawBox(3, 573, 569, 592, true, clAqua);
drawText('Status: ' + status, point(16, 576), UpCharsEx, false, clRed);
end;
end;
procedure doTarget();
begin
if (not ATTALL) then
begin
ATTACK_USER := ['ttack purp killah', 'ttack Cell 18', 'ttack aintnograve', 'ttack xll statue', 'ttack a1ntnogravve', 'ttack Trap n Tempz', 'ttack tankinbucket', 'ttack squad unit', 'ttack Nagnoc', 'ttack shook ones98', 'ttack Taft', 'ttack shook ones85', 'ttack Taftie', 'ttack DTF Rohan', 'ttack DTF'];
end
else
begin
ATTACK_USER := ['ttack '];
end;
end;
procedure drawProgress;
var
T1, T2, T3: integer;
begin
ConvertTime(GetTimeRunning, T1, T2, T3);
with (smartImage) do
begin
clear();
drawBox(intToBox(3, 473, 569, 596), true, clGray);
drawBox(intToBox(3, 473, 569, 489), true, clGray);
drawBox(intToBox(3, 489, 569, 503), true, cllime);
drawBox(intToBox(3, 503, 569, 516), true, clred);
drawBox(intToBox(3, 517, 569, 528), true, clLime);
drawBox(intToBox(3, 528, 569, 541), true, clred);
drawBox(intToBox(3, 542, 569, 592), true, clNAVY);
drawBox(intToBox(3, 542, 569, 553), true, cllime);
drawText('NsBot 3 by Reese', point(226, 475), UpCharsEx, false, clblue);
drawText('==RunTime==: ' + IntToStr(T1) + ':' + IntToStr(T2) + ':' + IntToStr(T3), Point(8, 474), upchars, false, clmaroon);
drawText('==Relogs==: ' + IntToStr(relogs), Point(8, 490), upchars, false, clRed);
drawText('==Rests==: ' + IntToStr(rests), Point(8, 502), upchars, false, cllime);
drawText('==Nses Attacked==: ' + IntToStr(nsesAttacked), Point(8, 516), upchars, false, clRed);
drawText('==Deaths==: ' + IntToStr(deaths), Point(8, 528), upchars, false, cllime);
drawText('==Vex Closed==: ' + IntToStr(vexsclosed), Point(8, 542), upchars, false, clred);
drawText('==RedPort Warning Closed==: ' + IntToStr(redwarningclosed), Point(8, 555), upchars, false, cllime);
end;
end;
procedure initPlayerForm();
begin
with playerForm do
begin
name := 'lox - Player form';
editBoxLabels := ['World', '100% Spec Key', '50% Spec Key'];
editBoxDefaults := ['3', '8', '7'];
checkBoxLabels := ['Quick prayers', 'Walk to multi', 'Antilure', 'Attack people', 'Attack everyone', 'Talk', 'Rest'];
checkBoxDefaults := ['True', 'False', 'True', 'True', 'False', 'False', 'False'];
end;
end;
function timeRunning(TheType: Integer = TIME_FORMAL_LONG): string;
override;
begin
Result := msToTime(GetTimeRunning(), TIME_SHORT);
end;
procedure progressReport();
begin
with (smartImage) do
begin
drawBox(347, 6, 567, 25, true, clAqua);
drawText(ToStr(timeRunning), Point(93, 492), 'UpChars', true, 13667100);
drawText(ToStr(relogs), Point(81, 542), 'UpChars', true, 13667100);
end;
end;
procedure doScreen();
begin
if ((minimap.getAngleDegrees() > 95) or (minimap.getAngleDegrees() < 85)) then
begin
writeStatus('Checking angle');
writeLn('Camera angle is: ' + toStr(minimap.getAngleDegrees()) + ' - Changing to EAST');
wait(randomRange(200, 600));
minimap.setAngle(randomRange(85, 95));
wait(randomRange(400, 800));
writeStatus('Camera angle completing changes.');
writeln('Camera angle is: ' + toStr(minimap.getAngleDegrees()) + ' - change completed.');
end;
end;
function checkVex(): boolean;
const
VEX_COLOR = 80252;
begin
if result := getColor(149, 179) = VEX_COLOR then
begin
wait(250);
WriteStatus('checkVex Result : ' + toStr(Result));
end;
end;
procedure closeVex();
begin
if checkVex() then
begin
WriteStatus('Closing clan vex.');
KeyDown(VK_ESCAPE);
smallRandommouse();
inc(vexsclosed);
end;
end;
function checkRed(): boolean;
var
x,y:integer;
begin
if (not ANTILURE) then
exit();
if result := FindDTM(red, x, y, 165, 50, 399, 68) then
begin
wait(50);
WriteStatus('checkRed Result : ' + toStr(Result));
wait(40);
end;
end;
procedure closeRed();
begin
if checkred() then
begin
writestatus('Closing red.');
KeyDown(VK_ESCAPE);
wait(randomRange(200, 500));
smallRandommouse();
inc(redwarningclosed);
end;
end;
procedure movetoPortal();
var
roflBox: TBox;
x, y: integer;
begin
if FindColorTolerance(x, y, 65794, 117, 153, 219, 210, 5) then
begin
wait(randomrange(2000, 4000));
roflBox := intToBox(707, 111, 716, 116);
mouseBox(roflBox, MOUSE_LEFT);
WriteStatus('correcting position');
wait(randomrange(300, 2000));
smallrandommouse();
wait(randomrange(1000, 3000));
end;
end;
function checkPoll(): boolean;
const
POLL_COLOR = 4245242;
begin
result := getColor(424, 124) = POLL_COLOR;
end;
procedure closePoll();
var
box: TBox;
begin
writeStatus('Closing poll.');
box := intToBox(364, 123, 426, 132);
mouseBox(box, MOUSE_LEFT);
wait(randomRange(200, 500));
smallRandommouse();
end;
function inLobby(): boolean;
var
x,y:integer;
begin
if (not ANTILURE) then
exit();
if result := FindDTM(lobbyyy, x, y, 621, 519, 740, 543) then
begin
wait(50);
WriteStatus('inLobby Result : ' + toStr(Result));
end;
end;
procedure outLobby();
var
x, y: integer;
box: TBox;
BEGIN
IF INLOBBY() THEN
begin
writeStatus('in rs lobby, going ingame.');
box := intToBox(572, 521, 607, 536);
mouseBox(box, MOUSE_LEFT);
wait(randomRange(5000, 8000));
smallRandommouse();
wait(randomRange(1000, 2000));
mainscreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(1000, 2000));
minimap.setAngle(MM_DIRECTION_EAST);
wait(randomRange(1000, 2000));
mainscreen.setZoom(true);
exitTreasure();
inc(relogs);
if checkPoll() then
closePoll();
end ELSE EXIT;
END;
function inSafe(): boolean;
const
SAFE_COLOR = 2070783;
begin
result := getColor(538, 219) = SAFE_COLOR;
end;
function findGreenPort(): boolean;
var
x, y: integer;
begin
if not inSafe() then
exit();
if mainscreen.findObject(x, y, 2123333, 21, ['Portal'], MOUSE_MOVE) then
begin
result := 1;
end
else
begin
result := 0;
end;
end;
function atTowers(): boolean;
var
x, y: integer;
begin
result := findColorTolerance(x, y, 9739681, mainscreen.getBounds(), 4);
end;
function ismeleeOn(): boolean;
const
MELEEON_COLOR = 3653100;
begin
if result := getColor(407, 434) = MELEEON_COLOR then
WriteStatus('ismeleeOn Result : ' + toStr(Result));
end;
procedure prayMelee();
begin
if actionBar.getPrayerPercent() = 0 then
exit;
if ismeleeOn() then exit;
if not inSafe() then exit;
if not ismeleeOn() then
PRESSKEY(96);
wait(randomrange(700,1200));
end;
procedure prayMeleeOff();
begin
if actionBar.getPrayerPercent() = 0 then
exit;
if not ismeleeOn() then exit;
if inSafe() then exit;
if ismeleeOn() then
PRESSKEY(96); //numpads
wait(randomrange(700,1200));
end;
function findTrees(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then
exit();
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := FindDTM(treess, x, y, 650, 69, 711, 127) then
begin
wait(50);
WriteStatus('findTrees Result : ' + toStr(Result));
end;
end
function findTreees(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then
exit();
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := FindDTM(treess, x, y, 644, 72, 721, 143) then
begin
wait(50);
WriteStatus('findTreees Result : ' + toStr(Result));
end;
end
function findWest(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then
exit();
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := FindDTM(treess, x, y, 640, 81, 731, 152) then
begin
wait(50);
WriteStatus('findWest Result : ' + toStr(Result));
end;
end;
function findEast(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then
exit();
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := FindDTM(treess, x, y, 658, 85, 708, 126) then
begin
wait(50);
WriteStatus('findEast Result : ' + toStr(Result));
end;
end;
function findLava(): boolean;
var
x, y: integer;
begin
result := findColorTolerance(x, y, 1014713, intToBox(626, 27, 745, 169), 4);
end;
procedure declarePlayers();
begin
players.setup(['pkinghappy'], 'lox');
currentPlayer := 0;
repeat
players[0].loginToLobby();
wait(randomRange(1000, 3000));
Lobby.quickSelectWorld(WORLD);
wait(randomRange(12000, 20000));
until not lobby.isOpen();
wait(randomRange(1000, 2000));
mainscreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(1000, 2000));
minimap.setAngle(MM_DIRECTION_EAST);
wait(randomRange(1000, 2000));
mainscreen.setZoom(true);
exitTreasure();
if checkPoll() then
closePoll();
end;
procedure getXP();
begin
xpnow := chatbox.getXPBar();
gainedxp := (xpnow - xpthen);
end;
function FindNorth(): boolean;
const
INTERFACE_COLOR = 3635889;
var
TPA: TPointArray;
searchArea := intToBox (138, 5, 437, 52);
begin
result := FindColors(TPA, INTERFACE_COLOR, searchArea);
end;
function checkExamine(): boolean;
const
EXAMINE_COLOR = 4217053;
begin
result := getColor(218, 19) = EXAMINE_COLOR;
end;
procedure closeExamine();
var
box: TBox;
begin
writeStatus('Closing examine player.');
box := intToBox(211, 18, 220, 24);
mouseBox(box, MOUSE_LEFT);
wait(randomRange(200, 500));
smallRandommouse();
end;
procedure Talk();
var
i: integer;
MESSAGES: TStringArray := ['Wb Roofl', 'Rr0flrf wb', 'Nicy try lool', 'Why u avoiding rooofl', 'rf0flo', 'all i do is win', 'u mad? r0flrf0', 'Stop avoiding? r0flro', 'Dont log pls loool', 'Gl r0flr i dont off l00l', 'Still permd r00fl', 'Nice nap r00ofl', 'R0flrfl still permd kid', 'Wyd l0l rofl', 'Think im off u? l00l', 'r0flr0fl dont rage', 'l000l dont get mad', 'no offs r0fl', 'Youngkingz rofl', 'gl in ffa kid l000l', 'ur acc is crap 0flr0flr', 'weak l0000l', 'wb slave r0flr0l'];
RAND: integer;
MESSAGE: string;
begin
if (talked = 0) then
exit;
RAND := randomRange(1, high(MESSAGES));
MESSAGE := MESSAGES[RAND];
talked := 1;
TypeByte(VK_RETURN);
wait(randomRange(2000, 5000));
for i := 1 to Length(MESSAGE) do
SendKeys(MESSAGE[i], 18 + Random(17), 22 + Random(12));
wait(randomRange(2000, 5000));
TypeByte(VK_RETURN);
end;
function inMulti(): boolean;
var
x, y: integer;
begin
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := FindDTM(multii, x, y, 225, 3, 261, 31) then
begin
wait(250);
WriteStatus('inMulti Result : ' + toStr(Result));
end;
end;
function prayersOn(): boolean;
const
ICON_COLOR = 9060948;
var
TPA: TPointArray;
searchArea := intToBox (299, 395, 313, 414);
begin
result := FindColors(TPA, ICON_COLOR, searchArea);
end;
procedure togglePrayer();
var
box: TBox;
begin
if PRAYERS = 0 then
exit();
if actionBar.getPrayerPercent() = 0 then
exit;
wait(randomrange(1000,3000));
actionBar.mouseIcon(AB_BAR_PRAYER, MOUSE_LEFT);
writeStatus('Toggling prayers.');
// box := intToBox(302, 394, 311, 402);
//mouseBox(box, MOUSE_LEFT,MOUSE_ACCURATE);
//wait(randomrange(1000,3000));
end;
procedure walkTo(loc: string);
var
randAngle: integer;
north, northh, northhh, northhhh, northhhhh, northhhhhh, northhhhhhh, multi, pond, second, third, sit: Tbox;
begin
doScreen();
if not minimap.isRunEnabled() then
minimap.toggleRun(true);
if PRAYERS = 0 then exit;
IF not prayersOn() then togglePrayer();
//begin
//case random(30) of
// 1..25:
// if (not prayersOn()) then
// togglePrayer();
// end;
case lowerCase(loc) of
'rest':
case random(100) of
1..45:
begin
northhh := intToBox(695, 101, 702, 109);
mouseBox(northhh, MOUSE_LEFT);
wait(randomrange(2000, 5000));
sit := intToBox(766, 27, 781, 39);
mouseBox(sit, Mouse_RIGHT);
wait(randomrange(1300, 1900));
chooseOption.select(['est']);
wait(250);
smallRandommouse();
WriteStatus('Resting as antiban.');
wait(randomrange(45000, 235000));
end;
46..100:
begin
northhhh := intToBox(703, 101, 712, 110);
mouseBox(northhhh, MOUSE_LEFT);
wait(randomrange(2000, 5000));
sit := intToBox(766, 27, 781, 39);
mouseBox(sit, Mouse_RIGHT);
wait(randomrange(1200, 1800));
chooseOption.select(['est']);
wait(250);
smallRandommouse();
WriteStatus('Resting as antiban.');
wait(randomrange(30000, 200000));
end;
end;
'hills':
begin
writeStatus('Walking to hills.');
wait(RANDOMRANGE(1000,3000));
minimap.setAngle(MM_DIRECTION_EAST);
multi := intToBox(783, 83, 794, 102);
mouseBox(multi, MOUSE_LEFT);
wait(randomRange(8000, 9500));
second := intToBox(705, 80, 724, 118);
mouseBox(second, MOUSE_LEFT);
writeStatus('We are at hills.');
wait(randomRange(1000, 4000));
end;
'pond':
begin
case random(100) of
1..35:
begin
writeStatus('Walking to pond.');
pond := intToBox(683, 159, 688, 174);
mouseBox(pond, MOUSE_LEFT);
wait(randomRange(7000, 7580));
second := intToBox(786, 114, 792, 122);
mouseBox(second, MOUSE_LEFT);
wait(randomRange(7000, 8000));
writeStatus('We are at pond.');
end;
35..100:
begin
writeStatus('Walking to pond.');
pond := intToBox(738, 163, 754, 172);
mouseBox(pond, MOUSE_LEFT);
wait(randomRange(8000, 9000));
second := intToBox(727, 115, 740, 130);
mouseBox(second, MOUSE_LEFT);
wait(randomRange(3000, 4000));
writeStatus('We are at pond.');
end;
end;
end;
'normal':
begin
wait(randomrange(500, 1000));
writeStatus('Walking north.');
case Random(200) of
1..49:
begin
north := intToBox(340, 120, 480, 350);
mouseBox(north, MOUSE_MOVE);
fastClick(MOUSE_RIGHT);
chooseOption.select(['alk here']);
end;
50..99:
begin
northh := intToBox(690, 92, 744, 116);
mouseBox(northh, MOUSE_LEFT);
wait(randomrange(1000, 5000));
smallRandommouse();
if ((random(500) < 20) and (randAngle = 0)) then
WriteStatus('Changing camera angle');
minimap.setAngle(randomRange(1 + random(5), 350 + random(7)));
randAngle := 1;
end;
100..103:
begin
northhhhh := intToBox(699, 97, 724, 115);
mouseBox(northhhhh, MOUSE_LEFT);
wait(randomrange(1000, 4200));
wait(randomrange(2000, 3000));
sit := intToBox(766, 27, 781, 39);
mouseBox(sit, Mouse_RIGHT);
wait(randomrange(1200, 1800));
chooseOption.select(['est']);
wait(randomrange(1000, 2600));
smallRandommouse();
if ((random(500) < 20) and (randAngle = 0)) then
WriteStatus('Changing camera angle');
minimap.setAngle(randomRange(1 + random(5), 350 + random(7)));
randAngle := 1;
WriteStatus('Resting as antiban.');
inc(rests);
wait(randomrange(3000, 6000));
end;
104..135:
begin
northhhhhh := intToBox(690, 108, 694, 136);
mouseBox(northhhhhh, MOUSE_LEFT);
wait(randomrange(1000, 5000));
smallRandommouse();
end;
136..160:
begin
northhhhhhh := intToBox(691, 98, 696, 107);
mouseBox(northhhhhhh, MOUSE_LEFT);
wait(randomrange(800, 4000));
smallRandommouse();
if ((random(500) < 20) and (randAngle = 0)) then
WriteStatus('Changing camera angle');
minimap.setAngle(randomRange(1 + random(5), 350 + random(7)));
randAngle := 1;
end;
160..175:
begin
case random(8) of
1: mouse(point(695, 102), mouse_Left, MOUSE_ACCURATE);
2: mouse(point(699, 114), mouse_Left, MOUSE_ACCURATE);
3: mouse(point(323, 235), mouse_Left, MOUSE_ACCURATE);
4: mouse(point(700, 108), mouse_Left, MOUSE_ACCURATE);
5: mouse(point(700, 91), mouse_Left, MOUSE_ACCURATE);
6: mouse(point(706, 97), mouse_Left, MOUSE_ACCURATE);
7: mouse(point(700, 119), mouse_Left, MOUSE_ACCURATE);
8: mouse(point(357, 71), mouse_Left, MOUSE_ACCURATE);
end;
end;
end;
wait(randomRange(3500, 4500));
end;
end;
end;
//end;
function clickPortal: Boolean;
var
tFrame, tFrameEdge, tPortal, tPortalEdge, tEdge: TPointArray;
aEdge: T2DPointArray;
i, safeCheck, AE: Integer;
p: TPoint;
b: TBox;
begin
Result := False;
begin
case random(1000) of
1..30:
begin
WriteStatus('Doing mini antiban');
case random(4) of
0: wait(randomRange(1000, 10000));
1: sleepAndMoveMouse(1000 + random(2000));
2: wait(randomRange(2000, 20000));
3: sleepAndMoveMouse(2000 + random(4000));
end;
end;
end;
end;
if not minimap.isRunEnabled() then
minimap.toggleRun(true);
Inc(AE);
if (AE >= randomrange(3, 4)) then
begin
minimap.clickCompass();
AE := 0;
end;
FindColorsTolerance(tFrame, 1065555, Mainscreen.getBounds(), 5, ColorSetting(2, 0.15, 0.51));
tFrameEdge := FindTPAEdges(tFrame);
FindColorsTolerance(tPortal, 10265781, Mainscreen.getBounds(), 20, ColorSetting(2, 0.27, 0.40));
tPortalEdge := FindTPAEdges(tPortal);
if (Length(tFrameEdge) < 10) or (Length(tPortalEdge) < 10) then
Exit(False);
for i := 0 to High(tPortalEdge) do
if (NearbyPointInArrayEx(tPortalEdge[i], 5, 5, tFrameEdge)) then
Insert(tPortalEdge, tEdge);
aEdge := ClusterTPAEx(tEdge, 5, 5);
SortATPAFromMidPoint(aEdge, Mainscreen.playerPoint);
for i := 0 to High(aEdge) do
begin
if (Length(aEdge[i]) < 20) then
Continue();
p := MiddleTPA(aEdge[i]);
b := IntToBox(p.x - 12, p.y - 10, p.x + 12, p.y + 10);
b.setLimit(Mainscreen.getBounds());
WriteStatus('Searching for safe portal');
if (getPixelShift(b, 100) > 200) then
begin
MouseSpeed := RandomRange(40, 70);
Mouse(b.getRandomPoint());
if (isMouseOverText(['(safe)'])) then
begin
case Random(75) of
0..25:
begin
FastClick(MOUSE_LEFT);
wait(random(500, 780));
end;
26..50:
begin
FastClick(MOUSE_LEFT);
wait(random(500, 3000));
smallRandomMouse();
end;
51..75:
begin
FastClick(MOUSE_LEFT);
wait(randomRange(100, 200));
sleepAndMoveMouse(100 + random(200));
wait(randomRange(400, 700));
togglePrayer();
end;
end;
wait(randomrange(500, 1000));
if (minimap.isFlagPresent(Random(3000, 4000))) then
Minimap.waitPlayerMoving();
Exit(True);
end;
end;
end;
end;
function DATPAB(MaATPA: T2DPointArray): TPoint;
var
i: integer;
begin
for I := 0 to (High(MaATPA)) do
begin
result := MaATPA[i].getMiddle();
with (smartImage) do
begin
try
drawPolygon([point(result.x, result.y + 5), point(result.x, result.y + 25)], clLime);
drawPolygon([point(result.x + 5, result.y), point(result.x + 25, result.y)], clLime);
drawPolygon([point(result.x - 5, result.y), point(result.x - 25, result.y)], clLime);
drawPolygon([point(result.x, result.y - 5), point(result.x, result.y - 25)], clLime);
drawCross(result, 2, clWhite);
drawCircle(result, 20, false, clRed);
except
end;
end;
end;
end;
function PtToHyp(I, C: TPoint): Integer;
begin
Result := Round(Hypot(I.X - C.X, I.Y - C.Y));
end;
function findEeast(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then
exit();
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := FindDTM(treess, x, y, 706, 125, 669, 83) then
begin
wait(50);
WriteStatus('findEeast Result : ' + toStr(Result));
end;
end;
function findWestt(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then
exit();
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := findColorTolerance(x, y, 929083, intToBox(706, 125, 669, 83), 5) then
begin
wait(50);
WriteStatus('findWestt Result : ' + toStr(Result));
end;
end;
function findEastt(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then
exit();
if (LOCATION = 'HILLS') or (LOCATION = 'POND') then
exit();
if result := findColorTolerance(x, y, 993848, intToBox(706, 125, 669, 83), 5) then
begin
wait(50);
WriteStatus('findEastt Result : ' + toStr(Result));
end;
end;
function WithinCircle(Cx, Cy, Ra: Integer; I: Tpoint): Boolean;
var
TP1: Tpoint;
begin
TP1 := point(Cx, Cy);
if PtToHyp(I, TP1) < Ra then
Result := True
else
Result := False;
end;
function WithInBox(SX, SY, EX, EY: Integer; I: Tpoint): Boolean;
begin
if (I.X > SX) and (I.X < EX) and (I.Y > SY) and (I.Y < EY) then
Result := True
else
Result := False;
end;
function InBound(TestPoint: Tpoint): Boolean;
begin
if not (WithInBox(mainscreen.x1, mainscreen.y1, mainscreen.x2, mainscreen.y2, TestPoint)) or WithInCircle(15, 137, 10, TestPoint) or WithInCircle(485, 170, 30, TestPoint) or WithInBox(220, 85, 220, 215, TestPoint) or WithInBox(0, 0, 360, 20, TestPoint) then
Result := False
else
Result := True;
end;
procedure Antiban();
begin
case random(310) of
1..60:
begin
pickUpMouse();
wait(randomRange(175, 1250));
end;
61..150:
begin
smallRandomMouse();
wait(randomRange(200, 500));
end;
150..214:
begin
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(5125, 10510));
end;
215..250:
begin
case random(4) of
1: hoverSkill(SKILL_ATTACK);
2: hoverSkill(SKILL_DEFENCE);
3: hoverSkill(SKILL_STRENGTH);
4: hoverRandomSkill();
end;
wait(randomRange(2000, 7500));
end;
251..310:
begin
sleepAndMoveMouse(2150 + random(2000));
wait(randomRange(500, 1250));
end;
end;
end;
procedure wieldArrows();
var
X, Y: integer;
begin
RUNEDTM := DTMFromString('mlwAAAHicY2dgYOBnARJALATEPEAsC8RiQMwGxN2MDAzTgHgGEM8C4mYgboKKMTAwMcQL8zL0yIqAaVMHVwY9c2swGwTkkLAkFIPYjHgwFAAAJDUIxg==');
if (tabBackpack.open()) then
begin
WriteStatus('Backpack is open.');
if FindDTM(RUNEDTM, x, y, 581, 293, 792, 567) then
begin
mouse(x, y, MOUSE_MOVE, MOUSE_HUMAN);
if isMouseOverText(['ield', 'une', 'rrow']) then
begin
wait(randomrange(600, 1200));
ClickMouse(X, Y, mouse_left);
WriteStatus('Wielded rune arrows.');
wait(randomrange(200, 1400));
smallRandomMouse();
end;
end;
FreeDTM(RUNEDTM);
end;
end;
procedure actions();
begin
case random(500) of
1..89: Antiban();
90..500: WalkTo(LOCATION);
end;
end;
function inCombat(): boolean;
var
adrenalineThen, adrenalineNow: integer;
begin
adrenalineThen := actionBar.getAdrenalinePercent();
if adrenalineThen >= 10 then
begin
if (chooseOption.isOpen()) then
chooseOption.close();
if inSafe() and adrenalineThen >= 40 then
begin
if actionbar.getAdrenalinePercent() > 40 then
SendKeys('7', 15 + RandomRange(15, 100), 20 + RandomRange(10, 30));
if actionbar.getAdrenalinePercent() > 65 then
SendKeys('9', 15 + RandomRange(15, 100), 20 + RandomRange(10, 50));
if actionbar.getAdrenalinePercent() > 99 then
SendKeys('8', 15 + RandomRange(15, 100), 20 + RandomRange(10, 30));
writeStatus('We are in Combat');
exit(true);
end;
if adrenalineThen > 0 then
begin
wait(2000);
adrenalineNow := actionBar.getAdrenalinePercent();
if adrenalineThen < adrenalineNow then
begin
exit(true);
end;
end
else
begin
exit(false);
end;
end;
end;
procedure reLog();
var
X, Y: INTEGER;
begin
if inCombat() or FindNorth() then
exit;
begin
case random(3) of
0..1: players[currentPlayer].exitToLobby();
2..3:
begin
mouseBox(intToBox(791, 1, 796, 8), MOUSE_LEFT);
wait(randomRange(1000, 2000));
mouseBox(intToBox(279, 327, 387, 342), MOUSE_LEFT);
end;
end;
wait(randomRange(8000, 15000));
Lobby.quickSelectWorld(WORLD);
wait(randomRange(8000, 15000));
wait(randomRange(1000, 2000));
mainscreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(1000, 2000));
minimap.setAngle(MM_DIRECTION_EAST);
wait(randomRange(1000, 2000));
mainscreen.setZoom(true);
exitTreasure();
if checkPoll() then
closePoll();
end;
end;
procedure findPortal();
var
Pcol, AE, X, Y, Ptol, I: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
smallrandommouse(); // check
// if checkRed() then closeRed(); //take off
if inLobby() then exit;
if (chooseOption.isOpen()) and not inSafe() then
chooseOption.close();
writeln('waiting to find portal');
if FindNorth() then
begin
actions();
exit;
end;
if inSafe() then
exit;
case random(100) of
25..60: wieldArrows();
end;
if inSafe() or inCombat() or FindNorth() then
exit;
begin
case random(200) of
1..100:
begin
writeln('Doing camera changes');
case random(5) of
0: minimap.setAngle(MM_DIRECTION_EAST);
1: minimap.setAngle(MM_DIRECTION_WEST);
2: wait(randomRange(3000, 8000));
3: minimap.setAngle(MM_DIRECTION_NORTH);
4: mainscreen.setAngle(MS_ANGLE_HIGH);
end;
end;
end;
begin
case random(2000) of
1..200:
begin
writeln('Doing mini antiban');
case random(4) of
0: wait(randomRange(1000, 10000));
1: sleepAndMoveMouse(1000 + random(2000));
2: wait(randomRange(2000, 20000));
3: sleepAndMoveMouse(2000 + random(4000));
end;
end;
end;
if (chooseOption.isOpen()) and not inSafe() then
chooseOption.close();
writeln('waiting to find portal');
writeStatus('Finding portal.');
PCol := 9739693;
PTol := 4;
if (chooseOption.isOpen()) and not inSafe() then
chooseOption.close();
inc(AE);
if FindColorsSpiralTolerance(X, Y, TPA, PCol, mainscreen.x1, mainscreen.y1, mainscreen.x2, mainscreen.y2, PTol) then
begin
SetLength(ATPA, 10);
ATPA := TPAToATPAEx(TPA, 50, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
wait(2000 + random(2500));
for I := 0 to RandomRange(0, High(ATPA)) do
begin
if GetColor(48, 19) = 16777215 then
begin
Wait(Random(600));
Exit;
end;
Mouse(MiddleTPA(ATPA[I]), 2);
Wait(10 + Random(80));
writeStatus('Finding portal.');
if isMouseOverText(['safe)']) then
begin
Wait(10 + Random(40));
writeStatus('Clicking portal.');
Inc(deaths);
Mouse(MiddleTPA(ATPA[I]), 1);
wait(randomRange(5000, 6000));
Exit;
end;
wait(randomrange(1500, 2000));
if (minimap.isFlagPresent(Random(3000, 4000))) then
Minimap.waitPlayerMoving();
Exit;
if AE > RandomRange(3, 4) then
case Random(75) of
0..25: minimap.clickCompass;
26..50: minimap.setAngle(random(0, 60));
end;
end;
end;
end;
end;
end;
procedure NewNS();
var
x, y, i, ii: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
COLORS: TIntegerArray;
begin
COLORS := [8087871, 12296544, 9338696, 6970934, 10520914, 6178891, 11623524, 9062253, 14189656, 5256233, 7461497, 3169844, 7884087, 8213568, 6378290, 6510898, 8919673, 8996735, 9324676, 8546883, 12557154, 13593459, 7552069, 5261097, 12411497, 8919929, 5975624, 10979158, 612872, 11836253, 7622203, 5456683, 16528616, 5322281, 9009990, 6766121, 1918492, 8153663, 8087871, 6974068, 16528616, 3945247, 756024, 2045032, 8875589, 2099568, 10704002, 12674211, 12493665, 11556168, 10510401, 12427872, 2236966, 11176279, 1624831, 11149974, 14137198, 11162973, 13025298, 875684, 10050622, 1287141, 5160182, 10062160, 16118296];
if inCombat() or FindNorth() or not inSafe() then
exit;
if (chooseOption.isOpen()) then
chooseOption.close();
for i := 0 to high(COLORS) do
begin
writeStatus('Searching for NSES.');
Wait(200 + random(100));
if inCombat() or findNorth() or not inSafe() then
exit;
if (chooseOption.isOpen()) then
chooseOption.close();
findColorsSpiralTolerance(x, y, TPA, COLORS[i], mainScreen.getBounds(), 3, colorSetting(2, 0.25, 0.84));
writeStatus('Searching for NSES.');
ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
if high(ATPA) < 1 or high(ATPA) = 0 then
exit();
if limit > high(ATPA) then
begin
limit := high(ATPA);
end;
for ii := 0 to limit do
begin
Wait(200 + random(100));
if inCombat() or findNorth() or not inSafe() then
exit;
if (chooseOption.isOpen()) then
chooseOption.close();
writeStatus(' We are right clicking on players.');
mouse(middleTPA(ATPA[ii]), MOUSE_RIGHT);
smartImage.clearArea(mainscreen.getBounds());
if (chooseOption.isOpen()) and inSafe() then
begin
wait(RandomRange(100, 200));
if chooseOption.select(['ttack']) then
begin
smartImage.clearArea(mainscreen.getBounds());
writeStatus('We are attempting to attacking a NS.');
inc(nsesAttacked);
Wait(100 + Random(500));
chooseOption.select(['ttack']);
if not prayersOn() and inCombat() and PRAYERS = 1 then
begin
case random(20) of
1..9: togglePrayer();
end;
smallRandommouse();
end;
writeStatus('We are attempting to attack a NS.');
wait(randomRange(1200, 1500));
exit;
end
else
begin
writeStatus('Closing choose option screen.');
chooseOption.close();
end;
end;
end;
end;
end;
procedure mainLoop();
begin
if not isLoggedIn() or lobby.isOpen() then
declarePlayers();
if inLobby() then outlobby();
if (ATTACK) and inSafe() and not inCombat() and not findNorth() then
begin
writeStatus('Searching for player.');
newns();
end;
if (ANTILURE) then
begin
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and inMulti()) then
reLog();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and findWest()) then
reLog();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and findWestt()) then
reLog();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and findEastt()) then
reLog();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and findEast()) then
reLog();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and findTrees()) then
reLog();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and findTreees()) then
reLog();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and not inSafe() and inLobby()) then outLobby();
if ((LOCATION = 'NORMAL') and not inCombat() and not findNorth() and findEeast()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and inMulti()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and findWest()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and findWestt()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and findEastt()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and findEast()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and findTrees()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and findTreees()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and findEeast()) then
reLog();
if ((LOCATION = 'REST') and not inCombat() and not findNorth() and not inSafe() and inLobby()) then
outLobby();
end;
if inSafe() AND INCOMBAT() then
begin
IF NOT ISMELEEON() THEN PRAYMELEE();
if actionbar.getAdrenalinePercent() > 40 then
SendKeys('7', 15 + RandomRange(15, 100), 20 + RandomRange(10, 30));
if actionbar.getAdrenalinePercent() > 65 then
SendKeys('9', 15 + RandomRange(15, 100), 20 + RandomRange(10, 50));
if actionbar.getAdrenalinePercent() > 99 then
SendKeys('8', 15 + RandomRange(15, 100), 20 + RandomRange(10, 30));
end;
if checkExamine() then
closeExamine();
case random(1000) of
1..75:
begin
randomMouseSpeed(3, 10, 20);
writeStatus('Changed mouse speed.');
end;
end;
if (checkVex) then
begin
WriteStatus('Closing clan vex.');
closeVex();
end;
if (checkRed) then
begin
WriteStatus('We are closing redportal warning.');
closeRed();
end;
if ((talked)) and inCombat() then
begin
case random(1100) of
34..94: Talk();
end;
end;
if not inSafe() or inLobby() OR ismeleeOn() then
begin
repeat
// wait(RANDOMRANGE(3600,6000));//change waits
SMALLRANDOMMOUSE();
writeStatus('Searching for free-for-all portal safe.');
findPortal();
outlobby();
closeRed();
closeVex();
PRAYMELEEOFF();
until (findNorth() or inSafe() or checkRed() or not inLobby() OR NOT ISMELEEON() or CheckVex()); // change inoutlobby
end;
begin
if findNorth() then
begin
actions();
end;
end;
randnum := random(55212);
if (randnum < 80) and not inCombat() then
begin
case randnum of
12..20:
begin
sleepAndMoveMouse(1000 + random(2000));
writeLn('Random was 12-20.');
end;
34..42:
begin
pickUpMouse();
writeLn('Random was 34-42.');
end;
51..59:
begin
smallRandomMouse();
writeLn('Random was 51-59.');
end;
71..72:
begin
mouseBox(intToBox(235, 150, 360, 260), MOUSE_LEFT);
writeLn('Random was 71-72.');
end;
end;
end;
drawProgress;
end;
begin
MessageBox('Hello! Please fill out the required information in the boxes that pop up.', 'ClwBot - Made by Reese', 1);
smartShowConsole := FALSE;
smartEnableDrawing := TRUE;
initPlayerForm(); //fix enabled run and inout lobby
runPlayerForm();
if (not playerForm.isScriptReady) then
begin
terminatescript;
end;
setupSRL();
drawProgress();
Treess := DTMFromString('mggAAAHicY2NgYNjMzMCwDYg3AfF2ZggfhC8B5c4D8VkGCBuGTdUFGFxNhBgcjYUY7PX4Gax1+RgstPgZ+IFyyJgdiFmBmBEHhgAAhpUMYw==');
multii := DTMFromString('mQwAAAHicY2ZgYGBhgAA2IGaCslmB+MaVEwxpZZIMl4/ZMogA+TDMiISBAAC/3QWT');
red := DTMFromString('mlwAAAHicY2dgYJjIxMAwDYh7gHgSEM8E4i4miHgRUD4HiCuBuAqIS4C4EIizgPiMoCDDXyCuAOJsIN4CxNehYqxAeVyYEQ+GAgBcJQ17');
lobbyyy := DTMFromString('mrAAAAHic42BgYJjFzMDQBcQzgXgTEG8A4mYgbgXiNUDszMTAEAzEYVDaAYjtgdgDiN2BuKZ3EoOhrQuDnIYeg5KOEUPT1NkMBV0TGSKzSxiSS2oZWIF24MOMBDAMAAA/+xCL');
if not isLoggedIn() or lobby.isOpen() then
declarePlayers();
WORLD := strToInt(playerForm.players[0].settings[0]);
MULTI := StrToBool(playerForm.players[0].settings[1]);
ANTILURE := StrToBool(playerForm.players[0].settings[2]);
ATTACKUSR := StrToBool(playerForm.players[0].settings[3]);
ATTALL := StrToBool(playerForm.players[0].settings[4]);
TALKPPL := StrToBool(playerForm.players[0].settings[5]);
writeStatus('Initiated Ns Bot.');
dotarget();
xpthen := chatbox.getXPBar();
clearDebug();
repeat
smartImage.clearArea(mainscreen.getBounds());
mainloop();
if checkVex() then
begin
WriteStatus('We are closing clan vex.');
closeVex();
end;
if checkRed() then
begin
WriteStatus('Closing warning.');
closeRed();
end;
if (chooseOption.isOpen()) and not inSafe() then
chooseOption.close();
until (false);
FREEDTM(treess);
FREEDTM(multii);
FREEDTM(lobbyyy);
end.