SRL Archive - Archive

punkd - SRL Member Application


punkd

2012-04-11 20:43:01

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
PHP, Flash, Java, Javascript, C++, C#, VB.Net, Coldfusion, etc.


Are you a member of any other communities?
Used to script for RSbuddy from Start-End.


Tell us about yourself…
From: punkd
My Name is Vinnie, 21 from LA, California. Received BA in CSIT (went to college as a hs student also) and currently do private Web design work. I love scripting because it keeps my mind busy. I like to be productive throughout my day. Whether it be writing a script for the community, or lending a hand to someone in need of help. I am not judgmental and I love obstacles. I love being told that I cannot achieve something because that is what keep me trying to prove them wrong. Tell me I cannot do something, I will die trying. (please don't dare me to make a dung script =P). I am a quick learner and have awesome communication skills. I am not one to ignore someone in need of help and encourage others to use my script as an example to write their own and maybe even a better one than mine (I wont be disappointed I promise). I plan on stickin around in the community for a while and hopefully one day become a reputable scripter. I have goals in this community and I'm not stopping until those goals are achieved. I want to perfect SRL and one day become a reliable developer for SRL. Thanks for your time.

As for the script:
I spent many hours on my AIO crafter and hope its up to your standards. Path for task previously setup with if's but Bolshak25 recommended using cases instead. Setup majority of the script with cases including DTM's to use less memory as many DTM's are being used. Some lines in the script may seem useless and pointless but rest assured most are failsafes. The script is somewhat complicated if a single line is altered the script is bound to fail at some point. I have yet to see a proggy less than 6 hours (unless set for certain amount of items to be made). My main goal in scripting is for the script to do its job, Do it right and do it humanlike to prevent user ban. I hope you like my script. Thank you for your time.



Please show us one (or multiple) of your scripts.
{|============================================================================||
|| YouJustGotCrafted ||
|| By Punkd ||
|| ||
|| Instructions: ||
|| Make sure all of your items are in the current visible tab. ||
|| Each activity has its own setup. Look below for more info. ||
|| Make sure all items your making are in same tab ||
|| ||
|| What the script does: ||
|| The Script currently does 4 Activities: ||
|| Makes Golden Jewelry (Gold, Sapphire, Emerald, Ruby Diamond) ||
|| Makes Cannonballs ||
|| Crafts Dragon leather Items (Green, Blue, Red, Black) ||
|| Cuts Gems (Sapphire, Emerald, Ruby, Diamond) ||
|| ||
|| Supported Locations: ||
|| Currently the only supported location is Edgeville But will add ||
|| more in future updates. ||
|| ||
|| Known Bugs: ||
|| None ||
|| ||
|| To do list ||
|| Spin wool ||
|| Glassblower ||
|| Smelt all Bars (w/coal bag support) ||
|| Smith all items ||
|| Post suggestions on thread ||
|| ||
|| ||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|| ||
|| Setting up the script ||
|| ||
||First Fill in your player information in line 113-117(username, pw, pin,etc)||
|| ||
|| We have 4 Activities we can do, I will explain the setup of each briefly. ||
|| ||
|| Crafting Golden Jewelry (lines 106-109): ||
|| Example: ||
|| whatarewedoing := 'Jewelry'; //Must say Jewelry to craft Jewelry ||
|| What := 'Gold'; //Options are Gold, Sapphire, Emerald, Ruby, Diamond ||
|| Item := 'Bracelet'; //Option are Bracelet, Ring, Necklace, Amulet ||
|| Make := 1800; //Total Amount to make before terminating script ||
|| ||
|| ||
|| For Leather Items make sure to only have TANNED visible ||
|| Craft Leather Items (lines 106-109): ||
|| Example: ||
|| whatarewedoing := 'Leather'; //Must say Leather ||
|| What := 'Red'; // Options here are Green, Blue, Red, Black ||
|| Item := 'Body'; // Options here are Vambs, Chaps, Body ||
|| Make := 1800; // Total Amount to make before terminating script ||
|| ||
|| ||
|| Smithing Cannonballs (lines 106-109); ||
|| Example: ||
|| whatarewedoing := 'Cannonball'; // Must say Cannonball ||
|| What := 'Cannonball'; // Must say Cannonball ||
|| Item := 'Cannonball'; // Must Say Cannonball ||
|| Make := 18000; // Total Amount to make before terminating script ||
|| ||
|| ||
|| Cutting Gems (lines 106-109): ||
|| Example: ||
|| whatarewedoing := 'Cutting'; //Must say Cutting ||
|| What := 'Emerald'; //Options are Sapphire, Emerald, Ruby, Diamond ||
|| Item := ''; // Leave Blank ||
|| Make := 9000; // Total Amount to make before terminating script ||
|| ||
|| ||
|| Post feedback on thread and Rep+ if you like! ||
|| ||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||}
program YouJustGotCrafted;


{$DEFINE SMART}
{$Define Crashsmart}
{$i srl/srl/misc/Smart.simba}
{$include srl/srl.simba}
{$Include Sps/sps.simba}
var
StartTime:Integer;
Jewl:Integer;
Item,What:String;
whatarewedoing:string;
x7,y7:integer;
x8,y8:integer;
MPoint:Tpoint;
items, make,xpi,loads:integer;
Bar,Steelbar:Integer;
Thread,Blackleather,Blueleather,Greenleather,Redleather,Body,Chaps,Vambs:Integer;
Sapphire,Emerald,Ruby,Diamond:Integer;
Uncutsapphire,uncutemerald,uncutruby,uncutdiamond:Integer;
XP,Made,XPph,Madeph,loadsph:Integer;

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

whatarewedoing := ''; //Read NFO above
What := ''; //Read NFO above
Item := ''; //Read NFO above
Make := 700; // How many items to make before it stops

with Players[0] do
begin
Name := ''; // Your login here
Pass := ''; // Your Password Here
Nick := ''; // Nickname Here
Active := True;
Pin := ''; // Pin if you have one
Integers[0] := 0;
Integers[1] := 0;
BoxRewards := ['Xp', 'mote', 'ostume'];//Random event prices.
end;
end;// declare players
procedure SetupLogin;
begin
ClearDebug;
Made :=0;
Loads :=0;
Smart_Server := 87;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;



//================================DO NOT TOUCH BEYOND THIS POINT================================
procedure SetDTM;
//Originally set Menu crafting selection with DTM's but pixels would often change so it would occationally fail. Set to Tpoint instead.
begin

//Crafting
case whatarewedoing of
'Jewelry':
begin
Sapphire := DTMFromString('mlwAAAHicY2dgYEgG4iwgzgbiVCCOAeJwII4C4o9A/BaIvwDxDyD+BWWDxDgEQDqYsGJ+BtyAEQ+GAgBqMgn8');
Emerald := DTMFromString('mlwAAAHicY2dgYEgG4iwgzgbiVCCOAeJwII4C4o9A/BaIvwDxDyD+BWWDxDgSOYAkE1bMz4AbMOLBUAAAZEEJ6g==');
Ruby := DTMFromString('mlwAAAHicY2dgYOABYmYGCGAFYj4gFgFiYSBmgYqzAzEvEHND2SAQJMABJJmwYn4G3IARD4YCAGj9AQc=');
Diamond := DTMFromString('mlwAAAHicY2dgYOABYmYGCGAFYj4gFgFiYSBmgYqzAzEvEHND2SBQXVoMJJmwYn4G3IARD4YCAMBFAgA=');
Bar := DTMFromString('mbQAAAHicY2VgYOBlgAAZIBaF8jmBmAeI2YBYAIjFgHhpiwSQZELBIgyYgBELBgMAiAgB9A==');
end;

'Cannonball':
begin
Steelbar := DTMFromString('mbQAAAHicY2VgYOCFYlEglmGAAGYgFgBiLiifDYiTY6OAJBMKFmHABIxYMBgAAHXeAa8=');
end;

'Leather':
begin
Blackleather := DTMFromString('mrAAAAHic42BgYJjLzMCwEooXAfEMIJ4IxL1A3A/EZ4FqTgLxRSC+DcXXgfg8EJ8CYgkZCSDJhBNzMeAHjAQwDAAARd4L8A==');
Blueleather := DTMFromString('mrAAAAHic42BgYJjLzMCwEooXAfEMIJ4IxL1A3A/EZ4FqTgLxRSC+DcXXgfg8EJ8CYg4eLyDJhBNzMeAHjAQwDAAATNoMAg==');
Greenleather := DTMFromString('mrAAAAHic42BgYJjLzMCwEooXAfEMIJ4IxL1A3A/EZ4FqTgLxRSC+DcXXgfg8EJ8CYg4bDiDJhBNzMeAHjAQwDAAARd4L8A==');
Redleather := DTMFromString('mrAAAAHic42BgYJjLzMCwEooXAfEMIJ4IxL1A3A/EZ4FqTgLxRSC+DcXXgfg8EJ8CYkseDiDJhBNzMeAHjAQwDAAARnYL8Q==');
Thread := DTMFromString('mlwAAAHicY2dgYOAFYjYgZmaAABBfGIhFgZgFKsYBxPxQcS4gZgTiKV09QJIJK+ZiwA0Y8WAoAADfNwJT');
Body := DTMFromString('mFQEAAHicncxJCoBAEEPRtCOIrSiCwy36CN7/UPrFbNypgbdIQSpK6tCgwoANq02IqBF0J0fvnvlWosWI2dvF/fpfIO3Ji/cOfU/44ZETHJQDHQ==');
Chaps := DTMFromString('mrAAAAHic42BgYHgGxK+R8EsgfgjED4D4PhB/hoq9g7L/Q/EXIH4DxBw8HECSCScGqcUHGAlgGAAAUkgQBQ==');
Vambs := DTMFromString('mwQAAAHic42RgYBBiZGCQBWJFIJYHYnEg5gNiNiT8CqjuGRC/BeJPQPwRiL8B8Xcg/gDEL4FY08ALSDLhxf8ZCANGIjAcAACgTAra');
end;

'Cutting':
begin
uncutsapphire := DTMFromString('mrAAAAHic42BgYMhhYmBIBOIkIE4B4mwgLgLiMiAuBeKnQDUPgfgFEL8D4g9Q/AqIHwExh0A2kGTCibkY8ANGAhgGAMd5C18=');
uncutemerald := DTMFromString('mrAAAAHic42BgYMhhYmBIBOIkIE4B4mwgLgLiMiAuBeKnQDUPgfgFEL8D4g9Q/AqIHwExR6oAkGTCifkZ8ANGAhgGAMbSC14=');
uncutruby := DTMFromString('mrAAAAHic42BgYMhhYmBIBOIkIE4B4mwgLgLiMiAuBeKnQDUPgfgFEL8D4g9Q/AqIHwFxkAAHkGTCifkZ8ANGAhgGAL9/C0s=');
uncutdiamond := DTMFromString('mlwAAAHicY2dgYMhhYmBIBOIkIE4B4mwgLgLiMiB+CpR/CMQvgPgdEH+A4ldA3NPVAySZsGJ+BtyAEQ+GAgDZBgsm');
end;
end;
end;

procedure FreeemahdDTM;
begin
case whatarewedoing of
'Cannonball':
begin
FreeDTM(Steelbar);
end;
'Jewelery':
begin
FreeDTM(Bar);
FreeDTM(Sapphire);
FreeDTM(Emerald);
FreeDTM(Ruby);
FreeDTM(Diamond);
end;
'Leather':
begin
FreeDTM(Blackleather);
FreeDTM(Blueleather);
FreeDTM(Greenleather);
FreeDTM(Redleather);
FreeDTM(Body);
FreeDTM(Vambs);
FreeDTM(Chaps);
FreeDTM(Thread);
end;
'Cutting':
begin
FreeDTM(uncutsapphire);
FreeDTM(uncutemerald);
FreeDTM(uncutruby);
FreeDTM(uncutdiamond);
end;
end;
end;

//Permission From Flight =)
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,A,Dist,MP: integer;
begin
A := 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-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
SuperWindMouse(X, Y, X2, Y2, 9, 5, 10.0 / randSpeed, 15.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
end;

//Using cases for path was advice from Bolshak25
Procedure Gempath;
begin
if whatarewedoing = 'Cutting' then
case What of
'Sapphire':
begin
Jewl := uncutsapphire;
xpi := 50;
end;
'Emerald':
begin
Jewl := uncutemerald;
xpi := 68;
end;
'Ruby':
begin
Jewl := uncutruby;
xpi := 85;
end;
'Diamond':
begin
Jewl := uncutdiamond;
xpi := 108;
end;
end;
items := 28;
end;


Procedure Leatherpath;
begin
if whatarewedoing = 'Leather' then
case What of
'Red':
begin
Jewl := Redleather;
case Item of
'Chaps':
begin
MPoint := Point(353, 422);
items := 13;
xpi := 156;
end;
'Body':
begin
MPoint := Point(163, 427);
items := 9;
xpi := 234
end;
'Vambs':
begin
MPoint := Point(257, 427);
items := 27;
xpi := 78;
end;
end;
end;

'Black':
begin
Jewl := Blackleather;
case Item of
'Chaps':
begin
MPoint := Point(353, 422);
items := 13;
xpi := 172;
end;
'Body':
begin
MPoint := Point(163, 427);
items := 9;
xpi := 258;
end;
'Vambs':
begin
MPoint := Point(257, 427);
items := 27;
xpi := 86;
end;
end;
end;

'Blue':
begin
Jewl := Blueleather;
case Item of
'Chaps':
begin
MPoint := Point(353, 422);
items := 13;
xpi := 140;
end;
'Body':
begin
MPoint := Point(163, 427);
items := 9;
xpi := 210;
end;
'Vambs':
begin
MPoint := Point(257, 427);
items := 27;
xpi := 70;
end;
end;
end;

'Green':
begin
Jewl := GreenLeather;
case Item of
'Chaps':
begin
MPoint := Point(353, 422);
items := 13;
xpi := 124;
end;
'Body':
begin
MPoint := Point(163, 427);
items := 9;
xpi := 186
end;
'Vambs':
begin
MPoint := Point(257, 427);
items := 27;
xpi := 62;
end;
end;
end;
end;
end;


procedure JewelryPath;
begin

//Gold
if whatarewedoing = 'Jewelry' then
begin
case What of
'Gold':
begin
items := 28;
Jewl := Bar;
case Item of
'Bracelet':
begin
MPoint := Point(130, 290);
xpi := 25;
end;
'Ring':
begin
MPoint := Point(117, 106);
xpi := 15;
end;
'Necklace':
begin
MPoint := Point(136, 167);
xpi := 20;
end;
'Amulet':
begin
MPoint := Point(130, 230);
xpi := 30;
end;
end;
end;



//Sapphire
'Sapphire':
begin
items := 14;
Jewl := Sapphire;
case Item of
'Bracelet':
begin
MPoint := Point(182, 287);
xpi := 60;
end;
'Ring':
begin
MPoint := Point(166, 102);
xpi := 40;
end;
'Necklace':
begin
MPoint := Point(181, 166);
xpi := 55;
end;
'Amulet':
begin
MPoint := Point(182, 226);
xpi := 65;
end;
end;
end;


//Emerald

'Emerald':
begin
items := 14;
Jewl := Emerald;
case item of
'Bracelet':
begin
MPoint := Point(232, 287);
xpi := 65;
end;
'Ring':
begin
MPoint := Point(205, 101);
xpi := 55;
end;
'Necklace':
begin
MPoint := Point(231, 164);
xpi := 60;
end;
'Amulet':
begin
MPoint := Point(232, 226);
xpi := 70;
end;
end;
end;


//Ruby
'Ruby':
begin
items := 14;
Jewl := Ruby
case item of
'Bracelet':
begin
MPoint := Point(282, 288);
xpi := 80;
end;
'Ring':
begin
MPoint := Point(256, 102);
xpi := 70;
end;
'Necklace':
begin
MPoint := Point(281, 166);
xpi := 75;
end;
'Amulet':
begin
MPoint := Point(280, 226);
xpi := 85;
end;
end;
end;

//Diamond

'Diamond':
begin
items := 14;
Jewl := Diamond;
case item of
'Bracelet':
begin
MPoint := Point(332, 288);
xpi := 95;
end;
'Ring':
begin
MPoint := Point(300, 102);
xpi := 85;
end;
'Necklace':
begin
MPoint := Point(333, 166);
xpi := 90;
end;
'Amulet':
begin
MPoint := Point(332, 226);
xpi := 100;
end;
end;
end;
end;
end;
if whatarewedoing = 'Cannonball' then
begin
case what of
'Cannonball':
begin
Items := 112;
Jewl := SteelBar;
case item of
'Cannonball':
begin
MPoint := Point(258,426);
xpi := 7;
end;
end;
end;
end;
end;
end;


Procedure walktobank;
begin
SPS_WalkToPos(Point(4224, 2663));
wait(500 + random(200));
repeat
wait(500);
until(Not IsMoving);
end;

Procedure walktofurnace;
begin
SPS_WalkToPos(Point(4277, 2641));
wait(500 + random(200));
repeat
wait(500);
until(Not IsMoving);
end;

Procedure FindFurnace; //Uses TPA to find furnace. Setup seperatly incase you ever want to add your own furnace.

var
Furnace : TPointArray;
Furn : TPoint;
x, y, i : Integer;

begin
x := MSCx;
y := MSCy;
FindColorsSpiralTolerance(x, y, Furnace, 1055884, 300, 0, MSx2, MSy2, 12);
if Length(Furnace) = 0 then FindColorsSpiralTolerance(x, y, Furnace, 1055884, 335, 0, MSX2, MSY2, 12);
for i := 0 to High(Furnace) do
begin
Furn := Furnace[i]
HumanMMouse (Furn.x, Furn.y, 3, 3);
if (IsUpTextMultiCustom(['urnace', 'Furnace'])) then
begin
GetMousePos(x7, y7);
Exit;
end;
Wait(350+random(350));
end;
end;

Procedure Findbanker; //Uses TPA to find furnace. Setup seperatly incase you ever want to add your own banking.
var
Banker : TPointArray;
Bank : TPoint;
x, y, i : Integer;

begin
x := MSCx;
y := MSCy;
FindColorsSpiralTolerance(x, y, Banker, 3218465, MSx1, MSy1, MSx2, MSy2, 4);
if Length(Banker) = 0 then FindColorsSpiralTolerance(x, y, Banker, 3218465, MSX1, MSY1, MSX2, MSY2, 4);
for i := 0 to High(Banker) do
begin
Bank := Banker[i]
HumanMMouse (Bank.x, Bank.y, 3, 3);
if (IsUpTextMultiCustom(['anker', 'Banker'])) then
begin
GetMousePos(x8, y8);
Exit;
end;
Wait(350+random(350));
end;
end;

Procedure Gemwithdrawal;
var
x0,y0,attempt2:Integer;
begin
if not bankscreen then
exit;
if bankscreen then
begin
wait(1000);
DepositAll;
if invempty then
begin
if FindDTM(jewl,x0,y0,MBX1,MBy1,MBX2,MBY2) then
begin
attempt2 := 0;
repeat
humanmmouse(x0,y0,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-all', 'w-A'], 1000)
wait(1500);
attempt2 := attempt2 + 1;
if (invcount > 28) then
begin
Gemwithdrawal;
exit;
end;
until(invcount = 28) or (attempt2 = 5);
if attempt2 = 5 then
begin
closebank;
logout;
FreeeMahdDTM;
writeln ('Looks like were out of gems');
terminatescript;
end;
end;
end;
end;
if not invfull then
Gemwithdrawal;
if invfull then
begin
closebank;
end;
end;

Procedure LeatherWithdrawal;
var
x0,y0,x,y,x2,y2,attempt,Attempt2:Integer;
begin
if not bankscreen then
exit;
if bankscreen then
begin
wait(1000);
if invempty then
begin
if FindDTM(Thread,x2,y2,MBX1,MBy1,MBX2,MBY2) then
begin
humanmmouse(x2,y2,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-all', 'w-A'], 1000)
wait(1500);
end;
end else
if FindDTM(vambs,x,y,mix1,miy1,mix2,miy2) or FindDTM(body,x,y,mix1,miy1,mix2,miy2) or FindDTM(chaps,x,y,mix1,miy1,mix2,miy2) then
begin
attempt := 0
repeat
humanmmouse(x,y,6,6);
ClickMouse2(false);
WaitOptionMulti(['Deposit-All', 'Deposit'], 1500)
wait(1500)
attempt := attempt + 1;
if attempt = 5 then
Depositall;
Leatherwithdrawal;
until not FindDTM(vambs,x,y,mix1,miy1,mix2,miy2) or FindDTM(body,x,y,mix1,miy1,mix2,miy2) or FindDTM(chaps,x,y,mix1,miy1,mix2,miy2) or (attempt = 5);
end else
begin
Attempt2 := 0
if FindDTM(Jewl,x0,y0,MBX1,MBy1,MBX2,MBY2) then
begin
repeat
humanmmouse(x0,y0,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-all', 'w-A'], 1000)
wait(1500);
Attempt2 := Attempt2 + 1;
until(invcount = 28) or (attempt2 = 5);
if Attempt2 = 5 then
begin
Writeln ('I guess were out of leather');
Closebank;
logout;
FreeeMahdDTM;
terminatescript;
end;
end;
end;
end;
if not invfull then
Leatherwithdrawal;
if invfull then
begin
closebank;
end;
end;


procedure JewelWithdrawal;
var
x,y,x2,y2,attempt2:Integer;
begin
if not bankscreen then
exit;
if bankscreen then
begin
if whatarewedoing = 'Leather' then
begin
Leatherwithdrawal;
end else
begin
if what = 'Cannonball' then
begin
wait(1000);
DepositAll;
Attempt2 := 0;
if FindDTM(Steelbar,x,y,MBX1,MBy1,MBX2,MBY2) then
begin
repeat
humanmmouse(x,y,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-all', 'w-A'], 1000)
WaitFunc(@InvFull, 1500, 4000);
if not invfull then
begin
Attempt2 := attempt2 + 1;
depositall;
end;
until (invcount = 28) or (attempt2 = 5);
if attempt2 = 5 then
begin
Writeln('looks like were out of Steel Bars');
closebank;
logout;
FreeeMahdDTM;
terminatescript;
end;
end;
end else

if what = 'Gold' then
begin
Attempt2 := 0;
wait(1000);
depositall;
if FindDTM(bar,x,y,MBX1,MBy1,MBX2,MBY2) then
begin
repeat
humanmmouse(x,y,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-all', 'w-A'], 1000)
WaitFunc(@InvFull, 1500, 4000);
if not invfull then
begin
Attempt2 := attempt2 + 1;
depositall;
end;
until (invcount = 28) or (attempt2 = 5);
if attempt2 = 5 then
begin
Writeln('looks like were out of bars');
closebank;
logout;
FreeeMahdDTM;
terminatescript;
end;
end;
end else
begin
attempt2 := 0;
repeat
if FindDTM(bar,x,y,MBX1,MBy1,MBX2,MBY2) then
begin
wait(1000);
DepositAll;
humanmmouse(x,y,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-14'], 1500)
wait(1500);
if (invcount > 14) then
begin
Jewelwithdrawal;
exit;
end;
if invcount = 14 then
begin
FindDTM(jewl,x2,y2,MBX1,MBy1,MBX2,MBY2);
humanmmouse(x2,y2,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-14'], 1000)
wait(2000);
WaitFunc(@InvFull, 1500, 4000);
if not invfull then
begin
Attempt2 := attempt2 + 1;
depositall;
end;
end;
end;
until (invcount = 28) or (attempt2 = 5);
if attempt2 = 5 then
begin
Writeln('looks like were out of Bars or Gems');
closebank;
logout;
FreeeMahdDTM;
terminatescript;
end;
end;
end;
if not invfull then
Jewelwithdrawal;
if invfull then
begin
closebank;
end;
end;
end;

Procedure Leatherbanker;
var
t:integer;
begin
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if bankscreen then
exit;
if not bankscreen then
if whatarewedoing = 'Leather' then
begin
findnormalrandoms;
FindBanker;
if (IsUpTextMultiCustom(['anker', 'Banker'])) then
begin
GetMousePos(x8,y8);
Mouse(x8,y8,1,1,false);
WaitOptionMulti(['Bank Banker'], 300)
if DidRedClick then
begin
MarkTime(t);
repeat
wait(1000);
if TimeFromMark(t) > 7000 then
begin
Leatherbanker;
exit;
end;
until(PinScreen or BankScreen);
end;
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if BankScreen then
LeatherWithdrawal;
end;
end;
end;

procedure Gembanking;
var
t:Integer;
begin
Findnormalrandoms;
FindBanker;
if (IsUpTextMultiCustom(['anker', 'Banker'])) then
begin
GetMousePos(x8,y8);
Mouse(x8,y8,1,1,false);
WaitOptionMulti(['Bank Banker'], 300)
if DidRedClick then
begin
MarkTime(t);
repeat
wait(100);
if TimeFromMark(t) > 7000 then
begin
gemBanking;
exit;
end;
until(PinScreen or BankScreen);
end;
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if BankScreen then
exit;
end;
end;

procedure Bank;
var
t:Integer;
begin
if whatarewedoing = 'Leather' then
begin
Leatherbanker;
end else
if bankscreen then
begin
exit;
end;
Findnormalrandoms;
walktobank;
FindBanker;
if (IsUpTextMultiCustom(['anker', 'Banker'])) then
begin
GetMousePos(x8,y8);
Mouse(x8,y8,1,1,false);
WaitOptionMulti(['Bank Banker'], 300)
if DidRedClick then
begin
MarkTime(t);
repeat
wait(100);
if TimeFromMark(t) > 7000 then
begin
Bank;
exit;
end;
until(PinScreen or BankScreen);
end;
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if BankScreen then
Jewelwithdrawal;
end;
end;



procedure CraftJewelry;
var
x4,y4,x5,y5,t,inv1:Integer;

begin
Findnormalrandoms;
if item = 'Cannonball' then
begin
if not FindDTM(SteelBar, x4, y4, MIX1, MIY1, MIX2, MIY2) then
begin
exit;
end;
end else
if not FindDTM(bar, x4, y4, MIX1, MIY1, MIX2, MIY2) then
begin
exit;
end;

begin
walktofurnace;
FindFurnace;
if (IsUpTextMultiCustom(['urnace', 'Furnace'])) then
GetMousePos(x7,y7);
begin
if not invfull then
begin
walktobank;
bank;
Jewelwithdrawal;
end;
begin if FindDTM(steelBar, x4, y4, MIX1, MIY1, MIX2, MIY2) or FindDTM(Bar, x4, y4, MIX1, MIY1, MIX2, MIY2)then
begin
Humanmmouse(x4,y4,7,7);
ClickMouse2(True);
Mouse(x7,y7,10,10,False);
waitoptionmulti(['-> Furnace'], 300);
if DidRedClick then
begin
if what = 'Cannonball' then
begin
if WaitColor(258,417,2171945,15,4000) then
begin
wait(1500);
HumanMMouse(MPoint.X, MPoint.Y, 7, 7);
ClickMouse2(true);
waitoptionmulti(['All'], 300)
if what = 'Cannonball' then
begin
MarkTime(t);
repeat
wait(1000);
case random(300) of
0..10: HoverSkill(SKILL_SMITHING,False);
25..30: PickUpMouse;
end;
until(Invcount < 2) or (TimeFromMark(t) > 180000);
made := made + items;
Loads := Loads + 1;
gametab (25);
exit;
end;
end;
end else
if WaitColor(129,287,2216951,12,4000) then
begin
wait(1500);
begin
repeat
HumanMMouse(MPoint.X, MPoint.Y, 7, 7);
ClickMouse2(false);
waitoptionmulti(['All'], 800);
wait(1000)
until Not WaitColor(129,287,2216951,12,4000);
Marktime(t)
end;
begin
if what = 'Gold' then
begin
repeat
wait(1000);
case random(300) of
25..30: PickUpMouse;
end;
until not FindDTM(Bar, x5, y5, 685, 429, 719, 460) or (TimeFromMark(t) > 52000);
gametab (25);
if not FindDTM(Bar, x4, y4, MIX1, MIY1, MIX2, MIY2)then
made := made + Items;
Loads := Loads + 1;
exit;
end else
repeat
wait(1000);
case random(300) of
0..10: HoverSkill(SKILL_CRAFTING,False);
25..30: PickUpMouse;
end;
until(invcount < 15) or (TimeFromMark(t) > 26000);
end;
end;
Inv1 := InvCount;
if invcount < 15 then
begin
Made := Made + Items;
Loads := Loads + 1;
exit;
end else
CraftJewelry;
end;
end;
end;
end;
end;
end;

Procedure Leatherworks;
var
x4,y4,x5,y5,t:Integer;
begin
Leatherpath;
findnormalrandoms;
if not FindDTM(thread, x5,y5,mix1,miy1,mix2,miy2) then
begin
Leatherbanker;
end else
if FindDTM(Jewl, x4, y4, MIX1, MIY1, MIX2, MIY2) then
begin
Humanmmouse(x4,y4,7,7)
ClickMouse2(True);
begin
if WaitColor(349,347,7044492,10,2000) then
begin
wait(2000);
HumanMMouse(MPoint.X, MPoint.Y, 7, 7);
ClickMouse2(true);
MarkTime(t);
repeat
wait(1000);
case random(300) of
0..10: PickUpMouse;
end;
until not (FindDTM(Jewl, x5, y5, 635, 429, 685, 460)) or (timefrommark(t) > 52000);
wait(1500)
made := made + items;
Loads := Loads + 1;
gametab (25);
exit;
end else
if WaitColor(326,430,4346202,15,2000) then
begin
Humanmmouse(257, 430, 7, 7);
clickmouse2(true);
end;
begin
if WaitColor(349,347,7044492,10,2000) then
wait(2000);
HumanMMouse(MPoint.X, MPoint.Y, 7, 7);
ClickMouse2(true);
MarkTime(t);
repeat
wait(1000);
case random(300) of
0..10: PickUpMouse;
end;
until not (FindDTM(Jewl, x5, y5, 635, 429, 685, 460)) or (timefrommark(t) > 52000);
wait(1500)
made := made + items;
Loads := Loads + 1;
gametab (25);
exit;
end;
end;
Loads := Loads + 1;
end else
Leatherbanker;
end;

Procedure cutgems;
var
x4,y4,x5,y5,t:Integer;
begin
Gempath;
findnormalrandoms;
if FindDTM(Jewl, x4, y4, MIX1, MIY1, MIX2, MIY2) then
begin
humanmmouse(x4,y4,7,7)
ClickMouse2(True);
begin
if WaitColor(349,347,7044492,10,3000) then
begin
wait(500);
HumanMMouse(257, 430, 10, 10);
ClickMouse2(true);
MarkTime(t);
repeat
wait(1000);
case random(300) of
0..10: PickUpMouse;
end;
until not FindDTM(Jewl, x5, y5, 685, 429, 719, 460) or (timefrommark(t) > 20000);
made := made + items;
Loads := Loads + 1;
gametab (25);
exit;
end;
end;
end else
Gembanking;
end;



procedure Proggy;
begin
XP := (xpi * made);
XPph := ((XP * 3600) / (GetTimeRunning / 1000));
Madeph := ((made * 3600) / (GetTimeRunning / 1000));
Loadsph := ((Loads * 3600) / (GetTimeRunning / 1000));

writeLn('========YouJustGotCrafted==========');
writeLn('Time: ' + TimeRunning);
writeLn('Items Total: ' + IntToStr(Made));
writeLn('XP: ' + IntToStr(XP));
writeLn('Items/h: ' + IntToStr(Madeph));
writeLn('XP/h: ' + IntToStr(XPph));
writeLn('Loads: ' + IntToStr (Loads));
writeLN('Loads/h: ' + IntToStr (Loadsph));

end;

Procedure lowcase;
Begin
Case Lowercase (whatarewedoing)of
'leather' : whatarewedoing := 'Leather';
'jewelry', 'jewelery' : whatarewedoing := 'Jewelry';
'cut', 'cutting' : whatarewedoing := 'Cutting';
'cannon', 'cannonball' : whatarewedoing := 'Cannonball';
end;
Case lowercase (what) of
'gold' : what := 'Gold';
'sapphire' : what := 'Sapphire';
'emerald' : what := 'Emerald';
'ruby' : what := 'Ruby';
'diamond' : what := 'Diamond';
'green' : what := 'Green';
'blue' : what := 'Blue';
'red' : what := 'Red';
'black' : what := 'Black';
'cannonball' , 'cannon' : what := 'Cannonball';
end;
case lowercase (item) of
'ring' : item := 'Ring';
'bracelet' : item := 'Bracelet';
'amulet' : item := 'Amulet';
'necklace', 'necklase' : item := 'Necklace';
'vambs' : item := 'Vambs';
'body', 'bodys' : item := 'Body';
'chap', 'chaps' : item := 'Chaps';
'cannonball' , 'cannon' : item := 'Cannonball';
end;

end;

Procedure mainloopjewelry;
begin
repeat
Findnormalrandoms;
if not invfull then
Bank;
Jewelwithdrawal;
CraftJewelry;
Proggy;
if invfull then
CraftJewelry;
Proggy;
Bank;
Jewelwithdrawal;
until(false) or (Made >= Make);
logout;
FreeeMahdDTM;
proggy;
writeln ('Made all your items');
terminatescript;
end;

Procedure mainloopleather;
begin
if whatarewedoing = 'Leather' then
begin
repeat
Findnormalrandoms;
if not invfull then
Leatherbanker;
Leatherwithdrawal;
Leatherworks;
Proggy;
if invfull then
Leatherworks;
Proggy;
Leatherbanker;
Leatherwithdrawal;
until(false) or (Made >= Make);
logout;
FreeeMahdDTM;
proggy;
writeln ('Made all your items');
terminatescript;
end else
exit;
end;

Procedure mainloopcutting;
begin
if whatarewedoing = 'Cutting' then
begin
repeat
Findnormalrandoms;
Gembanking;
Gemwithdrawal;
Cutgems;
Proggy;
until(false) or (Made >= Make);
logout;
FreeeMahdDTM;
proggy;
writeln ('Made all your items');
terminatescript;
end else
exit;
end;



begin
ClearDebug;
SetupLogin;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Lowcase;
SetDTM;
Gempath;
Leatherpath;
Jewelrypath;
StartTime:=GetSystemTime;
if LoggedIn then
wait(1500);
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(runescape_surface, ['10_6']);
wait(1500)
ClickNorth(SRL_ANGLE_HIGH);

//Thank you Frement
case whatarewedoing of
'Cutting': begin
mainloopcutting;
writeln('Cutting: ' + Item);
end;
'Leather': begin
mainloopleather;
writeln('Crafting: '+ whatarewedoing);
end;
'Jewelry': begin
mainloopjewelry;
writeln('Crafting: '+ whatarewedoing);
end;
'Cannonball': begin
mainloopjewelry;
writeln('Smithing: '+ whatarewedoing);
end;
end;
logout;
FreeeMahdDTM;
terminatescript;
end.

Awkwardsaw

2012-04-11 21:05:06

My biggest thing is still all of your banking functions, but its not that big of a deal I guess. I won't vote for now though, I'll edit when I do. :)

Sin

2012-04-11 21:17:56

Standards are bugging me, but you can work on that later on.


Procedure mainloopjewelry;
begin
repeat
Findnormalrandoms;
if not invfull then
Bank;
Jewelwithdrawal;
CraftJewelry;
Proggy;
if invfull then
CraftJewelry;
Proggy;
Bank;
Jewelwithdrawal;
until(false) or (Made >= Make);
logout;
FreeeMahdDTM;
proggy;
writeln ('Made all your items');
terminatescript;
end;

What's missing there ? :P

Yes from me ^.^

E*
Btw, NEVER use until False, always use until (Not LoggedIn) or until (AllPlayersInactive).

Er1k

2012-04-11 22:22:39

I will just give you a yes considering how sin was pissed with your script earlier and you didn't fight with him big time, even he tried very hard to taunt you. Your attitude is good.

Good luck.

Sin

2012-04-11 22:24:28

From: Er1k
I will just give you a yes considering how sin was pissed with your script earlier and you didn't fight with him big time, even he tried very hard to taunt you. Your attitude is good.

Good luck.


You're sorely mistaken.

bolshak25

2012-04-11 22:41:40

 if FindDTM(Thread,x2,y2,MBX1,MBy1,MBX2,MBY2) then
humanmmouse(x2,y2,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-all', 'w-A'], 1000)
wait(1500);

it looks like youre missing the begin and end in that.
Right now if it finds the dtm it will do humanmouse then move to the others, but if it isnt found, it will start at clickmouse2 and do the rest of those.

You should go through and make sure you have the begins and ends after your if then statements if they are multiple lines.

Im holding my yes vote until you fix that tiny little thing. But it looks good otherwise

punkd

2012-04-11 23:51:01

From: Awkwardsaw
My biggest thing is still all of your banking functions, but its not that big of a deal I guess. I won't vote for now though, I'll edit when I do. :)


Awkwardsaw, I will fix that in the next official update Since the scripts performance is not based on it. =)

From: Sin
Standards are bugging me, but you can work on that later on.


Procedure mainloopjewelry;
begin
repeat
Findnormalrandoms;
if not invfull then
Bank;
Jewelwithdrawal;
CraftJewelry;
Proggy;
if invfull then
CraftJewelry;
Proggy;
Bank;
Jewelwithdrawal;
until(false) or (Made >= Make);
logout;
FreeeMahdDTM;
proggy;
writeln ('Made all your items');
terminatescript;
end;

What's missing there ? :P

Yes from me ^.^

E*
Btw, NEVER use until False, always use until (Not LoggedIn) or until (AllPlayersInactive).


^.^ hehe thank you and yeah, I realized the false a while ago, I'm going to change it in the official script update for now it doesn't change the performance since the other failsafes are active =)

From: Er1k
I will just give you a yes considering how sin was pissed with your script earlier and you didn't fight with him big time, even he tried very hard to taunt you. Your attitude is good.

Good luck.


Er1k, me and sin have talked it out and put our differences aside since we both have goals in this community. Sins a great person and a awesome scripter too! Thank you for your vote Er1k! It means alot!

From: bolshak25
 if FindDTM(Thread,x2,y2,MBX1,MBy1,MBX2,MBY2) then
humanmmouse(x2,y2,1,1);
clickmouse2(false);
WaitOptionMulti(['Withdraw-all', 'w-A'], 1000)
wait(1500);

it looks like youre missing the begin and end in that.
Right now if it finds the dtm it will do humanmouse then move to the others, but if it isnt found, it will start at clickmouse2 and do the rest of those.

You should go through and make sure you have the begins and ends after your if then statements if they are multiple lines.

Im holding my yes vote until you fix that tiny little thing. But it looks good otherwise


Bolshak25, I'll get that fixed now, thank you for pointing it out. Were only human =P.

EtherFreak

2012-04-12 00:39:45

AHHH STATIC WAIT TIMES AHHH…

That being said, I am still voting yes. I like that you told us about yourself in some detail, you seem motivated, and willing to learn from others, and you have a script that needs a few small tweeks to be perfect.

punkd

2012-04-12 00:44:29

From: EtherFreak
AHHH STATIC WAIT TIMES AHHH…

That being said, I am still voting yes. I like that you told us about yourself in some detail, you seem motivated, and willing to learn from others, and you have a script that needs a few small tweeks to be perfect.


=P wait times are just small changes to randomize. Thank you etherfreak! =D

Er1k

2012-04-12 01:05:28

From: Sin
You're sorely mistaken.


It matters not anymore anyway. I was quite amazed at the fact that he wasn't quite irritated that time at all :)

BobboHobbo

2012-04-12 05:39:46

Im voting yes, I can see the time spent on this script, Script is decent, good attitude, Good luck :).

Jakkle

2012-04-12 18:03:06

Right, I will start with my vote.
Your script as a whole, plus your attitude and activity I'm voting yes ;)

Your standards tho are off in areas, easy to sort out :p

// When using an if-then query make sure you do it like this.
if (FindBanker) then
begin
whatever;
whatever;
whatever;
end;

// And not like this
if (FindBanker) then
whatever;
whatever;
whatever;

// When you see people not using begin its because they are only using 1
// procedure or function after the query, like this.
if (not LoggedIn) then
Exit;

or

if (FindTree) then
Break;

or

if (FindGem) then
Continue;

// After you have done say.
if (not LoggedIn) then
Exit;
// Then a space followed with the next thing you want to do making sure it's in line with 'if'
FindNormalRandoms;
t := FindTree(blah, blah, blah);
if (t) then
begin
whatever;
whatever;
end;
// Like that.

I hope it helps you a little, good luck :)

punkd

2012-04-12 18:07:33

Thank you Jackie! I am planning on fixing all problems in my next update. Thank you for the advice :)

Sir Ducksworthy

2012-04-13 01:12:49

I voted yes of course ;)

punkd

2012-04-13 06:01:54

Leetsxc, Lets not go back to that. Me and sin have talked it out we both had blame. Thank you for the vote but please I don't want it based on that =\

Sir Ducksworthy

2012-04-13 11:13:57

No way lol,
I voted because of your Longitude and Activity Meter :)
+ Your scripting ability.

Sin

2012-04-13 14:29:32

From: leetsxc
No way lol,
I voted because of your Longitude and Activity Meter :)
+ Your scripting ability.


Can you be a bit more clear..?

'Toxin

2012-04-13 17:53:08

I want to believe that you have what it takes to actually fix up all the issues arised above previously from all the members, not only that, but that you've also learned a thing or two about a trick here and there, do's and don'ts…

Anyway, my vote is going to be a yes :) You seem to have put a decent amount of time into this thing, and you're fairly active around here. Good luck.

punkd

2012-04-13 18:34:15

[QUOTE='Toxin;988770]I want to believe that you have what it takes to actually fix up all the issues arised above previously from all the members, not only that, but that you've also learned a thing or two about a trick here and there, do's and don'ts…

Anyway, my vote is going to be a yes :) You seem to have put a decent amount of time into this thing, and you're fairly active around here. Good luck.

:D thank you Toxin. Yeah I'm quick to try out advice and see how it reflects on performance. Thank you for your vote and I hope to work with you guys in the future!

Rich

2012-04-29 07:42:44

Time to make punkd a Member?

YoHoJo

2012-05-02 00:55:17

In the guy?

WT-Fakawi

2012-05-03 17:08:20

In in in!