Results 1 to 23 of 23

Thread: Runtime Error

  1. #1
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Runtime Error

    Works beautifully but a saddening runtime error shows up...

    [Runtime Error] : Out Of Range in line 184 in script C:\Program Files\SCAR 3.21\Scripts\lrk4.00.scar

    Script=
    SCAR Code:
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    ///////////////////////////////////////////////////////////////////
    //                            JUNK's LRK
    //bitmap eating procedure           infight to keep fighting if not done
    //antirandoms                       Stat Progress
    //failsafes                         Boner picker and burrier
    //////////////////////////////V4.00////////////////////////////////


    program LRK;
    {.include srl/srl.scar}
    {.include srl/srl/skill/fighting.scar}


    var
    x,y :integer;

    const
      eat= true;
      howmanykills= 30; //for each player
      skiller= 'attack';//shared,attack,strength,defence? Scimitars only.
      Player1act= true; //player 1 active?
      UserN= 'farflafa'; //Username
      PassW= 'cookieca'; //Password
      NickN= 'arfl';  //3-4 letters of your name, no capitals or first letter
    /////////////////////////////////////////////////////////////////////////////
    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name    := UserN;
      Players[0].Pass    := PassW;
      Players[0].Nick    := NickN;
      Players[0].Active  := Player1act;
    end;
    ////////////////////////////////////////////////////////////dont touch the rest
    //////////////////////////////////////////////////////////////////////////////
    procedure LoadDTM;
    var bone :integer;
    begin
     bone := DTMFromString('78DA637CC6C4C0708A910106803C86FAB2520' +
           '611200D1365FC88AA062A8A4402E94740358708A8B94384394F80' +
           '6A2EE1570300705B0A09');
    end;
    //////////////////////////////////////////////////////////////////////////////
    function FindBone : Boolean;
    var Bone :integer;
    begin
      Result:= FindDTM(bone, X, Y, MIX1, MIY1, MIX2, MIY2);
    end;
    //////////////////////////////////////////////////////////////////////////////
    Procedure Boner; //LOLZER
    var bonesb,bone :integer;
    begin
      if(findbone)then
      begin
      Freedtm(bone);
        repeat
          mouse(x,y,3,3,true);
          bonesb:=bonesb+1;
          Writeln('Burried');
          wait(2000+random(500));
        until not findbone;
      end else
      begin
        Writeln('Done with bones');
        Writeln('Did not find the bone Dtm in your inventory.');
      end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure EatFood;
    var foodbmp :integer;
    begin
      foodbmp := BitmapFromString(13, 12, 'beNpzMpoV7zEpyqU/0rnWV' +
         '2BAENBqZERdZbhUEmkaJagn3KkxwGZqjCseK7pCHer8rEs9zBal+A' +
         'AjAqvi9mB7oDkQZSsz/Zek+cIVQyIOiIDmAJW1BNlV+1hmAwB9+ZV' +
         'I');
      if(hppercent<20)then
      begin
        if eat then
        begin
          Writeln('said yes to eat.');
          GameTab(tab_Inv);
          wait(100+random(20));
          if (FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20)) then
          begin
            Mouse(x, y, 2, 2, true);
            writeln('Ate food successfully!');
            wait(1500+random(200));
          end else
          if not(FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
          begin
            writeln('Could not find food running and waiting to restore hp');
            runaway('n',false,1,60000)
          end;
        end else
        begin
          Writeln('Said no to eat');
          exit;
        end;
      end;
     end;
    //////////////////////////////////////////////////////////////////////////////
    procedure invcheck;
    begin
      if(invfull)then
       begin
        boner;
       writeln('Inventory full burying bones...');
      end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure Bonepick;
    var pick :integer;
    begin
      x:=Mscx;
      y:=Mscy;
       findcolorspiral(x,y,12961212, msx1, msy1, msx2, msy2)
        begin
         Writeln('Finding Bones')
          mmouse(x,y, 3, 3);
          Wait(500);
          if isuptext('ake') then
          begin
          Writeln('Found bones')
           mouse(x,y, 0, 0, false);
          chooseoption('ones');
          Writeln('Took Bones')
          pick:=pick+1
          end else
          writeln('Bones not found or didnt try, stopping');
        end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    Procedure Anti;
    begin
      case random(60) of

        0:Sleepandmovemouse(5000+random(1000));

        1:Boredhuman;

        2:begin
            Case random(4) of
           0: HoverSkill('strength', false);
             
           1: HoverSkill('attack', false);
             
           2: HoverSkill('defence', false);
             
           3: HoverSkill('prayer', false);
             
          end;
          end;

        3:Pickupmouse;

        4:Begin
            Makecompass('w')
            wait(1000+random(500))
            makecompass('e')
            wait(1000+random(500))
            Makecompass('w')
          end;
           
         5:randomrclick;
           
       end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    function findmouse : boolean;
    var tpa : tpointarray; I : integer;
    var kill :integer;
    begin
      x := mscx;
      y := mscy;
      findcolorsspiraltolerance(x, y, TPA, 12566197, msx1, msy1, msx2, msy2, 10);
      mmouse(tpa[0].x, tpa[0].y, 3, 3); // line 184
      Wait(500);
      if isuptext('ttack') then
      begin
            result := true;
            mouse(tpa[i].x, tpa[i].y, 3, 3, false);
            chooseoption('ttack');
            Writeln('Mouse is found');
            wait(5000+random(1000))
            if(infight)then
            begin
            While infight do Anti;
            If not infight then
            begin
            Kill:=Kill+1
            writeln('Picking bone...');
            bonepick;
          end else
            if(not(findcolorstolerance(TPA, 12961212, msx1, msy1, msx2, msy2, 20))) then
            begin
              Result := False;
              Writeln('Mouse is not found, logging out.');
              logout;
              terminatescript;
          end;
        end;
      end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure proggy;
    var kill,pick,bonesb :integer;
    begin
      writeln('---------------------=Proggy=---------------------');
      writeln('|------------------------------------------------|');
      writeln('|Killed aprroximitely ' + inttostr(kill)+'       |');
      writeln('|ran for '+ (timerunning)+ '                     |');
      writeln('|Picked up '+ inttostr(pick) + ' bones           |');
      writeln('|burried '+ inttostr(bonesb) + ' bones           |');
      writeln('|Junkjs Lumbridge Rat Killer                     |');
      writeln('|end of the script                               |');
      writeln('|Make sure you post a proggy or suggestion       |');
      writeln('==================================================');
      Writeln('|==Skills are below. Att, Str, Def, and prayer.==|');
      Writeln('==================================================');
      getxp('attack');
      getxp('strength');
      getxp('defence');
      getxp('prayer');
    end;
    //////////////////////////////////////////////////////////////////////////////
    procedure death;
    begin
      if(finddead)then
      begin
        logout;
        proggy;
        Writeln('You died.Terminating.')
        terminatescript;
      end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    Procedure setskiller;
    begin
      case Lowercase(skiller) of
        'attack': SetFightMode(1);
        'strength': SetFightMode(2);
        'shared': SetFightMode(3);
        'defence': SetFightMode(4);
      end;
    end;
    //////////////////////////////////////////////////////////////////////////////
    var kill,foodbmp :integer;
    begin
      setupsrl;
      DeclarePlayers;
      cleardebug;
      activateclient;
      if(not(loggedin))then
      Loginplayer;
      setrun(true)
      makecompass('w');
      Setangle(true);
      Setskiller;
      Retaliate(true);
      repeat
        Findnormalrandoms;
        makecompass('w');
        findmouse;
        EatFood;
        FreeBitmap(foodbmp);
        finddead;
      until(kill >=howmanykills)
      if(kill >=howmanykills)then
      begin
        logout;
        proggy;
        terminatescript;
      end;
    end.
    //////////////////////////////////////////////////////////////////////////////
    //CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS-CREDITS   /|
    // JAD       Feroc1ty       Boreas           I don't know if they helped me /|
    // Marpis    Baked          Ian              but i did know that they had   /|
    // Esteban   Tarajunky      Evilkitten       the time to post in my threads /|
    // MasterBB  Awkwardsaw     cohen            and help.  Thanks guys         /|
    //////////////////////////////////////////////////////////////////////////////
    //Jad-mentor
    //marpis-  bitmaps
    //esteban- tutorial
    //MasterBB- login help
    //feroc1ty- random time with infight;
    //Baked- Standards and others
    //Tarajunky- Tpa idea
    //Awkwardsaw- Tutorial And procedure
    //Boreas- Find width and height with findobj tpa
    //Ian- True False infight;
    //EvilKitten- Chooseoption
    //cohen-Feedback
    //Junkj- Making this all happen
    //////////////////////////////////////////////////////////////////////////////
    //!Not responsible for banned acounts!!!Not responsible for banned acounts! //
    //////////////////////////////////////////////////////////////////////////////

    I applaud myself for not posting in this thread for a while. Line 184 is in my findmouse function. Kills 2 mouses then stops. I will be happy to add more info if needed.

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    do a length check before, obviously it happens when the TPA is empty. add

    if Length(TPA) <= 0 then Exit before the mouse part
    “Ignorance, the root and the stem of every evil.”

  3. #3
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    do a length check before, obviously it happens when the TPA is empty. add

    if Length(TPA) <= 0 then Exit before the mouse part
    I'm sorry i didn't know everyone was aware of that.

  4. #4
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Junkj View Post
    I'm sorry i didn't know everyone was aware of that.
    sorry i didnt mean to sound rude, i apologize if you took it that way. I just meant that when working with TPA's you should always try to use a Length check otherwise you will encounter runtime errors. Sorry again.
    “Ignorance, the root and the stem of every evil.”

  5. #5
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its cool, i accept. And it works better now thanks.

    Edit: It killed a few more rats but then it says out of range in line 185, the line after i put length check.
    Last edited by Mr. Doctor; 09-01-2009 at 01:10 PM.

  6. #6
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Junkj View Post
    Its cool, i accept. And it works better now thanks.

    Edit: It killed a few more rats but then it says out of range in line 185, the line after i put length check.
    Replace that with
    SCAR Code:
    If Length(TPA) < 1 Then Exit Else
    mmouse(tpa[0].x, tpa[0].y, 3, 3);

  7. #7
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Or use
    Code:
    try
    "work with tpa";
    except
    WriteLn('Runtime Error - Tpa empty?');
    end;

  8. #8
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would have loved to test your opinions but the thing is my account has been scammed because i left it in there, anyone who has it i would like it back thank you very much and rep-- for whoever gives it to me.
    Last edited by Mr. Doctor; 09-02-2009 at 12:04 AM.

  9. #9
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Recover the account, then take a screenshot of the IP which last logged in, then post it here. The Admins/Mods will then find out who it was.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  10. #10
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Junkj View Post
    I would have loved to test your opinions but the thing is my account has been scammed because i left it in there, anyone who has it i would like it back thank you very much and rep++ to who ever gives it to me.
    Lol, don't do that. lol. Firstly the person won't give it to you, as you'll know who it is. Secondly, the guy who stole it deserves to be punished. Do as r1ch says..

  11. #11
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, wheres this ip thing? as soon as you log in the top where it says your ip, And where it also says play the game or something?

  12. #12
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Junkj View Post
    Alright, wheres this ip thing? as soon as you log in the top where it says your ip, And where it also says play the game or something?
    Yup, get a screen shot of it as soon as the welcome screen appears .

  13. #13
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha i hope this motherfucker rots, caught him at the end of selling all my stuff. Nothing in my bank. He cant take my skills away know?



    Edit: And whats odd, the person left me with a willow long, air tiara and some other things, what a mofo. Hehehe hohoho hahaha.... I have the full screen if you need it too.

    Edit = full pic

    Last edited by Mr. Doctor; 09-02-2009 at 02:30 AM.

  14. #14
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Glad you got the IP.

    Edit your post and add the Full picture.

    Just wait for admin to track now and they will get banned.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  15. #15
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There, i hope they catch him.

  16. #16
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    58.106.158.200 : d58-106-158-200.bla4.nsw.optusnet.com.au
    Post IP Addresses
    No Matches Found
    Registration IP Addresses
    No Matches Found

    I'm sorry

  17. #17
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its cool, he probably changed it.

  18. #18
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You have much on there dude?

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  19. #19
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Like 30k cash, iron armor mithril axe and pickaxe and a afro. And some other stuff.

  20. #20
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah i see. You good to get that back?

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  21. #21
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    D: Sorry to hear that.. if you can figure out a way to transfer money, I'll pay you back + more.. :/ I know it sucks to get hacked.

    By the way, good luck with the script!

  22. #22
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, i think the hacker proxied. Good lucky with the script, if you need any help, try checking out my tutorials .

  23. #23
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Naw i didn't get it back sadly and im working on getting it all. No one has to help me im fine. Ended up with 3 items but ill get it back, i have my ways.

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
  •