Results 1 to 12 of 12

Thread: Locater and walker.

  1. #1
    Join Date
    May 2009
    Location
    Denmark! YEAH I'M A VIKING!
    Posts
    344
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Locater and walker.

    Hello, i am in the makeing of a script in which i want a locater and a walker.
    So i can activate my script on a target anywhere on the map.
    Is this possible? or would it require something reflection based?

    Thanks,
    Cartmann
    I ... Am ... CARTMANN!

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    If I understand correctly what your aiming for, then it is 100% possible to do with Color.

    These functions are out of an upcoming script of mine. The walking isn't finished yet but it will give you an idea of how to get thing's done

    Location finding function:
    Code:
    function IsLoc(Loc: string): Boolean;
    var
      i, x, y, Dist, Clr: Integer; Arr: array of TPoint; xy, Coords: array of Integer;
    begin
      if not LoggedIn then
        Exit;
        
      if Loc = 'bank' then
      begin
        Clr := FindLadderColor;
        xy := [MMCx, MMCy];
        Coords := [MMCx - 35, MMCy - 35, MMCx + 35, MMCy + 35];
        Dist := 35;
      end else
      begin
        Clr := 4210754;
        xy := [MMCx, MMCy];
        Coords := [MMx1, MMy1, MMx2, MMy2];
        Dist := 70;
      end;
    
      for i := 0 to 2 do
      begin
        FindColorsSpiralTolerance(xy[0], xy[1], Arr, Clr, Coords[0], Coords[1],
                                    Coords[2], Coords[3], 0);
        SortTPAFrom(Arr, Point(MMCx, MMCy));
        Result := Distance(Arr[0].x, Arr[0].y, MMCx, MMCy) < 70;
    
        if Result then
        begin
          Players[CurrentPlayer].Loc := Loc;
          Break;
        end;
          
        if i = 2 then
        begin
          Writeln('Failed: function IsLoc(Loc: string): Boolean;');
          Exit;
        end;
      end;
    end;
    Walking function:
    Code:
    function WalkTo(Loc: string): Boolean;
    var
      Arr: array of TPoint; x, y, i, a: Integer; Coords: TIntegerArray;
    begin
      if not LoggedIn then
        Exit;
    
      case Loc of
        'mine' :
           begin
             for i := 0 to 4 do
             begin {8947083, 8818060, 8356743, 8424068}
               case i of
                 0 : Coords := [MMCx, MMy1, MMx2, MMCy];
                 1, 2 : Coords := [MMCx, MMCy, MMx2, MMy2];
                 3, 4 : Coords := [MMCx - 13, MMCy, MMCx + 17, MMy2];
               end;
                       
               FindColorsSpiralTolerance(x, y, Arr, 8423304, Coords[0],
                                       Coords[1], Coords[2], Coords[3], 3);
               if Length(Arr) < 1 then
               begin
                 Writeln('Failed: function WalkTo(Loc: string): Boolean; Phase'+IntToStr(i)+'(FindVarrockRoadColor)');
                 Exit;
               end;
    
               Writeln(Length(Arr));
               SortTPAFrom(Arr, Point(MMCx, MMCy));
               a := (High(Arr) - RandomRange(2, 5));
               Writeln(IntToStr(Arr[a].x)+', '+IntToStr(Arr[a].y));
               Mouse(Arr[a].x, Arr[a].y, 2, 2, True);
               Wait(RandomRange(800, 1200));
               Flag;
               Wait(RandomRange(800, 1200));
               {
               if not WhileWalking then
               begin
                 Writeln('Failed: function WalkTo(Loc: string): Boolean; (Phase1)');
                 Exit;
               end;
               }
             end;
           end;
      end;
    end;
    All it takes is a little brainstorming and most anything can be done with Color.

  3. #3
    Join Date
    May 2009
    Location
    Denmark! YEAH I'M A VIKING!
    Posts
    344
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ain't that a case of? (with a limited amount of locations)
    Like if my account went lost during perhaps, some minning & banking?

    What i'm talking about, is a account totally lost, it could be in falador, east varrock, lumbridge, at the scorpion minning pitch, anywhere! and the locater would be able to locate the spot, and direct the account to where i want it to be. (which would be where the script i want to use is starting at, ex. varr bank)
    I ... Am ... CARTMANN!

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Hmm..the best way I can think to do that with Color would be finding symbols around where you are, then maybe using the World map tpo walk to the symbol to you want to be near. I believe Nauman, and Nadeem have both worked on a World map walker in the recent past. You should go to them for suggestions.

  5. #5
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I only remember this:
    http://www.villavu.com/forum/showthread.php?t=50172 by mixster
    It's great if you ask me. Got some weird thing but actually works.
    Dunno how far he has developed it since that time.

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    That would definitely be 999X easier if reflection were working.
    If you asking for an account's location to be determined ANYWHERE and then walk to a specific point, that's not really possible reflection-less

  7. #7
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    That would definitely be 999X easier if reflection were working.
    If you asking for an account's location to be determined ANYWHERE and then walk to a specific point, that's not really possible reflection-less
    Well.. It would be possible but it would take a lot of time to gather all the points and colors from every place there is on runescape and it would probably take a minute for it to loop through them all

  8. #8
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    It's very possible without and would hopefully be a stable system now if Scar ran as nicely as it used to

    (Have talked to Cartmann via pm about this)
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  9. #9
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I was working on something like this, but it's unfinished because reflection is down.

  10. #10
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Lol I was actually thinking hard about this last week when I was off, it doesnt exactly hit what your asking for, but I was thinking about making Walking Functions from place to place, first it would check where it is, (Say you start out in Lumbridge Bank), then you can place the end location ( Draynor w/e) and the function would be able to walk from area to area, just by doing a check from where it starts out. Just to make it easier for everyone on this site =/ great way to give back.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  11. #11
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    If anyone is interested in my code I can post it so you can further refine it, cause there is no way I'll be doing with it until reflection is back up, and even than it will progress very slowly.

  12. #12
    Join Date
    May 2009
    Location
    Denmark! YEAH I'M A VIKING!
    Posts
    344
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm, i surpose i would have to make some prescripted walking routes until reflection gets back on track, like if in 'db' then bla bla.

    /thank you for your answers!

    EDIT: Oh, i could make it tele lumb(home) and walk from there, way easier.
    Last edited by Cartmann; 01-05-2010 at 06:31 PM.
    I ... Am ... CARTMANN!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •