SRL Archive - First Scripts

JustJack's MonkeyBars Agility Training


JustJack

2012-05-10 10:22:55

Ok, so here is my first attempt at one of these.

First, I learned most of this by taking apart other people's scripts, and there are certainly a few things in here that I have ripped off … it is a very simple script but I still would like to thank everyone, especially the author of the Caffeinated Killer (that is the main script I have used for learning SRL).

So I wanted to train agility. The agility training areas were a little difficult for me to script, and the existing scripts are just a little wobbly, so I decided to look at the monkey bars in the level 7 wilderness in the Edgeville dungeons. This is Wildy training, so be prepared to be PK'd while you are training. So far I only get killed every few days or so … one of the next things I need to add is to detect if I am being attacked, and then teleport away and drink antipoison or something … but for now, just don't carry anything of value with you and be prepared to die from time to time.

To get started, go to the area and climb over the monkey bars, and hang out on the North side of the chasm, where the Earth Warriors are. They will be agro for a little bit, it is better to fight them and eat a little until they stop bothering you.

You will not reach level 99 with this script - you only get 20 XP each time you cross. But, it is pretty good for leveling. You have to have 15 agility to cross the monkey bars. In 10 minutes I pulled 1500 XP, so that is 9000 XP per hour.

USAGE:
simply fire up SMART, log in, get your guy to the monkey bars, wait for the earth warriors to stop being aggro, cross the bars once, and enable SMART.

If you find that you are missing the monkey bars, then take a look at this line
MMouse(MSCX-27, MSCY-33, 9, 12);
the -27 and -33 are about where the bar should be every time - slightly to the left of the character, and slightly higher. To move the area where you look for the bars (if it is missing every time) try tweaking those two numbers. It is normal for it to fish around in a small area (defined by the 9 and 12 - the search area is a box 9 pixels wide and 12 pixels high) … if you find that it needs a slightly different search area, adjust these two numbers. I find that this line has been working for me and for one other tester, but you know how they can randomly change things…



TO DO:

Add a login section. I know this is standard stuff, I just haven't done it yet.

Add a section to determine if you are being attacked and flee.

Add XP counters, a way to report the XP back home and track.


Before I move forward with my TODO list, I would appreciate input on this. I know it is short and simple, but do you guys think it is random enough to avoid detection?


**** Updated to v1.2 *****

Added user logon info
Added 2 minute progress report to debug screen
tweaked the antiban to remove random clicks
Added a few comments
set the angle to 0 on startup

please let me know if this is working, and enjoy!
-jack

Lleatia

2012-05-14 16:50:33

I tried it, The mouse would only move up and down about half a cm, It didn't do anything when I was getting attacked by the spiders.

JustJack

2012-05-15 15:35:50

you have to wait until the spiders are not aggressive. I prefer to wait at the Earth warriors until they are not aggressive, when one stops attacking you they both do.

You have to cross the monkey bars once to be in the right position. Look at the screen shot.

So, just wait until the spiders are not aggressive any more (10 minutes I think) and then click to cross the monkey bars once, then turn the script on.

SkunkVT

2012-05-18 18:29:49

Yes, I used this script (before he released it) for about a good 30 to 40 lower levels, and it worked like a champ. Twice I had people kill me, but not that big of a deal…but no randoms since it's in the Wildy! Great for what it is…a simple script to gain some much needed afk agility! :-)

SkunkVT

2012-05-18 18:30:52

I vote we move this from the first scripts section to the Agility section.

J J

2012-06-04 02:00:29

From: SkunkVT
I vote we move this from the first scripts section to the Agility section.

You can PM a moderator to get it moved.

Progress := Progress + 20; 
You could also use this:
IncEx(Progress, 20)
Looks better

program JacksAgility_MonkeyBars;
{$define smart}
{$i srl/srl.simba}

Const
SWorld = 69;

// Need to find docs on the SRL stats and add functionality
// SRLStats_User = ''; // Fill in your SRL Stats info
// SRLStats_Password = '';

Label
LabelMainLoop;

Var
Progress: integer;
XPH: integer;
T: integer;

Procedure JackAntiBan;
begin
case random(300) of
2 : begin
writeln('Hover skill Agility');
HoverSkill(skill_agility,false);
end;
3 : begin
writeln('Prayer tab selected');
GameTab(27);
Wait(randomrange(400,800));
end;
6 : begin
writeln('Hover Skill (HP) selected');
HoverSkill(skill_hitpoints,false);
Wait(randomrange(300,600));
end;
7 : begin
writeln('Game Tab stats selected');
GameTab(23);
end;
8 : begin
writeln('Pickup Mouse selected');
PickUpMouse;
end;
9 : begin
writeln('Random wait selected');
Wait(randomrange(1000,2000));
end;
10: begin
writeln('Hover Skill attack selected');
HoverSkill('attack',false);
end;
end;
Wait(randomrange(500,1000));
end;

Procedure CrossMonkeyBars;
Label FindClickable;
begin
FindClickable:
if WaitUpTextMulti(['onkey', 'ars', 'onkey bars'], 500) then
begin
ClickMouse2(True);
IncEx(Progress, 20);
wait(5700+random(600));
end else
begin
MMouse(MSCX-27, MSCY-33, 9, 12);
wait(500+random(200));
GOTO FindClickable;
end;
end;

Procedure WaitForNotMoving;
begin
while isMoving do
Wait(500);
end;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

Procedure SetupLogin;
begin
ClearDebug;
Smart_Server := SWorld;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
end;

Procedure XPCalc;
begin
XPH := Round((Progress * 3600) / (GetTimeRunning / 1000));
if (TimeFromMark(T) > 120000) then // two minutes between progress updates
begin
Writeln('You have earned ' + IntToStr(Progress) + ' Agility at a rate of ' + IntToStr(XPH) + ' Experience per hour');
MarkTime(T);
end;
end;

begin
// player login stuff
SetupLogin;
DeclarePlayers;
LoginPlayer;
MarkTime(T);
Progress := 0;
SetAngle(0);
//main loop
LabelMainLoop:
FindNormalRandoms;
wait(300+random(200));
CrossMonkeyBars;
WaitForNotMoving;
JackAntiBan;
XPCalc;
GOTO LabelMainLoop;
end.
Slightly updated your standards, try to work on those while you are still learning to avoid learning it wrong :P