Syntax ERROR

Discussion in 'Scar/Simba Help' started by blackout, Jun 29, 2007.

Syntax ERROR
  1. Unread #1 - Jun 29, 2007 at 2:01 AM
  2. blackout
    Joined:
    Apr 28, 2007
    Posts:
    34
    Referrals:
    0
    Sythe Gold:
    0

    blackout Member

    Syntax ERROR

    Line 486: [Hint] (15300:1): Variable 'I' never used in script C:\Program Files\SCAR 3.06\Scripts\FLYFISH.scar
    [Error] (15404:1): Syntax error

    from this




    Code:
    { ----------------------------------------------------------
       Instructions:
         1: Wear a Fire or Water staff.
         2: Then on line '27' Choose eighter Fire, or Water.
         3: Have ALL your feathers in ur inventory.
         4: Declare your players.
         5: Line up ALL your players at Edgeville bank
         6: Press RUN!
     ----------------------------------------------------------
    }
    
    program JuBarianFlyFisher;
    {.Include SRL/SRL.Scar}
    {.Include SRL/SRL/Skill/Fighting.Scar}
    
    Var
      StaffOrb, ClickAgain, FishSymbolColor: Integer;
      DTMBankers, DTMWhirlPool, DTMSea, DTMRod, DTMFishEquipMent, DTMFeathers: Integer;
      CurrentLoad, Salmons, Trouts, Fished, Banked, Gained: Integer;
    
    Const
      HowManyLoads = 5;
    
    Procedure DeclarePlayers;
    begin
         CurrentPlayer:=0;
         NumberOfPlayers(1);
    
      Players[0].Name  := 'sff;
      Players[0].Pass  := 'f';
      Players[0].Nick  := 'f';
      Players[0].String1:= 'Water'; //Water, Or Fire Staff?
      Players[0].Active:= true;
    end;
    
    Function AutoColorOrb(ArgueMent: String): Integer;
    Var
      Toleran: Integer;
    Begin
    
      Case ArgueMent Of
        'Water': Begin
                   Repeat
                     Wait(50);
                     If(FindColorSpiralTolerance(x,y,15475741, 215, 140, 298, 209, Toleran))Then
                       Begin
                         Result:= GetColor(x,y);
                       End Else
                         Begin
                           Toleran:= Toleran + 2;
                           If(Toleran > 50)Then
                             Begin
                               Break;
                             End;
                         End;
                   Until(Result > 1)
                 End;
        'Fire' : Begin
                   Repeat
                     Wait(50);
                     If(FindColorSpiralTolerance(x,y,1913582, 215, 140, 298, 209, Toleran))Then
                       Begin
                         Result:= GetColor(x,y);
                       End Else
                         Begin
                           Toleran:= Toleran + 2;
                           If(Toleran > 50)Then
                             Begin
                               Break;
                             End;
                         End;
                   Until(Result> 1);
                 End;
      End;
    
      If(Result = 0)Then
        Begin
          Writeln('Couldnt Find Staff Color, Logging Out.');
          Logout
        End Else
          Begin
            Writeln('Staff Color: ' + inttostr(result));
          End;
    End;
    
    Function WaitR(Time : Integer) : Boolean;
    Var Time1: Integer;
    Begin
      Marktime(time1)
        Repeat
          Wait(50);
          If(FindTalk)Then
            Result := True;
        Until(result)or(TimeFromMark(Time1)>Time);
    End;
    
    procedure HandleWhirlPool;
    begin
      DTMWhirlPool := DTMFromString('78DA63D4606460B8C380024E9EBAC02002A41' +
        '9A17C466D20EB16AA9A03BBF7A2AA5107B29EA1AAD9B46D27AA1A' +
        '6320EB36AA9A43474EA2AA5105B2EEA1AA397FE1128A1A001C7C1' +
        '117');
      if(FindDTM(DTMWhirlPool,x,y,MSX1,MSY1,MSX2,MSY2))Then
        begin
          Status('Whirlpool found!');
          WhirlPools := WhirlPools + 1;
          Mouse(647, 82, 2, 2, True);
          FTWait(50 + Random(15));
            Repeat
              HoverSkill('fishing', False);
              If(Not LoggedIn)Then Break;
              FTWait(2 + Random(2));
            Until(Not FindDTM(DTMWhirlPool,x,y,MSX1,MSY1,MSX2,MSY2));
          ClickAgain:= ClickAgain + 100000;
        end;
      FreeDTM(DTMWhirlPool);
    end;
    
    Function FindFastRandoms: Boolean;   //by WT-Fakawi
    var
      i: Integer;
    begin
      for i:=1 to 9 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
           9: RC;
        end;
        wait(1);
      end;
    end;
    
    Procedure AntiRandoms;
    begin
        if infight then
          begin
            RunAwayDirection('W');
            Wait(5000+Random(3500));
            RunBack;
          end;
        FindFastRandoms;
        wait(5)
        UseBoxSolver := True
        UseCerterSolver := True
        UseSandwichSolver := True
        FindMaze;
        wait(5)
        Solvepinball;
        wait(5)
        TalkToRand;
        wait(5)
          if (FindQuiz) then
              SolveQuiz;
        FindNormalRandoms;
    end;
    
    Procedure TheAntiBan;
    Var
      Rand: Integer;
    Begin
      Case 1+Random(20) Of
        1: HoverSkill('Random',False);
        2: HoverSkill('Fishing',False);
        3: MMouse(Random(MIX2),Random(MIY2),1,5)
        4: Begin
             GameTab(1+Random(12));
             Wait(500+Random(1000));
             GameTab(4);
           End;
        5: PickUpMouse;
        6: Begin
             Rand:= 3+Random(14);
             If(ExistsItem(Rand))Then
               DragItem(Rand, 4+Random(18));
           End;
      End;
    End;
    
    procedure Setup;
    begin
      Cleardebug;
      Writeln('Successfully compiled');
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      Wait(1000)
      If(Not Loggedin)Then LoginPlayer;
    end;
    
    procedure SetCompass(Direction: String);
    var
      Angle,DirectionDeg: Extended;
      key:integer;
    begin
      case 1+random(2) of
        1: key := 3;
        2: key := 1;
      end
      wait(100+random(50));
      KeyDown(VK_RIGHT)
      case Direction of
        'n': DirectionDeg := 0;
        'w': DirectionDeg := 90;
        'e': DirectionDeg := 270;
        's': DirectionDeg := 180;
      end
        repeat
          if not loggedin then break;
          Angle:= rs_GetCompassAngleDegrees;
          wait(1);
        until(Angle = DirectionDeg);
      KeyUp(VK_Right)
    end;
    
    procedure Autoretaliate(act : boolean);
    begin
      Gametab(1)
      if FindColorTolerance(x,y,2106255,580, 364,715, 394, 10)then
        begin
          if not act then
              mouse(657, 376,30,10,true)
        end else
          begin
            if act then
                mouse(657, 376,30,10,true)
          end;
    end;
    
    Procedure InitPlayer;
    Begin
      If(Not Loggedin)Then Exit;
      SetCompass('n');
      HighestAngle;
      StaffOrb:= AutoColorOrb(Players[CurrentPlayer].String1);
      Autoretaliate(False);
      WaterColor := FindWaterColor;
    End;
    
    {*******************************************************************************
    function WaterWalk(StartRadial, EndRadial: Integer; Radius, FFlagBreakOut: Integer; Xoff, Yoff, Xmod, Ymod: Integer): Boolean;
    By: By Wizzup? and WT-Fakawi and modified by Ron And again edited by jukka
    Description: Walks alongside Water.
    *******************************************************************************}
    
    function WaterWalk2(StartRadial, EndRadial: Integer; Radius,
      FFlagBreakOut: Integer; Xoff, Yoff, Xmod, Ymod: Integer): Boolean;
    var
      i, X1, Y1: Integer;
    begin
      Result := False;
      if(StartRadial = EndRadial)then
        WriteLn('ERROR - WaterWalk can''t have the same values for both Start and End Radials!')
      else if (StartRadial < EndRadial) then
      begin
        repeat
          for i := StartRadial to EndRadial do
          begin
            x1 := Round(Radius * Sine(i)) + 646;
            y1 := Round(-Radius * Cose(i)) + 84;
            if FindColor(x, y, WaterColor, X1, Y1, X1 + 1, Y1 + 1) then
            begin
              Mouse(x + Xoff, y + Yoff, Xmod, Ymod,True);
              Result := True;
              FFlag(FFlagBreakOut);
              Exit;
            end;
          end;
          Radius := Radius - 4;
        until Radius <= 1;
      end else
      if (StartRadial > EndRadial) then
      begin
        repeat
          for i := StartRadial downto EndRadial do
          begin
            x1 := Round(Radius * Sine(i)) + 646;
            y1 := Round(-Radius * Cose(i)) + 84;
            if (FindColor(x, y, WaterColor, X1, Y1, X1 + 1, Y1 + 1)) then
            begin
              Mouse(x + Xoff, y + Yoff, Xmod, Ymod,True);
              Result := True;
              FFlag(FFlagBreakOut);
              Exit;
            end;
          end;
          Radius := Radius - 4;
        until Radius <= 1;
      end;
    end;
    
    Procedure WaterColorCheck;
    Var
      Dx,Dy: Integer;
    Begin
      If(Not FindColor(dx,dy,WaterColor,MSX1,MSY1,MSX2,MSY2))Then
        WaterColor:= FindWaterColor;
    End;
    
    Function FindClickWater: Boolean;
    Begin
      if(FindColorSpiral(x,y,WaterColor,MMCX,MMCY,MMX2,MMY2-50))then
        begin
          Mouse(x-10,y,0,3,true);
          FFlag(5);
          Result:= True;
        end;
    end;
    
    Procedure GoToFishSpot;
    Var
      OldFishColor, Radie1, Radie2: Integer;
    Begin
      If(Not Loggedin)Then Exit;
      If(InvFull)Then Exit;
    
      FindFastRandoms;
      MarkTime(Mark);
      //If(RadialWalk(WaterColor, 173, 142, 60, -1, 0))Then
      If(FindClickWater)Then
        Begin
          Radie1:= 190;
          Radie2:= 165;
            Repeat
    
              If(Not WaterWalk2(Radie1,Radie2,35+Random(25),15,-10,0,0,0))Then
                Begin
                  WaterColorCheck;
                  Radie1:= Radie1 + 20;
                  FindFastRandoms;
                  Radie2:= Radie2 - 20;
                End;
              WaitR(150+Random(150));
    
              If(FindSymbol(x,y,'fish'))Then
                Begin
                  OldFishColor:= FishSymbolColor;
                  FishSymbolColor := GetSymbolColor(x,y,'fish');
                  If(Not OldFishColor = FishSymbolColor)Then
                    Writeln('Fish Symbol Color: ' + inttostr(FishSymbolColor));
                  FindMMColor(x,y,FishSymbolColor);
                  Mouse(x,y,5,5,True);
                  Flag;
                  Break;
                End;
    
              FindFastRandoms;
    
              If(TimeFromMark(Mark)>90000)Then
                Begin
                  Logout;
                  Break;
                End;
            Until(Not Loggedin);
        End;
    End;
    
    Function GotFeathers: Boolean;
    Begin
      If(Not Loggedin)Then Exit;
      FindFastRandoms;
      DTMFeathers := DTMFromString('78DA632C62626078C58006189148209D0754F' +
           '39E809A1CA09A7704D46403D53C25A0A600A8E63E01359540350F' +
           '70AB6101D11540352FF0AB01003EA20997');
      GameTab(4);
      If(FindDTM(DTMFeathers,x,y,MIX1,MIY1,MIX2,MIY2))Then
        Result := True;
      FindFastRandoms;
      FreeDTM(DTMFeathers);
    End;
    
    Function GotFishingEquipMent: Boolean;
    Begin
      If(Not Loggedin)Then Exit;
      FindFastRandoms;
      DTMFishEquipMent := DTMFromString('78DA637466626078C6800618914820ED02547' +
           '39F801A47A09A2704D45803D5BC21A0C60EA8E63D01354E40351F' +
           '09A87105AA794D408D0750CD73026ABC806A1E1350E30354F3808' +
           '01A7FA09A5BF8D50000C5CB0D11');
      GameTab(4);
      If(FindDTM(DTMFishEquipMent,x,y,MIX1,MIY1,MIX2,MIY2))Then
        Result := True;
      FindFastRandoms;
      FreeDTM(DTMFishEquipMent);
    End;
    
    Function FindBankers: Boolean;
    var
      a: Extended;
    Begin
      DTMBankers := DTMFromString('78DA63EC676260086040017FFE30318800694' +
           '620FE0F048C2035A1A86AEEDE6580AB0101C6E9403581B8CD0101' +
           '00147B0C9E');
    
      If(FindDTMRotated(DTMBankers,x,y,MMX1,MMY1,MMX2,MMY2,0,360,0.1, a))Then
        Result:= True;
    
      FreeDTM(DTMBankers);
    End;
    
    Procedure GoToEdgeBank;
    Var
      Radie1, Radie2: Integer;
    Begin
      If(Not Loggedin)Then Exit;
      FindFastRandoms;
      Radie1:= 380;
      Radie2:= 336;
      WaterWalk(Radie1,Radie2,55,10,-10,0,0,0)
      MarkTime(Mark);
        Repeat
          FindFastRandoms;
    
          If(Not WaterWalk2(Radie1,Radie2,25+Random(30),15,-10,0,0,0))Then
            Begin
              WaterColorCheck;
              Radie1:= Radie1 - 20;
              Radie2:= Radie2 + 20;
            End;
    
          If(FindBankers)Then
            Begin
              Mouse(x-10,y,3,5,True);
              Flag;
              Break;
            End;
    
          FindFastRandoms;
          If(TimeFromMark(Mark)>90000)Then
            Begin
              Logout;
              Break;
            End;
        Until(Not Loggedin);
    End;
    
    Procedure ProgressReport;
    Begin
      Writeln(''{Made by Jukka});
      Writeln('============= Progress Report ============');
      Writeln('= Worked: ' + TimeRunning);
      Writeln('= Fished: ' + IntToStr(Fished) + ' Salmons&Trouts');
      Writeln('= Banked: ' + IntToStr(Banked) + ' Loads');
      Writeln('= Gained: ' + IntToStr(Gained) + ' Exp');
    End;
    
    Function PlayerCheck: Integer;
    begin
      If HowManyPlayers = 1 Then
        Result:= HowManyPlayers
      Else
        Result:= HowManyPlayers - 1;
    End;
    
    Procedure PlayersReport;
    Var
      I: Integer;
    Begin
      Players[CurrentPlayer].Integer3:= Players[CurrentPlayer].Integer1 * 60;
    
      Writeln('============= Players Report =============');
      Writeln('= Currentplayer: ' + IntToStr(CurrentPlayer) + '');
      Writeln('= Player Name  : ' + Players[CurrentPlayer].Name);
      Writeln('= Fished: ' + IntToStr(Players[CurrentPlayer].Integer1) + ' Salmons&Trouts');
      Writeln('= Banked: ' + IntToStr(Players[CurrentPlayer].Integer2) + ' Loads');
      Writeln('= Gained: ' + IntToStr(Players[CurrentPlayer].Integer3) + ' Exp.');
      Writeln('==========================================');
      Writeln('');
    End;
    
    Function IsFishing: Boolean;
    Begin
      If(Not Loggedin)Then Exit;
      AntiRandoms;
      WaitR(150+Random(150));
    
      If(Not FindColorSpiral(x,y,StaffOrb, 231, 133, 316, 194))Then
        Begin
          Result:= True;
          If(IsUpText('ure'))Then MMouse(Random(MSX2),Random(MSY2),100,100);
          Wait(100+Random(100));
          TheAntiBan;
        End;
      HandleWhirlPool;
      WaitR(150+Random(150));
    End;
    
    Procedure ChangeSpot;
    Var
      MMBox: TBox;
    Begin
      If(Not Loggedin)Then Exit;
      FindFastRandoms;
      MMBox.X1:= 618;
      MMBox.Y1:= 58;
      MMBox.X2:= 668;
      MMBox.Y2:= 95;
    
      If(FindColorSkipBox(x,y,FishSymbolColor,MMX1,MMY1,MMX2,MMY2,MMBox))Then
        Begin
          Mouse(x,y,5,5,true);
          Flag;
          ClickAgain:= ClickAgain + 100000;
        End Else
          Begin
            Logout;
          End;
    End;
    
    function FindHole : Boolean; //Dank
    var CX, CY : Integer;
    begin
     DTMSea :=  DTMFromstring('78DA63FCC4C0C070910105CC38F086410E483'  +
           '342F98C1F31D5E4B52C4255F399083520BB2E10A1E6127E3500EE'  +
           '831204');
     If(FindDTM(DTMSea,CX,CY,MSX1,MSY1,MSX2,MSY2))Then
       Begin
         MMouse(CX,CY,5,5);
         Wait(50);
         If(IsUpText('Lure'))Then
           Begin
             Result:= true;
           End;
       End;
     FreeDTM(DTMSea)
    End;
    
    Procedure FishTheFishes;
    Begin
      If(Not Loggedin)Then Exit;
      If(Invfull)Then Exit;
    
      AntiRandoms;
      WaitR(150+Random(150));
      If(FindHole)Then
        Begin
          HandleWhirlPool;
          GetMousePos(x,y)
          Mouse(x,y,0,0,true)
          Marktime(ClickAgain);
          FindFastRandoms;
          Flag;
          FindFastRandoms;
        End Else
          Begin
            ChangeSpot;
          End;
      WaitR(150+Random(150));
    End;
    
    Function LoadsDone: Boolean;
    Begin
      If(CurrentLoad >= HowManyLoads)Then
        Result := True;
    End;
    
    Function EasyBank: Boolean;
    Begin
      If(Not
     
  3. Unread #2 - Jun 29, 2007 at 8:48 AM
  4. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Syntax ERROR

    Code:
    Procedure DeclarePlayers;
    begin
         CurrentPlayer:=0;
         NumberOfPlayers(1);
    
      Players[0].Name  := '';
      Players[0].Pass  := '';
      Players[0].Nick  := '';
      Players[0].String1:= 'Water'; //Water, Or Fire Staff?
      Players[0].Active:= true;
    end;
    Copy that back into your script and fill it in.
     
< im a newb work on scar i need some plz | error how do i fix? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site