SRL Archive - Archive

sparkyownage - SRL Member Application


The Spark

2014-09-25 16:41:07

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Well, I attempted to learn python a few years ago, only learned the basics, but it has really helped me in learning to code with Simba and using SRL.


Are you a member of any other communities?
No


Tell us about yourself…
From: sparkyownage
Well, my name is Thad. I'm 19 years old, I'm a student, I go to college in California. I'm doing my undergrad at Stanford University, and I hope to get into their medical school in a few years. I am currently studying to become a Cardiac Surgeon, which takes an extremely long time. I spend most of my time studying, my education is probably the #1 most important thing for me . I don't really play or watch any sports, but I really like coding, it's very fascinating and I love the different scripts you can create to solve the same issue. That's pretty much why I'm here, to learn more



Please show us one (or multiple) of your scripts.
  program CanifisTanner;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files

// Thanks to TheMayor for his amazing tutorials and his help to me in the process of making this script :)
// Thanks to Turpinator and Slacky for taking the time to help me on IRC :D
{

__ __ _ ____
| \/ | | | | _ \
| \ / | __ _ __| | ___ | |_) |_ _
| |\/| |/ _` |/ _` |/ _ \ | _ <| | | |
| | | | (_| | (_| | __/ | |_) | |_| |
|_| |_|\__,_|\__,_|\___| |____/ \__, |
__/ |
|___/

_____ _
/ ____| | |
| (___ _ __ __ _ _ __| | ___ _ _____ ___ __ __ _ __ _ ___
\___ \| '_ \ / _` | '__| |/ / | | |/ _ \ \ /\ / / '_ \ / _` |/ _` |/ _ \
____) | |_) | (_| | | | <| |_| | (_) \ V V /| | | | (_| | (_| | __/
|_____/| .__/ \__,_|_| |_|\_\\__, |\___/ \_/\_/ |_| |_|\__,_|\__, |\___|
| | __/ | __/ |
|_| |___/ |___/

{-----------------------------INSTRUCTIONS: -----------------------------------)
{------------------------------------------------------------------------------)
Have it zoomed all the way out
Start the script with your player in Canifis Bank
Have the dragonhides you want it to withdraw in the 1st bank preset
Have NOTHING in your inventory
If you want the script to work well, go in a world where your ping is good
Fill out your username and password
Fill out at what percent you want to rest at
Press Play or F9
Have fun :)


Written for SRL Membership Application
{------------------------------------------------------------------------------)
{------------------------------------------------------------------------------}



const
VERSION = '1.5';

Location = 'Taverly'; //Supports three locations: Al_Kharid, or Canifis, or Taverly(Case Sensitive).
NumberOfLoads = 500; // How many loads do you want it to complete?
PercentRest = 35; // # at what percent you would like the bot to rest

var
loadscomplete : Integer = 0;
rested : Integer;


const
SBOTT_COLOR = 2040107;
SBOTT_TOL = 6;
SBOTT_HUE = 0.55;
SBOTT_SAT = 1.09;
BANK_COLOUR = 1723228;
BANK_TOL = 5;
BANK_HUE = 0.04;
BANK_SAT = 2.74;
KHARID_BANK_COLOUR = 3046218;
KHARID_BANK_TOL = 16;
KHARID_BANK_HUE = 1.04;
KHARID_BANK_SAT = 1.01;
TAN_BUTTON_COLOUR = 8872454;
TAN_BUTTON_TOL = 11;
TAN_BUTTON_HUE = 0.02;
TAN_BUTTON_SAT = 0.26;
ELLIS_COLOR = 14675955;
ELLIS_TOL = 5;
ELLIS_HUE = 0.21;
ELLIS_SAT = 4.03;
T_BANK_COLOUR = 2632741;
T_BANK_TOL = 0;
T_BANK_HUE = 0.00;
T_BANK_SAT = 0.00 ;
JACK_COLOUR = 12635597;
JACK_TOL = 8;
JACK_HUE = 0.63;
JACK_SAT = 0.77;

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := ''; // Put your username in between the apostraphes
password := ''; // Put your password in between the apostraphes
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;

{------------------------------------------------------------------------------)
{------------------------------------------------------------------------------)
{------------------------------------------------------------------------------)
{------------------------------------------------------------------------------)
{------------------------------------------------------------------------------)
{--------------------------END OF SCRIPT SETUP---------------------------------)
(--------------------------DO NOT TOUCH BELOW----------------------------------)
(-------------------UNLESS YOU KNOW WHAT YOU'RE DOING--------------------------)
{------------------------------------------------------------------------------)
(------------------------------------------------------------------------------}
{------------------------------------------------------------------------------)
{------------------------------------------------------------------------------)
{------------------------------------------------------------------------------)






{------------------------------------------------------------------------------)
Procedure: autoUpdateMe
Description: Checks for updated script online, and downloads if avaliable.
Credits: Shuttleu and Ashaman88 and TheMayor (modified by Sparkyownage)
(------------------------------------------------------------------------------}
procedure autoUpdateMe();
var
newFile: integer;
onlineVersion, latestScript, newFileName: string;
begin
writeln('Checking for script updates...');
writeLn('');
onlineVersion := getPage('tannerrs3.googlecode.com/git/version.txt');
writeLn('NOTIFICATION: Current script version: ' + version + ' | Online version: ' + onlineVersion);
if (trim(onlineVersion) > version) then
begin
writeLn('NOTIFICATION: Downloading the newer version from Google Code');
latestScript := GetPage('http://tannerrs3.googlecode.com/git/CanifisTanner.simba');
newFileName := scriptPath+ 'Sparkyownages Canifis Tanner v'+OnlineVersion+'.simba';
newFile := rewriteFile(newFileName, true);

if not writeFileString(newFile, latestScript) then
begin
writeLn('NOTIFICATION: Fatal error writing to ' + newFileName);
terminatescript();
end;

closeFile(newFile);
writeLn('NOTIFICATION: New script downloaded to ' + newFileName + ' | Please use this one!');
writeLn('');
terminateScript();
end else
writeLn('NOTIFICATION: You have the latest version.');
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: scriptTerminate
Description: Logs the player out when something goes wrong)
(------------------------------------------------------------------------------}

procedure scriptTerminate();
begin
writeln('Shutting down: Took a picture, please post the picture in the thread for assistance');
saveScreenshot(scriptPath + timeRunning() + ':' + 'TannerFailure.png');
players[currentPlayer].logout;
terminateScript;
end;

{------------------------------------------------------------------------------)
Procedure: paintStatus
Description: Paints the current script status on SMART, in the chatbox.
Credits: TheMayor (Modified by Sparkyownage)
(------------------------------------------------------------------------------}
procedure paintStatus(status: string);
begin
smartImage.clearArea(intToBox(6, 6, 740, 75));
smartImage.drawText('Status: ' + status, point(6,6), SmallChars, false, ClYellow);
end;


{------------------------------------------------------------------------------)
Procedure: antiban
Description: Does some random (human-like) stuff.
(------------------------------------------------------------------------------}
procedure antiBan();
var
i: integer;

begin
if not isLoggedin() then
exit;

paintStatus('Engaging in antiban');

i := random(500);
case i of
1..12: pickUpMouse();
13..18: randomRClickItem();
19..26: sleepAndMoveMouse(random(2000) + 750);
27..32: smallRandomMouse();
33..50: mouseOffClient(OFF_CLIENT_RANDOM);
51..85: randomCompass(random(300), randomrange(10, 100), false);
86..150: hoverRandomSkill();
end;
end;

{------------------------------------------------------------------------------)
Procedure: needToRest
Description: Figures out if a player has enough run energy to continue
(------------------------------------------------------------------------------}
function needToRest(): boolean;
var
x, y, i, RunATPA, s, f: integer;
TPA, TPA1: TPointArray;
ATPA: T2DPointArray;
begin

if findColorsSpiralTolerance(x, y, TPA, 14673134, minimap.button[MM_BUTTON_RUN].bounds, 10, colorSetting(2, 0.56, 3.07)) then

ATPA := TPA.toATPA(7, 7);
smartImage.debugATPA(ATPA);
case length(ATPA) of
0: writeLn('Unable to find the RUN BUTTON');
1: writeLn('Unable to find the RUN BUTTON');
2: RunATPA := 2;
3: RunATPA := 3;
4: RunATPA := 4;
end;
writeln(IntToStr(RunATPA));
if RunATPA <= 2 or not findColorsSpiralTolerance(s, f, TPA1, 3985643, minimap.button[MM_BUTTON_RUN].bounds, 12, colorSetting(2, 0.11, 1.36)) then
result:= true;
end;
{------------------------------------------------------------------------------)
Procedure: Rest
Description: Rests if needed
(------------------------------------------------------------------------------}
procedure rest();
var
x, y: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
RTimer: TTimeMarker;
p: Tpoint;

begin
if needToRest and not minimap.isResting then
begin
RTimer.start;
smartImage.clearArea(minimap.getBounds());
mouse(point(minimap.button[MM_BUTTON_RUN].center.x+random(5), minimap.button[MM_BUTTON_RUN].center.y+random(5)), MOUSE_MOVE);
wait(randomRange(300, 500));
fastClick(MOUSE_RIGHT);
chooseOption.select(['est']);
antiban;
repeat
findColorsSpiralTolerance(x, y, TPA, 14673134, minimap.button[MM_BUTTON_RUN].bounds, 10, colorSetting(2, 0.56, 3.07));
ATPA := TPA.toATPA(7, 7);
until rTimer.getTime >= 16000 or length(ATPA) > 3
if not minimap.isRunEnabled then
begin
mouse(point(minimap.button[MM_BUTTON_RUN].center.x+random(5), minimap.button[MM_BUTTON_RUN].center.y+random(5)), MOUSE_MOVE);
fastClick(MOUSE_LEFT);
exit;
end;
end;
end;

{-----=------------------------------------------------------------------------)
Procedure: findBanker
Description: Locates the Banker
(------------------------------------------------------------------------------}
procedure findBanker();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
if not isLoggedIn() then
exit;
if location = 'Canifis' then
begin
paintStatus('We are locating the banker');

findColorsSpiralTolerance(x, y, TPA, BANK_COLOUR, mainScreen.getBounds(), BANK_TOL, colorSetting(2, BANK_HUE, BANK_SAT));

if (Length(TPA) < 1) then
exit;

ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ooth'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clearArea(mainscreen.getBounds());
break;
end;
end;
end

if location = 'Al_Kharid' then
begin
if not isLoggedIn() then
exit;
paintStatus('We are locating the banker');
minimap.setAngle(MM_DIRECTION_NORTH);
findColorsSpiralTolerance(x, y, TPA, KHARID_BANK_COLOUR, mainScreen.getBounds(), KHARID_BANK_TOL, colorSetting(2, KHARID_BANK_HUE, KHARID_BANK_SAT));

if (Length(TPA) < 1) then
exit;

ATPA := TPA.toATPA(15, 15);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['anker', 'ooth'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clearArea(mainscreen.getBounds());
break;
end;
end;

end;
if location = 'Taverly' then
begin
if not isLoggedIn() then
exit;
minimap.setAngle(170);

paintStatus('We are locating the banker');
findColorsSpiralTolerance(x, y, TPA, T_BANK_COLOUR, mainScreen.getBounds(), T_BANK_TOL, colorSetting(2, T_BANK_HUE, T_BANK_SAT));

if (Length(TPA) < 1) then
exit;

ATPA := TPA.toATPA(15, 15);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['anker', 'ooth'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clearArea(mainscreen.getBounds());
break;
end;
end;

end;

end;
{------------------------------------------------------------------------------)
Procedure: takeOutHides
Description: Withdraws 28 Dragonhide using the first preset
(------------------------------------------------------------------------------}

procedure takeOutHides();
begin
if not isLoggedin() then
exit;
paintStatus('We are withdrawing the dragonhides');
if bankscreen.isOpen(5000) then
begin
bankScreen.clickButton(BANK_BUTTON_PRESET_2);
end;
end;

{------------------------------------------------------------------------------)
Procedure: WalktoTanner
Description:Uses SPS to walk from the bank to the tanner
(------------------------------------------------------------------------------}
procedure WalktoTanner();
var
pathtoTanner: TPointArray;
p: TPoint;
begin;
if needToRest() then
rest();

if(tabBackpack.count() = 28) and not bankscreen.isOpen(2500) then
begin
paintStatus('We are walking to the tanner');
wait(randomRange(400, 550));

if location = 'Canifis' then
begin
pathtoTanner := [Point(186, 241), Point(164, 234), Point(152, 224), Point(147, 218), Point(141, 212), Point(135, 203), Point(127, 195), Point(119, 191), Point(109, 185), Point(104, 177), Point(101, 171), Point(101, 162), Point(105, 156)];
SPS.walkPath(pathtoTanner)
end
if location = 'Al_Kharid' then
begin
pathtoTanner := [Point(87, 254), Point(104, 269), Point(117, 247), Point(111, 223), Point(125, 208), Point(128, 177), Point(127, 156)];
SPS.walkPath(pathtoTanner);
SPS.blindWalk(Point(105, 153));
end;
if location = 'Taverly' then
begin
pathtoTanner := [Point(111, 119), Point(122, 137), Point(129, 163), Point(129, 193), Point(128, 218), Point(117, 254), Point(100, 257)];
SPS.walkPath(pathtoTanner);
SPS.blindWalk(Point(100, 257));
end;
end;


if(tabBackpack.count() < 28) then
begin;
WriteLn('We do not have enough items in our inventory');
scriptTerminate();
terminateScript();
end;
end;

{------------------------------------------------------------------------------)
Function: insideTanner
Description: Returns true if the player is standing inside the tanner
Returns false if the player is anywhere else
(------------------------------------------------------------------------------}
function insideTanner(): boolean;
var
Tanner := intToBox(80, 140, 120, 165);

begin
result := PointInBox(SPS.GetPlayerPos, Tanner);

if result = true then
writeLn('We are inside the tanner');

if result = false then
begin
writeLn('We are not inside the tanner, something went wrong.');
writeLn('We are attempting to recover');
end;
end;

{------------------------------------------------------------------------------)
Function: WalkBackToSbott
Description: If unable to get to tanner, teleports to lodestone and walks back
(------------------------------------------------------------------------------}
Procedure WalkBackToSbott();
var
pathBackToTanner: TPointArray;
LodestoneTimer: TTimeMarker;
p: TPoint;

begin
if not isLoggedIn() then
exit;
paintStatus('We are recovering');

LodestoneTimer.start;

LodestoneScreen.teleportTo(LOCATION_CANIFIS);
Wait(randomRange(17000, 20000));

if LodestoneTimer.getTime > 150000 then
begin;
scriptTerminate();
TerminateScript();
end;

begin
pathBackToTanner := [Point(222, 88), Point(200, 104), Point(182, 125), Point(171, 139), Point(149, 155), Point(119, 182), Point(99, 186), Point(105, 155)];
sps.walkPath(pathBackToTanner)
end;

end;

{------------------------------------------------------------------------------)
Function: findTanner
Description: Locates Sbott or Ellis(The Tanner) in his shop
(------------------------------------------------------------------------------}

function findTanner(): boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedin() then
exit;
if location = 'Canifis' then
begin
if insideTanner() = false then
WalkBackToSbott();

paintStatus('We are locating Sbott');
minimap.setangle(MM_DIRECTION_EAST);
wait(randomRange(100, 250));

findColorsSpiralTolerance(x, y, TPA, SBOTT_COLOR, mainScreen.getBounds(), SBOTT_TOL, colorSetting(2, SBOTT_HUE, SBOTT_SAT));

if length(TPA) < 1 then
begin
writeLn('Didn''t find any pixels that match Sbott''s colour!');
exit;
end;

ATPA := TPA.cluster(10, 10);


ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);

smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
mouse(MiddleTPA(ATPA[i]), MOUSE_MOVE);

if isMouseOverText(['Sbott'], 500) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['rade']);
smartImage.clearArea(mainscreen.getBounds());
exit(true);
end;
end;
end
if location = 'Al_Kharid' then
begin
paintStatus('We are locating Ellis');
if getPixelShiftAverage(mainscreen.getBounds, 250, 500) > 400 then
wait(randomRange(2000, 3500));
minimap.setAngle(275);
findColorsSpiralTolerance(x, y, TPA, ELLIS_COLOR, mainScreen.getBounds(), ELLIS_TOL, colorSetting(2, ELLIS_HUE, ELLIS_SAT));

if length(TPA) < 1 then
begin
writeLn('Didn''t find any pixels that match Ellis"s colour!');
exit;
end;

ATPA := TPA.cluster(10, 10);


ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);

smartImage.debugATPA(ATPA);

mouseBox(mainscreen.PlayerBox, MOUSE_MOVE);
if isMouseOverText(['Ellis'], 500) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['hides']);
smartImage.clearArea(mainscreen.getBounds());
exit(true)
end else

for i := 0 to high(ATPA) do
begin
mouse(MiddleTPA(ATPA[i]), MOUSE_MOVE);

if isMouseOverText(['Ellis'], 500) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['hides']);
smartImage.clearArea(mainscreen.getBounds());
exit(true)
end;
end;
end;
if location = 'Taverly' then
begin
paintStatus('We are locating Jack Oval');
minimap.setAngle(170);
findColorsSpiralTolerance(x, y, TPA, JACK_COLOUR, mainScreen.getBounds(), JACK_TOL, colorSetting(2, JACK_HUE, JACK_SAT));

if length(TPA) < 1 then
begin
writeLn('Didn''t find any pixels that match Jack"s colour!');
exit;
end;

ATPA := TPA.cluster(10, 10);


ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);

smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(MiddleTPA(ATPA[i]), MOUSE_MOVE);

if isMouseOverText(['Jack'], 500) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['hide']);
smartImage.clearArea(mainscreen.getBounds());
exit(true)
end;
end;
end;


end;
{------------------------------------------------------------------------------)
Procedure: TanHides
Description: Clicks on the tan option to tan the dragonhide into dragon leather
(------------------------------------------------------------------------------}

procedure tanHides();
var
RoyalBox: TBox;
TPA: TPointArray;
x, y: integer;
begin;
if not isLoggedin() then
exit;

paintStatus('We are tanning the hides!');
if productionScreen.isOpen(5000) then
productionScreen.clickStart();
end;
{------------------------------------------------------------------------------)
Procedure: WalktoBank
Description: Uses SPS to walk to the bank in Canifis
(------------------------------------------------------------------------------}

procedure WalktoBank();
var
pathtoBanker: TPointArray;
pathtoTanner: TPointArray;

begin;
if not isLoggedin() then
exit;

if needToRest() then
rest();
paintStatus('We are walking to the bank');
if location = 'Canifis' then
begin
pathtoBanker := [Point(107, 148), Point(105, 156), Point(101, 162), Point(101, 171), Point(104, 177), Point(109, 185), Point(119, 191), Point(127, 195), Point(135, 203), Point(141, 212), Point(147, 218), Point(152, 224), Point(164, 234), Point(186, 241), Point(193, 241)];
if SPS.walkPath(pathtoBanker) then
minimap.waitPlayerMoving()
end;
if location = 'Al_Kharid' then
begin
pathtoBanker := [Point(105, 153), Point(127, 156), Point(128, 177), Point(125, 208), Point(111, 223), Point(117, 247), Point(104, 269), Point(87, 254)];
SPS.walkPath(pathtoBanker);
SPS.blindWalk(Point(87, 254));
end;
if location = 'Taverly' then
begin
pathtoBanker := [Point(102, 252), Point(117, 254), Point(128, 218), Point(129, 193), Point(129, 163), Point(122, 137)];
sps.walkPath(pathtoBanker);
sps.blindWalk(Point(111, 119));
end;

end;

procedure SetupSPS();
begin;
if Location = 'Canifis' then
begin
checkForImages('Includes/SPS/img/runescape_other/Canifis_Map.png', 'http://i.imgur.com/f3PvC3s.png', 'SPS map');
SPS.setup('Canifis_Map', RUNESCAPE_OTHER, 5, 775, 0.5)
end;
if location = 'Al_Kharid' then
begin
checkForImages('Includes/SPS/img/runescape_other/Al_KharidTanMap.png', 'http://i.imgur.com/ngz1ofH.png', 'SPS map');
SPS.setup('Al_KharidTanMap', RUNESCAPE_OTHER, 5, 775, 0.5);
end;
if location = 'Taverly' then
begin
checkForImages('Includes/SPS/img/runescape_other/TaverlyTanMap.png', 'http://i.imgur.com/93fbkzH.png', 'SPS map');
SPS.setup('TaverlyTanMap', RUNESCAPE_OTHER, 5, 775, 0.5);
end;
end;
{------------------------------------------------------------------------------)
Procedure: Report
Description: Displays how many loads have been completed in te debug window
(------------------------------------------------------------------------------}

procedure Report();
var
TannedHides: integer
begin;

TannedHides := loadscomplete * 28
if not isLoggedin() then
exit;
writeLn('{-------------------------------------------------------}');
writeLn('{-------------------------------------------------------}');
writeLn('{-------------------------------------------------------}');
writeLn('{-------------------------------------------------------}');
writeLn('{-------------Canifis Tanner by Sparkyownage------------}');
writeLn(' Script has been running for: ' + timeRunning());
writeLn('{---------------We have completed ' + IntToStr(loadscomplete) + ' loads---------------}');
writeLn('{-----------We have tanned: ' + IntToStr(TannedHides) + ' Hides--------------------}');
writeLn('{-------------------------------------------------------}');
writeLn('{-------------------------------------------------------}');
writeLn('{-------------------------------------------------------}');
end;

{------------------------------------------------------------------------------)
The Main Loop
Description: Puts all of the above procedures and functions together in the
correct order
(------------------------------------------------------------------------------}

// main loop
begin

clearDebug(); // Clear the debug box
autoUpdateMe(); //Automatically updates the script
smartPlugins := ['D3d9.dll', 'opengl32.dll']; // Enables the Direct X plugin
smartEnableDrawing := true; // So we can draw on SMART
setupSRL(); // Load the SRL include files
setupSPS(); // sets up SPS maps depending on your location
declarePlayers(); // Set up your username/pass




if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
exitSquealOfFortune(); // Exit squeal if found
end;

if location = 'Canifis' then
begin
minimap.setAngle(MM_DIRECTION_NORTH); // Make compass north and angle high
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
if location = 'Al_Kharid' then
begin
minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
mainscreen.setZoom(true, 40);
mainscreen.setZoom(false, 30)
end;
if location = 'Taverly' then
begin
mainscreen.setAngle(MS_ANGLE_HIGH);
KeyDown(40);
wait(randomRange(200, 300));
KeyUp(40);
end;

repeat
findBanker();
takeOutHides();
WalktoTanner();
findTanner();
tanHides();
walktoBank();
antiban();
Inc(loadscomplete);
Report();
until(loadscomplete = NumberOfLoads);
end.


Gathered from the posts that people made last time, a majority of no votes were due to a lack of activity, I hope this time that is not the case, though I am able to be on less than I was before since my school has started and it does take up most of my time. I try to be on the forums at least once a day. If you decide to vote no, please leave a post telling me what I can do better. I like being here, and I hope you all like having me on the forums. Thanks for taking the time to read my application :)

Clarity

2014-09-25 17:40:11

Yay :) I was wondering when you'd get around to applying again. You have a great attitude about the process. More feedback on the script in a bit.

Kyle

2014-09-25 17:41:46

Yes from me, definitely show a good knowledge of Atpa's and tpa's.

superuser

2014-09-25 17:46:21

  onlineVersion := getPage('tannerrs3.googlecode.com/git/version.txt');

...

if (trim(onlineVersion) > version) then ...

Doesn't quite work. They are strings, not integers, yes?

But, yes anyways!

Kyle

2014-09-25 17:47:39

From: superuser
  onlineVersion := getPage('tannerrs3.googlecode.com/git/version.txt');

...

if (trim(onlineVersion) > version) then ...

Doesn't quite work. They are strings, not integers, yes?

But, yes anyways!


That actually is grabbing the version number written on googlecode and is comparing it to the current one! Atleast that's what I am assuming without going to the page :P

superuser

2014-09-25 17:51:12

From: elfyyy
That actually is grabbing the version number written on googlecode and is comparing it to the current one! Atleast that's what I am assuming without going to the page :P


I'm not sure if there's implicit conversions in Lape? Correct me if I'm wrong, but shouldn't it be

if (trim(onlineVersion) <> version) then ...

The Mayor

2014-09-25 17:53:36

From: superuser
I'm not sure if there's implicit conversions in Lape? Correct me if I'm wrong, but shouldn't it be

if (trim(onlineVersion) <> version) then ...


It works

slacky

2014-09-25 17:55:24

From: elfyyy
That actually is grabbing the version number written on googlecode and is comparing it to the current one! Atleast that's what I am assuming without going to the page :P

Still he needs to convert it to floats.. Right now he is comparing two strings, which will not compare the numbers, but the ascii values. Or change it to compare "not equal", as superuser mentioned.

From: The Mayor
It works

Comparing less/greater does not "work": '1.4' < '1.5' will "work" because the ascii values are actually greater in the later. So it's not comparing the actual numbers, and therefor is a bad idea.
Here is an example where it fails:

WriteLn('2.0' < '11.0');
//>> False

Kyle

2014-09-25 17:57:35

From: slacky
Still he needs to convert it to floats.. Right now he is comparing two strings, which will not compare the numbers, but the ascii values.


Ah, true, I atucally thought he was comparing if they were the same value, didn't notice that it had just the > and not <> :duh:

Ross

2014-09-25 18:02:12

Going to abstain from voting as a recent mem but have two comments:

1) You could probably shorten your findBanker and potentially your findTanner(trust me I know Ellis is a bitch) procedures if you got creative with cases.
2) If I did vote, it would be a yes. :)

Sjoe

2014-09-26 09:53:43

Aparrently it's like 80% copy paste of mayor's script, so gnna vote no.

3Garrett3

2014-09-26 10:59:02

From: Sjoe
Aparrently it's like 80% copy paste of mayor's script, so gnna vote no.


I'm of this mindset, there are a lot of functions that aren't really yours. They're just stuff other people created. The stuff that is original is SPS walking and some TPA finding, both of which are almost direct copies of The Mayor's tutorial. I don't see enough originality and creativity in your problem solving to merit a yes on this one.

Things like:


function insideTanner(): boolean;
var
Tanner := intToBox(80, 140, 120, 165);

begin
result := PointInBox(SPS.GetPlayerPos, Tanner);

if result = true then
writeLn('We are inside the tanner');

if result = false then
begin
writeLn('We are not inside the tanner, something went wrong.');
writeLn('We are attempting to recover');
end;
end;

could be:



function insideTanner(): boolean;
var
Tanner := intToBox(80, 140, 120, 165);

begin
result := PointInBox(SPS.GetPlayerPos, Tanner);

if result then
writeLn('We are inside the tanner')
else
begin
writeLn('We are not inside the tanner, something went wrong.');
writeLn('We are attempting to recover');
end;
end;

It's just sloppy the way it was written before. And your script could be dramatically shortened by either using records and defining each location that way or at least through case statements for certain parts.

So for me, it's a no this time.

The Spark

2014-09-26 20:25:26

From: Clarity
Yay :) I was wondering when you'd get around to applying again. You have a great attitude about the process. More feedback on the script in a bit.


Thank you so much, It means alot to me :D

From: elfyyy
Yes from me, definitely show a good knowledge of Atpa's and tpa's.


Thank you, I really appreciate it :)

From: superuser


But, yes anyways!


Why thank you good sir :)

From: Ross
Going to abstain from voting as a recent mem but have two comments:

1) You could probably shorten your findBanker and potentially your findTanner(trust me I know Ellis is a bitch) procedures if you got creative with cases.
2) If I did vote, it would be a yes. :)


Thanks for the feedback, Ellis was indeed quite hard to look for, I made it rotate the camera angle to a spot where it has the highest chance of finding him, though this may not be the best/efficient way to do it, it does work :)

From: 3Garrett3

So for me, it's a no this time.


Thanks for the feedback it greatly helps :)

From: Sjoe
Aparrently it's like 80% copy paste of mayor's script, so gnna vote no.


You say apparently, which makes it sound like you haven't looked for yourself. I wrote most of this myself, and where I copied, I gave credit, probably the only thing I copied from the Mayor was his Run functions, which this script COULD function without, it's just more efficient to use it. Just because my script uses what might seem to you to be very basic and simple functions does not mean its a copy paste. Personally, I find your post quite rude. I spent a substantial amount of time writing, testing, and rewriting this script, since this was my first script. Don't be so quick to judge.

Sjoe

2014-09-26 20:30:50

From: sparkyownage
You say apparently, which makes it sound like you haven't looked for yourself. I wrote most of this myself, and where I copied, I gave credit. Just because my script uses what might seem to you to be very basic and simple functions does not mean its a copy paste. Personally, I find your post quite rude. I spent a substantial amount of time writing, testing, and rewriting this script, since this was my first script. Don't be so quick to judge.


Mayor looked thru it, I take his word for it.

The Spark

2014-09-26 20:36:02

From: Sjoe
Mayor looked thru it, I take his word for it.


If your vote depends on what someone else says, which you didn't even yourself confirm/look at my script, than you shouldn't vote at all. Really says a lot about your character. Garrett said the same thing you did but see how nicely his post is phrased. He looked at my script, and told me what I could improve in, a skill in which you clearly are lacking.

Sjoe

2014-09-26 20:45:14

From: sparkyownage
If your vote depends on what someone else says, which you didn't even yourself confirm/look at my script, than you shouldn't vote at all. Really says a lot about your character. Garrett said the same thing you did but he looked at my script, and told me what I could improve in, a skill in which you clearly are lacking.


kid, just stfu.

The Spark

2014-09-26 20:53:09

From: Sjoe
kid, just stfu.


You call me "kid", showing that you think of yourself as a higher being, and I as a person who is lower than you. I didn't want to say anything rude, but you're use of vulgar language, and just the way you phrase your posts, makes it seem like you are an uneducated person, and you have quite an attitude. Thanks for voting, but your vote and posts mean absolutely nothing to me.

Sjoe

2014-09-26 20:54:08

From: sparkyownage
You call me "kid", showing that you think of yourself as a higher being, and I as a person who is lower than you. I didn't want to say anything rude, but you talk like an uneducated person, and you have quite an attitude. Thanks for voting, but your vote and posts mean absolutely nothing to me.


zzzzz,


Edit:
you're the one who started being passive-agressive for no reason.
Mayor wrote the planker, of course he'll recognise his own work easier than I would.
If Mayor says it's 80% of his script, then it is.

Justin

2014-09-26 20:54:57

@Sjoe; Get your act together.

The Mayor

2014-09-26 20:56:20

You will always receive criticism during an application. It's how you respond to it that counts.

E: Looks like someone changed their vote after that outburst.

Ian

2014-09-26 20:57:18

From: sparkyownage
If your vote depends on what someone else says, which you didn't even yourself confirm/look at my script, than you shouldn't vote at all. Really says a lot about your character. Garrett said the same thing you did but see how nicely his post is phrased. He looked at my script, and told me what I could improve in, a skill in which you clearly are lacking.


When someone respected recognizes code you use as theirs then that means quite a bit. Sure, Sjoe could have given more feedback on the parts you wrote, but he doesn't need to. Don't take the feedback here personally, just keep in in mind for the future. :)

NKN

2014-09-26 20:58:49

My vote has been changed to no.

I don't think an SRL Member should behave how you currently are.

It's unbecoming.

The Spark

2014-09-26 21:31:49

From: BMWxi
When someone respected recognizes code you use as theirs then that means quite a bit. Sure, Sjoe could have given more feedback on the parts you wrote, but he doesn't need to. Don't take the feedback here personally, just keep in in mind for the future. :)


TheMayor may have recognized some of my code as his, and I don't dispute his thinking, I do actually agree with him, I did use some of his procedures/functions. This seems to be the main issue here. Sjoe did not look at my code, Sjoe just used what the Mayor was saying to plop down his No vote. I just didn't like what Sjoe was saying, without looking at my application. Once again, I'll say that Garrett also said that my functions/procedures were not very creative and not my own, but he actually looked at my script and came to that conclusion. It's not his vote that I am not happy with, It's not even his post that I'm unhappy with, but the fact that he didn't give me a chance, he judged me based on what someone else was saying. I hope you understand what I'm trying to say here :)

From: The Mayor
You will always receive criticism during an application. It's how you respond to it that counts.

E: Looks like someone changed their vote after that outburst.




I understand, it's just that he didn't look at it. He didn't even read my application, he just heard someone else say that it was copied and used it as the basis for his vote. It's not what he said that caused me to say what I said but just the fact that he didn't take the time to read my script. I spent so much time and effort making this, and he basically said that was a waste. That just upsets me, and I do apologize for talking the way I did, he just acted like he was better than me, just because he knows more than I do. I want to be treated as an equal, not as a "kid".

From: NKN
My vote has been changed to no.

I don't think an SRL Member should behave how you currently are.

It's unbecoming.


I am trying to argue my side in a civilized manner, I'm trying to be nice about it, but he's telling me to "stfu", and I'm not going to sit back and take it if that's what you all expect me to do. I stand up for my self when my integrity is attacked and if that is unbecoming to you, than by all means, vote no. I'm not trying to justify my behavior, but put yourself in my situation. My actions may tell you that I'm rude, but that was not my intent, as I do sincerely apologize.

Sjoe

2014-09-26 21:36:52

From: sparkyownage
I understand, it's just that he didn't look at it. He didn't even read my application, he just heard someone else say that it was copied and used it as the basis for his vote. It's not what he said that caused me to say what I said but just the fact that he didn't take the time to read my script. That just upsets me, and I do apologize for talking the way I did, he just acted like he was better than me, just because he knows more than I do. I want to be treated as an equal, not as a "kid". My behavior may tell you that my attitude is rude, but that was not my intent, as I do sincerely apologize.


I called u kid cause you were holding me in contempt.

he just acted like he was better than me, just because he knows more than I do.

No, u were doing that.

I simply said what I was thinking, and u were formulating some weird stuff in your thoughts. Which resulted in demeaning me for no apparent cause.

Frement

2014-09-26 21:38:04

From: sparkyownage
I understand, it's just that he didn't look at it. He didn't even read my application, he just heard someone else say that it was copied and used it as the basis for his vote.


If someone I know, someone who has been here longer, tells me that an applicant has copied 80% of the code from him, I wouldn't look at the application.

The Spark

2014-09-26 21:46:18

From: Sjoe
I called u kid cause you were holding me in contempt.


No, u were doing that.

I simply said what I was thinking, and u were formulating some weird stuff in your thoughts. Which resulted in demeaning me for no apparent cause.



From: Frement
If someone I know, someone who has been here longer, tells me that an applicant has copied 80% of the code from him, I wouldn't look at the application.





I understand, I don't get that way of thinking, but I suppose that some people may think like that, I just have a different way of seeing things. As I said previously, I sincerely apologize, and I take this as a learning experience which helps to make me a better person, as I hope you all do as well :)

Sjoe

2014-09-26 21:50:36

From: sparkyownage
I understand, I don't get that way of thinking, but I suppose that some people may think like that, I just have a different way of seeing things. As I said previously, I sincerely apologize, and I take this as a learning experience which helps to make me a better person, as I hope you all do as well :)


Yeah I'm not accepting any apology from you for awhile.
This was worse than a league of legends game.

The Spark

2014-09-26 21:52:54

From: Sjoe
Yeah I'm not accepting any apology from you for awhile.
This was worse than a league of legends game.


Take it as you will, just know that I gave you the opportunity to be nice, and this is how you reacted.

From: NKN
My vote has been changed to no.

I don't think an SRL Member should behave how you currently are.

It's unbecoming.


From: Sjoe
kid, just stfu.


From: Sjoe
Yeah I'm not accepting any apology from you for awhile.
This was worse than a league of legends game.





If this is the great SRL Member behavior you talk so highly of, then so be it I suppose, just seems that everybody has become defensive all of a sudden and doesn't look at the situation from my angle.

Frement

2014-09-26 22:00:30

From: sparkyownage
If this is the great SRL Member behavior you talk so highly of, then so be it I suppose, just seems that everybody has become defensive all of a sudden and doesn't look at the situation from my angle.


Luckily he doesn't represent every SRL member. And I agree with you, that kind of behaviour is wrong.

slacky

2014-09-26 22:07:35

From: Frement
From: sparkyownage
If this is the great SRL Member behavior you talk so highly of, then so be it I suppose, just seems that everybody has become defensive all of a sudden and doesn't look at the situation from my angle.
Luckily he doesn't represent every SRL member. And I agree with you, that kind of behaviour is wrong.

+1: Lets all just try to be buddies :)

NKN

2014-09-26 22:09:58

From: sparkyownage
Take it as you will, just know that I gave you the opportunity to be nice, and this is how you reacted.










If this is the great SRL Member behavior you talk so highly of, then so be it I suppose, just seems that everybody has become defensive all of a sudden and doesn't look at the situation from my angle.



I never said I agreed with Sjoe.

He was childish and immature and shouldn't act like that.

However, that doesn't mean you should stoop to his level either. Just ignore it.

Sjoe

2014-09-26 22:10:22

From: sparkyownage
Take it as you will, just know that I gave you the opportunity to be nice, and this is how you reacted.
If this is the great SRL Member behavior you talk so highly of, then so be it I suppose, just seems that everybody has become defensive all of a sudden and doesn't look at the situation from my angle.


I reacted badly, but yeh…

U were asking for it anyway.

The Spark

2014-09-28 14:32:52

Added my own resting procedure, since the previous one was from the Mayor's script(I did give credit), mine doesn't work as well, but it is my own and it does work. Hope this gets rid of the whole "copy-paste" problem, as that was the only thing that I really copied and pasted right into my script that was from the mayor. Just wanted to say that I am on this forum to learn, and if you find a problem with my script that you didn't like, or something you want me to do better, please let me know :)

Kyle

2014-09-28 18:17:44

From: sparkyownage
..


Glad you're taking feedback and making changes accordingly. One of the things that I would definitely do, is instead of using all the constants for the location info for the ACA colors, is to use records.



type Location = record
Color, Tol : integer;
Hue, Sat : extended;
end;

lArray = array of Location;

const
KHARID = 0;

var
Locations : lArray;

procedure declareRecords;
begin
setArrayLength(Locations, 1);
with Locations[KHARID] do
begin
Color := 3046218;
Tol := 16;
Hue := 1.04;
Sat := 1.01;
end;
end;



begin
declareRecords;
writeln(Locations[KHARID].Color);
end.

This makes the script easier to read, make changes to, and also removes a lot of constants, which should, along with global variables, only be used when you don't have any other option. It looks like you also use specific numbers in your banking procedures depending on which location you are at. You can add them to the record and only need one function which will cover all of the locations used.

If you have any questions just let me know!

Also, I don't use lape/SRL 6, so there may be better/different ways to do it, but this is how it's done in PS, and it worked in lape.

Enslaved

2014-09-29 08:44:16

No from me due to various aforementioned reasons. Quick note, in real life anything that contains 25% or more copied text is considered plagiarism no matter if cited or not.

My advice, start over with the script. Build it from scratch, if there is something you like such as a function, copy the idea not the code. (changing variable names does not count.).

Unlike the ethos of the site being open source, the application is about your own ability to code rather than borrowing other bits of code and compiling a script from it (attitude and involvement also count towards the application greatly).

Benny

2014-09-29 15:44:45

From: Sjoe
Yeah I'm not accepting any apology from you for awhile.
This was worse than a league of legends game.


Lol this actually actually got me laughing. Poor sjoe

OT: I'm with @Enslaved; on this one, plagiarizing is taken super seriously, especially if you're going to a high powered uni.

However, you do seem to be taking criticism in your stride and I'm leaning towards saying yes the next time… If you decide to reapply. (which i would recommend)

The Spark

2014-09-29 16:51:48

From: Enslaved
No from me due to various aforementioned reasons. Quick note, in real life anything that contains 25% or more copied text is considered plagiarism no matter if cited or not.

My advice, start over with the script. Build it from scratch, if there is something you like such as a function, copy the idea not the code. (changing variable names does not count.).

Unlike the ethos of the site being open source, the application is about your own ability to code rather than borrowing other bits of code and compiling a script from it (attitude and involvement also count towards the application greatly).



From: Benny

OT: I'm with @Enslaved; on this one, plagiarizing is taken super seriously, especially if you're going to a high powered uni.

However, you do seem to be taking criticism in your stride and I'm leaning towards saying yes the next time… If you decide to reapply. (which i would recommend)


Thanks for the feedback, really helps me out, I'll be sure to take what you've said and use it to make my script better :)

P1nky

2014-10-03 20:07:02

Add some (D)DTM's and show off your skills mate, the script looks good and honestly you are almost there!

Keep going and good luck!

~P1nky

Gu3st...

2014-10-11 12:13:33

Closed

Justin

2014-10-15 00:30:09

Hi @sparkyownage;

It unfortunately looks like you won't be getting in this time. Heed what other SRL Members have suggested to improve your chances next time!

You may apply again in two weeks or any later date when you're ready

Best of luck in the future!

Cheers,

Justin