Results 1 to 4 of 4

Thread: MapWalk.scar small thing.

  1. #1
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default MapWalk.scar small thing.

    Shorten RadialRoadWalk and LinearRoadWalk.

    New ones
    SCAR Code:
    {*******************************************************************************
    function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    By: Nielsie95
    Description: Walks TheColor from StartRadial to EndRadial for Radius Distance
    Valid Arguments:
    TheColor: RoadColor. RoadColor will be dynamically updated.
    StartRadial/EndRadial: Any number between 0-720. 0=N,90=E,180=S,270=W.
    Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
    XMod, YMod: deviation from MouseFindFlag. -2 to 2.
    *******************************************************************************}

    function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    begin
      Result := False;
      if (not LoggedIn) then Exit;
       if (RoadColorChecker) then
        if (DebugRadialRoad) then
          WriteLn(' THROUGH RADIALROADWALK=  ---> ' + IntToStr(RoadColor));

      Result := RadialWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod);
      If Result then
        RoadColorChecker;
    end;


    {*******************************************************************************
    function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    By: Nielsie95
    Description: Walks TheColor from Direction MIDDLE OUT!by performing windscreenlike scanning movements for Radius Distance
    Valid Arguments:
    TheColor: Any Color, but Road- or WaterColor will do fine :)
    Direction: Any number between 0-720. 0=N,90=E,180=S,270=W.
    Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
    XMod, YMod: deviation from MouseFindFlag. -2 to 2.
    *******************************************************************************}

    function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    begin
      Result := False;
      if (not LoggedIn) then Exit;
       if (RoadColorChecker) then
        if (DebugRadialRoad) then
          WriteLn(' THROUGH RADIALROADWALK=  ---> ' + IntToStr(RoadColor));
     
      Result := LinearWalk(TheColor, Direction, Radius, Xmod, Ymod);
      If Result then
        RoadColorChecker;
    end;

    Old ones
    SCAR Code:
    {*******************************************************************************
    function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    By: Nielsie95
    Description: Walks TheColor from StartRadial to EndRadial for Radius Distance
    Valid Arguments:
    TheColor: RoadColor. RoadColor will be dynamically updated.
    StartRadial/EndRadial: Any number between 0-720. 0=N,90=E,180=S,270=W.
    Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
    XMod, YMod: deviation from MouseFindFlag. -2 to 2.
    *******************************************************************************}


    function RadialRoadWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    var
      tpa: TPointArray;
      i: Integer;
    begin
      Result := False;
      if (not LoggedIn) then Exit;
       if (RoadColorChecker) then
         if (DebugRadialRoad) then
           WriteLn(' THROUGH RADIALROADWALK=  ---> ' + IntToStr(RoadColor));
      if RadialWalkEx(tpa, MMCX, MMCY, TheColor, 0, StartRadial, EndRadial, Radius) then
        for i := 0 to High(tpa) do
          if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
          begin
            CountFlag(10);
            Result := True;
            Break;
          end;
    end;


    {*******************************************************************************
    function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    By: Nielsie95
    Description: Walks TheColor from Direction MIDDLE OUT!by performing windscreenlike scanning movements for Radius Distance
    Valid Arguments:
    TheColor: Any Color, but Road- or WaterColor will do fine :)
    Direction: Any number between 0-720. 0=N,90=E,180=S,270=W.
    Radius: Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
    XMod, YMod: deviation from MouseFindFlag. -2 to 2.
    *******************************************************************************}


    function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    var
      tpa: TPointArray;
      i: Integer;
    begin
      Result := False;
      if (not LoggedIn) then Exit;
      if (RoadColorChecker) then
        if (DebugRadialRoad) then
          WriteLn(' THROUGH RADIALROADWALK=  ---> ' + IntToStr(RoadColor));
      if LinearWalkEx(tpa, MMCX, MMCY, TheColor, 0, Direction, Radius) then
        for i := 0 to High(tpa) do
          if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
          begin
            CountFlag(10);
            Result := True;
            Break;
          end;
    end;
    Last edited by Naike; 06-19-2009 at 06:40 PM.

  2. #2
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    /thread

    Sorry, can't be done.

    I cleared this up via IRC with N1ke.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    So what did you clear up then?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wizzup?, long story short: RoadColorChecker needs to be repeated and not run once.

    Thinking of doing a smarter way, but I don't think it be appreciated ^^

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
  •