Results 1 to 5 of 5

Thread: Willow chopper and banker

  1. #1
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Exclamation Willow chopper and banker

    Hi, i made this script to chop willows and then bank them, but i get this error:
    Line 67: [Error] (20383:10): Duplicate identifier 'BANKCOLOR' in script....
    i didn't find anything that was wrong so can someone help?

    PHP Code:
    program WillowChopperAndBanker;
    {.include 
    SRL/SRL.Scar}

    Var
      
    Loads Integer;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers
    :=1;
      
    NumberOfPlayers(HowManyPlayers);
      
    CurrentPlayer:= 0;

      
    Players[0].Name        :='User';
      
    Players[0].Pass        :='Pass';
      
    Players[0].Nick        :='Nick';
      
    Players[0].Active      := True;
    end;

    Function 
    WillowMMInteger;
    var
      
    arPTPointArray;
      
    arCTIntegerArray;
      
    tmpCTSiarLInteger;
      
    RGBInteger;
      
    XYZExtended;
    begin
      tmpCTS 
    := GetColorToleranceSpeed;
      
    ColorToleranceSpeed(2);
      
    SetColorSpeed2Modifiers(0.984.84);

      
    FindColorsSpiralTolerance(MMCXMMCYarP473404MMX1MMY1MMX2MMY22);
      if (
    Length(arP) = 0then
      begin
        Writeln
    ('Failed to find the color, no result.');
        
    ColorToleranceSpeed(tmpCTS);
        
    SetColorSpeed2Modifiers(0.20.2);
        Exit;
      
    end;

      
    arC := GetColors(arP);
      
    ClearSameIntegers(arC);
      
    arL := High(arC);

      for 
    := 0 to arL do
      
    begin
        ColorToRGB
    (arC[i], RGB);

        if (
    >= 56) and (<= 65) and (>= 53) and (<= 62) and (>= 3) and (<= 12then
        begin
          ColorToXYZ
    (arC[i], XYZ);

          if (
    >= 3.10) and (<= 3.69) and (>= 3.66) and (<= 4.31) and (>= 0.65) and (<= 0.98then
          begin
            Result 
    := arC[i];
            Break;
          
    end;
        
    end;
      
    end;

      
    ColorToleranceSpeed(tmpCTS);
      
    SetColorSpeed2Modifiers(0.20.2);

      if (
    arL 1then
        Writeln
    ('AutoColor failed in finding the color.');
    end;

    Function 
    BankColorInteger;
    var
      
    arPTPointArray;
      
    arCTIntegerArray;
      
    tmpCTSiarLInteger;
      
    RGBInteger;
      
    XYZExtended;
    begin
      tmpCTS 
    := GetColorToleranceSpeed;
      
    ColorToleranceSpeed(2);
      
    SetColorSpeed2Modifiers(47.922.38);

      
    FindColorsSpiralTolerance(MMCXMMCYarP5395022MMX1MMY1MMX2MMY21);
      if (
    Length(arP) = 0then
      begin
        Writeln
    ('Failed to find the color, no result.');
        
    ColorToleranceSpeed(tmpCTS);
        
    SetColorSpeed2Modifiers(0.20.2);
        Exit;
      
    end;

      
    arC := GetColors(arP);
      
    ClearSameIntegers(arC);
      
    arL := High(arC);

      for 
    := 0 to arL do
      
    begin
        ColorToRGB
    (arC[i], RGB);

        if (
    >= 76) and (<= 87) and (>= 75) and (<= 82) and (>= 76) and (<= 82then
        begin
          ColorToXYZ
    (arC[i], XYZ);

          if (
    >= 7.07) and (<= 8.03) and (>= 7.42) and (<= 8.14) and (>= 8.16) and (<= 8.95then
          begin
            Result 
    := arC[i];
            Break;
          
    end;
        
    end;
      
    end;

      
    ColorToleranceSpeed(tmpCTS);
      
    SetColorSpeed2Modifiers(0.20.2);

      if (
    arL 1then
        Writeln
    ('AutoColor failed in finding the color.');
    end;

    Function 
    BankerInteger;
    var
      
    arPTPointArray;
      
    arCTIntegerArray;
      
    tmpCTSiarLInteger;
      
    RGBInteger;
      
    XYZExtended;
    begin
      tmpCTS 
    := GetColorToleranceSpeed;
      
    ColorToleranceSpeed(2);
      
    SetColorSpeed2Modifiers(1.490.90);

      
    FindColorsSpiralTolerance(MSCXMSCYarP13294737MSX1MSY1MSX2MSY226);
      if (
    Length(arP) = 0then
      begin
        Writeln
    ('Failed to find the color, no result.');
        
    ColorToleranceSpeed(tmpCTS);
        
    SetColorSpeed2Modifiers(0.20.2);
        Exit;
      
    end;

      
    arC := GetColors(arP);
      
    ClearSameIntegers(arC);
      
    arL := High(arC);

      for 
    := 0 to arL do
      
    begin
        ColorToRGB
    (arC[i], RGB);

        if (
    >= 151) and (<= 254) and (>= 114) and (<= 242) and (>= 83) and (<= 253then
        begin
          ColorToXYZ
    (arC[i], XYZ);

          if (
    >= 20.66) and (<= 89.55) and (>= 19.56) and (<= 90.84) and (>= 11.05) and (<= 104.90then
          begin
            Result 
    := arC[i];
            Break;
          
    end;
        
    end;
      
    end;

      
    ColorToleranceSpeed(tmpCTS);
      
    SetColorSpeed2Modifiers(0.20.2);

      if (
    arL 1then
        Writeln
    ('AutoColor failed in finding the color.');
    end;

    Function 
    LogInteger;
    var
      
    arPTPointArray;
      
    arCTIntegerArray;
      
    tmpCTSiarLInteger;
      
    RGBInteger;
      
    XYZExtended;
    begin
      tmpCTS 
    := GetColorToleranceSpeed;
      
    ColorToleranceSpeed(2);
      
    SetColorSpeed2Modifiers(0.191.83);

      
    FindColorsSpiralTolerance(MICXMICYarP1325377MIX1MIY1MIX2MIY21);
      if (
    Length(arP) = 0then
      begin
        Writeln
    ('Failed to find the color, no result.');
        
    ColorToleranceSpeed(tmpCTS);
        
    SetColorSpeed2Modifiers(0.20.2);
        Exit;
      
    end;

      
    arC := GetColors(arP);
      
    ClearSameIntegers(arC);
      
    arL := High(arC);

      for 
    := 0 to arL do
      
    begin
        ColorToRGB
    (arC[i], RGB);

        if (
    >= 60) and (<= 70) and (>= 53) and (<= 62) and (>= 18) and (<= 22then
        begin
          ColorToXYZ
    (arC[i], XYZ);

          if (
    >= 3.34) and (<= 4.28) and (>= 3.66) and (<= 4.68) and (>= 1.13) and (<= 1.40then
          begin
            Result 
    := arC[i];
            Break;
          
    end;
        
    end;
      
    end;

      
    ColorToleranceSpeed(tmpCTS);
      
    SetColorSpeed2Modifiers(0.20.2);

      if (
    arL 1then
        Writeln
    ('AutoColor failed in finding the color.');
    end;

    Function 
    WillowColorInteger;
    var
      
    arPTPointArray;
      
    arCTIntegerArray;
      
    tmpCTSiarLInteger;
      
    RGBInteger;
      
    XYZExtended;
    begin
      tmpCTS 
    := GetColorToleranceSpeed;
      
    ColorToleranceSpeed(2);
      
    SetColorSpeed2Modifiers(0.140.76);

      
    FindColorsSpiralTolerance(MSCXMSCYarP4288349MSX1MSY1MSX2MSY218);
      if (
    Length(arP) = 0then
      begin
        Writeln
    ('Failed to find the color, no result.');
        
    ColorToleranceSpeed(tmpCTS);
        
    SetColorSpeed2Modifiers(0.20.2);
        Exit;
      
    end;

      
    arC := GetColors(arP);
      
    ClearSameIntegers(arC);
      
    arL := High(arC);

      for 
    := 0 to arL do
      
    begin
        ColorToRGB
    (arC[i], RGB);

        if (
    >= 46) and (<= 138) and (>= 59) and (<= 162) and (>= 25) and (<= 107then
        begin
          ColorToXYZ
    (arC[i], XYZ);

          if (
    >= 2.95) and (<= 25.68) and (>= 3.89) and (<= 31.87) and (>= 1.56) and (<= 18.45then
          begin
            Result 
    := arC[i];
            
    Writeln('AutoColor = ' IntToStr(arC[i]));
            Break;
          
    end;
        
    end;
      
    end;

      
    ColorToleranceSpeed(tmpCTS);
      
    SetColorSpeed2Modifiers(0.20.2);

      if (
    arL 1then
        Writeln
    ('AutoColor failed in finding the color.');
    end;

    Procedure AntiBan;
    begin
      
    if(not(LoggedIn))then
        
    Exit;
      case 
    Random(11of
        0
    begin
             HoverSkill
    ('Woodcutting'false);
             
    Wait(2500 Random(500));
             
    ClickMouse(658,185,true);
           
    end;

        
    1begin
             HoverSkill
    ('Mining',false);
             
    Wait(2500 Random(500));
             
    ClickMouse(658,185,true);
           
    end;

        
    2PickUpMouse;

        
    5begin
             
    case random(6of
               0
    TypeSend('Whats up?');

               
    1TypeSend('wc lvls?');

               
    2TypeSend('Woodcutting levels?');

               
    3TypeSend('sup?');

               
    4TypeSend('This is so booring!');

               
    5TypeSend('Booring!');

             
    end;
           
    end;

        
    6begin
             MakeCompass
    ('N');
             
    Wait(10+random(5));
             
    MakeCompass('S');
             
    Wait(10+random(5));
             
    MakeCompass('N');
             
    Wait(1000);
           
    end;

        
    8SleepAndMoveMouse(6000+random(4000));

      
    end;
    end;

    Procedure Proggy;
    begin
    ClearDebug
    ;
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    Writeln('WillowChopper By: Leevi');
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    Writeln('Loads Done: 'IntToStr(Loads));
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    Writeln('Time Running: 'TimeRunning);
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    end;

    Procedure WalkToTrees;
    begin
      
    If Not LoggedIn Then Exit;
      If 
    InvFull Then Exit;
      
    RadialWalk(WillowMM1952405522);
      
    Wait(2000 Random(1000));
      
    AntiBan;
      Exit;
    end;

    Procedure ChopTree;
    Var
      
    TPA TPointArray;
      
    ATPA T2DPointArray;
      
    IHXInteger;
    Begin
      
    If Not LoggedIn Then Exit;
      If 
    InvFull Then Exit;
      
    Proggy;
      
    ColorToleranceSpeed(2);
      
    SetColorSpeed2Modifiers(0.140.76);
      
    FindColorsSpriralTolerance(MSCXMSCYTPAWillowColorMSX1MSY1MSX2MSY2);
      
    ATPA := TPAToATPA(TPA30);
      If 
    Length(ATPA) = 0 Then
        
    Exit;
      
    := High(ATPA);
      For 
    := 0 To H Do
      
    Begin
        MiddleTPAEx
    (ATPA[I], XY);
        
    MMouse(XY00);
        
    Wait(10 Random(90));
        If 
    IsUpText('Willow')Then
        Begin
          Mouse
    (XY00False);
          
    ChooseOption('hop');
          
    Proggy;
          
    Wait(10000 Random(3000));
          
    AntiBan;
          
    Proggy;
          
    ColorToleranceSpeed(1);
          
    SetColorSpeed2Modifiers(0.20.2);
          
    AntiBan;
          
    Proggy;
          Exit;
        
    End;
      
    End;
    End;

    Procedure ToBank;
    Var
      
    TPA TPointArray;
      
    ATPA T2DPointArray;
      
    IHXInteger;
    Begin
      
    If Not LoggedIn Then Exit;
      If 
    Not InvFull Then ChopTree;
      
    Loads := Loads +1;
      
    ColorToleranceSpeed(2);
      
    SetColorSpeed2Modifiers(47.922.38);
      
    FindColorsSpiralTolerance(MMCXMMCYTPABankColorMMX1MMY1MMX2MMY2,5);
      
    ATPA TPAToATPA(TPA2);
      If 
    Length(ATPA) = 0 Then
        
    Exit;
      
    := High(ATPA);
      For 
    := 0 To H Do
      
    Begin
        MiddleTPAEx
    (ATPA[I], XY);
        
    Mouse(XY00True);
        
    Proggy;
        
    Wait(15000 Random(5000));
        
    Proggy;
        
    ColorToleranceSpeed(1);
        
    SetColorSpeed2Modifiers(0.20.2);
        
    AntiBan;
        Exit;
      
    End;
    End;

    Procedure InBank;
    Var
      
    TPA,TPA2 TPointArray;
      
    ATPA,ATPA2 T2DPointArray;
      
    IHABXInteger;
    Begin
      
    If Not LoggedIn Then Exit;
      If 
    Not InvFull Then WalkToTrees;
      
    Proggy;
      
    ColorSpeedTolerance(2);
      
    FindColorsSpiralTolerance(MSCXMSCYTPABankerMSX1MSY1MSX2MSY2,5);
      
    ATPA := TPAToATPA(TPA5);
      If 
    Length(ATPA) = 0 Then
        
    Exit;
      
    := High(ATPA);
      For 
    := 0 To H Do
      
    Begin
        MiddleTPAEx
    (ATPA[I], XY);
        
    MMouse(XY00);
        
    Wait(50 Random(50));
        If 
    IsUpText('Banker')Then
        Begin
          Mouse
    (XY00False);
          
    ChooseOption('ank');
          
    Wait(2000 Random(500));
          
    Proggy;
          
    Begin
            ColorSpeedTolerance
    (2);
            
    SetColorSpeed2Modifiers(0.191.83);
            
    FindColorsTolerance(MICXMICYTPA2LogMIX1MIY1MIX2MIY2);
            
    ATPA2 := TPAToATPA(TPA210);
            If 
    Length(ATPA2) = 0 Then
              
    Exit;
            
    := High(ATPA2);
            For 
    := 0 To H Do
            
    Begin
              MiddleTPAEx
    (ATPA2[B], XY);
              
    MMouse(XY00);
              
    Wait(50 Random(50));
              If 
    IsUpText('logs')Then
              Begin
                Mouse
    (XY00False);
                
    ChooseOption('All');
                
    Wait(1000 Random(100));
                
    ClickMouse(48934True);
                
    Wait(1000 Random(100));
                
    ColorSpeedTolerance(1);
                
    AntiBan;
                
    Proggy;
                Exit;
              
    End;
            
    End;
          
    End;
        
    End;
      
    End;
    End;
              
    Begin
      SetupSRL
    ;
      
    ActivateClient;
      
    DeclarePlayers;
      
    AntiBan;
      
    Proggy;
      If 
    Not LoggedIn Then LoginPlayer;
      
    Repeat
        WalkToTrees
    ;
        
    ChopTree;
        
    ToBank;
        
    InBank;
        
    Proggy;
      
    Until(False);
    End

  2. #2
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by -Mato- View Post
    Hi, i made this script
    Hmm. maybe has somthing do do with it is outdated and is copied?

    SCAR Code:
    Procedure Proggy;
    begin
    ClearDebug;
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    Writeln('WillowChopper By: Leevi');
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    Writeln('Loads Done: '+ IntToStr(Loads));
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    Writeln('Time Running: '+ TimeRunning);
    Writeln('|||||||||||||||||||||||||||||||||||||||||||');
    end;

    Whos Leevi?
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  3. #3
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Leevi is my real name. What i should do to it so it wouldn't outdated?

  4. #4
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Just change BankColor to like TheBankColor. I believe BankColor is a var inside of SRL, I'm not sure though.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  5. #5
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you very much Camo, it runs now without errors.

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
  •