Page 1 of 2 12 LastLast
Results 1 to 25 of 40

Thread: Wind walking

  1. #1
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default Wind walking

    Hi, one of the things i used a lot in my scripts is WindWalk from reflection, now as sps is sort of like reflection (in terms of map walking) but it doesnt have a wind walk, so i took the function from reflection, multiplied all the peramiters by 5, however the length of the array is rather long, (it should be about 5, but is returning about 20, sometimes even 45)

    i renamed the function and this is what i have
    Simba Code:
    program new;
    {$i srl/srl.scar}
    var
      path: TPointArray;
     
    function sps_WindPath(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended): TPointArray;
    var
      veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
      lastX, lastY: integer;
      sqrt2, sqrt3, sqrt5: extended;
    begin
      sqrt2:= sqrt(2);
      sqrt3:= sqrt(3);
      sqrt5:= sqrt(5);
      while hypot(xs - xe, ys - ye) > 1 do
      begin
        dist:= hypot(xs - xe, ys - ye);
        wind:= minE(wind, dist);
        if dist >= targetArea then
        begin
          windX:= windX / sqrt3 + (random(round(wind) * 2 + 5) - wind) / sqrt5;
          windY:= windY / sqrt3 + (random(round(wind) * 2 + 5) - wind) / sqrt5;
        end else
        begin
          windX:= windX / sqrt2;
          windY:= windY / sqrt2;
          if (maxStep < 15) then
          begin
            maxStep:= random(15) + 15;
          end else
          begin
            maxStep:= maxStep / sqrt5;
          end;
        end;
        veloX:= veloX + windX;
        veloY:= veloY + windY;
        veloX:= veloX + gravity * (xe - xs) / dist;
        veloY:= veloY + gravity * (ye - ys) / dist;
        if hypot(veloX, veloY) > maxStep then
        begin
          randomDist:= maxStep / 2.0 + random(round(maxStep) / 2);
          veloMag:= sqrt(veloX * veloX + veloY * veloY);
          veloX:= (veloX / veloMag) * randomDist;
          veloY:= (veloY / veloMag) * randomDist;
        end;
        lastX:= Round(xs);
        lastY:= Round(ys);
        xs:= xs + veloX;
        ys:= ys + veloY;
        SetArrayLength(Result, GetArrayLength(Result) + 1);
        Result[ High(Result) ] := Point(Round(xs), Round(ys));
        step:= hypot(xs - lastX, ys - lastY);
        lastdist:= dist;
      end;
    end;

    begin
      path:= sps_WindPath(490, 5075, 660, 5030, 25, 12.5, 0.0, 0.0, 22.5, 12.5);
      writeln(length(path));
      writeln(path);
    end.

    ~shut

  2. #2
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    So wind walking generates a path from one point to another?

  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  4. #4
    Join Date
    Dec 2011
    Posts
    209
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Wait, how does Wind Walking work?

  5. #5
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  6. #6
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Look at MSI's path walking implementation. It's better.

  7. #7
    Join Date
    Dec 2011
    Posts
    209
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Alright this is what I need! Where do you enter the points for it to walk from place to place, using the minimap.

  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  9. #9
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Care to make a tutorial?

  10. #10
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  11. #11
    Join Date
    Dec 2011
    Location
    P2P :)
    Posts
    561
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    It is pretty straight forward. Look at this post and his other post that he linked. Very very simple.
    I wear my scars like the rings on a pimp
    I live life like the captain of a sinking ship
    Always sell your product for ATLEAST mid to ensure that the market doesn't drop.

  12. #12
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    what on?
    how to use wind walking?

    ~shut
    Yes. Simple it may be, but I'd still feel more comfortable with a guide.

  13. #13
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  14. #14
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah I see. I think I just found a better way to walk then RadialWalk. :3 Now if I can just get it to actually start the procedure. -.-

  15. #15
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I followed your directions earlier about pasting the two first boxes, etc. But when I try to use SPS_WindWalk it gives me this:

    Simba Code:
    procedure WalkToFlax;

    var
      x, y:Integer;


    begin
      SPS_WindWalk(Point(255, 329));
      SPS_WindWalk(Point(267, 327));
      SPS_WindWalk(Point(267, 327));
      Wait(3000);
    end;

    Debug says:
    Simba Code:
    [Error] (64:3): Unknown identifier 'SPS_WindWalk' at line 63
    Compiling failed.
    [Error] (58:12): Unknown identifier 'SPS_WalkToPosEx' at line 57
    Compiling failed.

  16. #16
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  17. #17
    Join Date
    Feb 2009
    Location
    inside Hello World! Application
    Posts
    232
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Nice so this would be more accurate then the normal SPS_Walkto();? or just faster to use? i'll switch my SPS_Walkto(); to the WindWalk and see the difference ^^
    I'm not a lesser Being imma Lesser demon


    http://i.imgur.com/faGr0.png << First Script With Paint. Good First proggy? exp 21k/hr is ok pretty buggy

  18. #18
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So post all of this at the end of sps.simba?
    Simba Code:
    function sps_WindWalk(T: TPoint): Boolean;
    var
      I, Tries: Integer;
      M, P: TPoint;
      CTRLPoints: TPointArray;
    begin
      P := T;
      repeat
        M := SPS_GetMyPos;
        if Length(CtrlPoints)=0 then
          CtrlPoints := sps_WindPath(M.x, M.y, P.X, P.Y, 22.5, 12.5, 40, 20);
        Inc(Tries);
        if(Tries > 20)then
          Exit;
        for I:= High(CtrlPoints) downto 0 do
          if sps_WalkToPosEx(CtrlPoints[i], 20) then
          begin
            Result := I = High(CtrlPoints);
            Break;
          end;
      until(Result);
    end;

    function SPS_WalkToPosEx(P: TPoint; FlagDist: Integer): boolean;
    var
      MM: TPoint;
    begin
      if not LoggedIn then Exit;
      MM := SPS_PosToMM(P);

      if (MM.X > 0) then
      begin
        Mouse(MM.X, MM.Y, 0, 0, True);
        Wait(200+Random(300));
        FFlag(FlagDist);
        Result := True;
      end;
    end;

    function SPS_WalkToPos(P: TPoint): boolean;
    begin
      result:= SPS_WalkToPosEx(p, 0);
    end;

  19. #19
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  20. #20
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you.

  21. #21
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    After replacing my sps with yours I added in some SPS_WindWalk's into my script, but when I hit compile it comes up with this:
    Simba Code:
    [Error] (63:3): Unknown identifier 'SPS_WindWalk' at line 62
    Compiling failed.
    This is my script.
    Simba Code:
    program LletyaFlaxPicker;



    var
    UseAntiban:Boolean;


    {$DEFINE SMART}
    {$i SRL\SRL.scar}
    {$i SRL\SRL\Misc\Debug.scar}
    {$i SRL\SRL\Misc\Stats.simba}

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := '';
      Players[0].Active := True;
      Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];

      UseAntiban := True;
    end;

    procedure AntiRandoms;
    begin
      FindNormalRandoms;
      LampSkill := 'Prayer'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the Prayer skill
      LevelUp;
    end;

    procedure Antiban;
    begin
    if UseAntiban then
      case random(40) of
          0: RandomRClick;
          1: PickUpMouse;
          2: RandomRClick;
          3: RandomMovement;
          4: ExamineInv;
          end;
    end;

    procedure PositionCamera;
    begin
      SetAngle(True);
      MakeCompass('N');
    end;

    procedure WalkToFlax;




    begin
      SPS_WindWalk(Point(255, 329));
      SPS_WindWalk(Point(267, 327));
      SPS_WindWalk(Point(267, 327));
      Wait(3000);
    end;

    procedure PickFlax;

    var
      x, y:Integer;


    begin
      InvCount;
      if InvCount < 28 then
      repeat
        begin
          FindObjCustom(x, y, ['pick', 'flax'], [15591530, 1326867, 1525270], 3);
          Mouse(x, y, 3, 3, true);
        end;
      until (InvCount = 28);
    end;

    procedure WalkToBank;

    var x, y:Integer;


    begin
      SPS_WindWalk(Point(258, 177));
      SPS_WindWalk(Point(190, 25));
      SPS_WindWalk(Point(255, 48));
    end;

    procedure BankFlax;

    var x, y:Integer;

    begin
       if (FindObjCustom(x, y, ['banker', 'alk'], [11256262, 3912382, 7117761], 3)) then
       begin
          Mouse(x, y, 3, 3, false);
          ChooseOption('Bank');
          DepositAll;
          CloseBank;
       end;
    end;










    //The real deal is below.

    begin
      Smart_Server := 60;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      Wait(3000+random(5000));
      LoginPlayer;
      PositionCamera;
      repeat
        begin
          WalkToFlax;
          PickFlax;
          WalkToBank;
          BankFlax;
          CloseBank;
      until(false)
        end;
    end.

  22. #22
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    You haven't included SPS.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  23. #23
    Join Date
    Dec 2011
    Posts
    484
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    >.< I am working with two windows of SIMBA, with small variations to test what would happen. I must have forgot to add that to this one. Thanks.

    Edit: Now it gives me this:
    Simba Code:
    [Error] C:\Simba\Includes\SRL/SRL/core/simba.simba(5:3): Duplicate identifier 'TDTMPointDef' at line 4
    Compiling failed.
    Last edited by Grihmm; 01-05-2012 at 08:15 AM.

  24. #24
    Join Date
    Dec 2011
    Posts
    209
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Just wanted to drop by and say I love your walking method!

  25. #25
    Join Date
    Dec 2006
    Location
    Georgia
    Posts
    84
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would this method work better as compared to DTM Walking if the situation were.. idk..
    Starting at a random ring of kinship teleport & then proceeding the daemonheim bank?
    Future SRL Member.

Page 1 of 2 12 LastLast

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
  •