Results 1 to 4 of 4

Thread: Help?

  1. #1
    Join Date
    Feb 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help?

    Simba Code:
    function FindWall(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(2.50, 2.99);

      if not(FindColorsTolerance(arP, 2237991, MSX1, MSY1, MSX2, MSY2, 2)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 1.54) and (X <= 2.11) and (Y >= 1.61) and (Y <= 2.19) and (Z >= 1.37) and (Z <= 2.24) then
        begin
          for j := 0 to arL2 do
          begin
            if (arUC[i] = arC[j]) then
            begin
              SetLength(arAP, Length(arAP) + 1);
              arAP[High(arAP)] := arP[j];
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 10, 10);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpText('Cross')) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;


    function DoWalking:Boolean;
    begin
     SPS_Setup(RUNESCAPE_SURFACE, ['10_6','11_6']);
      if Location = 'Bank'then
      begin
        Bnk2Drags :=   [Point(4215, 2663), Point(4220, 2660), Point(4227, 2654), Point(4233, 2646), Point(4241, 2639), Point(4250, 2629), Point(4267, 2619), Point(4280, 2617), Point(4293, 2613), Point(4297, 2598), Point(4297, 2583), Point(4309, 2578), Point(4327, 2576), Point(4347, 2577), Point(4368, 2577), Point(4382, 2577), Point(4393, 2572), Point(4408, 2566)];
      if SPS_WalkPath(Bnk2Drags) then
      begin
      if FindWall then
      Mouse(x, y, 0, 0,True);
      end;
      begin
        Location:='Dragons';
        Wait(RandomRange(500,600));
       end else
        Writeln('We got lost, please restart at the bank.');
        exit;
      end;
      if Location = 'Dragons'then
      begin
        InvertTPA(Bnk2Drags);
       if SPS_WalkPath(Bnk2Drags) then
       begin
        Location:='Bank';
        Wait(RandomRange(500,600));
       end else
        Writeln('We got lost, please restart at the bank.');
        exit;
      end;
    end;




    Any ideas why I get this error? I making a script >.<

  2. #2
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    There's no parameters in the screenshot you posted, the function has parameters of (fx, fy)

  3. #3
    Join Date
    Feb 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've added them in and I still get the invalid number of parameters at the same spot

    Feel like a retard, nvm got it, thanks mate(:
    Last edited by bigbutts5; 04-18-2012 at 12:33 AM.

  4. #4
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by bigbutts5 View Post
    I've added them in and I still get the invalid number of parameters at the same spot

    Feel like a retard, nvm got it, thanks mate(:
    No problem, good luck with this script! Pm me if you ever need help

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
  •