SRL Archive - RS3 Outdated / Broken Scripts

Gnome agility course runner


Sp0rky

2007-03-24 14:34:17

Anyone got a working Gnome agility course runner?

Tried using this one:


/////////////////////////////////////////////////////////////////////
// ________ //
// ____ ____ / _____/ //
// / \ / __ \/ \ ___ //
// | | \| ___/\ \_\ \ //
// |___| / \___ >\______ / //
// \/ \/ \/ //
// V. BETA 1 //
/////////////////////////////////////////////////////////////////////
// This is my frist ever script. //
// Special thanks to the SRL-forums //
// And to everyone that helped me there //
// srl-forums.com //
/////////////////////////////////////////////////////////////////////

program agilrun;
{.include SRL/SRL.scar}
{
Very-Bright
Start just north of the log
(on the agility symboy works :D)

To-Do List
*Auto-Login
*Fix the Level-Up bug
*Anti-Ban
*Make "NumberOfLapsToDo" feature

}
const // Change colours here if you wish, should work as is tho.
LogColor = 9794;
NetColor = 6385808;
BranchColor = 3959683;
RopeColor = 5997215;
TreeColor = 3167850;
Net2Color = 5730440;
PipeColor = 7436416;
LapsToDo = 100;

var
Laps:integer;
rx, ry:integer;


procedure FindLog; //Log Procedure.
begin
repeat
Status('Searching for Log');
wait(50);
FindObjMultiText(x,y,'ross','ross','ross',LogColor,4);
wait(300+(200));
MMouse(x,y,2,2);
until(IsUpText('ross'));
if(IsUpText('ross'))then
begin
Status('Found Log');
Mouse(x,y,2,2,true);
LowestAngle;
end
begin
wait(50);
Status('Waiting to cross the log...');
if(FindText(x, y, 'other side', SmallChars, 17, 355, 300, 434))
then FindNet;
end;
end;




procedure FindNet; //Find Net.
begin
repeat
FindObjMultiText(x,y,'limb','limb','limb',NetColor,4)
wait(300+(200))
MMouse(x,y,2,2);
until(IsUpText('limb'));
if(IsUpText('limb'))then
Mouse(x,y,2,2,true)
else
FindNet;
begin
repeat
wait(50);
Status('Climbing the netting...')
until(InChat('climb the netting'))
wait(1500+(700))
HighestAngle;
end;
end;

procedure FindBranch; //Find Branch.
begin
repeat
FindObjMultiText(x,y,'limb','limb','limb',BranchColor,4)
wait(300+(200))
MMouse(x,y,2,2);
until(IsUpText('limb'));
if(IsUpText('limb'))then
Mouse(x,y,2,2,true)
else
FindBranch;
begin
repeat
wait(50);
Status('Climbing the Branch...')
until(InChat('the platform above'))
end;
end;

procedure FindRope; //Find Rope.
begin
repeat
FindObjMultiText(x,y,'alan','alan','alan',RopeColor,4)
wait(300+(200))
MMouse(x,y,1,1);
until(IsUpText('alan'));
if(IsUpText('alan'))then
Mouse(x,y,1,1,true)
else
FindRope;
begin
repeat
wait(50);
Status('Crossing Rope')
until(InChat('carefully cross the'))
end;
wait(5000+(1000))
end;

procedure FindTree; //Find Tree.
begin
repeat
FindObjMultiText(x,y,'down','down','down',TreeColor,4)
wait(300+(200))
MMouse(x,y,2,2);
until(IsUpText('down'));
if(IsUpText('down'))then
Mouse(x,y,2,2,true)
else
FindTree;
begin
repeat
wait(50);
Status('Climbing down tree')
until(InChat('ou land on the'))
end;
LowestAngle;
end;

procedure FindNet2; //Find Second Net.
begin
repeat
FindObjMultiText(x,y,'limb','limb','limb',Net2Color,4)
wait(300+(200))
MMouse(x,y,2,2);
until(IsUpText('limb'));
if(IsUpText('limb'))then
Mouse(x,y,2,2,true)
else
FindNet2;
begin
repeat
wait(50);
Status('Climbing Over Netting..')
until(InChat('climb the'))
end;
HighestAngle;
wait(3000+(900))
end;

procedure FindPipe; //Find Pipe.
begin
repeat
FindObjMultiText(x,y,'queeze','queeze','queeze',PipeColor,4)
wait(300+(200))
MMouse(x,y,2,2);
until(IsUpText('queeze'));
if(IsUpText('queeze'))then
Mouse(x,y,2,2,true)
else
FindPipe;
begin
if (InChat('pipe is')) then
begin
Status('Waiting for that fat bastard to get out of our pipe')
wait(5000+(1000))
FindPipe
end
else
begin
wait(10000+(1000))
end;
end;
end;



procedure FindAgility;
begin
GetSymbolColor(rx,ry,'agility');
Mouse(rx,ry,2,2,true);
Laps:= LapsToDo + 1;
if FlagPresent then wait(3000+(1000))
else FindAgility;
end;

//PROGRESS REPORT//
procedure ProgressReport;
begin
ClearDebug;
WriteLn('/////////////////////');
WriteLn('// PROGRESS REPORT //');
WriteLn('// //');
WriteLn('// Laps = ' + IntToStr(Laps) + '');
WriteLn('// Made by neG //');
WriteLn('/////////////////////');
end;

//MAIN LOOP//
begin
Setupsrl;
ActivateClient;
SetRun(true);
repeat
FindLog;
FindNet;
FindBranch;
FindRope;
FindTree;
FindNet2;
FindPipe;
FindAgility;
until(LapsToDo=LapsToDo)
if(LapsToDo=LapsToDo)then
logout;
ProgressReport
TerminateScript;
end.

But the inchat's dont seem to work ?

Any beter methods for finding this type of text?

Sp0rky

2007-03-25 03:04:23

Im guessing no-ones made one then ?

Azzon

2007-03-25 17:52:44

I was working on one the other day, its not fully complete, messes up sometimes, however it works 95% of the time…for me anyways. It features currently no anti-ban and no anti-randoms (can't say I've even gotten a random at an agility course though before…). You're welcome to try it, however I make no guarrantee's on its successfulness, and so far in my tests the longest runs its done is 5. When I tweak and improve it, I'll post an updated version, but for now…

program GnomeAgilityBot;
{.include SRL/SRL.scar}

var
tx, ty : Integer;
LapsMade, LapsToDo : Integer;
s1_Complete, s2_Complete, s3_Complete, s4_Complete : Boolean;
s5_Complete, s6_Complete, NewLap, LapComplete, FoundPipe : Boolean;

const
g_ColorTol = 12;
m_ColorTol = 40;
mMSpeed = 15;
UseBenMouse = true;
Laps = 5;

s_LogBalance_C = 606057;
s_ObstacleNet_C = 5726328;
s_TreeBranch_C = 1660014;
s_BalancingRope_C = 5931680;
s_ObstaclePipe_C = 7631997;
s_Mushroom_C = 2576031;
m_Grass_C = 939864;
m_Grass2_C = 1866099;

//##############################
//## Function: RadialWalkTol ##
//## By: XxKanexX ##
//##############################

function RadialWalkTol(TheColor,Tol:Integer; StartRadial,EndRadial:Integer; Radius:Integer; Xmod,Ymod:integer): Boolean;// By Wizzup? and WT-Fakawi.

var i: Integer;
var X1,Y1: integer;
begin

Result:=False;

if StartRadial<EndRadial then
begin
repeat
for i:=StartRadial to EndRadial do
begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
if FindColorTolerance(X,Y,TheColor,X1,Y1,X1+1,Y1+1,Tol) then
begin
MouseFindNoFlag(X,Y,Xmod,Ymod);
Result:=True;
FFlag(10);
Exit;
end
end
Radius:=Radius-4;
until Radius<=1 ;
end

if StartRadial>EndRadial then
begin
repeat
for i:=StartRadial Downto EndRadial do
begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
if FindColorTolerance(X,Y,TheColor,X1,Y1,X1+1,Y1+1,Tol) then
begin
MouseFindNoFlag(X,Y,Xmod,Ymod);
Result:=True;
FFlag(10);
Exit;
end
end
Radius:=Radius-4;
until Radius<=1;
end
end;

procedure A_Greeting;
begin
WriteLn('################################################')
WriteLn('## Welcome ##')
WriteLn('## You Are Using ##')
WriteLn('## Azzons Gnome Agility Runner Script ##')
WriteLn('## Version 1.0 ##')
WriteLn('## Enjoy ##')
WriteLn('################################################')
end;

procedure PlayerReport;
begin
ClearDebug;
WriteLn('() (============================');
WriteLn('() (= Azzons Gnome Course Bot ');
WriteLn('() (============================');
WriteLn('() (== Laps Completed - ' + IntToStr(LapsMade));
WriteLn('() (== Laps Left - ' + IntToStr(Laps - LapsMade));
WriteLn('() (============================');
WriteLn('() (== Happy Running! ');
WriteLn('() (============================');
SRLRandomsReport;
end;

procedure WaitOnFlag;
begin
repeat
Wait(1000+random(500));
until(FlagPresent = false);
end;

procedure CheckForLevel;
begin
repeat
if FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2) then
begin
FindText(x, y, 'lick', npcchars, mcx1, mcy1, mcx2, mcy2);
Mouse(x, y, 100, 12, true);
end;
Wait(500+random(500));
until(not FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2));
end;

procedure s1_LogBalance;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Log balance', s_LogBalance_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(500+random(250));
repeat
Wait(500+random(250));
CheckForLevel;
if IsChatMessage('safely') or IsChatMessage('advanced') then
begin
RadialWalkTol(m_Grass2_C, m_ColorTol, 190, 170, 15, 2, 2);
s1_Complete := true;
end;
until(s1_Complete = true);
end;

procedure s2_ObstacleNet;
begin
repeat
WaitOnFlag;
Wait(1000+random(500));
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
repeat
Wait(500+random(250));
CheckForLevel;
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s2_Complete := true;
end;
until(s2_Complete = true);
end;

procedure s3_TreeBranch;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
until (IsChatMessage('tree.') or IsChatMessage('platform') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('platform') or IsChatMessage('advanced') then
begin
Mouse(340, 165, 32, 32, true);
Wait(500+random(500));
s3_Complete := true;
end;
until(s3_Complete = true);
end;

procedure s4_BalancingRope;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Balancing rope', s_BalancingRope_C, g_ColorTol) then
begin
Mouse(x, y, 2, 2, true);
end;
Wait(750+random(250));
CheckForLevel;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('tightrope') or IsChatMessage('advanced') then
begin
s4_Complete := true;
end;
until(s4_Complete = true);
end;

procedure s5_TreeBranch;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
until(IsChatMessage('tree.') or IsChatMessage('ground') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('ground') or IsChatMessage('advanced') then
begin
RadialWalkTol(m_Grass2_C, m_ColorTol, -25, 25, 15, 2, 2);
s5_Complete := true;
end;
until(s5_Complete = true);
end;

procedure s6_ObstacleNet;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s6_Complete := true;
end;
until(s6_Complete = true);
end;

procedure s7_ObstaclePipe;
begin
repeat
WaitOnFlag;
Wait(1000+random(500));
if FindObj(x, y, 'Obstacle pipe', s_ObstaclePipe_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
FoundPipe := true;
end;
Wait(1000+random(1000));
if IsChatMessage('used') then
begin
FoundPipe := false;
end;
until(FoundPipe = true);
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if FindColorTolerance(x, y, s_Mushroom_C, msx1, msy1, msx2, msy2, g_ColorTol) then
begin
RadialWalkTol(m_Grass2_C, m_ColorTol, 265, 275, 50, 2, 2);
LapComplete := true;
end;
until(LapComplete = true);
end;


procedure SetupAgilityBot;
begin
SetupSRL;
ClearDebug;
DisguiseScar('Windows Media Player');
MouseSpeed := mMSpeed;
BenMouse := UseBenMouse;
A_Greeting;
Wait(250+random(125));
ActivateClient;
Wait(250+random(125));
end;

begin
SetupAgilityBot;
SetChat('off', 1);
SetChat('off', 1);
s1_LogBalance;
repeat
if NewLap = true then
begin
NewLap := false;
s1_LogBalance;
end;
if s1_Complete = true then
begin
s1_Complete := false;
s2_ObstacleNet;
end;
if s2_Complete = true then
begin
s2_Complete := false;
s3_TreeBranch;
end;
if s3_Complete = true then
begin
s3_Complete := false;
s4_BalancingRope;
end;
if s4_Complete = true then
begin
s4_Complete := false;
s5_TreeBranch;
end;
if s5_Complete = true then
begin
s5_Complete := false;
s6_ObstacleNet;
end;
if s6_Complete = true then
begin
s6_Complete := false;
s7_ObstaclePipe;
end;
if LapComplete = true then
begin
LapComplete := false;
LapsMade := LapsMade + 1;
PlayerReport;
NewLap := true;
end;
until(LapsMade >= Laps);
if (LapsMade >= Laps) then
begin
LogOut;
WriteLn('Training Was A Success.');
end;
end.

Let me know how and if it works for you…also, you shouldn't need to adjust colors unless it has problems, as it uses tolerance.

Good luck.

Sp0rky

2007-03-25 21:57:04

ty v. much, ill let you know how it goes :)

Sp0rky

2007-03-25 22:43:54

Script doesnt work for me unfortunately.

Cross's the log and stops at that.

Azzon

2007-03-26 01:31:06

Ok, probably doesn't find the grass color, pick a new grass color on your minimap(I assume you know how) and change m_Grass2_C to that color, and try it again, if it doesn't work, let me know, and I'll redo what it does there.

Thanks.

Sp0rky

2007-03-26 09:23:08

alright. ty :)

and ye i did know >_< lolz.

Sp0rky

2007-03-26 09:29:25

Cahnged grass color, still not working unfortunately.

Ill make a script to test whether its detecting the IsChatMessage text, because it may be that.

Edit: I thought it was a text finding problem, but this doesnt seem to be the case…


{.include SRL/SRL.scar}

var
found : boolean;

procedure TestChat;
begin
if IsChatMessage('safely') then
found := true
else found := false
end;

procedure FoundorNot;
begin
if found = true then
Writeln('Found')
else Writeln('NotFound')
end;

begin
SetupSRL;
repeat
TestChat
FoundorNot until (found = true);
end.


SRL Compiled in 203msec.
Found
Successfully executed

Azzon

2007-03-26 13:03:36

Strange because I just tested it again and got:

() (============================
() (= Azzons Gnome Course Bot
() (============================
() (== Laps Completed - 5
() (== Laps Left - 0
() (============================
() (== Happy Running!
() (============================
Training Was A Success.
Successfully executed

Ok so what I've done, to solve your problem is completely removed the RadialWalkTol function, which seems to be what's not working for you, and I have replaced it with a random mouse click on the screen below you, so that he can get closer to the nets to climb them(which is what the RadialWalkTol was for). Try this new version and let me know how it goes as I'm testing it now. Later on I see I'm going to have to improve the delay times as some are too long and some are too short, but really this script is a work in progress lol.


program GnomeAgilityBot;
{.include SRL/SRL.scar}

var
LapsMade, tries : Integer;
s1_Complete, s2_Complete, s3_Complete, s4_Complete : Boolean;
s5_Complete, s6_Complete, NewLap, LapComplete, FoundPipe, WalkingToStart : Boolean;

const
g_ColorTol = 12;
m_ColorTol = 40;
mMSpeed = 15;
UseBenMouse = true;
Laps = 5;

s_LogBalance_C = 606057;
s_ObstacleNet_C = 5726328;
s_TreeBranch_C = 1660014;
s_BalancingRope_C = 5931680;
s_ObstaclePipe_C = 7631997;
s_Mushroom_C = 2576031;

procedure A_Greeting;
begin
WriteLn('################################################')
WriteLn('## Welcome ##')
WriteLn('## You Are Using ##')
WriteLn('## Azzons Gnome Agility Runner Script ##')
WriteLn('## Version 1.0 ##')
WriteLn('## Enjoy ##')
WriteLn('################################################')
end;

procedure PlayerReport;
begin
ClearDebug;
WriteLn('() (============================');
WriteLn('() (= Azzons Gnome Course Bot ');
WriteLn('() (============================');
WriteLn('() (== Laps Completed - ' + IntToStr(LapsMade));
WriteLn('() (== Laps Left - ' + IntToStr(Laps - LapsMade));
WriteLn('() (============================');
WriteLn('() (== Happy Running! ');
WriteLn('() (============================');
SRLRandomsReport;
end;

procedure WaitOnFlag;
begin
repeat
Wait(1000+random(500));
if (not(LoggedIn)) then Exit;
until(FlagPresent = false);
end;

procedure CheckForLevel;
begin
repeat
if FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2) then
begin
FindText(x, y, 'lick', npcchars, mcx1, mcy1, mcx2, mcy2);
Mouse(x, y, 100, 12, true);
end;
Wait(500+random(500));
if (not(LoggedIn)) then Exit;
until(not FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2));
end;

procedure s1_LogBalance;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Log balance', s_LogBalance_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(500+random(250));
repeat
Wait(500+random(250));
CheckForLevel;
if IsChatMessage('safely') or IsChatMessage('advanced') then
begin
case random(3)+1 of
1: Mouse(200, 260, 32, 32, true);
2: Mouse(240, 250, 32, 32, true);
3: Mouse(300, 250, 32, 32, true);
end;
s1_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s1_Complete = true);
end;

procedure s2_ObstacleNet;
begin
repeat
WaitOnFlag;
Wait(1000+random(500));
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
repeat
Wait(500+random(250));
CheckForLevel;
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s2_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s2_Complete = true);
end;

procedure s3_TreeBranch;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until (IsChatMessage('tree.') or IsChatMessage('platform') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('platform') or IsChatMessage('advanced') then
begin
Mouse(340, 165, 32, 32, true);
Wait(500+random(500));
s3_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s3_Complete = true);
end;

procedure s4_BalancingRope;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Balancing rope', s_BalancingRope_C, g_ColorTol) then
begin
Mouse(x, y, 2, 2, true);
end;
WaitOnFlag;
Wait(500+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('tightrope') or IsChatMessage('advanced') then
begin
s4_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s4_Complete = true);
end;

procedure s5_TreeBranch;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('tree.') or IsChatMessage('ground') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('ground') or IsChatMessage('advanced') then
begin
case random(3)+1 of
1: Mouse(240, 50, 32, 32, true);
2: Mouse(170, 75, 32, 32, true);
3: Mouse(110, 90, 32, 32, true);
end;
s5_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s5_Complete = true);
end;

procedure s6_ObstacleNet;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s6_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s6_Complete = true);
end;

procedure s7_ObstaclePipe;
begin
repeat
WaitOnFlag;
Wait(1000+random(500));
if FindObj(x, y, 'Obstacle pipe', s_ObstaclePipe_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
FoundPipe := true;
end;
Wait(1000+random(1000));
if IsChatMessage('used') then
begin
FoundPipe := false;
end;
if (not(LoggedIn)) then Exit;
until(FoundPipe = true);
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if FindColorTolerance(x, y, s_Mushroom_C, msx1, msy1, msx2, msy2, g_ColorTol) then
begin
tries := 0;
repeat
if FindSymbol(x, y, 'agility') then
begin
Mouse(x, y, 12, 12, true);
WalkingToStart := true;
WaitOnFlag;
LapComplete := true;
end;
tries := tries + 1;
if (not(LoggedIn)) then Exit;
until((WalkingToStart = true) or (tries = 6));
if (tries = 6) then
begin
LogOut;
WriteLn('Couldnt find the agility symbol.');
end;
end;
until(LapComplete = true);
end;


procedure SetupAgilityBot;
begin
SetupSRL;
ClearDebug;
DisguiseScar('Windows Media Player');
MouseSpeed := mMSpeed;
BenMouse := UseBenMouse;
A_Greeting;
Wait(250+random(125));
ActivateClient;
Wait(250+random(125));
end;

begin
SetupAgilityBot;
Wait(100+random(50));
SetChat('off', 1);
SetChat('off', 1);
s1_LogBalance;
repeat
if (not(LoggedIn)) then Exit;
if NewLap = true then
begin
NewLap := false;
s1_LogBalance;
end;
if s1_Complete = true then
begin
s1_Complete := false;
s2_ObstacleNet;
end;
if s2_Complete = true then
begin
s2_Complete := false;
s3_TreeBranch;
end;
if s3_Complete = true then
begin
s3_Complete := false;
s4_BalancingRope;
end;
if s4_Complete = true then
begin
s4_Complete := false;
s5_TreeBranch;
end;
if s5_Complete = true then
begin
s5_Complete := false;
s6_ObstacleNet;
end;
if s6_Complete = true then
begin
s6_Complete := false;
s7_ObstaclePipe;
end;
if LapComplete = true then
begin
LapComplete := false;
LapsMade := LapsMade + 1;
PlayerReport;
NewLap := true;
end;
until(LapsMade >= Laps);
if (LapsMade >= Laps) then
begin
LogOut;
WriteLn('Training Was A Success.');
end;
end.

I was going to add in the CheckRun function I have in another script I made for myself but, I figured I should get this running fine for you before I add more stuff. I also noticed I didn't have 'failsafes' so now all endless repeats have a not loggedin check, which is why I posted an entirely new script. Let me know how this one works for you!

P.S. Make sure your screens as straight north as possible(not the compass, the screen itself). Good luck.

Sp0rky

2007-03-26 13:35:08

Alrite, ty v. much. Appreciate this :)

I'll test it straight away.

Edit:

Errr, lol, now it does nothing, just produces the welcome message then terminates :P

haha.


################################################
## Welcome ##
## You Are Using ##
## Azzons Gnome Agility Runner Script ##
## Version 1.0 ##
## Enjoy ##
################################################
Successfully executed

Edit 2:

Edited out the {if (not(LoggedIn)) then Exit;}

Then it ran, but clicked the log ok, then clicked the brown pit which the log is in, and did nothing.

Edit3:

Added some write lines to see where I was getting stuck. This was the result.


################################################
## Welcome ##
## You Are Using ##
## Azzons Gnome Agility Runner Script ##
## Version 1.0 ##
## Enjoy ##
################################################
In Log Balance
Left Log Balance
In Log Balance

Seems to go back into the log balance procedure after completing it?

JAD

2007-03-26 13:45:56

There were a lot of double posts in there sp0rk-eh, just try to remember to use the edit button :) And I'd like to make an agility auto, but my parents canceled membership :duh:

Azzon

2007-03-26 15:17:04

Ok, I got that problem just once…however your computer seems to handle scripts differently than mine as the logged ins don't cause me problems…and my script runs just fine…hmm ok try replacing s1_LogBalance with:

procedure s1_LogBalance;
begin
repeat
if FindObj(x, y, 'Log balance', s_LogBalance_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
WaitOnFlag;
Wait(500+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(500+random(250));
repeat
Wait(500+random(250));
CheckForLevel;
if IsChatMessage('safely') or IsChatMessage('advanced') then
begin
case random(3)+1 of
1: Mouse(200, 260, 32, 32, true);
2: Mouse(240, 250, 32, 32, true);
3: Mouse(300, 250, 32, 32, true);
end;
s1_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s1_Complete = true);
end;

Only thing I can think of is its delaying too long and it doesn't see that it's completed what it was doing. Lemme know how it goes.

Sp0rky

2007-03-26 17:50:26

I edited it and it seems to run alright now. Mess's up on the pipe if someone is in it.

Any fix for taht procedure? :P I can't think of a way.


program GnomeAgilityBot;
{.include SRL/SRL.scar}

var
LapsMade, tries : Integer;
s1_Complete, s2_Complete, s3_Complete, s4_Complete : Boolean;
s5_Complete, s6_Complete, NewLap, LapComplete, FoundPipe, WalkingToStart : Boolean;

const
g_ColorTol = 12;
m_ColorTol = 40;
mMSpeed = 15;
UseBenMouse = true;
Laps = 5;

s_LogBalance_C = 606057;
s_ObstacleNet_C = 6701;
s_TreeBranch_C = 1326673;
s_BalancingRope_C = 5931680;
s_ObstaclePipe_C = 7631997;
s_Mushroom_C = 2576031;

procedure A_Greeting;
begin
WriteLn('################################################')
WriteLn('## Welcome ##')
WriteLn('## You Are Using ##')
WriteLn('## Azzons Gnome Agility Runner Script ##')
WriteLn('## Version 1.0 ##')
WriteLn('## Enjoy ##')
WriteLn('################################################')
end;

procedure PlayerReport;
begin
ClearDebug;
WriteLn('() (============================');
WriteLn('() (= Azzons Gnome Course Bot ');
WriteLn('() (============================');
WriteLn('() (== Laps Completed - ' + IntToStr(LapsMade));
WriteLn('() (== Laps Left - ' + IntToStr(Laps - LapsMade));
WriteLn('() (============================');
WriteLn('() (== Happy Running! ');
WriteLn('() (============================');
SRLRandomsReport;
end;

procedure WaitOnFlag;
begin
repeat
Wait(1000+random(500));
if (not(LoggedIn)) then Exit;
until(FlagPresent = false);
end;

procedure CheckForLevel;
begin
repeat
if FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2) then
begin
FindText(x, y, 'lick', npcchars, mcx1, mcy1, mcx2, mcy2);
Mouse(x, y, 100, 12, true);
end;
Wait(500+random(500));
if (not(LoggedIn)) then Exit;
until(not FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2));
end;

procedure s1_LogBalance;
begin
HighestAngle;
Writeln('In Log Balance');
repeat
WaitOnFlag;
if FindObj(x, y, 'Log balance', s_LogBalance_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(500+random(250));
repeat
Wait(500+random(250));
CheckForLevel;
if IsChatMessage('safely') or IsChatMessage('advanced') then
begin
begin
LowestAngle;
end;
s1_Complete := true;
MakeCompass('S');
Writeln('Left Log Balance');
end;
if (not(LoggedIn)) then Exit;
until(s1_Complete = true);
end;

procedure s2_ObstacleNet;
begin
Writeln('In ObstacleNet');
repeat
WaitOnFlag;
Wait(1000+random(500));
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
repeat
Wait(500+random(250));
CheckForLevel;
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s2_Complete := true;
Writeln('Left ObstacleNet');
HighestAngle;
end;
if (not(LoggedIn)) then Exit;
until(s2_Complete = true);
end;

procedure s3_TreeBranch;
begin
Writeln('In TreeBranch');
HighestAngle;
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until (IsChatMessage('tree.') or IsChatMessage('platform') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('platform') or IsChatMessage('advanced') then
begin
Mouse(340, 165, 32, 32, true);
Wait(500+random(500));
s3_Complete := true;
Writeln('Left TreeBranch');
end;
if (not(LoggedIn)) then Exit;
until(s3_Complete = true);
end;

procedure s4_BalancingRope;
begin
Writeln('In BalancingRope');
repeat
WaitOnFlag;
if FindObj(x, y, 'Balancing rope', s_BalancingRope_C, g_ColorTol) then
begin
Mouse(x, y, 2, 2, true);
end;
WaitOnFlag;
Wait(500+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('tightrope') or IsChatMessage('advanced') then
begin
s4_Complete := true;
Writeln('Left BalancingRope');
end;
if (not(LoggedIn)) then Exit;
until(s4_Complete = true);
end;

procedure s5_TreeBranch;
begin
Writeln('In TreeBranch');
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('tree.') or IsChatMessage('ground') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('ground') or IsChatMessage('advanced') then
begin
MakeCompass('N');
case random(3)+1 of
1: Mouse(240, 50, 32, 32, true);
2: Mouse(170, 75, 32, 32, true);
3: Mouse(110, 90, 32, 32, true);
end;
s5_Complete := true;
Writeln('Left TreeBranch');

end;
if (not(LoggedIn)) then Exit;
until(s5_Complete = true);
end;

procedure s6_ObstacleNet;
begin
MakeCompass('N');
Writeln('In ObstacleNet');
repeat
WaitOnFlag;
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s6_Complete := true;
Writeln('Left ObstacleNet');
end;
if (not(LoggedIn)) then Exit;
until(s6_Complete = true);
end;

procedure s7_ObstaclePipe;
begin
Writeln('In ObstaclePipe');
wait(2000);
repeat
WaitOnFlag;
Wait(1000+random(500));
if FindObj(x, y, 'Obstacle pipe', s_ObstaclePipe_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
FoundPipe := true;
end;
Wait(1000+random(1000));
if IsChatMessage('used') then
begin
FoundPipe := false;
s7_ObstaclePipe;
end;
if (not(LoggedIn)) then Exit;
until(FoundPipe = true);
Wait(250+random(125));
repeat
CheckForLevel;
Wait(500+random(250));
if FindColorTolerance(x, y, s_Mushroom_C, msx1, msy1, msx2, msy2, g_ColorTol) then
begin
tries := 0;
repeat
if FindSymbol(x, y, 'agility') then
begin
Mouse(x, y, 12, 12, true);
WalkingToStart := true;
WaitOnFlag;
LapComplete := true;
Writeln('Left ObstaclePipe');
end;
tries := tries + 1;
if (not(LoggedIn)) then Exit;
until((WalkingToStart = true) or (tries = 6));
if (tries = 6) then
begin
LogOut;
WriteLn('Couldnt find the agility symbol.');
end;
end;
until(LapComplete = true);
end;


procedure SetupAgilityBot;
begin
SetupSRL;
ClearDebug;
DisguiseScar('Windows Media Player');
MouseSpeed := mMSpeed;
BenMouse := UseBenMouse;
A_Greeting;
Wait(250+random(125));
ActivateClient;
Wait(250+random(125));
end;

begin
SetupAgilityBot;
Wait(100+random(50));
SetChat('off', 1);
SetChat('off', 1);
repeat
begin
NewLap := false;
s1_LogBalance;
s2_ObstacleNet;
s3_TreeBranch;
s4_BalancingRope;
s5_TreeBranch;
s6_ObstacleNet;
s7_ObstaclePipe;
end;
begin
LapComplete := false;
LapsMade := LapsMade + 1;
PlayerReport;
NewLap := true;
end;
until(LapsMade = Laps);
if (LapsMade = Laps) then
begin
LogOut;
WriteLn('Training Was A Success.');
end;
end.

Azzon

2007-03-26 18:59:34

Ok, added a better wait time, as we don't know when he'll make it to the pipe and get the message so I added the wait on flag procedure after he clicks, and it should solve that problem. Try it again and see how it works…if it works then I'll begin working on adding my checkrun procedure into it, and then uploading that. As it stands right now, I'm going to test him and see how many runs it goes for without failing.

EDIT1: Added another find used pipe routine as the one I posted didn't work(did 9 runs, stopped on a guy using a pipe, so now got a new routine I'm tring.) If you get this before I get it working perfectly, then let me know how it goes if there is someone using the pipe. Thanks.

EDIT2: Tested alot, found several bugs which caused fatal problems, set up failsafes for the ones I found. I added some comments. I added the checkrun procedure as well, set a new color for the pipe, fixed the pipe finding. New pipe finding appears to work great, had no problems did 11 runs before getting a random(adding anti-randoms as we speak then I'll edit again, I wanted to remove the old s7 procedure though before you went and tested it and found it don't work so great.)

However, you may need to re-add all your fixes, but first if you would, test the script, and if it don't work again, then put back in your changes, and test it. As, I find it interesting how what works great for me doesn't work very good with you, but works with the minor adjustments you did.

If it works out good, post a progress report please, and if you could, pass the script onto me as well please.

If all goes good, I will comment on everything, and I'd like to release it to the public. However, I'd like to also include yours with the tweaks as well incase other people have similar problems as you. Thanks.

EDIT3: Ok heres the script with Anti-Randoms. It's a bit laggier and a tad slower than before due to random checking but safer from randoms now. I think i've fixed any problems with the logs(cause of anti-randoms I missed the completion of the log everytime.) So here's the script, let me know how it goes for you. : )

I gotta go for now so I only did one test, but I'll do more when I get back. If you test before I get back, let me know how it goes!

EDIT4: Randoms didn't work without setting up players, so here's, hopefully, the final version : ).


program GnomeAgilityBot;
{.include SRL/SRL.scar}

var
LapsMade, tries, WaitOnPipe, LapsTillCheckRun, WaitOnFlagLoops : Integer;
FirstLap, s1_Complete, s2_Complete, s3_Complete, s4_Complete : Boolean;
s5_Complete, s6_Complete, NewLap, LapComplete, FoundPipe, WalkingToStart : Boolean;

//################################################################
//## Script Setup ##
//################################################################

const
g_ColorTol = 16; //Game Screen Color Tolerance
mMSpeed = 15; //The Mouse Speed
UseBenMouse = true; //UseBenMouse, I Personally Recommend Leaving It 'True'
Laps = 138; //Number Of Laps You Want The Script To Run For
CheckRunLapDelay = 10; //Number Of Laps To Complete Before Calling CheckRun Again

NumberOfAccounts = 1; //Only Designed For One
FirstAccount = 0; //Basically Right Now, Don't Touch

//################################
//## Note: Unless You Experience##
//## Color Problems, It Is ##
//## Recommended To Leave The ##
//## Color's As-Is. ##
//################################

s_LogBalance_C = 606057; //Obstacle 1, Log Color
s_ObstacleNet_C = 5726328; //Obstacle 2 and Obstacle 6, Net Color
s_TreeBranch_C = 1660014; //Obstace 3, and Obstacle 5, Tree Color
s_BalancingRope_C = 5931680; //Obstacle 4, Rope Color
s_ObstaclePipe_C = 3685440; //Obstacle 7, Pipe Color
s_Mushroom_C = 2576031; //End Of Obstacle 7, Mushroom Color

//################################################################
//################################################################

procedure SetupPlayers;
begin
HowManyplayers := NumberOfAccounts;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := FirstAccount;

Players[0].Name := '';
Players[0].Pass := '' ;
Players[0].Nick := '';
Players[0].Active := True;

WriteLn(IntTostr(HowManyPlayers) + ' Players');
end;

procedure A_Greeting;
begin
WriteLn('#################################')
WriteLn('## Welcome ##')
WriteLn('## You Are Using ##')
WriteLn('## A Script Created By Azzon ##')
WriteLn('## Enjoy ##')
WriteLn('#################################')
end;

procedure PlayerReport;
begin
ClearDebug;
WriteLn('() (============================');
WriteLn('() (= Azzons Gnome Agility Course Bot');
WriteLn('() (============================');
WriteLn('() (== Laps Completed - ' + IntToStr(LapsMade));
WriteLn('() (== Laps Left - ' + IntToStr(Laps - LapsMade));
WriteLn('() (============================');
WriteLn('() (== Happy Running! ');
WriteLn('() (============================');
SRLRandomsReport;
end;

procedure AntiRandoms;
begin
FTWait(2);
FindNormalRandoms;
end;

procedure WaitOnFlag;
begin
WaitOnFlagLoops := 0;
repeat
Wait(1000+random(500));
WaitOnFlagLoops := WaitOnFlagLoops + 1;
if WaitOnFlagLoops = 12 then
begin
Mouse(250, 210, 32, 32, true);
end;
if (not(LoggedIn)) then Exit;
until(FlagPresent = false);
end;

procedure CheckRun;
begin
GameTab(11);
Wait(500+random(250));
if FindText(x, y, '100', smallchars, 628, 411, 667, 450) then
begin
SetRun(true);
end;
Wait(500+random(250));
GameTab(4);
Wait(250+random(125));
end;

procedure CheckForLevel;
begin
repeat
if FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2) then
begin
FindText(x, y, 'lick', npcchars, mcx1, mcy1, mcx2, mcy2);
Mouse(x, y, 100, 12, true);
end;
Wait(500+random(500));
if (not(LoggedIn)) then Exit;
until(not FindText(x, y, 'continue', npcchars, mcx1, mcy1, mcx2, mcy2));
end;


procedure s1_LogBalance;
begin
tries := 0;
repeat
if (tries = 4) then
begin
if FindSymbol(x, y, 'agility') then
begin
Mouse(x, y, 12, 12, true);
WaitOnFlag;
tries := 0;
end;
end;
AntiRandoms;
if FindObj(x, y, 'Log balance', s_LogBalance_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
WaitOnFlag;
end;
tries := tries + 1;
Wait(500+random(250));
if (not(LoggedIn)) then Exit;
until(IsChatMessage('carefully') or IsChatMessage('safely') or IsChatMessage('advanced'));
Wait(500+random(250));
CheckForLevel;
AntiRandoms;
repeat
Wait(500+random(250));
CheckForLevel;
AntiRandoms;
if IsChatMessage('safely') or IsChatMessage('advanced') then
begin
case random(3)+1 of
1: Mouse(200, 260, 32, 32, true);
2: Mouse(240, 250, 32, 32, true);
3: Mouse(300, 250, 32, 32, true);
end;
s1_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s1_Complete = true);
end;

procedure s2_ObstacleNet;
begin
repeat
WaitOnFlag;
Wait(1000+random(500));
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
AntiRandoms;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
repeat
Wait(500+random(250));
CheckForLevel;
AntiRandoms;
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s2_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s2_Complete = true);
end;

procedure s3_TreeBranch;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
AntiRandoms;
if (not(LoggedIn)) then Exit;
until (IsChatMessage('tree.') or IsChatMessage('platform') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
AntiRandoms;
Wait(500+random(250));
if IsChatMessage('platform') or IsChatMessage('advanced') then
begin
Mouse(340, 165, 32, 32, true);
Wait(500+random(500));
s3_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s3_Complete = true);
end;

procedure s4_BalancingRope;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Balancing rope', s_BalancingRope_C, g_ColorTol) then
begin
Mouse(x, y, 2, 2, true);
end;
WaitOnFlag;
Wait(500+random(250));
CheckForLevel;
AntiRandoms;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('carefully') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
AntiRandoms;
Wait(500+random(250));
if IsChatMessage('tightrope') or IsChatMessage('advanced') then
begin
s4_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s4_Complete = true);
end;

procedure s5_TreeBranch;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Tree branch', s_TreeBranch_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
AntiRandoms;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('tree.') or IsChatMessage('ground') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
AntiRandoms;
Wait(500+random(250));
if IsChatMessage('ground') or IsChatMessage('advanced') then
begin
case random(3)+1 of
1: Mouse(240, 50, 32, 32, true);
2: Mouse(170, 75, 32, 32, true);
3: Mouse(110, 90, 32, 32, true);
end;
s5_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s5_Complete = true);
end;

procedure s6_ObstacleNet;
begin
repeat
WaitOnFlag;
if FindObj(x, y, 'Obstacle net', s_ObstacleNet_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
end;
Wait(750+random(250));
CheckForLevel;
AntiRandoms;
if (not(LoggedIn)) then Exit;
until(IsChatMessage('netting') or IsChatMessage('advanced'));
Wait(250+random(125));
repeat
CheckForLevel;
AntiRandoms;
Wait(500+random(250));
if IsChatMessage('netting') or IsChatMessage('advanced') then
begin
s6_Complete := true;
end;
if (not(LoggedIn)) then Exit;
until(s6_Complete = true);
end;

procedure PipeFinding;
begin
repeat
WaitOnFlag;
Wait(500+random(500));
if FindObj(x, y, 'Obstacle pipe', s_ObstaclePipe_C, g_ColorTol) then
begin
Mouse(x, y, 6, 6, true);
WaitOnFlag;
Wait(500+random(500));
if IsChatMessage('being') then
begin
FoundPipe := false;
end else
begin
FoundPipe := true;
WaitOnPipe := 0;
end;
end;
Wait(500+random(500));
AntiRandoms;
if (not(LoggedIn)) then Exit;
until(FoundPipe = true);
end;

procedure s7_ObstaclePipe;
begin
PipeFinding;
Wait(250+random(125));
repeat
CheckForLevel;
AntiRandoms;
Wait(500+random(250));
if FindColorTolerance(x, y, s_Mushroom_C, msx1, msy1, msx2, msy2, g_ColorTol) then
begin
tries := 0;
repeat
if FindSymbol(x, y, 'agility') then
begin
Mouse(x, y, 12, 12, true);
WalkingToStart := true;
WaitOnFlag;
LapComplete := true;
end;
tries := tries + 1;
if (not(LoggedIn)) then Exit;
until((WalkingToStart = true) or (tries = 12));
if (tries = 12) then
begin
LogOut;
WriteLn('Couldnt find the agility symbol.');
end;
end else
begin
WaitOnPipe := WaitOnPipe + 1;
end;
if (WaitOnPipe = 5) then
begin
PipeFinding;
end;
until(LapComplete = true);
end;


procedure SetupAgilityBot;
begin
SetupSRL;
ClearDebug;
DisguiseScar('Windows Media Player');
MouseSpeed := mMSpeed;
BenMouse := UseBenMouse;
A_Greeting;
Wait(250+random(125));
ActivateClient;
Wait(250+random(125));
FirstLap := true;
SetupPlayers;
CurrentPlayer := FirstAccount;
LoginPlayer;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, Upchars);
end;

begin
SetupAgilityBot;
Wait(100+random(50));
SetChat('off', 1);
SetChat('off', 1);
repeat
if (not(LoggedIn)) then Exit;
if (FirstLap = true) then
begin
LapsTillCheckRun := CheckRunLapDelay;
CheckRun;
Wait(250+random(100));
FirstLap := false;
s1_LogBalance;
end;
if LapsTillCheckRun <= 0 then
begin
LapsTillCheckRun := CheckRunLapDelay;
CheckRun;
end;
if NewLap = true then
begin
NewLap := false;
LapsTillCheckRun := LapsTillCheckRun - 1;
s1_LogBalance;
end;
if s1_Complete = true then
begin
s1_Complete := false;
s2_ObstacleNet;
end;
if s2_Complete = true then
begin
s2_Complete := false;
s3_TreeBranch;
end;
if s3_Complete = true then
begin
s3_Complete := false;
s4_BalancingRope;
end;
if s4_Complete = true then
begin
s4_Complete := false;
s5_TreeBranch;
end;
if s5_Complete = true then
begin
s5_Complete := false;
s6_ObstacleNet;
end;
if s6_Complete = true then
begin
s6_Complete := false;
s7_ObstaclePipe;
end;
if LapComplete = true then
begin
LapComplete := false;
LapsMade := LapsMade + 1;
PlayerReport;
NewLap := true;
end;
until(LapsMade >= Laps);
if (LapsMade >= Laps) then
begin
LogOut;
WriteLn('Training Was A Success.');
end;
end.

FrÕzÑ_§ÕµL

2007-09-02 03:05:40

Script now works on SRL 4 BETA with SCAR 3.11 go to http://www.villavu.com/forum/showthread.php?t=16551

Wizzup?

2007-09-02 04:47:19

I fixed mine yesterday….

<><><><><> Wizzy Gnome Courser <><><><><><>

Worked For 1 Hours, 11 Minutes and 11 Seconds
Did 62 Round

<><><><><><><><><><><><><><><><><><><><><><>