Results 1 to 3 of 3

Thread: What Am I Doing Wrong??? Please Help!!!

  1. #1
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Exclamation What Am I Doing Wrong??? Please Help!!!

    BEFORE I am labelled a leacher... I am trying to learn scripting so I used a script as a base. I am NOT applying to SRL members with this
    For credit the base is: Draynor Powercutter by Blake1012
    I don't know whats wrong with the script.. I mapped the SPS path but it wont move, It does chop and I added some failsafes, but it WONT walk.
    I think it may be the runescape_surface.PNG file corruption, but I have no idea how to fix this
    Any and all help is appreciated.


    Simba Code:
    program JOEbotsFaladorTreeTANK;
    {$DEFINE SMART}
    {$i SRL/srl.simba}
    {$i sps/sps.simba}

    // To all users, this is my first script. Not perfect but I will update it.

    const
      TREE_TO_CUT = 'NORMAL_TREE' // This is the type of tree you will chop.


          ;Var
            Logs_Chopped: Integer;
            EXP_Gained: Integer;

    Procedure DeclarePlayers; // Login information. You want to play, dont you?
          begin
            HowManyPlayers := 1;
            NumberOfPlayers(HowManyPlayers);
            CurrentPlayer := 0;
            Players[0].Name := '';   // Enter your username in the blue things
            Players[0].Pass := '';    // Enter your password in the blue things
            Players[0].Nick := '';          // Enter 3-4 letters of your username
            Players[0].Pin := 'Player_Bank_PIN'; //Enter your bank PIN here
            Players[0].Active := True;
            Players[0].BoxRewards := ['Xp', 'ostume', 'aphire'];

    end;

    Procedure AntiBan; // So Jagex doesn't catch you mischevious botters
            begin
             if(not(LoggedIn)) then Exit;
              Case Random(250) of

            0:
            begin
              WriteLn('AntiBan- Right Click');
              RandomRClick;
            end;

            10:
            begin
              WriteLn('AntiBan- Levels');
              HoverSkill('Woodcutting', false);
              wait(1634+Random(2169));
            end;

            30:
            begin
              WriteLn('AntiBan- Pick Up Mouse');
              PickUpMouse;
            end;

            40:
            begin
              WriteLn('AntiBan- Twisty Turny');
              MakeCompass('N');
              wait(100+random(433));
              MakeCompass('S');
              wait(50+random(124));
              MakeCompass('N');
              FindNormalRandoms;
            end;

            50:
            begin
              WriteLn('AntiBan- Examination');
              ExamineInv;
            end;

            end;
          end;

          procedure AntiRandoms; // Senses and completes random events. Failure isn't my fault.
           begin
            FindNormalRandoms;
            LampSkill := 'woodcutting';
            LevelUp;
          end;

          Procedure WalkToTrees; // Gets you to the trees from the bank
           Var
            myPath:TPointArray;
            t: integer;
          begin
            SPS_Setup(RUNESCAPE_SURFACE, [ '9_7' ]);
            myPath:= [Point(265, 410), Point(266, 397), Point(250, 396), Point(223, 403)];
            SPS_WalkPath(myPath) ;
            repeat
              WalkToTrees
            until (treeChop)
          end;

          Procedure WalkToBank; // Gets you to the bank from the trees
           var
            myPath:TPointArray;
            t: integer;
            begin
              SetupSRL;
              SPS_Setup(RUNESCAPE_SURFACE, [ '9_7' ]);
              myPath := [Point(225, 405), Point(239, 401), Point(254, 396), Point(267, 395), Point(267, 416)];
              SPS_WalkPath(myPath);

              t := (getSystemTime + 10000);
            repeat
              WalkToBank
            until (bankLogs)
          end;

          Procedure bankLogs;
          var
            t: integer;
          begin
           if (InvFull) then
            begin
              WriteLn('And... Were off to bank some logs');

            t := (getSystemTime + 10000);
          repeat
            OpenBankFast('fwb');
            WriteLn('Dump Dump Dump');
          until(bankScreen or pinScreen or (getSystemTime > t));

          if(PinScreen) then
           begin
            WriteLn('Dont look or youll steal my gold!: ' + Players[0].Pin + '.');
            InPin(Players[0].Pin);
        end;

          if (BankScreen) then
            DepositAll;

            Logs_Chopped := Logs_Chopped + 28;
            EXP_Gained  := EXP_Gained + 1890;
            WriteLn('Weve chopped' + TREE_TO_CUT + ' logs.');
            WriteLn('Closing up');
            WriteLn('Altogether youve chopped about: ' + IntToStr(Logs_Chopped));
            WriteLn('Youve gained XP in this session: ' + IntToStr(EXP_Gained));

            CloseBank;
            WriteLn('Beep Boop Bop Beep, Loading Walking Path 99% Complete');
            Wait(2000 + Random(1500));
            WriteLn('Beep Boop Bop Beep, Walking Path Found, Executing');
            Wait(1000 + Random(300));
            WriteLn('Were Off, Were Off, Were Off To Some Trees!');
        end;
      end;

          Procedure checkFullInv; // Checks to see if youve completed an inventory
            begin
              if(InvFull) then
                begin
                  WriteLn('Logs *GASP* SO HEAVY!');
                  WalkToBank;
                  Wait(1000 + Random(1500));
                  WriteLn('Finally Found That FREAKING BOOTH');
                  bankLogs;
                  WalkToTrees;
                end;
              end;

         Procedure treeChop; // Cuts down the trees and gets you XP
          var x, y: integer;
            begin
              if not LoggedIn then Exit;

         if(InvFull) then exit;
          repeat
            if FindObj(x, y, 'hop', 3491141, 10) then
              Mouse(x, y, 1, 1, false);
              ChooseOption('hop');

         repeat
            wait(3000+random(450));
            AntiBan;
            AntiRandoms;
            checkFullInv;
         Until not(IsUpText('ree')or(InvFull))
          until(InvFull);
        end;

         begin
            Smart_SuperDetail := False;
            ClearDebug;

            SetUpSRL;
            ActivateClient;
            DeclarePlayers;
            LoginPlayer;

            Logs_Chopped := 0;
            EXP_Gained := 0;

            ClearDebug;

          repeat
            WalkToTrees;
            treeChop;
            WalkToBank;
            bankLogs;
          until (Logs_Chopped >= 10000);

    end.

    end.

    Thanks

    ~Joe

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Lots of StackOverflows or functions calling themselves.. AND SPS_Setup should be called after SetuSRL;
    Code:
          Procedure WalkToTrees; // Gets you to the trees from the bank
           Var
            myPath:TPointArray;
            t: integer;
          begin
            SPS_Setup(RUNESCAPE_SURFACE, [ '9_7' ]);                             //Call this after you call setupsrl..
            myPath:= [Point(265, 410), Point(266, 397), Point(250, 396), Point(223, 403)];
            SPS_WalkPath(myPath) ;
            repeat
              WalkToTrees                        //Stack overflow.. a function calling itself -___- There are other ways to repeat..
            until (treeChop)
          end;
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I was doing :

    Simba Code:
    repeat
      WalkToTrees                    
    until (treeChop)

    as a failsafe
    I am so fresh to scripting...

    I realize that I missed adding SetupSRL in walktotrees... its in walktobank though? Fresh, thats it.
    Last edited by Joe; 03-10-2012 at 09:44 PM.

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
  •