SRL Archive - Archive

m34tcode - SRL Member Application


m34tcode

2012-03-28 05:47:19

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
The Only language I can say I know well is Java. Iv been programing with java for a few years, so I wouldn't call myself an expert, but I know what I'm doing.

I also know a little C#, and PHP.

I Knew Visual Basic a long time ago, but I haven't touched that language in so long that I may as well never have learned it.


Are you a member of any other communities?
I am not a member of any other RuneScape related communities


Tell us about yourself…
From: m34tcode
I first ran into SCAR about 7 years ago, back when I was in 6th grade. I was more than interested in the fact that my computer could do my hard work for me, so I began editing scripts and learning how to create my own.

For the first few years of highschool, I used my computer much less than in previous years, but at the end of my junior year, I got back into programming, and learned Java.

Later, during my senior year, I wrote an application that would take drawings you created, and print the code required to render them.

This Program won the innovator's award at the local science fair, Which was fairly exciting for me.

I was g0tp0t here previously, but I stopped playing RuneScape for a while, and I have just recently rejoined the community.



Please show us one (or multiple) of your scripts.

{$DEFINE SMART}
{$i srl/srl.simba}
{$i ObjectDTM/ObjDTMInclude.simba}

var

//Stores the previous bank slot logs were found in, to speed up banking
LogsBankSlot : TPoint;

//Proggy stuff
Prog_PlanksMade,Prog_XPGained : Integer;

//stats stuff
commitTime : LongInt;
logsPlanked : Integer;

const
DEBUG_LEVEL = 5;
ENABLE_WALKING = True;

SRLStats_Username = '';
SRLStats_Password = '';

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
Active := true;
Member := true
//Log Type
Integers[0] := 3; //0-3 for normal, oak, teak, or mahogany logs respectively
end;
end;

function replicate(str : String; count : Integer):String;
var
I : Integer;
begin
Result := '';//make sure result is empty if function was previously called;

for I := 0 to count-1 do
Result := Result + str;
end;

procedure DebugStr(Level : Integer; Text : String);
begin
if (DEBUG_LEVEL >= Level) then
writeln(replicate(':: ',Level) + Text);
end;

function GetLogDTM(Log : Integer):Integer;
begin
case Log of
0: Result := DTMFromString('mlwAAAHicY2dgYDjEzMCwE4iPA/EFID4NxCeA+AAQczEyMPBBMScQswDxT6CeP0Ac5azO0JRhCWQxYWBWIIkLM+LBUAAAb7UJyg==');
1: Result := DTMFromString('mlwAAAHicY2dgYDjMzMCwE4gPAfFpJAzi6zEyMBgAsQIUawCxIRCbAHFdvDnD7JowoAlMGJgVSOLCjHgwFAAAS4YJZQ==');
2: Result := DTMFromString('mggAAAHicY2NgYDjKzMCwE4gPA/EFID4BxKeAOIiRgSEMiJ2BOBDK9gHi5T2xDE1JlkCdTCiYFUhiw4w4MAQAAKTJCXk=');
3: Result := DTMFromString('mggAAAHicY2NgYDjCzMCwC4hPAPFpID4ApcsYGRiqoDgfiDOAOA2Il3RGM/jpcgN1MqFgViCJDTPiwBAAAL2TCZw=');
end;
end;

function GetMageSortSettingBMP(Setting : Integer; Planking : boolean) : Integer;
begin
case Setting of
0: Result := BitmapFromString(6, 5, 'meJwTUVARUVCRl5c/evOVeUQBkPSN' +
'TfeKSmZkYABy05dtA8oCuUBBOBfIAHIDErOADCAXqBJI+sZnAhGQD' +
'UQQBgAtghmf');
1: If Planking then
Result := BitmapFromString(6, 6, 'meJzTNzCwsbHJyspiZGDo6uoSFhYG' +
'MhwdHYFsICMhIREoIi8vP2ny5ITERKCIvoEBUGTJkiVAEaA4FxcXk' +
'BuRWQzUAmQDFQC5AYlZsQVVQDaEC5SNyi1PKW8CAFv6GSo=')
else
Result := BitmapFromString(7, 7, 'meJzTNzCwsbHJzs5mZGDo6uoWFhbO' +
'buwBsh0dHYFcICMxMREomFHZKi8vP2nyFCAXKKhvYAAUTClvWrJkC' +
'VAQKMXFxQUUSSppSCisBuoFcoHKIGqAIkAE5KKJABHQWCAXgoDciM' +
'xiIAIAby4rEw==');
2: Result := BitmapFromString(7, 7, 'meJxrnL2gYsKc0u6ZRR1T8psnZDf2' +
'AFF9MgNQhMG2GY4yKluDTRhB7Pi9DF0PQQjIsG0CagEJArmLroIQkAE' +
'WZGRggOltAiIgF2hsZk0HkAFHCYXVQGNTypsgCMiNyCwGIgAMgjOd');
end;
end;

function MenuOpen:Boolean;
begin
DebugStr(3,'Checking whether menu is open...');

result := OptionsExist(['a','n','c','e','l'],False);

DebugStr(4,'Menu was open: ' + BoolToStr(Result));
end;

procedure mouseAway;
var
TP:TPoint;
begin
DebugStr(5,'Exiting Menu');

GetMousePos(TP.x,TP.y);

MMouse(TP.x-100-random(50),TP.y-150-random(100),5,5);

wait(540+random(500));
end;

function Open_Bank:Boolean;
var
I,TempCTS : Integer;
PostBankClick : LongInt;
TempHM,TempSM : Extended;
TP : TPoint;
bankerTPA : TPointArray;
bankerATPA : T2DPointArray;
begin
Result := False;

TempCTS := GetColorToleranceSpeed;
if TempCTS = 2 then
GetColorspeed2Modifiers(TempHM,TempSM);

SetColorToleranceSpeed(2);

SetColorspeed2Modifiers(0.10,0.60);

if not (BankScreen or PinScreen) then
begin
DebugStr(3,'Not in Bank or Pin Screens');

Result := OpenBankNPC;

if not OpenBankNPC then
begin
DebugStr(3,'SRL OpenBankNPC failed, finding bankers manually...');

FindColorsTolerance(bankerTPA,3350053,MSX1,MSY1,MSX2,MSY2,11);

bankerATPA := TPAtoATPA(bankerTPA,20);

SortATPAFromMidPoint(bankerATPA,Point(MSCX,MSCY));

for I := 0 to length(bankerATPA)-1 do
begin
TP := MiddleTPA(bankerATPA[I]);

MMouse(TP.x,TP.y,4,4);

DebugStr(4,'Waiting for bankers uptext...');

if WaitUpTextMulti(['to B','Bank','anke'],725+random(225)) then
begin
DebugStr(3,'Found Banker');

clickMouse2(mouse_Right);

if WaitOption('ank B',725+random(225)) then
begin
DebugStr(4,'Found option to bank');

wait(100+random(125));

if ChooseOption('ank B') then
DebugStr(4,'Clicked open bank succesfully')
else
begin
DebugStr(3,'Failed find open bank option...');

Logout;
NextPlayer(False);
end;

break;
end;
end;
end;
end;
end;

MarkTime(postBankClick);

while not (BankScreen or PinScreen) and (TimeFromMark(postBankClick) < 5000) do
wait(100+random(50));

if PinScreen then
begin
DebugStr(2,'Entering pin...');

inpin(Players[CurrentPlayer].Pin);
end;

MarkTime(postBankClick);

while not BankScreen and (TimeFromMark(postBankClick) < 5000) do
wait(50+random(50));

result := BankScreen;

if result then
begin
DebugStr(2,'Bank opened succesfuly');

FixBank;
end;

SetColorToleranceSpeed(TempCTS);

if TempCTS = 2 then
SetColorspeed2Modifiers(TempHM,TempSM);
end;

function CloseDepositScreen: Boolean;
(* Credit to Cut em2 it *)
var
i,Timer: Integer;
begin
Result := False;
if DepositScreen then
begin
Timer := GetTimeRunning + 8000;
repeat
Mouse(433, 42, 10, 12, mouse_Left);
for i := 0 to 30 do
begin
if not DepositScreen then
begin
Result:= True;
Break;
end;
Wait(100);
end;
Wait(Random(100));
until (GetTimeRunning > Timer) or Result;
end;
end;

procedure depositPlanks;
begin
DebugStr(3,'Depositing Planks...');

Deposit(3,28,True);
end;

function TestBankSlot(text : TStringArray ; BankPoint : TPoint; ExitMenu : Boolean):Boolean;
var
T : LongInt;
Tries : LongInt;
begin
Result := False;

DebugStr(4,'RightClick testing bank slot ' + tostr(BankPoint));

MouseBankSlot(BankPointToBankIndex(BankPoint),mouse_move);

for Tries := 0 to 5 do
begin
DebugStr(4,'Attempting to test object in bank. Attempt #' + inttostr(Tries));

If MenuOpen then
mouseAway;

MouseBankSlot(BankPointToBankIndex(BankPoint),mouse_move);

wait(50+random(150));clickmouse2(mouse_Right);

MarkTime(T);

while not MenuOpen and (TimeFromMark(T) < 3000) do
wait(350+random(250));

DebugStr(5,'Checking Options list for: '+tostr(text));

if OptionsExist(text,false) then
begin
Result := true;

break;
end else if MenuOpen then
break;

end;

if ExitMenu then
mouseAway;

DebugStr(4,'Done Testing Bank Slot ' + tostr(BankPoint));
end;

function GetLogsUptext(Log : Integer) : TStringArray;
begin
case Log of
0: Result := ['ll L'];
1: Result := ['ak l','Oak'];
2: Result := ['eak l','Teak'];
3: Result := ['aho','oga', 'any', 'ny lo'];
end;
end;

function FindLogs(var LogsBankSlot:TPoint; withdrawLogs:boolean):Boolean;
var
found : Boolean;
I,Tries : Integer;
LogCols : TIntegerArray;

Tols : TExtendedArray;
TolsArr : array of TExtendedArray;

TP : TPoint;
LogsTPA : TPointArray;
LogsATPA : T2DPointArray;
begin
SetArrayLength(TolsArr,4);

LogCols := [2771296,3826563,6196906,6065320];

TolsArr[0] := [1,0.18,0.13];
TolsArr[1] := [2,0.12,0.09];
TolsArr[2] := [3,0.05,0.91];
TolsArr[3] := [3,0.07,0.79];

if not BankScreen then
begin
DebugStr(3,'Attempted to find logs, but we were not in the bank window');

CloseDepositScreen; //Incase we got stuck in deposit window...
end;

Tols := TolsArr[Players[CurrentPlayer].Integers[0]];

SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(Tols[1],Tols[2]);

FindColorsTolerance(LogsTPA,LogCols[Players[CurrentPlayer].Integers[0]],MBX1,MBY1,MBX2,MBY2,Round(Tols[0]));

DebugStr(2,'Beginning search for logs...');
for Tries := 0 to 5 do
begin
DebugStr(4,'Search Attempt #'+IntToStr(Tries));
LogsATPA := TPAtoATPA(LogsTPA,10);
SortATPASize(LogsATPA,True);

{$IFDEF SMART}
//SMART_DrawDotsEx(true,LogsTPA,clAqua); //TODO modify so this doesnt interfere with paint
{$ENDIF}

if length(LogsTPA) = 0 then
begin
DebugStr(1,'Failed to find log color in bank.');
Result := False;
end;

if Length(LogsTPA) > 0 then
DebugStr(4,'Found log color in bank, finding which is the target log stack');
for I := 0 to length(LogsATPA)-1 do
begin
TP := MiddleTPA(LogsATPA[I]);

mmouse(TP.x,TP.y,4,4);
wait(400+random(50));

found := TestBankSlot(GetLogsUptext(Players[CurrentPlayer].Integers[0]),MSTPointToBankPoint(TP),false);

if not found then
MouseBankSlot(BankPointToBankIndex(MSTPointToBankPoint(TP)),mouse_move);

if found or WaitUpTextMulti(GetLogsUptext(Players[CurrentPlayer].Integers[0]),725+random(225)) then
begin
wait(350+random(150));
LogsBankSlot := MSTPointToBankPoint(TP);

DebugStr(4,'Found your logs in bank at slot ' + ToStr(LogsBankSlot));

if withdrawLogs then
begin
Result := Withdraw(LogsBankSlot.x,LogsBankSlot.y,0);

debugStr(2,'Withdrawing Logs Success: ' + BoolToStr(Result));

if Result then
exit;

end;
end;
end;
end;

{$IFDEF SMART}
// SMART_ClearCanvas;
{$ENDIF}
end;

function withdrawLogs:Boolean;
var
found : boolean;
begin
found := TestBankSlot(GetLogsUptext(Players[CurrentPlayer].Integers[0]),LogsBankSlot,false);
if not found then
MouseBankSlot(BankPointToBankIndex(LogsBankSlot),mouse_move);

if found or WaitUpTextMulti(GetLogsUptext(Players[CurrentPlayer].Integers[0]),725+random(225)) then
begin
DebugStr(3,'Remembered logs Bank Slot, withdrawing');
Result := Withdraw(LogsBankSlot.x,LogsBankSlot.y,0)
end else
begin
DebugStr(3,'Did not remember logs Bank Slot, finding and withdrawing');
Result := FindLogs(LogsBankSlot,true);
end;
end;

function SortSpells(planking:Boolean):Boolean;
var
I,TempBMP : Integer;
T : LongInt;
TP : TPoint;
begin
DebugStr(2,'Sorting the spells in your spellbook');
gametab(tab_Magic);

MarkTime(T);

while not (GetCurrentTab = tab_Magic) and (TimeFromMark(T) < 4000) do
wait(150+random(50));

for I := 0 to 2 do
begin
TempBMP := GetMageSortSettingBMP(I,planking);

if FindBitmapIn(TempBMP,TP.x,TP.y,MIX1,MIY1,MIX2,MIY2) then
begin
mouse(TP.x,TP.y,3,3,mouse_Left);

if not planking then
DebugStr(4,'Mage Sort Setting ' + IntToStr(I+1) + ' Switched')
else if I = 4 then
DebugStr(4,'Mage Sort Setting 2 Switched');
end;

wait(150+random(75));

FreeBitmap(TempBMP);
end;
end;

function LogInSlot(LogDTM,InvSlot:Integer):Boolean;
var
x,y : Integer;
box : TBox;
begin
if not LoggedIn then
exit;

box := InvBox(InvSlot);

Result := FindDTM(LogDTM,x,y,box.X1,box.Y1,box.X2,box.Y2);
end;

function GetLogArray(LogDTM : Integer) : TBoolArray;
var
I,X,Y : Integer;
TP : TPoint;
InvArr : TBoolArray;
DebugLine : String;
begin
if not LoggedIn then
exit;

SetArrayLength(InvArr,28);

DebugStr(3,'Finding which inventory slots contain logs..');
GameTab(tab_Inv);
wait(1000+random(100));

DebugStr(3,'');
DebugStr(3,'Logs Identified in inventory:');
for I := 0 to 27 do
begin
InvArr[I] := LogInSlot(LogDTM,I+1);
if I Mod 4 = 0 then
begin
if length(DebugLine) > 1 then
DebugStr(3,DebugLine + '|');

DebugLine := '|';
end;

if InvArr[I] then
DebugLine := DebugLine + 'L'
else
DebugLine := DebugLine + ' ';
end;

DebugStr(3,DebugLine + '|');

Result := InvArr;
end;

procedure ClickLog(LogSlot : Integer);
var
T : LongInt;
TP : TPoint;
begin
DebugStr(5,'Clicking log at inventory slot ' + ToStr(LogSlot));

MarkTime(T);

while not (GetCurrentTab = tab_Inv) and (TimeFromMark(T) < 4000) do
wait(150+random(50));

MouseItem(LogSlot,mouse_Left);

MarkTime(T);
if (length(Players[CurrentPlayer].Pin) > 0) then
begin
while not (PinScreen or (GetCurrentTab = tab_Magic)) or (TimeFromMark(T) > 5000+random(1000)) do
wait(150+random(150));

if PinScreen then
InPin(Players[CurrentPlayer].Pin);
end;
end;

function ReadyPlankSpell:Boolean;
var
PlankMakeDTM : Integer;
T : LongInt;
TP : TPoint;
begin
PlankMakeDTM := DTMFromString('mggAAAHicY2NgYPjEBMGvgPglEP8C4i9AXMDIwFANxKVAnAfEuUCcAcRHpicCdTFiYFYgiQ1jqoRgCAAAGecKRg==');
DebugStr(5,'Selecting the PlankMake spell...');

MarkTime(T);
while not (GetCurrentTab = tab_Magic) and (TimeFromMark(T) < 4000) do
wait(150+random(300));

if not (GetCurrentTab = tab_Magic) then
begin
DebugStr(2,'Not in magic tab, possible random?');

If FindNonInventoryRandoms then
DebugStr(2,'Found randoms')
else
DebugStr(3,'Did not find randoms');

GameTab(tab_Magic);
end;

if not FindDTM(PlankMakeDTM,TP.x,TP.y,MIX1,MIY1,MIX2,MIY2) then
begin
DebugStr(2,'Failed to find PlankMake spell, attempting to resort spell tab...');

SortSpells(true);

if not FindBitmapIn(PlankMakeDTM,TP.x,TP.y,MIx1,MIY1,MIX2,MIY2) then
DebugStr(1,'Failed to find the plankmake spell. Ensure you have the lunar spellbook enabled, and that you have the required level to cast Plank Make');

end;
mouse(TP.x,TP.y,3,3,mouse_Left);
FreeDTM(PlankMakeDTM);
end;

procedure antiban;
begin
DebugStr(3,'Searching for randoms...');

FindNormalRandoms;

if FindMod then
begin
DebugStr(1,'Found a mod! Logging out to grab a drink and calm down...');

logout;

wait(20000+random(5000)); //Make it seem like we had to walk away...

SelectWorld(RandomWorld(true,false));
LogInPlayer;
end;

DebugStr(4,'Might do antiban...');

case random(750) of //TODO maybe raise it?
1..5: begin
DebugStr(3,'Performing PickUpMouse...');
PickUpMouse;
end;

6..30: begin
DebugStr(3,'Performing RandomRClick...');
RandomRClick;
end;

31..175: begin
DebugStr(3,'Performing HoverSkill...');
HoverSkill(SKILL_MAGIC,false);
end;

175..350: begin
DebugStr(3,'Performing SetScreenMouse...');
SetScreenMouse('rand',SRL_ANGLE_HIGH);
end;

end;
end;

function hasLogs(var logArr : TBoolArray):Boolean;
var
TempDTM,I : Integer;
begin
Result := True;

if not LoggedIn then
exit;

TempDTM := GetLogDTM(Players[CurrentPlayer].Integers[0]);

LogArr := GetLogArray(TempDTM);

for I := 0 to 27 do
if LogArr[I] then
Result := true;

DebugStr(3,'Inventory contains logs: ' + BoolToStr(Result));

FreeDTM(TempDTM);
end;

function CheckOutOfMoney : boolean;
begin
Result := pos('og into pl',GetBlackChatMessage) > 0;

if Result then
begin
DebugStr(1,'You Have run out of money!');

Logout;
NextPlayer(False);
end;
end;

procedure PlankLog(Log : Integer);
begin
ReadyPlankSpell;

ClickLog(Log);

logsPlanked := logsPlanked + 1;
Prog_PlanksMade := Prog_PlanksMade + 1;
end;

function makePlanks : Boolean;
var
I,Reps,SkipIndex,SkipCount : Integer;
SkipArr : TIntegerArray;
logArr : TBoolArray;
begin
if not LoggedIn then
exit;

if BankScreen or PinScreen then
exit;

SetArrayLength(SkipArr,28);
if hasLogs(LogArr) then
begin
Inc(Reps);

GameTab(tab_Magic);

for I := 0 to 27 do
begin
if LogArr[I] then
begin
//chance to skip a log
if random(10) = 0 then
begin
DebugStr(4,'Skipping log at index ' + IntToStr(I+1));

SkipArr[SkipCount] := I;

inc(SkipCount);

Continue;
end else
PlankLog(I+1);

end;

if CheckOutOfMoney then
exit;

end;

if SkipCount > 0 then
for SkipIndex := 0 to SkipCount-1 do
PlankLog(SkipIndex+1);
end
end;

function Bank : Boolean;
var
Tries : Integer;
begin
Result := False;

if not LoggedIn then
exit;

if not Open_Bank then
exit;

depositPlanks;

for Tries := 1 to 5 do
if withdrawLogs then
begin
Result := true;
break;
end;

CloseBank;
end;

function findLodeSymbol : boolean;
var
LodeBMP : Integer;
TP : TPoint;
acc : Extended;
begin
LodeBMP := BitmapFromString(9, 8, 'meJxbVJs7KSivxDIYgoDsRbW5QHRl' +
'XtP0Cb2///wGijja2QFJCHtPZxNc5cPHD4GCQBJiApCEGwUUhyCgX' +
'jSp3VvXvzx/AEjCzYFIAQWBJMQuCBtiF0QWKA5BcC1AF0LcA7cdwg' +
'aKAxEAIBhsCQ==');


FindDeformedBitmapToleranceIn(LodeBMP,TP.x,TP.y,MMX1,MMY1,MMX2,MMY2,0,0,true,acc);

DebugStr(4,'Found lodestone symbol with an accuracy of ' + tostr(acc));

Result := acc > 0.27; //0.277777... was lowest i got by dropping stuff around the
// portal on symbol, in case someone tries to make
// the bot fail...

FreeBitmap(LodeBMP);
end;

function NearBank(Walk : Boolean) : Boolean;
var
BankDTM : String;
TP : TPoint;
begin
Result := False;

BankDTM := '80:79:3:1:7:117:75:1:7:89:44:3:7:123:91';

If not ObjDTM_Find(BankDTM,TP.x, TP.y, true) then
exit;

Result := (Walk and (Distance(TP.x,TP.y,MMCX,MMCY) <= 72))
or (Distance(TP.x,TP.y,MMCX,MMCY) <= 16);

if Walk then
Mouse(TP.x,TP.y,3,3,mouse_Left);
end;

function WalkLodeToBank : Boolean;
var
clicks : Integer;
begin
Result := false;

while (clicks < 5) and not Result do
begin
inc(clicks);

RadialWalkTolerance(5328462,112,85,53,-1,0,20);

Result := NearBank(True);
end;
end;

function TravelBank : Boolean;
var
T : Longint;
TP,HomePort : TPoint;
ObjDTMPath : TStringArray;
SymbolATPA : T2DPointArray;
begin
Result := False;

HomePort := Point(571,229);

GameTab(tab_Magic);

MarkTime(T);

while not (GetCurrentTab = tab_Magic) and (TimeFromMark(T) < RandomRange(5000,6000)) do
wait(RandomRange(150,450));

if not (GetCurrentTab = tab_Magic) then
DebugStr(2,'Failed to open magic tab');

SortSpells(false);

Mouse(HomePort.x,HomePort.y,4,4,mouse_right);

while not MenuOpen and (TimeFromMark(T) < RandomRange(5000,6000)) do
wait(RandomRange(300,500));

wait(RandomRange(350,550));

if not ChooseOption('ele') then
begin
DebugStr(2,'Failed to cast home port');
exit;
end;


MarkTime(T);

while not LodestoneScreen and (timefrommark(T) < RandomRange(5000,6000)) do
wait(RandomRange(160,1000));

if not LodestoneTeleport('edgeville') then
begin
MarkTime(T);

while LodestoneScreen and (timefrommark(T) < RandomRange(25000,30000))do
wait(RandomRange(160,1000));

clickmouse2(mouse_Right);
end;

while not FindLodeSymbol and (TimeFromMark(T) < 20000) do
wait(RandomRange(300,600));

wait(RandomRange(3500,5500));

WalkLodeToBank;
end;



{$IFDEF SMART}
procedure PaintProggy;
var
TPA : TPointArray;
BMP,x,y,w,h,tw,th,I,II : Integer;
DebugLines : TStringArray;
begin
DebugStr(2,'Painting Proggy');

w := MCX2-MCX1;
h := MCY2-MCY1;

writeln(w);
writeln(h);
BMP := CreateBitmap(w,h);

SetArrayLength(DebugLines,4);

TPA := TPAFromBox(MCBox);

DebugLines[0] := 'M34t''s Lunar Planker';
DebugLines[1] := 'Planks made: ' + IntToStr(Prog_PlanksMade);
DebugLines[2] := 'Xp Gained: ' + IntToStr(Prog_PlanksMade*90);
DebugLines[3] := 'Time Running: ' + MsToTime(Integer(GetTimeRunning),Time_Formal);

for x := 0 to w-1 do
for y := 0 to h-1 do
FastSetPixel(BMP,x,y,10337999);

for I := 0 to length(DebugLines)-1 do
begin
TPA := TPAFromText(DebugLines[I],'LoginChars',tw,th);
for II := 0 to length(TPA)-1 do
FastSetPixel(BMP,Min(w-1,TPA[II].x+15),Min(h-1,TPA[II].y+(25*I)+15),1);
end;

SMART_DrawBitmap(True,BMP,Point(MCX1,MCY1));
FreeBitmap(BMP);
end;
{$ENDIF}

procedure commitStats;
begin
DebugStr(2,'Commiting stats...');
if stats_Commit then
begin
markTime(CommitTime);
DebugStr(2,'Committed stats succesfully');
DebugStr(3,'Mahogany Planks made since last commit: '+IntToStr(logsPlanked));
DebugStr(3,'Magic XP Gained since last commit: About ' + IntToStr(logsPlanked));

stats_IncVariable('Mahogany Planks Made',logsPlanked);
stats_IncVariable('Plank Makes Casted',logsPlanked);
stats_IncVariable('Magic EXP (Gained)',logsPlanked*90);
end;
end;

procedure ScriptTerminated;
begin
DebugStr(2,'Attempting to commit stats one last time...');
commitStats;

SRLRandomsReport;

DebugStr(1,'Script Ended At ' + TheTime);
DebugStr(1,'Ran for ' + MsToTime(Integer(GetTimeRunning),Time_Formal));

end;


begin
AddOnTerminate('ScriptTerminated');
{$ifdef SMART}
Smart_Members := True;
Smart_Server := 100;
Smart_Signed := False;
Smart_SuperDetail := False;
{$endif}
DeclarePlayers;
SetupSRL;
LoadObjects;

SetupSRLStats(945, SRLStats_Username, SRLStats_Password);

repeat
if not LoggedIn then
LogInPlayer;

PaintProggy;

makePlanks;

If not Bank then
begin
DebugStr(2,'Failed to bank, making sure we are at edgeville bank');

if not NearBank(true) then
TravelBank;
end;

antiban;

if TimeFromMark(commitTime) > 6 * 60 * 1000 then
commitStats;
until AllPlayersInactive;

ScriptTerminated;
end.

BobboHobbo

2012-03-28 06:48:57

Could you paste the script into the box, instead of linking to your thread please..

m34tcode

2012-03-28 12:10:17

Changed it

[XoL]

2012-03-28 12:38:56

I will edit this later, but one thing I noticed from my quick quick glance. Spacing, grouping them together makes it a lot easier to read than just spacing everything out.

Kyle Undefined

2012-03-28 13:59:28

Sorry, it's a good script, but it's not really too advanced. Keep up the good work though, and if you don't get in this time, don't give up :)

Raskolnikov

2012-03-28 13:59:48

Before I start, all the other members should realize that these are the requirements from the "How to get into members" thread. This is nearly the only information they get on the member's requirements.

Definite:

Understandable scripting standards (is your script easy to read?)
Use of TPAs (TPointArrays)
Custom object finding (that means using NO FindObj*, make up your own!)
Use of auto-colouring
Walking (try not to use SPS, but instead try TPA walking/use RadialWalk)
Local variables
Loops (repeat..Until, while..do and for..to..do)
Arrays
Case statements
Randomisation (i.e. use Wait(200 + Random(300)) instead of just Wait(200))
Backups/fail safes (in case something goes wrong, do what?)
Anti-randoms
A script greater than 300 lines


Not required (but nice to show):

Memory management (i.e. don't load and free a DTM in a procedure, then continuously call that procedure. Load it once, then free it at the end of the script)
DTM finding (e.g. for inventory/bank objects, equipped items, etc)
DDTMs
Banking
Multiplayer (try to always include multiplayer unless your script is beast)
Anti-ban
Combining methods (i.e. not having one-liner procedures/functions or a separate method for every single little task)

Oh, and I've tested it, and it works flawlessly. I wish the three five no's would give their rationale. If you're going to reject someone, you should provide real reasons. Especially since they've fulfilled nearly all of the requirements.

You already know my vote though :)

'Toxin

2012-03-28 16:17:16

Unfortunately it's a no from me. Your code is fairly simple for it to be used as an application in my opinion. There are a few more advanced techniques that you should look into. Also, your standards are rather off… I'd suggest reading up on standards and learning how to maintain them through-out your script.

cause

2012-03-28 16:21:24

Voted yes

m34tcode

2012-03-28 16:33:53

Yea, I usually have my lines grouped up more, but I was hoping spacing, would give a better look, Unless that's not what you mean by standards.

Sin

2012-03-28 16:36:29

standards =


if ...then
begin
repeat
if .. then
begin

end;
until
end;

m34tcode

2012-03-28 16:54:00

Sin, do you only use a one line indent?

I've always used two for clarity.

Sin

2012-03-28 16:56:14

What do you mean?

m34tcode

2012-03-28 17:03:36

You indent as I do. Im still not positive what toxin meant by standards specifically.

After looking at SRL Standards, I capitalize String(Habit from java), and I may have missed the 80 character line wrap in some places


EDIT: I did miss the 80 character wrap on many of my DTMs. I never wrapped them.

Sin

2012-03-28 17:46:32


procedure Standards;
var
x,y:Integer;
begin
if Indent then //gotta indent the first if.
begin
writeLn('Begin is always like this, right under IF');
writeLn('End is on the same line');
writeLn('All functions/stuff are indented after the first begin');
if AnotherIndent then
begin
writeln('Easy to work out');
writeLn('The Ends should form a diagonal pattern');
end;
end;
end;
http://paste.villavu.com/show/2381/
I made that for Ashaman a while back, feel free to use it :]

m34tcode

2012-03-28 17:50:30

Yea I follow that exactly =]

What confused me in the first post, was that all your lines line up and look like a single space. The browser font is different than the font inside Simba, which threw me off ;]

Raskolnikov

2012-03-28 22:48:33

From: m34tcode
Yea I follow that exactly =]

What confused me in the first post, was that all your lines line up and look like a single space. The browser font is different than the font inside Simba, which threw me off ;]


I wish it wouldn't do that. Often I copy scripts into simba to evaluate them so I don't have to read through them on the thread.

P1nky

2012-03-29 00:40:49

Standards quite messy, although easy fix; Yes.

Daniel

2012-03-29 01:21:07

Satisfactory. Yes from me.

Flight

2012-03-29 01:33:37

From: Daniel
Satisfactory. Yes from me.


An auto-typer would be amazing to a noob like you, a script like this must blow your mind, huh Daniel? (+5 Flight)

I like it, the script utilizes multiple object-finding (not just MS objects) techniques. I read DTMs, TPAs/ATPA, and Bitmaps. You used different methods for defining variables; global/local as well as cases. Looks like you're just missing some use of SPS as well as Type definitions and DDTMs. Although, those last two are a bit rare to see even normally in scripts. ;)

I like the activity, like always this is a big plus for me. PLEASE keep it it. :)


m34tcode

2012-03-29 01:40:48

I utilize all of what you mentioned in my air runner, but I was afraid to post an incomplete script.

It needs walking to be completed, and then just casting charge orb

RISK

2012-03-29 01:40:58

Yes from me.

rice

2012-03-30 06:06:45

Yes for me I like the various methods used

WT-Fakawi

2012-04-08 18:56:37

Innah!