Results 1 to 2 of 2

Thread: Help compileing

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

    Default Help compileing

    Probly just a end or something i missed/cant find but im geting a Identifier expected


    SCAR Code:
    Function FightMonster:Boolean;
    Var x,y,b,i,h :Integer;
        TPA       : TPointArray;
        ATPA      : T2DPointArray;
    Begin

      X := MSCX
      Y := MSCY
      SetColours(WhichMonster);
     
      If Not AreaAndMonster Then
      Change;
     
      FindColorsSpiralTolerance(x, y, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Toll);
      ATPA := TPAtoATPA(TPA, 7);

      If Length(ATPA) = 0 Then //If no points were found
      Begin
        WriteLn('No colour found :(');
        Result := False;
        Exit;
      End;

      H := High(ATPA);
      For I := 0 To H Do
      Begin
        MiddleTPAEx(ATPA[I], X, Y); //Used to get the middle of the current sorted tpa
        Inc(b);
        MMouse(x,y,6,6);
        Wait(250+Random(500));
          If IsUpText(SetText) Then
          Begin
          WriteLn('UpextFound');
            If Not Random(34)=4 Then
            Begin
              GetMousePos(x,y);
              Mouse(x,y,0,0,True);
            End Else Begin
              GetMousePos(x,y);
              Mouse(x,y,0,0,False);
              ChooseOption('ttack');
            End;
          End;
          If (b=25) Then
          Begin
            WriteLn('Tryed 25 times with no uptext :(');
            Result := False;
            Exit;
          End;
    End;
    Thanks

    ~Rya
    I see Now, says the blind man

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    SCAR Code:
    function FightMonster: Boolean;
    var x, y, b, i, h: Integer;
        TPA: TPointArray;
        ATPA: T2DPointArray;
    begin
      x := MSCX
      y := MSCY
      SetColours(WhichMonster);
      if not AreaAndMonster then
        Change;
      FindColorsSpiralTolerance(x, y, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Toll);
      ATPA := TPAtoATPA(TPA, 7);
      if Length(ATPA) = 0 then //If no points were found
      begin
        WriteLn('No colour found :(');
        Result := False;
        Exit;
      end;
      h := High(ATPA);
      for i := 0 to h do
      begin
        MiddleTPAEx(ATPA[i], x, y); //Used to get the middle of the current sorted tpa
        Inc(b);
        MMouse(x, y, 6, 6);
        Wait(250 + Random(500));
        if IsUpText(SetText) then
        begin
          WriteLn('UpextFound');
          if not Random(34)=4 then
          begin
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, True);
          end else
          begin
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, False);
            ChooseOption('ttack');
          end;
        end;
        if b = 25 then
        begin
          WriteLn('Tryed 25 times with no uptext :(');
          Result := False;
          Exit;
        end;
      end;
    end;
    Last edited by i luffs yeww; 03-27-2010 at 12:49 AM.

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
  •