Results 1 to 2 of 2

Thread: Turpinators Path Walker Rewritten

  1. #1
    Join Date
    Mar 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default Turpinators Path Walker Rewritten

    I took turps path walker and rewrote it for elfyyys reflection include. here:
    Code:
    program MyPathMaker;
      {$DEFINE SMART}
      {$i AeroLib/AeroLib.simba}
      {$i Reflection/Reflection.simba}
    
      {I stole most of this more here:
         https://villavu.com/forum/showthread.php?t=107520
      All I did was make it work with the include   }
    
    const
    {how randy do you like it? Yes i kept randy.}
    randy = 1;
    
    function TPAPathToString(TPA: TPointArray): String;
    var
    i : integer;
    begin
      result := '';
      for i := 0 to length(TPA) - 1 do
        result := result + ' Point(' + intToStr(TPA[i].X) + ', ' + intToStr(TPA[i].Y) + '),';
      result[1] := '[';
      result[length(result)] := ']';
    end;
    
    function TPAPathToStringRandom(TPA: TPointArray; ran: integer): String;
    var
    i : integer;
    ranstr: string;
    begin
      result := '';
      ranstr := ' + RandomRange(' + IntToStr(iAbs(ran)*-1) + ', ' + IntToStr(iAbs(ran)) + ')';
      for i := 0 to length(TPA) - 1 do
        result := result + ' Point(' + intToStr(TPA[i].X) + ranstr + ', ' + intToStr(TPA[i].Y) + ranstr + '),';
      result[1] := '[';
      result[length(result)] := ']';
    end;
    
    var
      MyPath: TPointArray;
      MyPlayer: TReflectLocalPlayer;
    begin
      initAL;
      Reflect.Setup;
      MyPlayer.Username := 'user';
      MyPlayer.Password := 'pass';
      MyPlayer.Active := True;
      MyPlayer.Login;
    
      SetLength(MyPath, 0);
      SmartSetEnabled(Reflect.Smart.Target, false);
      repeat
        if SmartEnabled(Reflect.Smart.Target) then
        begin
          SmartSetEnabled(Reflect.Smart.Target, false);
          setlength(MyPath, length(MyPath) + 1);
          MyPath[length(MyPath) - 1] := MyPlayer.GetTile;
          ClearDebug;
          if randy > 0 then
            writeln(TPAPathToStringRandom(MyPath, randy))
          else
            writeln(TPAPathToString(MyPath));
          wait(2000);
        end;
        wait(100);
      until false;
    end.

  2. #2
    Join Date
    Nov 2015
    Posts
    73
    Mentioned
    1 Post(s)
    Quoted
    31 Post(s)

    Default

    thanks a lot man, it's so hard to find this stuff!

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
  •