SRL Archive - Archive

Sawyer - SRL Member Application


Sawyer

2013-04-27 01:07:39

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
Nope.


What is your general programming knowledge?
Pascal, and I'm learning java/html


Are you a member of any other communities?
I used to be a member of Powerbot, but I came here and never looked back.


Tell us about yourself…
From: Sawyer
I enjoy competitive target rifle shooting, running, weight lifting, and sports. I'm currently still in high school.



Please show us one (or multiple) of your scripts.
[SIMBA]program MohoganyChopper;
{$Define SMART8}
{$I SRL/SRL.Simba}
{$I Sps/Sps.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I SRL/SRL/misc/SmartGraphics.simba}
//Credit to Flight for the Mouse Movements, and Ashaman88 for his map dowloading functions.
//this is used on ape atoll. Please start this next to the deposit chest or the south west most mahogany tree.
//You must have done the quest titled, "Deadliest Catch" for this script.

//You must have a high enough woodcutting level to cut mahogany trees for this script.

//If you are casting plank make, please EQUIP A MUD STAFF and have nature runes,
//your axe, and astral runes in the first three slots of your inventory. You will need to
//have the plank make spell on the right-most slot of your ability bar as well.

//I used the ACA for FindDepositBox and FindTrees functions, but I had to play with the
//colors and tolerances.

const
LOGPRICE = 500;
PLANKPRICE = 2100;
NATUREPRICE = 110;
ASTRALPRICE = 95;
CASTPLANKMAKE = True; //Are you casting plank make?

var
x, y, LogsChopped, profit, LogBitmap, StrangeRock, SpecialLog, Plank, StrangeRock2, currentxp, profitperhour, timegone, xpgain, logs, originalxp, logsperhour, xpPerHour: Integer;
Status: string;
ToBank, FromBankToSouthtree, FromBankToNorthtree, BetweenSouthTreeToNorthTree, betweenNorthTreeToSouthTree, TobankfromSouthtree, tobankfromNorthTree: tpointarray;

procedure DeclarePlayers;
begin
Status := ('Logging in player.') writeln('Logging in player.') HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := ''; //Pin is not needed.
Active := True;
end;
end;

Procedure Images;
begin
LogBitmap := BitmapFromString(17, 12, 'meJxlkelKQlEUhV/AN4gw38B//fBHmNlINtxsMJvsqo1E0SBWYiVaiVliokQRYkRRRBE9X18sOFwIFpfLPt9ee52zXV4rVnlfLL/Ol56jl61I4XEmd4/4mT1vzhWfFq5eEMDSzRtfKi6vZd9+OrsgDSyS0+XqhwRDi9tv888RDBUkWCSGKF77StS/k40fPGnp6E5QUReYJEwk4gcT0k5m67QgioZxSiOYG8k/TBxXR/aK/RtZeE9ghUEMlRuMSc6NeArrsBLavehby1CZPrtTiyGVioRknjppjKevh7bzPfFU7+oR/oNbueGdgie4zvWFkTZg7weTaQwHNk+BMR89KNFIKm7BCBK2+6Ik5Ih2BMaXyliqTJ5wpsYsrYm5XApnWto6w9QRJnxxM4ZaENO1ID3pX7CuGI3aiJFZuhPWpvTIWqh5AZH/YW32F3LGJAM=');
StrangeRock := DTMFromString('mrAAAAHic42BgYHBjYmBwBmI7IHYCYm8g9gJiK6jYW0YGhqdA/A6IvwLxRyB+CcTfgPgFENvb2QJNYcKJRYEkPsxIAMMAAFV7Cxw=');
SpecialLog := DTMFromString('mwQAAAHic42RgYJjGxMAwA4jnAPESIF4AxF1A3AsVXwjECYwMDCFAnAHEcUAcCsQRQJwJxWlAPLU2GGgaE14sCSQJYUYiMBwAAGhBC0E=');
Plank := DTMFromString('m1gAAAHicjcwxCoAgAIXhp1O41GLQ4BLSCTpCdw4HqRAiOpX/1pgPvjf+TtJppRc3MnYkHCi48GA0koNHxIwJPToEDNjWhar95fkWptG3CtiyChU=');
StrangeRock2 := DTMFromString('mlwAAAHicY2dgYHBhgmBvIHYEYksgtgNidyBuZGRgqATiZiDuBOI2IK4F4g4g9vHyBOpmwopFGHADRjwYCgDZtwaG');
end;

Procedure FreeImages;
begin
FreeDTM(Plank);
FreeDTM(SpecialLog);
FreeDTM(StrangeRock);
FreeDTM(StrangeRock2);
FreeBitmap(LogBitmap);
end;

procedure SetupSmartClient;
begin
SRL_SixHourFix := True;
SMART_FixSpeed := True;
ClearDebug;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
FindNormalRandoms;
Mousespeed := 10;
SmartSetRefresh(25);
end;

procedure SuperWindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
var
veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
lastX, lastY, MSP, W: integer;
sqrt2, sqrt3, sqrt5: extended;
begin
MSP := MouseSpeed;
sqrt2 := sqrt(2);
sqrt3 := sqrt(3);
sqrt5 := sqrt(5);
while hypot(xs - xe, ys - ye) > 1 do
begin
dist := hypot(xs - xe, ys - ye);
wind := minE(wind, dist);
if dist >= targetArea then
begin
windX := windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY := windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
end
else
begin
windX := windX / sqrt2;
windY := windY / sqrt2;
if (maxStep < 3) then
begin
maxStep := random(3) + 3.0;
end
else
begin
maxStep := maxStep / sqrt5;
end;
end;
veloX := veloX + windX;
veloY := veloY + windY;
veloX := veloX + gravity * (xe - xs) / dist;
veloY := veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
begin
randomDist := maxStep / 2.0 + random(round(maxStep) div 2);
veloMag := sqrt(veloX * veloX + veloY * veloY);
veloX := (veloX / veloMag) * randomDist;
veloY := (veloY / veloMag) * randomDist;
end;
lastX := Round(xs);
lastY := Round(ys);
xs := xs + veloX;
ys := ys + veloY;
case Random(50) of
1..25: W := (MSP + (Random((MSP / 4))));
26..50: W := (MSP - (RandomRange((MSP / 2), MSP - 1)));
end;
if (W < 1) then
W := 1;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
MoveMouse(Round(xs), Round(ys));
step := hypot(xs - lastX, ys - lastY);
wait(W);
lastdist := dist;
end;
if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
MoveMouse(Round(xe), Round(ye));
MouseSpeed := MSP;
end;

procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X, Y, X2, Y2, j, Dist, MP: integer;
begin
j := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist / 150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX - (j * MP), eX + (j * MP));
Y2 := RandomRange(eY - (j * MP), eY + (j * MP));
SuperWindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := j;
end;

Procedure DownloadImage(ImageName: String; Location: String); //Credit to Ashaman88
var
Image, Path: string;
FP: Integer;
begin
Image:= GetPage(Location);
Path:= IncludePath + 'SPS\img\runescape_other\' + ImageName + '.png';
Path:= Trim(Path);
FP:= CreateFile(Path);
WriteFileString(FP, Image);
CloseFile(FP);
end;

Function GrabMaps: Boolean;
var
Map: String; //Map Locations
Name: String; //Map Names
begin
Name:= 'ApeAtollMohoganyCutting';
Map:= 'http://i.imgur.com/TYlTIYw.png?1';
begin
if (Not FileExists(IncludePath + 'SPS\img\runescape_other\ApeAtollMohoganyCutting.png')) then
writeln('Needed to download the map.');
DownloadImage(Name, Map);
end;
Result:= (FileExists(IncludePath + 'SPS\img\runescape_other\ApeAtollMohoganyCutting.png'));
end;

procedure Paths;
begin
FrombankToSouthTree := [Point(308, 162), Point(304, 162), Point(300, 159), Point(293, 158), Point(281, 157), Point(274, 154), Point(265, 154), Point(252, 154), Point(243, 151), Point(232, 148), Point(219, 146), Point(205, 144), Point(190, 142), Point(176, 136), Point(157, 129), Point(142, 123), Point(135, 115), Point(135, 109)];
FromBankToNorthtree := [Point(247, 227), Point(246, 226), Point(242, 223), Point(240, 221), Point(236, 219), Point(231, 215), Point(227, 213), Point(221, 206), Point(221, 206), Point(218, 202), Point(215, 196), Point(213, 194), Point(212, 189), Point(209, 182), Point(206, 178), Point(202, 174), Point(199, 171), Point(197, 168), Point(190, 164), Point(187, 162), Point(185, 161), Point(180, 158), Point(178, 156), Point(173, 153), Point(171, 150), Point(166, 146), Point(163, 141), Point(161, 137), Point(159, 135), Point(158, 132), Point(156, 127), Point(152, 123), Point(148, 118), Point(143, 114), Point(138, 113), Point(138, 112), Point(137, 106), Point(135, 101), Point(134, 96), Point(133, 91), Point(132, 84), Point(130, 79), Point(129, 75), Point(128, 72), Point(128, 72)];
BetweenSouthTreeToNorthTree := [Point(94, 161), Point(94, 161), Point(95, 157), Point(96, 153), Point(98, 148), Point(99, 144), Point(100, 138), Point(101, 133), Point(102, 128), Point(104, 123), Point(106, 118), Point(107, 112), Point(110, 106), Point(112, 101), Point(113, 96), Point(115, 92), Point(116, 88), Point(119, 82), Point(122, 79), Point(123, 76), Point(124, 73)];
betweenNorthTreeToSouthTree := [Point(124, 74), Point(124, 77), Point(124, 82), Point(122, 87), Point(117, 93), Point(117, 96), Point(113, 102), Point(111, 108), Point(108, 117), Point(107, 125), Point(105, 133), Point(104, 139), Point(102, 146), Point(98, 152), Point(95, 156), Point(95, 158), Point(91, 163), Point(90, 167)];
ToBankFromSouthTree := [Point(134, 107), Point(135, 117), Point(140, 119), Point(149, 122), Point(163, 130), Point(174, 138), Point(183, 145), Point(195, 148), Point(212, 153), Point(228, 151), Point(245, 153), Point(259, 155), Point(272, 160), Point(288, 164), Point(300, 164)];
tobankfromNorthTree := [Point(123, 73), Point(123, 73), Point(127, 79), Point(129, 83), Point(131, 87), Point(134, 93), Point(135, 97), Point(137, 104), Point(139, 110), Point(141, 115), Point(145, 122), Point(149, 127), Point(152, 131), Point(156, 137), Point(162, 145), Point(167, 151), Point(170, 154), Point(173, 159), Point(178, 166), Point(181, 171), Point(183, 177), Point(189, 186), Point(192, 191), Point(196, 199), Point(196, 200), Point(200, 207), Point(201, 210), Point(204, 213), Point(210, 216), Point(215, 218), Point(219, 221), Point(225, 223), Point(230, 225), Point(237, 226), Point(240, 227), Point(242, 228)];
ToBank := [Point(92, 174), Point(92, 174), Point(93, 171), Point(96, 163), Point(99, 157), Point(101, 151), Point(105, 142), Point(107, 135), Point(111, 124), Point(115, 113), Point(117, 104), Point(118, 96), Point(121, 90), Point(123, 85), Point(128, 77), Point(129, 74), Point(137, 82), Point(141, 88), Point(146, 94), Point(148, 96), Point(150, 99), Point(154, 104), Point(159, 111), Point(164, 118), Point(167, 121), Point(169, 124), Point(171, 127), Point(174, 131), Point(178, 136), Point(181, 140), Point(185, 146), Point(189, 151), Point(192, 156), Point(196, 161), Point(199, 165), Point(202, 169), Point(206, 175), Point(210, 179), Point(213, 183), Point(215, 187), Point(219, 192), Point(223, 198), Point(227, 202), Point(231, 207), Point(232, 209), Point(233, 210), Point(238, 213), Point(242, 216), Point(245, 219), Point(249, 221), Point(251, 222), Point(255, 222), Point(255, 222)];
end;

procedure CloseSqueal;
var
x, y, SquealBitmap: integer;
begin
wait(Randomrange(1500, 1900));
SquealBitmap := BitmapFromString(21, 20, 'meJyNlEtME1EUhl2oAcVXIyYuVKRaNYIvCtUyLY4FaUun2CmVzrQUylCBKQItFWl9IIIvCGoapbTgGxOlIWoh8QEJ0o2CxARWRjcu3bpxYSLxH4b4CGpMvtzMzPn/c+45M3dMVX3OE/Gi+hcitPs57Y5Rlf0GTgDXInhCVUQFuHsUdxdozEHGEzVV9ztbptjARLFvzOIdMx55rHd0z6egVCDfHtSV3kFaIX/53V/tjH/ccTQyEHsZ6ukP9US7Iv1dkYcC4QciodnbgSejdj5o4p8gCds0WFQ/VNX+vqT5nbluuPdObM1aYlWy5R8kr81GEn1pL1UZY7wCsDtbP5ir7x3zt0Ngddz8QfE8IGhoPKctbs21Bi31UbXek8+2YSVyHXzN8ZUSm94Y9LRGTt6Pu/3ddrYNWLl2puNxnt2PEATVfKNcWbgnmzVWdqm1btjJwgCRx1W4apFcoTxb1Rlrmv7GP5jWmVsQOtz7lhn5TPBhhbIVAlell6SO62xh9F7g7LE2DOPV5Fsv2hy1SRJTqqxhf14jfXXcNTljuPaGvPLq0OjXjKbB5BQGIQjYkhoNfYo0R2DXsR0YPlKp9T6zhVu+kpKs5mTSUqA4NaIdnyHjM7K6gWVJdOJCDUIQQAYxSXeg9wP0WRMXwRyytXUFlG1pogHdrV9jkaxgtnmfw6t69mVjWQjPYUcIFwVGG8Sw03V9aJzh+9CCytCgOUgvSRI0AF4YUVfqup0RmtzAXBZDWCEjtF7Rjs3j3eETUhsCRI4BUexznblT+ejTZk8MtcBGZ/f2M1GJvBwhCNSkUceeR1H0jiTw5lojWZr6TMX+JYkqaKBEBkwJG05YtA+WZJVraUqOYE9UQZal4WF0BoZ+jE5O1qbvVEAsVvwbEKSlZ+7YyxH6S6juaRtsufHeH/5QcXooU5m7YIE0YbGQ5M8sVkCwJyun2H2rLDBcdmYYpflL0zg1zubXKsqXtotIlcmlMnmqLFO65Sebts5dpO8myEM+3/WPcAn2qr7ylrnTWuQZPVhyS0k1Kw2n/wzVnGcPm/inEOPIYPOinfXH/x/Uwoofy2/2wMR8EJqP68IUdj6bSvjmMQSc+t8Rflw4C2wgLsKdHIcRIxIzwG6uicH+HVCh6UQ=');
if FindBitmapToleranceIn(SquealBitmap, x, y, 1, 51, 759, 500, 30) then
begin
writeln('Found Squeal Bitmap.');
HumanMMouse(x, y, 3, 3);
if WaitUptext('elect', 300) then
ClickMouse2(Mouse_Left);
end;
FreeBitmap(SquealBitmap);
end;

function SixHourCheck: boolean;
begin
if loggedin then
exit;
result := false;
if not loggedin then
begin
writeln('We have hit the 6 hour mark, relogging in.');
loginplayer;
FindNormalRandoms;
CloseSqueal;
SmartSetRefresh(25);
writeln('Ajusting the camera angle back to absolute north.');
clicknorth(1);
end;
if loggedin then
result := true;
end;

procedure Antiban;
begin
Status := ('Antiban') writeln('Chance of Antiban.');
case Random(200) of
1: HoverSkill('Woodcutting', False);
2: HoverSkill('Magic', False);
3: BoredHuman;
4: BoredHuman;
5: HoverSkill('Herblore', False);
6: ExamineInv;
7: HoverSkill('Farming', False);
8: AdjustMouseSpeed(Randomrange(7, 10), Randomrange(10, 12), Randomrange(20, 25));
9: RandomTab(True);
end;
end;

function IsWoodcutting: Boolean;
var
XPA, T: Integer;
begin
Result := False;
if not LoggedIn then
Exit;
XPA := GetXPBar(1);
MarkTime(T);
repeat
if InvFull then
exit;
if not LoggedIn then
Exit;
if (GetXPBar(1) <> XPA) then
break;
until (TimeFromMark(T) > randomrange(11000, 13000)) Result := (GetXPBar(1) <> XPA);
end;

function FindDepositBox(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
SixHourCheck;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.96);
if not (FindColorsTolerance(arP, 2770291, 1, 50, 515, 325, 8)) then
begin
Writeln('Failed to find the color, deposit box not found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
SixHourCheck;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 5.98) and (X <= 15.70) and (Y >= 4.94) and (Y <= 12.75) and (Z >= 1.72) and (Z <= 5.07) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SixHourCheck;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then
Continue;
P := MiddleTPA(ararP[i]);
HumanMMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('eposit')) then
begin
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindObject could not deposit box.');
Exit;
end;
SixHourCheck;
GetMousePos(fx, fy);
end;

function FindTrees(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
SixHourCheck;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.24, 1.33);
if not (FindColorsTolerance(arP, 6921912, 1, 50, 515, 325, 13)) then
begin
SixHourCheck;
Writeln('Failed to find the color, no trees found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 22.65) and (X <= 49.15) and (Y >= 23.13) and (Y <= 50.07) and (Z >= 12.06) and (Z <= 25.83) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then
Continue;
P := MiddleTPA(ararP[i]);
HumanMMouse(P.x + randomrange(7, 9), P.y + Randomrange(7, 10), 5, 8);
Wait(300 + Random(100));
if (IsUpText('own Maho')) then
begin
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindTrees could not find uptext..');
Exit;
end;
SixHourCheck;
GetMousePos(fx, fy);
end;

procedure MakePlanks;
var
x: Integer;
begin
if CASTPLANKMAKE then
for x := 4 to 28 do
begin
HumanMMouse(460, 310, 10, 10);
ClickMouse2(Mouse_Left);
wait(randomrange(800, 900));
MMouseItem(x);
ClickMouse2(Mouse_Left);
SixHourCheck;
end
else
exit;
end;

procedure StaticMakePlanks;
var
x, y: Integer;
begin
wait(randomrange(600, 900));
if FindBitmapToleranceIn(LogBitmap, x, y, mix1, miy1, mix2, miy2, 30) then
begin
HumanMMouse(460, 310, 15, 15);
ClickMouse2(Mouse_Left);
wait(200 + Random(300));
HumanMMouse(x + Random(18), y + Random(8), 0, 0);
Wait(200 + Random(150));
ClickMouse2(Mouse_Left);
Inc(Logs);
end
else
begin
Writeln('Did not find log bitmap.');
end;
FreeBitmap(LogBitmap);
end;

procedure Bank;
var
t:Integer;
begin
ClearDebug;
FindSpinTicket;
Writeln('Banking.');
sixhourcheck;
if CastPlankMake then
begin
if (FindBitmapToleranceIn(LogBitmap, x, y, mix1, miy1, mix2, miy2, 30)) then
begin
repeat
wait(randomrange(800, 1000));
StaticMakePlanks;
until not (FindBitmapToleranceIn(LogBitmap, x, y, mix1, miy1, mix2, miy2, 30))
end;
end;
ClickNorth(0);
writeln('Walking to the bank.');
MarkTime(t);
SPS_WalkPath(TobankfromSouthtree);
wait(randomrange(1000, 2000));
repeat
if FindDepositbox(x, y) then
smart_drawcircle(false, point(x, y), 6, false, clwhite);
ClickMouse2(Mouse_Right);
SMART_ClearCanvas;
ChooseOption('Deposit De');
wait(randomrange(2000, 3000));
until (DepositScreen);
if FindDTM(Plank, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(x, y, 3, 3);
ClickMouse2(Mouse_Right);
ChooseOption('All');
end;
if FindDTM(SpecialLog, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(x, y, 3, 3);
ClickMouse2(Mouse_Right);
ChooseOption('All');
end;
if FindDTM(StrangeRock, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(x, y, 3, 3);
ClickMouse2(Mouse_Right);
ChooseOption('All');
end;
if FindDTM(StrangeRock2, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(x, y, 3, 3);
ClickMouse2(Mouse_Right);
ChooseOption('All');
end;
if (TimeFromMark(t) > 600000) then
begin
Writeln('Failsafe Logging out as it has been more than 10 minutes without banking.');
Logout;
FreeDTM(Plank);
FreeDTM(SpecialLog);
FreeDTM(StrangeRock);
FreeDTM(StrangeRock2);
FreeBitmap(LogBitmap);
TerminateScript;
end;
FreeDTM(Plank);
FreeDTM(SpecialLog);
FreeDTM(StrangeRock);
FreeDTM(StrangeRock2);
FreeBitmap(LogBitmap);
sixhourcheck;
end;

procedure SetupBot;
begin
if not IsXPBarOpen then
begin
ToggleXPBar(True);
end;
OriginalXP := GetXPBar(1);
wait(randomrange(500, 800));
SetAllChats('filter', 'on', 'off', 'off', 'off', 'off', 'off');
CloseSqueal;
writeln('Starting xp:' + IntToStr(OriginalXP) + '.');
end;

procedure CutMohoganyTrees;
var
u: Integer;
begin
sixhourcheck;
if InvFull then
begin
Bank;
end;
Marktime(u);
CloseSqueal;
ClickNorth(0);
Writeln('Walking to trees.');
SPS_WalkPath(FromBankToSouthtree);
Wait(randomrange(700, 800));
KeyDown(VK_Down);
wait(randomrange(1200, 1800));
KeyUp(VK_Down);
writeln('Cutting trees.');
FindTrees(x, y);
ClickMouse2(Mouse_Right);
chooseoption('hop down');
repeat
if not iswoodcutting then
begin
writeln('You are not woodcutting.');
wait(100 + Random(60));
FindTrees(x, y);
ClickMouse2(Mouse_Right);
chooseoption('hop down');
sixhourcheck;
end
else
writeln('You are woodcutting already.');
StaticMakePlanks;
Antiban;
FindSpinTicket;
until ((InvFull) or (TimeFromMark(u) > 900000));
end;

procedure Proggy;
begin
ClearDebug;
CurrentXP := GetXPBar(1);
Writeln('Current XP: ' + IntToStr(CurrentXP) + '.');
TimeGone := (GetTimeRunning / 1000);
XPGain := (CurrentXP - OriginalXP);
LogsChopped := (logs);
LogsPerHour := (3600 * (LogsChopped)) / ((TimeGone));
XPPerhour := (3600 * (XPGain)) / ((TimeGone));
profit := ((Logschopped) * (PLANKPRICE - (ASTRALPRICE * 2) - NATUREPRICE - 1050)) Profitperhour := (3600 * (Profit)) / ((TimeGone));
writeln('---------------------------------------------------');
Writeln('/////Sawyer-MahoganyChopperV1/////');
writeln('Time running:' + timerunning);
writeln('We have gained: ' + IntToStr(XPGain) + ' xp / Thats ' + IntToStr(XPPerHour) + ' xp per hour.');
Writeln('We have made: ' + IntToStr(LogsChopped) + ' planks. / That is ' + IntToStr(logsperhour) + ' mohogany planks per hour.');
Writeln('We have made over: ' + IntToStr(Profit) + ' GP. / that is ' + IntToStr(Profitperhour) + ' GP per hour.');
Writeln('---------------------------------------------------');
end;

procedure Mainloop;
begin
CutMohoganyTrees;
Bank;
Proggy;
end;

begin
SetupSmartClient;
GrabMaps;
Images;
SPS_Setup(runescape_other, ['ApeAtollMohoganyCutting']);
Paths;
SetupBot;
repeat
mainloop;
until (Allplayersinactive)
FreeImages;
end.

Next:
program SoulWarsBattleStaves;
{$Define SMART8}
{$I SRL/SRL.Simba}
{$I Sps/Sps.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I SRL/SRL/misc/SmartGraphics.simba}
//Credit for the mouse movements goes to Flight. (HumanMMouse, SuperwindMouse)

//Steps
//1. Start Standing next to the chest in the soul wars area.
//2. Have the battle staffs and orbs visible in your bank when you open it. (Please don't have any dramen staffs or regular staffs that look like battle staffs visible.)
//3. Select what type of staff you are making in the constants.
//4. Hit Play.
var
Status: string;
Staves, XpGained,BankFireOrb,BankAirOrb,InvAirOrb,InvFireOrb, XpHr, StartXP, StavesHr, CurrentXP, TimeGone, battlestaff, bankwaterorb, Bankbattlestaff, invwaterorb, screen:Integer;

Const
XPCOUNTER = 1; //What xp counter are you using? (1, 2, or 3) *********
WATER = True; //What orb are you using? Ex. (Fire, Water, Earth, Air)
FIRE = False; //What orb?
AIR = False; //What orb? Only have one as true.
procedure DeclarePlayers;
begin
Status := ('Logging in player.') writeln('Logging in player.') HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
Active := True;
end;
end;
// Don't touch below this unless you know what you are doing.
procedure SetupSmartClient;
begin
SRL_SixHourFix := True;
SMART_FixSpeed := True;
ClearDebug;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
FindNormalRandoms;
end;

Procedure Setup;
begin
ClickNorth(0);
If Not (IsXPBarOpenEx(XPCOUNTER)) then
ToggleXPBar(true);
StartXP := GetXPBar(XPCOUNTER);
end;

procedure Antiban;
begin
Status := ('Antiban');
writeln('Antiban.');
case Random(100) of
1: HoverSkill('Construction', False);
2: HoverSkill('Prayer', False);
3: RandomMovement;
4: RandomMovement;
50-55: HoverSkill('Crafting', False);
6: randomMovement;
7: HoverSkill('Farming', False);
8: RandomMovement;
end;
end;

Procedure CallDTM;
begin
Battlestaff := DTMFromString('mggAAAHicY2NgYMhmYmAoAuIUIE6FskFicYwMDKFAnAPEKUAcBcSJQJzrzw/UxYSBRYAkNsyIA0MAAFGtBi0=');
BankWaterOrb := DTMFromString('mggAAAHicY2NgYOBnZGAQAWJuIOYDYk4gFgXi00C580B8HIgvAvFZID4FxBIyK4EkEwbmYsAOGHFgCAAALmAGJw==');
BankBattleStaff := DTMFromString('mggAAAHicY2NgYMhmYmAoAuIUIE6FskFicYwMDKFAnAPEKUAcBcSJQJzrzw/UxYSBRYAkNsyIA0MAAFGtBi0=');
InvWaterOrb := DTMFromString('mlwAAAHicY2dgYJjCxMAwHYhnAvEEIO4D4klAPAeIWxkZGOqAuAOIO4G4CYjrgbgRiKXkdwB1M2HFXAy4ASMeDAUADjsI0Q==');
Screen := DTMFromString('mwQAAAHic42RgYJjAyMBwFYgPAPECIO4E4gQgtgViBSDmBeI8II4jgDmyJzO02AjjxSJA+9gJYEYiMBwAANAXD4U=');
InvFireOrb := DTMFromString('mlwAAAHicY2dgYLBlYmBwA2IPILYCYmcgtgdiTyCWZmRgkABiASAWA2I5IBYGYlEgvqYjB9TNhBXzM+AGjHgwFAAAs+gDzg==');
BankFireOrb := DTMFromString('mlwAAAHicY2dgYLBkZGBwAGIzILaCsk2B2BEJ2wKxGxC7ALEzENsB8UlNGaBuJqyYnwE3YMSDoQAADOQErw==');
InvAirOrb := DTMFromString('mggAAAHicY2NgYEhjYmAoAOISIM4E4nwgzgZiSUYGBnEgFgRiYSCWBWI5IN637zhQFxMG5mfADhhxYAgAABpKBZc=');
BankAirOrb := DTMFromString('mggAAAHicY2NgYEhjZGDIAeIkIE4F4mwgTgRiJyB2BGJbIHaDYmcg3rRpF1AXEwbmZ8AOGHFgCAAAVsAGRA==');
end;

Procedure FreeDTMM;
begin
FreeDtm(BattleStaff);
FreeDtm(BankWaterOrb);
FreeDTM(BankBattleStaff);
FreeDTm(InvWaterorb);
FreeDTM(Screen);
FreeDTM(InvFireOrb);
FreeDTM(bankFireOrb);
FreeDTM(InvAirOrb);
FreeDTM(BankAirOrb);
end;

procedure SuperWindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
var
veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
lastX, lastY, MSP, W: integer;
sqrt2, sqrt3, sqrt5: extended;
begin
MSP := MouseSpeed;
sqrt2 := sqrt(2);
sqrt3 := sqrt(3);
sqrt5 := sqrt(5);
while hypot(xs - xe, ys - ye) > 1 do
begin
dist := hypot(xs - xe, ys - ye);
wind := minE(wind, dist);
if dist >= targetArea then
begin
windX := windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY := windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
end
else
begin
windX := windX / sqrt2;
windY := windY / sqrt2;
if (maxStep < 3) then
begin
maxStep := random(3) + 3.0;
end
else
begin
maxStep := maxStep / sqrt5;
end;
end;
veloX := veloX + windX;
veloY := veloY + windY;
veloX := veloX + gravity * (xe - xs) / dist;
veloY := veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
begin
randomDist := maxStep / 2.0 + random(round(maxStep) div 2);
veloMag := sqrt(veloX * veloX + veloY * veloY);
veloX := (veloX / veloMag) * randomDist;
veloY := (veloY / veloMag) * randomDist;
end;
lastX := Round(xs);
lastY := Round(ys);
xs := xs + veloX;
ys := ys + veloY;
case Random(50) of
1..25: W := (MSP + (Random((MSP / 4))));
26..50: W := (MSP - (RandomRange((MSP / 2), MSP - 1)));
end;
if (W < 1) then
W := 1;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
MoveMouse(Round(xs), Round(ys));
step := hypot(xs - lastX, ys - lastY);
wait(W);
lastdist := dist;
end;
if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
MoveMouse(Round(xe), Round(ye));
MouseSpeed := MSP;
end;

procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X, Y, X2, Y2, j, Dist, MP: integer;
begin
j := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist / 150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX - (j * MP), eX + (j * MP));
Y2 := RandomRange(eY - (j * MP), eY + (j * MP));
SuperWindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := j;
end;

Procedure CloseSqueal;
var
x, y, SquealBitmap:integer;
begin
wait(Randomrange(1500, 1900));
SquealBitmap := BitmapFromString(21, 20, 'meJyNlEtME1EUhl2oAcVXIyYuVKRaNYIvCtUyLY4FaUun2CmVzrQUylCBKQItFWl9IIIvCGoapbTgGxOlIWoh8QEJ0o2CxARWRjcu3bpxYSLxH4b4CGpMvtzMzPn/c+45M3dMVX3OE/Gi+hcitPs57Y5Rlf0GTgDXInhCVUQFuHsUdxdozEHGEzVV9ztbptjARLFvzOIdMx55rHd0z6egVCDfHtSV3kFaIX/53V/tjH/ccTQyEHsZ6ukP9US7Iv1dkYcC4QciodnbgSejdj5o4p8gCds0WFQ/VNX+vqT5nbluuPdObM1aYlWy5R8kr81GEn1pL1UZY7wCsDtbP5ir7x3zt0Ngddz8QfE8IGhoPKctbs21Bi31UbXek8+2YSVyHXzN8ZUSm94Y9LRGTt6Pu/3ddrYNWLl2puNxnt2PEATVfKNcWbgnmzVWdqm1btjJwgCRx1W4apFcoTxb1Rlrmv7GP5jWmVsQOtz7lhn5TPBhhbIVAlell6SO62xh9F7g7LE2DOPV5Fsv2hy1SRJTqqxhf14jfXXcNTljuPaGvPLq0OjXjKbB5BQGIQjYkhoNfYo0R2DXsR0YPlKp9T6zhVu+kpKs5mTSUqA4NaIdnyHjM7K6gWVJdOJCDUIQQAYxSXeg9wP0WRMXwRyytXUFlG1pogHdrV9jkaxgtnmfw6t69mVjWQjPYUcIFwVGG8Sw03V9aJzh+9CCytCgOUgvSRI0AF4YUVfqup0RmtzAXBZDWCEjtF7Rjs3j3eETUhsCRI4BUexznblT+ejTZk8MtcBGZ/f2M1GJvBwhCNSkUceeR1H0jiTw5lojWZr6TMX+JYkqaKBEBkwJG05YtA+WZJVraUqOYE9UQZal4WF0BoZ+jE5O1qbvVEAsVvwbEKSlZ+7YyxH6S6juaRtsufHeH/5QcXooU5m7YIE0YbGQ5M8sVkCwJyun2H2rLDBcdmYYpflL0zg1zubXKsqXtotIlcmlMnmqLFO65Sebts5dpO8myEM+3/WPcAn2qr7ylrnTWuQZPVhyS0k1Kw2n/wzVnGcPm/inEOPIYPOinfXH/x/Uwoofy2/2wMR8EJqP68IUdj6bSvjmMQSc+t8Rflw4C2wgLsKdHIcRIxIzwG6uicH+HVCh6UQ=');
If FindBitmapToleranceIn(SquealBitmap, x, y, 1, 51, 759, 500, 30) then
begin
writeln('Found Squeal Bitmap.');
HumanMMouse(x, y, 3, 3);
if WaitUptext('elect', 300) then
ClickMouse2(Mouse_Left);
end;
FreeBitmap(SquealBitmap);
end;

function SixHourCheck: boolean;
begin
if loggedin then
exit;
result := false;
if not loggedin then
begin
writeln('We have hit the 6 hour mark, relogging in.');
Loginplayer;
CloseSqueal;
writeln('Ajusting the camera angle back to absolute north.');
clicknorth(srl_angle_high);
end;
if loggedin then
result := true;
end;

function FindBankSoulWars(var fx, fy: Integer): Boolean; //ACA Function. Faster than writing my own.
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.44);
if not (FindColorsTolerance(arP, 11645631, MSX1, MSY1, MSX2, MSY2, 17)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 25.55) and (X <= 72.14) and (Y >= 26.33) and (Y <= 74.47) and (Z >= 28.14) and (Z <= 78.98) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then
Continue;
P := MiddleTPA(ararP[i]);
HumanMMouse(P.x, P.y, 5, 5);
Wait(400 + Random(100));
if (IsUpText('Use')) then
begin
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Exit;
end;
GetMousePos(fx, fy);
end;

procedure Banking;
var
x, y, t: Integer;
begin
SixHourCheck;
repeat
if FindBankSoulWars(x, y) then
ClickMouse2(Mouse_Left);
Wait(randomrange(500, 700));
Inc(t);
until ((Bankscreen) or (t = 10));
if (t = 10) then
begin
Writeln('Took ten tries to open the bank, logging out.');
Logout;
TerminateScript;
end;
DepositAll;
Wait(Randomrange(700, 900));
if FindDtm(BankBattlestaff, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Right);
If OptionsExist(['14'], False) then
begin
ChooseOption('14');
end else
begin
ChooseOptionEx('X', 'all')
Wait(1000+Random(200));
TypeSendEx('14', True);
end;
end;
wait(randomrange(700, 800));
if Water then
begin
if FindDTM(BankWaterOrb, x, y, msx1, msy1, msx2, msy2) then
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Right);
If OptionsExist(['14'], False) then
begin
ChooseOption('14');
end else
begin
if ChooseOptionEx('X', 'all') then
begin
Wait(1000+Random(200));
TypeSendEx('14', True);
end;
end;
wait(randomrange(100, 200));
CloseBank;
exit;
end;
if Fire then
begin
if FindDTM(BankFireOrb, x, y, msx1, msy1, msx2, msy2) then
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Right);
If OptionsExist(['14'], False) then
begin
ChooseOption('14');
end else
begin
if ChooseOptionEx('X', 'all') then
begin
Wait(1000+Random(200));
TypeSendEx('14', True);
end;
end;
wait(randomrange(100, 200));
CloseBank;
exit;
end;
if Air then
begin
if FindDTM(BankairOrb, x, y, msx1, msy1, msx2, msy2) then
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Right);
If OptionsExist(['14'], False) then
begin
ChooseOption('14');
end else
begin
if ChooseOptionEx('X', 'all') then
begin
Wait(1000+Random(200));
TypeSendEx('14', True);
end;
end;
wait(randomrange(100, 200));
CloseBank;
exit;
end;
CloseBank;
SixHourCheck;
end;

procedure MakeStaves;
var
x, y: Integer;
begin

SixHourCheck;
wait(randomrange(500, 800));
if Water then
begin
if FindDTM(InvWaterOrb, x, y, mix1, miy1, mix2, miy2) then
begin
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Left);
end;
end;
if Fire then
begin
if FindDTM(InvFireOrb, x, y, mix1, miy1, mix2, miy2) then
begin
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Left);
end;
end;
if Air then
begin
if FindDTM(InvAirOrb, x, y, mix1, miy1, mix2, miy2) then
begin
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Left);
end;
end;

Wait(Randomrange(300, 400));
if FindDTm(Battlestaff, x, y, mix1, miy1, mix2, miy2) then
begin
HumanMMouse(x, y, 4, 4);
ClickMouse2(Mouse_Left);
end else
writeln('Did not find battlestaff DTM. Update it.');
wait(randomrange(1400, 1800));
if FindDTM(Screen, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(x, y, 10, 7);
ClickMouse2(Mouse_Left);
end;
Wait(Randomrange(16000, 17000));
IncEx(Staves, 14);
SixHourCheck;
FindSpinTicket;
end;

Procedure Proggy;
begin
TimeGone := (GetTimeRunning/1000);
CurrentXP := GetXpBar(XPCOUNTER);
XPGained := (CurrentXP - StartXP);
XpHr := (3600*(XPGained))/((TimeGone));
StavesHR := (3600*(Staves))/((TimeGone));
writeln('------------------------------------------------------');
Writeln('Water BattleStaff Maker V1 from Sawyer.');
Writeln('We have gained: '+IntToStr(XpGained)+'XP. That is: '+IntToStr(XpHr)+'XP per hour.');
Writeln('We have crafted: '+IntToStr(Staves)+' staves. That is: '+IntToStr(StavesHr)+' staves per hour.');
writeln('------------------------------------------------------');
end;

Procedure OnTerminate;
begin
FreeDTMM;
end;

procedure Mainloop;
begin
Banking;
MakeStaves;
Proggy;
end;

begin
SetupSmartClient;
CallDTM;
Setup;
repeat
MainLoop;
until (AllPlayersInactive);
FreeDTMM;
end.

Vinyl Scratch

2013-05-04 11:00:02

You use static coordinates once or twice, static coords are extremely bot-like, you're using something to check for the six-hour thing, we already have something for that. I believe that it's SMART_SixHourFix := true; or SRL_SixHourFix := true, though I can't remember right now as I just woke up. You don't have many failsafes (Well, I haven't seen very many, BUT, I did just wake up. So pardon me if I make a mistake.) You use the AutoColorAid Functions, we like to see that you can make your own object finding functions. There aren't any TPAs (Not required, but help alot, especially with what you're doing.) ObjDTM is a great tool for what you're using, too. The Mayor used it is one of his scripts, and other then Asha, it's one of the best I've used in a long while.

I'm going to vote no, but I wish you best of luck on your application.

Sjoe

2013-05-04 11:14:55

From: Vinyl Scratch
You use static coordinates once or twice, static coords are extremely bot-like, you're using something to check for the six-hour thing, we already have something for that. I believe that it's SMART_SixHourFix := true; or SRL_SixHourFix := true, though I can't remember right now as I just woke up. You don't have many failsafes (Well, I haven't seen very many, BUT, I did just wake up. So pardon me if I make a mistake.) You use the AutoColorAid Functions, we like to see that you can make your own object finding functions. There aren't any TPAs (Not required, but help alot, especially with what you're doing.) ObjDTM is a great tool for what you're using, too. The Mayor used it is one of his scripts, and other then Asha, it's one of the best I've used in a long while.

I'm going to vote no, but I wish you best of luck on your application.


He uses the sixhourfix …
and he uses coordclicking for static objects, doesn't make it 'botlike', since he's got enough randomness added.
But we would like to see more SRL Include usage though since they is a whole include for inventory usage.


Could use a TimeMark failsafe here? Since this is a potential infinite loop.
We'd like to avoid the possibility of an infinite loop.


repeat
wait(randomrange(800, 1000));
StaticMakePlanks;
until not (FindBitmapToleranceIn(LogBitmap, x, y, mix1, miy1, mix2, miy2, 30))

same here:

repeat
if FindDepositbox(x, y) then
smart_drawcircle(false, point(x, y), 6, false, clwhite);
ClickMouse2(Mouse_Right);
SMART_ClearCanvas;
ChooseOption('Deposit De');
wait(randomrange(2000, 3000));
until (DepositScreen);

There's an easier way to FreeDTM's:


FreeDTM(Plank);
FreeDTM(SpecialLog);
FreeDTM(StrangeRock);
FreeDTM(StrangeRock2);
FreeBitmap(LogBitmap);
TerminateScript;
end;
FreeDTM(Plank);
FreeDTM(SpecialLog);
FreeDTM(StrangeRock);
FreeDTM(StrangeRock2);
FreeBitmap(LogBitmap);

U can use AddonTerminate, this will execute when your script gets terminated.

example usage:


begin
SetupSmartClient;
GrabMaps;
Images;
AddonTerminate('FreeImages') // Gets executed when the script stops
SPS_Setup(runescape_other, ['ApeAtollMohoganyCutting']);
Paths;
SetupBot;
repeat
mainloop;
until (Allplayersinactive)

// look at all those LINES I SAVED, sexy :)
end.


Scripts are really simple, there is a lot of if.. then usage. I would like to see more variety, show us that you're more capable than only using if.. then and repeat / until statements.

Also there is no TPA/ATPA usage that you've written yourself. It's ok to use autocolor, but you're not using any homemade TPA functions. Are you able to?

Gonna vote no this time, just keep on learning and apply again when you think you're ready :)

rj

2013-05-04 11:18:41

A little tip, make sure you use ";" at the end of every line, I noticed you use the auto formater so it grouped stuff together like:

  Status := ('Logging in player.') writeln('Logging in player.') HowManyPlayers := 1;

Because you didn't use ";" at the end of the line

Ian

2013-05-04 11:40:06

From: Vinyl Scratch
There aren't any TPAs (Not required, but help alot, especially with what you're doing.)


Actually, TPAs are required.

Remember to read http://villavu.com/forum/showthread.php?t=74195

Vinyl Scratch

2013-05-04 15:40:23

From: BMWxi
Actually, TPAs are required.

Remember to read http://villavu.com/forum/showthread.php?t=74195


Huh. Didn't think they were. Thanks for telling me.

Kevin

2013-05-04 17:58:05

From: Sjoe
He uses the sixhourfix …
and he uses coordclicking for static objects, doesn't make it 'botlike', since he's got enough randomness added.
But we would like to see more SRL Include usage though since they is a whole include for inventory usage.


Could use a TimeMark failsafe here? Since this is a potential infinite loop.
We'd like to avoid the possibility of an infinite loop.


repeat
wait(randomrange(800, 1000));
StaticMakePlanks;
until not (FindBitmapToleranceIn(LogBitmap, x, y, mix1, miy1, mix2, miy2, 30))

same here:

repeat
if FindDepositbox(x, y) then
smart_drawcircle(false, point(x, y), 6, false, clwhite);
ClickMouse2(Mouse_Right);
SMART_ClearCanvas;
ChooseOption('Deposit De');
wait(randomrange(2000, 3000));
until (DepositScreen);

There's an easier way to FreeDTM's:


FreeDTM(Plank);
FreeDTM(SpecialLog);
FreeDTM(StrangeRock);
FreeDTM(StrangeRock2);
FreeBitmap(LogBitmap);
TerminateScript;
end;
FreeDTM(Plank);
FreeDTM(SpecialLog);
FreeDTM(StrangeRock);
FreeDTM(StrangeRock2);
FreeBitmap(LogBitmap);

U can use AddonTerminate, this will execute when your script gets terminated.

example usage:


begin
SetupSmartClient;
GrabMaps;
Images;
AddonTerminate('FreeImages') // Gets executed when the script stops
SPS_Setup(runescape_other, ['ApeAtollMohoganyCutting']);
Paths;
SetupBot;
repeat
mainloop;
until (Allplayersinactive)

// look at all those LINES I SAVED, sexy :)
end.


Scripts are really simple, there is a lot of if.. then usage. I would like to see more variety, show us that you're more capable than only using if.. then and repeat / until statements.

Also there is no TPA/ATPA usage that you've written yourself. It's ok to use autocolor, but you're not using any homemade TPA functions. Are you able to?

Gonna vote no this time, just keep on learning and apply again when you think you're ready :)


This is a pretty accurate rundown of the majority of the issues, and like Sjoe, I shall also be voting no. However, I wish you luck in your further pursuits and possible future applications!

Sawyer

2013-05-04 22:49:04

Alright, thanks guys. I'll re-write and create some more examples of scripts, with my own color finding/ more fail safes. The sixhourcheck I use simply checks for logged in, and if not, it logs your character in. Also, my coord clicking has randomness… doesn't it? :\

Sjoe

2013-05-04 23:09:39

From: Sawyer
Alright, thanks guys. I'll re-write and create some more examples of scripts, with my own color finding/ more fail safes. The sixhourcheck I use simply checks for logged in, and if not, it logs your character in. Also, my coord clicking has randomness… doesn't it? :\


Sounds good, and yeah your coordclick is on a static place, but instead of using coordclick it's better to use SRL's functions.
In this case: InvMouse or MouseItem

Sawyer

2013-05-04 23:29:43

From: Sjoe
Sounds good, and yeah your coordclick is on a static place, but instead of using coordclick it's better to use SRL's functions.
In this case: InvMouse or MouseItem

Okay, thanks :) I do use MMouseItem, don't I?

Sjoe

2013-05-04 23:36:05

From: Sawyer
Okay, thanks :) I do use MMouseItem, don't I?


Yeah you're correct, but now everytime! ;)

The Mayor

2013-05-05 00:45:45

This is a nice attempt Sawyer, well done :) The other pretty much summed it up though. We like to see how you manipulate TPAs/ATPAs for finding things. Also consider having some backups in-case something fails - these make your script run for ages :D

This is purely my own opinion, but I prefer to only read one good script in an app, rather than two scripts that are pretty similar. I suggest you take the feedback given above and rework one of the scripts and use it in your next app. Your activity is good and you seem like a nice guy that is willing to contribute to the community, so I'm confident that you will get in next time :)

Sawyer

2013-05-05 19:21:39

From: The Mayor
This is a nice attempt Sawyer, well done :) The other pretty much summed it up though. We like to see how you manipulate TPAs/ATPAs for finding things. Also consider having some backups in-case something fails - these make your script run for ages :D

This is purely my own opinion, but I prefer to only read one good script in an app, rather than two scripts that are pretty similar. I suggest you take the feedback given above and rework one of the scripts and use it in your next app. Your activity is good and you seem like a nice guy that is willing to contribute to the community, so I'm confident that you will get in next time :)

Thanks :) I'll take all of these suggestions into my next application. I'll make some better scripts when the summer is here, as I will have more time. I've already made my own color finding in several scripts, but I guess I should've applied with them then :p

Ian

2013-05-05 21:00:34

From: Sawyer
Thanks :) I'll take all of these suggestions into my next application. I'll make some better scripts when the summer is here, as I will have more time. I've already made my own color finding in several scripts, but I guess I should've applied with them then :p


Good luck, I look forward to your next app :)

Sawyer

2013-05-05 22:00:20

From: BMWxi
Good luck, I look forward to your next app :)

Thanks :) I'd just like to thank all of you guys for critiquing my application :) I was kinda nervous coming in but you all were very helpful and instructive!