Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Wanted

RadarRoadWalk. A new generation in walking

Recommended Posts

You will need SCAR 3.29 Alpha or newer to use this.

 

RadarRoadWalk is a method in OSI that you can use to accurately walk roads in RS2.

 

It works by using FilterPointsPie/TPAExtractPie to remove a segment of a TPA that's the shape of a piece of pie (more like a U ), then finds the middle of it, offsets it slightly, and then uses MouseFlag to walk there.

 

The first thing you need to do in order to use RadarRoadWalk is get a TPA of the road on the minimap.

 

The best way I would suggest to do this is use ACA in OSI\Tools\ to get the best color speed tolerance, modifiers, tolerance, and color to use with FindMMColorsTolerance in OSI\RS2\Core\Map.scar to get the road TPA.

 

Your code will probably look something like this so far:

 

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}

{.include OSI\OSI.scar}

procedure ScriptTerminate;
begin
 FreeOSI;
end;

function RoadWalk(SRad, ERad, SAng, EAng, FlagD: Extended; XOffset, YOffset, RX, RY: Integer): Boolean;
var
 TPA: TPointArray;
begin
 ColorToleranceSpeed(2); //CTS from ACA
 SetColorSpeed2Modifiers(7.09, 0.35); //CTS2 modifiers from ACA
 FindMMColorsTolerance(TPA, 8290168, 7); //Best colors/ tolerance from ACA
 SetColorSpeed2Modifiers(0.2, 0.2); //Reset to default
 ColorToleranceSpeed(1); //Reset To default
 Result := RadarRoadWalk(TPA, SRad, ERad, SAng, EAng, FlagD, XOffset, YOffset, RX, RY);
end;

begin
 SetUpOSI;
end.

 

Ok so you are probably wondering now what the heck SRad, ERad, SAng, EAng, FlagD, XOffset, YOffset, RX, RX are...

 

SRad is start radius, this is where the piece of pie starts from the center

ERad is the end radius, this is where the piece of pie ends from the center

SAng is the start angle, this is where the piece of pie starts around circle

EAng is the end angle, this is where the piece of pie ends around the circle

FlagD is the distance used with FlagEx in MouseFlag at the end of RadarRoadWalk

XOffset, YOffset are there because even though the Middle of your piece of pie may be consistently the same place does not mean that it will be exactly what you want. These are there to use that consistent point and make the place you actually end up walking to where you want.

RX, RY are there for added randomness if wish to do so.

 

Here are some example pictures of different inputs made using this script: (I'll probably put this in \Tools\ at some point)

 

program FilterPointsPieVisualizer;

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}

{.include OSI\OSI.scar}
{.include OSI\Divi\Misc\Debug.scar}

const
 SRad = 65;
 ERad = 75;
 SAng = 215;
 EAng = 255;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

var
 TPA: TPointArray;

begin
 SetUpOSI;
 TPA := TPAFromBox(Box(MMX1, MMY1, MMX2, MMY2));
 FilterPointsPie(TPA, SRad, ERad, SAng, EAng, MMCX, MMCY);
 DebugTPA(TPA);
end.

 

23m3log.png

 

So then your end code will probably look something like this

 

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}

{.include OSI\OSI.scar}

procedure ScriptTerminate;
begin
 FreeOSI;
end;

function RoadWalk(SRad, ERad, SAng, EAng, FlagD: Extended; XOffset, YOffset, RX, RY: Integer): Boolean;
var
 TPA: TPointArray;
begin
 ColorToleranceSpeed(2); //CTS from ACA
 SetColorSpeed2Modifiers(7.09, 0.35); //CTS2 modifiers from ACA
 FindMMColorsTolerance(TPA, 8290168, 7); //Best colors/ tolerance from ACA
 SetColorSpeed2Modifiers(0.2, 0.2); //Reset to default
 ColorToleranceSpeed(1); //Reset To default
 Result := RadarRoadWalk(TPA, SRad, ERad, SAng, EAng, FlagD, XOffset, YOffset, RX, RY);
end;

begin
 SetUpOSI;
 if (not (RoadWalk(60, 70, 90, 115, 5, 3, 3, 1, 1))) then
   MouseFlagEx(123, 123, 3, 3, 5);
end.

Edited by Wanted

Share this post


Link to post
Share on other sites

me either bryce, me either. I talked to him about making a stupid proof tutorial on it. not sure if he is going to

Share this post


Link to post
Share on other sites

What is needed is a tool that helps you generate the paths. Wanted, you know what I'm talking about. I started one and had it working, but like so many of my scripting projects discarded it and moved on to something else.

Share this post


Link to post
Share on other sites

ya a generation tool for path would be exactly what this needs. It would make it very useable. I got everything else working but finding right path is hard lol

 

---------- Post added at 11:36 AM ---------- Previous post was at 10:06 AM ----------

 

The only thing im not understanding is the sang and eang. how do you get this.. im look in raidus of blah blah to blah blah. but why is an sang and eang even needed and how do i get this?

Share this post


Link to post
Share on other sites
]The only thing im not understanding is the sang and eang. how do you get this.. im look in raidus of blah blah to blah blah. but why is an sang and eang even needed and how do i get this?
Starting Angle and Ending Angle, in degrees with 0/360 being north. Yeah it can be confusing.

 

So...for example if you were walking north and only wanted it to consider points within say 5 degrees of straight north, use SA=355 and EA=5 (or -5 and 5) for starting and ending angle.

Share this post


Link to post
Share on other sites
What about SRAD AND ERAD
Start radius and End Radius, in pixels from the minimap center: how far out do you want it to start (and end) searching for your color. (outer edge is radius of 75? pixels I think, 0 is minimap center)

Share this post


Link to post
Share on other sites
program New;

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}                   // Comment out to disable SMART

{$I OSI\OSI.scar}
{$I OSI\RS2\Extended\Object.Scar}

const
 Player_Booleans_Count = 2;
 Player_Integers_Count = 2;
 Player_TIA_Count = 1;

 SRad = 60;      { The Middle of the mini Map is 0, we are searching for the end of the minimap which all the way around the middle to end of any point in the minimap is 0 - 75 , 75 being the end of the MM.  So we are going ot want to only search around the end of the minimap for our road. So our start is going to be 60 and end is 75. }

  ERad = 75;

 SAng = 85;   {The Minimap is a caught circle in this, the minimap is a 360 degree circle. 0 is the north point of the MM, not the compass but the MM ( no matter how you are turned )   up is always up. 0 or 360. East is 90 and south is 180, West is 270.  So we are searching within degree of 85 to 110 for our color.   Did you see what we just did? with all the Rads and Angs we jsut basically made a box to look for our colors in. }
 EAng = 110;

 procedure DeclarePlayer;
var
 I: LongInt;
begin
 SetLength(Players, 1);
 for I := 0 to High(Players) do
 begin
   SetLength(Players[i].Integers, Player_Integers_Count);
   SetLength(Players[i].Booleans, Player_Booleans_Count);
   SetLength(Players[i].TIA, Player_TIA_Count);
 end;

 with Players[0] do
 begin
   Name := '';
   Pass := '';
   Pin := '';
   WorldInfo := [True, -1];
   Active := True;

 end;
end;

procedure ScriptTerminate;
begin
 FreeOSI;
end;



       function RoadWalk(SRad, ERad, SAng, EAng, FlagD: Extended; XOffset, YOffset, RX, RY: Integer): Boolean;
var
 TPA: TPointArray;
begin

 ColorToleranceSpeed(2); //CTS  Mode BottomRight from ACA Tool in your scripting folder
 SetColorSpeed2Modifiers(0.10, 0.08);  { CTS2 modifiers from ACA, This is your Hue and Sat from your best colors. Meshed together all your picked colors to represent one color code to find allt he colors you picked based on the hue sat and tolerance. So this is  you Hue Mod / Sat Mod }
 FindMMColorsTolerance(TPA, 6447977, 4); //Best colors/ tolerance from ACA
 SetColorSpeed2Modifiers(0.2, 0.2); //Reset to default , No Idea why
 ColorToleranceSpeed(1); //Reset To default , No idea why
 Result := RadarRoadWalk(TPA, SRad, ERad, SAng, EAng, FlagD, XOffset, YOffset, RX, RY);
end;


begin
DeclarePlayer;
SetUpOSI;
repeat
 If not Loggedin then Login;
 if loggedin then WaitRR(5000, 3000);
 until loggedin = true
 Wait(2000)
   SetAngle(true);
 MakeCompass(0);
      ActivateClient;
      wait(2000);
      RoadWalk(60,75,85,110,5,3,3,0,0); // Lets call it now
   writeln(Roadwalk either worked or not');
end.

Edited by Freddy

Share this post


Link to post
Share on other sites

Could this be developed for runescape classic? A private server is beginning to get big and were trying to developed some scripts for it. Walking is essential for a script I'm trying but its being difficult :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...