Results 1 to 2 of 2

Thread: So far?

  1. #1
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default So far?

    So im making a fishing scirpt that will fish and sell at lummy
    So have i have
    SCAR Code:
    function IsTextUp: boolean; //Yellow UpText Fishing Spot
    var
      TPA: TPointArray;
    begin
      FindColorsTolerance(TPA, 716785, 4, 4, 350, 40, 9);

      Result := InRange(Length(TPA), 37, 137);
    end;

    Function WaitToGo:Boolean;//Checks to see if the spot is still there
    Var x,y,Fail:Integer;
    Begin
      GetMousePos(x,y);
        Repeat
          Wait(500+Random(100));
          Inc(Fail);
        Until (Not IsTextUp or Fail>=400)
          If Not IsTextUp Then
            Result := True;
    End;

    function FindSpot: Boolean;//Finds fishing spot and clicks returns true if clicked
    var
      x, y, i, h : Integer;
      TPA : TPointArray;//Don't forget to set the TPA to a variable.
      ATPA : T2DPointArray;//Notice how a ATPA is declared.
    begin
      if not LoggedIn then Exit;
      ColorToleranceSpeed(2);//Remember to do these two lines to make the color finding more accurate.
      SetColorSpeed2Modifiers(0.34, 0.46);
        FindColorsSpiralTolerance(x, y, TPA, 11380129, MSX1, MSY1, MSX2, MSY2, 10);//Notice that we don't use an if..then statement this time.  This is because FindColorsSpiralTolerance is a procedure, not a function, and doesn't return a boolean.
        ATPA := SplitTPAEx(TPA, 5, 5);//WizzyPlugin.
        if (Length(ATPA) = 0) then
        begin
          Writeln('Couldn''t find the FishSpot color.');
          Exit;//This will exit the procedure if it can't find the color.  Remember, the amount of colors SCAR finds is stored in the array TPA.
        end;
        SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));//WizzyPlugin.
        h := High(ATPA);
        for i := 0 to h do//For every color that SCAR finds, do this.
        begin
          Writeln('Length: ' + IntToStr(Length(ATPA[i])));//This will write, in the debug box, how many colors were found.
          MiddleTPAEx(ATPA[i], x, y);//WizzyPlugin.
          MMouse(x, y, 4, 4);
          if IsTextUp then
          begin
            Writeln('Found FishingSpot!');
            Mouse(x, y, 0, 0, True);
            Result := True;
          end else
            Writeln('Couldn''t find the right uptext.');
        end;
    end;

    Procedure FishLoop;
    Begin
      If not LoggedIn Then Exit;
        Repeat
          If FindSpot Then
            If WaitToGo Then
       //       If IsItWorthIt Then    //True= FishMore False=Should Sell/Bank
                Wait(1000+Random(500));
              Else WalkLoop
        Until(Fase)
    End;
    I'm sure there are many problems and improvements to be made and help would be great and if some one could help me other MSN later that would be great
    I see Now, says the blind man

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

    Default

    Biggest problem I see is that it isn't complete. Keep chugging along and test lots of different methods to walk. If you really get stuck with the walking(or other stuff) post a picture of the place here and someone will 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
  •