Error

Discussion in 'Scar/Simba Help' started by rob e lee1, Jul 29, 2007.

Error
  1. Unread #1 - Jul 29, 2007 at 11:00 PM
  2. rob e lee1
    Joined:
    Jul 24, 2007
    Posts:
    80
    Referrals:
    1
    Sythe Gold:
    0

    rob e lee1 Member
    Banned

    Error

    got this error

    Line 111: [Error] (16302:27) Uknown identifier head in script

    this is the script

    Code:
    Program AOCAS;
    {.Include SRL/SRL.scar}
    {.Include SRL/SRL/Skill/WoodCutting.scar}
    {.Include SRL/SRL/misc/Trade.scar}
    
    {-------------------------------------------}
    {Start in remmy g shop or near the house    }
    {portal on low detail with axe in first     }
    {invonoty spot or weilded.                  }
    {-------------------------------------------}
    
    Var
    TreeColor1,TotalLogs,Log: Integer;
    
    {-Set this up-}
    Procedure DeclarePlayers;
    Begin
         HowManyPlayers  :=1;
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer:=0;
    
         Players[0].Name :='Username';
         Players[0].Pass :='password';
         Players[0].Nick :='urnick';
         Players[0].Loc  :='Fally';
         Players[0].Skill:='WoodCutting';
         Players[0].Active:=True;
    
    End;
    
    {-Progress Report-}
    Procedure Report;
    Begin
      SRLRandomsReport;
      WriteLn('*************************************************************');
      WriteLn('*TimeRunning: ' + (TimeRunning) + '-------------------------*')
      WriteLn('*Loads Sold: ' + IntToStr (TotalLogs) +  '------------------*')
      WriteLn('*************************************************************');
    end;
    
    {-Randoms-}
    function FindFastRandoms: Boolean;
    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;
                 Logout;
                 Exit;
               end;
             end;
         7: begin
               if InBlack then
               begin
                 Result := True;
                 Logout;
                 Exit;
               end;
             end;
         8: if(RC)or(HandleTrade)then
              Result := True;
         9: if FindTalk then
              Result := True;
    //     10:  if ChatBack then
    //            Result := True;
        end;
        wait(1);
      end;
    end;
    
    Procedure RandomChecker;
    Begin
     FindFastRandoms;
     FindNormalRandoms;
    End;
    
    {-SRL Axe Finder-}
    function XFindHead: Boolean;
    var
      c, AxeHeadDTM, Tries, x, y: Integer;
      hStart: Boolean;
    begin
      AxeHeadDTM := DTMFromString('78DA63CC62626078C180021C2312191E02694' +
        '620FE0F048C694035CF18D000231209A473816A9E12A1E6150135' +
        'A94035AF09A801B9F9090135994498930C54F392809A3CCCF0415' +
        '70300FB8311DF');
      GameTab(4);
      Result := True;
    
      c := CreateBitmapMaskFromText('You do not have an axe', SmallChars);
      if (FindBitmapMaskTolerance(c, x, y, 17, 410, 495, 452, 10, 85)) then
      begin
        if ((EquipAxe = False) and
          not (GetColor(590, 220) = Head) or
          not (GetColor(587, 219) = Head2) or
          not (GetColor(588, 218) = Head3)) then
          hStart := True;
        if (EquipAxe) then
        begin
          GameTab(5);
          Wait(200 + Random(200));
          if not (GetColor(597, 294) = Head) or
            not (GetColor(600, 295) = Head2) or
            not (GetColor(599, 298) = Head3) then
          begin
            hStart := True;
            Mouse(592, 297, 2, 2, True);
            Wait(1000);
          end;
        end;
      end;
      if (hStart = True) then
      begin
        Result := False;
        Tries := 0;
        repeat
          if not LoggedIn then Exit;
          if (FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465)) then
            Break;
          if not (FindObjMulti('Take', Head, Head2, Head3, 5)) then
          begin
            Tries := Tries + 1;
            WriteLn('Axe head not found. Taken ' + IntToStr(tries) + ' tries');
            Status('Axe Head not found - Rotating Screen');
            KeyDown(VK_LEFT);
            Wait(1000 + Random(1000));
            KeyUp(VK_LEFT);
            Wait(400 + Random(300));
            if not FindObjMulti('Take', Head, Head2, Head3, 5) then
            begin
              Status('Axe Head not found - Moving to Red Dot');
              x := 648;
              y := 83;
              FindColorSpiral(x, y, 241, 570, 5, 725, 155)
                Mouse(x + 3, y + 3, 2, 2, True);
              Flag;
              Wait(500 + Random(300));
            end;
          end;
          if FindObjMulti('Take', Head, Head2, Head3, 5) then
          begin
            Status('Found Axe Head');
            WriteLn('Axe head was found.  Picking it up');
            Wait(450 + Random(400));
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, True);
            Flag;
            Wait(500 + Random(300));
          end;
        until (tries > 9) or
          (FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465))
          if not (tries > 9) then
          if (AttachHead) then
            Result := True;
      end;
      FreeBitmap(c);
      FreeDTM(AxeHeadDTM);
    end;
    
    {-DTMS-}
    Procedure LoadDTMs;
    Begin
    
    Log := DTMFromString('78DA632C666260E0646440067921460CFF813' +
           '448F43F103066314179C880118904D2354035FF19F0AB2905AA11' +
           '22604E23500D0F0135C94035DCF8D50000507909F5');
    
    End;
    
    {-Startup-}
    Procedure Startup;
    Var
    RX,RY: Integer;
    Begin
     SetupSRL;
     Declareplayers;
     LoadDTMs;
     Loginplayer;
     HighestAngle;
     MakeCompass('N')
     Wait (500+Random (100));
     TreeColor1 := 2107432;
     FindSymbol(RX,RY,'Portal');
     Wait (100+Random (50));
     Mouse (RX-15,RY-6,0,0,True);
     Flag;
    End;
    
    {-Choping-}
    Procedure Chop; //Took from my power chopper works good
    Var
    R,CX,CY: Integer;
    
    Begin
     R:=Random (6);
      Begin
    
     If (R=1) Then
    Begin
     If (FindObj(CX,CY,'Oak',TreeColor1,7)) Then
    Mouse (CX,CY,0,0,True);
    End;
     If (R=2) Then
      Begin
      If (FindObj(CX,CY,'Oak',TreeColor1,7)) Then
    Mouse (CY,CY,0,0,True);
     End;
    If (R=3) Then
     Begin
       If (FindObj(CX,CY,'Oak',TreeColor1,7)) Then
     Mouse (CX,CY,0,0,False);
    Wait (100+Random (500));
    ChooseOption(x,y,'hop');
    End;
     If (R=4) Then
      Begin
        If (FindObj(CX,CY,'Oak',TreeColor1,7)) Then
     Mouse (CX,CY,0,0,False);
    Wait (600+Random (200));
    ChooseOption(x,y,'hop');
      End;
    If (R=5) Then
     Begin
          If (FindObj(CX,CY,'Oak',TreeColor1,7)) Then
     Mouse (CX,CY,0,0,True);
    End;
      if (not(Loggedin)) then Loginplayer;
     End;
      XFindHead;
      RandomChecker;
    End;
    
    {-Walk To Shop And Sell-}
    Procedure ToShop;
    Var
    RX,RY,CX,CY: Integer;
    
    Begin
     XFindHead;
     Wait (500+Random (700));
     FindSymbol(RX,RY,'Portal');
     Wait (100+Random (50));
     Mouse (RX-15,RY+16,0,0,True);
     Flag;
     FindSymbol(RX,RY,'Shop');
     Wait (3000+Random (50));
     Mouse (rx+6,ry,0,3,True);
     Wait (1000+Random (200));
     If Not (FindSymbol(RX,RY,'Shop')) Then
     Begin
     RunAwayDirection('S');
     SetRun(False);
     Wait (700+Random (100));
     Flag;
     End;
     If Not (FindSymbol(RX,RY,'Shop')) Then
     Begin
     FindSymbol(RX,RY,'Shop');
     Wait (200+Random (200));
     Mouse (RX+3,RY,0,0,True);
     Flag;
     Wait (500+Random (100));
     If Not (FindSymbol(RX,RY,'Shop')) Then
     Begin
     Writeln ('Could Not Find Shop Symbol')
     Writeln ('Npc Might Be In Way')
     Writeln ('Loging In And Out To Refresh')
     Logout;
     LoginPlayer;
     HighestAngle;
     MakeCompass('N')
     FindAxeHeadColor;
     Writeln ('Refreshed')
     Wait (500+Random (300));
     FindSymbol(RX,RY,'Shop');
     Flag;
     Wait (200+Random (100));
     End;
     End;
     Repeat
     If (FindObj(CX,CY,'keeper',3103364,3)) Then
     Mouse (CX,CY,1,1,False);
     Wait (400+Random (100));
     ChooseOption(X,Y,'rade');
     if (not(Loggedin)) then Loginplayer;
     Wait (4000+Random (1000));
     Until (GetColor(248, 303) = 2070783);
     Wait (500+Random (100));
     Repeat
     If (FindInvDtm(x,y,Log)) Then
     Mouse (x,y,1,2,False);
     Wait (200+Random (100));
     ChooseOption (x,y,'10');
     Wait (800+Random (200));
     Until Not (FindInvDtm(x,y,Log));
     FindSymbol(RX,RY,'Portal');
     Wait (100+Random (50));
     Mouse (RX-15,RY-8,0,0,True);
     Flag;
     TotalLogs:=TotalLogs+1
     Wait (300+Random (100));
     Report;
     If Not (FindObj(CX,CY,'Oak',TreeColor1,7)) Then
     Begin
     FindSymbol(RX,RY,'Portal');
     Wait (100+Random (50));
     Mouse (RX-15,RY-10,0,0,True);
     Flag;
    End;
    End;
    
    {-My Crapy Anti Ban Kinda Works :(-}
    Procedure XAntiBan;
    Var
    R: Integer;
    
    Begin
     R:=Random (50);
    Begin
     if (not(Loggedin)) then Loginplayer;
     If (R=1) Then
     HoverSkill('WoodCutting',False);
     If (R=5) Then
     GameTab(1);
     If (R=10) Then
     HumanText('So Bord......',1);
     If (R=15) Then
     AntiBan;
     If (R=20) Then
     Wait (3000+Random (700));
     If (R=30) Then
     PickUpMouse
     If (R=40) Then
     LeaveScreenEvery(4);
     If (R=50) Then
     Wait (1000+Random (500));
    End;
    End;
    
    {-Main Loop-}
    Begin
     Startup;
     FindAxeHeadColor;
    Repeat
    
     Chop;
     Flag;
     FindEnt(TreeColor1);
     RandomChecker;
     XFindHead;
     If (InvFull) Then
     ToShop;
     XAntiBan;
     Wait (6000+Random (2000));
      if (not(Loggedin)) then Loginplayer;
    Until (False);
    End.
     
  3. Unread #2 - Jul 30, 2007 at 12:48 AM
  4. Abysal Rush
    Joined:
    Jul 26, 2007
    Posts:
    565
    Referrals:
    0
    Sythe Gold:
    0

    Abysal Rush Forum Addict

    Error

    Post what the 111 line is, there might be a typo, or some mistake.
     
  5. Unread #3 - Jul 30, 2007 at 10:25 AM
  6. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Error

    Use Scar 2.03 from www.freddy1990.com and SRL 3.6b from the PowerSkills download which is stickied in the Runescape Scripts forum.
     
< Need someone to make me SLR forum account. | GUyz... >

Users viewing this thread
1 guest


 
 
Adblock breaks this site