SRL Archive - Archive

Dynamite - SRL Member Application


**BANNED The Man

2011-08-04 20:16:22

How Long have You Played Runescape?
5 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Pokemon?


Are you a member of any other communities?
No


Tell us about yourself…
From: Dynamite
I can drive in 3 months :D
I liek IRC.
I have fun.

Note:

For those that don't know I am originally The Man.
The reason I created a new account was for a fresh start, to learn from the beginning because I didn't feel I was at the level of a Member.



Please show us one (or multiple) of your scripts.
Newest to old:

[SIMBA]program StarterFighter;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i reflection\reflection.simba}
{$i SRL\SRL\misc\paintsmart.scar}
{$i SRL\SRL\Misc\Stats.simba}


const

// The file where to save various statistics.
CONF_STATISTICS_FILE = ScriptPath + 'statistics.ini';

LOCATION_RATS = 0;
LOCATION_GOBLINS = 1;
LOCATION_CHICKENS = 2;

var
{STUFF}
MonsterName : String;
MyColor, MyTol : integer;

{AREAS}
SpawnArea, GoblinsArea, ChickensArea, RatsArea : TBox;

{WALKS}
RatsTiles, ChickensTiles, GoblinsTiles : TPointArray;

{MARKS}
RatsMark, ChickensMark, GoblinsMark : TTile;




const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Integers[50] := LOCATION_RATS;
//mixster You have those global consts, so why not have them use those?
Integers[51] := SKILL_ATTACK; // Fight Mode.. attack, strength, defence
Strings[51] := 'Attack'; // Lamp Skill
end;
end;

var
s_img_bg,
s_killed_chickens,
s_killed_goblins,
s_killed_rats,
s_killed_chickens_session,
s_killed_goblins_session,
s_killed_rats_session,
s_start_exp,
s_start_exp_left: integer;

s_canvas: TCanvas;

procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: Wait(100 + Random(50));
end;
end;

Procedure AntiRandoms;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
FindNormalRandoms;
Wait(300+Random(200));
FindLamp(Players[CurrentPlayer].Strings[51]);
End;

procedure TextOut(b, x, y: integer; t: string);
var
pa: TPointArray;
h, i: integer;
begin
pa := LoadTextTPA(t, SmallChars, h);

for i := 0 to High(pa) do begin
FastSetPixel(b, x + 1 + pa[i].x, y + 1 + pa[i].y, 1317920);
FastSetPixel(b, x + pa[i].x, y + pa[i].y, clWhite);
end;

SetLength(pa, 0);
end;

procedure SetupScript;
begin

SMART_SERVER := 1;
SMART_SIGNED := true;
SMART_MEMBERS := false;

SetScriptProp(SP_WriteTimeStamp, [true]);
SMART_SetupDebug();
ClearRSCanvas(SMART_Canvas.canvas);

SetupSRL;
DeclarePlayers;


//STATS
if (SRLStats_Username = '') then
SetupSRLStats(100, 'Anonymous', 'anon1337')
else
SetupSRLStats(100, SRLStats_Username, SRLStats_Password);


s_killed_chickens := StrToInt(ReadIni('monsters', 'chickens', CONF_STATISTICS_FILE));
s_killed_rats := StrToInt(ReadIni('monsters', 'rats', CONF_STATISTICS_FILE));
s_killed_goblins := StrToInt(ReadIni('monsters', 'goblins', CONF_STATISTICS_FILE));
s_killed_chickens_session := 0;
s_killed_rats_session := 0;
s_killed_goblins_session := 0;


s_img_bg := LoadBitmap(ScriptPath + 'bg.png');
s_canvas := TCANVAS.Create;
s_canvas.Handle := SmartGetDebugDC();

TextOut(s_img_bg, 5, 32, 'Progress to next level');
TextOut(s_img_bg, 5, 57, 'Exp. / h');
TextOut(s_img_bg, 5, 74, 'Exp. gained');
TextOut(s_img_bg, 5, 91, 'Exp. until next level');
TextOut(s_img_bg, 5, 107, 'Time until next level');

TextOut(s_img_bg, 259, 57, 'Chickens (session)');
TextOut(s_img_bg, 259, 74, 'Goblins (session)');
TextOut(s_img_bg, 259, 91, 'Rats (session)');

s_start_exp := R_GetSkillExp(Players[CurrentPlayer].Integers[51]);
s_start_exp_left := R_GetSkillExpToLevel(Players[CurrentPlayer].Integers[51]);

ColorToleranceSpeed(1);
end;


procedure UpdateStatistics();
var
b, cdx, cdy, expleft, rt, h, m, s: integer;
gainedexp, exph: double;
begin
b := BitmapFromString(765, 303, '');

FastDrawTransparent(0, 0, s_img_bg, b);

expleft := R_GetSkillExpToLevel(Players[CurrentPlayer].Integers[51]);

// Progress bar.
for cdx := Round(((0.0 + s_start_exp_left - expleft) / s_start_exp_left) * 361) to 360 do
for cdy := 0 to 16 do
FastSetPixel(b, 141 + cdx, 31 + cdy, $a6506d);

rt := GetTimeRunning();
gainedexp := R_GetSkillExp(Players[CurrentPlayer].Integers[51]) - s_start_exp;
exph := (gainedexp / rt) * 3600000;

if (exph <> 0) then
ConvertTime(Round(((0.0 + expleft) / (Round(exph / 50) * 50)) * 3600000), h, m, s);

TextOut(b, 146, 32, Format('Level %.2d: %.2f%%', [R_GetSkillLevel(Players[CurrentPlayer].Integers[51]) + 1, (0.0 + s_start_exp_left - expleft) / s_start_exp_left * 100]));

TextOut(b, 143, 57, Format('%.2fk', [exph / 1000.0]));
TextOut(b, 143, 74, Format('%.2fk', [gainedexp / 1000.0]));
TextOut(b, 143, 91, Format('%.2fk', [expleft / 1000.0]));
TextOut(b, 143, 107, Format('%.2dh %.2dm %.2ds', [h, m, s]));

TextOut(b, 237, 5, Format('%d', [s_killed_chickens]));
TextOut(b, 348, 5, Format('%d', [s_killed_goblins]));
TextOut(b, 448, 5, Format('%d', [s_killed_rats]));

TextOut(b, 395, 57, Format('%d', [s_killed_chickens_session]));
TextOut(b, 395, 74, Format('%d', [s_killed_goblins_session]));
TextOut(b, 395, 91, Format('%d', [s_killed_rats_session]));

DrawBitmap(b, s_canvas, 7, 345);

FreeBitmap(b);
end;

procedure SaveStatistics(Monster:string; a: integer);
begin
if (a <> 0) then
case Monster of
'Chicken': begin
IncEx(s_killed_chickens, a);
IncEx(s_killed_chickens_session, a);

WriteINI('monsters', 'chickens', IntToStr(s_killed_chickens), CONF_STATISTICS_FILE);
end;

'Giant rat': begin
IncEx(s_killed_rats, a);
IncEx(s_killed_rats_session, a);

WriteINI('monsters', 'rats', IntToStr(s_killed_rats), CONF_STATISTICS_FILE);
end;

'Goblin': begin
IncEx(s_killed_goblins, a);
IncEx(s_killed_goblins_session, a);

WriteINI('monsters', 'goblins', IntToStr(s_killed_goblins), CONF_STATISTICS_FILE);
end;
end;
end;


{function GetTehXP: Integer;
begin
Result := R_GetSkillExp(SKILL_ATTACK) + R_GetSkillExp(SKILL_STRENGTH)
+ R_GetSkillExp(SKILL_DEFENCE) + R_GetSkillExp(SKILL_HP);
end;}

procedure setupColors;
begin
//mixster Not using those global consts again?
case Players[CurrentPlayer].Integers[50] of
LOCATION_RATS : begin //rats
MyColor := 4014147;
MyTol := 23;
end;
LOCATION_GOBLINS : begin //goblins
MyColor := 5605249;
MyTol := 46;
end;
LOCATION_CHICKENS : begin // chickens
MyColor := 7185861; // vvv I know, these can all be one. vvv
MyTol := 94; //mixster I can maybe give you the other two, but I don't think you can count this as colour finding - Couldn't get all chickens. + It is only a loose check that checks within a certain box whether it finds a colour near that.
end;
end;
end;

procedure setupWalks;
begin
RatsTiles := [Point(3214, 3206), Point(3197, 3206)];
GoblinsTiles := [Point(3235, 3224), Point(3250, 3226), Point(3251, 3237)];
ChickensTiles := [Point(3227, 3232), Point(3226, 3247), Point(3229, 3261), Point(3238, 3276), Point(3239, 3292), Point(3230, 3297)];
end;

//mixster Even after our IRC prodding, the Y1 values are still bigger than the Y2 values
procedure setupAreas;
begin
SpawnArea.X1 := 3220;
SpawnArea.X2 := 3223;
SpawnArea.Y1 := 3214;
SpawnArea.Y2 := 3223;

RatsArea.X2 := 3199;
RatsArea.Y2 := 3212;
RatsArea.X1 := 3187;
RatsArea.Y1 := 3200;

GoblinsArea.X1 := 3243;
GoblinsArea.Y1 := 3230;
GoblinsArea.X2 := 3257;
GoblinsArea.Y2 := 3243;

ChickensArea.X1 := 3225;
ChickensArea.Y1 := 3293;
ChickensArea.X2 := 3236;
ChickensArea.Y2 := 3300;
end;

procedure setupMarks;
begin
RatsMark := Point(3197, 3206);
GoblinsMark := Point(3251, 3237);
ChickensMark := Point(3230, 3297);
end;

function inAreaEx(TheTile : TTile; Area : TBox) : boolean;
begin
Result := ((TheTile.x >= Area.X1) and (TheTile.x <= Area.X2) and (TheTile.y >= Area.Y1)
and (TheTile.y <= Area.Y2));
end;

function inArea(Area : TBox) : boolean;
begin
Result := R_SelfInBox(Area);
end;


function getTrainingArea : TBox;
begin
case Players[CurrentPlayer].Integers[50] of
LOCATION_RATS : Result := RatsArea;
LOCATION_GOBLINS : Result := GoblinsArea;
LOCATION_CHICKENS : Result := ChickensArea;
end;
end;

function atTrainingSpot : boolean;
begin
Result := inArea(getTrainingArea);
end;

function atSpawnSpot : boolean;
begin
Result := inArea(SpawnArea);
end;

function DeathWalk: boolean;
begin
if (not (LoggedIn)) then Exit;
//mixster Honestly, why have those global consts?
case Players[CurrentPlayer].Integers[50] of
LOCATION_RATS: R_WalkPath(RatsTiles);
LOCATION_GOBLINS: R_WalkPath(GoblinsTiles);
LOCATION_CHICKENS: R_WalkPath(ChickensTiles);
end;
Result := atTrainingSpot();
end;

function Relocate : boolean;
begin
case Players[CurrentPlayer].Integers[50] of
LOCATION_RATS: R_WalkToTile(RatsMark, 2, 0);
LOCATION_GOBLINS: R_WalkToTile(GoblinsMark, 2, 0);
LOCATION_CHICKENS: R_WalkToTile(ChickensMark, 2, 0);
end;
Result := atTrainingSpot();
end;

Function FightMode: boolean;
begin
if Players[CurrentPlayer].Booleans[99] then
Exit;
case Players[CurrentPlayer].Strings[50] of
'attack': Result := SetFightMode(1);

'strength': Result := SetFightMode(2);

'defence': Result := SetFightMode(4);
end;
Players[CurrentPlayer].Booleans[99] := True;
end;

Procedure FightTheThing;
var
Fighting : TNPC;
NPCs, SortedNPCs : TNPCArray;
Index, Times, x, y, KHeight : Integer;
Where : TPoint;
begin
Writeln('Trying to fight');
if(R_AreWeInteracting(Fighting, True)) then
begin
Wait(500);
Antiban;
end;

NPCs := (R_GetNPCs(MonsterName, True));
SortedNPCs := R_SortNPCs(NPCs);
if(GetArrayLength(SortedNPCs) = 0) then
begin
writeln('no ' + MonsterName + '...');
Wait(500);
Exit;
end;
for Index := 0 to High(SortedNPCs) do
begin
if((inAreaEx(SortedNPCs[Index].Tile, getTrainingArea())) and not SortedNPCs[Index].InCombat) then
begin
if(not R_TileOnMS(SortedNPCs[Index].Tile, 0)) then
Exit;
KHeight := R_GetTileHeight(SortedNPCs[Index].Tile);
Where := R_TileToMS(SortedNPCs[Index].Tile, KHeight);
if not FindColorTolerance(x, y, MyColor, Where.x - 10, Where.y - 10, Where.x + 10, Where.y + 10, MyTol) then
begin
//Writeln('YOU ARE RIGHT'); //mixster Er, seems silly since this is where the colour isn't found - Debug.
Wait(1000);
continue //mixster missing ; and fairly sure a continue would be better suited - agreed with continue, ; before else throws error.
end else
begin
Writeln('Found Colour');
MMouse(x, y, 0, 0);
GetMousePos(x, y);
if R_IsUpText(MonsterName) then
begin
Mouse(x, y, 0, 0, true); //mixster But... you just moved your mouse to x, y
//mixster You don't have to click there, but why the effort if you ignore them? - Typo.
if R_WaitCrossHairColor(CROSSHAIR_RED, 1000) then
begin
Wait(1000);
SaveStatistics(MonsterName, 1);
UpdateStatistics();
end else begin
Wait(1000);
continue;
end;
Repeat
//Writeln('Waiting'); //mixster Could spit out a lot of unneeded stuff, maybe just the one Waiting? - Was for Debug purposes.
Wait(300);
Until not R_InCombat and not R_Animating and not R_Moving; //mixster Parenthesis would clear this up
break; //mixster Hard to tell, but I think this means that you only check the first NPC - proper indenting would help
//mixster Nothing wrong with that, but may be unwanted - Continue needed?
end;
end;
end;
end;
end;

procedure MainLoopage;
begin
if(not loggedIn) then
LoginPlayer;
MakeCompass('West'); //mixster Eh? Any particular reason for making it West? Dynamite - Different to other bots + I tested and found it more accurate.
SetAngle(True);
FightMode;
setupMarks;
setupColors;
setupAreas;
setupWalks;

case Players[CurrentPlayer].Integers[50] of
LOCATION_RATS: MonsterName := 'Giant rat';
LOCATION_GOBLINS: MonsterName := 'Goblin';
LOCATION_CHICKENS: MonsterName := 'Chicken';
end;

Antirandoms;
Repeat
if atTrainingSpot then
FightTheThing
else
if atSpawnSpot then
DeathWalk
else
if not Relocate then
begin
NextPlayer(False);
MainLoopage;
end;
until AllPlayersInactive;
end;


begin
SetupScript;
repeat
MainLoopage;
until AllPlayersInactive;
end.


program EssMiner;
{$define SMART}
{$i srl/srl.scar}
{$i Reflection/Reflection.simba}
{$i SRL\SRL\Misc\stats.simba}

{ = Valid Arguments = }
{ - banked } // already banked need to walk to aubury
{ - done aubury } // done aubury now at the ess place
{ - at aubury } // at aubury need to get to ess place
{ - at bank } // at bank, need to bank still
{ - teleported } // teleported from ess place, in auburys room


Const // Fill out below:
SRLStats_UserID = ''; // Your SRL Stats username.
SRLStats_Password = ''; // Your SRL Stats Password.
DependClick = 5; // 1 in how many clicks is a right click option. (Mining)
DoDebug = True; // Do you want the script to debug?

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'done aubury'; //Read the thread to see valid arguments.
Integers[4]:= 100; //Amount of loads you want to do.
Strings[1] := 'Mining'; // Lamp Skill
Booleans[0] := True; // Axe wielded?
end;
end;

type
TTilesArray = array of TTile;
var
EssCountStart, Price : integer;
const
RUNEESS_ID = 1436;
PUREESS_ID = 7936;
Colour = 0;
Hue = 1;
Sat = 2;
Tol = 3;

function ConvertPrice(input: string): Integer; // Credit to BlumbleBee for these two functions <3
var
f: Extended;
begin
input := Replace(Lowercase(Trim(input)), ',', '');
if (Pos('m', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('m', input) - 1), 0) * 1000000
else if (Pos('k', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('k', input) - 1), 0) * 1000
else
f := StrToFloatDef(Input, 0);
Result := Round(f);
end;

procedure SetPrice(runeEss: Boolean);
var
S: string;
I: Integer;
begin
if runeEss = true then
I := RUNEESS_ID
else
I := PUREESS_ID;

s := getPage('http://services.runescape.com/m=itemdb_rs/Rune_essence/viewitem.ws?obj='+IntToStr(I));
Price := ConvertPrice(Between('<b>Market price:</b> ', #10 + '</span>', s));
end;

Procedure Debug(s:string);
Begin
if DoDebug then
Writeln(s);
end;

{procedure AxeWielded;
var
Equipped, i : integer;
TheIDs: TVariantArray;
Pickaxe : TInvItemArray;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
TheIDs := [1265, 1271, 15259, 1267, 1273, 1275, 1269];
GameTab(tab_Inv);
Wait(500 + Random(200));
if(R_ItemExistsEx(TheIDs, Pickaxe))then
begin
Players[CurrentPlayer].Booleans[0] := False;
Debug('Pickaxe is in inventory.');
Exit;
end else
begin
GameTab(tab_Equip);
Wait(500 + Random(200));
Equipped := GetEquippedIDAt(3);
for i := 0 to TheIDs do*
if (Equipped = TheIDs[i]) then*
begin
Players[CurrentPlayer].Booleans[0] := True;
Debug('Hatchet is equipped.';
end;
end;
End;}

Procedure LevelTalking;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
If LevelUp Then
Begin
Inc(Players[CurrentPlayer].Integers[2]);
stats_IncVariable('Total Levels Gained', 1);
Writeln('Woooot we have now gained '+IntToStr(Players[CurrentPlayer].Integers[2])+' levels!');
Begin
Case Random(50) Of
0: TypeSend('Guess what... I levelled!');
1: TypeSend('w00t lvld');
2: TypeSend('lvld again...');
3: TypeSend('grats me! I lvld!');
4: TypeSend('gay lag, didnt realise i lvld');
5: TypeSend('woopdewoop');
6: TypeSend('this levelling stuff is getting boring...');
7: TypeSend('dangdarnit, I jooost lavallled');
8: TypeSend('can we have a party cause i just lvld');
9: TypeSend('house party at mine! jokes...');
End;
End;
End;
End;

{procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;}

Procedure ProgressReport;
var
EssMined, TotalLoads, TotalLevels, TotalAntiban, I, ActivePlayers: Integer;
Begin
LevelTalking;
for I := 0 to HowManyPlayers-1 do
begin
with Players[I] do
begin
if Active then
Inc(ActivePlayers);
EssMined := EssMined + Integers[0];
TotalLoads := TotalLoads + Integers[1];
TotalLevels := TotalLevels + Integers[2];
TotalAntiban := TotalAntiban + Integers[3];
end;
end;
{PrintOnSmart([' Essence Miner [BOOM]'],Point(22, 30), 62207, 131072);
PrintOnSmart(
['',
'',
'',
' Global Stats ',
' --------------',
' Time Running: '+ TimeRunning,
' Mined: '+IntToStr(EssMined)+' Essence',
' Loads Done: : '+IntToStr(TotalLoads),
' Gained: '+IntToStr(Price*EssMined)+' gp',
' Gained: '+IntToStr(TotalLevels)+' levels',
' Players Active: '+IntToStr(ActivePlayers),
' ',
' Player Stats ',
' --------------',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Essence: ' + IntToStr(Players[CurrentPlayer].Integers[0]),
' Gained: '+IntToStr(Price*Players[CurrentPlayer].Integers[0])+' gp'
], Point(30, 60), 1959605, 131072);}
Writeln('[-----------------------------]');
Writeln('[ Essence Miner ]');
Writeln('[-----------------------------]');
Writeln(' We worked for ' + TimeRunning);
Writeln(' Mined ' + IntToStr(EssMined)+' Essence');
Writeln(' Loads Done: ' + IntToStr(TotalLoads));
writeLn(' Gained: '+IntToStr(Price*EssMined)+' gp');
Writeln(' Gained: ' + IntToStr(TotalLevels)+' levels');
Writeln(' Antibanned ' + IntToStr(TotalAntiBan));
Writeln('[-----------------------------]');
Stats_Commit;
End;

procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: begin
Wait(100 + Random(50));
Exit;
end;
end;
Inc(Players[CurrentPlayer].Integers[3]);
end;

Procedure AntiRandoms;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
LevelTalking;
FindNormalRandoms;
Wait(300+Random(200));
FindLamp(Players[CurrentPlayer].Strings[1]);
End;

Function WalkToAubury: Boolean;
Begin
If Not LoggedIn Then
Exit;
EssCountStart := R_InvCount;
if R_GetMMLevels('run') > 50 then
SetRun(True);
If WalkToTile(Point(3257, 3409), 2, 1) Then
If not WalkToTile(Point(3253, 3401), 1, 0) Then
Exit;
Result := True;
End;

Function FindEss(Var X, Y : Integer; W, H, X1, Y1, X2, Y2 : Integer): Boolean;
Var
TPA : TPointArray;
ATPA : T2DPointArray;
T: TPoint;
K, G, Z: Extended;
Colors: array [0..1] of tIntegerArray;
I, J, xX, yY, Blah: Integer;
TPAStoof: array [0..1] of TVariantArray;
DoubleTPA: array [0..1] of TPointArray;
Which: array [0..1] of Integer;
begin
if not LoggedIn then Exit;
TPAStoof[0] := [12961230, 0.93, 0.90];
TPAStoof[1] := [10790060, 0.00, 0.16];
ColorToleranceSpeed(2);
for I := 0 to 1 do
begin
SetColorSpeed2Modifiers(TPAStoof[I][Hue], TPAStoof[I][Sat]);
FindColorsTolerance(DoubleTPA[I], TPAStoof[I][Colour], MSx1, MSy1, MSx2, MSy2, 4);
Debug('Length of TPA = '+IntToStr(Length(DoubleTPA[I])));
if Length(DoubleTPA[I]) = 0 then
Exit;
Colors[I] := GetColors(DoubleTPA[I]);
Debug('Length of Colors = '+IntToStr(Length(Colors[I])));
for J := 0 to high(Colors[I]) do
begin
ColorToXYZ(Colors[I][J], K, G, Z);
if InRange(Round(K), 35, 49) then
if InRange(Round(G), 36, 50) then
if InRange(Round(Z), 38, 54) then
begin
Which[I] := J;
Debug('Which['+IntToStr(I)+'] = '+IntToStr(J));
Break;
end;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);

Repeat
SetArrayLength(TPA, 0);
FindColorsTolerance(TPA, Colors[J][Which[J]], MSX1, MSY1, MSX2, MSY2, 3);
if Length(TPA) <= 0 then
Exit;
ATPA := TPAToATPAEx(TPA, 25, 25);
SortATPASize(ATPA, true);
for I := 0 to high(ATPA) do
begin
if I = 3 then
Break;
T := MiddleTPA(ATPA[I]);
MMouse(T.x, T.y, 5, 5);
Wait(400 + Random(200));
if WaitUpTextMulti(['ssen', 'une'], 350) then
begin
getMousePos(xX, yY);
Blah := RandomRange(0, DependClick);
if Blah = 0 then begin
Mouse(xX, yY, 0, 0, False);
WaitOption('ine', 500)
end else Mouse(xX, yY, 0, 0, True);
Result := True;
Blah := 0;
Exit;
end;
Inc(J);
end;
until J > 1;
Debug('Found the essence!');
End;

Function FoundEss(Var X, Y : Integer): Boolean;
Begin
Debug('Beginning FoundEss');
Result := FindEss(X, Y, 20, 50, MSX1, MSY1, MSX2, MSY2);
End;

{Function FoundEss2:Boolean;
var
EPoint : TPoint;
xX, yY : integer;
CurrentObject : TRSObject;
begin
Debug('FoundEss2');
CurrentObject := GetObjectById(2491, 0, 10);
E := TileToMS(CurrentObject.Tile, 15);
if not (TileOnMs(CurrentObject.Tile, 0)) then
Exit;
EPoint := TileToMS(CurrentObject.Tile, 0);
MMouse(EPoint.x, EPoint.y, 0, 0);
GetMousePos(xX, yY);
if WaitUpText('ine', 600) then
Mouse(xX, yY, 0, 0, True);
if DidRedClick then
Result := True
else Result := False;
end;}


Function MiningCheck:Boolean;
Begin
if not LoggedIn then Exit;
if not CharacterAnimating then
Wait(2500);
if CharacterAnimating then
Result := True else Result := False;
End;

Function DoPortal:boolean;
var
NWPortalTile, SWPortalTile, SEPortalTile, NEPortalTile : TTile;
P : TPoint;
xX, yY, Blah, I, Which, LengthA, LengthB : integer;
TPA : TPointArray;
ATPA : T2DPointArray;
WhichTPA: array [0..1] of TPointArray;
TPAStoof: array [0..1] of TVariantArray;
Begin
NWPortalTile := (tile(2885, 4850)); //NW
SWPortalTile := (tile(2889, 4813)); //SW
SEPortalTile := (tile(2933, 4815)); //SE
NEPortalTile := (tile(2932, 4854)); //NE
TPAStoof[0] := [11652296, 0.49, 2.59, 3];
TPAStoof[1] := [12898508, 2.78, 4.37, 1];

case Players[CurrentPlayer].Loc of
'NW' : Begin
if not WalkToTile((NWPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'SW' : Begin
if not WalkToTile((SWPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'SE' : Begin
if not WalkToTile((SEPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'NE' : Begin
if not WalkToTile((NEPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
End;
if CharacterMoving then
Repeat
Wait(250);
Until not CharacterMoving;
Wait(3000);
repeat
for I := 0 to 1 do
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(TPAStoof[I][Hue], TPAStoof[I][Sat]);
FindColorsTolerance(WhichTPA[I], TPAStoof[I][Colour], MSX1, MSY1, MSX2, MSY2, TPAStoof[I][Tol]);
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);
end;
if Length(WhichTPA[0]) or Length(WhichTPA[1]) > 0 then
Break;
until False;
LengthA := Length(WhichTPA[0]);
LengthB := Length(WhichTPA[1]);
Debug('LengthA = '+IntToStr(LengthA));
Debug('LengthB = '+IntToStr(LengthB));
if LengthA > LengthB then
Which := 0
else
Which := 1;
Debug('Which = '+IntToStr(Which));
TPA := WhichTPA[Which];
ATPA := SplitTPAEx(TPA, 10, 10);
SortATPASize(ATPA, true);
for I := 0 to high(ATPA) do
begin
if I > 2 then
Exit;
P := MiddleTPA(ATPA[I]);
Wait(1000 + Random(500));
MMouse(P.x, P.y, 5, 5);
Wait(1000);
//if WaitUpText('ortal', 400) then
begin
GetMousePos(xX, yY);
Blah := RandomRange(0, DependClick);
if Blah = 0 then begin
Mouse(xX, yY, 0, 0, False);
WaitOption('nte', 500)
end else Mouse(xX, yY, 0, 0, True);
Result := true;
Exit;
end;
end;
end;

Function BoomEss: Boolean;
Var
X, Y, Tried : Integer;
Begin
if Not LoggedIn then
Exit;
Debug('BoomEss');
Repeat
if Tried = 10 then
begin
Debug('Cant find ess... Exiting');
Exit;
end;
if not FoundEss(X, Y) then
Begin
Inc(Tried);
Debug(IntToStr(Tried));
Wait(2000 + Random(500));
Continue;
End;
//Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(500));
Repeat
LevelTalking;
if MiningCheck then
begin
Antiban
AntiRandoms
end;
if InvFull then
Break;
Until not (MiningCheck);
Until InvFull;
Result := True;
End;

Function DoAubury:Boolean;
var
Aubury:TNPC;
APoint : TPoint;
Begin
if not LoggedIn then Exit;
if FindNPC(553, Aubury) then
APoint := TileToMSEx(Aubury.Tile, 0.5, 0.5, Aubury.Height);
MMouse(APoint.x, APoint.y, 1, 1);
if WaitUpText('-to', 600) then
Mouse(APoint.x, APoint.y, 1, 1, False);
if not R_ChooseOption('elep') then
Exit;
Wait(3000);
Result := True;
Debug('Done aubury');
End;

function DistanceFromArray(TheTiles: TTilesArray): integer;
var
MyPos: TTile;
I: integer;
begin
MyPos := GetMyPos;
Result := High(Result);
for I := 0 to High(TheTiles) do
Result := Min(Result, Distance(MyPos.x, MyPos.y, TheTiles[I].X, TheTiles[I].Y));
end;

Function AtEssPlace:Boolean;
var
NW, NE, SE, SW : TTile;
Tower, Tracks : TRSObject;
Begin
if not LoggedIn then Exit;
NW := Point(2892, 4848); //NW
NE := Point(2926, 4849); //NE
SE := Point(2929, 4816); //SE
SW := Point(2895, 4814); //SW

Tower := GetObjectByID(506, OBJECT_TYPE_FLOORDECOR, 30);
Tracks := GetObjectByID(454, OBJECT_TYPE_FLOORDECOR, 20);
if (DistanceFrom(NW) < 20) or (DistanceFrom(NE) <10) or (DistanceFrom(SE) <30) or (DistanceFrom(SW) <20) then
Result := True
else begin
NextPlayer(False);
Debug('AtEssPlace False');
Result := False;
Exit
end;
End;

Function WhichEssPlace:boolean; // I know I can do case, will do later.
Begin
if DistanceFrom(tile(2892, 4848)) < 16 then begin
Players[CurrentPlayer].Loc := 'NW';
Debug('At NW');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2926, 4849)) < 16 then begin
Players[CurrentPlayer].Loc := 'NE';
Debug('At NE');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2929, 4816)) < 16 then begin
Players[CurrentPlayer].Loc := 'SE';
Debug('At SE');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2895, 4814)) < 16 then begin
Players[CurrentPlayer].Loc := 'SW';
Debug('At SW');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
End;

Function AtMiddle:boolean;
var
Rope : TRSObject;
MiddleTile:array [0..26] of TTile;
MainTile, done:TTile;
I:integer;
Begin
if not LoggedIn then Exit;
Wait(5000);
Writeln('Starting at Middle');
MainTile := Tile(2909, 4834);
MiddleTile[0] := Tile(MainTile.x, MainTile.y);
MiddleTile[1] := Tile(MainTile.x+1, MainTile.y);
MiddleTile[2] := Tile(MainTile.x+2, MainTile.y);
MiddleTile[3] := Tile(MainTile.x+3, MainTile.y);
MiddleTile[4] := Tile(MainTile.x, MainTile.y-1);
MiddleTile[5] := Tile(MainTile.x+1, MainTile.y-1);
MiddleTile[6] := Tile(MainTile.x+2, MainTile.y-1);
MiddleTile[7] := Tile(MainTile.x+3, MainTile.y-1);
MiddleTile[8] := Tile(MainTile.x, MainTile.y-2);
MiddleTile[9] := Tile(MainTile.x+1, MainTile.y-2);
MiddleTile[10] := Tile(MainTile.x+2, MainTile.y-2);
MiddleTile[11] := Tile(MainTile.x+3, MainTile.y-2);
MiddleTile[12] := Tile(MainTile.x, MainTile.y-3);
MiddleTile[13] := Tile(MainTile.x+1, MainTile.y-3);
MiddleTile[14] := Tile(MainTile.x+2, MainTile.y-3);
MiddleTile[15] := Tile(MainTile.x+3, MainTile.y-3);
MiddleTile[16] := Tile(MainTile.x, MainTile.y-4);
MiddleTile[17] := Tile(MainTile.x+1, MainTile.y-4);
MiddleTile[18] := Tile(MainTile.x+2, MainTile.y-4);
MiddleTile[19] := Tile(MainTile.x+3, MainTile.y-4);
MiddleTile[20] := Tile(2909, 4829);
MiddleTile[21] := Tile(2909, 4828);
MiddleTile[22] := Tile(2909, 4827);
MiddleTile[23] := Tile(2908, 4826);
MiddleTile[24] := Tile(2907, 4826);
MiddleTile[25] := Tile(2906, 4826);
MiddleTile[26] := Tile(2905, 4826);
Rope := GetObjectByID(496, OBJECT_TYPE_FLOORDECOR, 9);
done := GetMyPos;
For I:= 0 to 26 do
if ((done.x = MiddleTile[I].x) and (done.y = MiddleTile[I].y)) then begin
//if TileOnMS(MiddleTile[I].x, MiddleTile[I].y, 0) then begin
Writeln('AtMiddle');
Result := True;
Exit
end else
Result := false;
End;

Function WalkFromMiddle:boolean;
Begin
if not LoggedIn then Exit;
Writeln('Starting WalkFromMiddle');
WalkToTile(Point(2906, 4826), 1, 1);
If WalkToTile(Point(2898, 4815), 1, 1) then
Begin
Wait(1500 + Random(500));
Debug('Walked from middle');
Result := True
End else Result := False;
End;


Function WalkToBank: Boolean;
Begin
If Not LoggedIn Then
Exit;
Wait(750 + Random(300));
if R_GetMMLevels('run') > 50 then
SetRun(True);
If WalkToTile(Point(3259, 3411), 1, 1) Then
if WalkToTile(Point(3253, 3420), 1, 1) then
Result := True;
End;

Function Bank: Boolean;
Var
i, EssCountEnd, EssCountFinal, ID : integer;
B : boolean;
Begin
If Not LoggedIn Then
Exit;
if CharacterMoving then
Repeat
Wait(100)
Until not CharacterMoving;
Wait(1000+ Random(1000));
EssCountEnd := R_InvCount;
ID := getItemIDAt(2);
If Not OpenBankFast(Bank_VE) Then
If Not OpenBankQuiet(Bank_VE) Then
If Not R_OpenBankBooth('veb') then
Exit;
for i := 1 + Integer(not Players[CurrentPlayer].Booleans[0]) to 28 do
begin
Deposit(i, 28, True);
end;
CloseBank;
Inc(Players[CurrentPlayer].Integers[1]);
stats_IncVariable('Loads Done', 1);
EssCountFinal := (EssCountEnd - EssCountStart);
begin
B := ID = RUNEESS_ID;
SetPrice(B);
if B then
stats_IncVariable('Rune Essence (Mined)', EssCountFinal)
else stats_IncVariable('Pure Essence (Mined)', EssCountFinal);
end;
IncEx(Players[CurrentPlayer].Integers[0], EssCountFinal);
ProgressReport;
Result := True;
End;

Procedure MainLoop;
Begin
repeat
Case Lowercase(Players[CurrentPlayer].Loc) of
'banked':
if WalkToAubury then
Players[CurrentPlayer].Loc := 'at aubury';
'at aubury':
if DoAubury then
Players[CurrentPlayer].Loc := 'done aubury';
'done aubury': begin
if AtMiddle then
Players[CurrentPlayer].Loc := 'at middle'
else Players[CurrentPlayer].Loc := 'nearly ess';
end;
'at middle':
if WalkFromMiddle then
Players[CurrentPlayer].Loc := 'nearly ess';
'nearly ess':
if AtEssPlace then
Players[CurrentPlayer].Loc := 'at ess';
'at ess':
if WhichEssPlace then
Players[CurrentPlayer].Loc := 'teleported';
'teleported':
if WalkToBank then
Players[CurrentPlayer].Loc := 'at bank';
'at bank':
if Bank then
Players[CurrentPlayer].Loc := 'banked';
end;
until(Players[CurrentPlayer].Integers[1] >= Players[CurrentPlayer].Integers[4]);
End;



begin
ClearDebug;
ClearReport;
SetupSRLStats(22, SRLStats_UserID, SRLStats_Password);
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
AddOnTerminate('ProgressReport');
begin
DeclarePlayers;
LoginPlayer;
ProgressReport;
MakeCompass('North');
SetAngle(True);
Gametab(tab_Inv);
repeat
MainLoop
until AllPlayersInactive();
end;
end.

program CompWillows;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i Reflection\Reflection.simba}
{$i SRL\SRL\Misc\stats.simba}
const
TalkWhenLevel = False; // Do you want to say something when you level?
DoDebug = True; // Do you want the script to debug?

SRLStats_UserID = ''; // Your SRL Stats username.
SRLStats_Password = ''; // Your SRL Stats Password.

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := '';
Integers[2] := 25000; //Amount of willows to chop
Booleans[0] := False; // Axe wielded?
Strings[1] := 'Woodcutting'; // Lamp Skill?
Strings[2] := 'sell'; // drop or sell (lowercase)
Loc := 'at trees'; // Only valid argument at the moment.
end;
end;

// Please do not edit below this unless you know what you are doing :)

var
CoinGain, CoinTotal:integer;
MyTilePos:TTile;

Procedure Debug(s:string);
Begin
if DoDebug then
Writeln(s);
end;

Procedure LevelTalking;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
If LevelUp Then
Begin
Inc(Players[CurrentPlayer].Integers[3]);
stats_IncVariable('Total Levels Gained', 1);
Debug('Woooot we have now gained '+IntToStr(Players[CurrentPlayer].Integers[3])+' levels!');
If not TalkWhenLevel then
Exit;
Case Random(50) Of
0: TypeSend('Guess what... I levelled!');
1: TypeSend('w00t lvld');
2: TypeSend('lvld again...');
3: TypeSend('grats me! I lvld!');
4: TypeSend('gay lag, didnt realise i lvld');
5: TypeSend('woopdewoop');
6: TypeSend('this levelling stuff is getting boring...');
7: TypeSend('dangdarnit, I jooost lavallled');
8: TypeSend('can we have a party cause i just lvld');
9: TypeSend('house party at mine! jokes...');
End;
End;
End;

Procedure ProgressReport;
var
Chopped, TotalLoads, TotalLevels, TotalAntiban, TotalCoinGain, I, ActivePlayers: Integer;
Begin
LevelTalking;
for I := 0 to HowManyPlayers-1 do
begin
with Players[I] do
begin
if Active then
Inc(ActivePlayers);
Chopped := Chopped + Integers[1];
TotalLoads := TotalLoads + Integers[4];
TotalLevels := TotalLevels + Integers[3];
TotalAntiban := TotalAntiban + Integers[5];
TotalCoinGain := TotalCoinGain + CoinTotal;
end;
end;

Writeln('[-----------------------------]');
Writeln('[ CompWillows ]');
Writeln('[-----------------------------]');
Writeln(' We worked for ' + TimeRunning);
Writeln(' Chopped ' + IntToStr(Chopped)+' Willows');
Writeln(' Loads Done: ' + IntToStr(TotalLoads));
Writeln(' Gained: ' + IntToStr(TotalLevels)+' levels');
Writeln(' Profit made ' + IntToStr(TotalCoinGain)+'gp');
Writeln(' Antibanned: ' + IntToStr(TotalAntiBan));
Writeln(' Active Players: ' + IntToStr(ActivePlayers));
Writeln('[-----------------------------]');
Stats_Commit;
End;

procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: begin
Wait(100 + Random(50));
Exit;
end;
end;
Inc(Players[CurrentPlayer].Integers[5]);
end;

Procedure AntiRandoms;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
LevelTalking;
FindNormalRandoms;
R_FindRandoms;
Wait(300+Random(200));
FindLamp(Players[CurrentPlayer].Strings[1]);
End;

function SellLogs: Boolean;
var
Tiles, Tiles2:TTileArray;
ShopTile:TNPC;
ShopNPC, X, Y, CoinCount, LogCount:integer;
ShopMouse:TPoint;
begin
if (not (LoggedIn)) then Exit;
if (R_CountItem(1519) < 1) then Exit;
CoinCount := GetItemStackSizeAt(1);
LogCount := R_CountItem(1519);
IncEx(Players[CurrentPlayer].Integers[1], LogCount);
stats_IncVariable('Willow Logs Chopped', LogCount);
Debug('Walking to shop');
Tiles := [Tile(2962, 3205), Tile(2949, 3214)];
WalkPath(Tiles);
Repeat
Wait(250);
Until DistanceFrom(Tiles[1]) < 3
Debug('Successfully walked to shop');
begin
case Random(2) of
0: ShopNPC := 530;
1: ShopNPC := 531;
end;
ShopTile := GetNPC(ShopNPC);
ShopMouse := TileToMS(ShopTile.Tile, ShopTile.Height);
MMouse(ShopMouse.X, ShopMouse.Y, 1, 1);
GetMousePos(X, Y);
Mouse(X, Y, 1, 1, False);
if R_ChooseOption('rade') then
Debug('On Shop Screen');
Wait(1000 + Random(500));
R_ClickItemBy(1519, False, 'ell 50');
Debug(IntToStr(CoinCount));
Mouse(486, 19, 2, 1, True);
if (GetItemStackSizeAt(1) > CoinCount) then
begin
Debug('Sold Logs');
CoinGain := (CoinCount - CoinGain);
stats_IncVariable('Gold (Gained)', CoinGain);
CoinTotal := CoinTotal + CoinGain;
Debug('Walking to trees');
Tiles2 := [Tile(2959, 3209), Tile(2969, 3196)];
WalkPath(Tiles2);
Debug('Successfully walked to trees');
Inc(Players[CurrentPlayer].Integers[4]);
Result := True;
end else
begin
Debug('Could not sell logs, going false');
Result := False;
NextPlayer(False);
end;
end;
end;

function DropLogs: Boolean;
var
LogCount:integer;
begin
if (not (LoggedIn)) then Exit;
if not InvFull then
Result := True;
LogCount := R_CountItem(1519);
IncEx(Players[CurrentPlayer].Integers[1], LogCount);
stats_IncVariable('Willow Logs Chopped', LogCount);
Repeat
if Players[CurrentPlayer].Booleans[0] then
R_DropItemsBut(995)
else
R_DropItemsButEx([995, 1357, 1361, 1351, 6739, 1349, 1355, 1359, 1353]);
until not InvFull
if not InvFull then
begin
Debug('Inventory is not full, dropped logs.');
Inc(Players[CurrentPlayer].Integers[4]);
stats_IncVariable('LoadsDone', 1);
Result := True;
end;
end;

Function FindTrees(Var X, Y : Integer; W, H, X1, Y1, X2, Y2 : Integer): Boolean;
Var
i : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
if not LoggedIn then Exit;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.17, 1.87);
begin
FindColorsSpiralTolerance(x, y, TPA, 2904128, MSX1, MSY1, MSX2, MSY2, 6);
SetColorToleranceSpeed(1);
ATPA := SplitTPAEx(TPA, 40, 40);
if (Length(ATPA) = 0) then
Exit;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
h := High(ATPA);
for i := 0 to h do
begin;
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 3, 3);
if WaitUpText('illo', 450) then begin
MyTilePos := GetMyPos;
Result := True;
break;
end;
end;
Debug('Found the Willow!');
End;
End;

Function FoundTrees(Var X, Y : Integer): Boolean;
Begin
Result := FindTrees(X, Y, 35, 35, MSX1, MSY1, MSX2, MSY2);
End;

Function CuttingCheck:Boolean;
Begin
if CharacterAnimating then
Wait(200);
if CharacterAnimating then
Result := True
else
Result := False;
End;

Function ChopTrees: Boolean;
Var
X, Y, Tried : Integer;
Begin
if Not LoggedIn then
Exit;
LevelTalking;
Repeat
if Tried = 10 then
begin
Debug('Relocating to last know point.');
if WalkToTile(MyTilePos, 1, 1) then
Tried := 0
else begin
Result := False;
Debug('Couldnt find trees, tried relocating, going false.');
NextPlayer(False);
end;
end;
if not FoundTrees(X, Y) then
Begin
Inc(Tried);
Wait(2000 + Random(500));
Continue;
End;
Mouse(X, Y, 0, 0, True);
Wait(2000 + Random(500));
While CuttingCheck do
Begin
LevelTalking;
Antiban;
AntiRandoms;
end;
if InvFull then
begin
Debug('Inv full');
Tried := 0;
Result := True;
end;
until InvFull;
End;

Procedure MainLoop;
Begin
repeat
Case Lowercase(Players[CurrentPlayer].Loc) of
'at trees':
if ChopTrees then
Players[CurrentPlayer].Loc := 'chopped trees';
'chopped trees':
begin
case Players[CurrentPlayer].Strings[2] of
'drop' : if DropLogs then
Players[CurrentPlayer].Loc := 'at trees';
'sell' : if SellLogs then
Players[CurrentPlayer].Loc := 'at trees';
end;
end;
end;
until(Players[CurrentPlayer].Integers[1] >= Players[CurrentPlayer].Integers[2]);
End;

begin
ClearDebug;
ClearReport;
SetupSRLStats(63, SRLStats_UserID, SRLStats_Password);
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
AddOnTerminate('ProgressReport');
begin
DeclarePlayers;
LoginPlayer;
ProgressReport;
MakeCompass('North');
SetAngle(True);
Gametab(tab_Inv);
repeat
MainLoop;
until AllPlayersInactive();
end;
end.

The Fighter should work, programmed today, download the zip attached if you want to test, also enable debug in smart ;)
The other 2 may not work, just showing my knowledge :)

Smarter Child

2011-08-04 20:37:20

Yes, though you should have included more color, TPA/RW, etc.

<Smarter_Child> has very little color.
<mixster> turn up the contrast

**BANNED The Man

2011-08-04 20:38:45

Function FindEss(Var X, Y : Integer; W, H, X1, Y1, X2, Y2 : Integer): Boolean;
Var
TPA : TPointArray;
ATPA : T2DPointArray;
T: TPoint;
K, G, Z: Extended;
Colors: array [0..1] of tIntegerArray;
I, J, xX, yY, Blah: Integer;
TPAStoof: array [0..1] of TVariantArray;
DoubleTPA: array [0..1] of TPointArray;
Which: array [0..1] of Integer;
begin
if not LoggedIn then Exit;
TPAStoof[0] := [12961230, 0.93, 0.90];
TPAStoof[1] := [10790060, 0.00, 0.16];
ColorToleranceSpeed(2);
for I := 0 to 1 do
begin
SetColorSpeed2Modifiers(TPAStoof[I][Hue], TPAStoof[I][Sat]);
FindColorsTolerance(DoubleTPA[I], TPAStoof[I][Colour], MSx1, MSy1, MSx2, MSy2, 4);
Debug('Length of TPA = '+IntToStr(Length(DoubleTPA[I])));
if Length(DoubleTPA[I]) = 0 then
Exit;
Colors[I] := GetColors(DoubleTPA[I]);
Debug('Length of Colors = '+IntToStr(Length(Colors[I])));
for J := 0 to high(Colors[I]) do
begin
ColorToXYZ(Colors[I][J], K, G, Z);
if InRange(Round(K), 35, 49) then
if InRange(Round(G), 36, 50) then
if InRange(Round(Z), 38, 54) then
begin
Which[I] := J;
Debug('Which['+IntToStr(I)+'] = '+IntToStr(J));
Break;
end;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);

Repeat
SetArrayLength(TPA, 0);
FindColorsTolerance(TPA, Colors[J][Which[J]], MSX1, MSY1, MSX2, MSY2, 3);
if Length(TPA) <= 0 then
Exit;
ATPA := TPAToATPAEx(TPA, 25, 25);
SortATPASize(ATPA, true);
for I := 0 to high(ATPA) do
begin
if I = 3 then
Break;
T := MiddleTPA(ATPA[I]);
MMouse(T.x, T.y, 5, 5);
Wait(400 + Random(200));
if WaitUpTextMulti(['ssen', 'une'], 350) then
begin
getMousePos(xX, yY);
Blah := RandomRange(0, DependClick);
if Blah = 0 then begin
Mouse(xX, yY, 0, 0, False);
WaitOption('ine', 500)
end else Mouse(xX, yY, 0, 0, True);
Result := True;
Blah := 0;
Exit;
end;
Inc(J);
end;
until J > 1;
Debug('Found the essence!');
End;

That doesn't prove I can RadialWalk? :/

-Boom

NCDS

2011-08-04 20:52:01


Note:

For those that don't know I am originally The Man.
The reason I created a new account was for a fresh start, to learn from the beginning because I didn't feel I was at the level of a Member.

Or was it perhaps because you were banned from black market and had a bad reputation?

I'll admit you've been much more of a pleasure around the forums this time around, though.

I don't recall at the moment the reason you were banned from BM, but depending on the severity of it I may say that if you are granted members again (which I'm not opposed to) you should still be banned from BM. Not that I'm staff, but that would be my opinion.

**BANNED The Man

2011-08-04 21:01:41

From: NCDS
Or was it perhaps because you were banned from black market and had a bad reputation?

I'll admit you've been much more of a pleasure around the forums this time around, though.

I don't recall at the moment the reason you were banned from BM, but depending on the severity of it I may say that if you are granted members again (which I'm not opposed to) you should still be banned from BM. Not that I'm staff, but that would be my opinion.


Not the reason at all, I am putting that out there, I am more than happy to be restricted access to BM.

I did it for a fresh start, to learn, and to make friends.

-Boom

NCDS

2011-08-04 21:04:15

From: Dynamite
Not the reason at all, I am putting that out there, I am more than happy to be restricted access to BM.


May not even be necessary. Like I said before, I don't recall the reasoning for it. I was sort of implying you should post what the reason was. ;)

Others have been banned before and returned and things have worked out alright.

**BANNED The Man

2011-08-04 21:07:22

From: NCDS
May not even be necessary. Like I said before, I don't recall the reasoning for it. I was sort of implying you should post what the reason was. ;)

Others have been banned before and returned and things have worked out alright.


Oh, sorry, I was banned for selling a copy of JADs guide to a friend.

-Boom

cycrosism

2011-08-05 03:16:50

Yes from me. Good luck!

Sabzi

2011-08-05 05:45:36

Dunno what you have written in your application I have seen enough of you already and I was waiting for the application. Yes of course. Yeah, yeah, I am lazy.

Floor66

2011-08-05 06:05:02

I remember you as The Man! I never knew you were him :O

Yes from me!

mixster

2011-08-05 07:10:13

program StarterFighter;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i reflection\reflection.simba}
{$i SRL\SRL\misc\paintsmart.scar}
{$i SRL\SRL\Misc\Stats.simba}


const

// The file where to save various statistics.
CONF_STATISTICS_FILE = ScriptPath + 'statistics.dat';
//mixster .ini rather than .dat? Since it's an INI file, should be .ini in my humble opinion

LOCATION_RATS = 0;
LOCATION_GOBLINS = 1;
LOCATION_CHICKENS = 2;

var
{STUFF}
MonsterName : String;
MyColor, MyTol : integer;

{AREAS}
SpawnArea, GoblinsArea, ChickensArea, RatsArea : TBox;

{WALKS}
RatsTiles, ChickensTiles, GoblinsTiles : TPointArray;

{MARKS}
RatsMark, ChickensMark, GoblinsMark : TTile;




const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Integers[50] := 0; // 0 = RATS, 1 = GOBLINS, 2 = CHICKENS.
//mixster You have those global consts, so why not have them use those?
Integers[51] := SKILL_ATTACK; // Fight Mode.. attack, strength, defence
Strings[51] := 'Attack'; // Lamp Skill
end;
end;

var
s_img_bg,
s_killed_chickens,
s_killed_goblins,
s_killed_rats,
s_killed_chickens_session,
s_killed_goblins_session,
s_killed_rats_session,
s_start_exp,
s_start_exp_left: integer;

s_canvas: TCanvas;

procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: begin
Wait(100 + Random(50));
Exit;
//mixster redundant exit
end;
end;
end;

Procedure AntiRandoms;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
FindNormalRandoms;
Wait(300+Random(200));
FindLamp(Players[CurrentPlayer].Strings[51]);
End;

//mixster Assuming this ends up on the TCanvas, fairly sure TCanvas has a TextOut function attached to it
procedure TextOut(b, x, y: integer; t: string);
var
pa: TPointArray;
h, i: integer;
begin
pa := LoadTextTPA(t, SmallChars, h);

for i := 0 to High(pa) do begin
FastSetPixel(b, x + 1 + pa[i].x, y + 1 + pa[i].y, 1317920);
FastSetPixel(b, x + pa[i].x, y + pa[i].y, clWhite);
end;

SetLength(pa, 0);
end;

procedure SetupScript;
begin

SMART_SERVER := 1;
SMART_SIGNED := true;
SMART_MEMBERS := false;

SetScriptProp(SP_WriteTimeStamp, [true]);
SMART_SetupDebug();
ClearRSCanvas(SMART_Canvas.canvas);

SetupSRL;
DeclarePlayers;


//STATS
if (SRLStats_Username = '') then
SetupSRLStats(100, 'Anonymous', 'anon1337')
else
SetupSRLStats(100, SRLStats_Username, SRLStats_Password);


s_killed_chickens := StrToInt(ReadIni('monsters', 'chickens', CONF_STATISTICS_FILE));
s_killed_rats := StrToInt(ReadIni('monsters', 'rats', CONF_STATISTICS_FILE));
s_killed_goblins := StrToInt(ReadIni('monsters', 'goblins', CONF_STATISTICS_FILE));
s_killed_chickens_session := 0;
s_killed_rats_session := 0;
s_killed_goblins_session := 0;


s_img_bg := LoadBitmap(ScriptPath + 'bg.png');
s_canvas := TCANVAS.Create;
s_canvas.Handle := SmartGetDebugDC();

TextOut(s_img_bg, 5, 32, 'Progress to next level');
TextOut(s_img_bg, 5, 57, 'Exp. / h');
TextOut(s_img_bg, 5, 74, 'Exp. gained');
TextOut(s_img_bg, 5, 91, 'Exp. until next level');
TextOut(s_img_bg, 5, 107, 'Time until next level');

TextOut(s_img_bg, 259, 57, 'Chickens (session)');
TextOut(s_img_bg, 259, 74, 'Goblins (session)');
TextOut(s_img_bg, 259, 91, 'Rats (session)');

s_start_exp := R_GetSkillExp(Players[CurrentPlayer].Integers[51]);
s_start_exp_left := R_GetSkillExpToLevel(Players[CurrentPlayer].Integers[51]);
end;


procedure UpdateStatistics();
var
b, cdx, cdy, expleft, rt, h, m, s: integer;
gainedexp, exph: double;
begin
b := BitmapFromString(765, 303, '');

FastDrawTransparent(0, 0, s_img_bg, b);

expleft := R_GetSkillExpToLevel(Players[CurrentPlayer].Integers[51]);

// Progress bar.
for cdx := Round(((0.0 + s_start_exp_left - expleft) / s_start_exp_left) * 361) to 360 do
for cdy := 0 to 16 do
FastSetPixel(b, 141 + cdx, 31 + cdy, $a6506d);
//mixster very messy - you have to start and end values, so draw a rectangle onto the bitmap/canvas

rt := GetTimeRunning();
gainedexp := R_GetSkillExp(Players[CurrentPlayer].Integers[51]) - s_start_exp;
exph := (gainedexp / rt) * 3600000;

if (exph > 0) then //mixster loose check? exph <> 0 would be a touch better I'd say
ConvertTime(Round(((0.0 + expleft) / (Round(exph / 50) * 50)) * 3600000), h, m, s);

TextOut(b, 146, 32, Format('Level %.2d: %.2f%%', [R_GetSkillLevel(Players[CurrentPlayer].Integers[51]) + 1, (0.0 + s_start_exp_left - expleft) / s_start_exp_left * 100]));

TextOut(b, 143, 57, Format('%.2fk', [(0.0 + exph) / 1000])); //mixster adding 0.0? If you want to force float, divide by 1000.0
TextOut(b, 143, 74, Format('%.2fk', [(0.0 + gainedexp) / 1000]));
TextOut(b, 143, 91, Format('%.2fk', [(0.0 + expleft) / 1000]));
TextOut(b, 143, 107, Format('%.2dh %.2dm %.2ds', [h, m, s]));

TextOut(b, 237, 5, Format('%d', [s_killed_chickens]));
TextOut(b, 348, 5, Format('%d', [s_killed_goblins]));
TextOut(b, 448, 5, Format('%d', [s_killed_rats]));

TextOut(b, 395, 57, Format('%d', [s_killed_chickens_session]));
TextOut(b, 395, 74, Format('%d', [s_killed_goblins_session]));
TextOut(b, 395, 91, Format('%d', [s_killed_rats_session]));

DrawBitmap(b, s_canvas, 7, 345);

FreeBitmap(b);
end;

procedure SaveStatistics(Monster:string; a: integer);
begin
if (a > 0) then //mixster Another loose check; could be neater by doing "if a == 0 then exit;" but that's merely cosmetic
case Monster of
'Chicken': begin
IncEx(s_killed_chickens, a);
IncEx(s_killed_chickens_session, a);

WriteINI('monsters', 'chickens', IntToStr(s_killed_chickens), CONF_STATISTICS_FILE);
end;

'Giant rat': begin
IncEx(s_killed_rats, a);
IncEx(s_killed_rats_session, a);

WriteINI('monsters', 'rats', IntToStr(s_killed_rats), CONF_STATISTICS_FILE);
end;

'Goblin': begin
IncEx(s_killed_goblins, a);
IncEx(s_killed_goblins_session, a);

WriteINI('monsters', 'goblins', IntToStr(s_killed_goblins), CONF_STATISTICS_FILE);
end;
end;
end;


{function GetTehXP: Integer;
begin
Result := R_GetSkillExp(SKILL_ATTACK) + R_GetSkillExp(SKILL_STRENGTH)
+ R_GetSkillExp(SKILL_DEFENCE) + R_GetSkillExp(SKILL_HP);
end;}

procedure setupColors;
begin
//mixster Not using those global consts again?
case Players[CurrentPlayer].Integers[50] of
0 : begin //rats
MyColor := 4014147;
MyTol := 23;
end;
1 : begin //goblins
MyColor := 5605249;
MyTol := 46;
end;
2 : begin // chickens
MyColor := 7185861; // vvv I know, these can all be one. vvv
MyTol := 94; //mixster I can maybe give you the other two, but I don't think you can count this as colour finding
end;
end;
end;

procedure setupWalks;
begin
RatsTiles := [Point(3214, 3206), Point(3197, 3206)];
GoblinsTiles := [Point(3235, 3224), Point(3250, 3226), Point(3251, 3237)];
ChickensTiles := [Point(3227, 3232), Point(3226, 3247), Point(3229, 3261), Point(3238, 3276), Point(3239, 3292), Point(3230, 3297)];
end;

//mixster Even after our IRC prodding, the Y1 values are still bigger than the Y2 values
procedure setupAreas;
begin
SpawnArea.X1 := 3220;
SpawnArea.X2 := 3223;
SpawnArea.Y1 := 3223;
SpawnArea.Y2 := 3214;

RatsArea.X2 := 3199;
RatsArea.Y2 := 3200;
RatsArea.X1 := 3187;
RatsArea.Y1 := 3212;

GoblinsArea.X1 := 3243;
GoblinsArea.Y1 := 3243;
GoblinsArea.X2 := 3257;
GoblinsArea.Y2 := 3230;

ChickensArea.X1 := 3225;
ChickensArea.Y1 := 3300;
ChickensArea.X2 := 3236;
ChickensArea.Y2 := 3293;
end;

procedure setupMarks;
begin
RatsMark := Point(3197, 3206);
GoblinsMark := Point(3251, 3237);
ChickensMark := Point(3230, 3297);
end;

//mixster useless function - you should just use R_SelfInBox.
//mixster TheTile isn't used and the function can be simplified to Result := R_SelfInBox(Area)
function inAreaEx(TheTile : TTile; Area : TBox): boolean;
begin
if R_SelfInBox(Area) then
Result := True
else Result := False;
end;

//mixster Not entirely useless, but seems like unwanted debug for the end user
function inArea(Area : TBox) : boolean;
begin
Writeln(Area);
result := inAreaEx(R_GetMyPos, Area);
end;


function getTrainingArea : TBox;
begin
//mixster ignoring those global consts again and switching to chain else-if's rather than a case, which is an odd change in style
if(Players[CurrentPlayer].Integers[50] = 1) then
result := GoblinsArea
else if (Players[CurrentPlayer].Integers[50] = 0) then
result := RatsArea
else
result := ChickensArea;
end;

//mixster Not sure what this adds to the script
function atTrainingSpot : boolean;
begin
Result := inArea(getTrainingArea);
end;

//mixster As above
function atSpawnSpot : boolean;
begin
Result := inArea(SpawnArea);
end;

function DeathWalk: boolean;
begin
if (not (LoggedIn)) then Exit;
//mixster Honestly, why have those global consts?
case Players[CurrentPlayer].Integers[50] of
0: R_WalkPath(RatsTiles);
1: R_WalkPath(GoblinsTiles);
2: R_WalkPath(ChickensTiles);
end;
//mixster Err, Result := atTrainingSpot()?
if atTrainingSpot then
Result := True;
end;

function Relocate : boolean;
begin
//mixster I won't even bother mentioning the consts any more
case Players[CurrentPlayer].Integers[50] of
0: R_WalkToTile(RatsMark, 2, 0);
1: R_WalkToTile(GoblinsMark, 2, 0);
2: R_WalkToTile(ChickensMark, 2, 0);
end;
//mixster Again, Result := atTrainingSpot()
if atTrainingSpot then
Result := True;
end;

Function FightMode: boolean;
begin
//mixster Using a stored value in Extendeds[0] as a check for if FightMode is done? Why not Booleans[0]?
if Players[CurrentPlayer].Extendeds[0] > 0 then
Exit;
if Players[CurrentPlayer].Extendeds[0] = 0 then
//mixster Why not take Players[CurrentPlayer].Extendeds[0] := 1; out of the case since the same thing is part of all branches?
case Players[CurrentPlayer].Strings[50] of
'attack': begin
Players[CurrentPlayer].Extendeds[0] := 1;
Result := SetFightMode(1);
end;

'strength': begin
Players[CurrentPlayer].Extendeds[0] := 1;
Result := SetFightMode(2);
end;


'defence': begin
Players[CurrentPlayer].Extendeds[0] := 1;
Result := SetFightMode(4);
end;

end;
end;

Function FightTheThing:boolean; //mixster You say it's a function, but you don't make use of the Result in MainLoopage, so why is it?
var
Fighting : TNPC;
NPCs, SortedNPCs : TNPCArray;
Index, i, Times, x, y, KHeight : Integer; //mixster i seems to be absent...
Where : TPoint;
begin
ColorToleranceSpeed(1); //mixster You don't change it anywhere, so why not put it in script setup?
Writeln('Trying to fight');
if(R_AreWeInteracting(Fighting, True)) then // mixster Fighting isn't set? Not sure if it needs to be
begin
Wait(500);
Antiban;
exit; //mixster Shouldn't you wait until the fighting is over?
end;

NPCs := (R_GetNPCs(MonsterName, True));
SortedNPCs := NPCs; //mixster No reason for this?
//mixster Another debuggy thing, seems like it would be annoying, but merely aesthetics
Writeln(MonsterName);
if(GetArrayLength(SortedNPCs) = 0) then
begin
writeln('no ' + MonsterName + '...');
Wait(500);
Exit;
end;
for Index := 0 to High(SortedNPCs) do
begin
Inc(Times); //mixster Doesn't seem to be used anywhere else
if((inAreaEx(SortedNPCs[Index].Tile, getTrainingArea())) and not SortedNPCs[Index].InCombat) then
begin
if(not R_TileOnMS(SortedNPCs[Index].Tile, 0)) then
Exit;
begin //mixster Random begin, what?
KHeight := R_GetTileHeight(SortedNPCs[Index].Tile);
Where := R_TileToMS(SortedNPCs[Index].Tile, KHeight);
if not FindColorTolerance(x, y, MyColor, Where.x - 10, Where.y - 10, Where.x + 10, Where.y + 10, MyTol) then
begin
Writeln('YOU ARE RIGHT'); //mixster Er, seems silly since this is where the colour isn't found
Wait(1000);
break //mixster missing ; and fairly sure a continue would be better suited
end else
begin
Writeln('Found Colour');
MMouse(x, y, 0, 0);
GetMousePos(x, y);
if R_IsUpText(MonsterName) then
begin
Mouse(Where.x, Where.y, 0, 0, true); //mixster But... you just moved your mouse to x, y
//mixster You don't have to click there, but why the effort if you ignore them?

//mixster Missed indent silly... and some more a bit later on...
if R_WaitCrossHairColor(CROSSHAIR_RED, 1000) then
begin
Wait(1000);
SaveStatistics(MonsterName, 1);
UpdateStatistics();
result := true
end else begin
Wait(1000);
result := false;
break; //mixster Another case where maybe continue is better suited?
end;
Repeat
Writeln('Waiting'); //mixster Could spit out a lot of unneeded stuff, maybe just the one Waiting?
Wait(300);
Until not R_InCombat and not R_Animating and not R_Moving; //mixster Parenthesis would clear this up
break; //mixster Hard to tell, but I think this means that you only check the first NPC - proper indenting would help
//mixster Nothing wrong with that, but may be unwanted
end;
end;
end;
end;
end;
end;

procedure MainLoopage;
begin
//mixster Seems like things that should be done for every person?
//mixster If not, then why isn't it in SetupScript?
if(not loggedIn) then
LoginPlayer;
MakeCompass('West'); //mixster Eh? Any particular reason for making it West?
SetAngle(True);
FightMode;
setupMarks;
setupColors;
setupAreas;
setupWalks;

//mixster A quiet grumble about global consts
if(Players[CurrentPlayer].Integers[50] = 0) then
MonsterName := 'Giant rat'
else if (Players[CurrentPlayer].Integers[50] = 2) then
MonsterName := 'Chicken'
else
MonsterName := 'Goblin';

Antirandoms; //mixster The only NextPlayer is in here and you only run this once, so I'd say it's not very multiplayer
Repeat
if atTrainingSpot then
FightTheThing
else
if atSpawnSpot then
DeathWalk
else
if not Relocate then
TerminateScript; //mixster Eep; don't you just want to set current player to inactive then go on to the next one?
until AllPlayersInactive;
end;


begin
SetupScript;
repeat
MainLoopage;
//mixster MainLoopage only finishes when AllPlayersInactive is true, so useless loop
until AllPlayersInactive;
end.

I would check the other two, but I'm afraid… very afraid…

BraK

2011-08-05 07:50:09

For those that don't know I am originally The Man.
The reason I created a new account was for a fresh start, to learn from the beginning because I didn't feel I was at the level of a Member.


I really don't see an issue with your old account.

I am more than happy to be restricted access to BM.


Then make new friends on your original account. You have more of a chance for redemption as your original account than on a new one. All making a new one did was have everyone examine your old one for faults. As I see it one account that isn't banned is already in members. There is no reason to make your new one members as it will have the same restrictions as the old. Your better of changing your name on the Old one if your wanted a new name.

T~M > Boom.

~BraK

E: my answer is No. I prefer you on the original account.

Echo_

2011-08-05 08:11:04

I agree with BraK, why didn't you just accomplish all that you did on this account with your other account? I had no idea that you were the Man until now, and it's interesting that you waited nearly 9 months to make that a known fact to the community.

I'm afraid I will have to vote no as well, sorry.

Home

2011-08-05 08:16:23

Multiple Accounts: any user is allowed to have 1 account and 1 account only.



I don't mean to be an ass.


~Home

Gu3st...

2011-08-05 08:21:37

From: Home
I don't mean to be an ass.


~Home
A lot of people have multiple accounts.

Home

2011-08-05 08:22:27

From: Zyt3x
A lot of people have multiple accounts.


Ok. Well why do we have rules then?

And once again, I don't mean to be an ass :P


~Home

**BANNED The Man

2011-08-05 08:31:46

@Brak, I am not asking for redemption, nobody remembered why I was banned in the first place and honestly I had to check logs to remember.
@Home, I do understand that, but other members have been accepted AFTER BEING PERMANENTLY BANNED. I simply created another account so I could have motivation to learn.

-Boom

Home

2011-08-05 08:42:17

From: Dynamite
@Brak, I am not asking for redemption, nobody remembered why I was banned in the first place and honestly I had to check logs to remember.
@Home, I do understand that, but other members have been accepted AFTER BEING PERMANENTLY BANNED. I simply created another account so I could have motivation to learn.

-Boom


Ok got it :)

~Home

BraK

2011-08-05 08:49:21

Imagine me sitting back relaxed in my chair with yourself sitting across from me. While I calmly explain my point of view on the topic to you. :) This is not meant to be like Flaming.

T~M I was auto-membered before it was anything that was out of the norm. Back then I couldn't really script but I tried to contribute. After awhile I got tired of not understanding and put a lot of time into learning. This has gotten me here today. I can understanding needing motivation to get learning again.

Those people you speak of are definitely here today. They make tremendous amounts of effort to be re-accepted. They also had no other way back to the Forums but still wanted to be a part of the community. You still had your ability to see and contribute and really hadn't been penalized that much.

Why besides motivation did you create the new account? You could do everything you have done on the new account on the old and been in a better position.

nobody remembered why I was banned in the first place and honestly I had to check logs to remember.


So what was the point?

but other members have been accepted AFTER BEING PERMANENTLY BANNED.


Are you asking for an exception to the rule for multiple accounts? It's sound more like your saying because they were given a second chance you should have a second account for the hell of it. Your not really getting a second chance since there is nothing wrong with the other account.

It'll ultimately be up to the staff to decide what to do. As this isn't a normal Application. You've already gotten members the normal way once.

~BraK

P.S. I still think "The Man" is better than this account. You can change your rep by changing your attitude.

masterBB

2011-08-05 09:25:54

From: mixster
Mixster's awesome script check.

I would check the other two, but I'm afraid… very afraid…


I've looked into the second one. It isn't better as the first one.

  1. Endless mainloop only if the loads are done it will exit the loop
  2. You put an endless loop inside your endless loop (loopception), for example what if WalktoAubury fails? It will do it again, and again…
  3. Your walking WalkToAubury doesn't make any sense.
  4. In many functions and procedures your standards are way off

There are almost no failsafes. The way you set Result is in a lot of cases just wrong. It's a no from me.

edit:
Check this optimization:
Function AtMiddle:boolean;
var
Rope : TRSObject;
MiddleTile:array [0..26] of TTile;
MainTile, done:TTile;
I:integer;
Begin
if not LoggedIn then Exit;
Wait(5000);
Writeln('Starting at Middle');
MainTile := Tile(2909, 4834);
MiddleTile[0] := Tile(MainTile.x, MainTile.y);
MiddleTile[1] := Tile(MainTile.x+1, MainTile.y);
MiddleTile[2] := Tile(MainTile.x+2, MainTile.y);
MiddleTile[3] := Tile(MainTile.x+3, MainTile.y);
MiddleTile[4] := Tile(MainTile.x, MainTile.y-1);
MiddleTile[5] := Tile(MainTile.x+1, MainTile.y-1);
MiddleTile[6] := Tile(MainTile.x+2, MainTile.y-1);
MiddleTile[7] := Tile(MainTile.x+3, MainTile.y-1);
MiddleTile[8] := Tile(MainTile.x, MainTile.y-2);
MiddleTile[9] := Tile(MainTile.x+1, MainTile.y-2);
MiddleTile[10] := Tile(MainTile.x+2, MainTile.y-2);
MiddleTile[11] := Tile(MainTile.x+3, MainTile.y-2);
MiddleTile[12] := Tile(MainTile.x, MainTile.y-3);
MiddleTile[13] := Tile(MainTile.x+1, MainTile.y-3);
MiddleTile[14] := Tile(MainTile.x+2, MainTile.y-3);
MiddleTile[15] := Tile(MainTile.x+3, MainTile.y-3);
MiddleTile[16] := Tile(MainTile.x, MainTile.y-4);
MiddleTile[17] := Tile(MainTile.x+1, MainTile.y-4);
MiddleTile[18] := Tile(MainTile.x+2, MainTile.y-4);
MiddleTile[19] := Tile(MainTile.x+3, MainTile.y-4);
MiddleTile[20] := Tile(2909, 4829);
MiddleTile[21] := Tile(2909, 4828);
MiddleTile[22] := Tile(2909, 4827);
MiddleTile[23] := Tile(2908, 4826);
MiddleTile[24] := Tile(2907, 4826);
MiddleTile[25] := Tile(2906, 4826);
MiddleTile[26] := Tile(2905, 4826);
Rope := GetObjectByID(496, OBJECT_TYPE_FLOORDECOR, 9);
done := GetMyPos;
For I:= 0 to 26 do
if ((done.x = MiddleTile[I].x) and (done.y = MiddleTile[I].y)) then begin
//if TileOnMS(MiddleTile[I].x, MiddleTile[I].y, 0) then begin
Writeln('AtMiddle');
Result := True;
Exit
end else
Result := false;
End;

to

Function AtMiddle:boolean;
var
mainTile,myPos:TTile;
Begin
if not LoggedIn then Exit;
Wait(5000); //Why no random wait? Or even better, a loop where it checks if it is in the middle at a certain interval.
MainTile := Tile(2909, 4834);
//Rope := GetObjectByID(496, OBJECT_TYPE_FLOORDECOR, 9); What is this line for anyway?
myPos := GetMyPos;
Result := Distance(myPos.x,myPos.y,mainTile.x,mainTile.y) < 7; //Don't know the distance.
End;

**BANNED The Man

2011-08-05 09:50:30

There was some bug in reflection when I released that script and that was the only way that I tested that worked.

-Boom

masterBB

2011-08-05 09:54:34

From: Dynamite
There was some bug in reflection when I released that script and that was the only way that I tested that worked.

-Boom


It's not reflection related. I still use one reflection call, getMyPos.

**BANNED The Man

2011-08-08 12:54:06

Updated main script with mixsters comments <3.

-Boom

Jakkle

2011-08-09 18:47:20

Yes from me :)

**BANNED The Man

2011-08-09 21:14:11

From: Jakkle
Yes from me :)


Wub you <3

-Boom

Wanted

2011-08-10 00:40:49

If you have an account that is already members…
Then you make a new account that isn't members…
And everyone knows who you were/are from your old account….
Then what was was the point of making the new account?
And what was the point of trying to be members on the new account?

I don't understand :confused:

Jakkle

2011-08-10 09:53:10

Can't his old account be deleted ?

mixster

2011-08-10 09:57:34

From: Jakkle
Can't his old account be deleted ?


Put both accounts in a pit and let them fight it out for survival while we bet on the outcome.

**BANNED The Man

2011-08-10 10:16:41

From: Jakkle
Can't his old account be deleted ?


This, I haven't been on it (apart from the logging out on my mums PC) since I created this account.

-Boom

Jakkle

2011-08-10 10:19:46

From: mixster
Put both accounts in a pit and let them fight it out for survival while we bet on the outcome.


Had to giggle at this. Why not tho, lets do it :p

BraK

2011-08-10 12:40:08

From: mixster
Put both accounts in a pit and let them fight it out for survival while we bet on the outcome.


T~M will win for he is a Man. Dynamite is but a boy. ;)

~BraK

**BANNED The Man

2011-08-10 13:31:43

From: BraK
T~M will win for he is a Man. Dynamite is but a boy. ;)

~BraK


Ahhh, but even thought Dynamite may be but a boy, he still has a bigger e-pene than T~M ;)

-Boom

Flight

2011-08-10 13:37:18

Am I too late to place some bets? :(

Wanted

2011-08-10 13:39:48

inb4magicalAccountMergeButtton

**BANNED The Man

2011-08-10 13:46:05

From: Flight
Am I too late to place some bets? :(


No, the fight occurs at 10PM GMT tonight.
All bets go to paypal account: [email]imnotgonnagiveyourmoneyback@lolirl.com[/email]

-Boom

Main

2011-08-10 13:50:34

Yes, I'd say every one deserves a second chance.

MylesMadness

2011-08-10 13:51:56

From: Main Ftw
Yes, I'd say every one deserves a second chance.
I can't have you looking like Markus with your avatar :p

**BANNED The Man

2011-08-10 13:57:42

From: MylesMadness
I can't have you looking like Markus with your avatar :p


I thought it was Markus aswell, I was like "OMGWTF Markus been demoted…. lol."

Thanks Main_Ftw :)
-Boom

Main

2011-08-10 14:12:17

From: MylesMadness
I can't have you looking like Markus with your avatar :p


Why do you think I picked that avatar lol:P Jk.

That guy looks like my elementary math teacher, whom I respect a lot lol.

**BANNED The Man

2011-08-14 09:25:35

Bump? <3
Any more suggestions/questions? :)

<3 from Boom

BraK

2011-08-14 09:44:27


Patience young Padawan. I'm sure the staff is discussing it. Whatever action will be taken they'll post eventually.

~BraK

cause

2011-08-14 14:02:53

I voted yes, active around the community. Plus he takes scripting advice!

Wizzup?

2011-08-14 14:32:46

From: Wanted
inb4magicalAccountMergeButtton


There is a merge accounts button. But I think he made a new account because he didn't want to associate with his past actions, and that includes posts.

**BANNED The Man

2011-08-14 17:51:11

From: BraK

Patience young Padawan. I'm sure the staff is discussing it. Whatever action will be taken they'll post eventually.

~BraK


Haha sorry xD <3

From: cause
I voted yes, active around the community. Plus he takes scripting advice!


Thank you <3

From: Wizzup?
There is a merge accounts button. But I think he made a new account because he didn't want to associate with his past actions, and that includes posts.


This is part of the reason aswell, BUT I don't mind if I am restricted from the BM still, but could I not have the badge?

<3 from Boom

Smarter Child

2011-08-14 19:51:08

From: Dynamite
This is part of the reason aswell, BUT I don't mind if I am restricted from the BM still, but could I not have the badge?


The badge indicates to other users that they should think twice before doing a deal with you(off of the BM).

Frement

2011-08-14 20:11:54

He is young, in time he will learn. (If he hasn't already) I did more damage then he did, yet I'm able to use the black market. As I'm an exception, maybe he could be also?

NCDS

2011-08-14 20:24:39

IMO, it should be at least a year from the time of being banned that you are allowed to be without the cup and allowed back into the BM. Depending on attitude and activity of course.

With that being said, I think this account should be deleted. Go back to using 'The Man', ask for a name change if you'd like, and continue on from there.

No point in you having two accounts that are members if you ask me.

Coh3n

2011-08-15 02:23:41

I'm closing this as there's no more discussion about the application. This discussion will continue with the staff. Please be patient for a decision.

Coh3n

2011-08-19 18:20:31

The Man has been renamed to Dynamite, and the account that made this thread has been banned.