SRL Archive - Discussions and Debates

TomTop / Bly / Main's Script


Clarity

2015-04-05 19:50:42

I figured it would be better to have a separate discussion off the application because, like @3Garrett3, who pointed this out, I'm pretty suspicious. But I don't think we as SRL Members should immediately come off as accusatory to the applicant.

First thing that makes me curious is the incredibly similar formatting. If these two scripts were NEVER public, who does this? It's clearly a rewritten script by the same person, or a friend.


Another weird thing I've noticed is that Bly is suddenly active on the forums again since the posting of this app.

Relevant:
On 4/5/15, at 8:11 PM, The Killer wrote:
> https://villavu.com/forum/member.php?u=149320

On 4/5/15, at 8:11 PM, The Killer wrote:
> TomTop's only friend on villavu is bly


Relevant rule:
Multiple Accounts:
Users are permitted to have one account and one account only. Any additional accounts made will be immediately banned. Depending on the circumstances, further action may be taken as decided at the staff’s discretion.


So I think we can reliably conclude that this is an alt of Bly (or a "friend"). Does this disqualify the app?

I know Bly was suspended for plagiarism in his previous app, but did that prevent him permanently from re-applying by our rules? Why he would do this doesn't make any sense to me otherwise, unless he thinks bad rep from the last app would hurt his chances.

TomTop's Clan Wars Script

{==============================================================================\
| F2P Clanwars NS Bot |
| By: RDCA / Albert |
| Version: 1.47 |
| Last update: 3/4/2015 |
\_____________________________________________________________________________}

{==============================================================================\
| Setup |
|==============================================================================|
| * Edit who to attack line 70 |
| |
| * Edit Freedom and Anticipation on lines 52 and 53 |
| Tip: Have revolution enabled, have anticiption |
| on slot 5 and keybind number 5, and freedom |
| on slot 9 and keybind number 9. |
| |
| * Move your player info in the top left corner |
| Picture: http://prntscr.com/69alm3 |
| |
| * Make sure your 100% spec and 50% are the same slot and |
number |
| Example: Slot 8, number 8, Slot 7, number 7 |
| |
| * OS preset, chatbox as small as possible, ability bar on |
| top, and both interface and ability bar locked |
\_____________________________________________________________________________}

{==============================================================================\
| Features |
|==============================================================================|
| * Portal Detection * Attack people |
| * Progress report * Fix glitch |
| * Talk to taunt * Fix stun/snare |
| * Human error * Quick prayers |
| * Status bar * Antiban |
| * Fail safes * Antilure |
| * XP Tracker * 100% spec |
| * 100% color * 50% spec |
| * RS Update checker * World selection |
| * Closes clan vex * Weapon switching |
| * Re-wield arrows * and much more! |
\_____________________________________________________________________________}

program FFACW;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I srl-6/lib/misc/srlplayerform.simba}

var

ANTISLOT: integer = 5; { This is the slot for anticipation }
FREESLOT: integer = 9; { This is the slot for freedom }
ACCOUNTNAME: string = 'OQZ'; { Put your account name here }
MELEE_BAR: integer = 1; { Ability bar with melee abilities }
RANGE_BAR: integer = 3; { Ability bar with range abilities }

PRAYERS, MULTI, ATTACKUSR, ANTIB, SWITCHWEAPONS, HUMANERROR, ANTILURE, ATTALL, TALKPPL, FIXGLITCH, REST: boolean;
RUNEDTM, SPEC, MINISPEC, scriptPaintBMP, randnum, screenCount, GP, Green, bna: integer;
timesChanged, userDeaths, attacks, lures, relogs, msgsent, xpbefore, xpnow, xpgained, detectedGlitch,AF, stunned, THEWORLD, rested, randAngle, talked: integer = 0;
ATTACK_USER: TStringArray;

{---------------------------------------------------}
{--- doTarget - Prepares the script with targets ---}
{---------------------------------------------------}
procedure doTarget();
begin
if (not ATTALL) then
begin
ATTACK_USER := ['ttack Jollyjake2',
'ttack Cell 18',
'ttack Paigonz',
'ttack Cetas',
'ttack Hawkwork',
'ttack Shiva Hari',
'ttack Kaneo2007',
'ttack LOX',
'ttack Nagnoc',
'ttack Alien cook',
'ttack Hawkwork',
'ttack Shook Ones',
'ttack We Superior',
'ttack DTF Rohan',
'ttack DTF'];
end else
begin
ATTACK_USER := ['ttack '];
end;
end;

{---------------------------------------------------}
{------Clear Screen - Clears the debug screen-------}
{---------------------------------------------------}
procedure ClearScreenDebug;
begin
smartImage.clearArea(intToBox(0, 0, 574, 365));
smartImage.clearArea(intToBox(576, 0, 698, 598));
smartImage.clearArea(intToBox(1, 387, 575, 458));
Cleardebug;
end;

{---------------------------------------------------}
{---------Draw Debug - Status line for user---------}
{---------------------------------------------------}
procedure WSB(status: string);
begin
ClearScreenDebug();
with (smartImage) do
begin
clearArea(intToBox(0, 367, 574, 385));
drawBox(0, 367, 574, 385, true, clAqua);
drawBox(0, 367, 65, 385, true, clTeal);
drawText('Status: ', point(14, 368), UpCharsEx, false, clAqua);
drawText( + status, point(79, 368), UpCharsEx, false, clTeal);
end;
end;

{---------------------------------------------------}
{--------- clickArrow - Wields rune arrows ---------}
{---------------------------------------------------}
procedure wieldArrows();
var
X,Y:integer;
begin
RUNEDTM := DTMFromString('mlwAAAHicY2dgYOBnARJALATEPEAsC8RiQMwGxN2MDAzTgHgGEM8C4mYgboKKMTAwMcQL8zL0yIqAaVMHVwY9c2swGwTkkLAkFIPYjHgwFAAAJDUIxg==');
if (tabBackpack.open()) then
begin
WSB('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);
WSB('Wielded rune arrows.');
wait(randomrange(200,1400));
smallRandomMouse();
end;
end;
FreeDTM(RUNEDTM);
end;
end;

{---------------------------------------------------}
{------- changeWeapons - Used for switching --------}
{---------------------------------------------------}
procedure changeWeapons();
var
CURRENT_BAR: integer;
begin
CURRENT_BAR := actionBar.getCurrentBar();

if (CURRENT_BAR = MELEE_BAR) then
begin
WSB('We are fighting with Melee.');
wait(randomRange(200,300));
WSB('Switching to Range.');
KeyDown(VK_B);
wait(RandomRange(100, 200));
KeyUp(VK_B);
wait(randomRange(1000,1500));
KeyDown(VK_N);
wait(RandomRange(100, 200));
KeyUp(VK_N);
wait(randomRange(1000,1500));
KeyDown(VK_M);
wait(RandomRange(100, 200));
KeyUp(VK_M);
wait(randomRange(1000,1500));
KeyDown(VK_3);
wait(RandomRange(100, 200));
KeyUp(VK_3);
wait(randomRange(500,600));
WSB('We are now fighting with Range.');
end else
begin
if (CURRENT_BAR = RANGE_BAR) then
begin
WSB('We are fighting with Range.');
wait(randomRange(200,300));
WSB('Switching to Melee.');
KeyDown(VK_B);
wait(RandomRange(100, 200));
KeyUp(VK_B);
wait(randomRange(1000,1500));
KeyDown(VK_N);
wait(RandomRange(100, 200));
KeyUp(VK_N);
wait(randomRange(1000,1500));
KeyDown(VK_M);
wait(RandomRange(100, 200));
KeyUp(VK_M);
wait(randomRange(1000,1500));
KeyDown(VK_1);
wait(RandomRange(100, 200));
KeyUp(VK_1);
wait(randomRange(500,600));
WSB('We are now fighting with Melee.');
end;
end;

end;

{---------------------------------------------------}
{------Draw Boot Status -- Used when relogging------}
{---------------------------------------------------}
procedure BOOT(status: string);
begin
with (smartImage) do
begin
clearArea(intToBox(0, 0, 574, 16));
drawBox(0, 0, 574, 16, true, clRed);
drawBox(0, 0, 65, 16, true, clMaroon);
drawText('Boot: ', point(11, 1), UpCharsEx, false, clRed);
drawText( + status, point(80, 1), UpCharsEx, false, clMaroon);
end;
end;

{---------------------------------------------------}
{--------Check if the Poll screen is open-----------}
{---------------------------------------------------}
function checkPoll(): boolean;
const
POLL_COLOR = 4245242;
begin
result := getColor(424, 124) = POLL_COLOR;
end;

{--------------------------------------------------}
{------Close Poll - Used to remove poll screen-----}
{--------------------------------------------------}
procedure closePoll();
var
box: TBox;
begin
WSB('Closing poll.');
box := intToBox(364, 123, 426, 132);
mouseBox(box, MOUSE_LEFT);
wait(randomRange(200,500));
smallRandommouse();
end;

{---------------------------------------------------}
{------Check if red portal warning is open----------}
{---------------------------------------------------}
function checkWarning(): boolean;
const
WARNING_COLOR = 1909802;
begin
result := getColor(480, 92) = WARNING_COLOR;
end;

{--------------------------------------------------}
{------Close Poll - Used to remove poll screen-----}
{--------------------------------------------------}
procedure closeWarning();
var
box: TBox;
begin
WSB('Closing red portal warning.');
case random(100) of
0..49: begin
box := intToBox(474, 86, 484, 94);
mouseBox(box, MOUSE_LEFT);
wait(randomRange(200,500));
end;
50..100: begin
KeyDown(VK_ESCAPE);
end;
end;
smallRandommouse();
minimap.clickCompass();
wait(randomRange(1000,2000));
mainscreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(500,2000));
end;

{---------------------------------------------------}
{----------Check if Lured West - Antilure-----------}
{---------------------------------------------------}
function findWest(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then exit();

if result := findColorTolerance(x, y, 929083, intToBox(706, 125, 669, 83), 5) then
begin
wait(250 + random(20));
WSB('Have we been lured west? ' + toStr(Result));
end;
end;

{---------------------------------------------------}
{----------Check if Lured East - Antilure-----------}
{---------------------------------------------------}
function findEast(): boolean;
var
x, y: integer;
begin
if (not ANTILURE) then exit();

if result := findColorTolerance(x, y, 993848, intToBox(706, 125, 669, 83), 5) then
begin
wait(250 + random(20));
WSB('Have we been lured east? ' + toStr(Result));
end;
end;

{---------------------------------------------------}
{---------Check for 'Items safe on death'-----------}
{---------------------------------------------------}
function inSafe(): boolean;
const
SAFE_COLOR = 2070783;
begin
result := getColor(538, 219) = SAFE_COLOR;
end;

{--------------------------------------------------}
{-----doScreen - Sets screen up for procedures-----}
{--------------------------------------------------}
procedure doScreen();
begin
if ((minimap.getAngleDegrees() > 105) or (minimap.getAngleDegrees() < 75)) then
begin
writeLn('Camera angle is: ' + toStr(minimap.getAngleDegrees()) + ' - Changing to EAST');
wait(randomRange(200,600));
minimap.setAngle(90);
wait(randomRange(400,800));
writeLn('Camera angle is: ' + toStr(minimap.getAngleDegrees()) + ' - change completed.');
end;
end;

{---------------------------------------------------}
{---------Declare Player - Log the user in----------}
{---------------------------------------------------}
procedure declarePlayers();
var
i: integer;
begin
wait(randomRange(1000,2000));
clearScreenDebug;

players.setup(playerform.players);
currentPlayer := 0;

players[currentPlayer].world := strToInt(playerForm.players[currentPlayer].settings[0]);
players[currentPlayer].login();

wait(randomRange(1000,2000));
mainscreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(1000,2000));
doScreen();
wait(randomRange(1000,2000));

exitTreasure();

if checkPoll() then
closePoll();

mainscreen.setZoom(true);
end;

procedure initPlayerForm();
begin
with playerForm do
begin
name := 'RDCANS - Player form';

editBoxLabels := ['World', '100% Spec Key', '50% Spec Key'];

editBoxDefaults := ['3', '8', '7'];

checkBoxLabels := [
'Quick prayers',
'Walk to multi',
'Antiban',
'Antilure',
'Attack people',
'Attack everyone',
'Switch Weapons',
'Human Error',
'Talk',
'Fix glitch',
'Rest'];

checkBoxDefaults := [
'True',
'False',
'True',
'True',
'False',
'False',
'False',
'True',
'False',
'True',
'True'];

end;
end;

{---------------------------------------------------}
{---------Check for 'Walk north to fight'-----------}
{---------------------------------------------------}
function FindNorth(): boolean;
const
INTERFACE_COLOR = 3635889;
var
TPA: TPointArray;
searchArea := intToBox(138, 5, 437, 52);
begin
result := FindColors(TPA, INTERFACE_COLOR, searchArea);
end;

{---------------------------------------------------}
{-------Check if a clan vex has been opened---------}
{---------------------------------------------------}
function checkVex(): boolean;
const
VEX_COLOR = 1182724;
begin
result := getColor(262, 185) = VEX_COLOR;
end;

{--------------------------------------------------}
{----Close vex - Used to remove clan vex screen----}
{--------------------------------------------------}
procedure closeVex();
begin
WSB('Closing clan vex.');
KeyDown(VK_ESCAPE);
smallRandommouse();
end;

{---------------------------------------------------}
{-------Check if the examine screen is open---------}
{---------------------------------------------------}
function checkExamine(): boolean;
const
EXAMINE_COLOR = 4217053;
begin
result := getColor(218, 19) = EXAMINE_COLOR;
end;

{--------------------------------------------------}
{---Close examine Used to remove examine screen---}
{--------------------------------------------------}
procedure closeExamine();
var
box: TBox;
begin
WSB('Closing examine player.');
box := intToBox(211, 18, 220, 24);
mouseBox(box, MOUSE_LEFT);
wait(randomRange(200,500));
smallRandommouse();
end;

{---------------------------------------------------}
{----------Check for multi crosses to log-----------}
{---------------------------------------------------}
function inMulti(): boolean;
const
MULTI_COLOR = 343638;
begin
result := getColor(258, 29) = MULTI_COLOR;
end;

{--------------------------------------------------}
{--------Check if Quick Prayers are enabled--------}
{--------------------------------------------------}
function prayersOn(): boolean;
const
ICON_COLOR = 9060948;
var
TPA: TPointArray;
searchArea := intToBox(299, 395, 313, 414);
begin
result := FindColors(TPA, ICON_COLOR, searchArea);
end;

{--------------------------------------------------}
{------Toggle Prayers - Used for NSing people------}
{--------------------------------------------------}
procedure togglePrayer();
begin
if not (PRAYERS) then exit;

if actionBar.getPrayerPercent() = 0 then exit;

WSB('Toggling prayers.');
actionBar.mouseIcon(AB_BAR_PRAYER, MOUSE_LEFT);
wait(randomRange(200, 600));
sleepAndMoveMouse(200 + random(600));
end;

{-------------------------------------------------}
{---Check if we're in combat (getting attacked)---}
{-------------------------------------------------}
function inCombat(): boolean;
const
KEY_COLOR = 1675987;
var
TPA: TPointArray;
searchArea := intToBox(0, 0, 105, 25);
begin
result := FindColors(TPA, KEY_COLOR, searchArea);
end;

{--------------------------------------------------}
{---------- Talk - Used as an antiban -------------}
{--------------------------------------------------}
procedure Talk();
var
i: integer;
MESSAGES: TStringArray := ['Wb Roofl',
'Rr0flrf wb',
'Nicy try lool',
'Why u avoiding rooofl',
'rf0flro',
'u mad? r0flrf0',
'Stop avoiding? r0flro',
'Dont log pls loool',
'dont nap idiot r0flr0frl'
'Gl r0flr i dont off l00l',
'Still permd r00fl',
'Nice nap r00ofl',
'R0flrfl still permd kid',
'l0l dont avoid king ' + ACCOUNTNAME,
'Wyd l0l rofl',
'dumb paki l0l',
'idiot indian kid',
'Think im off u? l00l',
'r0flr0fl dont rage',
'l000l dont get mad',
'no offs r0fl',
'gl in ffa kid l000l',
'ur acc is crap 0flr0flr',
'wow ur weak l0000l',
'ur good xp r0frofl',
'wb slave r0flr0l'];
RAND: integer;
MESSAGE: string;
begin

if (talked = 1) then exit;

RAND := randomRange(0, high(MESSAGES));
MESSAGE := MESSAGES[RAND];
inc(msgsent);
talked := 1;
TypeByte(VK_RETURN);
wait(randomRange(200,500));

for i:=1 to Length(MESSAGE) do
SendKeys(MESSAGE[i], 18 + Random(17), 22 + Random(12));

wait(randomRange(200,500));
TypeByte(VK_RETURN);
end;

{--------------------------------------------------}
{------ Talk - Used as an antilure antiban --------}
{--------------------------------------------------}
procedure talkAntilure();
var
i: integer;
MESSAGES: TStringArray := ['luring me wont make me off u r0flr',
'lures arent offs lmao rip',
'r00fl trying to lure king ' + ACCOUNTNAME,
'try harder next time l0l',
'maybe next time rflrf0rl',
'dumb paki luring king ' + ACCOUNTNAME,
'idiot indian luring god ' + ACCOUNTNAME,
'yea dont think so rofl kid'];
RAND: integer;
MESSAGE: string;
begin

RAND := randomRange(0, high(MESSAGES));
MESSAGE := MESSAGES[RAND];
TypeByte(VK_RETURN);
wait(randomRange(200,500));

for i:=1 to Length(MESSAGE) do
SendKeys(MESSAGE[i], 18 + Random(17), 22 + Random(12));

wait(randomRange(200,500));
TypeByte(VK_RETURN);
end;

{-------------------------------------------------}
{----- doEmote - Used for relogging antiban ------}
{-------------------------------------------------}
procedure doEmote();
begin
case random(100) of
0..50: typeByte(VK_Q);
51..100: typeByte(VK_Z);
end;
end;

{-------------------------------------------------}
{---- Rest - Used as a random antiban feature ----}
{-------------------------------------------------}
procedure doRest();
var
box: TBox;
begin
if ((findNorth) or (not inSafe)) then exit();

box := intToBox(765,25,780,40);
mouseBox(box, Mouse_RIGHT);
wait(randomrange(1300,1900));
chooseOption.select(['est']);
wait(250 + random(20));
rested := 1;
smallRandommouse();
end;

{-------------------------------------------------}
{---- Re Log - Used for if we have been lured ----}
{-------------------------------------------------}
procedure reLog();
begin
BOOT('Attempting to relog.');
if inCombat() then wait(randomRange(10000,20000));
if ((findNorth) OR (not inSafe)) then exit();

wait(randomRange(1000,2000));
{if (ANTIB) then
begin
if (TALKPPL) then
begin
case random(10) of
0..2: talkAntilure();
3..8: doEmote();
9..10: doRest();
end;
end else
begin
case random(10) of
0..7: doEmote();
8..10: doRest();
end;
end;
wait(randomRange(2000,4000));
end;}

inc(relogs);
players[currentPlayer].exitToLobby();
wait(randomRange(2000,3000));
declarePlayers();
end;

{-------------------------------------------------}
{-Check Stuck--Checks if we are stunned or snared-}
{-------------------------------------------------}
function checkStuck(): boolean;
var
KEYWORDS: TStringArray;
begin
KEYWORDS := ['You''ve been prevented from moving.',
'You can''t reach that.',
'You can''t do that while stunned.'];
result := chatbox.findText(KEYWORDS);
end;

{-------------------------------------------------}
{----- Check Fight - Check if we're glitched -----}
{-------------------------------------------------}
procedure checkStunned();
begin
if (actionBar.getAbilityCooldown(FREESLOT) = 100) then
begin
if checkStuck then
begin
if (HUMANERROR) then
begin
case random(30) of
1..28: begin
WSB('We detected that you''re stunned, fixing!');
inc(stunned);
case Random(50) of
0..25:
begin
ActionBar.clickSlot(FREESLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(inttostr(FREESLOT), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
end;
end;
end else
begin
WSB('We detected that you''re stunned, fixing!');
inc(stunned);
case Random(50) of
0..25:
begin
ActionBar.clickSlot(FREESLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(inttostr(FREESLOT), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
end;
wait(randomRange(100,198));
smallrandommouse();
end else
if not checkStuck then
begin
WSB('We didn''t detect that you were stunned.');
end;
end;
end;

{-------------------------------------------------}
{--Check Our Fight -- Search chatbox for message--}
{-------------------------------------------------}
function checkOurFight(): boolean;
var
KEYWORDS: TStringArray;
begin
KEYWORDS := ['You''re already fighting someone else!'];
result := chatbox.findText(KEYWORDS);
end;

{-------------------------------------------------}
{----- Check Fight - Check if we're glitched -----}
{-------------------------------------------------}
procedure checkFight();
begin
if checkOurFight then
begin
WSB('We detected that you''re glitched, fixing!');
inc(detectedGlitch);
case Random(50) of
0..25:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(FREESLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(inttostr(FREESLOT), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
26..50:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(ANTISLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(inttostr(ANTISLOT), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
end;
end else
if not checkOurFight then
begin
WSB('We didn''t detect that you were glitched.');
end;
end;

{--------------------------------------------------}
{---------WalkTo - Walks us to location------------}
{--------------------------------------------------}
procedure walkTo(loc: string);
var
north, multi, second, third: Tbox;
begin

doScreen();

if not minimap.isRunEnabled() then
minimap.toggleRun(true);

if (PRAYERS) then
begin
if (HUMANERROR) then
begin
case random(30) of
1..26: if (not prayersOn()) then TogglePrayer();
end;
end else
begin
if (not prayersOn()) then TogglePrayer();
end;
end;

case lowerCase(loc) of
'hills':
begin
WSB('Walking to hills.');
case random(20) of
1..9: begin
multi := intToBox(785, 80, 785, 105);
mouseBox(multi, MOUSE_LEFT);
wait(randomRange(8000, 8500));
second := intToBox(700, 100, 708 , 115);
mouseBox(second, MOUSE_LEFT);
wait(randomRange(2000, 2500));
end;
10..20: begin
multi := intToBox(712, 96, 732, 116);
mouseBox(multi, MOUSE_LEFT);
wait(randomRange(2500,3000));
second := intToBox(742, 87, 750, 108);
mouseBox(second, MOUSE_LEFT);
wait(randomRange(4000,5000));
third := intToBox(715, 105, 720, 122);
mouseBox(third, MOUSE_LEFT);
wait(randomRange(1000,2000));
end;
end;
end;

'normal':
begin
WSB('Walking north.');
case Random(175) of
1..70:
begin
north := intToBox(340, 120, 480, 350);
mouseBox(north, MOUSE_MOVE);
wait(randomRange(200,500));
fastClick(MOUSE_RIGHT);
chooseOption.select(['alk here']);
end;
71..120:
begin
north := intToBox(695, 88, 716, 124);
mouseBox(north, MOUSE_LEFT);
end;
121..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(2500, 3500));

if (REST) AND (rested = 0) then
begin
case random(5) of
1..2: begin
if (minimap.isResting()) then exit;
doRest();
rested := 1;
end;
end;
end;

if ((random(500) < 20) AND (randAngle = 0)) then
begin
WSB('Changing camera angle');
minimap.setAngle(randomRange(1 + random(5),350 + random(7)));
randAngle := 1;
end;

wait(randomRange(1000,2000));

end;
end;

if (minimap.isFlagPresent(Random(4000, 5000))) then
Minimap.waitPlayerMoving();

end;

{-------------------------------------------------}
{--- Antiban -- Used just before walking north ---}
{-------------------------------------------------}
procedure Antiban();
begin
bna := 1;
WSB('Running antiban procedure');
MouseSpeed := RandomRange(30, 60);
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(5) of
0: hoverSkill(SKILL_ATTACK);
1: hoverSkill(SKILL_DEFENCE);
2: hoverSkill(SKILL_STRENGTH);
3: hoverRandomSkill();
4: hoverOnlineFriend();
end;
wait(randomRange(2000,7500));
end;
251..310: begin
sleepAndMoveMouse(2150 + random(2000));
wait(randomRange(500,1250));
end;
end;

if (MULTI) then
begin
WalkTo('HILLS');
end else
begin
WalkTo('NORMAL');
end;

end;

{-------------------------------------------------}
{---Antiban / Walk into fighting area procedure---}
{-------------------------------------------------}
procedure actions();
begin
if ((ANTIB) AND (bna=0)) then
begin
case random(500) of
1..60: Antiban();
61..500:begin
if (MULTI) then
begin
WalkTo('HILLS');
end else
begin
WalkTo('NORMAL');
end;
end;
end;
end else
begin
if (MULTI) then
begin
WalkTo('HILLS');
end else
begin
WalkTo('NORMAL');
end;
end;
end;

{---------------------------------------------------}
{------Click Portal - Clicks the white portal-------}
{---------------------------------------------------}
function clickPortal: Boolean;
var
tFrame, tFrameEdge, tPortal, tPortalEdge, tEdge: TPointArray;
aEdge: T2DPointArray;
i, safeCheck, AE: Integer;
p: TPoint;
b: TBox;
begin
Result := False;

doScreen();

if (ANTIB) then
begin
case random(1000) of
1..50: begin
WSB('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 checkWarning() then closeWarning();

if not minimap.isRunEnabled() then
minimap.toggleRun(true);

case random(100) of
25..60: wieldArrows();
end;

if ((userDeaths >= randomRange(20,30)) AND (SWITCHWEAPONS)) then
begin
changeWeapons;
inc(timesChanged);
end;

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());
WSB('We are searching for safe portal');
if (getPixelShift(b, 100) > 200) then
begin
MouseSpeed := RandomRange(40, 70);
Mouse(b.getRandomPoint());
if (isMouseOverText(['(safe)'])) then
begin
inc(userDeaths);
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;
ClearScreenDebug;
talked := 0;
bna := 0;

case random(5) of
1: rested := 0;
end;

case random(3) of
1: randAngle := 0;
end;

wait(randomrange(500,1000));
if (minimap.isFlagPresent(Random(3000, 4000))) then
Minimap.waitPlayerMoving();
Exit(True);
end;
if checkWarning() then closeWarning();
Exit(True);
end;
end;
end;

{---------------------------------------------------}
{----------------- Debugs TPA'S --------------------}
{---------------------------------------------------}
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;

{---------------------------------------------------}
{-----Determines if we're within the circle---------}
{---------------------------------------------------}
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;

{---------------------------------------------------}
{------ Determines if we're within the box----------}
{---------------------------------------------------}
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;

{---------------------------------------------------}
{--------- Checks if the TPA is in bound------------}
{---------------------------------------------------}
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;

{---------------------------------------------------}
{-------Get Target -- Find one of our slaves--------}
{---------------------------------------------------}
function getTarget: Boolean;
var
FPCol, FPTol, TotalTries, ATT, AE: Integer;
TP: Tpoint;
I: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
ATTACK: TStringArray;
Pt, FT, AEt: TTimeMarker;
p: TPoint;
b: TBox;
begin
Result := False;

if (PRAYERS) then
begin
FPCol := 11251383;
FPTol := 44;
end
else
begin
FPCol := 8083511;
FPTol := 50;
end;

if not isLoggedIn() or lobby.isOpen() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are not logged in');
Exit(True);
end;

if inCombat() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are already in combat, can''t engage in another fight');
Exit(True);
end;
if not inSafe then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are in the lobby, can''t engage in combat here');
Exit(True);
end;
if findNorth() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are in the safe zone, can''t engage in combat here');
Exit(True);
end;
if (FIXGLITCH) then
begin
checkFight();
end;
if inSafe() then
if (minimap.isFlagPresent(Random(2000, 4000))) then
Minimap.waitPlayerMoving();
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
Inc(ATT);
Inc(TotalTries);
WSB('Attempted to find target ' + IntToStr(ATT) + ' times');
if FindColorsSpiralTolerance(TP.X, TP.Y, TPA, FPCol, mainscreen.x1 + 10, mainscreen.y1 + 10, mainscreen.x2 - 10, mainscreen.y2 - 10, FPTol) then
begin
ATPA := TPAToATPAEx(TPA, 45, 45);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
DATPAB(ATPA);

for I := 0 to Random(High(ATPA)) do
begin
if not isLoggedIn() or lobby.isOpen() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are not logged in');
Exit(True);
end;
if inCombat() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are already in combat, can''t engage in another fight');
Exit(True);
end;
if not inSafe() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are in the lobby.');
Exit(True);
end;
if findNorth() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
WSB('We are in safe zone.');
Exit(True);
end;
MouseSpeed := RandomRange(30, 60);
if InBound(MiddleTPA(ATPA[I])) then
begin
p := MiddleTPA(ATPA[I]);
b := IntToBox(p.x - 12, p.y - 10, p.x + 12, p.y + 10);
b.setLimit(Mainscreen.getBounds());
Mouse(b.getRandomPoint());
if (isMouseOverText(ATTACK_USER)) then
begin
fastClick(MOUSE_LEFT);
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
ATT := 0;
Inc(attacks);
AF := 0;
WSB('Found target successfully in (' + ToStr(ATT) + ' tries)');
Exit(True);
end;
if not (isMouseOverText(ATTACK_USER)) then
begin
FastClick(MOUSE_RIGHT);
if not chooseOption.optionsExist(ATTACK_USER) then
begin
chooseOption.close();
WSB('Target has not been found!');
end;
if chooseOption.optionsExist(ATTACK_USER) then
begin
if chooseOption.optionsExist(['ttack']) then
begin
chooseOption.select(ATTACK_USER, MOUSE_LEFT);
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
ATT := 0;
AF := 0;
Inc(attacks);
WSB('Found target successfully');
Exit(True);
end;
end;
end;
end;
end;
end;
end;
end;

{-------------------------------------------------}
{----Time Running - Returns the script runtime----}
{-------------------------------------------------}
function timeRunning(TheType: Integer = TIME_FORMAL_LONG): string;
override;
begin
Result := msToTime(GetTimeRunning(), TIME_SHORT);
end;

{-------------------------------------------------}
{------do Spec - Does the 100% special attack-----}
{-------------------------------------------------}
procedure doSpec();
begin
if not inCombat then exit;

WSB('Using 100% spec.');
if (HUMANERROR) then
begin
case random(30) of
1..24: begin
case Random(50) of
0..19:
begin
ActionBar.clickSlot(SPEC, MOUSE_MOVE);
Fastclick(MOUSE_LEFT);
wait(randomRange(100,500));
smallRandomMouse();
end;
20..50:
begin
sendKeys(inttostr(SPEC), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
end;
end;
end else
begin
case Random(50) of
0..19:
begin
ActionBar.clickSlot(SPEC, MOUSE_MOVE);
Fastclick(MOUSE_LEFT);
wait(randomRange(100,500));
smallRandomMouse();
end;
20..50:
begin
sendKeys(inttostr(SPEC), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
end;
end;

{-------------------------------------------------}
{------doMiniSpec - Does the 50% special attk-----}
{-------------------------------------------------}
procedure doMiniSpec();
begin
if not inCombat then exit;

WSB('Using 50% spec.');
if (HUMANERROR) then
begin
case random(30) of
1..24: begin
case Random(50) of
0..19:
begin
ActionBar.clickSlot(MINISPEC, MOUSE_MOVE);
Fastclick(MOUSE_LEFT);
wait(randomRange(100,500));
smallRandomMouse();
end;
20..50:
begin
sendKeys(inttostr(MINISPEC), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
end;
end;
end else
begin
case Random(50) of
0..19:
begin
ActionBar.clickSlot(MINISPEC, MOUSE_MOVE);
Fastclick(MOUSE_LEFT);
wait(randomRange(100,500));
smallRandomMouse();
end;
20..50:
begin
sendKeys(inttostr(MINISPEC), 15+RandomRange(15,100), 20+RandomRange(10,30));
end;
end;
end;
end;

{-------------------------------------------------}
{----Count XP - Counts XP gained this session-----}
{-------------------------------------------------}
procedure countXP();
begin
xpnow := chatbox.getXPBar();
xpgained := (xpnow - xpbefore);
end;

{-------------------------------------------------}
{-----Progress Report - Draws progress report-----}
{-------------------------------------------------}
procedure progressReport();
begin
countXP();
with (smartImage) do
begin
drawBitmap(scriptPaintBMP, Point(1, 464));
drawText(ToStr(timeRunning), Point(93, 492), 'UpChars', true, 13667100);
drawText(ToStr(relogs), Point(81, 542), 'UpChars', true, 13667100);
drawText(ToStr(msgsent), Point(135, 562), 'UpChars', true, 13667100);
drawText(ToStr(stunned), Point(327, 543), 'UpChars', true, 13667100);
drawText(ToStr(detectedGlitch), Point(344, 562), 'UpChars', true, 13667100);
drawText(ToStr(xpgained), Point(313, 493), 'UpChars', true, 13667100);
end;
end;

{-------------------------------------------------}
{------- Main Loop - This is the main loop -------}
{-------------------------------------------------}
procedure mainLoop();
begin
if not isLoggedIn() or lobby.isOpen() then
declarePlayers();

if (checkVex) then
begin
WSB('Closing clan vex.');
closeVex();
end;

if (ATTACKUSR) then
begin
WSB('Searching for player.');
getTarget();
ClearScreenDebug;
end;

if (checkVex) then
begin
WSB('Closing clan vex.');
closeVex();
end;

if ((actionbar.getAdrenalinePercent() > 49) AND (actionbar.getAdrenalinePercent() < 80)) then
begin
doMiniSpec();
end;

if actionbar.getAdrenalinePercent() > 99 then
begin
doSpec();
end;

if (ANTILURE) and not inCombat() and inSafe() and not findNorth() then
begin
if (MULTI) then
begin
if findWest() or findEast() then relog;
end;

if (not MULTI) then
begin
if inMulti() OR findWest() or findEast() then relog;
end;
end;

if (inSafe) and not (findNorth) and (inCombat) then
begin
checkStunned();
end;

if (ANTIB) then
begin
case random(15) of
1: smallRandomMouse();
end;
end;

if (TALKPPL) and inCombat() then
begin
case random(1100) of
42..93: Talk();
end;
end;

if checkExamine() then
closeExamine();

if inCombat then
begin
WSB('We are in combat');
end;

if not inCombat and insafe then
begin
WSB('Running main loop');
end;

if not inSafe() then
begin
clickPortal();
end else
begin
if findNorth() then
begin
WSB('We are in safe zone.');
actions();
end;
end;
randnum := random(2000);
if ((randnum < 53) AND not (ATTACKUSR) AND not inCombat() AND (ANTIB)) then
begin
WSB('Running mini antiban');
case randnum of
1..12: begin
sleepAndMoveMouse(1000 + random(2000));
end;
13..22: begin
pickUpMouse();
end;
23..48: begin
smallRandomMouse();
end;
49..50: begin
mouseBox(intToBox(235, 150, 360, 260), MOUSE_LEFT);
end;
51..52: begin
MouseSpeed := RandomRange(30, 60);
end;
end;
end;

case random(150) of
1..70: wait(randomRange(200,2000));
81..140: wait(randomRange(500,5000));
end;

progressReport();

end;

begin
smartShowConsole := FALSE;
smartEnableDrawing := TRUE;

initPlayerForm();
runPlayerForm();

if (not playerForm.isScriptReady) then
begin
terminatescript;
end;

setupSRL();

if not isLoggedIn() or lobby.isOpen() then
declarePlayers();

scriptPaintBMP := loadBitmap('pattern.png');

xpbefore := chatbox.getXPBar();
progressReport();
doTarget();

THEWORLD := strToInt(playerForm.players[0].settings[0]);
SPEC := strToInt(playerForm.players[0].settings[1]);
MINISPEC := strToInt(playerForm.players[0].settings[2]);
PRAYERS := StrToBool(playerForm.players[0].settings[3]);
MULTI := StrToBool(playerForm.players[0].settings[4]);
ANTIB := StrToBool(playerForm.players[0].settings[5]);
ANTILURE := StrToBool(playerForm.players[0].settings[6]);
ATTACKUSR := StrToBool(playerForm.players[0].settings[7]);
ATTALL := StrToBool(playerForm.players[0].settings[8]);
SWITCHWEAPONS := StrToBool(playerForm.players[0].settings[9]);
HUMANERROR := StrToBool(playerForm.players[0].settings[10]);
TALKPPL := StrToBool(playerForm.players[0].settings[11]);
FIXGLITCH := StrToBool(playerForm.players[0].settings[12]);
REST := StrToBool(playerForm.players[0].settings[13]);

WSB('Initiated script.');

wait(randomRange(1000,2000));
mainscreen.setAngle(MS_ANGLE_HIGH);
wait(randomRange(1000,2000));
doScreen();
wait(randomRange(1000,2000));

clearDebug();
repeat
mainloop();
if (chooseOption.isOpen()) then
chooseOption.close();
until (false);

end.

Bly's Clan Wars Script

{==============================================================================\
| F2P Clanwars NS BOT Version ID: 35 |
| By: DMC |
| Last updated 10/17/2014 04:35PM MNT |
|==============================================================================|
| |
| Written By: Da Move Cat/Blytz/Bu11et/Sean |
| Description: Attacks desired targets in clan wars. |
| Contact Info: Seansproxiedskype |
| Credits: Clarity, Main, BMWxi. |
| - This was my first script and I've been working and adding onto it the past |
| 3-4 months. |
\_____________________________________________________________________________}

{==============================================================================\
|*******************************SCRIPT SETUP***********************************|
|~~~~~~~~~~(MAKE SURE YOU SET UP YOUR ACCOUNT ACCORDING TO THE BELOW~~~~~~~~~~~|
|******************************************************************************|
|==============================================================================|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ABILILTY BAR SETUP~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|==============================================================================|
| |
| 1. Put your Melee abilities in Action Bar 1 |
| 2. Put your Range abilities in Action Bar 2 |
| 3. Check lines 70-80 for keybind setup |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| PLEASE KEEP YOUR RUNE 2H SWORD / MAGIC SHORT BOW IN SLOT 1 IN YOUR INVENTORY |
| (They need to be in slot 1 if you have weapon switching enabled) |
| (Also works with shieldbows and any 2h sword, recommended R2H MSB) |
| |
|==============================================================================|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~SCREEN SETUP~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|==============================================================================|
| Just make your screen like : http://puu.sh/c7juE/28d9bbb6e3.png |
|==============================================================================|
| Edit your targets at line 79 in format 'ttack USERNAME', |
|______________________________________________________________________________}


{==============================================================================\
| Features |
| What is Bu11et's SMART NS Bot capable of? |
|==============================================================================|
| * Anti-lure (West, East, Multi) * Fast portal detection |
| * Switches weapons * Prayer activation |
| * 100% Colour * Attacks targets |
| * Alarm system * World selection |
| * Notifications (Balloon tips) * ..and much more! |
|==============================================================================|


{==============================================================================\
| Script Code |
|==============================================================================|
| |
| * DO NOT EDIT ANY OF THIS UNLESS YOU KNOW WHAT YOU ARE DOING * |
| * CONTACT SEAN/BU11ET IF THE SCRIPT HAS ANY BUGS * |
\_____________________________________________________________________________}

program ClanwarsNS;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$i srl-6/lib/misc/srlplayerform.simba}

const
STATUS_FREQUENCY = 0.1;
VERSIONID = '60';

var
ABILITY50: string = 'a'; // ABILITY50 = Keybind for abilities 50% +
SLOT50: integer = 12; // SLOT50 = Slot number for keybind ABILITY 50 (14 slots in total, 1-14 left to right)

ABILITY100: string = 's'; // ABILITY100 = Keybind for abilities 100%
SLOT100: integer = 13; // SLOT100 = Slot number for keybind ABILITY 100

ANTICIPATION: string = 'q'; // ANTICIPATION = Keybind for anticipation ability
ANTISLOT: integer = 10; // ANTISLOT = Slot number for keybind ANTICIPATION

FREEDOM: string = 'w'; // FREEDOM = Keybind for freedom ability
FREESLOT: integer = 11; // FREESLOT = Slot number for keybind FREEDOM


var
ATTACK_USER: TStringArray;

{ ATTACK_USER := [
-------------------------------------------------------------------------------
-- Targets for getTarget()
-------------------------------------------------------------------------------
}

begin
ATTACK_USER := [
'ttack name here!'];
end;

var

quickPrayers: boolean = true;
switchWeps: boolean = true;
attackPlayers: boolean = false;
sendStatuses: boolean = true;
alarms: boolean = true;
fixGlitch: boolean = true;
eastWestDetection: boolean = true;
recordFails: boolean = true;
progressReport: boolean = true;
PMShutDown: boolean = true;
newPaint: boolean = true;
takeScreenshots: boolean = true;
debugMode: boolean = false;
abilities: boolean = true;
useMagic: boolean = false;
runMulti: boolean = true;
multiLure: boolean = true;
adrenalineSpec: integer = 100;
scriptPaintBMP: integer;
loopCount: integer;
SESSION_TIME: integer = 2;
PHONE_TIME: integer = 10;
abilityMarker, PMMarker, lureMarker, statusMarker: TTimeMarker;
Red, detectedGlitch, time1, sentPhone, antiTimes, Green, timesSwitched, Vex, allow, Multi, EastW, totalTries, switchedWeapons, screenCount: integer;

{ declarePlayers()
-------------------------------------------------------------------------------
-- Declares script settings
-------------------------------------------------------------------------------
}

procedure declarePlayers;
begin
players.setup(playerform.players);
currentPlayer := 0;
with players[0] do
begin
World := strToInt(playerForm.players[0].settings[0]);
SESSION_TIME := strToInt(playerForm.players[0].settings[1]);
quickPrayers := StrToBoolDef(playerForm.players[0].settings[2], true);
alarms := StrToBoolDef(playerForm.players[0].settings[3], true);
sendStatuses := StrtoBool(playerForm.players[0].settings[4]);
attackPlayers := StrToBool(playerForm.players[0].settings[5]);
switchWeps := StrToBool(playerForm.players[0].settings[6]);
useMagic := StrToBool(playerForm.players[0].settings[7]);
eastWestDetection := StrToBool(playerForm.players[0].settings[8]);
multiLure := StrToBool(playerForm.players[0].settings[9]);
runMulti := StrToBool(playerForm.players[0].settings[10]);
recordFails := StrToBool(playerForm.players[0].settings[11]);
progressReport := StrToBool(playerForm.players[0].settings[12]);
PMShutDown := StrToBool(playerForm.players[0].settings[13]);
newPaint := StrToBool(playerForm.players[0].settings[14]);
takeScreenshots := StrToBool(playerForm.players[0].settings[15]);
debugMode := StrToBool(playerForm.players[0].settings[16]);
fixGlitch := StrToBool(playerForm.players[0].settings[17]);
end;
end;

{ initPlayerForm()
-------------------------------------------------------------------------------
-- Initiates script settings
-------------------------------------------------------------------------------
}

procedure initPlayerForm();
begin
with playerForm do
begin
name := 'Bu11et''s SMART NS BOT version ' + VERSIONID + '';
scriptSettingsPath := AppPath + 'Scripts\NsBotSettings.txt';

editBoxLabels := [
'World',
'Time to reload from game session (in minutes)'];

editBoxDefaults := [
'80',
'2'];

checkBoxLabels := [
'Quick prayers',
'Alarms',
'Balloon notifications',
'Attack Users',
'Switch weapons',
'Use magic',
'East/West detection',
'Multi-zone lure detection',
'Run-to-multi (wars)',
'Record fails',
'Progress reports',
'Shut down by PM',
'New paint design',
'Take screenshots',
'Developer mode',
'Fix Glitch'];

checkBoxDefaults := [
'True',
'True',
'True',
'True',
'True',
'True',
'True',
'True',
'True',
'True',
'True',
'False',
'True',
'True',
'False',
'True'];

end;
end;

{ checkForFiles()
-------------------------------------------------------------------------------
-- Checks if our assets are there
-------------------------------------------------------------------------------
}

procedure checkForFiles(filePath, message, link: String);
var
progFile: longInt;
fileName: string;

begin
fileName := AppPath + filePath;

try
if not fileExists(fileName) then
begin
writeln('-- INSTALLATION STATUS: ' + message + ' does not exist - Downloading now.');
progFile := createFile(fileName);
end else
begin
writeln('-- INSTALLATION STATUS: ' + message + ' exists.');
exit;
end;
closeFile(progFile);

progFile := rewriteFile(fileName, false);
writeFileString(progFile, getPage(link));
writeln('-- INSTALLATION STATUS: ' + message + ' has been downloaded.');
finally
if (progFile > 0) then
closeFile(progFile);
end;
end;

{ installAssets()
-------------------------------------------------------------------------------
-- Installs our images
-------------------------------------------------------------------------------
}

procedure installAssets;
begin
writeln('Please wait...now installing Bu11ets NS Bot image assets to your computer...');
if not directoryExists(appPath + 'scripts/Bu11ets_NS_Bot_Images/') then
begin
try
createDirectory(appPath + 'scripts/Bu11ets_NS_Bot_Images/');
writeln('Created a new folder in Simba/Scripts/ called Bu11ets_NS_Bot_Images/');
except end;
end;
checkForFiles('scripts/Bu11ets_NS_Bot_Images/clanwarsns3.png', 'Script Paint', 'http://puu.sh/d2N77/d26432fe6f.png');
checkForFiles('scripts/Bu11ets_NS_Bot_Images/clanwarsns4.png', 'Script Paint', 'http://puu.sh/d2N9t/2e7e51f597.png');
end;

{ Alarm()
-------------------------------------------------------------------------------
-- Plays the alarm
-------------------------------------------------------------------------------
}

procedure Alarm;
begin
if (alarms) then
begin
PlaySound(AppPath + '\FullInvSound.wav');
end;
end;

{ LocateMe()
-------------------------------------------------------------------------------
-- Forwards
-------------------------------------------------------------------------------
}

function LocateMe: Integer; forward;

{ MiniMapWalk1()
-------------------------------------------------------------------------------
-- Random coordinates
-------------------------------------------------------------------------------
}

procedure MiniMapWalk1();
var
mapSquare, mapSquare1: TBox;
begin
if (runMulti) then
begin
mapSquare := intToBox(663, 17, 681, 23);
mouseBox(mapSquare, MOUSE_LEFT);
wait(random(1000, 1250));
if (minimap.isFlagPresent(Random(2000, 3000))) then
Minimap.waitPlayerMoving();
mapSquare1 := intToBox(675, 65, 699, 77);
mouseBox(mapSquare1, MOUSE_LEFT);
end
else if not (runMulti) then
begin
mapSquare := intToBox(684, 86, 704, 97);
mouseBox(mapSquare, MOUSE_LEFT);
end;
end;

{ MiniMapWalk2()
-------------------------------------------------------------------------------
-- Random coordinates
-------------------------------------------------------------------------------
}

procedure MiniMapWalk2();
var
mapSquare, mapSquare1: TBox;
begin
if (runMulti) then
begin
mapSquare := intToBox(663, 17, 681, 23);
mouseBox(mapSquare, MOUSE_LEFT);
wait(random(1000, 1250));
if (minimap.isFlagPresent(Random(2000, 3000))) then
Minimap.waitPlayerMoving();
mapSquare1 := intToBox(675, 65, 699, 77);
mouseBox(mapSquare1, MOUSE_LEFT);
mouseBox(mapSquare1, MOUSE_LEFT);
end
else if not (runMulti) then
begin
mapSquare := intToBox(675, 86, 697, 95);
mouseBox(mapSquare, MOUSE_LEFT);
end;
end;

{ MiniMapWalk3()
-------------------------------------------------------------------------------
-- Random coordinates
-------------------------------------------------------------------------------
}

procedure MiniMapWalk3();
var
mapSquare, mapSquare1: TBox;
begin
if (runMulti) then
begin
mapSquare := intToBox(663, 17, 681, 23);
mouseBox(mapSquare, MOUSE_LEFT);
wait(random(1000, 1250));
if (minimap.isFlagPresent(Random(2000, 3000))) then
Minimap.waitPlayerMoving();
mapSquare1 := intToBox(675, 65, 699, 77);
mouseBox(mapSquare1, MOUSE_LEFT);
end
else if not (runMulti) then
begin
mapSquare := intToBox(687, 87, 706, 94);
mouseBox(mapSquare, MOUSE_LEFT);
end;
end;

{ healthPercent()
-------------------------------------------------------------------------------
-- Returns the health percent of the player
-------------------------------------------------------------------------------
}

function healthPercent(): string;
var
health: integer;
begin
health := actionBar.getHPPercent();
result := 'Health: ' + intToStr(health) + '%';
end;

{ PrayerPercent()
-------------------------------------------------------------------------------
-- Returns the prayer percent of the player
-------------------------------------------------------------------------------
}

function PrayerPercent(): string;
var
prayer: integer;
begin
prayer := actionBar.getPrayerPercent();
result := 'Prayer: ' + intToStr(prayer) + '%';
end;

{ randomRC()
-------------------------------------------------------------------------------
-- Randomly right clicks and move mouse
-------------------------------------------------------------------------------
}

procedure randomRC();
var
screenSquare: TBox;
entireScreen: TBox;
begin
screenSquare := intToBox(151, 62, 475, 339);
mouseBox(screenSquare, MOUSE_RIGHT);
wait(randomRange(2750, 5750));
entireScreen := intToBox(0, 0, 794, 595);
mouseBox(entireScreen, MOUSE_MOVE);
end;

{ clickMiniCenter()
-------------------------------------------------------------------------------
-- Clicks the center of the mini map (player location)
-------------------------------------------------------------------------------
}

procedure clickMiniCenter();
var
mapSquare: TBox;
begin
mapSquare := intToBox(688, 106, 688, 106);
mouseBox(mapSquare, MOUSE_LEFT);
end;

{ inSafe()
-------------------------------------------------------------------------------
-- Determines if we are in fight area
-------------------------------------------------------------------------------
}

function inSafe(): boolean;
const
SAFE_COLOR = 2070783;
begin
result := getColor(538, 219) = SAFE_COLOR;
end;

{ clanCup()
-------------------------------------------------------------------------------
-- Determines if we opened the clan cup interface
-------------------------------------------------------------------------------
}

function clanCup(): boolean;
const
INT_COLOR = 1118779;
begin
result := getColor(96, 47) = INT_COLOR;
end;

{ inCombat()
-------------------------------------------------------------------------------
-- Determines if we're in combat
-------------------------------------------------------------------------------
}

function inCombat(): boolean;
const
KEY_COLOR = 1675987;
var
TPA: TPointArray;
searchArea := intToBox(0, 0, 61, 31);
begin
result := FindColors(TPA, KEY_COLOR, searchArea);
end;

{ incomingUpdate()
-------------------------------------------------------------------------------
-- Determines if a update has been announced
-------------------------------------------------------------------------------
}

function incomingUpdate(): boolean;
const
UPDATE_COLOR = 921743;
var
TPA: TPointArray;
searchArea := intToBox(298, 23, 499, 74);
begin
result := FindColors(TPA, UPDATE_COLOR, searchArea);
end;

{ vexOpen()
-------------------------------------------------------------------------------
-- Determines if a vex has been opened
-------------------------------------------------------------------------------
}

function vexOpen(): boolean;
const
VEX_COLOR = 1388125;
var
TPA: TPointArray;
searchArea := intToBox(392, 269, 400, 282);
begin
result := FindColors(TPA, VEX_COLOR, searchArea);
end;

{ vexOpen2()
-------------------------------------------------------------------------------
-- Determines if a vex has been opened, an extra check
-------------------------------------------------------------------------------
}

function vexOpen2(): boolean;
const
VEX_COLOR = 10063220;
var
TPA: TPointArray;
searchArea := intToBox(52, 45, 80, 63);
begin
result := FindColors(TPA, VEX_COLOR, searchArea);
end;

{ goNorth()
-------------------------------------------------------------------------------
-- Determines if we are in the safe zone
-------------------------------------------------------------------------------
}

function goNorth(): boolean;
const
INTERFACE_COLOR = 3635889;
var
TPA: TPointArray;
searchArea := intToBox(138, 5, 437, 52);
begin
result := FindColors(TPA, INTERFACE_COLOR, searchArea);
end;

{ redPort()
-------------------------------------------------------------------------------
-- Determines if we clicked red portal
-------------------------------------------------------------------------------
}

function redPort(): boolean;
const
INTERFACE_COLOR = 1118717;
var
TPA: TPointArray;
searchArea := intToBox(117, 69, 196, 81);
begin
result := FindColors(TPA, INTERFACE_COLOR, searchArea);
end;

{ redPort2()
-------------------------------------------------------------------------------
-- Determines if we clicked red portal
-------------------------------------------------------------------------------
}

function redPort2(): boolean;
const
INTERFACE_COLOR = 1118717;
var
TPA: TPointArray;
searchArea := intToBox(374, 67, 394, 78);
begin
result := FindColors(TPA, INTERFACE_COLOR, searchArea);
end;

{ prayerActive()
-------------------------------------------------------------------------------
-- Determines if prayer is activated
-------------------------------------------------------------------------------
}

function prayerActive(): boolean;
const
ICON_COLOR = 9060948;
var
TPA: TPointArray;
searchArea := intToBox(299, 395, 313, 414);
begin
result := FindColors(TPA, ICON_COLOR, searchArea);
end;

{ inMulti()
-------------------------------------------------------------------------------
-- Determines if we are in the multi-combat zone
-------------------------------------------------------------------------------
}

function inMulti(): boolean;
const
MULTI_COLOR = 16381945;
var
TPA: TPointArray;
searchArea := intToBox(130, 0, 361, 38);
begin
result := FindColors(TPA, MULTI_COLOR, searchArea);
end;

{ TRSOptions.isOpen()
-------------------------------------------------------------------------------
-- Determines if the settings tab is open
-------------------------------------------------------------------------------
}

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;

{ timeRunning()
-------------------------------------------------------------------------------
-- Time running since script start
-------------------------------------------------------------------------------
}

function timeRunning(TheType: Integer = TIME_FORMAL_LONG): string;
override;
begin
Result := msToTime(GetTimeRunning(), TIME_SHORT);
end;

{ isAngleLow()
-------------------------------------------------------------------------------
-- Determines if the angle is too low
-------------------------------------------------------------------------------
}

function isAngleLow(): boolean;
const
BLACK_COLOR = 65793;
var
TPA: TPointArray;
searchArea := intToBox(380, 361, 562, 379);
begin
result := FindColors(TPA, BLACK_COLOR, searchArea);
end;

{ LookingAtPortal()
-------------------------------------------------------------------------------
-- forward
-------------------------------------------------------------------------------
}

function LookingAtPortal: Boolean; forward;

var
TP: Tpoint;
OldDB: string;
MSCC, MMCC: TPoint;

{ Compas()
-------------------------------------------------------------------------------
-- Gets minimap angle degrees
-------------------------------------------------------------------------------
}

function Compas: Integer;
begin
Result := Round(minimap.getAngleDegrees);
end;

{ ClearAllDebug()
-------------------------------------------------------------------------------
-- Clears the screen of paint
-------------------------------------------------------------------------------
}

procedure ClearAllDebug;
begin
smartImage.clear;
Cleardebug;
end;

{ ClearScreenDebug()
-------------------------------------------------------------------------------
-- Clears the screen of paint
-------------------------------------------------------------------------------
}

procedure ClearScreenDebug;
begin
smartImage.clearArea(intToBox(0, 0, 574, 365));
smartImage.clearArea(intToBox(576, 0, 698, 598));
smartImage.clearArea(intToBox(1, 387, 575, 458));
Cleardebug;
end;

{ paintProgress()
-------------------------------------------------------------------------------
-- Progress reports and image painting
-------------------------------------------------------------------------------
}

procedure paintProgress;
begin
disguise('Bu11et''s SMART NS BOT! Time Running: '+timeRunning+' | '+healthPercent+' | '+PrayerPercent+'');
if not (newPaint) then
begin
with (smartImage) do
begin
drawBitmap(scriptPaintBMP, Point(2, 461));
drawText(ToStr(timeRunning), Point(127, 530), 'UpChars', true, 13667100);
drawText(ToStr(totalTries), Point(172, 552), 'UpChars', true, 13667100);
if (recordFails) then
begin
drawText('' + ToStr(Red), Point(485, 480), 'UpChars', true, 13667100);
drawText('' + ToStr(Vex), Point(426, 495), 'UpChars', true, 13667100);
drawText('' +ToStr(Multi), Point(442, 509), 'UpChars', true, 13667100);
drawText('' + ToStr(EastW), Point(475, 524), 'UpChars', true, 13667100);
drawText('' + ToStr(timesSwitched), Point(515, 539), 'UpChars', true, 13667100);
end;
end;
end else
if (newPaint) then
begin
with (smartImage) do
begin
drawBitmap(scriptPaintBMP, Point(2, 461));
drawText(ToStr(timeRunning), Point(115, 536), 'UpChars', true, 15658219);
drawText(ToStr(totalTries), Point(169, 563), 'UpChars', true, 15658219);
if (recordFails) then
begin
drawText('' + ToStr(Red), Point(520, 472), 'UpChars', true, 15658219);
drawText('' + ToStr(Vex), Point(478, 485), 'UpChars', true, 15658219);
drawText('' +ToStr(Multi), Point(489, 500), 'UpChars', true, 15658219);
drawText('' + ToStr(EastW), Point(517, 514), 'UpChars', true, 15658219);
drawText('' + ToStr(timesSwitched), Point(544, 530), 'UpChars', true, 15658219);
end;
end;
end;

if (progressReport) then
begin
writeln('-------- Progress Report --------');
writeln('Time Running : ' + ToStr(timeRunning));
writeln('Attack tries : ' + ToStr(totalTries));
writeln('Red portal clicks : ' + ToStr(Red));
writeln('Vex clicks : ' + ToStr(Vex));
writeln('Times lured to multi : ' + ToStr(Multi));
writeln('Times lured East/West : ' + ToStr(EastW));
writeln('Times switched weapons : ' + ToStr(timesSwitched));
writeln('Times fixed glitch : ' + ToStr(detectedGlitch));
writeln('Antibans performed : ' + ToStr(antiTimes));
writeln('Current loop : ' + ToStr(loopCount));
writeln('-------- End of Report --------');
end;
end;

{ screenShot()
-------------------------------------------------------------------------------
-- Takes screenshots
-------------------------------------------------------------------------------
}

procedure screenShot;
var
i:Integer;
begin
if not directoryExists(appPath + 'scripts/Bu11ets_NS_BOT_Screenshots/') then
begin
try
createDirectory(appPath + 'scripts/Bu11ets_NS_BOT_Screenshots/');
writeln('Created folder Bu11ets_NS_BOT_Screenshots at Simba/Scripts/');
except end;
end;
if inMulti() then
begin
SaveScreenshot(appPath + 'Scripts\Bu11ets_NS_BOT_Screenshots\Screenshot_Multi_Lure_'+ timeRunning() + '.jpg');
end;
if Green = 1 then
begin
Green := 0;
SaveScreenshot(appPath + 'Scripts\Bu11ets_NS_BOT_Screenshots\Screenshot_EastWest_Lure_'+ timeRunning() + '.jpg');
end;
if not Green = 1 or not inMulti() then
begin
SaveScreenshot(appPath + 'Scripts\Bu11ets_NS_BOT_Screenshots\Screenshot_Login_'+ timeRunning() + '.jpg');
end;
writeln('Screenshot has successfully been taken!');
end;

{ SDB()
-------------------------------------------------------------------------------
-- Debug
-------------------------------------------------------------------------------
}

procedure SDB(status: string);
begin
with (smartImage) do
begin
if (newPaint) then
begin
clearArea(intToBox(0, 367, 574, 385));
drawBox(0, 367, 574, 385, true, clAqua);
drawBox(0, 367, 65, 385, true, clTeal);
drawText('Status: ', point(14, 368), UpCharsEx, false, clAqua);
drawText( + status, point(79, 368), UpCharsEx, false, clTeal);
end;
end;
end;

{ Boot()
-------------------------------------------------------------------------------
-- Debug
-------------------------------------------------------------------------------
}

procedure Boot(status: string);
begin
with (smartImage) do
begin
clearArea(intToBox(0, 0, 574, 16));
drawBox(0, 0, 574, 16, true, clRed);
drawBox(0, 0, 65, 16, true, clMaroon);
drawText('Boot: ', point(11, 1), UpCharsEx, false, clRed);
drawText( + status, point(80, 1), UpCharsEx, false, clMaroon);
end;
end;

{ closeVex()
-------------------------------------------------------------------------------
-- Closes clan vex
-------------------------------------------------------------------------------
}

function closeVex : Boolean;
var Bmp,wid, hei,tmpX,tmpY,x,y : Integer;
begin
getClientDimensions(wid, hei);
Bmp := BitmapFromString(13, 14, 'meJx9kD1LQmEYhjND8xytUMljOi' +
'iiDmK5ZAjScMAwiBzaJBrahMawoSlwEUJQBylanKLATafAH9Do35A' +
'GwUEww8ueehGC4ObhOdd9nY/3mNld8zu5w9TfmL+t3VnS3Df/R5zN' +
'QDNy/GwkWy5vw7Xd/om34Uu04LQis18OZsW3USDxCBSHHQKnFS2eb' +
'Rd6I2U6PffKYdIu3mtcAfeOOpjF9y8mt6sdTovD58ntYub7M4lyaH' +
'EWp9iqsBO/+YKw3/1ksgukxbFp546NW6JH6rGnDxwJO0QqHIKsh+/' +
'g0dcpM33RVTtcHrW6dmYPlt3VofEwJpwrdlBjyiWcFofo6fp6bQJB' +
'2AmWOT6THQKnxdH001D0mp8gjhyKiAmnxVmxZJgSi/VkOYrjzAGK6K/q');

if (findBitmapToleranceIn(Bmp, x, y, 0, 0, wid - 1, hei - 1, 5)) then
begin
GetBitmapSize(Bmp,tmpX,tmpY);
mouse(point(x, y).rand(tmpX,tmpY), MOUSE_LEFT);
Result := true;
end;
FreeBitmap(Bmp);
end;

{ closeRed()
-------------------------------------------------------------------------------
-- Closes red port
-------------------------------------------------------------------------------
}

function closeRed : Boolean;
var Bmp,wid, hei,tmpX,tmpY,x,y : Integer;
begin
getClientDimensions(wid, hei);
Bmp := BitmapFromString(15, 14, 'meJyNkUtLw0AYRffZSYkUsWCDCg' +
'YUlYIgaihYDUppg6+RiEhpxaoV0i5EqiIUHwTcaBF3glvxB/jvPHJ' +
'lcCkchnwzh5s7iefPeP/m+fOr238/6T02r9MkfYHW7ROwI9ivd+/M' +
'6bnjOL23D8Y4udxsdnZbF6zAkR5EuXYcRAY5ue9bJzpMgKMwbrCCH' +
'RfKW8jt9FWxAxkXqvWz9f0jmdqRXFheQ6YVyfgZNwvyCdQImKXtg7' +
'mwgsxdbDGdutlhC2ZxIwYlI++1b0jTqwdznoXAFVP7lYNQMjXQ8CE' +
'36g/lx1iBWHWwyeqsZISR8UkLo0yYLa7+TZaQn5hCAB4EZlAxNpm7' +
'87n0QympqqAd5KXqzvRiCblx9UAsMo5KAqO9GvBHJPOFdWTr/bw3M' +
'oAj6OAX5pG/AS9xtoA=');

if (findBitmapToleranceIn(Bmp, x, y, 0, 0, wid - 1, hei - 1, 5)) then
begin
GetBitmapSize(Bmp,tmpX,tmpY);
mouse(point(x, y).rand(tmpX,tmpY), MOUSE_LEFT);
Result := true;
end;
FreeBitmap(Bmp);
end;

{ closeExamine()
-------------------------------------------------------------------------------
-- Closes player examines
-------------------------------------------------------------------------------
}

function closeExamine: Boolean;
var Bmp,wid, hei,tmpX,tmpY,x,y : Integer;
begin
getClientDimensions(wid, hei);
Bmp := BitmapFromString(15, 17, 'meJyNkbtqAlEURWd8gigBiY2lKF' +
'hKIIUQRBAiDFqIDwQRLCRgo+AX2NjaJK0itjaJH5CQzk9IYxWxiYU' +
'IQ9osPXK5GMGBxWGffZYXVNMwzEsEvKYgWcp+98khzUouEp+7o4ur' +
'oOUzKYLVXl8FTeRsfcXaev5hkhV6KbL/dkqm7Hz9ll5tXWal5ERGE' +
'/muuARO5eWeeXFVcvz+HXRBN+V6Jgvp2Xf2wwaC3qNVCw+u0IifRR' +
'Gb2Mm3HRD0Hs16PMh8CmjCww0OUwVKuaLJy+BLvCiBfLaKwz8owVX' +
'7vBlvOZ3WI6yUnJRseAYgPlNWveRlWZXshHbD8gR7Tkw0ZB4Hvqnw' +
'P+vzD73/A+g=');

if (findBitmapToleranceIn(Bmp, x, y, 0, 0, wid - 1, hei - 1, 5)) then
begin
GetBitmapSize(Bmp,tmpX,tmpY);
mouse(point(x, y).rand(tmpX,tmpY), MOUSE_LEFT);
Result := true;
end;
FreeBitmap(Bmp);
end;

{ closeBanner()
-------------------------------------------------------------------------------
-- Closes achievement banners
-------------------------------------------------------------------------------
}

function closeBanner: Boolean;
var Bmp,wid, hei,tmpX,tmpY,x,y : Integer;
begin
getClientDimensions(wid, hei);
Bmp := BitmapFromString(12, 12, 'meJxj58nkEioniPilJyt7LpfQnc' +
'4rMolXbCEUiUwS154OFAfKAtUAGUmX/kbt/iitPQsoAlEAZANFgOJ' +
'AWaAadZuF/ls/wpXxCPfAFQBJoCy7RA5QRN9tLVBZ1Kl/QBKoEc4G' +
'igNl2XkyIRohyjz2/YUguAKgLFANl0ALkAFEkk4rgbKmW/4ASSAbI' +
'giUZeOK4eSrBiJu5Ylqc94CFUAQkA0UgUgB1QCN4lZsBAqqrvoNJM' +
'3itsDZQHGgLBNLMLtMmVDna4mZX4AI6As18z4gCeECxYGyQDXcZhM' +
'5+n4AuUBZKZkyYGgASSAbKAIUB8pycfspqJYA/QtRADQZgiDKgOJA' +
'WQDkoZ0C');

if (findBitmapToleranceIn(Bmp, x, y, 0, 0, wid - 1, hei - 1, 5)) then
begin
GetBitmapSize(Bmp,tmpX,tmpY);
mouse(point(x, y).rand(tmpX,tmpY), MOUSE_LEFT);
Result := true;
end;
FreeBitmap(Bmp);
end;

{ screenSetUp()
-------------------------------------------------------------------------------
-- Faces south for findGreen()
-------------------------------------------------------------------------------
}

procedure screenSetUp();
begin
SDB('Setting up the screen to locate the green portal');
if screenCount = 0 then
begin
case Random(50) of
0..25:
begin
minimap.setAngle(randomRange(150, 210));
wait(randomRange(300, 750));
mainscreen.setangle(MS_ANGLE_HIGH);
end;
26..50:
begin
mainscreen.setangle(MS_ANGLE_HIGH);
wait(randomRange(200, 900));
minimap.setAngle(randomRange(135, 190));
end;
end;
wait(random(750, 2500));
end
else if screenCount >= 1 then
begin
SDB('We are already facing the correct way for looking at the portal');
end;
end;

{ switchWeapons()
-------------------------------------------------------------------------------
-- Switches our combat style
-------------------------------------------------------------------------------
}

procedure switchWeapons();
begin
if (tabBackpack.isOpen()) then
begin

if (useMagic) then
begin
tabBackPack.mouseSlot(random(1, 2), MOUSE_MOVE);
end else

if not (useMagic) then
begin
tabBackPack.mouseSlot(1, MOUSE_MOVE);
end;

if (isMouseOverText(['2h', 'une', 'word'])) then
begin
FastClick(MOUSE_LEFT);
wait(randomRange(300, 1250));
actionBar.switchToBar(1);
end;

if (isMouseOverText(['agic', 'hield', 'ow', 'sighted)', 'hieldbow', 'bow'])) then
begin
FastClick(MOUSE_LEFT);
wait(randomRange(100, 750));
actionBar.switchToBar(2);
end;

if (useMagic) and (isMouseOverText(['staff', 'natur'])) then
begin
FastClick(MOUSE_LEFT);
wait(randomRange(400, 1050));
actionBar.switchToBar(3);
end;

end;
end;

{ switchCombat()
-------------------------------------------------------------------------------
-- Calls switchWeapons if number is between 15 - 45
-------------------------------------------------------------------------------
}

procedure switchCombat;
begin
Inc(switchedWeapons);
if switchedWeapons >= (RandomRange(15, 45)) then
begin
SDB('Number between 15 and 45 is : (' + ToStr(switchedWeapons) + ')! It''s time to switch Weapons!');
switchWeapons();
inc(timesSwitched);
switchedWeapons := 0;
end;
end;

{ DATPAB()
-------------------------------------------------------------------------------
-- Debugs TPA's
-------------------------------------------------------------------------------
}

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;

{ GMP()
-------------------------------------------------------------------------------
-- Get Mouse Position
-------------------------------------------------------------------------------
}

function GMP(T: Tpoint): Tpoint;
begin
GetMousePos(T.X, T.Y);
Result := T;
end;

{ WaitLoad()
-------------------------------------------------------------------------------
-- Waits if loading..please wait is active
-------------------------------------------------------------------------------
}

procedure WaitLoad;
var
WLT: TTimeMarker;
P: TPoint;
begin
Wait(Random(1000));
while minimap.isFlagPresent(P) do
wait(random(50));
if not (LocateMe = 1) then
Exit;
WLT.start;
repeat
Wait(Random(500));
until not (GetColor(48, 19) = 16777215) or (WLT.getTime > 3000);
end;

{ CA()
-------------------------------------------------------------------------------
-- Minimap degrees
-------------------------------------------------------------------------------
}

function CA(A: Integer): Integer;
begin
Result := A;
while Result > 360 do
Result := Result - 360;
while Result < 0 do
Result := Result + 360;
end;

{ PtToPol()
-------------------------------------------------------------------------------
-- Point to pol
-------------------------------------------------------------------------------
}

function PtToPol(A: Integer; I, C: Tpoint): Integer;
var
N: TPoint;
D, H: Integer;
begin
if A = 0 then
D := Compas
else
D := A;
I.X := I.X - C.X;
I.Y := I.Y - C.Y;
H := Round(Hypot(I.X, I.Y));
if H = 0 then
H := 1;
I.X := round(76 * I.X / H);
I.Y := round(76 * I.Y / H);
N := point( - Round(1000 * Sin(Radians(D))), - Round(1000 * Cos(Radians(D))));
H := Round(Hypot(N.X, N.Y));
N := point(round(76 * N.X / H), round(76 * N.Y / H));
Result := 360 - Round(Degrees(ArcCos((N.X * I.X + N.Y * I.Y) / (1 + Hypot(I.X, I.Y) * Hypot(N.X, N.Y)))));
if Result > 0 then
begin
if D < 180 then
begin
if ((I.X < 0) and (I.Y < N.Y)) or ((I.X > 0) and (I.Y < - 1 * N.Y)) then
Result := 360 - Result;
end
else if ((I.X < 0) and (I.Y > - 1 * N.Y)) or ((I.X > 0) and (I.Y > N.Y)) then
Result := 360 - Result;
end;
end;

{ PolToPt()
-------------------------------------------------------------------------------
-- Location to point
-------------------------------------------------------------------------------
}

function PolToPt(A, H: Integer; C: Tpoint): TPoint;
var
P: TPoint;
Rh: Integer;
begin
A := 360 - A;
P.X := Round( - 100 * Sin(Radians(Compas + A)));
P.Y := Round( - 100 * Cos(Radians(Compas + A)));
Rh := Round(Hypot(P.X, P.Y));
P.X := C.X + round(H * P.X / Rh);
P.Y := C.Y + round(H * P.Y / Rh);
Result := P;
end;

{ PtToHyp()
-------------------------------------------------------------------------------
-- Rounds the estimation
-------------------------------------------------------------------------------
}

function PtToHyp(I, C: TPoint): Integer;
begin
Result := Round(Hypot(I.X - C.X, I.Y - C.Y));
end;

{ WithInLine()
-------------------------------------------------------------------------------
-- Determines if we're within the line
-------------------------------------------------------------------------------
}

function WithInLine(A: Integer; I, C: Tpoint): Boolean;
begin
Result := False;
if ((A < 180) and (PtToPol(0, I, C) > A) and (PtToPol(0, I, C) < (A + 180))) or ((A > 179) and (PtToPol(0, I, C) > A) or (PtToPol(0, I, C) < (A - 180))) then
Result := True;
end;

{ WithinCircle()
-------------------------------------------------------------------------------
-- Determines if we're within the circle
-------------------------------------------------------------------------------
}

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;

{ WithInBox()
-------------------------------------------------------------------------------
-- Determines if we're within the box
-------------------------------------------------------------------------------
}

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;

{ AdvMMtoMS()
-------------------------------------------------------------------------------
-- Advanced Minimap to mainscreen
-------------------------------------------------------------------------------
}

function AdvMMToMS(I: Tpoint): Tpoint;
var
JGX: Tpoint;
begin
JGX.X := PtToPol(0, I, MMCC);
JGX.Y := PtToHyp(I, MMCC);
Result := PolToPt(JGX.X, 35 + round(657 * JGX.Y / 76), MSCC);
end;

{ ToMS()
-------------------------------------------------------------------------------
-- Determines if on Main Screen
-------------------------------------------------------------------------------
}

function ToMS(T: TPoint): Tpoint;
var
Ang, Dis: Integer;
begin
Ang := PtToPol(0, T, MSCC);
Dis := PtToHyp(T, MSCC);
Result := PolToPt(Ang, Dis, MSCC);
while not (WithInBox(mainscreen.x1, mainscreen.y1, mainscreen.x2, mainscreen.y2, Result)) do
begin
Dis := Dis - Random(10);
Result := PolToPt(Ang, Dis, MSCC);
end;
end;

{ ToMM()
-------------------------------------------------------------------------------
-- Determines distance in minimap
-------------------------------------------------------------------------------
}

function ToMM(T: TPoint): Tpoint;
var
Ang, Dis: Integer;
begin
Ang := PtToPol(0, T, MMCC);
Dis := PtToHyp(T, MMCC);
Result := PolToPt(Ang, Dis, MMCC);
while not (WithInCircle(minimap.cx, minimap.cy, 75, Result)) do
begin
Dis := Dis - Random(10);
Result := PolToPt(Ang, Dis, MMCC);
end;
end;

procedure ClickCoord(I: Tpoint); forward;

{ MMM()
-------------------------------------------------------------------------------
-- Mouse move, right, left
-------------------------------------------------------------------------------
}

procedure MMM(I: Tpoint; T: Integer);
begin
if T > 0 then
begin
if T > 1 then
begin
if T > 2 then
ClickCoord(I)
else
Mouse(I, MOUSE_RIGHT);
end
else
begin
T := 0;
repeat
Mouse(I, MOUSE_LEFT);
Inc(T)
until T > RandomRange(0, 1);
end;
end
else
mouse(point(I.X, I.Y), MOUSE_MOVE);
end;

{ ClickCoord()
-------------------------------------------------------------------------------
-- Converts main screen and minimap coordinates
-------------------------------------------------------------------------------
}

procedure ClickCoord(I: Tpoint);
var
Atmp: Integer;
P: TPoint;
begin
Atmp := 0;
if I.X < mainscreen.x2 then
begin
SDB('Coord is in main screen');
case Random(2) of
0:
begin
SDB('It will stay in main screen');
MMM(I, 1);
end;
1:
begin
SDB('Converting it into mini map');
I := PolToPt(PtToPol(0, I, MSCC), round(PtToHyp(I, MSCC) / 10), MMCC);
MMM(I, 1);
end;
end;
end
else
begin
SDB('Coord is in mini map');
case Random(2) of
0:
begin
SDB('It will stay in mini map');
MMM(I, 1);
end;
1:
begin
SDB('Converting it into main screen');
MMM(ToMS(AdvMMToMs(I)), 0);
while not (isMouseOverText(['alk here'])) do
begin
Inc(Atmp);
if (Atmp > RandomRange(2, 5)) then
Break;
SDB('Not a valid point to click');
I := ToMS(point(I.X + RandomRange( - 50, 50), I.Y + RandomRange( - 50, 50)));
MMM(I, 0);
Wait(100 + Random(400));
end;
MMM(I, 1)
end;
end;
end;
while minimap.isFlagPresent(P) do
wait(random(50));
end;

{ SphereCam()
-------------------------------------------------------------------------------
-- Custom include for rotating camera
-------------------------------------------------------------------------------
}

procedure SphereCam(X, Y: Integer);
var
WT: Tpoint;
WDTx, WDTy: TTimeMarker;
begin
WT := point(Round(Abs(X * 4800 / 360)), Round(Abs(Y * 1200 / 90)));
case Random(2) of
0:
begin
if X < 0 then
KeyDown(VK_Left);
if X > 0 then
KeyDown(VK_Right);
WDTx.start;
Wait(Random(WT.X));
if Y < 0 then
KeyDown(VK_Down);
if Y > 0 then
KeyDown(VK_Up);
WDTy.start;
repeat
Wait(Random(100));
until (WDTy.getTime > Random(WT.Y)) or (WDTx.getTime > WT.X) if WDTx.getTime > WT.X then
begin
if X < 0 then
KeyUp(VK_Left);
if X > 0 then
KeyUp(VK_Right);
end;
end;
1:
begin
if Y < 0 then
KeyDown(VK_Down);
if Y > 0 then
KeyDown(VK_Up);
WDTy.start;
if X < 0 then
KeyDown(VK_Left);
if X > 0 then
KeyDown(VK_Right);
WDTx.start;
Wait(Random(WT.X));
repeat
Wait(Random(100));
until (WDTx.getTime > Random(WT.X)) or (WDTy.getTime > WT.Y) if WDTx.getTime > WT.X then
begin
if Y < 0 then
KeyUp(VK_Down);
if Y > 0 then
KeyUp(VK_Up);
end;
end;
end;
repeat
Wait(Random(100));
until WDTx.getTime > WT.X if WDTx.getTime > WT.X then
begin
if X < 0 then
KeyUp(VK_Left);
if X > 0 then
KeyUp(VK_Right);
end;
repeat
Wait(Random(100));
until (WDTy.getTime > WT.Y);
if WDTy.getTime > WT.Y then
begin
if Y < 0 then
KeyUp(VK_Down);
if Y > 0 then
KeyUp(VK_Up);
end;
end;

procedure XXXENDOFINCLUDEXXX;
begin
end;

var
PC, PAC, FA: Tpoint;
PA, PD, PX, PY, AE, GP, ATT, AF, PrevLoc, OldXP, OldHP: Integer;
HPCol: string;
Pt, FT, AEt: TTimeMarker;

{ CHP()
-------------------------------------------------------------------------------
-- Results the player health percentage
-------------------------------------------------------------------------------
}

function CHP: Integer;
begin
Result := Round(actionBar.getHPPercent);
if Result < 0 then
Result := 0;
end;

{ RandomComp()
-------------------------------------------------------------------------------
-- Rotates camera
-------------------------------------------------------------------------------
}

procedure RandomComp;
begin
ClearScreenDebug;
SDB('Changing angle of screen');
screenCount := 0;
case Random(3) of
0: SphereCam(RandomRange( - 180, 180), RandomRange( - 60, 90));
1, 2: minimap.setAngle(RandomRange( - 180, 180));
end;
end;

{ CannotFind()
-------------------------------------------------------------------------------
-- Rotates camera
-------------------------------------------------------------------------------
}

procedure CannotFind;
begin
ClearScreenDebug;
SDB('Changing angle of screen because we cannot find the portal');
case Random(3) of
0: SphereCam(RandomRange( - 180, 180), RandomRange( - 60, 90));
1, 2: minimap.setAngle(RandomRange( - 180, 180));
end;
end;

{ HandleUnknown()
-------------------------------------------------------------------------------
-- Logs player out if message from Bu11et or Sickbu11et is found
-------------------------------------------------------------------------------
}

procedure HandleUnknown;
begin
if not isLoggedIn then
begin
Alarm();
ClearScreenDebug;
players[currentPlayer].login();
exitTreasure;
end;
end;

procedure LookAtPlayers; forward;

{ HandleAntiBan()
-------------------------------------------------------------------------------
-- Makes us look more human
-------------------------------------------------------------------------------
}

procedure HandleAntiBan;
begin
if LocateMe = 1 then
exit;
SDB('Antiban procedure occurring');
MouseSpeed := RandomRange(30, 45);
case Random(140) of
0..20: begin
randomRC();
SleepAndMoveMouse(GaussRangeInt(500, 4000));
end;
21..30: mouseMovingObject();
31..50: Wait(RandomRange(250, 8500));
51..65: SleepAndMoveMouse(GaussRangeInt(1000, 3500));
66..75: begin
pickUpMouse();
wait(random(250, 1000));
smallRandomMouse();
end;
76..90: randomComp;
91..99: smallRandomMouse();
100..125:
begin
MouseOffClient(Random(4));
Wait(GaussRangeInt(1000, 12000));
end;
126..140:
case Random(50) of
0..25:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(ANTISLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(ANTICIPATION, 200, 600);
end;
end;
26..50:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(FREESLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(FREEDOM, 200, 600);
end;
end;
end;
end;
end;

{ LocateMe()
-------------------------------------------------------------------------------
-- Determines player location
-------------------------------------------------------------------------------
}

function LocateMe: Integer;
var
LCM, P: Tpoint;
begin
if not isLoggedIn then
begin
players[currentPlayer].login();
Result := 0;
end;
if minimap.findSymbol(LCM, MM_SYMBOL_MINIGAME, minimap.getBounds) and not (minimap.findSymbol(LCM, MM_SYMBOL_BANK, minimap.getBounds)) then
begin
MMM(Point(PolToPt(RandomRange(30, 70), RandomRange(20 + Random(30), 76), MMCC).X, PolToPt(60 + Random(60), Random(76), MMCC).Y), 1);
while minimap.isFlagPresent(P) do
wait(Random(50));
end;
if (minimap.findSymbol(LCM, MM_SYMBOL_BANK, minimap.getBounds) and (minimap.findSymbol(LCM, MM_SYMBOL_MINIGAME, minimap.getBounds)) or minimap.findSymbol(LCM, MM_SYMBOL_BANK, minimap.getBounds)) then
begin
Result := 1;
Pt.start;
end;
if inMulti() and InSafe() and (multiLure) then
begin
if isLoggedIn() then
begin
Alarm();
if (takeScreenshots) then
begin
screenShot;
end;
inc(Multi);
Boot('We have been lured to multi, waiting 30-35 seconds to relog!');
wait(20000 + Random(10500));
Boot('We are logging to lobby!');
players[currentPlayer].exitToLobby();
end;
if not isLoggedIn() then
begin
Boot('Signing back online!');
players[currentPlayer].login();
wait(1000 + Random(1500));
Boot('Closing Treasure');
exitTreasure();
Boot('Closing Poll');
closePollWindow();
Minimap.ClickCompass;
end;
end;


if closeRed() then
begin
SDB('We clicked red portal, closing!');
inc(Red);
end;

if closeVex() then
begin
SDB('We opened a vex, closing!');
inc(Vex);
end;

if closeExamine() then
begin
SDB('We closed an examine');
end;

if closeBanner() then
begin
SDB('We closed an achievement banner');
end;

if clanCup() then
begin
SDB('We opened the clan cup, closing!');
clickMiniCenter();
end;

if goNorth() then
begin
Result := 2;
if GetColor(550, 179) = 2116732 then
Result := 3;
if PrevLoc = 1 then
AEt.start;
end;
if GetColor(562, 185) = 2173525 then
begin
Result := 5;
if GetColor(272, 31) = 3635889 then
begin
Result := 4;
end;
end;
PrevLoc := Result;
if not (PrevLoc = Result) then
ClearScreenDebug;
HandleUnknown;
end;

{ LocatePortal()
-------------------------------------------------------------------------------
-- Locates the portal location with DTM
-------------------------------------------------------------------------------
}

function LocatePortal(out MSPoint: TPoint; out MMPoint: TPoint): Boolean;
var
DTM: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
MSPoint := Point( - 1, - 1);
MMPoint := Point( - 1, - 1);
DTM := DTMFromString('mfgEAAHicrcwhCoRQGMTx711BjGI0eUIVTQsaBDGKYLB4ABF2YYtFRBAsgieQBQ/hH/Y16xv4wYRhLBHplUiBWv37FxMO/HDhxI6P3jTIkSBCihIVXggQI9Q9w4BZ/2xYsWDEGy06+J4jJuLCNkAZ8swNvg4adQ==');
try
if (not Minimap.findDTMs(DTM, TPA)) then
begin
Writeln('DID NOT FIND DTM (LOCATE PORTAL)');
RandomComp;
Exit(False);
end;
finally
FreeDTM(dtm);
end;
ATPA := ClusterTPAEx(TPA, 5, 5);
SortATPASize(ATPA, True);
MMPoint := MiddleTPA(ATPA[0]);
MSPoint := Minimap.PointToMainscreen(MMPoint);
Result := (MMPoint.x <> - 1) and (MMPoint.y <> - 1);
end;

{ InBound()
-------------------------------------------------------------------------------
-- Checks if the TPA is in bound
-------------------------------------------------------------------------------
}

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;

{ LookingAtPortal()
-------------------------------------------------------------------------------
-- Determines if we're looking at the portal or not
-------------------------------------------------------------------------------
}

function LookingAtPortal(): Boolean;
var
MSPoint, MMPoint: TPoint;
LAPS, LAPE: Tpoint;
begin
if (not LocatePortal(MSPoint, MMPoint)) then
Exit(False);
LocatePortal(MSPoint, MMPoint);
PAC := ToMS(AdvMMToMs(PAC));
LAPS := point(PAC.X - 50, PAC.Y - 50);
LAPS := ToMS(LAPS);
LAPE := point(PAC.X + 50, PAC.Y + 50);
LAPE := ToMS(LAPE);
Result := FindColorSpiralTolerance(PAC.X, PAC.Y, 1788506, LAPS.X, LAPS.Y, LAPE.X, LAPE.Y, 9) and (Round(Abs(Compas - PA)) < (60 + (20 - PD)));
if Result then
SDB('Looking at portal')
else
SDB('Not looking at portal');
minimap.setAngle(0);
end;

{ FacePortal()
-------------------------------------------------------------------------------
-- Alternative for LookPortal()
-------------------------------------------------------------------------------
}

procedure FacePortal(R: Integer);
var
FaceTime: Integer;
MSPoint, MMPoint: TPoint;
begin
if (not LocatePortal(MSPoint, MMPoint)) then
Exit();
LocatePortal(MSPoint, MMPoint);
case Random(2) of
0: R := - R;
end;
FaceTime := Compas;
PA := (PA + R);
minimap.setAngle(PA);
end;

{ LookPortal()
-------------------------------------------------------------------------------
-- Rotates the camera when called
-------------------------------------------------------------------------------
}

Procedure LookPortal(R: Integer);
Var
MinH: Integer;
MSPoint, MMPoint: TPoint;
Begin
LocatePortal(MSPoint, MMPoint);
SDB('Attempting to look at portal');
IF PD < RandomRange(10, 15) Then
MinH := RandomRange(-60, 90)
Else
MinH := - 40 - PD;
Case Random(2) Of
0: R := -R;
End;
Case Random(3) Of
0: Begin
FacePortal(R);
Case Random(4) Of
0: SphereCam(R, RandomRange(MinH, MinH - PD));
1: SphereCam(0, RandomRange(MinH, MinH - PD));
2: minimap.clickCompass;
3: minimap.setAngle(0);
End;
End;
1: Begin
Case Random(4) Of
0: SphereCam(R, RandomRange(MinH, MinH - PD));
1: SphereCam(0, RandomRange(MinH, MinH - PD));
2: minimap.clickCompass;
3: minimap.setAngle(0);
End;
FacePortal(R);
End;
2: Begin
Case Random(4) Of
0: minimap.clickCompass;
1: SphereCam(R, RandomRange(MinH, MinH - PD));
2: SphereCam(R, 0);
3: minimap.setAngle(0);
End;
End;
End;
AE := 0;
End;


{ GoToPortal()
-------------------------------------------------------------------------------
-- Goes to the DTM
-------------------------------------------------------------------------------
}

procedure GoToPortal;
var
P: TPoint;
MSPoint, MMPoint: TPoint;
begin
if not LocateMe = 1 then
Exit;
if LocateMe = 1 and inSafe() then
begin
SDB('Procedure GoToPortal');
exit;
end;
if (not LocatePortal(MSPoint, MMPoint)) then
Exit();
Mouse(MMPoint.randRange( - 10, 10), MOUSE_LEFT);
while minimap.isFlagPresent(Random(1000, 2000)) do
wait(Random(100, 200));
AE := 0;
end;

{ PortalATB()
-------------------------------------------------------------------------------
-- Rotates the camera to get a good angle of the portal
-------------------------------------------------------------------------------
}

procedure PortalATB;
begin
if (AE < 2) and (Round(PX) < 15) and (Round(PY) < 10) then
Exit;
if (GetColor(126, 117) = 255) then
MMM(Point(435 + Random(10), 47 + Random(10)), 1);
if (PX < - 15) or (PY > 25) then
GoToPortal;
if not (LookingAtPortal) then
LookPortal(5);
if (Round(PX) < 5) and (PY > 25) then
minimap.setAngle(RandomRange( - 60, 60));
end;

{ checkOurFight()
-------------------------------------------------------------------------------
-- Looks for if we're stuck in combat
-------------------------------------------------------------------------------
}

function checkOurFight(): boolean;
var
KEYWORDS: TStringArray;
begin
KEYWORDS := ['You''re already fighting someone else!'];
result := chatbox.findText(KEYWORDS);
end;

{ checkFight()
-------------------------------------------------------------------------------
-- Activates freedom or anticipation if we're glitched in combat
-------------------------------------------------------------------------------
}

procedure checkFight();
begin
if checkOurFight then
begin
SDB('We detected that you''re glitched, fixing!');
inc(detectedGlitch);
case Random(50) of
0..25:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(FREESLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(FREEDOM, 200, 800);
end;
end;
26..50:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(ANTISLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(ANTICIPATION, 200, 500);
end;
end;
end;
end else
if not checkOurFight then
begin
SDB('We didn''t detect that you were glitched.');
end;
end;

{ getTarget()
-------------------------------------------------------------------------------
-- Searchs onscreen to find desired targets
-------------------------------------------------------------------------------
}

function getTarget: Boolean;
var
FPCol, FPTol: Integer;
I: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
ATTACK: TStringArray;
p: TPoint;
b: TBox;
begin
Result := False;
if Players[CurrentPlayer].Booleans[0] then
begin
FPCol := 11251383;
FPTol := 44;
end
else
begin
FPCol := 8083511;
FPTol := 50;
end;
if inCombat() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
SDB('We are already in combat, can''t engage in another fight');
Exit(True);
end;
if LocateMe = 1 then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
SDB('We are in the lobby, can''t engage in combat here');
Exit(True);
end;
if goNorth() then
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
SDB('We are in the safe zone, can''t engage in combat here');
Exit(True);
end;

if (fixGlitch) then
begin
checkFight();
end;

if inSafe() then
if (minimap.isFlagPresent(Random(2000, 4000))) then
Minimap.waitPlayerMoving();
begin
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
Inc(ATT);
Pt.start;
Inc(TotalTries);
SDB('Attempted to find target ' + IntToStr(ATT) + ' times');
if FindColorsSpiralTolerance(TP.X, TP.Y, TPA, FPCol, mainscreen.x1 + 10, mainscreen.y1 + 10, mainscreen.x2 - 10, mainscreen.y2 - 10, FPTol) then
begin
ATPA := TPAToATPAEx(TPA, 45, 45);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
DATPAB(ATPA);
for I := 0 to Random(High(ATPA)) do
begin
MouseSpeed := RandomRange(30, 60);
if InBound(MiddleTPA(ATPA[I])) then
begin
p := MiddleTPA(ATPA[I]);
b := IntToBox(p.x - 12, p.y - 10, p.x + 12, p.y + 10);
b.setLimit(Mainscreen.getBounds());
Mouse(b.getRandomPoint());
if (isMouseOverText(ATTACK_USER)) then
begin
fastClick(MOUSE_LEFT);
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
ATT := 0;
SDB('Found target successfully in (' + ToStr(ATT) + ' tries, ' + ToStr(Pt.getTime / 1000) + ' secs)');
Exit(True);
end;
if not (isMouseOverText(ATTACK_USER)) then
begin
FastClick(MOUSE_RIGHT);
if not chooseOption.optionsExist(ATTACK_USER) then
begin
chooseOption.close();
SDB('Target has not been found!');
if (debugMode) then
begin
chooseOption.debugOptions();
end;
end;
if chooseOption.optionsExist(ATTACK_USER) then
begin
if chooseOption.optionsExist(['ttack']) then
begin
chooseOption.select(ATTACK_USER, MOUSE_LEFT);
ClearScreenDebug;
smartImage.clearArea(Mainscreen.getBounds());
ATT := 0;
SDB('Found target successfully in (' + ToStr(ATT) + ' tries, ' + ToStr(Pt.getTime / 1000) + ' secs)');
Exit(True);
end;
end;
end;
end;
end;
end;
end;
end;

{ EP()
-------------------------------------------------------------------------------
-- Activates quick prayers found on the ability bar
-------------------------------------------------------------------------------
}

procedure EP();
begin
actionBar.mouseIcon(AB_BAR_PRAYER, MOUSE_LEFT);
end;

{ GoInPortal()
-------------------------------------------------------------------------------
-- Searches for the safe portal to enter the fight area
-------------------------------------------------------------------------------
}

function GoInPortal: Boolean;
var
tFrame, tFrameEdge, tPortal, tPortalEdge, tEdge: TPointArray;
aEdge: T2DPointArray;
i, safeCheck: Integer;
p: TPoint;
b: TBox;
begin
Result := False;
Inc(AE);

if AE >= (RandomRange(4, 7)) then
begin
LookPortal(5);
wait(random(500, 2000));
smallRandomMouse();
screenCount := 0;
AE := 0;
end;

SDB('Attempted to enter portal ' + IntToStr(AE) + ' times');
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());
with (smartImage) do
begin
clearArea(Mainscreen.getBounds());
drawTPA(tEdge, clAqua);
drawBox(b, False, clAqua);
drawBox(0, 367, 574, 385, true, clAqua);

drawBox(0, 367, 65, 385, true, clTeal);
drawText('Status: ', point(14, 368), UpCharsEx, false, clAqua);
drawText('We are searching for safe portal', point(79, 368), UpCharsEx, false, clTeal);
end;
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);
end;
26..50:
begin
FastClick(MOUSE_LEFT);
wait(random(500, 3000));
smallRandomMouse();
end;
51..75:
begin
FastClick(MOUSE_LEFT);
EP();
end;
end;
screenCount := 0;
GP := 0;
Green := 0;
safeCheck := 0;
allow := 0;
ClearScreenDebug;
SDB('Found safe portal (' + ToStr(AE) + ' tries, ' + ToStr(Pt.getTime / 1000) + ' secs)');
if (minimap.isFlagPresent(Random(2000, 4000))) then
Minimap.waitPlayerMoving();
Exit(True);
end;
end;
end;
end;


{ findGreen()
-------------------------------------------------------------------------------
-- Searches for the green portal in the fight area to determine our location
-------------------------------------------------------------------------------
}



function findGreen: Boolean;
var
tFrame, tFrameEdge, tPortal, tPortalEdge, tEdge: TPointArray;
aEdge: T2DPointArray;
i: Integer;
p: TPoint;
b: TBox;
begin
if LocateMe = 1 then
begin
SDB('We are in green portal, we won' 't be searching for green portal here');
writeln('We are in lobby, not going to look for the portal!');
exit(True);
end;
if inCombat() then
begin
SDB('Not searching for green portal in combat');
writeln('We are in combat, not going to look for the portal!');
exit(True);
end;
if GP >= randomRange(3, 4) then
begin
if isLoggedIn() then
begin
Green := 1;
Alarm();
if (takeScreenshots) then
begin
screenShot;
end;
GP := 0;
Green := 0;
inc(EastW);
screenCount := 0;
Boot('Cannot detect green portal, we are going to attempt to relog');
wait(5000 + Random(3500));
Boot('We are logging to lobby');
players[currentPlayer].exitToLobby();
end;
if not isLoggedIn() then
begin
GP := 0;
screenCount := 0;
Green := 0;
Boot('Signing back online');
players[currentPlayer].login();
wait(1000 + Random(1500));
Boot('Closing Poll');
closePollWindow();
exitTreasure();
Minimap.ClickCompass;
mainscreen.setangle(MS_ANGLE_HIGH);
end;
end;
if inSafe() then
begin
screenSetUp();
screenCount := 1;
Pt.start;
Result := False;
Inc(GP);
SDB('Looking for green portal ' + IntToStr(GP) + ' times');
FindColorsTolerance(tFrame, 3100230, Mainscreen.getBounds(), 5, ColorSetting(2, 0.72, 2.62));
tFrameEdge := FindTPAEdges(tFrame);
FindColorsTolerance(tPortal, 2381889, Mainscreen.getBounds(), 20, ColorSetting(2, 0.07, 0.44));
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());
with (smartImage) do
begin
clearArea(Mainscreen.getBounds());
drawTPA(tEdge, clWhite);
drawBox(b, False, clWhite);
drawBox(0, 367, 574, 385, true, clAqua);
drawBox(0, 367, 65, 385, true, clTeal);
drawText('Status: ', point(14, 368), UpCharsEx, false, clAqua);
drawText('We are searching for green portal', point(79, 368), UpCharsEx, false, clTeal);
end;
if (getPixelShift(b, 100) > 200) then
begin
Mouse(b.getRandomPoint());
if (isMouseOverText(['Leave'])) then
begin
ClearScreenDebug;
SDB('Found green portal (' + ToStr(GP) + ' tries, ' + ToStr(Pt.getTime / 1000) + ' secs)');
case Random(100) of
0..50:
begin
GP := 0;
Green := 0;
randomComp();
Exit(True);
end;
51..100:
begin
GP := 0;
Green := 0;
smallRandomMouse();
randomComp();
Exit(True);
end;
end;
end;
end;
end;
end;
end;

{ leavePortal()
-------------------------------------------------------------------------------
-- Leaves and terminates if found inside red portal
-------------------------------------------------------------------------------
}

procedure LeavePortal;
begin
SDB('Detected Red Portal, Leaving Portal');
if not (LocateMe = 5) then
begin
while (LocateMe > 4) do
begin
if LocateMe < 5 then
Break;
MMM(PolToPT(180, RandomRange(20, 70), MMCC), 3);
end;
end;
if LocateMe < 4 then
Exit;
SDB('We are in safe area now, shutting down');
end;

{ LookAtPlayers()
-------------------------------------------------------------------------------
-- Sets screen angle according to player colours
-------------------------------------------------------------------------------
}

procedure LookAtPlayers;
begin
minimap.setAngle(PtToPol(0, FA, MMCC));
end;

{ GoToPlayers()
-------------------------------------------------------------------------------
-- Handles swiching weapons, prayer activation and walking out of safe
-------------------------------------------------------------------------------
}


procedure GoToPlayers;
begin
ClearScreenDebug;
SDB('Walking into Fight Area');
MouseSpeed := RandomRange(30, 50);
case Random(100) of
0..30:
begin
case Random(100) of
0..50:
minimap.clickCompass;
51..100:
minimap.setAngle(0);
end;
Wait(random(1000, 4000));
if (quickPrayers) then
begin
if (actionBar.getPrayerPercent() > 0) then
begin
if not prayerActive() then
begin
SDB('Activating prayer');
EP();
end;
end;
end;
case Random(75) of
0..25:
begin
MiniMapWalk1();
end;
26..50:
begin
MiniMapWalk2();
end;
51..75:
begin
MiniMapWalk3();
end;
end;
Wait(1000 + Random(1225));
if (switchWeps) then
begin
switchCombat();
end;
end;
31..75:
begin
wait(random(300, 1050));
case Random(100) of
0..50:
minimap.clickCompass;
51..100:
begin
mainscreen.setangle(MS_ANGLE_HIGH);
minimap.setAngle(0);
end;
end;
if (switchWeps) then
begin
switchCombat();
end;
Wait(300 + Random(950));
case Random(75) of
0..25:
begin
MiniMapWalk1();
end;
26..50:
begin
MiniMapWalk2();
end;
51..75:
begin
MiniMapWalk3();
end;
end;
if (quickPrayers) then
begin
if (actionBar.getPrayerPercent() > 0) then
begin
if not prayerActive() then
begin
SDB('Activating prayer');
EP();
end;
end;
end;
end;
76..100:
begin
case Random(100) of
0..50:
minimap.clickCompass;
51..100:
begin
minimap.setAngle(0);
mainscreen.setangle(MS_ANGLE_HIGH);
end;
end;
if (quickPrayers) then
begin
if (actionBar.getPrayerPercent() > 0) then
begin
if not prayerActive() then
begin
SDB('Activating prayer');
EP();
end;
end;
end;
if (switchWeps) then
begin
switchCombat();
end;
case Random(75) of
0..25:
begin
MiniMapWalk1();
end;
26..50:
begin
MiniMapWalk2();
end;
51..75:
begin
MiniMapWalk3();
end;
end;
end;
end;
if (LocateMe < 2) then
begin
ClearScreenDebug;
HandleUnknown();
Exit;
end;
end;

{ fr33BitMaps()
-------------------------------------------------------------------------------
-- Frees the painted bitmap
-------------------------------------------------------------------------------
}

procedure fr33BitMaps();
begin
freeBitMap(scriptPaintBMP);
end;

{ useAbility()
-------------------------------------------------------------------------------
-- Does our abilities
-------------------------------------------------------------------------------
}

procedure useAbility;
var
adrenaline: integer;
begin
adrenaline := actionBar.getAdrenalinePercent();

if (adrenaline < random(0, 49)) then
begin
SDB('Cannot call any abilities, not enough adrenaline');
end;

if (adrenaline >= 50) and (allow = 0) then
begin
allow := 1;
if ((actionBar.getCurrentBar()) = 1) then
begin
SDB('Using slaughter ability');
end;
if ((actionBar.getCurrentBar()) = 2) then
begin
SDB('Using snapshot ability');
end;
if ((actionBar.getCurrentBar()) = 3) then
begin
SDB('Using asphyxiate ability');
end;
case Random(50) of
0..25:
begin
ActionBar.clickSlot(SLOT50, MOUSE_MOVE);
Fastclick(MOUSE_LEFT);
end;
26..50:
begin
sendKeys(ABILITY50, 200, 600);
end;
end;
end
else if (adrenaline = 100) then
begin
allow := 0;
if ((actionBar.getCurrentBar()) = 1) then
begin
SDB('Using overpower ability');
end;
if ((actionBar.getCurrentBar()) = 2) then
begin
SDB('Using deadshot ability');
end;
if ((actionBar.getCurrentBar()) = 3) then
begin
SDB('Using omnipower ability');
end;
case Random(50) of
0..25:
begin
ActionBar.clickSlot(SLOT100, MOUSE_MOVE);
Fastclick(MOUSE_LEFT);
end;
26..50:
begin
sendKeys(ABILITY100, 100, 900);
end;
end;
end;
end;

{ callAntiBan()
-------------------------------------------------------------------------------
-- Calls our anti ban
-------------------------------------------------------------------------------
}

procedure callAntiBan;
begin
if not (attackPlayers) and loopCount >= (randomRange(20, 30)) then
begin
SDB('It''s time to perform antiban, number is ' + toStr(loopCount));
wait(random(1000, 5000));
HandleAntiBan();
loopCount := 0;
inc(antiTimes);
end else
if (attackPlayers) and loopCount >= (randomRange(75, 125)) then
begin
SDB('It''s time to perform antiban, number is ' + toStr(loopCount));
wait(random(1000, 9000));
HandleAntiBan();
loopCount := 0;
inc(antiTimes);
end;
end;

{ MainLoop()
-------------------------------------------------------------------------------
-- Repeats our tasks
-------------------------------------------------------------------------------
}

procedure MainLoop;
begin
inc(loopCount);
if LocateMe = 1 then
GoInPortal();
if LocateMe = 2 then
GoToPlayers();
if (attackPlayers) then
getTarget();
if inCombat() and (attackPlayers) then
useAbility();
if (incomingUpdate) then
begin
Alarm();
end;
end;

{ checkTerminate()
-------------------------------------------------------------------------------
-- Checks for the messages from the names in the array
-------------------------------------------------------------------------------
}

function checkTerminate(): boolean;
var
KEYWORDS: TStringArray;
begin
KEYWORDS := [
'From Bu',
'From Sick'
];
result := chatbox.findText(KEYWORDS);
end;

{ checkChat()
-------------------------------------------------------------------------------
-- Logs player out if message from Bu11et is found
-------------------------------------------------------------------------------
}

procedure checkChat();
begin
if (PMShutDown) then
begin
if checkTerminate then
begin
Boot('Sounding Alarm, message from Bu11et detected');
Alarm();
Boot('Message from Bu11et detected, Logging out player');
if not inCombat() then
begin
Boot('Sending player North');
minimap.clickCompass;
MiniMapWalk1;
Boot('Logging out player');
players[currentPlayer].exitToLobby();
wait(random(3500, 7000));
Boot('Logging in player');
players[currentPlayer].login();
end else
if inCombat() then
begin
Boot('We are in combat, waiting til signout');
wait(random(30000, 60000));
Boot('Logging out player');
players[currentPlayer].exitToLobby();
wait(random(3500, 7000));
Boot('Logging in player');
players[currentPlayer].login();
end;
end else
if not checkTerminate then
begin
Boot('No messages found from Sickbu11et or Bu11et, not relogging');
end;
end;
end;

{ sendStatus()
-------------------------------------------------------------------------------
-- Sends a balloon hint of the status of the player
-------------------------------------------------------------------------------
}

procedure sendStatus();
begin
if not isLoggedIn() then
begin
showBalloonHint('NS BOT Status', 'We are NOT signed in. '+healthPercent+' '+PrayerPercent+'', 3000, 0);
end;

if inSafe() then
begin
showBalloonHint('NS BOT Status', 'We are in the Fight Area. '+healthPercent+' '+PrayerPercent+'', 3000, 0);
end;

if inCombat() then
begin
showBalloonHint('NS BOT Status', 'We are in combat. '+healthPercent+' '+PrayerPercent+'', 3000, 0);
end;

if LocateMe = 1 then
begin
showBalloonHint('NS BOT Status', 'Looking for safe portal. '+healthPercent+' '+PrayerPercent+'', 3000, 0);
end;

if LocateMe = 2 then
begin
showBalloonHint('NS BOT Status', 'We are walking into Fight Area. '+healthPercent+' '+PrayerPercent+'', 3000, 0);
end;

if LocateMe = 3 then
begin
showBalloonHint('NS BOT Status', 'We are in the Fight Area. '+healthPercent+' '+PrayerPercent+'', 3000, 0);
end;

if inSafe() and inMulti() then
begin
showBalloonHint('NS BOT Status', 'We have been lured. '+healthPercent+' '+PrayerPercent+'', 3000, 0);
end;
end;

{ sixHourFix()
-------------------------------------------------------------------------------
-- Reloads our client if we game session
-------------------------------------------------------------------------------
}

procedure sixHourFix(); override;
begin
print('sixHourFix():', TDebug.HEADER);

if (players.getActive() < 1) then
print('No active players, no use in reloading the client!', TDebug.FATAL);

smartReloadClient((SESSION_TIME * 60000) + random(10000));

if (waitClientReady()) then
begin
print('Client succesfully loaded after reload');
Boot('Logging player in');
wait(random(2500, 6500));

if (players[currentPlayer].login()) then
begin
print('Succesfully logged in after client was reloaded');

Boot('Closing Poll');
wait(random(500, 4000));
closePollWindow();
Boot('Closing treasure');
exitTreasure();
wait(random(1000, 4000));
Boot('Setting screen to face north');
minimap.setAngle(0);

print('sixHourFix()', TDebug.FOOTER);
exit();
end else
print('Failed to login player after restart', TDebug.FATAL);
end else
print('Client never reloaded after restart..', TDebug.FATAL);
end;

var
loop: Integer;
begin
smartShowConsole := FALSE;
installAssets();
initPlayerForm();
runPlayerForm();

if (not playerForm.isScriptReady) then
begin
terminatescript;
end;

smartPlugins := ['d3d9.dll'];
disableSRLDebug := true;
disableSRLLog := true;

smartEnableDrawing := true;
SetupSRL;
declarePlayers;

if (sendStatuses) then
begin
statusMarker.start();
end;

if (eastWestDetection) then
begin
lureMarker.start();
end;

if (PMShutDown) then
begin
PMMarker.start();
end;

if not (attackPlayers) then
begin
abilityMarker.start();
end;

if not (newPaint) then
begin
scriptPaintBMP := loadBitmap(appPath + 'Scripts\Bu11ets_NS_Bot_Images\clanwarsns3.png');
end
else
if (newPaint) then
begin
scriptPaintBMP := loadBitmap(appPath + 'Scripts\Bu11ets_NS_Bot_Images\clanwarsns4.png');
end;
fastReplaceColor(scriptPaintBMP, 0, 1);
addOnTerminate('fr33BitMaps');
screenCount := 0;
AE := 0;
GP := 0;
ClearScreenDebug;

repeat

if not isLoggedIn() then
begin
Alarm();
if (takeScreenshots) then
begin
screenShot;
end;
Boot('Logging player in');
wait(random(2500, 4500));
players[currentPlayer].login();
Boot('Closing Poll');
wait(random(1000, 3000));
closePollWindow();
Boot('Closing treasure');
exitTreasure();
wait(random(1000, 2000));
Boot('Setting screen to face north');
minimap.setAngle(0);
end;
until isLoggedIn();

repeat

if not (attackPlayers) then
begin
if abilityMarker.getTime >= (randomRange(120000, 150000)) then
begin
case Random(50) of
0..25:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(ANTISLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(ANTICIPATION, 200, 400);
end;
end;
26..50:
case Random(50) of
0..25:
begin
ActionBar.clickSlot(FREESLOT, MOUSE_LEFT);
end;
26..50:
begin
sendKeys(FREEDOM, 200, 400);
end;
end;
end;
end;
abilityMarker.reset();
abilityMarker.start();
end;

if (sendStatuses) then
begin
if statusMarker.getTime > (STATUS_FREQUENCY * 3600000) then
begin
SDB('Sending status notification');
sendStatus;
statusMarker.reset();
statusMarker.start();
end;
end;

if (eastWestDetection) then
begin
if lureMarker.getTime > (randomRange(125000, 125000)) then
begin
SDB('Time has passed.. time to look for green portal..');
findGreen();
lureMarker.reset();
lureMarker.start();
end;
end;

if (PMShutDown) then
begin
if PMMarker.getTime > (randomRange(30000, 75000)) then
begin
SDB('Searching for private message..');
checkChat();
PMMarker.reset();
PMMarker.start();
end;
end;

PaintProgress;
MainLoop;
wait(random(6000, 20000));
callAntiBan();

until False;
end.

Main's Clan Wars Script (thread: https://villavu.com/forum/showthread.php?t=66235)

//{$Define SMART}
//Post Nuke Edition Beta
//Visit Villavu.com for more!
Program ClanWar;
{$IfDef SMART}
{$I SRL\SRL\Misc\SMART.SCAR}
{$EndIf}

{$i SRL\SRL.scar}
{$i SRL\SRL\misc\Debug.scar}
{$IfDef SMART}
{$i srl/srl/misc/paintsmart.scar}
{$EndIf}

Const
ShowDebugGFX = True;

Function LocateMe: Integer; Forward;

procedure LesGoat;
Begin
HowManyPlayers := 1;
NumberOfPlayers( HowManyPlayers);
CurrentPlayer := 0;

Players[ 0].Name :='';
Players[ 0].Pass :='';
Players[ 0].Nick :='';
Players[ 0].Active := True;
Players[ 0].Booleans[ 0] := False; //True for P2P, False for F2P.
Players[ 0].Booleans[ 1] := True; //Turn on XP TAB? *** If you normally play with it on, please set this to true.
Players[ 0].Booleans[ 2] := True; //Quick Pray? Please set it up. If you don't know what quick pray is then leave it as false.
End;


Function LookingAtPortal: Boolean; Forward;

////////////////////////////Some custom includes
Var
TP: Tpoint;
OldDB: String;
MSCC, MMCC: TPoint;

Function TR: String;
Begin
Result := 'Ran for ' + TimeRunning + ' : ';
End;

Function Compas: Integer;
Begin
Result := Round( RS_GetCompassAngleDegrees);
End;

Var
DCBS: Tpoint;

Procedure ClearAllDebug;
Begin
{$IfDef SMART}
ClearRSCanvas(SMART_Canvas.canvas);
{$EndIf}
Cleardebug;
DCBS := IntToPoint( 0, 0);
End;

Function CoordToStr( TP: TPoint): String;
Begin
Result := '( ' + IntToStr( TP.X) + ', ' + IntToStr( TP.Y) + ')';
End;

Procedure SDB( S: String);
Var
DCB: Tpoint;
Begin
If S = OldDB Then
Exit;
Writeln( TR + S);
If DCBS.X > 40 Then
ClearAllDebug;
If DCBS.Y > 20 Then
DCBS.Y := 0;
If DCBS.X < 21 Then
DCB.X := MSX1 + 5
Else
DCB.X := MSCX + 5;
DCB.Y := DCBS.Y * 15 + MSY1 + 15;
If ShowDebugGFX Then
Begin
{$IfDef SMART}
SMART_DrawTextEx( False, DCB.X, DCB.Y, 'SmallChars', S, clYellow);
Inc( DCBS.X);
Inc( DCBS.Y);
{$EndIf}
End;
OldDB := S;
End;

Procedure DATPAB(MaATPA: array of TPointArray);
var
i: integer;
Begin
If ShowDebugGFX Then
Begin
{$IfDef SMART}
DCBS := IntToPoint( 0, 0);
DrawDotsMulti( True, MaATPA);
For i := 0 to High(MaATPA) do
SMART_DrawBoxEx(False, getTPABounds(MaATPA[i]), clRed);
{$EndIf}
End;
End;

Function GMP( T: Tpoint): Tpoint;
//Can serve as a shorten version of GetMousePos but it can also be used to read the results from it.
Begin
GetMousePos( T.X, T.Y)
Result := T;
End;

Procedure WaitTilFKey( I : Integer);
Begin
Repeat
Wait( 1);
Until IsFKeyDown( I);
End;

Procedure WaitLoad;
//If locateme = 1 then waits for loading screen.
//Else its a pretty good alternative to flag;
Var
WLT: Integer;
Begin
Wait( Random( 1000));
Flag;
If Not( LocateMe = 1) Then
Exit;
MarkTime( WLT);
Repeat
Wait( Random( 500));
Until Not( GetColor( 48, 19)= 16777215) or ( TimeFromMark( WLT) > 3000);
End;

Function CA( A: Integer): Integer;
//Convert angle that is higher or lower than 360 and -360 respectively to its correct angle.
Begin
Result := A;
While Result > 360 Do
Result := Result - 360;
While Result < 0 Do
Result := Result + 360;
End;

Function PtToPol( A: Integer; I, C: Tpoint): Integer;
//Convert an point'I'to a angle'Result'from the center point'C'.
//A is a over ride if you wish to use a custom compass angle.
var
N: TPoint;
D , H: Integer;
Begin
If A = 0 Then
D := Compas
else
D := A;
I.X := I.X - C.X;
I.Y := I.Y - C.Y;
H := Round( Hypot( I.X, I.Y));
If H = 0 Then
H := 1;
I.X := 76 * I.X / H;
I.Y := 76 * I.Y / H;
N := Inttopoint( - Round( 1000 * Sin( Radians( D))), - Round( 1000 * Cos( Radians( D))));
H := Round( Hypot( N.X, N.Y));
N := IntToPoint( 76 * N.X / H, 76 * N.Y / H);
Result := 360 - Round( Degrees( ArcCos( ( N.X * I.X + N.Y * I.Y) / ( 1 + Hypot( I.X, I.Y) * Hypot( N.X, N.Y)))));
If Result > 0 Then
Begin
If D < 180 Then
Begin
If ( ( I.X < 0) and ( I.Y < N.Y)) or ( ( I.X > 0) and ( I.Y < -1 * N.Y)) Then Result:= 360 - Result;
End else
If ( ( I.X < 0) and ( I.Y > -1 * N.Y)) or ( ( I.X > 0) and ( I.Y > N.Y)) Then Result:= 360 - Result;
End;
End;

Function PolToPt( A, H: Integer; C: Tpoint): TPoint;
//Convert a angle'A'to a point'Result'from the center'C'.
//'H'is the distance from the point'C'.
Var
P: TPoint;
Rh: Integer;
Begin
A := 360 - A;
P.X := Round( - 100 * Sin( Radians( Compas + A )));
P.Y := Round( - 100 * Cos( Radians( Compas + A )));
Rh := Round( Hypot( P.X, P.Y));
P.X := C.X + H * P.X / Rh
P.Y := C.Y + H * P.Y / Rh;
Result:= P;
End;

Function PtToHyp( I, C: TPoint): Integer;
//Get the distance'Result'of the point'I'from the center point'C'.
Begin
Result := Round( Hypot( I.X - C.X, I.Y - C.Y));
End;

Function WithInLine( A: Integer; I, C: Tpoint): Boolean;
//Check If any point within the angle A to A + 180, like a line.
Begin
Result := False;
If ( ( A < 180) and ( PtToPol( 0, I, C) > A) and ( PtToPol( 0, I, C) < ( A + 180)))
Or ( ( A > 179) and ( PtToPol( 0, I, C) > A) or ( PtToPol( 0, I, C) < ( A - 180))) Then
Result := True;
End;

Function WithinCircle( Cx, Cy, Ra: Integer; I: Tpoint): Boolean;
//Check If any point within the circle centered at Cx, Cy with radius Ra.
Var
TP1: Tpoint;
Begin
TP1 := IntToPoint( Cx, Cy);
If PtToHyp( I, TP1) < Ra Then
Result := True
Else
Result := False;
End;

Function WithInBox( SX, SY, EX, EY: Integer; I: Tpoint): Boolean;
//You shouldn't need instruction on this.
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 AdvMMToMS( I:Tpoint): Tpoint;
//MM: 76 Pixel Per 18 Tile.
//MS: 511 Pixel Per 14 Tile.
Var
JGX: Tpoint;
Begin
JGX.X := PtToPol( 0, I, MMCC);
JGX.Y := PtToHyp( I, MMCC);
Result := PolToPt( JGX.X, 35 + 657 * JGX.Y / 76, MSCC);
End;

Function ToMS( T: TPoint): Tpoint;
//Convert a point so that its within the main screen.
Var
Ang,
Dis: Integer;
Begin
Ang := PtToPol( 0, T, MSCC);
Dis := PtToHyp( T, MSCC);
Result := PolToPt( Ang, Dis, MSCC);
While Not( WithInBox( MSX1, MSY1, MSX2, MSY2, Result)) Do
Begin
Dis := Dis - Random( 10);
Result := PolToPt( Ang, Dis, MSCC);
End;
End;

Function ToMM( T: TPoint): Tpoint;
//Convert a point so that its within the minimap.
Var
Ang,
Dis: Integer;
Begin
Ang := PtToPol( 0, T, MMCC);
Dis := PtToHyp( T, MMCC);
Result := PolToPt( Ang, Dis, MMCC);
While Not( WithInCircle( MMCX, MMCY, 75, Result)) Do
Begin
Dis := Dis - Random( 10);
Result := PolToPt( Ang, Dis, MMCC);
End;
End;

Procedure ClickCoord( I : Tpoint); Forward;

Procedure MMM( I: Tpoint; T: Integer);
//I got tired of typing MMouse, Mouse and ClickCoord. So I made this to ease my life abit:P
//T = 0 is mmouse, T = 1 is mouse( i.x, i.y, rx, ry, true), T = 2 is mouse( i.x, i.y, rx, ry, false) and T = 3 is clickcoord( I).
Begin
SDB( 'MMM ' + CoordToStr( I) + ' Type ' + IntToStr( T) + '.');
If T > 0 Then
Begin
If T > 1 Then
Begin
If T > 2 Then
ClickCoord( I)
Else
Mouse( I.X, I.Y, 0, 0, False);
End Else
Begin
T := 0;
Repeat
Mouse( I.X, I.Y, 0, 0, True);
Inc( T)
Until T > RandomRange( 0, 1);
End;
End Else
Mmouse( I.X, I.Y, 0, 0);
End;

Procedure ClickCoord( I : Tpoint);
//Takes in a coordinate, determine If its on mm or ms, and click it on either mini map or main screen.
//It is in your best interest that you make sure I is within mm or ms already.
Var
Atmp : Integer;
Begin
Atmp := 0;
If I.X < MSX2 Then
Begin
SDB( 'Coord is in main screen.');
Case Random( 2) Of
0: Begin
SDB( 'It will stay in main screen.');
MMM( I, 1);
End;
1: Begin
SDB( 'Converting it into mini map.');
I := PolToPt( PtToPol( 0, I, MSCC), PtToHyp( I, MSCC) / 10, MMCC);
MMM( I, 1);
End;
End;
End Else
Begin
SDB( 'Coord is in mini map.');
Case Random( 2) Of
0: Begin
SDB( 'It will stay in mini map.');
MMM( I, 1);
End;
1: Begin
SDB( 'Converting it into main screen.');
MMM( ToMS( AdvMMToMs( I)), 0);
While Not( IsUpText( 'alk here')) Do
Begin
Inc( Atmp);
If ( Atmp > RandomRange( 2, 5)) Then
Break;
SDB( 'Not a valid point to click');
I := ToMS( IntToPoint( I.X + RandomRange( - 50, 50), I.Y + RandomRange( - 50, 50)));
MMM( I, 0);
Wait( 100 + Random( 400));
End;
MMM( I, 1)
End;
End;
End;
Flag;
End;

Procedure SphereCam( X, Y: Integer);
//'Randomly' pans camera like a human with some what correct wait time.
//Could be improved but there is a bug with simba's wait time, works great nonethless.
Var
WDT, WT: Tpoint;
Begin
SDB( 'SphereCam( ' + IntToStr( X) + ',' + IntToStr( Y) + ');');
WT := IntToPoint( Round( Abs( X * 4800 / 360)), Round( Abs( Y * 1200 / 90)));
Case Random ( 2) of
0: Begin
If X < 0 Then
KeyDown( VK_Left);
If X > 0 Then
KeyDown( VK_Right);
MarkTime( WDT.X);
Wait( Random( WT.X));
If Y < 0 Then
KeyDown( VK_Down);
If Y > 0 Then
KeyDown( VK_Up);
MarkTime( WDT.Y);
Repeat
Wait( Random( 100));
Until ( TimeFromMark( WDT.Y) > Random( WT.Y)) or ( TimeFromMark( WDT.X) > WT.X)
If TimeFromMark( WDT.X) > WT.X Then
Begin
If X < 0 Then
KeyUp( VK_Left);
If X > 0 Then
KeyUp( VK_Right);
End;
End;
1: Begin
If Y < 0 Then
KeyDown( VK_Down);
If Y > 0 Then
KeyDown( VK_Up);
MarkTime( WDT.Y);
If X < 0 Then
KeyDown( VK_Left);
If X > 0 Then
KeyDown( VK_Right);
MarkTime( WDT.X);
Wait( Random( WT.X));
Repeat
Wait( Random( 100));
Until ( TimeFromMark( WDT.X) > Random( WT.X)) or ( TimeFromMark( WDT.Y) > WT.Y)
If TimeFromMark( WDT.X) > WT.X Then
Begin
If Y < 0 Then
KeyUp( VK_Down);
If Y > 0 Then
KeyUp( VK_Up);
End;
End;
End;
Repeat
Wait( Random( 100));
Until TimeFromMark( WDT.X) > WT.X
If TimeFromMark( WDT.X) > WT.X Then
Begin
If X < 0 Then
KeyUp( VK_Left);

If X > 0 Then
KeyUp( VK_Right);
End;
Repeat
Wait( Random( 100));
Until ( TimeFromMark( WDT.Y) > WT.Y);
If TimeFromMark( WDT.Y) > WT.Y Then
Begin
If Y < 0 Then
KeyUp( VK_Down);
If Y > 0 Then
KeyUp( VK_Up);
End;
End;

////////////////////////////End of Includes

Procedure XXXENDOFINCLUDEXXX;
Begin
End;

Var
PC, //Portal Coordinate.
PAC, //Portal Accurate Coordinate.
FA: Tpoint; //Start of fight area.
PA, //Portal Angle.
PD, //Portal Distance.
PX, //X Distance from portal,
PY, //Y Distance from portal;
PT, //Portal Time.

AE, //Number of times we attemped to enter portal.
AF, //Number of times we attemped to fight people.
FT, //Time since last fight.
PrevLoc, //Previous location.
OldXP, OldHP: Integer; //HP since last check.
HPCol: String; //Required to get the current hp.

Procedure ScriptTerminate;
Begin
End;

Function CHP: Integer;
Begin
Result := Round( GetMMLevels( 'hp', HPCol));
If Result < 0 Then
Result := 0;
End;

Procedure RandomComp;
Begin
SDB( 'Random Comp');
Case Random( 3) Of //You may edit.
0: SphereCam( RandomRange( - 180, 180), RandomRange( -60, 90));
1,2: MakeCompass( RandomRange( -180, 180));
End;
End;

Procedure HandleUnknown;
Begin
SDB( 'Handling Unknown.');
If Not Loggedin Then
LoginPlayer;
FindNormalRandoms;
End;

Procedure LookAtPlayers; Forward;
Function AmIInFight: Boolean; Forward;

Procedure HandleAntiBan;
// The reason why I list it like this is because
// I think the Case Random in simba doesn't sort them by
// 1..3, rather sorts them number of entries ":".
Begin
SDB( 'Handling Anti Ban.');
MouseSpeed := RandomRange( 10, 20);
If LocateMe = 1 Then
Exit;
Case Random( 19) Of
0: MMM( Point( Random( MIX2), Random( MIY2)), 0);
4..8: Wait( Random( 100));
9..12: AmIInFight;
13: GetAllLevels;
//14: //HoverSkill( Players[ CurrentPlayer].Strings[ Random( High( Players[ CurrentPlayer].Strings))], False);
15,16: RandomComp;
17,18: LookAtPlayers;
End;
End;

Function Fighting( T: Tpoint): Boolean;
//Finds If hp bar is present around the given point 'T', I use it to check If other is in fight.
Var
OFX, OFY: Tpoint;
HPMod: Integer;
Begin
HPMod := 100 * ( T.Y - MSCY) / MSY2;
OFX := IntToPoint( T.X - 25, T.X + 25);
OFY := IntToPoint( T.Y - ( 100 + HPMod), T.Y);
If OFX.X < 0 Then
OFX.X := 0;
If OFY.X < 0 Then
OFY.X := 0;
Result := FindColorSpiralTolerance( T.X, T.Y, 52606, OFX.X, OFY.X, OFX.Y, OFY.Y, 39) OR FindColorSpiralTolerance( T.X, T.Y, 327842, OFX.X, OFY.X, OFX.Y, OFY.Y, 25);
End;

Function LocateMe: Integer;
//0 is unknown/randonm, 1 is in game grotto, 2 is in white protal safe area, 3 is in white portal fight area, 4 is red portal safe area and 5 is red area fight area.
Var
LCM: Tpoint;
Begin
If Not LoggedIn Then
LoginPlayer;
Result:= 0;
If FindSymbol( LCM.X, LCM.Y,'minigame') and Not( FindSymbol( LCM.X, LCM.Y,'bank')) Then
Begin
MMM( Point( PolToPt( RandomRange( 30, 70), RandomRange( 20 + Random( 30), 76), MMCC).X, PolToPt( 60 + Random( 60), Random( 76), MMCC).Y), 1);
Flag;
End;
If ( FindSymbol( LCM.X, LCM.Y,'bank') and ( FindSymbol( LCM.X, LCM.Y,'minigame')) or FindSymbol( LCM.X, LCM.Y,'bank')) Then
Begin
Result:= 1; //Logged in and in game grotto.
Players[ CurrentPlayer].Level[ 3] := CHP;
MarkTime( Pt);
End;
If GetColor( 478, 139) = 2070783 Then
Begin
Result := 3; //In white portal fight area
If GetColor( 267, 33) = 3635889 Then
Result := 2; //In white protal safe area
If PrevLoc = 1 Then
MarkTime( AE);
End;
If GetColor( 478, 139) = 65535 Then
Begin
Result := 5; //In red area fight area
If GetColor( 267, 33) = 3635889 Then
Begin
Result :=4; //In red portal safe area
End;
End;
PrevLoc := Result;
If Not ( PrevLoc = Result) Then
ClearAllDebug;
If ( Result > 1) and ( Result < 4) and ( TimeFromMark( AE) > RandomRange( 2000, 10000)) Then
If ( GetColor( 716, 76) = 5711672) and Players[ CurrentPlayer].Booleans[ 2] Then
Begin
MMM( PolToPt( Random( 360), 16, Point( 725, 70)), 1);
SDB( 'ACTIVATED PRAY MOTHER FUCKER!');
End;
If Players[ CurrentPlayer].Booleans[ 1] Then
ToggleXPBar( True);
If Result = 0 Then
HandleUnknown;
MouseSpeed := RandomRange( 10, 20);
FA := PolToPt( 315, 75, MMCC);
If FindColorSpiralTolerance( FA.X, FA.Y, 6517323, MMX1, MMY1, MMX2, MMY2, 6) and
( PtToPol( 0, FA, MMCC) - 330 < 10) and ( PtToPol( 0, FA, MMCC) - 330 > - 270) Then
Begin
SDB( 'We are too east, going west');
FA := PolToPt( 270, RandomRange( 45, 75), MMCC);
Wait( Random( 3000));
MMM( FA, 1);
Exit;
End;
If Not FindColorSpiralTolerance( FA.X, FA.Y, 132354, MMX1, MMY1, MMX2, MMY2, 7) Then
Begin
SDB( 'We are too north, going south.');
FA := PolToPt( 180, RandomRange( 45, 75), MMCC);
Wait( Random( 3000));
MMM( FA, 1);
Exit;
End;
SDB( 'Checked location and its ' + IntToStr( Result) + '.');
End;

Procedure LocatePortal;
Begin
TP := PolToPt( 0, 76, MMCC);
If FindColorSpiralTolerance( TP.X, TP.Y, 9697013, MMX1, MMY1, MMX2, MMY2, 0) Then
Begin
TP := PolToPt( 0, 15, TP);
TP := PolToPt( 270, 54, TP);
PAC := TP;
PD := PtToHyp( TP, MMCC);
PA := PtToPol( 0, TP, MMCC);
PC := PolToPT( RandomRange( 160, 200), RandomRange( 5, 20), PAC);
PX := Round( PD * Sine( PA));
PY := Round( PD * Cose( PA));
SDB( 'Portal was found at ' + CoordToStr( PAC) + ' at ' + IntToStr( PA) + ' degrees.');
SDB( 'We are ' + CoordToStr( Point( PX, PY)) + ' away from portal.');
End Else
SDB( 'DID NOT FIND PORTAL!');
End;

Function LocateNoobs: Integer;
//Arrow: 1795803, Tol 2. Flo 2508374, tol 7. Tree 994363,12 Bound 132354, 4//vater6517323,8
Var
TPA: TPointArray;
ATPA: T2DPointArray;
Begin
FA := PolToPt( 315, 75, MMCC);
If FindColorSpiralTolerance( FA.X, FA.Y, 6517323, MMX1, MMY1, MMX2, MMY2, 8) and
( PtToPol( 0, FA, MMCC) - 330 < 10) and ( PtToPol( 0, FA, MMCC) - 330 > - 270) Then
Begin
SDB( 'We are too east, going west');
FA := PolToPt( 270, RandomRange( 45, 75), MMCC);
Wait( Random( 3000));
MMM( FA, 1);
Exit;
End;
If Not FindColorSpiralTolerance( FA.X, FA.Y, 132354, MMX1, MMY1, MMX2, MMY2, 10) Then
Begin
SDB( 'We are too north, going south.');
FA := PolToPt( 180, RandomRange( 45, 75), MMCC);
Wait( Random( 3000));
MMM( FA, 1);
Exit;
End;
FA := MMCC;
If FindColorSpiralTolerance( FA.X, FA.Y, 994363, MMX1, MMY1, MMX2, MMY2, 12) Then
Begin
FA := PolToPt( 0, RandomRange( 20, 40), FA);
FA := PolToPt( 90, RandomRange( 30, 90), FA);
Result := 2;
If PtToPol( 0, FA, MMCC) < 180 Then
Begin
If FindColorsSpiralTolerance( FA.X, FA.Y, TPA, 2508374, MMX1, MMY1, MMX2, MMY2, 7) Then
Begin
ATPA := TPAToATPAEx( TPA, 15, 15);
FA := PolToPt( 90, Random( 60), MiddleTPA( ATPA[ 0]));
FA := PolToPt( 180, Random( 30), FA);
Result := 3;
End;
End;
End;
If Result < 1 Then
Begin
SDB ( 'DID NOT FIND NOOBS!')
Exit;
End Else
Begin
SDB ( 'Type ' + IntToStr( Result) + ' Noobs Found.');
FA := ToMM( FA);
SetLength( ATPA, 1);
SetLength( TPA, 1);
TPA[ 0] := FA;
ATPA := TPAToATPAEx( TPA, 15, 15);
DATPAB( ATPA);
Exit;
End;
End;

Function NotInFA( T: Tpoint): Boolean;
Begin
LocateNoobs;
TP := ToMS( AdvMMToMS( FA));
If WithInLine( 90, T, TP) Then
Result := True
Else
Result := False;
End;

Function InFA( TestPoint: Tpoint): Boolean;
Begin
If Not( WithInBox( MSX1, MSY1, MSX2, MSY2, TestPoint))
Or WithInCircle( 15, 137, 10, TestPoint)
Or WithInCircle( 485, 170, 30, TestPoint)
Or WithInBox( 220, 85, 270, 215, TestPoint)
Or WithInBox( 0, 0, 360, 20, TestPoint)
Then
Begin
Result := False;
SDB( ' Not in bound ' + CoordToStr( TestPoint) + '.');
End Else
Begin
Result := True;
SDB( ' In bound ' + CoordToStr( TestPoint) + '.');
End;
End;

Function LookingAtPortal: Boolean;
//Will tell you if you are looking at portal.
Var
LAPS, LAPE: Tpoint;
Begin
LocatePortal;
PAC := ToMS( AdvMMToMs( PAC));
LAPS := IntToPoint( PAC.X - 50, PAC.Y - 50);
LAPS := ToMS( LAPS);
LAPE := IntToPoint( PAC.X + 50, PAC.Y + 50);
LAPE := ToMS( LAPE);
Result := FindColorSpiralTolerance( PAC.X, PAC.Y, 1788506, LAPS.X, LAPS.Y, LAPE.X, LAPE.Y, 9) and ( Round( Abs( Compas - PA)) < ( 60 + ( 20 - PD)));
If Result Then
SDB( 'We are looking at portal')
Else
SDB( 'We are not looking at portal');
End;

Procedure FacePortal( R: Integer);
Var
FaceTime: Integer;
Begin
SDB( 'Facing portal.');
LocatePortal;
Case Random( 2) Of
0: R := -R;
End;
FaceTime := Compas;
PA := ( PA + R);
Makecompass( PA);
End;

Procedure LookPortal( R: Integer);
Var
MinH: Integer;
Begin
LocatePortal;
SDB( 'Attempting to look at portal.');
IF PD < RandomRange( 10, 15) Then
MinH := RandomRange( -60, 90)
Else
MinH := - 40 - PD;
Case Random( 2) Of
0: R := -R;
End;
Case Random( 3) Of
0: Begin
FacePortal( R);
Case Random( 2) Of
0: SphereCam( R, RandomRange( MinH, MinH - PD));
1: SphereCam( 0, RandomRange( MinH, MinH - PD));
End;
End;
1: Begin
Case Random( 2) Of
0: SphereCam( R, RandomRange( MinH, MinH - PD));
1: SphereCam( 0, RandomRange( MinH, MinH - PD));
End;
FacePortal( R);
End;
2: Begin
Case Random( 4) Of
0: ClickNorth( False);
1: SphereCam( R, RandomRange( MinH, MinH - PD));
2: SphereCam( R, 0);
End;
End;
End;
AE := 0;
End;

Procedure GoToPortal;
Begin
SDB( 'GoToPortal;');
If Not LocateMe = 1 Then
Exit;
LocatePortal;
If PD < 20 Then
MMM( PC, 3)
Else
MMM( PC, 1);
Flag;
AE := 0;
End;

Procedure PortalATB;
Begin
If ( AE < 2) and ( Round( PX) < 15) and ( Round( PY) < 10) Then
Exit;
If ( GetColor( 126, 117) = 255) Then
MMM( Point( 435 + Random( 10), 47 + Random( 10)), 1);
If ( PX < - 15) or ( PY > 25) Then
GoToPortal;
If Not( LookingAtPortal) Then
LookPortal( 5);
If ( Round( PX) < 5) and (PY > 25)Then
MakeCompass( RandomRange( -60, 60));
End;

Procedure GoInPortal;
//Portal: 11646922, 58. Frame: 1788506, 9.
Var
PCol, PTol, I: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
Begin
SDB( 'Starting to look for portal.');
LocatePortal;
PortalATB;
Inc( AE);
SDB( 'We have attempted to enter portal ' + IntToStr( AE) + ' times.');
LocatePortal;
TP := ToMS( AdvMMToMS( PAC));
If LocateMe > 1 Then
Exit;
If FindColorsSpiralTolerance( TP.X, TP.Y, TPA, 1133920, MSX1, MSY1, MSX2, MSY2, 13) Then
Begin
SetLength( ATPA, 10);
ATPA := TPAToATPAEx( TPA, 50, 30);
LocatePortal;
For I := 0 To RandomRange( 0, High( ATPA)) Do
Begin
If GetColor( 48, 19)= 16777215 Then
Begin
Wait( Random( 1000));
Exit;
End;
MMM( ToMS( MiddleTPA( ATPA[ I])), 0);
Wait( 10 + Random( 90));
If IsUpText( 'safe)') Then
Begin
MMM( ToMS( MiddleTPA( ATPA[ I])), 1);
SDB( 'Found the safe portal in ' + IntToStr( AE) + ' Tries and ' + IntToStr( TimeFromMark( PT) / 1000) + ' seconds.');
Wait( 3000);
WaitLoad;
Exit;
End;
If AE > RandomRange( 3, 4) Then
PortalATB;
End;
End;
End;

Procedure LeavePortal;
//ExitPortal: 2183740, Tol 17, Size min 20x20. Arrow: 1795803, Tol 2
Begin
SDB( 'We are in red portal, so leaving Portal.');
If Not( LocateMe = 5) Then
Begin
While ( LocateMe > 4) Do
Begin
If LocateMe < 5 Then
Break;
MMM( PolToPT( 180, RandomRange( 20, 70), MMCC), 3);
End;
End;
If LocateMe < 4 Then
Exit;
SDB( 'We are in safe area now please send debug to main.');
Terminatescript;
End;

Procedure LookAtPlayers;
//16119285, 16
Begin
LocateNoobs;
MakeCompass( PtToPol( 0, FA, MMCC));
End;

Procedure GoToNoobs;
//Arrow: 1795803, Tol 2. Flo 2508374, tol 7.
Begin
SDB( 'Going to noobs');
LocateNoobs;
MMM( FA, 3);
AF := 0;
End;

Function AmIInFight: Boolean;
//GetXPBarTotal
Begin
If Round( OldHP - CHP) > 2 Then
Begin
OldHP := CHP;
MarkTime( FT);
End;
If IsXPBarOpen Then
Begin
If Not( GetXPBarTotal = OldXP) Then
Begin
OldXP := GetXPBarTotal;
MarkTime( FT);
End;
End;
If Not( Fighting( MSCC)) Or ( TimeFromMark( FT) > 5400) Or ( LocateMe < 3) Or ( CHP = Players[ CurrentPlayer].Level[ 3]) Then
Result := False
Else
Result := True;
If FindBlackChatMessage( 'lready') Then
Result := True;
If Result Then
SDB( 'I am in fight.')
Else
Begin
SDB( 'I am not in fight.');
MarkTime( FT);
End;
End;

Function ConfirmAttack( T: Tpoint): Boolean;
Begin
SDB( 'Confirming attack at ( ' + IntToStr( T.X) + ',' + IntToStr( T.Y) + ').');
If IsUpText( 'ttack') and Not( IsUpText( 'stallion') or IsUpText( 'titan'))Then
Begin
MMM( T, 1);
Result := True;
End Else
Begin
If IsUpText( 'level') Then
Begin
MMM( T, 2);
ChooseOption( 'ttack');
Result := True;
End Else
Result := False;
End;
If Result Then
SDB( 'Attack confirmed')
Else
SDB( 'Attack not confirmed');
End;

Function Fightable: Boolean;
Begin
If AmIInFight or Fighting( PC) Or FlagPresent Then
Result := False
Else
Result := True;
End;

Procedure FightPlayer;
//F2P: 8021081, 32. P2P: 1517177, 38
Var
FPCol, FPTol, I: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
Begin
If Flag Then
Exit;
SDB( 'Fighting Players.');
Case Random( 2) of
0: RandomComp;
End;
If Players[ CurrentPlayer].Booleans[ 0] Then
Begin
FPCol := 11251383;
FPTol := 44;
End Else
Begin
FPCol := 4143144;//F2p
FPTol := 13;
End;
LocateNoobs;
TP := PolToPt( 0, RandomRange( -180, 180), MMCC);
TP := ToMS( AdvMMToMS( TP));
If FindColorsSpiralTolerance( TP.X, TP.Y, TPA, FPCol, MSX1 + 10, MSY1 + 10, MSX2 - 10, MSY2 - 10, FPTol) Then
Begin
SDB( 'Looking for avaliable players.');
ATPA := TPAToATPAEx( TPA, 20, 20);
SortATPAFrom( ATPA, TP);
DATPAB( ATPA);
For I := 0 To Random( High( ATPA)) Do
Begin
If Flag or( LocateMe < 3) or ( AmIInFight) Then
Exit;
MouseSpeed := RandomRange( 10, 20);
If InFA( MiddleTPA( ATPA[ I])) and Not( Fighting( MiddleTPA( ATPA[ i]))) Then
Begin
SDB( 'Player exisit at ' + CoordToStr( MiddleTPA( ATPA[ I])) + '.');
MMM( MiddleTPA( ATPA[ I]), 0);
Wait( Random( 100));
Inc( AF);
If ConfirmAttack( MiddleTPA( ATPA[ I])) Then
Begin
WaitLoad;
Exit;
End Else
Inc( AF);
End Else
SDB( 'Not valid player exisit at ' + CoordToStr( MiddleTPA( ATPA[ I])) + '.');
End;
End;
If AF < RandomRange( 3, 4) Then
Begin
LookAtPlayers;
Exit;
End Else
Begin
GoToNoobs;
SDB( 'Attempted fight ' + IntToStr( AF) + ' times without result, therefore we are going to players.');
End;
End;

Procedure HandleFight;
Begin
SDB( 'HandleFA;');
If AmIInFight Then
HandleAntiBan
Else
FightPlayer;
End;

Procedure MainLoop;
Begin
If LocateMe = 1 Then
GoInPortal;
If LocateMe = 2 Then
GoToNoobs;
If LocateMe = 3 Then
HandleFight;
If LocateMe > 3 Then
LeavePortal;
End;

Begin
{$IfDef SMART}
Smart_Server := 50;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SmartSetTarget;
{$EndIf}
SetupSRL;
{$IfDef SMART}
SMART_SetupDebug();
{$EndIf}
LesGoat;
SymbolAccuracy:= 0.5;
MMCC := IntToPoint( MMCX, MMCY);
MSCC := IntToPoint( MSCX, MSCY);
AE := 0;
Reincarnate := True;
UseFindMod := False;
ClearAllDebug;
TimeFromMark( AE);
Repeat
MainLoop;
Until False;
End.

Relevant post from Olly: https://villavu.com/forum/showthread.php?t=111136&p=1320792#post1320792

What do people think?

Olly

2015-04-05 20:36:13

gj to whoever noticed this, clearly a friend of even him. Just two things i found while speeding through it.

Should be obvious. :)

procedure WSB(status: string);
begin
ClearScreenDebug();
with (smartImage) do
begin
clearArea(intToBox(0, 367, 574, 385));
drawBox(0, 367, 574, 385, true, clAqua);
drawBox(0, 367, 65, 385, true, clTeal);
drawText('Status: ', point(14, 368), UpCharsEx, false, clAqua);
drawText( + status, point(79, 368), UpCharsEx, false, clTeal);
end;
end;

procedure SDB(status: string);
begin
with (smartImage) do
begin
if (newPaint) then
begin
clearArea(intToBox(0, 367, 574, 385));
drawBox(0, 367, 574, 385, true, clAqua);
drawBox(0, 367, 65, 385, true, clTeal);
drawText('Status: ', point(14, 368), UpCharsEx, false, clAqua);
drawText( + status, point(79, 368), UpCharsEx, false, clTeal);
end;
end;


function GoInPortal: Boolean;
var
tFrame, tFrameEdge, tPortal, tPortalEdge, tEdge: TPointArray;
aEdge: T2DPointArray;
i, safeCheck: Integer;
p: TPoint;
b: TBox;
begin
Result := False;
Inc(AE);

if AE >= (RandomRange(4, 7)) then
begin
LookPortal(5);
wait(random(500, 2000));
smallRandomMouse();
screenCount := 0;
AE := 0;
end;

SDB('Attempted to enter portal ' + IntToStr(AE) + ' times');
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());
with (smartImage) do
begin
clearArea(Mainscreen.getBounds());
drawTPA(tEdge, clAqua);
drawBox(b, False, clAqua);
drawBox(0, 367, 574, 385, true, clAqua);

drawBox(0, 367, 65, 385, true, clTeal);
drawText('Status: ', point(14, 368), UpCharsEx, false, clAqua);
drawText('We are searching for safe portal', point(79, 368), UpCharsEx, false, clTeal);
end;
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);
end;
26..50:
begin
FastClick(MOUSE_LEFT);
wait(random(500, 3000));
smallRandomMouse();
end;
51..75:
begin
FastClick(MOUSE_LEFT);
EP();
end;
end;
screenCount := 0;
GP := 0;
Green := 0;
safeCheck := 0;
allow := 0;
ClearScreenDebug;
SDB('Found safe portal (' + ToStr(AE) + ' tries, ' + ToStr(Pt.getTime / 1000) + ' secs)');
if (minimap.isFlagPresent(Random(2000, 4000))) then
Minimap.waitPlayerMoving();
Exit(True);
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;

doScreen();

if (ANTIB) then
begin
case random(1000) of
1..50: begin
WSB('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 checkWarning() then closeWarning();

if not minimap.isRunEnabled() then
minimap.toggleRun(true);

case random(100) of
25..60: wieldArrows();
end;

if ((userDeaths >= randomRange(20,30)) AND (SWITCHWEAPONS)) then
begin
changeWeapons;
inc(timesChanged);
end;

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());
WSB('We are searching for safe portal');
if (getPixelShift(b, 100) > 200) then
begin
MouseSpeed := RandomRange(40, 70);
Mouse(b.getRandomPoint());
if (isMouseOverText(['(safe)'])) then
begin
inc(userDeaths);
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;
ClearScreenDebug;
talked := 0;
bna := 0;

case random(5) of
1: rested := 0;
end;

case random(3) of
1: randAngle := 0;
end;

wait(randomrange(500,1000));
if (minimap.isFlagPresent(Random(3000, 4000))) then
Minimap.waitPlayerMoving();
Exit(True);
end;
if checkWarning() then closeWarning();
Exit(True);
end;
end;
end;

Clarity

2015-04-05 20:40:05

From: Olly
gj to whoever noticed this, clearly a friend of even him. Just two things i found while speeding through it.

Should be obvious. :)


Okay cool. Haven't had a time to read through them extensively, glad we have solid proof now besides the questionably similar formatting.

@Justin

Justin

2015-04-05 21:53:45

I've had a look at the IP's with both accounts, They have no linking IPs.

They both have different ISP, one is www.cox.net and the other is www.ono.com

Turpinator

2015-04-05 22:51:48

Alright. So even if hes not the same person, passing off a script that you and a buddy ripped as your own is still a big no no, right?

Justin

2015-04-05 22:58:13

Correct, it's a no. I'll keep it open for a few more days and then close it. I've been doing some more searching around the forums with @Clarity; and we've found some more copy-paste without credits. I'll make a post in the application with what we can find and then it will be closed.

Clarity

2015-04-05 23:22:46

@Lipcot You should take a look at the first script in the application.

Hoodz

2015-04-06 06:31:25

take a look at some numbers, so many are the same.

Lipcot

2015-04-06 14:01:25

From: Clarity
@Lipcot You should take a look at the first script in the application.


this gave him away, its really easy to notice because the script i posted was full of errors, since i had made it really fast and to raise a couple of levels only, i remember posting it somewhere:

function FindFire(): boolean;
var
x, y, i, r: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if findColorsSpiralTolerance(x, y, TPA, 3125185, mainScreen.getBounds(), 13, colorSetting(2, 0.19, 0.88)) then
begin
AHFireDebug('We Found a Bonfire!');
result := true;
AHFireDebug('We Found a Bonfire!');
end
else
begin
result := false;
AHFireDebug('We Didnt Find a Bonfire, Waiting..');
end;
end;

my "script":

function FindFire(): boolean;
var
x, y, i, r: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin

if findColorsSpiralTolerance(x, y, TPA, 3125185, mainScreen.getBounds(), 13, colorSetting(2, 0.19, 0.88)) then
begin
writeLn('We Found a Bonfire!');
result := true;
writeLn('We Found a Bonfire!');
end else
begin
result := false;
writeLn('We Didnt Find a Bonfire, Making One');
end;

end;

Notice he uses the exact same color, and repeats the writeln('we found a bonfire!') which has absolutely no sense in doing…

similarity can be found here too:

procedure LightFire();
var
mybox: tbox;
mybox2: tbox;
begin
myBox := intToBox(162, 187, 206, 224);
myBox2 := intToBox(265, 106, 300, 124);
repeat
begin
mouseBox(mybox2, MOUSE_LEFT);
//if notmoving() then
// begin
// SendKeys('0', 50, 30);
// wait(randomRange(3000, 4000));
// mouseBox(mybox, MOUSE_LEFT);
// tabBackpack.waitForShift(1000);
// wait(randomRange(7000, 10000));
// end;
end;
until findfire();
end;

function currentWorking(): boolean;
var
count1, count2, count3: integer;
begin
count1 := tabBackpack.count();
wait(randomRange(5500, 6000));
count2 := tabBackpack.count();
count3 := (count1 - count2);
if count3 >= 1 then
result := true;
if count3 < 1 then
result := false;

AHFireDebug('Firemaking');

if result = true then
AHFireDebug('Firemaking');

if result = false then
AHFireDebug('Getting going again');

//print('Are we firemaking?: ' + booltostr(result));

with:

procedure LightFire();

var
mybox: tbox;
mybox2: tbox;

begin

myBox := intToBox(162, 187, 206, 224);
myBox2 := intToBox(265, 106, 300, 124);
repeat
begin
mouseBox(mybox2, MOUSE_LEFT);
if notmoving() then
begin
SendKeys('0', 50, 30);
wait(randomRange(3000, 4000));
mouseBox(mybox, MOUSE_LEFT);
tabBackpack.waitForShift(1000);
wait(randomRange(7000, 10000));
end;
end;

until findfire();
end;

Exact same Tbox's.

Its a pitty he does this, since its really a bad habit to be using others people code and not giving credit. I should look for my post where i put the script since i may have said that there was no need in crediting me, dont know for sure.

cosmasjdz

2015-04-06 14:36:21

F2P Clanwars NS BOT Version ID: 35                      |
| By: DMC |
| Last updated 10/17/2014 04:35PM MNT |
| |
| - This was my first script and I've been working and adding onto it the past |
| 3-4 months.

Wanted to show how many effort he did 'put' in his script version 35, like 3-4months of work even through doesnt do single trip :) Anyways scripts are very weak. He wouldnt make membs, but may keep trying and in this case i think we need to ip ban him for wasting our time 2nd time now?. If he would have putted that effort he spent to rewrite/steal scripts to learn scripting, he probably would have written legit script by now.

People are trying so hard to get member status, because rumors we have alot of public to members scripts for good cash making methods like godwars and tds bots.

rj

2015-04-06 18:45:32

This person has put themselves in quite a predicament lol

I guess hes not going to be getting into members for at least a year or two

Clarity

2015-04-06 19:05:31

From: cosmasjdz
F2P Clanwars NS BOT Version ID: 35                      |
| By: DMC |
| Last updated 10/17/2014 04:35PM MNT |
| |
| - This was my first script and I've been working and adding onto it the past |
| 3-4 months.

Wanted to show how many effort he did 'put' in his script version 35, like 3-4months of work even through doesnt do single trip :) Anyways scripts are very weak. He wouldnt make membs, but may keep trying and in this case i think we need to ip ban him for wasting our time 2nd time now?. If he would have putted that effort he spent to rewrite/steal scripts to learn scripting, he probably would have written legit script by now.

People are trying so hard to get member status, because rumors we have alot of public to members scripts for good cash making methods like godwars and tds bots.

Yeah it's pretty obvious that his only motivation is to get into members, take everything in the private forums (not that much anyways), and never post again. Wouldn't ever vote yes on this person(s) even if he submitted an excellent script.

Ian

2015-04-06 19:35:30

Thanks for this thread. I looked between the two similar scripts when 3Garret3 pointed out the possible similarity, and there definitely was the some of the same code. (as Olly showed)

Here's another similarity:
(First column is Bly's, 2nd column is TomTop's, shaded parts are the parts that have been changed)
https://i.imgur.com/MK2mCfD.png

All he did for this part is rename a couple functions, identical logic.

Full diff comparison: https://www.diffchecker.com/m4a5skbb

Clarity

2015-04-08 11:32:12

Just got this PM:

From: Bly
Hey Clarity,

I wanted to apologize about the past and everything. What I did wasn't really honorable nor respectable. I am going to be releasing some scripts soon. =)


I guess we have another application on the horizon :p

Lipcot

2015-04-08 11:35:48

this guy just doesnt give up!

Ian

2015-04-08 11:38:16

From: Clarity
Just got this PM:



I guess we have another application on the horizon :p

Why did he PM you?

Clarity

2015-04-08 11:46:30

From: BMWxi
Why did he PM you?


For his first application, at his request, I spent many months working with him over Skype teaching him how to script and perfecting "his" clan wars script. He never mentioned that it was a rip from an existing script, and I never really thought to check.

Hence my most embarrassing post ever on SRL Forums, where I recommended him on his app, before it got exposed. I'd say he's apologizing for conning me/making me unintentionally lose credibility/plagiarizing in general.

No mention of this TomTop business though.

Ian

2015-04-08 11:54:13

From: Clarity
For his first application, at his request, I spent many months working with him over Skype teaching him how to script and perfecting "his" clan wars script. He never mentioned that it was a rip from an existing script, and I never really thought to check.

Hence my most embarrassing post ever on SRL Forums, where I recommended him on his app, before it got exposed. I'd say he's apologizing for conning me/making me unintentionally lose credibility/plagiarizing in general.

No mention of this TomTop business though.


So he has a good reason for the PM, but he chose a very odd time for it, unless he knew about the results of this app.

So either him and TomTop are the same person, or they're friends who came up with a plan to get members access. I think the 2nd option is the most likely.

And now that the plan has been derailed by observant members, he's decided to try to rebuild reputation on the Bly account in preparation for another application.

Just my analysis of course.

Clarity

2015-04-08 11:55:35

From: BMWxi
So he has a good reason for the PM, but he chose a very odd time for it, unless he knew about the results of this app.

So either him and TomTop are the same person, or they're friends who came up with a plan to get members access. I think the 2nd option is the most likely.

And now that the plan has been derailed by observant members, he's decided to try to rebuild reputation on the Bly account in preparation for another application.

Just my analysis of course.

My thoughts exactly. We'll just wait and see then :P

Justin

2015-04-12 02:10:10

Thanks to everyone who contributed with this. I really do appreciate it.

The Mayor

2015-04-12 02:34:19

There is something weird about that clanwars script, it's prone to the old copy paste!

rj

2015-04-13 10:05:36

From: The Mayor
There is something weird about that clanwars script, it's prone to the old copy paste!


I saw a youtube vid of it in action like the day the bot nuke came out

Clarity

2015-04-27 16:21:38

From: TomTop
From: Bly
Lol + 10 @ TomTop selling scripts he didn't make and now he can't get them working


Uhm..? I don't know what you are talking about? I do not sell scripts, I write every script myself, and I thought it was an SRL bug.

I do not know who you are, nor do I know why you are 'laughing' at a fairly new scripter (myself), for having a problem with my runecrafter script?

Please keep your posts on topic.

I wonder what the heck is going on.

3Garrett3

2015-04-27 17:58:18

This brings up a lot of confusion because it's either trying to cover their tracks (if it's the same person or two friends) or two people who legit don't know that they both applied with the same copy-paste within a month of each other.

If the former, I say that they aren't very smart because it's just drawing more attention from people in the know. If the latter, then it's funnier IMO because they both got screwed with the same script. I thought this script had never been publicly released though, is this something that people are buying and modifying or what?

The response from TomTop seem a little over-the-top in that it hits a lot of the "covering my tracks" checklist items. Maybe that's the conspiracy theorist in me though.

Ian

2015-04-27 18:10:01

If they're separate people then this exchange suggests that they had a falling out (perhaps blaming each other over the failure to get in?) and Bly is trying to get a rise out of TomTop by hinting at his script copying. Not wanting to be found out, TopTop is overly defensive and denies something that wasn't accused of him.
I do not know who you are

Almost like he was expecting Bly to say that they knew each other.

Clarity

2015-04-27 18:11:48

From: 3Garrett3
This brings up a lot of confusion because it's either trying to cover their tracks (if it's the same person or two friends) or two people who legit don't know that they both applied with the same copy-paste within a month of each other.

If the former, I say that they aren't very smart because it's just drawing more attention from people in the know. If the latter, then it's funnier IMO because they both got screwed with the same script. I thought this script had never been publicly released though, is this something that people are buying and modifying or what?

The response from TomTop seem a little over-the-top in that it hits a lot of the "covering my tracks" checklist items. Maybe that's the conspiracy theorist in me though.


From: BMWxi
If they're separate people then this exchange suggests that they had a falling out (perhaps blaming each other over the failure to get in?) and Bly is trying to get a rise out of TomTop by hinting at his script copying. Not wanting to be found out, TopTop is overly defensive and denies something that wasn't accused of him.

Almost like he was expecting Bly to say that they knew each other.

Assuming the first option, Garrett, as TomTop has removed Bly from his friends list.

Assuming @The Killer didn't lie :p

This is pretty funny, whatever their intentions are at SRL, they appear to have all backfired.

Justin

2015-04-27 18:43:14

From: Clarity

Assuming @The Killer didn't lie :p


I remember when TomTop applied for members, Bly was on his friends list.

3Garrett3

2015-04-27 18:52:52

I can confirm that at the time, I checked TomTop's profile and Bly was indeed his only friend. So it seems very weird to be saying "I don't even know you". Conspiracy theories aren't even as fun as reality in this case.

Edit:

From: Bly
You don't know who I am? Awkward moment when we have PM's on SRL of you asking for my skype! LOL. Keep your lies to yourself buddy.


Isn't that why you got temp-banned on forums for trying to apply with code that I gave you?

I'm not going to continue and sit here to argue with someone who's too immature to admit that he's trying to sell code he didn't create, but okay. The only reason I'm bringing this up is the code you're trying to sell was created by Me, not you.


WAT

The Killer

2015-04-28 17:18:15

From: Justin
I remember when TomTop applied for members, Bly was on his friends list.


Yeah I was talking about friends list

Clarity

2015-04-28 19:43:04

Options for what might be going on:

1. What Bly says is true, and TomTop stole his code, and is trying to pretend he isn't associated (albeit very badly). This explains friends list deletion and flat out denial, as well as awkward attempts to emphasize how much he "doesn't know him."

2. Bly and TomTop had an agreement that TomTop would apply with Bly's code (modified hopefully so we wouldn't notice), so they would both have mutual access to the members section. When this plan fell through, and Bly was implicated as a participant, HE is now trying to disassociate with TomTop, and frame him for stealing code, thus improving his reputation and chances for success at members when he inevitably reapplies. TomTop can't necessarily deny Bly's version of the story since that would implicate himself 10x more.

This is borderline ridiculous. Anyone have more options?