Twinki
2015-01-29 01:38:10
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?
I know the very basics of Java, LUA, and I now I know probably the intermediates of Pascal
Are you a member of any other communities?
I'm also part of the RiD community
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?
I know the very basics of Java, LUA, and I now I know probably the intermediates of Pascal
Are you a member of any other communities?
I'm also part of the RiD community
Tell us about yourself…
From: Twinki
I'm always bad at explaining myself, I don't really like typing up things about me :P So i'll just do my best, it'll probably be pretty bad, just warning you.
I'm 17 years old, I do nothing but sit on my ass all day on my computer. I have online school, I stopped going to physical highschool due to me being forced to waste 8 hours a day, 5 days a week of my life learning nothing, and being yelled at. I failed pretty much all my classes when I was physically going to highshcool, and I wasn't learning anything useful in life. I now cheat on pretty much all my classes in my online school, which is the only way I've been able to pass my classes. It's not because i'm dumb and don't understand it, I just don't like being forced to learn Algebra 2 for 2 hours on a daily basis, when instead I could be learning something I could use in life, or as a career.
I love playing with different dedicated server software, Virtual Machine software, and in general I'm fascinated by networking. I've actually ran a Minecraft Modded Server (Ha ha, that's so easy though) but in reality, it's very hard to have a stable server and keep 100 daily players happy. Modded MC servers are very rare, and aren't that popular due to server limits and the such. I did that for about 8 months, until I left the team I was on due to them making very stupid actions. Since I left, the MC server and Modpack has completely died, from 50-100 daily players, to literally nothing. Guess I was the one doing all the work…
After i'm done with Highschool I'm looking at going to College for Networking and maybe Computer Science. I'm not quite sure what the future holds for me, but I don't think it's going to be a positive.
I'm also fascinated by programming, something i'm not that great at. However it amazes me the software/scripts/programs programmers can come up with, to me it's just like magic. I don't think i'll ever get too deep into programming, as it gets to a point where it makes my brain turn into a slushy. Even doing my first script, I think about things way too much and I lose track of what does what, I like being organized, and sometimes that leads to faulty scripts. Once I start reaching something like 1000 lines of code, I lose track as I said above, and my brain turns to mush. I have to physically go back and read each line of code, to try and remember what I was doing and where this is supposed to go. Sometimes I get a headache doing it, and it sometimes ends up taking me 8 hours just to add in 20 lines of code to an existing 1000 line script. Which is why I don't want to pursue it as a career, but this is something I need to learn for networking, since I'm pretty sure scripting falls in line with it.
I started playing Runescape I believe in 2007 or 2008, it was on a 4Kb/s Dial Up connection. I played legit for 2 or 3 years. In 2009 I think, I started getting into botting. My first bot was RSBot, which I think was the original botting software. After awhile, I moved onto RiD and have been using RiD ever since. I pretty much quit Runescape in 2011, the game was getting boring and too grindy for me. In 2013 I got into Goldfarming, me and my partner ended up running a 30-50 farm together. I ran about 10 bots on my side, he was running 20-30, he ended up making 500-1000$ on a weekly basis, I only made about 100. After the farm kinda died due to bans, I moved onto a solo farm with only 15 bots, I ended up making about 300$ in a weeks time. I still legit here and there when I get bored. I also tend to quest for just the sake of questing. I recently started getting back into SRL/Villavu a lot more. After seeing such interesting projects like OGL and Clarity's Human Biometrics, it really kinda inspired me to try scripting again and see what I could come up with. I also wanted to give back, since I have been a leecher for a bit. Figured it was time to repay the debt :P
Please show us one (or multiple) of your scripts.
From: Twinki
This script was my first SRL-6 script. I spent most of the time on it on the Object Finding Function.
I learned how TPA's and ATPA's work from TheMayors tutorial.
I also learned about finding a specific object by using relative objects around it thanks to another tutorial in the
Intermediate RS3 tutorial section.
program TwinkiTanner;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
{$i srl-6/lib/misc/srlplayerform.simba}
{------------------------------------------------------------------------------)
I wanted to thank all those who've helped me accomplish this, and give credits
where due.
Clarity, for the private help and feedback! (Sorry for spamming your skype :P)
TheMayor, for the tutorials, would've never figured out TPA's if it wasn't for you
hoodz, for the examples and help with questions I had
Ross, for the Tanner example script, I based a lot of this after your script
BMWxi, for the private help and general feedback
Enig, for the GFX
Thank you guys in the IRC for pointing out some mistakes and improvements that could be made
(------------------------------------------------------------------------------}
{--- Constants that can easily be updated * No touchy, unless you know what you're doing--}
Const
{--- Banker / Bank Booth---}
B_HUE := 0.65;
B_SAT := 0.89;
B_COLOR := 13624282;
B_TOL := 15;
B_FILTER := 15; //ATPA Filter
{--- Relative Object for Banker ---}
rB_HUE := 0.10;
rB_SAT := 0.36;
rB_COLOR := 5528700;
rB_TOL := 9;
rB_EXCLUDE := 150; //Exclude Distance
{--- Jack the Tanner ---}
J_HUE := 0.12;
J_SAT := 0.70;
J_COLOR := 2908960;
J_TOL := 10;
J_FILTER := 10; //ATPA Filter
{--- Relative Object for Jack ---}
rJ_HUE := 1.12;
rJ_SAT := 8.11;
rJ_COLOR := 15397620;
rJ_TOL := 2;
rJ_EXCLUDE := 150; //Exclude Distance
Var
HardLeatherDTM, GreenLeatherDTM, BlueLeatherDTM, RedLeatherDTM,
BlackLeatherDTM, RoyalLeatherDTM, DTMToLook, FoundDTMs, TotalTannedLeather, scriptPaintBMP: Integer;
BotStatus: String;
scriptSMARTDebug: boolean;
procedure initPlayerForm();
begin
with playerForm do
begin
name := 'TwinkiTanner';
scriptHelpThread := '';
editBoxLabels := ['Amount to Tan: ', 'Bank Preset'];
editBoxDefaults := ['100000', '1'];
editBoxHints := ['Amount of Hide to Tan', 'Bank Preset to use (1 or 2)'];
checkBoxLabels := ['Draw on SMART', 'TwinkiTanner SMART Debug'];
checkBoxDefaults := ['True', 'False'];
checkBoxHints := ['Do you want do draw some debug information on SMART?', 'Turns on TwinkiTanner SMART Debug'];
end;
end;
procedure declarePlayers();
var
i: Integer;
begin
players.setup(playerForm.playerNames, playerForm.playerFile);
currentPlayer := 0;
for i := 0 to high(players) do
with players[i] do
begin
integers[0] := strToInt(playerForm.players[i].settings[0]);
integers[1] := strToInt(playerForm.players[i].settings[1]);
smartEnableDrawing := strToBool(playerForm.players[i].settings[2]);
scriptSMARTDebug := strToBool(playerForm.players[i].settings[3]);
end;
end;
{------------------------------------------------------------------------------)
Function: CheckFrozen
Description: Checks if the screen is frozen/is in a loading screen by using PixelShift
Credits: Twinki
(------------------------------------------------------------------------------}
function CheckFrozen(MarkerWaitTime: Integer = 5000): boolean;
Var
pS, i: Integer;
FrozenTimer: TTimeMarker;
begin
FrozenTimer.start();
result := true;
repeat
pS := getPixelShift(mainscreen.getBounds(), 500);
WriteLn(toStr(pS));
if Ps <= 100 then
begin
repeat
Wait(randomRange(250, 750));
until (Ps >= 500) or (FrozenTimer.getTime() >= 10000);
end;
if not (minimap.isPlayerMoving()) and (Ps >= 500) then
break();
until FrozenTimer.getTime() >= MarkerWaitTime;
end;
{------------------------------------------------------------------------------)
Function: FindTheTwinki
Description: Custom FindObject. Anyone is welcome to use this, I just ask you provide credits where it's due!
Credits: Twinki (Thank you TheMayor, hoodz, Ross, and BMWxi for the help!)
(------------------------------------------------------------------------------}
function FindTheTwinki(Hue, Sat: extended; Color, Tolerance, Filter, clickType: Integer; mouseOverText, chooseOptions: array of string;
FindRelativeObject: boolean = false; rHue, rSat: extended = 0; rColor, rTolerance: Integer = 0; excludePointsDist: Integer = 150): boolean;
Var
attempts, X, Y, i: integer;
rTPA, TPA: TPointArray;
ATPA: T2DPointArray;
rPoint: TPoint;
begin
if not isLoggedIn() then
exit;
if scriptSMARTDebug then
smartImage.clear();
CheckFrozen(randomRange(2500, 3500));
if FindRelativeObject then
begin
findColorsSpiralTolerance(X, Y, rTPA, rColor, mainScreen.getBounds(), rTolerance, colorSetting(2, rHue, rSat));
if length(rTPA) < 1 then
exit;
if scriptSMARTDebug then
smartImage.debugTPA(rTPA, false);
rPoint := middleTPA(rTPA);
end;
findColorsSpiralTolerance(X, Y, TPA, Color, mainScreen.getBounds(), Tolerance, colorSetting(2, Hue, Sat));
if length(TPA) < 1 then
exit;
if FindRelativeObject then TPA.excludePointsDist(0, excludePointsDist, rPoint.x, rPoint.y);
ATPA := TPA.toATPA(30, 30);
if length(ATPA) < 1 then
exit;
ATPA.filterBetween(1, Filter);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
if scriptSMARTDebug then
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
if scriptSMARTDebug then
smartImage.drawText('ATPA Length: '+IntToStr(length(ATPA[i])), point(ATPA[i][0].x+10, ATPA[i][0].y+10), clLime);
if (length(ATPA[i]) <= 10) then
Continue; //NOTE: *Will go to the next index if the current TPA length (in the ATPA) is less than 10
case random(50) of
1..40: Mouse(ATPA[i].getBounds().getRandomPoint(), MOUSE_MOVE);
41..50: missMouse(ATPA[i].getBounds().getRandomPoint(), true);
end;
if isMouseOverText(mouseOverText, 150) then
begin
fastClick(clickType);
Wait(randomRange(250, 750));
if clickType = MOUSE_RIGHT then
begin
if chooseOption.optionsExist(chooseOptions) then
chooseOption.select(chooseOptions, 1000)
else
exit(false);
end;
exit(true);
end;
end;
if scriptSMARTDebug then smartImage.clear();
end;
{------------------------------------------------------------------------------)
Procedure: Proggy
Description: Draws a progress report on SMART
Credits: Clarity, for the right coordinates :D
(------------------------------------------------------------------------------}
procedure Proggy;
begin
if not smartEnableDrawing then
begin
WriteLn('***************TwinkiTanner***************');
WriteLn('* Time Running: '+ToStr(TimeRunning));
WriteLn('* Leathers Tanned: '+ToStr(TotalTannedLeather));
WriteLn('* STATUS: ',+BotStatus);
WriteLn('******************************************');
end
else
begin
smartImage.clear;
smartImage.drawBitmap(scriptPaintBMP, point(actionbar.x1 + 390, actionbar.y1 - 185));
smartImage.drawText('TwinkiTanner', point(mainscreen.x1 + 5, mainscreen.y1 + 5), 'LoginChars', true, clWhite);
smartImage.drawText('Time Running:', point(mainscreen.x1 + 15, mainscreen.y1 + 25), 'SmallChars', true, clYellow);
smartImage.drawText(toStr(TimeRunning), point(mainscreen.x1 + 96, mainscreen.y1 + 25), 'SmallChars', true, clWhite);
smartImage.drawText('Tanned:', point(mainscreen.x1 + 15, mainscreen.y1 + 50), 'SmallChars', true, clYellow);
smartImage.drawText(toStr(TotalTannedLeather) + ' hides', point(mainscreen.x1 + 61, mainscreen.y1 + 50), 'SmallChars', true, clWhite);
smartImage.drawText('STATUS: ', point(actionbar.x1 + 5, actionbar.y1 - 20), 'Loginchars', true, clWhite);
smartImage.drawText(BotStatus, point(actionbar.x1 + 68, actionbar.y1 - 20), 'Loginchars', true, clYellow);
end;
end;
{------------------------------------------------------------------------------)
Procedure: RunToJack
Description: Runs to Jack the Tanner
(------------------------------------------------------------------------------}
procedure RunToJack;
Var
PathToJack: TPointArray;
begin
if not isLoggedIn() then
exit;
BotStatus := 'Running to Jack the Tanner';
Proggy;
PathToJack := [Point(166, 162), Point(162, 210), Point(138, 268)] //Thanks giavanni6 for suggestion
if not SPS.walkPath(PathToJack) then
begin
ClearDebug();
BotStatus := 'ERROR: Hmph, we failed running to Jack.. our legs must be broken';
Proggy;
WriteLn('ERROR: Hmph, we failed running to Jack.. our legs must be broken');
TerminateScript();
end;
end;
{------------------------------------------------------------------------------)
Procedure: RunToBank
Description: Runs to Burthope Bank
(------------------------------------------------------------------------------}
procedure RunToBank;
Var
PathToBank: TPointArray;
begin
if not isLoggedIn() then
exit;
BotStatus := 'Running to the Burthorpe Banker';
Proggy;
PathToBank := [Point(144, 253), Point(150, 222), Point(153, 203), Point(156, 161), Point(148, 131)]
if not SPS.walkPath(PathToBank) then
begin
ClearDebug();
BotStatus := 'ERROR: Hmph, we failed running to the bank.. our legs must be broken';
Proggy;
WriteLn('ERROR: Hmph, we failed running to the bank.. our legs must be broken');
TerminateScript();
end;
end;
{------------------------------------------------------------------------------)
Function: FindBanker
Description: Finds the Gnome Banker in Burthope, returns True if found, uses FindTheTwinki
(------------------------------------------------------------------------------}
function FindBanker(): boolean;
Var
BankSymbol: TPoint;
gnomeBankerTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit();
if bankScreen.isOpen() then
exit(true);
BotStatus := 'Trying to find the Burthorpe Gnome Banker';
Proggy;
gnomeBankerTimer.start();
repeat
case random(1, 2) of
1: if FindTheTwinki(B_HUE, B_SAT, B_COLOR, B_TOL, B_FILTER, MOUSE_LEFT, ['anker','ank','ooth'], [''], true, rB_HUE, rB_SAT, rB_COLOR, rB_TOL, rB_EXCLUDE) then
begin
BotStatus := 'Found Banker';
Proggy;
exit(true);
end
else if (minimap.findSymbol(BankSymbol, MM_SYMBOL_BANK, minimap.getBounds())) and (gnomeBankerTimer.getTime() >= 10000) then
begin
BotStatus := 'Couldn''t find banker, clicking BankSymbol and trying again';
Proggy;
minimap.clickCompass();
mainscreen.setAngle(MS_ANGLE_HIGH);
Mouse(point(BankSymbol.x + gaussRangeInt( - 5, 5), BankSymbol.y + gaussRangeInt( - 5, 5)), MOUSE_LEFT, MOUSE_HUMAN);
Wait(randomRange(250, 750));
if FindTheTwinki(B_HUE, B_SAT, B_COLOR, B_TOL, B_FILTER, MOUSE_LEFT, ['anker','ank','ooth'], [''], true, rB_HUE, rB_SAT, rB_COLOR, rB_TOL, rB_EXCLUDE) then
begin
BotStatus := 'Found Banker';
Proggy;
exit(true);
end;
end;
2: if FindTheTwinki(B_HUE, B_SAT, B_COLOR, B_TOL, B_FILTER, MOUSE_RIGHT, ['anker','ank','ooth'], ['ank', 'ooth'], true, rB_HUE, rB_SAT, rB_COLOR, rB_TOL, rB_EXCLUDE) then
begin
BotStatus := 'Found Banker';
Proggy;
exit(true);
end
else if (minimap.findSymbol(BankSymbol, MM_SYMBOL_BANK, minimap.getBounds())) and (gnomeBankerTimer.getTime() >= 10000) then
begin
BotStatus := 'Couldn''t find banker, clicking BankSymbol and trying again';
Proggy;
minimap.clickCompass();
mainscreen.setAngle(MS_ANGLE_HIGH);
Mouse(point(BankSymbol.x + gaussRangeInt( - 5, 5), BankSymbol.y + gaussRangeInt( - 5, 5)), MOUSE_LEFT, MOUSE_HUMAN);
Wait(randomRange(250, 750));
if FindTheTwinki(B_HUE, B_SAT, B_COLOR, B_TOL, B_FILTER, MOUSE_RIGHT, ['anker','ank','ooth'], ['ank', 'ooth'], true, rB_HUE, rB_SAT, rB_COLOR, rB_TOL, rB_EXCLUDE) then
begin
BotStatus := 'Found Banker';
Proggy;
exit(true);
end;
end;
end;
until gnomeBankerTimer.getTime() >= 30000;
ClearDebug();
BotStatus := 'ERROR: Could not find the Gnome Banker';
Proggy;
WriteLn('ERROR: Could not find the Gnome Banker');
TerminateScript();
end;
{------------------------------------------------------------------------------)
Procedure: FindJack
Description: Finds Jack the Tanner using FindTheTwinki
(------------------------------------------------------------------------------}
function FindJack(): boolean;
Var
jackOvalTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit();
if productionScreen.isOpen() then
productionscreen.close();
BotStatus := 'Trying to find Jack the Tanner';
Proggy;
jackOvalTimer.start();
repeat
if FindTheTwinki(J_HUE, J_SAT, J_COLOR, J_TOL, J_FILTER, MOUSE_RIGHT, ['ack','val'], ['an', 'ide'], true, rJ_HUE, rJ_SAT, rJ_COLOR, rJ_TOL, rJ_EXCLUDE) then
begin
BotStatus := 'Found Jack';
Proggy;
exit(true);
end
else if jackOvalTimer.getTime() >= 10000 then
begin
BotStatus := 'Couldn''t find Jack, checking under Player';
Proggy;
Wait(randomRange(1500, 2500));
mouseBox(mainScreen.playerBox);
if (isMouseOverText(['ack','val'])) then
begin
fastClick(MOUSE_RIGHT);
Wait(randomRange(250, 750));
chooseOption.select(['an', 'ide'], 1000);
BotStatus := 'Found Jack';
Proggy;
exit(true);
end;
end;
until jackOvalTimer.getTime() >= 30000;
ClearDebug();
BotStatus := 'ERROR: Could not find Jack';
Proggy;
WriteLn('ERROR: Could not find Jack');
TerminateScript();
end;
{------------------------------------------------------------------------------)
Procedure: BankHides
Description: Uses Bank Presets to quickly deposit and take out Hides
(------------------------------------------------------------------------------}
procedure BankHides;
Var
i, attempts: Integer;
bankScreenTimer: TTimeMarker;
begin
if not bankScreen.isOpen() then
if FindBanker then
begin
bankScreenTimer.start();
repeat
begin
Wait(randomRange(100, 250));
BotStatus := 'Waiting for Bank Screen to open';
Proggy;
if bankScreenTimer.getTime() > 20000 then
begin
ClearDebug();
BotStatus := 'ERROR: We ran out of time waiting for the Bank Screen to open';
Proggy;
WriteLn('ERROR: We ran out of time waiting for the Bank Screen to open');
TerminateScript();
end;
end;
until bankScreen.isOpen();
if bankScreen.isOpen() then
begin
bankScreenTimer.reset();
BotStatus := 'Bank Screen is open, taking out hides';
Proggy;
end;
end;
if bankScreen.isOpen() then
begin
BotStatus := 'Bank Screen is open, taking out hides';
Proggy;
if players[i].integers[1] = 1 then
begin
case random(1, 2) of
1: bankScreen.clickButton(BANK_BUTTON_PRESET_1, true);
2: bankScreen.clickButton(BANK_BUTTON_PRESET_1, false);
end;
end
else
if players[i].integers[1] = 2 then
begin
case random(1, 2) of
1: bankScreen.clickButton(BANK_BUTTON_PRESET_2, true);
2: bankScreen.clickButton(BANK_BUTTON_PRESET_2, false);
end;
end
else
begin
ClearDebug();
BotStatus := 'ERROR: Something went wrong in the Bank Button Presets';
Proggy;
WriteLn('ERROR: Something went wrong in the Bank Button Presets');
TerminateScript();
end;
Wait(randomRange(1500, 2500));
if not tabbackpack.isItemInSlot(1) then
begin
ClearDebug();
BotStatus := 'ERROR: We''re either out of Leather or you didn''t setup your Bank Preset correctly';
Proggy;
WriteLn('ERROR: We''re either out of Leather or you didn''t setup your Bank Preset correctly');
TerminateScript();
end;
end
else
begin
ClearDebug();
BotStatus := 'ERROR: Could not Bank Hides';
Proggy;
WriteLn('ERROR: Could not Bank Hides');
TerminateScript();
end;
end;
{------------------------------------------------------------------------------)
Procedure: DepositLast
Description: Depososits the last Tanned Leather then logs out
(------------------------------------------------------------------------------}
procedure DepositLast;
Var
i: Integer;
bankScreenTimer: TTimeMarker;
begin
if not bankScreen.isOpen() then
if FindBanker then
begin
bankScreenTimer.start();
repeat
begin
Wait(randomRange(100, 250));
BotStatus := 'Waiting for Bank Screen to open';
Proggy;
if bankScreenTimer.getTime() > 20000 then
begin
ClearDebug();
BotStatus := 'ERROR: We ran out of time waiting for the Bank Screen to open';
Proggy;
WriteLn('ERROR: We ran out of time waiting for the Bank Screen to open');
TerminateScript();
end;
end;
until bankScreen.isOpen();
if bankScreen.isOpen() then
begin
bankScreenTimer.reset();
BotStatus := 'Bank Screen is open, depositing and logging out';
Proggy;
Wait(randomRange(500, 750));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
bankScreen.close();
players[currentPlayer].logout();
smartImage.clear();
smartEnableDrawing := false;
Proggy;
TerminateScript();
end;
end;
end;
{------------------------------------------------------------------------------)
Procedure: CountTannedLeather
Description: Counts Tanned Leather using DTM's
(------------------------------------------------------------------------------}
function CountTannedLeather(): boolean;
Var
i: Integer;
DTMArray: TIntegerArray;
begin
DTMArray := [HardLeatherDTM, GreenLeatherDTM, BlueLeatherDTM, RedLeatherDTM, BlackLeatherDTM, RoyalLeatherDTM];
for i := 0 to high(DTMArray) do
begin
if tabBackpack.countDTM(DTMArray[i]) > 1 then
begin
if tabBackpack.countDTM(DTMArray[i]) < 28 then
begin
BotStatus := 'Found less than 28 Tanned Leather, depositing and logging out';
Proggy;
TotalTannedLeather := TotalTannedLeather + tabBackpack.countDTM(DTMArray[i]);
DepositLast;
end;
TotalTannedLeather := TotalTannedLeather + tabBackpack.countDTM(DTMArray[i]);
result := true
end;
end;
end;
{------------------------------------------------------------------------------)
Procedure: TanHides
Description: Tans Hides at Jack
(------------------------------------------------------------------------------}
procedure TanHides;
Var
i: Integer;
productionScreenTimer: TTimeMarker;
CraftSymbol: TPoint;
begin
if not productionScreen.isOpen() then
if FindJack then
begin
productionScreenTimer.start();
repeat
begin
Wait(randomRange(100, 250));
BotStatus := 'Waiting for Production Screen to show up';
Proggy;
if productionScreenTimer.getTime() > 25000 then
begin
ClearDebug();
BotStatus := 'ERROR: We ran out of time waiting for the Production Screen to open';
Proggy;
WriteLn('ERROR: We ran out of time waiting for the Production Screen to open');
TerminateScript();
end;
end;
until productionScreen.isOpen();
if productionScreen.isOpen() then
begin
productionScreenTimer.reset();
BotStatus := 'Production Screen is Open, tanning hides';
Proggy;
end;
end;
if productionScreen.isOpen then
begin
BotStatus := 'Production Screen is Open, tanning hides';
Proggy;
case random(1, 2) of
1: productionScreen.clickStart(true);
2: productionScreen.clickStart(false);
end;
Wait(randomRange(500, 750));
end
else
begin
ClearDebug();
BotStatus := 'ERROR: Production Screen at Jack failure';
Proggy;
WriteLn('ERROR: Production Screen at Jack failure');
TerminateScript();
end;
end;
{------------------------------------------------------------------------------)
Procedure: checkForImages
Description: Downloads the SPS map and/or paint picture if you don't have them.
Credits: Kevin
(------------------------------------------------------------------------------}
procedure checkForImages(path, link, item: string);
var
progFile: longInt;
picName: string;
begin
picName := AppPath + path;
try
if not fileExists(picName) then
begin
writeLn('NOTIFICATION: ' + item + ' does not exist - Downloading it now!.');
progFile := createFile(picName);
end else
exit;
closeFile(progFile);
progFile := rewriteFile(picName, false);
writeFileString(progFile, getPage(link));
writeLn('NOTIFICATION: ' + item + ' has been download to Simba folder!');
writeLn('');
finally
if (progFile > 0) then
closeFile(progFile);
end;
end;
{------------------------------------------------------------------------------)
Procedure: MainLoop
Description: The main loop of this script, don't touch it!
(------------------------------------------------------------------------------}
procedure MainLoop;
Var
i: Integer;
begin
BotStatus := 'Booting up';
Proggy;
repeat
Proggy;
if not isLoggedIn() then
begin
players[currentPlayer].login();
Wait(randomRange(2000, 3000));
minimap.clickCompass();
mainscreen.setAngle(MS_ANGLE_HIGH);
exitTreasure();
closePollWindow();
end;
BankHides;
RunToJack;
TanHides;
RunToBank;
if not CountTannedLeather then
begin
WriteLn('ERROR: Couldn''t count Tanned Leather');
TerminateScript();
end;
until (TotalTannedLeather >= players[i].integers[0]);
DepositLast;
end;
procedure LoadDTMs;
begin
HardLeatherDTM := DTMFromString('mlwAAAHicY2dgYOABYk4gFgVicSBmZYAAGSDmg7IZgVgKKs8LxToaskCSCYoZkdhMDFwMuAEjHgwFAIsvAVE=');
GreenLeatherDTM := DTMFromString('mrAAAAHic42BgYBAAYhEgZgViWQYIYANiKSDmBWJuIJYBYhYgZoeKSQKxGFQthxUXkGTCghnBtCQDfsBIAMMAAKrkAWQ=');
BlueLeatherDTM := DTMFromString('mlwAAAHicY2dgYOAEYiEGCBAAYiYgZgdiCSAWBGJmIGYDYhkgloSq4wVibl4fqGpMDFOHDTDiwVAAAIALAUA=');
RedLeatherDTM := DTMFromString('mlwAAAHicY2dgYOABYjEglmKAAFYglgFiPiDmh4qDxHiBWAKIhaDqbHk5gSQTGmYE05IMuAEjHgwFAI95AVY=');
BlackLeatherDTM := DTMFromString('mrAAAAHic42BgYOAFYiYgFgdiUQYIkAFiYSDmAWIuIGYHYkYglgBiIagYCEgCsbysLNQEZMwIZ7Mz4AeMBDAMAACkAwFT');
RoyalLeatherDTM := DTMFromString('mlwAAAHicY2dgYOBngAAZIBYHYk4gZgViQSDmBWI+IOYBYgkglgRiZqh6R5koIMmEFUsy4AaMeDAUAACpPQGn');
end;
procedure FreeTheDTMs;
begin
FreeDTM(HardLeatherDTM);
FreeDTM(GreenLeatherDTM);
FreeDTM(BlueLeatherDTM);
FreeDTM(RedLeatherDTM);
FreeDTM(BlackLeatherDTM);
FreeDTM(RoyalLeatherDTM);
end;
begin
//Setup
ClearDebug();
initPlayerForm();
runPlayerForm();
if not playerForm.isScriptReady then
exit;
declarePlayers();
smartShowConsole := false;
DisableSRLDebug := false;
SetupSRL();
AddOnTerminate('FreeTheDTMs');
LoadDTMs;
CheckForImages('Includes/SPS/img/runescape_other/BURTHORPE_TAN.png', 'http://i.imgur.com/ITtmmeI.png', 'SPS map'); //Thank you Ross for the SPS map :)
SPS.setup('BURTHORPE_TAN', RUNESCAPE_OTHER);
//Script Paint
if smartEnableDrawing then
begin
CheckForImages('\Scripts\TwinkiTanner\scriptpaint.png', 'http://i.imgur.com/AtFd4qK.png', 'Script Paint');
scriptPaintBMP := loadBitmap(appPath + '\Scripts\TwinkiTanner\scriptpaint.png');
FastReplaceColor(scriptPaintBmp, 0, 1);
FastReplaceColor(scriptPaintBmp, 2188575, 65280);
FastReplaceColor(scriptPaintBmp, 2066708, 65280);
FastReplaceColor(scriptPaintBmp, 327168, 65280);
FastReplaceColor(scriptPaintBmp, 130816, 65280);
SetTransparentcolor(scriptPaintBMP, 65280);
end;
//Startup
if not isLoggedIn() then
players[currentPlayer].login();
BotStatus := '';
Wait(randomRange(2000, 3000));
minimap.clickCompass();
mainscreen.setAngle(MS_ANGLE_HIGH);
exitTreasure();
closePollWindow();
while players.getActive > 0 do
mainLoop;
end.
https://villavu.com/forum/showthread.php?t=111762
I first started scripting on RSPS's I wanted to exploit just for the fun of it, I made several scripts for different RSPS's,but I recently lost most of them due to a hard drive failure. However I was able to recover two scripts, which you can find below. I also did experiment with an include to make it a lot easier, I did rip a lot of what SRL consisted of, and changed it myself for the RSPS I made it for. I never planned on releasing it publicly, as I was only really doing it just to experiment and see what I could come up with
https://villavu.com/forum/showthread.php?t=111569