Results 1 to 5 of 5

Thread: Agility Problem

  1. #1
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default Agility Problem

    Hey guys,

    So I've been trying to make a colour bot (All coded by me )

    Code:
    program GnomeAgil;
    
    //  {$DEFINE SMART}
    {$i SRL\SRL.simba}
    
     Const
     SRLStats_Username = '';
     SRLStats_Password = '';
     BreakEvery        = 120;
     BreakFor          = 5;
     NumbOfPlayers=      1;
     StartPlayer=        0;
    
     procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := ''; //Runescape Username
      Players[0].Pass := ''; //Runescape Password
      Players[0].Nick := ''; //3-4 letters that you will recognise
      Players[0].Member := True; //Are you a member?
      Players[0].Active := True; //Not sure what this means... I saw it on other scripts
      Players[0].Pin := ''; //Bank Pin
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume','ssence'];
    
    end;
    
    Procedure StatsGuise(wat:String); // Thanks YoHoJo
     Begin
      Status(wat);
      Disguise(wat);
     End;
    
    Function FindLog:Boolean;
    Var
      x, Y: Integer;
    Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x , y, ['wal', 'k', 'acro'], [798802 , 865370], 0) Then
      Begin
        Writeln('Yay, Theres the first obstacle found');
        GetMousePos(x, y);
        Case Random(1) Of
          0: Mouse(x, y, 5, 5, True);
        End;
      End;
    End;
    
    Function Net:Boolean;
    Var
      x, Y: Integer;
    Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x,y, ['Cli', 'mb o', 'ver'], [724498 , 1713454], 0) Then
      Begin
        Writeln('Yay, Theres the Second obstacle found');
        GetMousePos(x, y);
        Case Random(1) Of
          0: Mouse(x, y, 5, 5, True);
          1: Begin
              Mouse(x, y, 3, 3, False);
              wait(100+Random(10));
              ChooseOption('climb');
          End;
        End;
      End;
    End;
    
    Function UpTreeBranch:Boolean;
    Var
      x, Y: Integer;
    Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x,y, ['Cli', 'Tree', 'Bra'], [3827842 ,1190970 ], 5) Then
      Begin
        Writeln('Yay, Theres the Third obstacle found');
        GetMousePos(x, y);
        Case Random(1) Of
          0: Mouse(x, y, 5, 5, True);
          1: Begin
              Mouse(x, y, 3, 3, False);
              wait(100+Random(10));
              ChooseOption('climb');
          End;
        End;
      End;
    End;
    
    Function BalanceRope:Boolean;
    Var
      x, Y: Integer;
    Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x,y, ['Walk', 'On', 'k On'], [ 5931168 ,5272206 ], 5) Then
      Begin
        Writeln('Yay, Theres the Fourth obstacle found');
        GetMousePos(x, y);
        Case Random(1) Of
          0: Mouse(x, y, 5, 5, True);
        End;
      End;
    End;
    
    Function DownTreeBranch:Boolean;
    Var
      x, Y: Integer;
    Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x,y, ['Cli', 'Tree', 'Bra', 'Down'], [1720146 ,1522251  ], 5) Then
      Begin
        Writeln('Yay, Theres the Fifth obstacle found');
        GetMousePos(x, y);
        Case Random(1) Of
          0: Mouse(x, y, 5, 5, True);
          1: Begin
              Mouse(x, y, 3, 3, False);
              wait(100+Random(10));
              ChooseOption('climb');
          End;
        End;
      End;
    End;
    
    Function Netsecond:Boolean;
    Var
      x, Y: Integer;
      Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
        MakeCompass(RandomRange(20,60));
      If FindObjCustom(x,y, ['Cli', 'Tree', 'Bra', 'Down'], [1720146 ,1522251  ], 5) Then
      Begin
        Writeln('Yay, Theres the Fifth obstacle found');
        GetMousePos(x, y);
        Case Random(1) Of
          0: Mouse(x, y, 5, 5, True);
          1: Begin
              Mouse(x, y, 3, 3, False);
              wait(100+Random(10));
              ChooseOption('climb');
              End;
          End;
        End;
       Begin
          End;
      End;
    
    
    begin
    SetupSRL;
    DeclarePlayers;
      Repeat
        FindLog;
        MakeCompass(75 + random(30));
        Net;
        UpTreeBranch;
        BalanceRope;
        DownTreeBranch;
        NetSecond;
      Until(false);
    End.
    The problem I'm having is... if I remove
    Code:
        UpTreeBranch;
        BalanceRope;
        DownTreeBranch;
        NetSecond;
    it works fairly well, I don't really know what I'm doing wrong? It's miss clicking etc a lot

    I know I'm not a good coder. So please cut me some slack

  2. #2
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Is the misclicking happening while your moving? In that case you might want to use some wait times. and how come everything as a function and not a procedure?
    Current Project: Retired

  3. #3
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im making an advanced gnome course runner so i could help you. Maybe we can talk voer skype/msn/aim?

  4. #4
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    always use functions for anything that might fail. you will be sorry if you don't.
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

  5. #5
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by nosaj.421 View Post
    always use functions for anything that might fail. you will be sorry if you don't.
    Oh i see
    Current Project: Retired

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
  •