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…
Please show us one (or multiple) of your scripts.
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.