SRL Archive - First Scripts

Pest Crafter


bloodargon

2008-03-26 21:42:19

Well, this is my first script, very specific function, and only a few failsafes.

Crafts green dragonhide bodies at pest control bank (hide color and body color can be changed, but, it uses coords for the 'type' of item.) Hides in second slot of bank.

Its only got failsafes to open the bank window, and make sure its at the top, so, at least it wont withdraw random junk. Can set how many bodies to make and gives a basic proggy, based on time, bodies made, and XP gained. Also prints out how many bodies each time, so, works excellent with SMART (pre-formated to run with, but pause script when you start to login / pin.)
Start with hides out.

Known Bugs :
-Picks same bank color over and over, even if its not the correct object, and will right click, move off, right click, move off. Pretty much stops production.
-Wears a bodie since it cant bank them due to lag, then uses needle on bank booth, so wont bank.

Thats about it, download to rip apart / modify, whatever.

Proggies…

Finished Crafting
Worked for 1 Hours, 30 Minutes and 15 Seconds and crafted 1104 bodies.
For a total of 198720 XP
Successfully executed

Finished Crafting
Worked for 1 Hours, 9 Minutes and 39 Seconds and crafted 840 bodies.
For a total of 151200 XP
Successfully executed

Finished Crafting
Worked for 56 Minutes and 51 Seconds and crafted 656 bodies.
For a total of 118080 XP
Successfully executed

permy

2008-03-27 12:18:35

nice first script bit of work and could become very handy to have around

thanks =]

jelmer gf

2008-03-27 12:42:31

nice first script

bloodargon

2008-03-27 15:03:17

Thanks guys. My main effort was I was going for 99 crafting, and, couldnt find a decent craft script even in the Jr forums, so, I made my own. I might update it with some failsafes, and such, but, most likely not. If you do happen to modify it, let me know with a PM. Always wanted to learn :)

Timer

2008-03-27 16:25:04

great first script…

try more randoms.
fail safes.
and standrds… and your on your way!

Pwnt by Pwnt

2008-03-28 03:09:18

^^ really good for a first script keep it up xD

ShowerThoughts

2008-03-28 03:10:46

i saw the proggy's so it looks good but you better standardize your script more ;)

Pwnt by Pwnt

2008-03-28 03:13:09

yeah… standards are the biggest problem :\ and a lot of people have trouble with standards

bloodargon

2008-03-28 11:57:01

From: Pwnt by Pwnt
yeah… standards are the biggest problem :\ and a lot of people have trouble with standards


I honestly I wasnt aiming for standards, since, I just got a little lazy. My mage alcher has them tho :D

Pwnt by Pwnt

2008-03-28 13:43:21

oh well thats good that you know how ^^ you should still put in every script tho >.> ;)

KoKouKo

2008-03-30 03:19:57

From: bloodargon
Thanks guys. My main effort was I was going for 99 crafting, and, couldnt find a decent craft script even in the Jr forums, so, I made my own. I might update it with some failsafes, and such, but, most likely not. If you do happen to modify it, let me know with a PM. Always wanted to learn :)

planning to release a crafting script that does exactly this in maybe 2 days once i get the form figured out (i get some error i shouldnt be getting with a listbox, help?) its currently 737 lines :D. Were you the one that requested the script? if you want a peek pm me and ill send what I have so far to you, or anybody for that matter[/off-topic]




all i noticed is your standards and i fix0rd them

program AutoCrafter;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
////////////Bloods Auto Crafter/////////////////
///Used best at Pest Control bank, has no ///
///Random even detection or anti-ban features///
////////////////////////////////////////////////
const
bodycolor = 611335; //Body Color
hidecolor = 474629; //Hide Color
bank = 6385791; //Bank Color
amounttodo = 650; //How many bodies to make
SmartWorld = 99;
Signed = True;

var
bodies: Integer;
exp: Integer;
x,y: Integer;
///////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//~~~~~~~~~~~~~~~~~~~~~~~~Do Not Touch Below~~~~~~~~~~~~~~~~~~~~~~~~~\\
///////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

procedure Craft;
begin
//Starting with blank inventory, only thread and needle.

//if(findcolortolerance(x,y,bank,103,96,343,170,5)) then
//Begin
//Mouse(x+random(3),y+random(3),2,2,false);
//ChooseOption(x,y,'Use-quickly');
//end else
//Writeln('Cannot find bank');
//end;
//Not needed yet
////////////End Of Banking//////////

if(findcolortolerance(x,y,hidecolor,552,212,718,461,5)) then
begin
Mouse(x+random(3),y+random(3),2,2,true);
Wait(1000+random(500));
Mouse(576+random(4),230+random(4),2,2,true); //Uses Hide -> Needle
Wait(2200+random(1300));
Mouse(96+random(5),418+random(5),2,2,false);
Wait(1000+random(204));
ChooseOption('Make 10'); //Starts Crafting //**It's just ChooseOption('Make 10'), no need for the x,y**
Wait(15000+random(3000)); // Waits on hides
end; //**Needed end; there, not just end**
repeat
if(findcolortolerance(x,y,bank,230,126,290,168,5)) then
begin
Mouse(x+random(3),y+random(3),2,2,false);
ChooseOption('Use-quickly'); //**same as above**
Wait(2000+random(20));
end;//**Same as above, forgot your semi-colon
until(findcolortolerance(x,y,2070783,184,30,330,44,2))
FixBank;
if(findcolortolerance(x,y,bodycolor,552,212,718,461,5)) then
begin
Mouse(x+random(3), y+random(3), 2,2, false);
Wait(1000+random(20));
ChooseOption('Store All'); //Banked Hides //**Same as above**
Wait(3300+random(53));
FixBank;
end; //**Same as above**
Mouse(134+random(3), 72+random(3), 2,2, false); // Withdraw hides, second bank
ChooseOption('Withdraw All'); //**Same as above**
Wait(1000+random(200));
FixBank;
CloseBank;
bodies := bodies +8;
end;

procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
while not(SmartReady) do Wait(100);
end;

begin
SetupSRL;
SetupSmart;
writeln('SMART : Script has control');
Disguise('RuneScape - the massive online adventure game by Jagex Ltd');
ActivateClient;
writeln('Welcome to Blood Argons auto crafter!');
writeln('Let the XP commence!');
repeat
Craft;
writeln('Body Count : '+IntToStr(bodies)+'');
until (bodies >= amounttodo);
exp := bodies*180;
writeln('Finished Crafting');
writeln('Worked for '+TimeRunning+' and crafted '+IntToStr(bodies)+' bodies.');
writeln('For a total of '+IntToStr(exp)+' XP');
TerminateScript;
end.

KoKouKo's tips on standards
1) when you indent, indent two spaces
2) NEVER capitalize words displayed in bold
3) Camal-cap your words (ie IAmReallySexy)
4) Most scripters develop their own standards (like everybody has their own hand-writing) those are just ones that are very common that most people follow

in the beginners section of tut island theres a list of all the standards, standards are mostly something you just suck up and use then they will just grow on you and youll start using them automatically (well thats what happened to me)





for bank opening you can use one of SRL's many bank opening functions

Heartrange

2008-03-30 16:39:47

[admin]Dear User,
Your post count has been reset on account of your mass of spam posts. Please take the time to read this thread before posting again.
Sticky: Attention Spammers and Leechers...
RAM

Cheers,
Hobbit.[/admin]

Thanks from me too :p

I dont know lol :P

Looks very nice :)

Looks cool man :) I'll try it

bloodargon

2008-03-31 17:14:40

From: KoKouKo
planning to release a crafting script that does exactly this in maybe 2 days once i get the form figured out (i get some error i shouldnt be getting with a listbox, help?) its currently 737 lines :D. Were you the one that requested the script? if you want a peek pm me and ill send what I have so far to you, or anybody for that matter[/off-topic]




all i noticed is your standards and i fix0rd them

program AutoCrafter;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
////////////Bloods Auto Crafter/////////////////
///Used best at Pest Control bank, has no ///
///Random even detection or anti-ban features///
////////////////////////////////////////////////
const
bodycolor = 611335; //Body Color
hidecolor = 474629; //Hide Color
bank = 6385791; //Bank Color
amounttodo = 650; //How many bodies to make
SmartWorld = 99;
Signed = True;

var
bodies: Integer;
exp: Integer;
x,y: Integer;
///////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//~~~~~~~~~~~~~~~~~~~~~~~~Do Not Touch Below~~~~~~~~~~~~~~~~~~~~~~~~~\\
///////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

procedure Craft;
begin
//Starting with blank inventory, only thread and needle.

//if(findcolortolerance(x,y,bank,103,96,343,170,5)) then
//Begin
//Mouse(x+random(3),y+random(3),2,2,false);
//ChooseOption(x,y,'Use-quickly');
//end else
//Writeln('Cannot find bank');
//end;
//Not needed yet
////////////End Of Banking//////////

if(findcolortolerance(x,y,hidecolor,552,212,718,461,5)) then
begin
Mouse(x+random(3),y+random(3),2,2,true);
Wait(1000+random(500));
Mouse(576+random(4),230+random(4),2,2,true); //Uses Hide -> Needle
Wait(2200+random(1300));
Mouse(96+random(5),418+random(5),2,2,false);
Wait(1000+random(204));
ChooseOption('Make 10'); //Starts Crafting //**It's just ChooseOption('Make 10'), no need for the x,y**
Wait(15000+random(3000)); // Waits on hides
end; //**Needed end; there, not just end**
repeat
if(findcolortolerance(x,y,bank,230,126,290,168,5)) then
begin
Mouse(x+random(3),y+random(3),2,2,false);
ChooseOption('Use-quickly'); //**same as above**
Wait(2000+random(20));
end;//**Same as above, forgot your semi-colon
until(findcolortolerance(x,y,2070783,184,30,330,44,2))
FixBank;
if(findcolortolerance(x,y,bodycolor,552,212,718,461,5)) then
begin
Mouse(x+random(3), y+random(3), 2,2, false);
Wait(1000+random(20));
ChooseOption('Store All'); //Banked Hides //**Same as above**
Wait(3300+random(53));
FixBank;
end; //**Same as above**
Mouse(134+random(3), 72+random(3), 2,2, false); // Withdraw hides, second bank
ChooseOption('Withdraw All'); //**Same as above**
Wait(1000+random(200));
FixBank;
CloseBank;
bodies := bodies +8;
end;

procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
while not(SmartReady) do Wait(100);
end;

begin
SetupSRL;
SetupSmart;
writeln('SMART : Script has control');
Disguise('RuneScape - the massive online adventure game by Jagex Ltd');
ActivateClient;
writeln('Welcome to Blood Argons auto crafter!');
writeln('Let the XP commence!');
repeat
Craft;
writeln('Body Count : '+IntToStr(bodies)+'');
until (bodies >= amounttodo);
exp := bodies*180;
writeln('Finished Crafting');
writeln('Worked for '+TimeRunning+' and crafted '+IntToStr(bodies)+' bodies.');
writeln('For a total of '+IntToStr(exp)+' XP');
TerminateScript;
end.

KoKouKo's tips on standards
1) when you indent, indent two spaces
2) NEVER capitalize words displayed in bold
3) Camal-cap your words (ie IAmReallySexy)
4) Most scripters develop their own standards (like everybody has their own hand-writing) those are just ones that are very common that most people follow

in the beginners section of tut island theres a list of all the standards, standards are mostly something you just suck up and use then they will just grow on you and youll start using them automatically (well thats what happened to me)





for bank opening you can use one of SRL's many bank opening functions


Thanks for the advice and script cleanup!
Ill be posting in the jr section once I get some of the procedures failsafed and updated…

As for the banking…It was the problem between finding the right procedure and having it work with pest control…every banker I tried to use so far that 'has pc support' really doesnt, so, the "OpenBankFast('pc')" didnt work too well for me, Ill either make my own or find one…