Results 1 to 5 of 5

Thread: TPA Trouble [Compiles but does nothing]

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

    Default TPA Trouble [Compiles but does nothing]

    SCAR Code:
    program UsingTPA;
    {.include SRL/SRL.scar}

    function FindWillows : Boolean;
    var
      WX, WY, x, y, i, WillowColor : Integer;
      WillowPoints : TPointArray;
      Willow2D : T2DPointArray;
      WillowPoint : TPoint;

    begin
      if not LoggedIn then Exit;
      x := MSCX
      y := MSCY
      FindColorsSpiralTolerance(x, y, WillowPoints, 16711935, MSX1, MSY1, MSX2, MSY2, 10);
      Willow2D := TPAtoATPAEx(WillowPoints, 10, 10);
      for I := 0 to High(Willow2d) -1 do
      begin
        if not LoggedIn then Exit;
        begin
          Break;
        end;
        WillowPoint := MiddleTPA(Willow2D[i]);
        WX := WillowPoint.X;
        WY := WillowPoint.Y;
        MMouse(WX, WY, 1, 1);
        Wait(530 + Random(890));
        if IsUpText('hop') then
        begin
          GetMousePos(x, y)
          WillowColor := GetColor(WX, WY);
          Result := True;
          Break;
          Exit;
        end else
          Result := False;
          Writeln('False');
          Exit;

      end;
    end;

    procedure Runescape;
    begin
      if FindWillows then
      begin
        Writeln('Thanks to the dude who made that TPA guide.');
      end;
    end;

    begin
      ActivateClient;
      Wait(2000);
      Runescape;
    end.

    It compiles...

    Successfully compiled (3901 ms)
    Successfully executed
    But it just stands still... Then the script executes. So i tried other stuff but it ended up the same thing... Like this...

    SCAR Code:
    program UsingTPA;
    {.include SRL/SRL.scar}
     
    function FindWillows : Boolean;
    var
      WX, WY, x, y, i : Integer;
      WillowPoints : TPointArray;
      Willow2D : T2DPointArray;
     
    begin
      if not LoggedIn then Exit;
      FindColorsSpiralTolerance(x, y, WillowPoints, 3363417, MSX1, MSY1, MSX2, MSY2, 10);
      begin
        Willow2D := SplitTPA(WillowPoints, 10);
          for i := 0 to High(Willow2D) do
          begin
            Break;
          end;
          if MiddleTPAEX(Willow2D[i], WX, WY) then
            MMouse(x, y, 1, 1);
            if IsUpText('illow') then
            begin
              Mouse(x, y, 1, 1, True);
              Result := True;
            end else
          Result := False;
          Writeln('Failure');
          Exit;
      end;
    end;

    Begin
    if FindWillows then
      Writeln('Chopping Willows');
    end.

    procedure Runescape;
    begin
      if FindWillows then
      begin
        Writeln('f');
      end;
    end;

    begin
      Runescape;
    end.

    Does the same thing, please help me. This function is the only thing i need to make my First Script the best!

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    This part;

    SCAR Code:
    begin
        if not LoggedIn then Exit;
        begin
          Break;
        end;

    Should be

    SCAR Code:
    begin
        if not LoggedIn then Break;

    Why? Becuase If your not logged in then it will exit, but if your logged in it will continue to the next part which is Break; meaning it won't work .

    Hope I Helped

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

    Default

    It still dosen't move... Compiles then exits =l
    program UsingTPALast;
    {.include SRL/SRL.scar}
    const

    procedure FindWillows;
    var
    WX, WY, x, y, i, W, WillowColor : Integer;
    WillowPoints : TPointArray;
    Willow2D : T2DPointArray;
    WillowPoint : TPoint;

    begin
    x := MSCX
    y := MSCY
    W := High(Willow2D);
    FindColorsSpiralTolerance(x, y, WillowPoints, 2119757, MSX1, MSY1, MSX2, MSY2, 10);
    Willow2D := TPAtoATPAEx(WillowPoints, 3, 3);
    for I := 0 to W -1 do
    begin
    if not LoggedIn then Break;
    WillowPoint := MiddleTPA(Willow2D[i]);
    WX := WillowPoint.X;
    WY := WillowPoint.Y;
    MMouse(WX, WY, 1, 1);
    Wait(530 + Random(890));
    if IsUpText('hop') then
    begin
    GetMousePos(x, y)
    WillowColor := GetColor(WX, WY);
    Break;
    Exit;
    end else
    Writeln('False');
    Exit;

    end;
    end;
    begin
    ActivateClient;
    Wait(2000);
    FindWillows;
    end.
    now it looks like dis.

    i took out that LoggedIn thing cuz its useless if im gonna test it.

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Maybe try taking the -1; of the end?
    I really dont know, sorry.

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

    Default

    But you made a guide about this 0_o
    ur da one who taugh me this =p in ur tut
    ill try this time.

    Still dosent do anything....... Back to reading tuts =.= thanksanyways peeps. if u stil have an idea, u can post =p

    EDIT

    got a tutorial that can help me? post it here pl0x ty

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Procedure compiles but doesnt do anything
    By impiwimpi in forum OSR Help
    Replies: 3
    Last Post: 02-02-2009, 07:52 AM
  2. Function compiles, But nothing happens?
    By Macrosoft in forum OSR Help
    Replies: 19
    Last Post: 08-14-2008, 12:35 AM
  3. Function Compiles and then...nothing?
    By Macrosoft in forum OSR Help
    Replies: 12
    Last Post: 06-07-2008, 10:40 PM
  4. need help, script compiles right but work?
    By shadowrec0n in forum OSR Help
    Replies: 9
    Last Post: 02-15-2008, 09:09 PM
  5. it compiles but does nothing my script not working
    By ShowerThoughts in forum OSR Help
    Replies: 3
    Last Post: 08-23-2007, 09:01 PM

Posting Permissions

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