SRL Archive - RS3 Outdated / Broken Scripts

GnomeAgilityBasic


Er1k

2012-02-03 22:48:22

Status: Working but not maintaining.

I am releasing this for a few reasons.

1. Time to give something back to the community as a member :)
2. It is a basic course. You can't make anything from it except agility levels.
3. It was originally made for a personal request. Friend is getting his account back as I'm writing and I don't have p2p on my own.
4. I'm tired of watching it do the course. I finally understand why legits say agility is boring. It IS very boring. Especially when you need to run extensive testing (some 10-20h watching it run)

I am aware of the low speed and XP/H (3-5k/h compared to legit 8k). Chances are I am not going to update it soon because I'm not feeling well recently and I will not have p2p after returning account to my friend. Maybe I should get some real life…

Setup:
Position your character at the slippery log. (one or two tiles above the log is alright) (pics later)
Click north, set highest angle.
Run.

Known bugs:
- IMPORTANT: It uses UpText so if it is not detecting the Uptext, you will be stuck at places. I can add right click support / blind click, but as I said, I'm not feeling well to do this. You can update the script to work with that. (If you fix this, it will run much faster :D)
- It cannot recover from certain failures, examples being clicking the rope and getting "You can't reach that" or at the pipe with "The pipe is being used". A failsafe is added but it is not extensively tested.
- The pipe. It finds some other black colors from time to time. Your chance to fix it is here :)
- Returning to the start is based on RadialWalkTolerance. I have seen it break (usually due to people stepping on them) but chances are low. Tweak tolerance and color if you insist.

Other notes:
I highly suggest you babysit this because of the above bugs. It's for the love of your accounts :) It's quite stable in my opinion apart from the small things, at least I havent seen it do stupid things (e.g. chop a tree) after fixing most of the bugs.

I have not got a random from testing this script (leveled from 16-50, I dont know why I didnt get randoms), so I don't know whether the antirandoms works or not.

I added two debug defines (DEBUG, DEBUG_DRAW) so if you think it is not working, you should turn them on to see what the script is actually trying to find (debug draw is very useful!) If the colors are not working I suppose a basic scripter is able to find out how to update the colors and make it work.

Multiplayer is never tested. It's a template and I never use multiplayer personally.

Sorry, but I don't really play the p2p game (especially this is a friend request), so I don't think I'll be maintaining this unless I get p2p. I also tend to use my scripts to experiment new methods and things so the script is a bit messy.

Enjoy, bash and comment.

Instagationz

2012-02-04 05:10:53

Thanks alot for this, one small problem I found was if you disable smart to go talk to the talent scout then go back after and re-enable it it stops working, although this can easily be fixed in 3 seconds by stopping then starting the script again.

Er1k

2012-02-04 06:07:00

The talent scout in my opinion is a complete waste of time :) I tried it once and it was totally a ripoff - at least for the gnome basic course

Instagationz

2012-02-04 07:14:56

Ahh well all I really wanted was the gorilla head lool, also it logged out after I got a frog princess random so I assume it cant solve? Well either way this is an amazing script.

Er1k

2012-02-04 08:25:09

Random solvers are part of SRL include. AFAIK new solvers for several randoms are being tested and will be applied to SRL after testing is completed.

If you're logged out that means the antirandoms are at least working. Thanks for letting me and the others know.

DARK_G3N3SIS

2012-02-06 09:50:17

Great script, does what it should.

Er1k

2012-02-06 10:06:39

From: DARK_G3N3SIS
Great script, does what it should.


Your appreciation is most welcomed :)

Liquidd420

2012-02-06 20:37:43

Script is working good so far, have had to fix it a couple of times, but nothing to bad.

Some things I've noticed it do would be it crossing the rope, but still thinking it hasn't yet getting stuck. Also after it squeezed through the tube it stayed there, not walking over to the log to cross it. But the debug was still saying current action: log.
I'm guessing it was due to a lag spike, and thought it already walked there but actually hadn't.

Er1k

2012-02-07 19:41:27

From: Liquidd420
Script is working good so far, have had to fix it a couple of times, but nothing to bad.

Some things I've noticed it do would be it crossing the rope, but still thinking it hasn't yet getting stuck. Also after it squeezed through the tube it stayed there, not walking over to the log to cross it. But the debug was still saying current action: log.
I'm guessing it was due to a lag spike, and thought it already walked there but actually hadn't.


Lag spike/ disconnection is most probable. I have never seen anything like that during my testing, and my ping to RS is never below 150ms.

Instagationz

2012-02-08 09:06:20

Yeah it often doesnt walk to the log for me also. But that could possibly be because I just moved to sri lanka for the next few months and the internet here is complete shit.

SlyPig

2012-02-10 21:32:00

it crosses the first log and goes no further, does not click the net.

HolyWord

2012-02-10 21:56:35

Error: Exception: Access violation at line 142
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Any help?

maruti87

2012-02-12 12:06:34

HELP the bot gets stuck after the log, and sayscurrent action is: net1
current action is: net1
current action is: net1
current action is: net1
current action is: net1
current action is: net1
current action is: net1
current action is: net1

Like a billion times.

Er1k

2012-02-12 20:19:38

Update your colors gentlemen :) Turn on DEBUG_DRAW to see what it is finding. Go read some tuts to do that. I don't have time to maintain this because of real life.

klikjas

2012-02-15 10:44:03

help me it dont log in!

zgraham

2012-02-15 13:15:57

Besides the fact that it tries to log in as some random person everytime, great bot. I used it from 1-20 so far. Thanks

Er1k

2012-02-15 19:56:59

From: zgraham
Besides the fact that it tries to log in as some random person everytime, great bot. I used it from 1-20 so far. Thanks


That was some black humor :)

J J

2012-02-21 15:21:04

The script has been running very stable for me after I did some minor changes. I edited some of the colours and some other stuff. With my tweaks it is faster and more stable. I also added more random wait times to higher the anti-ban.

I have only been editing the last part. Just open the script and paste this over the currently existing part. Hope you enjoy it.

{*******************************************************************************
procedure DoCourse(action: string);
by; nosaj421
Description: Main loop that handles the course, all colors are here
Use debug_draw if you think the colors are wrong and update them
The flow has basic failsafes but I am aware of bugs :)
Use at own risk!
*******************************************************************************}
procedure DoCourse(action: string);
//var action: string;
var b, click: Boolean;
v: TVariantArray;
begin
writeln('current action is: '+ action);
while LoggedIn do
begin
case action of
'log': begin
b:= ObjFindCTS2(999278, 5, 20, 20, [],['ross'], 0, click);
v:=['log'];
if b and not click then
b:= WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='net1';
wait(4634+Random(894));
waitTillStationary;
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'net1': begin //safe so far
click:=false;
b:= ObjFindCTS2(933227, 5, 20, 20, [MSCX-10, MSCY, MSCX+10, MSY2],['imb'], 0, click);
v:=['netting'];
if b and not click then
b:=WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='branch1';
wait(3467+Random(893));
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'branch1': begin //safe so far
click:=false;
b:=ObjFindCTS2(4026251, 8, 20, 20, [MSCX-20, MSCY+10, MSCX+20, MSCY+60], ['imb'], 0, click);
v:=['above'];
if b and not click then
b:=WaitFuncEx('IsStrInBlackChat', v, 100, 2000);
if b then
begin
action:='rope';
wait(2212+Random(298));
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'rope': begin //need failsafe!
click:=false;
b:= ObjFindCTS2(4679297, 5, 10, 10, [MSCX, MSCY-10, MSX2, MSY2], ['-on '], 2, click);
if b then
b:=CheckRopeEvent;
if b then
begin
action:='branch2';
wait(3323+Random(567));
waitTillStationary;
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'branch2': begin //very safe //still wrong
b:= MouseUpText(MSCX + 110, MSCY + 30, 10, 5, ['own']);
v:=['land'];
if not b then
b:= WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='net2';
wait(1987+Random(568));
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'net2': begin //safe so far
Mouse(MSCX, MSCY-100, 5, 5, mouse_left);
wait(1283+Random(432));
waitTillStationary;
b:= ObjFindCTS2(999278, 5, 20, 20, [],['imb'], 0, click);
v:=['netting'];
if b and not click then
b:= WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='pipe';
wait(2832+Random(889));
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'pipe': //need failsafe!
begin
click:=false;
b:= ObjFindCTS2(1118482, 8, 20, 20, [MSX1, MSY1, MSX2, MSCY-50], ['ough'], 0, click);
if b then
b:=CheckPipeEvent; //have to ask this no matter what
if b then
begin
action:='ret';
wait(3949+Random(754));
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'ret': begin
if RadialWalkTolerance(1716802, 270, 265, 65, 0, 0, 15) then
begin
action:='log';
waitTillStationary;
end;
progressReport(startXP);
end;
end;
wait(43+Random(26));
AntiRandoms;
writeln('current action is: '+ action);
end;
end;

begin
Smart_Server := SmartWorld;
Smart_Members := Members;
Smart_Signed := SignedClient;
Smart_SuperDetail := HighDetail;

ClearDebug;
SetupSRL();
DeclarePlayers;

repeat
DoLogin;
while LoggedIn do
begin
SetAngle(SRL_ANGLE_HIGH);
ToggleXPBar(true);
startXP:=GetXPBarTotal;
DoCourse('log');
end;
until AllPlayersInactive;

end.

Er1k

2012-02-21 19:57:08

From: RuneScapeJJ
The script has been running very stable for me after I did some minor changes. I edited some of the colours and some other stuff. With my tweaks it is faster and more stable. I also added more random wait times to higher the anti-ban.

I have only been editing the last part. Just open the script and paste this over the currently existing part. Hope you enjoy it.


I appreciate your input on this unmaintained script :) Sorry but my main is working thieving and well past 50 agility :P

Datank

2012-02-22 04:38:54

Very nice. I can honestly say that this is the first Simba script iv been tempted to leave running over night :).

Er1k

2012-02-22 04:53:59

Don't. You will get something very nasty :)

Salut

2012-03-05 16:59:29

Great script, works well!!

I do have a minor adjustment I would like to make, maybe someone can help me out here..

When it crosses the net before the pipes in the end it always crosses the one in the middle and then squeeses through the pipe on the right


it's no biggie, but still it makes it pretty obvious to legits that you're botting when you're doing the same ziczag every single lap

What should I change to get it click on the right net patch???

ewarrior

2012-03-06 13:21:34

The graphical rework of the gnomes means this is now badly outdated.

Er1k

2012-03-06 19:56:18

From: ewarrior
The graphical rework of the gnomes means this is now badly outdated.


Nice of you to report about the update, but your wording is horrible. We don't work 24/7 for god's sake, and it's been less than 12 hours since the update.

Will mark this as outdated and rework this as I have time.

E: Wishlah PMed me his fix for the updates. I have yet to get time to verify, but here it is.

{*******************************************************************************
program GnomeAgilityBasic;
by; nosaj421
Description: Does Basic Gnome Agility Course for agility XP
Instructions: 1. Position character at the slippery log (course start sign)
2. Run.
Check out the thread at SRL Forums Agility Section for other instructions and bugs
*******************************************************************************}
program GnomeAgilityBasic;
{$DEFINE SRL5}
{$DEFINE SMART}
{$I SRL/SRL/misc/SMART.simba}
{$I SRL/SRL.simba}

//{$DEFINE DEBUG} //uncomment if you need debug info
//{$DEFINE DEBUG_DRAW} //uncomment if you need debug info

{$IFDEF DEBUG_DRAW}
{$I SRL/SRL/misc/debug.simba}
{$I SRL/SRL/misc/paintsmart.simba}
{$ENDIF}

const
SmartWorld = 1;
Members = False;
SignedClient = True;
HighDetail = False;

var startXP: integer;

procedure DeclarePlayers;
Begin
HowManyPlayers := 1; //change accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;
{
With Players[1] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;
}
End;

procedure DoLogin;
var t: integer;
begin
MarkTime(t);
while not LoggedIn do
begin
LoginPlayer;
if (TimeFromMark(t) > 180000) then
begin
srl_warn('DoLogin', 'Still not logged in after 180s - Will terminate',
warn_AllVersions);
TerminateScript;
end;
wait(5000);
end;
end;

procedure antiRandoms;
begin
if FindNormalRandoms then
if not LoggedIn then //Logged out because of random, nextplayer
begin
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
Exit;
end;
end;

procedure ProgressReport(var startXP: integer);
var gain: integer;
begin
gain := GetXPBarTotal- startXP;

writeln('Time running: ' + TimeRunning);
writeln('Exp Gained: ' + IntToStr(gain));
writeln('Est XP/H: ' + floatToStr(3600000 * 1.0 / GetTimeRunning * gain));
end;

procedure WaitTillStationary;
begin
if not LoggedIn then Exit;
repeat
wait(200+random(50));
until not IsMoving;
end;

{*******************************************************************************
function ObjFindCTS2(color, tol, atpaw, atpah: integer; area: TIntegerArray;
uptext: TStringArray; max: integer; var click: boolean): boolean;
by; nosaj421
Description: CTS2 Object Finder Wrapper using ATPA
Returns true if color is found
Finds color and tolerance and split tpa using TPAtoATPAEx into w,h
Allows area specification to search subarea of the screen
Uses UpText to determine clicking (click is always left)
Use max to filter how many TPAs to try the mouse on
click determines whether redclick has been successfully done
Default sort order of TPA is from MSCX MSCY
*******************************************************************************}
function ObjFindCTS2(color, tol, atpaw, atpah: integer; area: TIntegerArray; uptext: TStringArray; max: integer; var click: boolean): boolean;
var tcts, i: integer;
tpa: TPointArray;
tpa2: TPointArray;
atpa: T2DPointArray;
begin
Result:=False;
tcts:=GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.2, 0.2);
if not (Length(area) = 4) then
FindColorsTolerance(tpa, color, MSX1, MSY1, MSX2, MSY2, tol)
else
FindColorsTolerance(tpa, color, area[0], area[1], area[2], area[3], tol);
SetColorToleranceSpeed(tcts);
if length(tpa) < 1 then Exit;
atpa:=TPAtoATPAEx(tpa, atpaw, atpah);
if length(atpa) < 1 then Exit;
Result:=True;
setLength(tpa2, length(atpa));
for i:=0 to high(atpa) do
tpa2[i]:=MiddleTPA(atpa[i]);
SortTPAFrom(tpa2, Point(MSCX, MSCY));
{$IFDEF DEBUG_DRAW}
debugATPABounds(atpa);
{$ENDIF}
click:=false;
for i:=0 to high(tpa2) do
begin
if (i>max) then break;
Mouse(tpa2[i].x, tpa2[i].y, 2, 2, mouse_move);
if WaitUpTextMulti(uptext, 1000) then
begin
ClickMouse2(mouse_left);
click:=DidRedClick;
if click then
begin
writeln('Did red click!');
break;
end;
wait(100);
end;
end;
end;

{*******************************************************************************
function MouseUpText(x, y, rx, ry:integer; uptext: TStringArray): Boolean;
by; nosaj421
Description: Mouse and Uptext wrapper
Returns true if uptext is matched at mouse position and redclick is
successful
*******************************************************************************}
function MouseUpText(x, y, rx, ry:integer; uptext: TStringArray): Boolean;
begin
Result:=False;
Mouse(x, y, rx, ry, mouse_move);
if WaitUpTextMulti(uptext, 1000) then
begin
ClickMouse2(mouse_left);
Result:= DidRedClick;
if Result then
writeln('Did red click!');
end;
end;

{*******************************************************************************
function IsStrInBlackChat(msg: string): boolean;
by; nosaj421
Description: Regex match string in last black check message, used to check
whether we passed the obstacles succesfully
*******************************************************************************}
function IsStrInBlackChat(msg: string): boolean;
var s:string;
begin
s:= getBlackChatMessage;
Result:= ExecRegExpr(msg, s);
{$IFDEF DEBUG}
writeln('debug: '+s);
writeln('debug: trying to match: '+msg);
if Result then writeln('debug: Regex found! Success!');
{$ENDIF}
end;

{*******************************************************************************
function CheckRopeEvent: boolean;
by; nosaj421
Description: Separate wrapper to check whether we passed the rope
*******************************************************************************}
function CheckRopeEvent: boolean;
var t: integer;
begin
Result:=False;
MarkTime(t);
repeat
if IsStrInBlackChat('cross') then
begin
Result:=True;
break;
end;
if IsStrInBlackChat('reach') then break; //failure
until (TimeFromMark(t) > 5000);
end;

{*******************************************************************************
function CheckPipeEvent: Boolean;
by; nosaj421
Description: Similar wrapper to check whether we passed the pipe
*******************************************************************************}
function CheckPipeEvent: Boolean;
var t: integer;
begin
Result:=False;
MarkTime(t);
repeat
if IsStrInBlackChat('into') then
begin
Result:=True;
break;
end;
if IsStrInBlackChat('used') then break; //failure
until (TimeFromMark(t) > 5000);
end;

{*******************************************************************************
procedure DoCourse(action: string);
by; nosaj421
Description: Main loop that handles the course, all colors are here
Use debug_draw if you think the colors are wrong and update them
The flow has basic failsafes but I am aware of bugs :)
Use at own risk!
*******************************************************************************}
procedure DoCourse(action: string);
//var action: string;
var b, click: Boolean;
v: TVariantArray;
begin
writeln('current action is: '+ action);
while LoggedIn do
begin
case action of
'log': begin
b:= ObjFindCTS2(2108729, 5, 20, 20, [],['alk'], 0, click);
wait(2000);
b:= ObjFindCTS2(2700350, 5, 20, 20, [],['ross'], 0, click);
v:=['log'];
if b and not click then
b:= WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='net1';
wait(4000);
waitTillStationary;
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'net1': begin //safe so far
b:= ObjFindCTS2(3096404, 5, 20, 20, [MSCX-10, MSCY, MSCX+10, MSY2],['limb'], 0, click);
v:=['netting'];
if b and not click then
b:=WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='branch1';
wait(5000);
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'branch1': begin //safe so far
click:=false;
b:=ObjFindCTS2(3556689, 5, 20, 20, [MSCX-20, MSCY+10, MSCX+20, MSCY+60], ['imb'], 0, click);
v:=['above'];
if b and not click then
b:=WaitFuncEx('IsStrInBlackChat', v, 100, 2000);
if b then
begin
action:='rope';
wait(2000);
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'rope': begin //need failsafe!
click:=false;
b:= ObjFindCTS2(5799582, 5, 10, 10, [MSCX, MSCY-10, MSX2, MSY2], ['on '], 2, click);
if b then
b:=CheckRopeEvent;
if b then
begin
action:='branch2';
wait(4200);
waitTillStationary;
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'branch2': begin //very safe //still wrong
b:= MouseUpText(MSCX + 160, MSCY + 30, 10, 5, ['own']);
v:=['land'];
if not b then
b:= WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='net2';
wait(5000);
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'net2': begin //safe so far
Mouse(MSCX, MSCY-100, 5, 5, mouse_left);
wait(1800);
waitTillStationary;
b:= ObjFindCTS2(3096404, 5, 20, 20, [],['imb'], 0, click);
v:=['netting'];
if b and not click then
b:= WaitFuncEx('IsStrInBlackChat', v, 100, 1500);
if b then
begin
action:='pipe';
wait(4000);
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'pipe': //need failsafe!
begin
click:=false;
b:= ObjFindCTS2(1645857, 8, 20, 20, [MSX1, MSY1, MSX2, MSCY-50], ['ough'], 0, click);
if b then
b:=CheckPipeEvent; //have to ask this no matter what
if b then
begin
action:='ret';
wait(4700);
{$IFDEF DEBUG}
writeln(getBlackChatMessage);
{$ENDIF}
end;
end;
'ret': begin
if RadialWalkTolerance(1716802, 270, 265, 65, 0, 0, 15) then
begin
action:='log';
waitTillStationary;
end;
progressReport(startXP);
end;
end;
wait(50);
AntiRandoms;
writeln('current action is: '+ action);
end;
end;

begin
Smart_Server := SmartWorld;
Smart_Members := Members;
Smart_Signed := SignedClient;
Smart_SuperDetail := HighDetail;

ClearDebug;
SetupSRL();
DeclarePlayers;

repeat
DoLogin;
while LoggedIn do
begin
SetAngle(SRL_ANGLE_HIGH);
ToggleXPBar(true);
startXP:=GetXPBarTotal;
DoCourse('log');
end;
until AllPlayersInactive;

end.