SRL Archive - Archive

insanomano - SRL Member Application


insanomano

2011-11-12 20:27:35

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
No


What is your general programming knowledge?
N/A


Are you a member of any other communities?
No


Tell us about yourself…
From: insanomano
My name is Jordan, I am a recent high school graduate. I have been at SRL for quite a few years now. I enjoy partying, and working, and am hoping to go to college shortly for something programming related.



Please show us one (or multiple) of your scripts.
program BarbarianVillagePowerFisher;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
var
LoadsDone, FishCaught, BCounter, BBCounter, Antibani, z, TXP, SXP, TotalXP, XPTroutCaught: integer;
XPSalmonCaught, TroutCaught, SalmonCaught, TroutDtm, SalmonDtm, x, y, i: integer;
DynamicStatus: string;

const
HowLongToBreak = 20; //how long do you want to break for? 20/40/60 mins?
HowManyLoads = 20; // after how many loads of fish do you want to take a break
FishToCatch = 9000; // How many fish to catch
RippleColor = 12499382;
FishSymbolColor = 14105870;
WORLD = 83;
MEMBERS = True;
SIGNED = True;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'username'; // Username
Players[0].Pass := 'password'; // Password
Players[0].Active := True; // Set to true if you want to use this Player
Players[0].Pin := ''; // Leave blank if player doesn't have a bankpin
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

Procedure KickAssProgressReport;
begin
ClearDebug;
Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|');
Writeln('| Barb Village PowerFisher! |');
Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|');
Writeln(PadR('| Ran for ' + (TimeRunning) + '.', 52) + '|');
Writeln(PadR('| ' + IntToStr(TroutCaught) + ': Trout Caught.', 52) + '|');
Writeln(PadR('| ' + IntToStr(SalmonCaught) + ': Salmon Caught.', 52) + '|');
Writeln(PadR('| ' + IntToStr(LoadsDone) + ': Loads Completed.', 52) + '|');
Writeln(PadR('| ' + IntToStr(TotalXP) + ': Fishing Experience Gained.', 52) + '|');
Writeln(PadR('| ' + IntToStr(Antibani) + ': AntiBan Procedures Completed.', 52) + '|');
Writeln(PadR('| ' + IntToStr(BBCounter) + ': Breaks Taken.', 52) + '|');
Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|');
Writeln(PadR('| Status: ' + (DynamicStatus) + '.', 52) + '|');
Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|');
Writeln(PadR('| Version: 1.00', 52) + '|');
Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|');
end;

Procedure BreakForTits;
var
BreakTime: integer;

begin
BBCounter := BBCounter + 1;
DynamicStatus := ('Taking a break.');
KickAssProgressReport;
if HowLongToBreak = 20 then BreakTime := 1200000;
if HowLongToBreak = 40 then BreakTime := 2400000;
if HowLongToBreak = 60 then BreakTime := 3600000;
DynamicStatus := ('Taking a break for ' + FloatToStr(HowLongToBreak) + ' minutes');
KickassProgressReport;
Logout;
Wait(BreakTime + random(480000)); // breaking for breaktime + a random 8 minutes
LoginPlayer;
BreakTime := 0;
BCounter := 0;
end;

procedure AntiRandoms; // *** Calls Anti-randoms(Reflection+Color) ***
begin
DynamicStatus := ('Checking for randoms');
KickAssProgressReport;
if not LoggedIn then TerminateScript;
MakeCompass('N');
SetAngle(true);
FindNonInventoryRandoms;
FindNormalRandoms;
LampSkill := ('fishing');
LevelUp;
DynamicStatus := ('Finished checking for randoms');
KickAssProgressReport;
end;

Procedure RandomMouseMove;
begin
case random(6) of
1: MMouse(MSCX, MSCY, 180, 120);
2: MMouse(MSCX, MSCY, 190, 200);
3: MMouse(MSCX, MSCY, 200, 240);
4: MMouse(MSCX, MSCY, 300, 150);
end;
end;

Procedure CheckLevel;
begin
GameTab(23);
MMouse(706, 281, 8, 8);
Wait(1500 + random(2000));
GameTab(25);
end;

Procedure AntiBan;
begin
Antibani := Antibani + 1;
DynamicStatus := ('Performing an antiban procedure');
KickAssProgressReport;
case random(2) of
0: RandomMouseMove;
1: CheckLevel;
end;
DynamicStatus := ('Fishing.');
KickAssProgressReport;
end;

Procedure DropFishOnly;
var
FishDTM: integer;

begin
FishDTM := DTMFromString('mfgEAAHicrc1BCoNADIXhNwMiWAQVj6K0FETQLuqiCy+mK0/rwv7DZOdSAx/hhYRUknovtXih8zEP+OCLn5kx2Xy0vTeeaPBwUo4MCTwOxe6wK/aQU9stUaE2BbZ1CVeXhd93lLvJuf6cjApZ');
DropItemsByIdentifier('dtm', FishDTM, []);
FreeDTM(FishDTM);
end;

Procedure DropFish;
begin
AntiRandoms;
LoadsDone := LoadsDone + 1;
TroutDTM := DTMFromString('m1gAAAHicjcshDoAwFIPhviVMDBwcZQmCGQgIFCeb4sDbj0JuTb7UtEHS7qSEAyduPLiwIWJFMMmj8HG0YJiwYMaIN+dv0TSoL9bpTwW13QXM');
SalmonDTM := DTMFromString('mwQAAAHic42RgYMhiguA8IC4H4mIgzgXidCCOA+IkINZlZGBQBWI1IFYBYm0gNgFicyA2A2I9IG4P9QGaxoQXszIQBoxEYDgAAAl9BsE=');
TroutCaught := TroutCaught + (CountItems('DTM', TroutDTM, []));
SalmonCaught := SalmonCaught + (CountItems('DTM', SalmonDTM, []));
FishCaught := (TroutCaught + SalmonCaught);
XPTroutCaught := (CountItems('DTM', TroutDTM, []));
XPSalmonCaught := (CountItems('DTM', SalmonDTM, []));
TXP := TXP + (XPTroutCaught * 50);
SXP := SXP + (XPSalmonCaught * 70);
TotalXP := (TXP + SXP);
FreeDtm(TroutDTM);
FreeDtm(SalmonDTM);
DynamicStatus := ('Dropping fish');
KickAssProgressReport;
DropFishOnly;
ArrangeInv;
BCounter := BCounter + 1;
end;

Procedure FindNewFishingSpot;
begin
z := 0;
if RadialWalkTolerance(FishSymbolColor, 1, 90, 100, x, y, 5) then
begin
DynamicStatus := ('Walking to North fishing spot');
KickAssProgressReport;
RadialWalkTolerance(FishSymbolColor, 1, 90, 100, x, y, 5)
Wait(500);
AntiRandoms;
Flag;
wait(1000 + random(500));
Exit;
end else if not RadialWalkTolerance(14105870, 1, 90, 100, x, y, 5) then
begin
DynamicStatus := ('Walking to South fishing spot');
KickAssProgressReport;
RadialWalkTolerance(FishSymbolColor, 180, 270, 50, x, y, 5);
Wait(500);
AntiRandoms;
Flag;
Exit;
end;
end;

Procedure FindFishRippleTPA;
var
FishRippleTPA: TPointArray;
FishPoint: Tpoint;

begin
AntiRandoms;
if InvFull then Exit;
DynamicStatus := ('Currently Looking for fishing spot');
KickAssProgressReport;
repeat
z := z + 1;
wait(10);
until ((FindColorsSpiralTolerance(MSCX, MSCY, FishRippleTPA, RippleColor, MSX1, MSY1, MSX2, MSY2, 2)) or (z >= 500));
if z >= 500 then FindNewFishingSpot;
z := 0;
for i:= 0 to High(FishRippleTPA) do
begin
FishPoint := FishRippleTPA[i];
MMouse(FishPoint.x, FishPoint.y, 3, 3);
wait(1050 + random(250));
if IsUptext('ure') then
begin
DynamicStatus := ('Found fishing spot');
KickAssProgressReport;
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
wait(250 + random(250));
ChooseOption('ure');
DynamicStatus := ('Fishing');
KickAssProgressReport;
wait(3000 + random(2000));
AntiBan;
repeat
wait(100);
until not (FindColorSpiralTolerance(x, y, 859949, 279, 155, 293, 171, 10)); //fishing rod color
if InvFull then Exit;
if (FindColorsSpiralTolerance(MSCX, MSCY, FishRippleTPA, RippleColor, MSX1, MSY1, MSX2, MSY2, 2)) then Exit;
end else FindNewFishingSpot;
end;
end;

Procedure CastForFish;
begin
FindFishRippleTPA;
wait(2500 + random(2000));
AntiRandoms;
end;

Procedure BootSmart;
begin
Smart_Server := WORLD;
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
end;

Procedure SetupScript;
begin
BootSmart;
SetupSrl;
DeclarePlayers;
ActivateClient;
ClearDebug;
LoginPlayer;
end;

begin;
SetupScript;
repeat
repeat
CastForFish;
until(InvFull);
DropFish;
if BCounter >= (HowManyLoads) then BreakForTits;
if not (Loggedin) then TerminateScript;
until(FishCaught >= FishToCatch);
DynamicStatus := ('Caught All the fish we wanted, Logging Out!');
KickAssProgressReport;
Logout;
TerminateScript;
end.

Sabzi

2011-11-12 20:55:23

I've only glanced through the script so I hope others will point out things better than me.
I voted no, these "color only" times I think it's good to be able to walk with color if you are a member.

senrath

2011-11-12 21:04:04

Didn't vote, since I haven't had a chance to really look at it, but I'm not fond of the fact that you can only break for 20, 40, or 60 minutes. Why not allow any break time they want?

insanomano

2011-11-12 21:26:10

@Sabzi Are you saying I should implement the option to bank ? I didn't feel the need for this because its not profitable to bank trout/salmon, but I suppose I should have put the option in there, I do use RadialWalk for going back and forth between fishing spots, thanks for your input

@senrath Good point, I just wanted to make it user friendly so the user doesn't have to put time in milliseconds, I also added a random 8 minutes to whatever break time they input :P

Edit: @senrath
If user-friendliness is your goal, you could still have them input time in minutes, then multiply that number by 60000.
definitely didn't think about doing that!! :redface:

Kyle Undefined

2011-11-12 21:28:16

I'm sorry, but I'm going to have to vote no. I looked through your script and there were several things that I noticed.

- First off is standards, not a HUGE deal, but my eyes started hurting reading the script (No offense)

- Second is the absence of color walking. I noticed you were using RadialWalk, and don't understand why you wouldn't use a different method. (I'm not sure if SPS is allowed on a member script, but even that is better than RW. I'd use RW as a fail-safe in case your first walking method didn't work)

- Third, which is also not a huge deal, is the lack of TPAs in your script. I see that you are using FindColorSpiralTolerance() when a TPA would of been a better choice.

- Fourth is your DropFish procedure, and I hate to say it, but is not well written at all. I can't even understand your logic behind it.

I really hope you take these votes as a positive meaning and not negative, since the only reason why I'm breaking these things down is so that you can see where you need to improve on.

You're getting there with your scripting abilities, however you're not there yet. Keep it up! :)

senrath

2011-11-12 21:30:13

If user-friendliness is your goal, you could still have them input time in minutes, then multiply that number by 60000.

Sabzi

2011-11-12 21:57:48

If you would make it walk back and forth the bank, then make it as stable as working good for a few hour I would vote yes. Possibly. A member application should not be necessary profit oriented. You show what you can do then you can change the script however you want.

cycrosism

2011-11-13 18:59:05



Procedure CheckLevel;
begin
GameTab(23);
MMouse(706, 281, 8, 8);
Wait(1500 + random(2000));
GameTab(25);
end;

Don't need this function, there is a function in SRL that can check your level + exp.

Try this instead:

HoverSkill('Fishing', False);

If you want to get the level returned as value, try the following:

GetSkillInfo('Fishing', False);

Overall the script looks good. Nice use of TPA's. Yes from me :)

insanomano

2011-11-13 20:35:40

@cycrosism: Thanks! I guess I should explore SRL's functions a bit more

@Sabzi: is SPS a valid walking method for members application? I remember reading in a tutorial awhile back that RW/RRW were a requirement, outdated tut? either way I will implement banking in there also

senrath

2011-11-13 23:35:02

I think most of the tutorials on getting SRL Members were written long before SPS was a thing.

kanah

2011-11-14 00:44:43

You did a good job on this script; it works somewhat reliably. You should though take the time to polish it up before using it to apply for SRL membership.

Things you should do to improve this script:
1. It's slow; speed up the recognition of fishing holes.
2. Paint your progress report on smart.
3. Include more failsafes (like checking for feathers/fishing pole and location)
4. Include SRL stats
5. Add more comments to your code, explain what it is doing
6. Add multiplayer

BraK

2011-11-14 00:54:58

Meh I don't think we should count not using SPS against someone for members. If the can get the older methods to have a stable effect over a long period of time. I'm all for giving them a "Yes". We'll made script last for hour and days with the older method. ;)

Not a big thing but you have 2 procs made to start/setup the script when you could have just added all those lines to the beginning of your mainloop. It's a lot of extra code IMO.

TPAs are a must with the way RS is going now-a-days. Invest some time into learning them you won't regret it I promise.

Standards again for me they are a little more important than others. People learn from looking at the code you post as a SRL member. Would you want to learn from someone that it's hard to read what they wrote? Standards make your scripting cleaner and make it easily readable.

We are SRL members you get this by knowledge of the SRL include. That means if SRL has the function and it works it's probably better to use it.

I also voted no.

Emaziz

2011-11-14 06:59:45

Hi there!


if HowLongToBreak = 20 then BreakTime := 1200000;
if HowLongToBreak = 40 then BreakTime := 2400000;
if HowLongToBreak = 60 then BreakTime := 3600000;
This should be replaced by this simple line:

BreakTime := HowLongToBreak * 60000;
as it is way more user friendly allowing the user to select a very custom break time.

I see that your DropFishOnly and DropFish procedures are inefficient as they load and free the DTMs every time the procedure is called. While loading and freeing small DTMs is a simple function not demandning so much computer power, it will be considered cleaner to make the DTMs global variables and load them at startup and termination.

Also the script is simply not big enough for what I believe is a proper SRL members-worthy application script. You should include a walking part in order to show that you know how to do it as walking is the key ingredient to many great scripts. If you feel banking them is too inefficient for GP/XP you may for example have an option to cook them on the fire in Barbarian Village. It is not far and it gives a nice amount of free cooking XP. :)

I would've voted no, but I'm not active here at the moment so I'll not vote.
Good luck tho'! :)

Markus

2011-11-14 07:24:00

From: Camo Developer
(I'm not sure if SPS is allowed on a member script, but even that is better than RW. I'd use RW as a fail-safe in case your first walking method didn't work)

I beg to differ. SPS can easily be put in the same category as reflection when it comes to walking: it can be done when utterly wasted.
Also, SPS is unreliable at other compass angles than perfect north. RW and such can easily be adapted to other angles to make for a less detectable script.

P1nky

2011-11-14 16:37:51

Sorry a No from me.

First off, please fix your standards.
IMO this is quite simple, good as a beginner but keep trying man, seems like your getting there. Goodluck.

Harry

2011-11-14 17:32:03

What are you guys talking about his standards for?… They aren't bad at all, except for a few minor things that should be done differently.

Flight

2011-11-14 20:32:40

I'm really glad to see someone's putting effort twords membership. Although I don't think it's quite enough to be membership material, I do think it's great you've come this far.

Pretty much what the others have said twords suggestions is what I would have said. TPAs are amazing for objecting-finding, with that being said, I would most definitely suggest using AutoColorAid. Without a doubt, one of my favorite tools. Also, here is an awesome tutorial on how to use it within your script. I've used ACA with all of my color scripts, it's just unbeatable.

Oh yeah, one other thing I noticed. You have this for your fishing detection:

repeat
wait(100);
until not (FindColorSpiralTolerance(x, y, 859949, 279, 155, 293, 171, 10)); //fishing rod color

So… let's assume that there's side-by-side fishing spots (this is actually common in this area), atleast one person fishing at each spot, so you can see your fishing pole as well as theirs. Let's say you stop fishing but the guy next to you continues, the script still finds his pole color and assumes you're still fishing… Problem. :/ I suggest an inventory-counting system to tell you if you're fishing or not. If your inventory count doesn't change in X amount of seconds, you've probably stopped fishing. Here's the code I used:

Procedure WhileFishing;
var
T,I,I2: Integer;
begin

I := InvCount; //Initially get the inventory count

Marktime(T);
repeat

FindNormalRandoms;
if FindNPCChatText('these fish', Nothing) then //This will tell us if we're out of feathers or a fishing rod
Shutdown('Out of equipment'); //Whatever you have here make it log out and stop the script
ClickToContinue; //Incase we level-up while fishing this will click to continue
if (TimeFromMark(T) > FishTimer) then //Replace 'FishTimer' with how many seconds before it detects we've stopped (I suggest 8000)
break;
if InvFull then //Full inventory, so break the loop to drop fish
break;

GameTab(tab_Inv); //Might not be needed, but if we can't see the inv, how can we count? ;)
I2 := InvCount;

if (I <> I2) then //If the inv count changes then let's re-mark the time for another 8 seconds
begin
Marktime(T);
GameTab(tab_Inv);
I := InvCount;
//Maybe put in your anti-ban here
end;

until(false)

end;

I put in lots of notes in there to explain how and why I did each line. In any case, don't give up! You're obviously taking it seriously and willing to try so keep at it. Explore the SRL Include, there's TONS of useful tools in there. ;)