SRL Archive - Jr. Member General Help and Discussion

Need help osrs agility script


BigRedJapan

2015-03-08 01:21:02

I have the basics done. it finds and clicks flawless and Just need some help with sps.

DTMS are not working well for positioning.

Was wondering if someone could help me with sps positons.

ONly need SPS for loop positions if someone can help this script is a go.

Also was wondering if there is Updated SPS for OSRS.


program DraynorAgility;

{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}

//Made By Rules

Var
X, Y, Agility, Rope1, Rope2, Balance, Jump, Box:Integer;


Procedure DeclarePlayer;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; // ***Username***
Players[0].Pass := ''; // ***PW***
Players[0].WorldInfo := []; // ***Desired World, leave blank if random***
Players[0].Nick := ''; // ***Portion of display name, IMPORTANT FOR RANDOMS***
Players[0].Active := True;
End;


Procedure Login;
begin
LogInPlayer;
end;

Procedure DTMz;
begin

Agility := DTMFromString('m6wAAAHic42ZgYGADYm4g5oNiEJsViBkZEIAZiNmhahmhNCcQ8yLp4UDTx8jISDQmBTCSgJEAAIodAMo=');
Rope1 := DTMFromString('m1gAAAHic42JgYAhlhmA/IPaG4kAgjgbieCiOAWIXRgYGcyi2A2IvIPaHYk8gtoXKNTRUEIWJBYxEYgQAAIq6FNY=');
Rope2 := DTMFromString('m6wAAAHiclcrBCoAgAIPhSceeMIkIJKGS0Ajs6KP3Bx465uBjh62XtHTSBIcNEQk7PGZYDO9u+GOsveLAhYwTAR6l3L+1xDT45AFygBlW');
Balance := DTMFromString('m6wAAAHic42ZgYOhkZmDoAOIGNNwOxP1APAEJpzEyMERCcTIQZwNxIRLOAuIkqHxDQwXRmBTASAJGAgCJSRqg');
Jump := DTMFromString('mwQAAAHic42RgYJBlYmDgBWJuIOYHYi0oVgBiHiAWAOJQRgaGQCAugeIoIA4G4iAgToTihoYKgpgYwEgEhgMAmGcRiQ==');
Box := DTMFromString('m6wAAAHic42ZgYLBmgmAjINaHYksgdgRidyD2AGJPqFgKIwNDBBCHAnEyEBcAcSEUg9gg+UggjgbihoYKovBTBtIAIwkYCQAAiTsWrA==');


end;



Function ClimbWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
MakeCompass('W');
if FindObjCustom(X, Y, ['Climb', 'Rou', 'ough wa'], [858658, 2243147, 2045767], 6)then
begin
MMouse(x, y, 3, 3);
wait(randomrange(150, 200));
if WaitUpText('Climb', randomrange(150, 200)) then
writeLn('Climbing Wall');
ClickMouse2(mouse_Right);
WaitUpText('Cimb', randomrange(300, 400));
ChooseOptionMulti(['Cimb', 'Rou']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function CrossTightRope: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
MakeCompass('W');
if FindObjCustom(X, Y, ['Cross', 'Tigh', 'rope'], [2504771, 3032659, 3493725], 6)then
begin
MMouse(x, y, 3, 3);
wait(randomrange(150, 200));
if WaitUpText('Cross', randomrange(150, 200)) then
writeLn('Crossing Rope');
ClickMouse2(mouse_Right);
WaitUpText('Cross', randomrange(300, 400));
ChooseOptionMulti(['Cross', 'Tighrope']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function BalanceNarrowWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
MakeCompass('W');
if FindObjCustom(X, Y, ['Balance', 'Narrow', 'wall'], [14401, 605511, 13115], 6)then
begin
MMouse(x, y, 3, 3);
wait(randomrange(150, 200));
if WaitUpText('Balance', randomrange(150, 200)) then
writeLn('Balancing Wall');
ClickMouse2(mouse_Right);
WaitUpText('Balance', randomrange(300, 400));
ChooseOptionMulti(['Balance', 'Narrow', 'wall']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function JumpUpWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
MakeCompass('W');
if FindObjCustom(X, Y, ['Jump', '-up', 'wall'], [7982, 4013377, 12347], 6)then
begin
MMouse(x, y, 3, 3);
wait(randomrange(150, 200));
if WaitUpText('Jump', randomrange(150, 200)) then
writeLn('Jumping Wall');
ClickMouse2(mouse_Right);
WaitUpText('Jump', randomrange(300, 400));
ChooseOptionMulti(['Jump', '-up', 'wall']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;

Function JumpGap: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
MakeCompass('E');
if FindObjCustom(X, Y, ['Gap'], [3752543, 1845581, 1320014], 6)then
begin
MMouse(x, y, 3, 3);
wait(randomrange(150, 200));
if WaitUpText('Gap', randomrange(150, 200)) then
writeLn('Jumping Gap');
ClickMouse2(mouse_Right);
WaitUpText('Gap', randomrange(300, 400));
ChooseOptionMulti(['Gap']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function ClimbCrate: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
MakeCompass('E');
if FindObjCustom(X, Y, ['Climb-','-down','Crate'], [6184542, 5658198, 5263440], 6)then
begin
MMouse(x, y, 3, 3);
wait(randomrange(150, 200));
if WaitUpText('Climb-', randomrange(150, 200)) then
writeLn('Climb Boxes');
ClickMouse2(mouse_Right);
WaitUpText('Climb-', randomrange(300, 400));
ChooseOptionMulti(['Climb-','-down','Crate']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function AgilityIcon: Boolean;
begin
ClickDTMRotatedIn(Agility, MMX1, MMY1, MMX2, MMY2, - Pi, Pi, Pi / 30, [], mouse_Left);
Result := True;
end;

Procedure FreeDTMz;
begin

FreeDTM(Agility);
FreeDTM(Rope1);
FreeDTM(Rope2);
FreeDTM(Balance);
FreeDTM(Jump);
FreeDTM(Box);

end;

Procedure Loop;
begin
If AgilityIcon then
begin
ClimbWall;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Rope1, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
CrossTightRope;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Rope2, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
CrossTightRope;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Balance, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
BalanceNarrowWall;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Jump, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
JumpUpWall;
Wait(RandomRange(1000,1500));
JumpGap;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Box, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
ClimbCrate;
Wait(RandomRange(1000,1500));
end else
if Not AgilityIcon then
begin
AgilityIcon;
Wait(RandomRange(1000,1500));
ClimbWall;
Wait(RandomRange(1000,1500));
end;
end;


begin
SetUpSRL;
ActivateClient;
MouseSpeed:=80;
DTMz;

FindNormalRandoms;
DeclarePlayer;
Login;


repeat;
loop;
Until(False);

FreeDTMz;

end.

Harrier

2015-03-08 05:17:30

You should use aerolibs rswalker, since SPS on OSRS is quite inaccurate

BigRedJapan

2015-03-08 13:36:42

Ive already tried but the hooks are invalid and dont grab the right coords.

Harrier

2015-03-08 14:14:06

From: Rules of Joe
Ive already tried but the hooks are invalid and dont grab the right coords.

RSWalker doesn't use reflection, and it does return the correct tile the majority of the time (Set the Pid to -1 if you do run into issues)

BigRedJapan

2015-03-08 15:22:40

Thanks ill try it out. Can I load my Personal Maps. Cuz the Agility Course has its own MM

BigRedJapan

2015-03-08 21:54:54

Ive Tried OSR-SPS, ORS Walker, Reflection non are up to date or work with custom maps. why is walking so difficult.

Flight

2015-03-08 22:25:29

From: Rules of Joe
Ive Tried OSR-SPS, ORS Walker, Reflection non are up to date or work with custom maps. why is walking so difficult.


If you have AeroLib here's an example of how to use it.

BigRedJapan

2015-03-08 22:46:37

@flight my script isnt LAPE

Flight

2015-03-08 23:20:28

From: Rules of Joe
@flight my script isnt LAPE


Try this out:

program DraynorAgility;
{$DEFINE SMART}
{$DEFINE WALKER}
{$i AeroLib/AeroLib.Simba}

//Made By Rules

Var
X, Y, Agility, Rope1, Rope2, Balance, Jump, Box:Integer;


procedure declarePlayer();
begin
Me.Name := '';
Me.Pass := '';
Me.Pin := '';
Me.Nick := '';
Me.LampSkill := SKILL_FARMING;
Me.Member := True;
Me.Active := True;
end;


Procedure Login;
begin
loginPlayer(false)
end;

Procedure DTMz;
begin

Agility := DTMFromString('m6wAAAHic42ZgYGADYm4g5oNiEJsViBkZEIAZiNmhahmhNCcQ8yLp4UDTx8jISDQmBTCSgJEAAIodAMo=');
Rope1 := DTMFromString('m1gAAAHic42JgYAhlhmA/IPaG4kAgjgbieCiOAWIXRgYGcyi2A2IvIPaHYk8gtoXKNTRUEIWJBYxEYgQAAIq6FNY=');
Rope2 := DTMFromString('m6wAAAHiclcrBCoAgAIPhSceeMIkIJKGS0Ajs6KP3Bx465uBjh62XtHTSBIcNEQk7PGZYDO9u+GOsveLAhYwTAR6l3L+1xDT45AFygBlW');
Balance := DTMFromString('m6wAAAHic42ZgYOhkZmDoAOIGNNwOxP1APAEJpzEyMERCcTIQZwNxIRLOAuIkqHxDQwXRmBTASAJGAgCJSRqg');
Jump := DTMFromString('mwQAAAHic42RgYJBlYmDgBWJuIOYHYi0oVgBiHiAWAOJQRgaGQCAugeIoIA4G4iAgToTihoYKgpgYwEgEhgMAmGcRiQ==');
Box := DTMFromString('m6wAAAHic42ZgYLBmgmAjINaHYksgdgRidyD2AGJPqFgKIwNDBBCHAnEyEBcAcSEUg9gg+UggjgbihoYKovBTBtIAIwkYCQAAiTsWrA==');


end;



Function ClimbWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Climb', 'Rou', 'ough wa'], [858658, 2243147, 2045767], 6)then
if findMSObjectSimple([858658, 2243147, 2045767], ['Climb', 'Rou', 'ough wa']) then
begin
writeLn('Climbing Wall');
fastClick(mouse_Right);
WaitUpText('Cimb', randomrange(300, 400));
ChooseOptionMulti(['Cimb', 'Rou']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function CrossTightRope: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Cross', 'Tigh', 'rope'], [2504771, 3032659, 3493725], 6)then
if findMSObjectSimple([2504771, 3032659, 3493725], ['Cross', 'Tigh', 'rope']) then
begin
writeLn('Crossing Rope');
fastClick(mouse_Right);
WaitUpText('Cross', randomrange(300, 400));
ChooseOptionMulti(['Cross', 'Tighrope']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function BalanceNarrowWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Balance', 'Narrow', 'wall'], [14401, 605511, 13115], 6)then
if findMSObjectSimple([14401, 605511, 13115], ['Balance', 'Narrow', 'wall']) then
begin
writeLn('Balancing Wall');
fastClick(mouse_Right);
WaitUpText('Balance', randomrange(300, 400));
ChooseOptionMulti(['Balance', 'Narrow', 'wall']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function JumpUpWall: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('W');
//if FindObjCustom(X, Y, ['Jump', '-up', 'wall'], [7982, 4013377, 12347], 6)then
if findMSObjectSimple([7982, 4013377, 12347], ['Jump', '-up', 'wall']) then
begin
writeLn('Jumping Wall');
fastClick(mouse_Right);
WaitUpText('Jump', randomrange(300, 400));
ChooseOptionMulti(['Jump', '-up', 'wall']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;

Function JumpGap: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('E');
//if FindObjCustom(X, Y, ['Gap'], [3752543, 1845581, 1320014], 6)then
if findMSObjectSimple([3752543, 1845581, 1320014], ['Gap']) then
begin
writeLn('Jumping Gap');
fastClick(mouse_Right);
WaitUpText('Gap', randomrange(300, 400));
ChooseOptionMulti(['Gap']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function ClimbCrate: Boolean; // A boolean returns true or false.
begin
SetAngle(1);
setCompass('E');
//if FindObjCustom(X, Y, ['Climb-','-down','Crate'], [6184542, 5658198, 5263440], 6)then
if findMSObjectSimple([6184542, 5658198, 5263440], ['Climb-','-down','Crate']) then
begin
writeLn('Climb Boxes');
fastClick(mouse_Right);
WaitUpText('Climb-', randomrange(300, 400));
ChooseOptionMulti(['Climb-','-down','Crate']);
Result := True; // If it finds & clicks the judge, result is true.
end;
end;


Function AgilityIcon: Boolean;
var
mmPnt : TPoint;
begin
if DTM_findBestPointEx([Agility], AREA_MM, mmPnt) then
begin
Result := True;
mouse(mmPnt, 5, 5, MOUSE_LEFT);
end;
end;

Procedure FreeDTMz;
begin

FreeDTM(Agility);
FreeDTM(Rope1);
FreeDTM(Rope2);
FreeDTM(Balance);
FreeDTM(Jump);
FreeDTM(Box);

end;

Procedure Loop;
begin
If AgilityIcon then
begin
ClimbWall;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Rope1, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
CrossTightRope;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Rope2, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
CrossTightRope;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Balance, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
BalanceNarrowWall;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Jump, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
JumpUpWall;
Wait(RandomRange(1000,1500));
JumpGap;
Wait(RandomRange(1000,1500));
end;
if FindDTM(Box, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
ClimbCrate;
Wait(RandomRange(1000,1500));
end else
if Not AgilityIcon then
begin
AgilityIcon;
Wait(RandomRange(1000,1500));
ClimbWall;
Wait(RandomRange(1000,1500));
end;
end;


begin
declarePlayer();
initAL();
MouseSpeed:=30;
DTMz;

waitEx(1);

repeat;
loop;
Until(False);

FreeDTMz;
end.

Turpinator

2015-03-08 23:54:19

From: Rules of Joe
Ive Tried OSR-SPS, ORS Walker, Reflection non are up to date or work with custom maps. why is walking so difficult.


did you really try?

check out that custom map.
no issues at all.

except for having to rearrange 2 lines in the sps file.

BigRedJapan

2015-03-09 03:21:16

WOW Teach me how to walk? Only thing im lacking. Ive tried using the TUt and nothing movied. im sitting stuck with Walking on my projects.