SRL Archive - Archive

Wooty - SRL Member Application


Wooty

2019-01-22 04:59:05

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
I (almost) got a M.Sc. in Information Engineering Technology.

Programming/scripting languages:
- C/C++
- C#
- Java, JavaEE
- Perl, Bash
- HTML, CSS, JavaScript (full stack)
- Android mobile development
- ASP.NET Core
- Pascal/Lape (basic knowledge through SRL)


Are you a member of any other communities?
I used to be active on the Tip.It forums back in the days.


Tell us about yourself…
From: Wooty
Hi there!

My name is Wooty and I'm a university student in Ghent, Belgium.
Currently I'm finishing my last year to get my master degree in computer engineering.

I've been a junior member on the SRL Forums for a while but haven't been to active lately. About 3 years ago I started experimenting with the SRL includes for RS3, wrote some scripts and entered a scripting competition here on the forums. I really enjoyed writing those scripts, but because of the lack of time I had to move away from RS and scripting.

Now that I almost have my degree, I'd like to get back into it and script/play OSRS in my free time. I will mainly focus on OSRS scripting using the new SRL include for OSRS. Below are some scripts I wrote using SRL, ogLib and Flight's ORSR AL include. The scripts below aren't very pretty since I was never planning on releasing the scripts so it just had to work, but I'm planning on rewriting them using the SRL include. I'm currently playing as a OSRS HCIM and my future scripts will be focussed on ironman based tasks.


1. OSRS CharterShipper (ironman):
- buys bucket of sand and seaweed/soda ash from the traders in Port Khazard
- uses RSWalker for navigating around
- deposit items in bank chest
- supports world hopping (rewrote the world hopping functionality of AeroLib since it was broken)

2. RS3 CowsToBootsConverter (scripting competition):
https://villavu.com/forum/showthread.php?t=110594

3. RS3 Abyss AFKER
- used for AFK mage training in the abyss
- will run south/north to re-agro
- eats food, triggers abilities and uses special items for bonuses

4. OSRS Simple Al-Kharid hide tanner and banker, very basic.

(upload functionality is broken, so I'll just paste the scripts below)
=============================================================
1.————————————————————————————-

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

program CharterShips;
{$DEFINE WALKER}
{$I AeroLib/AeroLib.Simba}

const
ScriptName = 'Charter Ships';
ScriptVersion = '1.0';
PlayerUsername = '';
PlayerPassword = '';
DebugMode = False;

var
Counter, x, y: Integer;
BucketOfSand, SodaAsh, Seaweed, Coins: TItem;
RSW: TRSWalker;
O_AshCount, O_SandCount, AshCount, SandCount: Integer;

procedure PlayerSetup;
begin
Me.Active := True;
Me.Name := PlayerUsername;
Me.Pass := PlayerPassword;
Me.Member := True;
end;

procedure Debug(str: string);
begin
if DebugMode then
begin
WriteLn('[' + ScriptName + ' v' + ScriptVersion + '] ' + str);
end;
end;

procedure ReportLog;
var
h, m, s: Integer;
begin
if GetTimeRunning > 5000 then
begin
ConvertTime(GetTimeRunning, h, m, s);
Writeln('---------------- Proggy ----------------');
Writeln('| Script Has Run For : ', h, ':', m, ':', s);
Writeln('| Soda ash : ', AshCount);
Writeln('| Buckets of sand : ', SandCount);
Writeln('------------------ End -----------------');
end;
end;

procedure LoadItems;
begin
BucketOfSand.DTM := DTMFromString('mggAAAHicY2NgYHgJxI+g9Ccg/gDEj4F4JRBvB+LdQLwZiJdA8ZTmECDJiAVjB9hUIlQDAGY3Cww=');
SodaAsh.DTM := DTMFromString('mbQAAAHicY2VgYJjExMDQB8RTgXghEE8H4mdA8ZdA/AaInwDxfSDetnoVkGREw5gAXQVcFQD/7AmP');
Seaweed.DTM := DTMFromString('mrAAAAHic42BgYHBgYmAwB2InIPYFYhcgtgNiLyC2AmJORggWBGI2IP4D1MMIpP8DaQGQXIoTSAQPxg/w6UTWDQCYpgUe');
Coins.DTM := DTMFromString('mggAAAHicY2NgYAgHYk8gjgfiVCBOhPKTgTgbiPOhYmFAnADEH4/IAklGLBg7wKYSoRoAV5IGRg==');
end;

procedure antiBan;
begin
Debug('Performing antiban...');
case random(1000) of
0..50: BoredHuman;
51..55: HoverSkill('Ranged', False);
56..60: HoverSkill('Hitpoints', False);
61..70: pickUpMouse();
71..500: MMouseOffClient('random');
501..750: compassMovement(10, 160, False);
end;
end;

procedure customMouse(point: TPoint);
begin
case Random(0, 6) of
0..2: BrakeMMouse(point, Random(3), Random(3), True);
3: BrakeMMouse(point, Random(3), Random(3), False);
4..5: MissMouse(point, Random(3), Random(3));
6: HumanMMouse(point, Random(3), Random(3));
end;
end;

procedure waitRandom;
begin
case Random(1000) of
0..700: waitEx(RandomRange(400, 1000));
701..900: waitEx(RandomRange(1600, 2600));
901..1000: waitEx(RandomRange(1800, 3800));
end;
end;

function getMouseCoords(): TPoint;
var
Pnt: TPoint;
begin
getMousePos(Pnt.x, Pnt.y);
Result := Pnt;
end;

procedure switchWorlds;
const
WorldsToVisit: TIntegerArray = [302, 303, 304, 305, 306, 307, 309, 310, 311, 312, 313, 314, 315, 317, 318, 319, 320, 321, 322, 323, 325, 327, 328, 329, 330, 331, 332, 333, 334, 336, 337, 338, 339, 340, 341, 342, 344, 346, 347, 348, 350, 351, 352, 354, 355, 356, 357, 358, 359, 360, 362, 367, 368, 369, 386, 387, 388, 389, 390];

var
CurrentWorld: Integer;
NextWorld: Integer;
i: Integer;
begin
if (isLoggedIn()) then
begin
KeyDown(VK_F1);
Wait(Random(15, 175));
KeyUp(VK_F1);
Wait(Random(400, 500));
if not isInvFull() then
begin
CurrentWorld := WS_getWorld();
Debug(ToStr(CurrentWorld));
for i := 0 to High(WorldsToVisit) do
begin
if (WorldsToVisit[i] = CurrentWorld) then
begin
Debug('Current world: ' + ToStr(CurrentWorld));
if (i = High(WorldsToVisit)) then
begin
NextWorld := WorldsToVisit[0];
end
else
begin
NextWorld := WorldsToVisit[i + 1];
end;
Debug('Switch to world: ' + ToStr(NextWorld));
WS_switchWorlds(NextWorld);
end;
end;
end;
end;
end;

procedure doWalking;
var
pathToShop, pathToBank: TPointArray;
begin
if (isLoggedIn()) then
begin
pathToShop := [Point(211, 186), Point(233, 230), Point(260, 250)];
pathToBank := [Point(260, 250), Point(233, 230), Point(211, 186)];
toggleRunning(True);
if (RSW.GetMyPos().X < 223) then
begin
if (RSW.GetMyPos().Y < 192) then
begin // @BANK
if (IsInvFull()) then
begin
exit;
end
else
begin
if Coins.InInventory() then
begin
RSW.WalkPath(pathToShop);
end else
begin
exit;
end;
end;
end else
begin // @BELOW BANK
if (IsInvFull()) then
begin
RSW.WalkPath(pathToBank);
end
else
begin
if Coins.InInventory() then
begin
RSW.WalkPath(pathToShop);
end else
begin
RSW.WalkPath(pathToBank);
end;
end;
end;
end;
if (RSW.GetMyPos().X >= 223) then
begin
if (RSW.GetMyPos().Y > 235) then
begin //@SHOP
if (IsInvFull()) then
begin
RSW.WalkPath(pathToBank);
end else
begin
exit;
end;
end else
begin // @PIER
if (IsInvFull()) then
begin
RSW.WalkPath(pathToBank);
end
else
begin
if Coins.InInventory() then
begin
RSW.WalkPath(pathToShop);
end else
begin
RSW.WalkPath(pathToBank);
end;
end;
end;
end;
while isPlayerWalking() do
waitEx(50);
end;
end;

procedure doBanking;
var
TPA: TPointArray;
ATPA: T2DPointArray;
color: TColEx;
I: Integer;
pnt: TPoint;
g: Timer;
begin
if (isLoggedIn()) then
begin
if ((RSW.GetMyPos().X < 223) and (RSW.GetMyPos().Y < 192)) then
begin
KeyDown(VK_F1);
Wait(Random(15, 175));
KeyUp(VK_F1);
Wait(Random(100, 150));
if not isBankOpen() then
begin
color.create(3425887, 21, 0.04, 0.09);
if (not color.findAllIn(AREA_MS, TPA)) then
begin
exit;
end;
ATPA := FloodFillTPA(TPA);
if (length(ATPA) <= 0) then
begin
exit;
end;
SortATPAFromFirstPoint(ATPA, Point(275, 155));
for I := 0 to high(ATPA) do
begin
if (length(ATPA[I]) < 36) then
continue;
pnt := MiddleTPA(ATPA[I]);
customMouse(pnt);
if (waitUpTextMulti(['ank', 'est'], 300)) then
begin
fastClick(MOUSE_LEFT);
break;
end;
end;
sleep(random(400, 500));
while isPlayerWalking() do
waitEx(50);
sleep(random(400, 500));
end;
if getCurrentBankTab() <> 0 then
SwitchBankTab(0);
if FindDTM(BucketOfSand.DTM, x, y, msx1, msy1, msx2, msy2) then
begin
o_SandCount := getItemAmount(Point(x, y));
Debug('Sand in bank = ' + ToStr(o_SandCount));
end;
if FindDTM(SodaAsh.DTM, x, y, msx1, msy1, msx2, msy2) then
begin
o_AshCount := getItemAmount(Point(x, y));
Debug('Ash in bank = ' + ToStr(o_AshCount));
end;
if SodaAsh.InInventory() then
begin
Debug('Found soda ash in inventory');
MouseBox(InvBox(SodaAsh.getSlot()), MOUSE_MOVE);
if IsUpTextMulti(['Soda', 'ash', 'oda as']) then
if InteractSlot(SodaAsh.getSlot(), MOUSE_RIGHT) then
if WaitOption('Deposit-All', 1000) then
begin
Debug('Banking ' + IntToStr(SodaAsh.getAmount(True)) + ' soda ashes.');
AshCount := AshCount + SodaAsh.getAmount(True);
ChooseOption('Deposit-All');
end;
end;
if BucketOfSand.InInventory() then
begin
Debug('Found sand in inventory');
MouseBox(InvBox(BucketOfSand.getSlot()), MOUSE_MOVE);
if IsUpTextMulti(['Bucket', 'of sand', 'ucket of san']) then
if InteractSlot(BucketOfSand.getSlot(), MOUSE_RIGHT) then
if WaitOption('Deposit-All', 1000) then
begin
Debug('Banking ' + IntToStr(BucketOfSand.getAmount(True)) + ' buckets of sand.');
SandCount := SandCount + BucketOfSand.getAmount(True);
ChooseOption('Deposit-All');
end;
end;
if Seaweed.InInventory() then
begin
Debug('Found seaweed in inventory');
MouseBox(InvBox(Seaweed.getSlot()), MOUSE_MOVE);
if IsUpTextMulti(['Seaweed', 'eaweed']) then
if InteractSlot(Seaweed.getSlot(), MOUSE_RIGHT) then
if WaitOption('Deposit-All', 1000) then
begin
Debug('Banking ' + IntToStr(Seaweed.getAmount(True)) + ' seaweed.');
ChooseOption('Deposit-All');
end;
end;
if not Coins.InInventory() then
begin
if FindDTM(Coins.DTM, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(Point(x, y), 5, 2);
if WaitUpTextMulti(['Coins ', 'oins'], 400) then
FastClick(Mouse_Right);
waitOption('Withdraw-All ', 1000);
KeyDown(VK_ESCAPE);
Wait(Random(15, 175));
KeyUp(VK_ESCAPE);
Wait(Random(15, 175));
end
else
begin
Debug('Ran out of money, logging off.');
CloseInterface();
LogoutPlayer();
TerminateScript;
end;
end;
end
else
begin
exit;
end;
end;
end;

procedure doShopping;
var
TPA: TPointArray;
ATPA: T2DPointArray;
I, world: Integer;
spot: TPoint;
t: Timer;
maleNPCcol, femaleNPCcol: TColEx;
begin
if (isLoggedIn()) then
begin
if (RSW.GetMyPos().X > 254) and (RSW.GetMyPos().Y > 235) then
begin
KeyDown(VK_F1);
Wait(Random(15, 175));
KeyUp(VK_F1);
Wait(Random(400, 500));
if not isInvFull() then
begin
if not Interfaces[SHOPSCREEN].isVisible() then
begin
repeat
Debug('Searching Shop NPC...');
maleNPCcol.create(11251381, 17, 0.29, 0.13);
femaleNPCcol.create(4590440, 6, 0.04, 0.56);
if (maleNPCcol.findAllIn(AREA_MS, TPA)) then
begin
ATPA := FloodFillTPA(TPA);
SortATPASize(ATPA, true);
spot := middleTPA(ATPA[0]);
customMouse(spot);
sleep(20 + random(30));
if (waitUptext('rader', 250)) then
begin
fastClick(MOUSE_RIGHT);
if WaitUpTextMulti(['Talk-To', 'Trader', 'rader', 'Crewmember', 'rader rewmembe'], 400) then
FastClick(Mouse_Right);
waitOption('Trade ', 250);
sleep(random(400, 500));
while isPlayerWalking() do
waitEx(50);
sleep(random(400, 500));
end;
end;
if ((not Interfaces[SHOPSCREEN].isVisible()) and (femaleNPCcol.findAllIn(AREA_MS, TPA))) then
begin
ATPA := FloodFillTPA(TPA);
SortATPASize(ATPA, true);
spot := middleTPA(ATPA[0]);
customMouse(spot);
sleep(20 + random(30));
if (waitUptext('rader', 250)) then
begin
fastClick(MOUSE_RIGHT);
if WaitUpTextMulti(['Talk-To', 'Trader', 'rader', 'Crewmember', 'rader rewmembe'], 400) then
FastClick(Mouse_Right);
waitOption('Trade ', 250);
sleep(random(400, 500));
while isPlayerWalking() do
waitEx(50);
sleep(random(400, 500));
end;
end;
until (Interfaces[SHOPSCREEN].isVisible());
end;
Debug('Buying supplies...');
if Coins.InInventory() and Interfaces[SHOPSCREEN].isVisible() then
begin
if (O_AshCount > O_SandCount) then
begin
if FindDTM(BucketOfSand.DTM, x, y, msx1, msy1, msx2, msy2) then
begin
while (getItemAmount(Point(x, y)) > 0) and not IsInvFull() do
begin
HumanMMouse(Point(x, y), 5, 2);
if WaitUpTextMulti(['Value', 'Bucket ', 'of sand'], 400) then
FastClick(Mouse_Right);
waitOption('Buy 50 ', 750);
end;
end;
if FindDTM(SodaAsh.DTM, x, y, msx1, msy1, msx2, msy2) then
begin
while (getItemAmount(Point(x, y)) > 0) and not IsInvFull() do
begin
HumanMMouse(Point(x, y), 5, 2);
if WaitUpTextMulti(['Value', 'Soda ', 'ash'], 400) then
FastClick(Mouse_Right);
waitOption('Buy 50 ', 750);
end;
end;
end
else
begin
if FindDTM(SodaAsh.DTM, x, y, msx1, msy1, msx2, msy2) then
begin
if (getItemAmount(Point(x, y)) > 0) then
begin
HumanMMouse(Point(x, y), 5, 2);
if WaitUpTextMulti(['Value', 'Soda ', 'ash'], 400) then
FastClick(Mouse_Right);
waitOption('Buy 50 ', 750);
end;
end;
if FindDTM(BucketOfSand.DTM, x, y, msx1, msy1, msx2, msy2) then
begin
if (getItemAmount(Point(x, y)) > 0) then
begin
HumanMMouse(Point(x, y), 5, 2);
if WaitUpTextMulti(['Value', 'Bucket ', 'of sand'], 400) then
FastClick(Mouse_Right);
waitOption('Buy 50 ', 750);
end;
end;
end;
KeyDown(VK_ESCAPE);
Wait(Random(15, 175));
KeyUp(VK_ESCAPE);
Wait(Random(400, 500));
end;
end;
end
else
begin
exit;
end;
end;
end;

begin
InitAL();
RSW.Init('PortKhazard');
RSW.skipClose := 35;
RSW.minRunEnergy := 30;
RSW.walkStyle := wsSPS;
RSW.anyAngle := True;
RSW.skipClose := 35;
RSW.minRunEnergy := 30;
RSW.walkStyle := wsSPS;
RSW.anyAngle := True;
SandCount := 0;
AshCount := 0;
LoadItems();
PlayerSetup();
repeat
if (not isLoggedIn()) then
loginPlayer(false);
//WriteLn(ToStr(getMouseCoords.X) + ';' + ToStr(getMouseCoords.Y));
doWalking();
doBanking();
doWalking();
repeat
if (not isLoggedIn()) then
loginPlayer(false);
doShopping();
doWalking();
switchWorlds();
KeyDown(VK_F1);
Wait(Random(15, 175));
KeyUp(VK_F1);
until (isInvFull());
ReportLog();
until (false);
end.
-------------------------------------------------------------------------------------
2. see link

-------------------------------------------------------------------------------------
3. file is on my other pc
-------------------------------------------------------------------------------------
4.
program WootysTanner;
{$DEFINE SMART}
{$DEFINE WALKER}
{$I AeroLib/AeroLib.simba }


const

moneybmp := BitmapFromString(11, 12, 'meJyTOfBG5thnmX0vxZecEulYLn' +
'PwndTOJ1KrLwmWTmDQt2ZkYACKyJz4BhQUX3BEsHkhSMHmu0DFggV' +
'dDFomCAXb7ovP3i9YNxtolNSG6yDFxb0cNt5QBSd/SG28JTJtp2DF' +
'FJkDb4Bs8UXHgYo5ApIRJmy4LjJlG0jBkY8g05afBbqHN7aYwcQRX' +
'QHEPSsuiPRv4M1t43ANBZqJrIAjJENmz3OptVfEZ+4BcnkjckAmHP' +
'sMVwA0FupOoDMa5vFG5YMUAO0Feg2oBSiSVg9SAHQn0CNgBRB3Su1' +
'4BBQR6VoF9D7IIxCfghUAHQNHQMUg9fCgQFXAIC4Dkj35A+pIoAKg' +
'm11DASAnrvM='); //ok

cow := BitmapFromString(9, 9, 'meJyb3dExGxWVCvFCEC5xIJokJoRV' +
'HCIFQWjicKlWEX6sUkBxCEIWt2VjQ5aCywLFgQhZHIIg4p7sUKkQX' +
'i44AoobsTEwMjAAAMXbPPQ=');

green := BitmapFromString(12, 12, 'meJx9jzsOACEIRLek8FDb2NhQW9' +
'B4/0OsCCiwicmE+HnOjNAAGpTBEyqUroL3EemVaW4LqSZ/Zxioy1z' +
'cHMCTDB5KshUFq2NoDcUwJQbt0P28Z7d0qF/+xfkyNwbXGu3XPkjK' +
'kPHo+FhYO2NkMDMf6Ks2pA=='); //ok

blue := BitmapFromString(13, 12, 'meJx1kDEOgCAMRWcWBgYOYvAkLi' +
'wuHTiXgwkhMfGKYr9ULZr8EFpePr8la8ia+aF99PWM1qyDgyZzMtA' +
'yOAXncCk+mD8ssnMtxVz9W4LHHRLzzP25iwoVBqTsyarE5qVh1AZX' +
'USu28aswxKtY3lETk8nem6G2sU8MQkeNozDEA0ZtLZJNWWEoSQvsA' +
'DKnZO8='); //ok

red := BitmapFromString(10, 9, 'meJybP3/xwaPH9h85uv/wERA6cnT' +
'p0hUQVFffDpeCC0IUAKWACCSFpB6CNu/YDZFFE4frwiqLLIUmiyaF' +
'LIspBUSLFy8HIqxSIaHRQKkpU2ZilQIiALIrnrI=');

black := BitmapFromString(8, 9, 'meJxLTc1RUlLBROrqmkAUHZsCRHDB' +
'1NQcoGBcfBoEIYsDES7xhIQMIAJqhIjAzYcIQtSg2QsXh+hCFkdDQ' +
'Ochc+EuBABxUTG7'); //ok


var
RSW : TRSWalker;
Limit, minAnti, maxAnti, AntiAmount, tanned, tannedPerHour, lor, hideType : Integer;
tanPos : TPoint;
bankToDoor, doorToBank, doorToTanner, tannerToDoor, bankToTanner, tannerToBank : TPointArray;
started, checkDoor : Boolean;
lastTime : Extended;
hide, money : TItem;
tim, tim2, tim3: Timer;

procedure Draw(text: string);
begin
tannedPerHour := round(tanned * 3600 / (getTimeRunning / 1000));
OS_Smart.__Graphics.Clear;
OS_Smart.__Graphics.DrawClippedText('Made by: Wooty', 'SmallChars', point(12, 20), clWhite);
OS_Smart.__Graphics.DrawClippedText('_____________', 'SmallChars', point(12, 26), clWhite);
OS_Smart.__Graphics.DrawClippedText('Status: ' + text, 'SmallChars', point(12, 46), clWhite);
OS_Smart.__Graphics.DrawClippedText('Time Running: ' + TimeRunning, 'SmallChars', point(220, 20), clYellow);
OS_Smart.__Graphics.DrawClippedText('Tanned: ' + inttostr(tanned),'SmallChars', point(220, 34), clYellow);
OS_Smart.__Graphics.DrawClippedText('Tanned per hour: ' + inttostr(tannedPerHour),'SmallChars', point(220, 48), clYellow);
end;

procedure initializeSettings();
var
x, y: Integer;
begin
bankToDoor := [Point(4889, 3783), Point(4913, 3780), Point(4914, 3743),
Point(4927, 3728), Point(4936, 3704), Point(4923, 3684)];
doorToBank := copyTPA(bankToDoor);
InvertTPA(doorToBank);

doorToTanner := [Point(4922, 3684), Point(4907, 3686)];
tannerToDoor := copyTPA(doorToTanner);
InvertTPA(tannerToDoor);

bankToTanner := [Point(4887, 3780), Point(4905, 3778), Point(4918, 3749),
Point(4926, 3725), Point(4935, 3701), Point(4925, 3685),
Point(4906, 3684)];
tannerToBank := copyTPA(bankToTanner);
InvertTPA(tannerToBank);

Me.Name := '';
Me.Pass := '';
Me.Pin := '';

Me.Member := True;
Me.Active := True;

SMART_ShowConsole := false;
SMART_UserAgent := 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36';
SMART_World := 42;

checkDoor := True;

limit := 2500; // Amount of hides to tan
AntiAmount := 69;
minAnti := 0;
maxAnti := 0;

money.Name := 'coins';
money.BMP := moneybmp;
money.BMP_TOL := 15;

hideType := 1;

case hideType of
0: begin // Cowhide
x := 92;
y := 97;
hide.Name := 'cowhide';
hide.BMP := cow;
hide.BMP_TOL := 15;
end;
1: begin // Green dragonhide
x := 103;
y := 238;
hide.Name := 'green d';
hide.BMP := green;
hide.BMP_TOL := 15;
end;
2: begin // Blue dragonhide
x := 207;
y := 237;
hide.Name := 'blue d';
hide.BMP := blue;
hide.BMP_TOL := 15;
end;
3: begin // Red dragonhide
x := 319;
y := 232;
hide.Name := 'red dr';
hide.BMP := red;
hide.BMP_TOL := 15;
end;
4: begin // Black dragonhide
x := 428;
y := 234;
hide.Name := 'black d';
hide.BMP := black;
hide.BMP_TOL := 15;
end;
end;
tanPos := point(x, y);
end;

Function outofMats() : boolean;
begin
if (hide.getAmount(True) < 1) then
result := True;
end;

procedure fullWithdraw(item : TItem; amount : Integer);
begin
if not WithdrawItem(item, amount) then
begin
searchBank(item.Name);
WithdrawItem(item, amount);
end;
end;

function checkAnti() : Boolean;
var
perc : Integer;
begin
if (AntiAmount > 0) then
begin
perc := AntiAmount - 1
case random(100) of
0..perc: Result:= True;
end;
end;
end;

procedure customAnti;
var
time : Extended;
begin
time := getTimeRunning - randomRange(minAnti*1000,maxAnti*1000);
if lastTime < time then
begin
if (checkAnti) then
begin
draw('Performing antiban');
case random(9) of
0: randomMovement();
1: boredHuman();
2: pickUpMouse();
3: randomRClick();
4: hoverSkill('random', false);
5: SleepAndMoveMouse(3000);
6: examineInv();
7: randomFKeys(True);
8: MMouseOffClient('rand');
end;
end;
lastTime := getTimeRunning;
end;
end;

procedure customMouse(point: TPoint);
// This methodology was inspired by rj's antiban guide
begin
case random(200) of
0..160: HumanMMouse(point, random(5), random(5));
161..190: HumanMMouse(point, random(7), random(7));
191..200: HumanMMouse(point, random(10), random(10));
end;
end;
Procedure RandomWait;
Begin
Draw('Waiting');
case random(1000) of
0..700: Wait(RandomRange(400, 1000));
701..900: Wait(RandomRange(600, 1600));
901..1000: Wait(RandomRange(800, 2500));
End;
End;

function atBank : Boolean
var
curLoc: TPoint;
begin
curLoc := RSW.GetMyPos();
if (curLoc.y >= 3755) then
begin
Result := True;
end else
Result := False;
end;



procedure Bank
begin
if atBank then
begin
case random(2) of
0: lor := vk_right;
1: lor := vk_left;
end;
tim.start;
repeat
if not isLoggedIn() then
break;
if tim.timeElapsed > 10000 then
begin
Writeln('Timed out: Could not find bank - Terminating script');
logoutPlayer;
break;
end;
draw('Looking for bank');
if(findMSObjectSimple([7960699, 7368820], ['ank', 'booth'])) then
begin
fastClick(mouse_Right);
WaitUpText('ank Bank', randomrange(300, 400));
if ChooseOptionMulti(['ank Bank']) then
begin
tim2.start;
repeat
if tim2.timeElapsed > 10000 then
begin
Writeln('Timed out: Could not open bank - Terminating script');
logoutPlayer;
break;
end;
randomWait;
until(Interfaces[BANKSCREEN].isVisible() or Interfaces[PINSCREEN].isVisible());
end;
end else
begin
keyDown(lor);
Wait(randomRange(500,1000));
keyUp(lor);
end;
until(Interfaces[BANKSCREEN].isVisible() or Interfaces[PINSCREEN].isVisible());
if PinScreen then
InPin(Me.Pin);
draw('Depositing items');
if (money.getSlot = 0) then
begin
if not isInvEmpty then
begin
quickDeposit('inventory');
end;
fullWithdraw(money, 20 * limit);
randomWait;
end else
begin
depositAllFrom(2, True);
end;
draw('Withdrawing items');
fullWithdraw(hide,27);
tim3.start;
repeat
if tim3.timeElapsed > 10000 then
begin
Writeln('Timed out: Could not close bank - Terminating script');
logoutPlayer;
break;
end;
draw('Closing bank');
customMouse(point(485,22));
fastClick(mouse_Left);
RandomWait;
until(not Interfaces[BANKSCREEN].isVisible);
if outofMats then
begin
Writeln('Out of materials - Terminating script');
logoutPlayer;
end;
end;
end;

procedure openDoor;
begin
tim.start;
repeat
if not isLoggedIn() then
break;
if tim.timeElapsed > 5000 then
begin
Writeln('Timed out: Could not find door.');
break;
end;
draw('Looking for door');
if(findMSObjectSimple([1725034,1262682], ['pen', 'pen Door', 'Open'])) then
begin
draw('Found door to open');
fastClick(mouse_Right);
WaitUpText('pen', randomrange(300, 400));
if ChooseOptionMulti(['pen']) then
draw('Opened door');
tim2.start;
repeat
if tim2.timeElapsed > 5000 then
begin
Writeln('Timed out: Could not find opened door');
break;
end;
until(findMSObjectSimple([1725034,1262682], ['lose', 'lose Door', 'Close']));
end;
until(findMSObjectSimple([1725034,1262682], ['lose', 'lose Door', 'Close']));
draw('Found door already open');
end;

procedure tanHides;
var
Tanner : TMSObject;
i : Integer;
begin
if not atBank then
begin
Tanner.create('Ellis', ['Ell', 'is', 'Ellis'], [CreateCol(3102386, 16, 0.01, 0.73)]);
repeat
SetAngle(ANGLE_HIGH);
draw('Searching for Tanner');
for i := 0 to 5 do
begin
if i = 1 then
HumanMMouse(MSCP, 5, 5);
if Tanner.find() or isUpTextMulti(['Ell', 'is', 'Ellis']) then
begin
draw('Found Tanner');
FastClick(Mouse_right);
if WaitOptionMulti(['Tra', 'de', 'Trade'], RandomRange(120, 200)) then
begin
draw('Found Option');
i := 5;
end else
begin
draw('Tanner not clicked, retrying');
Sleep(RandomRange(400, 700));
end;
end;
end;
RandomWait;
customMouse(tanPos);
fastClick(mouse_Right);
if WaitOptionMulti(['Tan All', 'All'], RandomRange(120, 200)) then
begin
draw('Found Option');
tanned := tanned + 27;
tim.start; //reset timer
end;
RandomWait;
until (hide.getAmount(True) < 1);
end;
end;

procedure doWalking;
begin
if (atBank and (hide.getAmount(True) > 1)) then
begin
draw('Walking to tanner');
if checkDoor then
begin
RSW.WalkPath(bankToDoor);
openDoor;
RSW.WalkPath(doorToTanner);
end else
RSW.WalkPath(bankToTanner);
end else
begin
draw('Walking to bank');
if checkDoor then
begin
RSW.WalkPath(tannerToDoor);
openDoor;
RSW.WalkPath(doorToBank);
end else
RSW.WalkPath(tannerToBank);
end;
end;

procedure FreeStuff;
begin
Writeln('Thanks for using Wooty''s Tanner. Ran for: '+TimeRunning);
FreeBitmap(moneybmp);
FreeBitmap(cow);
FreeBitmap(green);
FreeBitmap(blue);
FreeBitmap(red);
FreeBitmap(black);
RSW.Free;
end;

begin
AddOnTerminate('FreeStuff');
initializeSettings();
initAL();
RSW.Init('WorldMap', OS_SMART.ID);
RSW.walkStyle := wsSPS;
RSW.anyAngle := True;
RSW.skipClose := 15;
OS_Smart.__Graphics.Clear;
if not isLoggedIn() then
begin
LogInPlayer(false);
end;
repeat
if not isLoggedIn() then
break;
bank;
doWalking;
tanHides;
until (tanned = limit);
begin
LogoutPlayer;
end;
end.

TomTuff

2019-01-25 04:03:37

Too few fail-safes. Overuse of procedures vs. functions. No demonstration of ability with core SRL include or custom/creative color finding functions. Overall, too utilitarian. No from me, but good luck.

Kasi

2019-01-25 12:28:27

Yes.

acow

2019-01-25 12:52:50

  • Code is well formatted, imo.
  • Clean and easy to skim through. Well named variables make your intentions clear.
  • You've debugged and fixed an issue in the include you're using
I reckon you're more than technically capable/sufficient for members as you seem to have a good grasp of programming fundamentals.

However, your last post prior to this one that I can see is from 2016, no scripts posted publicly, your overall post count is kind of low, and I don't see a Wooty in the discord (maybe you go by a different name?). So I think currently you're probably lacking on enough "community activity" for srl members… but I am open to hearing otherwise.

StickToTheScript

2019-01-31 12:14:09

Unfortunately, due to the lack of activity around the forums, I am going to have to vote no. I will agree with the statements made above that your code is done well, but your activity around the forums is also something that we take into consideration. If you are looking for a place to get started, try posting a few scripts.