SRL Archive - Archive

rockman - SRL Member Application Form


rockman

2008-01-24 20:53:11

<!– BEGIN TEMPLATE: formanswers –>
rockman - SRL Member Application Form
rockman

What is the meaning to life?
To have fun and get the most out of it.

Where you Referred to SRL? If yes, by whom?
yes
Saw it on Sythe

Programming Knowledge
HTML, Java

Other Communitys
Sythe

How Long have You Played Runescape
6 Years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

Hello, My name is Erik. I live in Minnesota (USA). I am 15 years old.

I think I would be a good member of this community because I am organized and can problem solve fairly well. I have been around computers, technology all my life and have liked working with it. I built my own computer last summer and it was the best time. I started scripting about 2 years ago, but have had some times where I have stopped for awhile so I could keep up in school. I auto on runescape a lot, and have about 15 accounts that I use often. I have written a few scripts, they are outdated now, but recently I have started again, because I understand the code a lot better now. I want to be a member of this community not just to take all of the content of other members, but to also help other members and provide my own content. So, please consider me as an applicant, and vote for me as you see fit.

Thanks.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

//
//
// Rockman's Powerminer v2.2
// Info:
// This script will mine rocks and then drop them when the player inventory
// is full. It was designed with iron but you can mine whatever you like.
//
// Make Sure Before Starting:
// -Characters are near the rocks that you wish to mine.
// -Pickaxe is wielded (Also recommended to have another in inventory).
// -Color is on Very Bright and 32-bit.
// -Fill out constants and Declare Players (Below).
//
// Hope it works well, and be sure to post your proggies!


// Version History
// ------------
// -Version 2.2
// - Fixed Gas Finder
// - Made multiplayer-compatible
// -Version 2.1
// - Fixed Some bugs
// - Adjusted Failsafes
//
// -Version 2.0 (Released January 2008)
// - Script is now auto-colored
// - Changed the drop procedure to a DTM for more accurate dropping
// - Added a better procedure to check for gas
// - Added chat for when gas occurs
// - Extended Anti-Ban procedure to get more random results
// - Added a tolerance for rock-finding
//
// -Version 1.0 Script (Released December 2007)

program RockmansPowerminer;

{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}


const
YourSRLId = '';
YourSRLPassword ='';
RockTol = 3 ; // The Tolerance of the rock color
WaitTime = 8 ; // (In Seconds) The time you want to wait for the rock to mine
RunDir = 'N'; // The direction to run when a fight or gas is found
RunFar = True ; // Run far if a fight is found?
StartPlayer = 0 ; // Player to start with


const
VersionNumber ='2.2';

Procedure DeclarePlayers;
begin
HowManyPlayers := 4; //How many players will be mining
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;


Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Booleans[1] := True; // Mining new rocks?
Players[0].Strings[1] :='iron'; // What rock you are mining
Players[0].Integers[0] := 4; // Loads to do before switching
Players[0].Active := True; // Using this player

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Booleans[1] := True;
Players[1].Strings[1] :='iron';
Players[1].Integers[0] := 4;
Players[1].Active := True;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Booleans[1] := True;
Players[2].Strings[1] :='';
Players[2].Integers[0] := 4;
Players[2].Active := True;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Booleans[1] := True;
Players[3].Strings[1] :='iron';
Players[3].Integers[0] := 4;
Players[3].Active := True;


Writeln( IntToStr (HowManyPlayers) + ' Player(s)' );
end;

////////////////////////////END OF SETUP///////////////////////////////////////////////


var
rockcolor : Integer;
FalsePlayers : Integer;
CurrentActive : Integer;
IronOre : Integer;
Loads : Integer;
x, y : Integer;


const
copperold = 4483474; //4153734
tinold = 8421514; //4671308
ironold = 1646901; //1778747
goldold = 4102828; //5094867
coalold = 2570553; //2109488
mithrilold = 6111295; //4994100
addyold = 4741704; //5334353

coppernew = 4417423; //4879263
tinnew = 7171702; //10066597
ironnew = 2503249; //2503249
goldnew = 2083318; //2674427
coalnew = 1911595; //1647910
mithrilnew = 5716795; //6702661
addynew = 4610118; //5334353

Procedure RockColors;
begin
if (Players[CurrentPlayer].Booleans[1]) then
begin
case lowercase(Players[CurrentPlayer].Strings[1]) of
'copper' : rockcolor:= coppernew;
'tin' : rockcolor:= tinnew;
'iron' : rockcolor:= ironnew;
'coal' : rockcolor:= coalnew;
'mith' : rockcolor:= mithrilnew;
'mithril' : rockcolor:= mithrilnew;
'addy' : rockcolor:= addynew;
'adamant' : rockcolor:= addynew;
end;
end;
if (Players[CurrentPlayer].Booleans[1]) = False then
begin
case lowercase(Players[CurrentPlayer].Strings[1]) of
'copper' : rockcolor:= copperold;
'tin' : rockcolor:= tinold;
'iron' : rockcolor:= ironold;
'coal' : rockcolor:= coalold;
'mith' : rockcolor:= mithrilold;
'mithril' : rockcolor:= mithrilold;
'addy' : rockcolor:= addyold;
'adamant' : rockcolor:= addyold;
end;
end;
end;


procedure ProgressReport;
begin
CurrentActive := (HowManyPlayers) - (FalsePlayers);
ClearDebug;
SRLRandomsReport;
writeln('---------Rockmans Powerminer---------');
writeln('Worked For: '+ (TimeRunning));
writeln('Loads Mined and Dropped: ' + IntToStr(Loads));
writeln('You are using Version ' + (VersionNumber));
writeln('______________________________________');
writeln(' There are '+ IntToStr(CurrentActive) + ' player(s) still active.');
end;

Procedure LoadMyDTM;
Begin
IronOre := DTMFromString('78DA636C6266607064624006DE7A4A0CFF813' +
'42310FF0702C616A01A53543510591809A4CB816AAC09A82904AA' +
'7123A0A60EA8C69F809A5E4C37A3AB0100470C0A46');
end;

Procedure SetChats;
Begin
SetChat('On', 1);
SetChat('Off', 2);
end;

Procedure AutoResponder;
Begin
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'Unknown';
Exit;
end;
If (InChat('Mining') or
InChat('mining lvl') or
InChat('mining lvls') or
InChat('mining lvl?') or
InChat('mining lvls?') or
InChat('mining lv') or
InChat('mine lv')) then
begin
case Random(6) of
0: TypeSend('I am ' + IntToStr(Players[CurrentPlayer].Integers[1]) + ' mining and loving it');
1: TypeSend('im ' + IntToStr(Players[CurrentPlayer].Integers[1]) + 'mining');
2: TypeSend(IntToStr(Players[CurrentPlayer].Integers[1]) + 'here');
3: TypeSend('lol too low');
4, 5: TypeSend(IntToStr(Players[CurrentPlayer].Integers[1]));
6: TypeSend(IntToStr(Players[CurrentPlayer].Integers[1]) + ' u?');
end;
end;
If (InChat('hi ') or
InChat('hey') or
InChat('sup') or
InChat('respond') or
InChat('wats up') or
InChat((Players[CurrentPlayer].Name)) or
InChat((Players[CurrentPlayer].Nick)) or
InChat('whats up')) then
begin
case Random(5) of
0: TypeSend('hi ');
1: TypeSend('hey');
2: TypeSend('whats up');
3: TypeSend('wats up');
4: TypeSend('hows it goin?');
5: TypeSend('sup');
end;
end;
If (InChat('macro') or
InChat('bot') or
InChat('auto') or
InChat('autoer') or
InChat('macro?')) then
begin
case Random(7) of
0: TypeSend('not me');
1: TypeSend('im not a bot');
2: TypeSend('im not');
3: TypeSend('i hate autoers');
4: TypeSend('whos a bot?');
5: TypeSend('bots are bad for runescape');
6: TypeSend('jagex got rid of bots');
7: TypeSend('im not a bot, thats for sure!');
end;
end;
end;

Procedure AntiBannage;
begin
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'Unknown';
Exit;
end;
case Random(16) of
0: BoredHuman;
1: begin
HoverSkill('Mining', false);
wait(211 + random(267));
end;
2: begin
HoverSkill('Strength', false);
wait(132 + random(213));
end;
3: RandomRClick;
4: RandomRClick;
5: PickUpMouse;
6: AlmostLogout;
7: RandomMovement;
9: PickUpMouse;
10: GameTab(9);
11: GameTab(10);
12: DoEmote(1 + Random(9));
13: Begin
MakeCompass('E');
Wait(3000 + Random(2000));
MakeCompass('N');
End;
14: Begin
MakeCompass('W');
Wait(3000 + Random(2000));
MakeCompass('N');
End;
15: Begin
MakeCompass('S');
Wait(3000 + Random(2000));
MakeCompass('N');
End;
16: HoverSkill('Hitpoints', false);
end;
end;

Procedure GasRespond;
Begin
Case Random(9) of
0: TypeSend('i hate when i get a gas rock');
1: TypeSend('i hate when i have gas this bad');
2: TypeSend('i dont like gas');
3: TypeSend('its steaming');
4: TypeSend('its gonna blow');
5: TypeSend('b00m');
6: TypeSend('steamy rock!');
7: TypeSend('take cover, its gonna blow');
8: TypeSend('that rock is bad');
9:TypeSend('dont break a pick');
end;
end;

Procedure CheckForGas;
Begin
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'Unknown';
Exit;
end;
If (FindColorTolerance (x, y, 10596274, 0, 0, 500, 500, 1)) // Taken from
or (FindColorTolerance (x, y, 8950933, 0, 0, 500, 500, 1)) // Masterkill's
or (FindColorTolerance (x, y, 9017755, 0, 0, 500, 500, 1)) // VEM
or (FindColorTolerance (x, y, 7900302, 0, 0, 500, 500, 1))then //
begin
FindNormalRandoms;
SetRun(True);
MakeCompass('N');
RunAway(RunDir, RunFar, 2, 17000); //Runs away and stays
GasRespond;
RunAway(RunDir, RunFar, 3, 1000); //Also just means RunBack
end;
end;

Procedure FixPick;
begin
FindPick;
Wait(2000);
FindNormalRandoms;
end;

Procedure CheckPickaxe;
begin
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'Unknown';
Exit;
end;
GameTab(5);
Wait(100);
If FindColorTolerance(x, y, 401712, 569, 289, 603, 322, 10) then
begin
GameTab(4);
Wait(100);
writeln('Found Pickaxe!');
FindNormalRandoms;
end;
If not FindColorTolerance(x, y, 401712, 569, 289, 603, 322, 10) then
begin
GameTab(4);
If FindColorTolerance(x, y, 401712, 569, 289, 603, 322, 10) then
begin
Mouse(x, y, 0, 0, true);
Wait(200);
Exit;
If not FindColorTolerance(x, y, 401712, 569, 289, 603, 322, 10) then
begin
writeln('Pickaxe Not Found! Logging Out!');
Logout;
Players[CurrentPlayer].loc := 'No pickaxe';
FalsePlayers := FalsePlayers + 1;
Exit;
end;
end;
end;
end;

Procedure MineRocks;
begin
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'Unknown';
Exit;
end;
Players[CurrentPlayer].Integers[1] := GetSkillInfo('mining', false);
Players[CurrentPlayer].Loc := 'In Mine';
GameTab(4);
repeat
CheckForGas;
FindNormalRandoms;
If FindObjCustom(x, y, ['ock', 'ine'], [rockcolor], RockTol) then Mouse(x, y, 5, 5, true)
FindNormalRandoms;
Status('mining ores...');
Wait(WaitTime * 1000 + Random(150));
FindNormalRandoms;
AutoResponder;
until (invfull) or (FindNormalRandoms) or (not(LoggedIn));
AntiBannage;
end;

Procedure DropRocks;
begin
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'Unknown';
Exit;
end;
GameTab(4);
LoadMyDTM;
repeat
Status('Dropping Ores...');
AutoResponder;
FindNormalRandoms;
FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2);
AutoResponder;
Wait(100 + Random(100));
Mouse(x, y, 3, 3, false);
FindNormalRandoms;
ChooseOption('rop');
AutoResponder;
FindNormalRandoms;
Wait(400);
until not FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2);
Loads := Loads + 1;
ReportVars[0] := ReportVars[0] + 1;
SendSRLReport;
ProgressReport;
FreeDTM(IronOre);
end;

begin
SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;
ActivateClient;
SetupSRL;
ScriptID := '598';
DeclarePlayers;
RockColors;
LoginPlayer;
repeat
SetAngle(True);
MakeCompass('n');
SetChats;
CheckPickaxe;
repeat
MineRocks;
DropRocks;
until(Loads = Players[CurrentPlayer].Integers[0]) or (not(LoggedIn));
If (Players[CurrentPlayer].loc = 'Unknown')or(Players[CurrentPlayer].loc = 'No pickaxe') then NextPlayer(False);
If (Players[CurrentPlayer].loc = 'In Mine') then NextPlayer(True);
until (FalsePlayers = HowManyPlayers);
end.

——————————————————
<!– END TEMPLATE: formanswers –>

richk1693

2008-01-24 21:46:44

It's pretty simple. You're probably going to need something more complex than this to get into SRL members. You have good standards and seem to understand a lot so I'm not sure.

I don't see why you'd have DTM Rotated for iron ore, as things in your inv don't rotate. What is the variable i used for? Don't do just until(invfull) because if something happens that you're not in the mine you'll just keep looking over and over and never find it. That's an infinite loop which is a no no.

rockman

2008-01-24 21:55:38

Oops my bad on the DTM. It searches for it as a regular DTM, but in the (until) it says DTMRotated.

Thanks for the comment. So, in your opinion, what would i need to add to a script like this?

Raskolnikov

2008-01-24 22:28:27

Procedure GasRespond;
Begin
Case Random(10) of
1: SendKeys('i hate when i get a gas rock');
2: SendKeys('i hate when i have gas this bad');
3: SendKeys('i dont like gas');
4: SendKeys('its steaming');
5: SendKeys('its gonna blow');
6: SendKeys('b00m');
7: SendKeys('steamy rock!');
8: SendKeys('take cover, its gonna blow');
9: SendKeys('that rock is bad');
10:SendKeys('dont break a pick on that thing');
end;
end;

Sendkeys = EEK!

Please don't use sendkeys.

I think other than that it is a decent script, but, not exactly members material. I am holding my vote for right now…

BobboHobbo

2008-01-24 23:11:23

Prove you know walking and you got my vote :)

edit*
 repeat
CheckForGas;
FindNormalRandoms;
FindObjCustom(x, y, ['ock', 'ine'], [rockcolor], RockTol);
Mouse(x, y, 5, 5, true);
FindNormalRandoms;
Status('mining ores...');
Wait(WaitTime * 1000 + Random(150));
FindNormalRandoms;
AutoResponder;
until (invfull);

What if you randomly log out here, it will just keep repeating until invfull even tho its logged?

do:
until (invfull or not LoggedIn)

Also what if your script logs out it will go next player and play from where the other character stopped you should do:

  if not LoggedIn then
Exit;

Have that at every proc at the top and in the main loop have if not loggedin then
nextplayer….. then it wont swap player and play from where the other char stopped

P1nky

2008-01-24 23:29:04

i voted no, because of the sendkeys, no failsafes, <most of the script is the autoresponder/chatter

sorry hopefully next time you will get in GL scripting

Negaal

2008-01-25 00:53:12

Voted no for same reason, not much action here / much antiban and responder, bit simple IMO

Naike

2008-01-25 12:03:09

Good-
Standarts

Bad
More FailSafes
use TypeSend!
and read some more advanced tut's
Maybe MultiPlayer?

If you need help or have any question add my msn : [email]N_1_c_e@hotmail.com[/email]

richk1693

2008-01-25 15:11:00

omg, I didn't even see sendkeys. NEVER use that. It's almost an instant ban. I'm not gunna vote yet We'll see if you fix it up.

Edit: Votes don't really matter at this point, but it's still good for learning.

Lalaji

2008-01-25 19:19:29

I think you are depending on colors a little too much. How about bitmaps for the pickaxe handle and DTM for ores?
Holding vote right now

rockman

2008-01-25 19:20:53

Ok well thanks guys i wasn't really sure how nice it had to be. But i'll fix it up and we'll see next time.

richk1693

2008-01-25 20:58:50

From: rockman
Ok well thanks guys i wasn't really sure how nice it had to be. But i'll fix it up and we'll see next time.

Best of luck to you, and we'll see you next month.

rockman

2008-01-25 21:36:24

see you next month


lol thanks.

Also, i just updated the script for better failsafes, fixed bugs.

FrÕzÑ_§ÕµL

2008-01-26 04:50:30

 5: TypeSend('' + (Players[CurrentPlayer].Skill[15]));
6: TypeSend('' + (Players[CurrentPlayer].Skill[15]));
7: TypeSend('' + (Players[CurrentPlayer].Skill[15]) + ' u?');
^^ Why do you have the '' + (Pla… ? Why not
6: TypeSend(Players[CurrentPlayer].Skill[15]);

And I notice that 5 and 6 are the same yea? Well you can do this:
5, 6: TypeSend(Players[CurrentPlayer].Skill[15]);

I recommend you don't have large and un needed waits such as this one :
SetChat('On', 1);
Wait(2000);
2 seconds of just sitting there will agitate your users lol.

And dude you use
Case Random(10) of:

but that means it will do the case of a random number between 0 and 9! you need case Random(11)!!! Or I just noticed you start with 1 : , you should use 0 : instead of 10 : then ok?

I also suggest checking for gas as soon as you mine the rock, you only have the normal randoms :)

Anyways good luck next time!

Ashur2Good

2008-01-26 07:14:07

Idk, besides the SendKeys, i didn't see anything else wrong :S

Yes from me.

Sir R. M8gic1an

2008-01-26 07:42:03

this is specifically for miners, and it is very VERY dangerous:

Procedure GasRespond;
Begin
Case Random(10) of
1: TypeSend('i hate when i get a gas rock');
2: TypeSend('i hate when i have gas this bad');
3: TypeSend('i dont like gas');
4: TypeSend('its steaming');
5: TypeSend('its gonna blow');
6: TypeSend('b00m');
7: TypeSend('steamy rock!');
8: TypeSend('take cover, its gonna blow');
9: TypeSend('that rock is bad');
10:TypeSend('dont break a pick on that thing');
end;
end;

none of the gas finding procedures are flawless. sometimes they'll detect too much other times they won't detect at all. now imagine your playing legit and every five mins there's a guy saying "damn this gas!" when there's no gas at all? Bam, report, jagex has a look at it and it's certain ban.

Script looks okish, not really at the right level yet i'd say. But not too far either. your standards on the if's are off sometimes, the begin comes right under the if.


If (Players[CurrentPlayer].loc = 'Unknown') then NextPlayer(False);
If (Players[CurrentPlayer].loc = 'No pickaxe') then NextPlayer(False);

just do


If (Players[CurrentPlayer].loc = 'Unknown')or(Players[CurrentPlayer].loc = 'No pickaxe') then NextPlayer(False);

also you need a repeat after all these multiplayers so that when you do switch player it will continue running the script. a very commonly used technique for multiplayer is this:

NextPlayer(LoggedIn)

if the player is lost / no pick or something just log him out.
so if it didn't logout it'll stay as true if it did it'll be put to false.

~RM

rockman

2008-01-26 10:52:59

also you need a repeat after all these multiplayers so that when you do switch player it will continue running the script. a very commonly used technique for multiplayer is this:

NextPlayer(LoggedIn)


so, you mean i need a 2nd repeat in the main loop?

Sir R. M8gic1an

2008-01-26 12:32:59

exactly.
I'd say after LoginPlayer.
~RM

n3ss3s

2008-01-26 12:37:08

This tutorial should help you with making a good mainloop :)

rockman

2008-01-26 18:28:56

From: n3ss3s
This tutorial should help you with making a good mainloop :)


Ok thx.

Fixed some stuff and tested it. Works a lot better now.

Sir R. M8gic1an

2008-01-27 03:54:08

I'd like to vote yes because of your attitude, but the script isn't really good enough in my opinion. I'm still not voting but:

to find the pickaxe in inv/equipped you use a FindColorTol…using a BitMap or a DTM would be much more trustful. Find color tol might find something with the same color as a pickaxe. If your looking for the head color of the pickaxe it might confuse it with a weapon of the same metal. if your looking for the handle it might find a WC'ing axe handle. See what i mean?

Also you only have one color for each rock..
when you mine you might go clicking crazy, cus imagine a lvl 30 and a lvl 50 are powermining iron. well you'd have to set the same wait time for both. the lvl 50 with rune pick will probably take 2-3secs. the lvl 30 with mith pic will probably take 10 secs. so either the lvl 50 is gonna be mining really slow or the lvl30 will go clicking crazy. also what happens if when they reach the rock it's already mined? they'll stay around waiting for nothing….

basically not enough failsafes….

~RM

Sumilion

2008-01-27 15:54:06

8-1

Sorry, not this time …

Closed.