Results 1 to 11 of 11

Thread: Error

  1. #1
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Error

    Line 239: [Error] (14657:5): Unknown identifier 'PolyGlotTalk' in script C:\Program Files\SCAR 3.06\includes\SRL\SRL\extended\xAntiBan.scar

    Code:
    {      //-------------------------------------------------------------\\
           ||                       INSTRUCTIONS                          ||
           ||-------------------------------------------------------------||
           ||                                                             ||
           ||  1. Fill in the setup below.                                ||
           ||  2. Add your players in the DECLARE PLAYERS Lines 38-65.    ||
           ||  3. Drag Crosshair into RS window.                          ||
           ||  4. No more forms for now so just hit play.                 ||
           ||  EX: By the way, the axe head finder might work!            ||
           ||-------------------------------------------------------------||
           ||                       INSTRUCTIONS                          ||
           \\-------------------------------------------------------------//
                                                                                 }
    
    {.include SRL\SRL.SCAR}
    {.include SRL\SRL\extended\xAntiBan.scar}
    
    Var
      AxeHeadColor1, AxeHeadColor2, LoadNumber : Integer;
      LogDTM, BrokenAxeDTM, AxeHandleDTM, RegularAxeDTM, AxeHeadMask : Integer;
      StartXP, EndXP, TotalXP, TotalLogs : Integer;
    
    Const
      //---------------------------------------------------------------------------
     //                               SETUP
    //-----------------------------------------------------------------------------
      AmmountOfLoads = 5; //Ammount of loads you want to chop before switching players.
      TheTreeName    = 'Tree'; //Just guess.
      Boxy           = True; // Use Box Solver?
      Sandy          = True; // Use Sandwich Solver?
    //-----------------------------------------------------------------------------
    
    //--------------------//
      Treecolor = 4353420;   //Probobly should change this...
    //--------------------//
    
    
    //->Declare Players<-//
    Procedure DeclarePlayers;
    begin
      Status('Loading Players')
    
      HowManyPlayers  := 1;
      NumberOfPlayers( HowManyPlayers );
      CurrentPlayer := 0;
    
      Players[0].Name      := '';
      Players[0].Pass      := '';
      Players[0].Nick      := ''; // 2-4 letters of username
      Players[0].Active    := True;
    
      Players[1].Name      := 'UserName';
      Players[1].Pass      := 'Password';
      Players[1].Nick      := 'Nickname'; // 2-4 letters of username
      Players[1].Active    := True;
    
      Players[2].Name      := 'UserName';
      Players[2].Pass      := 'Password';
      Players[2].Nick      := 'Nickname'; // 2-4 letters of username
      Players[2].Active    := True;
    
      Players[3].Name      := 'UserName';
      Players[3].Pass      := 'Password';
      Players[3].Nick      := 'Nickname'; // 2-4 letters of username
      Players[3].Active    := True;
    end;
    
    
    //->Load Dtm's<-//
    Procedure LoadDTMs;
    
    begin
    Status('Loading DTM''s')
    
    LogDTM := DTMFromString('78DA632C666260E0646440067921460CFF813' +
           '448F43F103066314179C880118904D2354035FF19F0AB2905AA11' +
           '22604E23500D0F0135C94035DCF8D50000507909F5');
    
    BrokenAxeDTM := DTMFromString('78DA633CCAC4C090C1C8800C9A127919FE036' +
           '990E87F2060BC0C54938CAA06220B2381F445A09A04026A8E01D5' +
           'C41050B31FA8A698809AB384CD0100CBBD0D20');
    
    
    AxeHandleDTM := DTMFromString('78DA637CCFC4C0E0C6C8800CCA227819FE036' +
           '990E87F2060FC06546389AA06220B2381F473A09A00026ADE00D5' +
           'F81350F316A8C685809A97403541F8D50000D0090D3C');
    
    RegularAxeDTM := DTMFromString('78DA637461626060676440060DF1BC0CFF813' +
           '448F43F10300601D5FC6740038C482490F604AAF94D408D13500D' +
           '2B237E35F640358204D4F813618E1F50CD1F02EE0906AA61C26F0' +
           'E0099720B7E');
    
    AxeHeadMask := BitmapFromString(12, 8, 'z78DA3330200CDC3080018900' +
           '972E62CC24D55E4C9594BB993C13C8733FB5DCE3860310AF92185' +
           'B008E3078E5');
    end;
    
    
    //->Setup<-//
    Procedure MySetupScript;
    Begin
      Status('Set-Up')
      SetupSRL;
      DeclarePlayers;
      LoadDTMs;
      UseSandwichSolver := Sandy;
      UseBoxSolver      := Boxy;
      Begin
        If (Not(LoggedIn)) then
          Begin
            Status('Logging In')
            Loginplayer;
          end;
       end;
    end;
    
    
    //->Anti Randoms<-//
    Procedure TheAntiRandoms;
    Begin
      Status('Random Check')
      FindNormalRandoms;
      wait(10)
      FindTalk;
      wait(10)
      if (FindFight) then
      begin
        RunAwayDirection('E');
        Wait(8500 + random(3500));
        RunBack;
      end;
      Wait(10);
      FindTalk;
    end;
    
    
    //->Anti Ban<-//
    Var
      WCLEVEL, DONTBAN : Integer;
    
    Procedure TheAntiBan;
    begin
      WCLEVEL :=  GetSkillLevel('WoodCutting')
      TheAntiRandoms;
      Status('Preforming Antiban')
      if ( not ( LoggedIn )) then Exit;
      DONTBAN:= 1 + Random(140)
      case DONTBAN of
         1: RandomRClickEvery(2 + Random(10));
         2: HoverSkill('woodcutting', false);
         3: HoverSkill('random', false);
         4: DoEmote(1 + Random(20));
         5: BoredEvery(9 + Random (21));
         6: PickUpMouse;
         7: LeaveScreenEvery(10 + Random(5));
         8: RotateEvery(20 + Random(5));
         9: MMouse(MSX1,MSX2,10,10)
        10: MakeCompass('N')
        11: MakeCompass('S')
        12: GameTab(1+random(7))
        13: HighestAngle;
        14: TypeSend('Lol my wc lvl is ' +IntToStr (WClevel)  + '.')
        15: TypeSend('Wc lvl ' +IntToStr (WClevel) + '! Sweet!')
        16: TypeSend('Grr, my wc lvl is only ' +IntToStr (WClevel) + '')
        17: GetSkillLevel('WoodCutting')
        18: GameTab(1+Random(7))
        19: MakeCompass('W')
        20: MakeCompass('E')
        21: TypeSend('I''m lvl ' +IntToStr (WClevel) + ', but I want ' +IntToStr (WClevel + 3 + Random(8)) + '')
        22: TypeSend('' +IntToStr (WClevel) + ' woodcuting.../')
        23: TypeSend('I can''t wait till im lvl ' +IntToStr (WClevel + 4 + Random(7)) + '')
        24: TypeSend('Hmm... im only lvl ' +IntToStr (WClevel) + ' woodcutting... i should go for ' +IntToStr (WClevel + 6 + Random(8))+'')
        25: TypeSend('yay... lvl ' +IntToStr (WClevel) + 'wc... still...')
        26: TypeSend('cool! only ' + IntToStr (10+random(8)) + 'k xp till lvl ' +IntToStr (WClevel + 1 + random(4)) + ' wc')
        27: TypeSend('WC lvl ' +IntToStr (WClevel) + '')
        28: TypeSend('hmph... only ' +IntToStr (WClevel) + '')
        end;
       TheAntiRandoms;
      end;
    
    
    //->Get Axe Colors<-//
    Procedure GetAxeColors;
    Begin
      GameTab(4)
      Wait( 400 + random (100) )
      AxeHeadColor1 := GetColor( 589, 218 )
      AxeHeadColor2 := GetColor( 590, 220 )
      ClearDebug;
      WriteLn('Axe Colors are ' + IntToStr(Axeheadcolor1) + ' and ' + IntToStr(AxeHeadColor2) + '')
    end;
    
    
    //->Ent Checker<-//
    Var
      EX, EY : integer;
      FX, FY : integer;
    Procedure EntChecker;
    Begin
      Status('Checking For Ent')
      Flag;
      If (FindObjMultiText(EX, EY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
      Begin
      MMouse(Ex, EY, 0, 0)
        If FindColorTolerance( FX, FY, 55769, 85, 15, 115, 15, 20) then
        Begin
        Status('Ent Found');
        MouseFindFlag(648,83,5,5);
        Wait(15000+Random(5000));
        end;
      end;
    end;
    
    
    //->Check for Broken Axe<-//
    Var
      BX, BY, NX, NY : integer;
    
    Procedure IsAxeBroken;
    Begin
      Status('Checking for broken axe')
      GameTab(4)
      Wait(400 + Random (100))
      If (Not(FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 ))) then
      Begin
        Status('Axe Not Broken')
        Exit;
      end;
      Begin
        If (FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 )) and
           (Not(FindDTM(RegularAxeDTM, NX, NY, MIX1, MIY1, MIX2, MIY2))) then
        Begin
          Status('Broke an Axe')
          NextPlayer(False)
          end;
       end;
    end;
    
    
    //->Axe Head Finder<-//
    Var
      AX, AY, SX, SY, HX, HY : Integer;
    
    Procedure TheFindAxe;
      Begin
        GameTab(4)
        If (FindDTM(AxeHandleDTM, AX, AY, MIX1, MIY1, MIX2, MIY2 )) Then
        Begin
          Status('Looking For Axe')
          If FindObjArea(SX, SY, 'head', MSX1, MSY1, MSX2, MSY2, AxeHeadColor1, 3, True) or
             FindObjArea(SX, SY, 'head', MSX1, MSY1, MSX2, MSY2, AxeHeadColor2, 3, True) then
             Begin
               Mouse(SX, SY, 3, 3, False)
               ChooseOption(x, y, 'Take')
               Wait(300 + Random (100))
               GameTab(4)
               If FindBitmap(AxeHeadMask, HX, HY) then
               Begin
                 Mouse(HX, HY, 3, 3, True)
                 Wait(100 + Random(100))
                 Mouse(AX, AY, 3, 3, True)
             end;
          end;
       end;
    end;
    
    
    //->Start Chopping<-//
    Var
      TX, TY : Integer;
    
    Procedure StartChopping;
    Begin
     Repeat
     Begin
       IsAxeBroken;
       Status('Looking For Oak')
       If (InvFull) then
       Begin
         Exit;
    end;
      EntChecker;
      If (FindObjMultiText(TX, TY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
      Begin
        Mouse(TX, TY, 3, 3, True)
        Wait( 100 + Random (200) )
        TheAntiRandoms;
        Wait(10)
        TheAntiBan;
        Wait(10)
        EntChecker;
        Wait(10)
        TheFindAxe;
        Wait(4000+Random(1000))
      end;
    end;
    Until (InvFull)
    end;
    
    
    //->Start Dropping<-//
    Var
      LX, LY, DroppedLogsCount : Integer;
    
    Procedure StartDropping;
      Begin
       If (InvFull) then
       Begin
       GameTab(4)
       DroppedLogsCount := CountItemDtm(LogDTM) + 6
       Repeat
       GameTab(4)
       If (FindDTM(LogDTM, LX, LY, MIX1, MIY1, MIX2, MIY2)) then
       begin
       Mouse(LX, LY, 8, 8, false)
       ChooseOption(x,y,'Drop')
       TheAntiRandoms;
       wait(400+random(100))
     end;
       Until (Not(FindDTM(LogDTM, LX, LY, MIX1, MIY1, MIX2, MIY2)))
        LoadNumber := LoadNumber + 1
      end;
    end;
    
    //->Progress Report<-//
    Procedure ReportIt;
    Begin
      SRLRandomsReport;
      WriteLn('')
      WriteLn('<------------------------------------------------>')
      WriteLn(' |               PROGRESS REPORT                |')
      WriteLn('<------------------------------------------------>')
      WriteLn('  Script Time: ' + (TimeRunning) + '')
      WriteLn('  Logs Chopped: ' + IntToStr (TotalLogs) + '')
      WriteLn('  XP Gained: ' + IntToStr (EndXP - StartXP + TotalXP) + '')
      WriteLn('<------------------------------------------------>')
      WriteLn(' |               PROGRESS REPORT                |')
      WriteLn('<------------------------------------------------>')
    end;
    
    //->Main Stuff<-//
    begin
    wait(1200)
    MySetupScript;
    HighestAngle;
    Repeat
    GetAxeColors;
    StartXP := GetXp('Woodcutting')
    Repeat
    StartChopping;
    If ( Not (LoggedIn) ) Then NextPlayer (False)
    StartDropping;
    EndXP := GetXp('Woodcutting')
    TotalLogs:= TotalLogs + DroppedLogsCount
    ReportIt;
    If ( Not (LoggedIn) ) Then NextPlayer (False)
    Until (LoadNumber + Random (5) = AmmountOfLoads)
    LogOut;
    NextPlayer(True);
    HighestAngle;
    If ( Not (LoggedIn) ) Then NextPlayer (False)
    Until False;
    end.

  2. #2
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You must change includes to this:
    {.include SRL\SRL\extended\xAntiBan.scar}
    {.include SRL\SRL.SCAR}


    But then you get "Line 28: [Error] (31:6): Unknown identifier 'TimeFromMark'", because AntiBan uses TimeFromMark procedure which SRL.scar includes, and XantiBan.scar is included first so it wont regonize it.

    Lol, a bug in SRL, seems like you cant use antiban stuff.

    EDIT: I checked it and you need to add {.include SRL\SRL\extended\xAutoTalk.scar} before xantiban.scar

    So add this into it:
    {.include SRL\SRL.SCAR}
    {.include SRL\SRL\extended\xAutoTalk.scar}
    {.include SRL\SRL\extended\xAntiBan.scar}

  3. #3
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Update: I ran the script with the edits you told me to make.. still another error.

    Line 267: [Error] (283:1): Unknown identifier 'TypeSend' in script C:\Program Files\SCAR 3.06\includes\SRL\SRL\extended\xAutoTalk.scar

  4. #4
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol it gave me an error: "uknown identifier 'FindObjArea'"
    Then I added {.include SRL\SRL\extended\xObject.scar}

    Well, then I tried to run with it, then it gave another error (In SRL).
    This is too stupid. I dont even use SRL 3.7, I have SRL 3.6 it works fine for me.

  5. #5
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is SRL 3.6 available?
    I guess when I installed SCAR it auto-updated to SRL 3.7...

    Yup, same error as yours.
    Line 252: [Error] (15663:4): Unknown identifier 'FindObjArea' in script C:\Program Files\SCAR 3.06\Scripts\Any Tree Power Chopper.scar

  6. #6
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Go to http://www.freddy1990.com and download SCAR 2.03.
    SRL 3.6: http://www.villavu.com/forum/showthr...=10331?t=11583 (Post #2)

    Exctract SRL 3.6 to SCAR's main folder.

  7. #7
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Meh..

    Line 174: [Hint] (195:43): Variable 'NEWLINE' never used in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar
    [Runtime Error] : Out Of Range in line 49 in script C:\Program Files\SCAR 2.03\Scripts\Any Tree Power Chopper 4.scar

  8. #8
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Draven View Post
    Meh..

    Line 174: [Hint] (195:43): Variable 'NEWLINE' never used in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar
    its ok, its just a hint, not an error.

  9. #9
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [Runtime Error] : Out Of Range in line 49 in script C:\Program Files\SCAR 2.03\Scripts\Any Tree Power Chopper 4.scar
    Code:
    Procedure DeclarePlayers;
    begin
      Status('Loading Players')
    
      HowManyPlayers  := 1;
      NumberOfPlayers( HowManyPlayers );
      CurrentPlayer := 0;
    
         Players[0].Name      := 'i typed name here';
         Players[0].Pass      := 'and pw herer';
         Players[0].Nick      := 'put the first 2 letters of the name'; // 2-4 letters of username
         Players[0].Active    := True;
    
         Players[1].Name      := 'Username'; << leave these like this? (LINE 49 IS HERE)
         Players[1].Pass      := 'Password';  << leave these like this?
         Players[1].Nick      := 'Nickname'; // 2-4 letters of username
         Players[1].Active    := False; <<< i set these to false is that correct?
    
         Players[2].Name      := 'Username';
         Players[2].Pass      := 'Password';
         Players[2].Nick      := 'Nickname'; // 2-4 letters of username
         Players[2].Active    := False;
    
         Players[3].Name      := 'Username';
         Players[3].Pass      := 'Password';
         Players[3].Nick      := 'Nickname'; // 2-4 letters of username
         Players[3].Active    := False;
    end;

  10. #10
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    HowManyPlayers := 4;

  11. #11
    Join Date
    May 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok it finally works but when I run it.. it only completes the login procedure and doesn't click on the welcome screen to exit it and if I manually exit the welcome screen it doesn't even begin the script itself, my character just sits there.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •