Page 5 of 6 FirstFirst ... 3456 LastLast
Results 101 to 125 of 145

Thread: Birdtrap

  1. #101
    Join Date
    Mar 2012
    Location
    North Richland Hills, TX
    Posts
    49
    Mentioned
    1 Post(s)
    Quoted
    13 Post(s)

    Default

    Quote Originally Posted by idean View Post
    this is for all you pures out there it drops the meat and the bones to perfection hope you enjoy it worked perfect for me and it should fix up the srl/sps problem as well hope you all enjoy :d
    Simba Code:
    //----------------------------------------------------------------------------//
    // --                             birdtrap
    // --                           by wt-fakawi
    // --                              0.12
    // --
    // --                          hunting script
    //----------------------------------------------------------------------------//
    // --
    // --                !!!! For the srl community only !!!!!
    // --               !!!! Do not distribute this script !!!!!
    // --             !!!! Use for your own private purposes !!!!
    // --
    // --        you are free to copy/paste/modify this script or parts
    // --     of this script as long as you credit me and the srl-community.
    //----------------------------------------------------------------------------//
    // --
    // --  this script traps birds
    // --  use it to level your hunting to 30+
    //----------------------------------------------------------------------------//
    // --                       instructions

    // --  1. Place your player at a  bird hunting  spot.
    // --  2. Have one (1) birdtrap in invspot 1-24 and have reserve traps in spot 25-28.
    // --  3. This script is not designed for multiplayer. Use one player only.
    // --                             enjoy!
    //----------------------------------------------------------------------------//
    program birdhunter;

    {.include srl/srl/misc/smart.simba}
    {.include srl\srl.simba}

    var
        bbones,  birds, traps, missed, fallentraps,  huntinglevel, hplevel: Integer;

    var
       obx, oby, caltime:integer;

    const
         fawkidebug = false;
         birdxp = 95;

    //----------------------------------------------------------------------------//

    procedure declareplayers;
    begin
      numberofplayers(1);
      currentplayer := 0;

      players[0].name :='';
      players[0].pass :='';
      players[0].nick :='';
      players[0].active := true;
    end;

    //----------------------------------------------------------------------------//

    procedure progressreport;
    begin
      cleardebug;
      writeln(' ');
      writeln('<============== - progress report ===============>');
      writeln('worked for    '+ timerunning);
      writeln('hunting level '+ inttostr(huntinglevel));
      writeln('caught        '+ inttostr(birds)+ ' birds');
      writeln('xp gained     '+ inttostr(birds * birdxp));
      writeln('placed        '+ inttostr(traps)+ ' traps');
      writeln('missed        '+ inttostr(missed)+ ' times');
      writeln('picked up     '+ inttostr(fallentraps)+ ' fallen traps');
      writeln('buried        '+ inttostr(bbones)+ ' bones');
    end;

    //----------------------------------------------------------------------------//

    procedure up;

    begin
      keydown(vk_up);
      wait(2500 + random(1000));
      keyup(vk_up);
    end;

    //----------------------------------------------------------------------------//

    procedure ftwait(mylen:integer);
    var mywait: Integer;
    begin
         for mywait := 1 to mylen do
         begin
              wait(100 + random(100));
              findnormalrandoms;
         end
    end;

    //----------------------------------------------------------------------------//

    function havebirdtrap(var wherex, wherey:integer):boolean;
    var
      birdtrap:integer;
    begin
      birdtrap := bitmapfromstring(16, 11, 'mejxjyeca////m5aicgpbu4cpni' +
            'qfepz/mcboaphimabispdud+k3ar96nc3eowcrx/bygsycahr4ajg=');

      if findbitmapmasktolerance(birdtrap, wherex, wherey, mix1, miy1, mix2, miy2 - 42, 10, 10) then
      begin                                           // keep lower row free! For extra reserve traps
          result := true;
          if fawkidebug then writeln('havebirdtrap returned true');
      end;
    //      if fawkidebug then writeln('havebirdtrap returned false');
      freebitmap(birdtrap);
    end;

    //----------------------------------------------------------------------------//

    function placetrap(stepforward:boolean):boolean;
    var
       btx, bty:integer;
    begin
      if havebirdtrap(btx, bty) then
      begin
        if stepforward then mouse(mscx + 30, mscy + 5, 10, 10,true);
        fflag(0);
        ftwait(12);
        mouse(btx, bty, 4, 4, true);
        ftwait(24);
        if pos('lay a trap here',getblackchatmessage) <> 0 then
        begin
          mouse(mscx + 30, mscy - 5, 10, 5,true);
        end;
        inc(traps);
        result := true;
        if fawkidebug then writeln('placetrap:  Placed trap');
      end
      else
        result := false;
    end;

    //----------------------------------------------------------------------------//

    procedure dropandbury;
    var
      i, ix, iy, rawbirdmeat, bonesmask: Integer;
      tb: Tbox;
    begin
      rawbirdmeat := bitmapfromstring(8, 6, 'benpny9skqeayrehhnzj' +
           'fydqmq5jccogdlamd+q5we5tprsbuous6ksw8ri1h61rsozdjchlg' +
           '+mesc997zh82xnsvmygl4tsfee9cog==');
      bonesmask := bitmapfromstring(10, 9, 'mejxjyeah/8eaqxghcyfhiueawqq' +
            'xaokasgx4tuczeq8dwt0aj6nnsw==');

      makecompass('n');
      gametab(tab_inv);
      ftwait(1);
      for i := 1 to 28 do
      begin
        tb := invbox(i);
        if existsitem(i) then
        begin
          if findbitmaptolerancein(rawbirdmeat, ix, iy, tb.x1, tb.y1, tb.x2, tb.y2, 50) then
          begin
           if fawkidebug then writeln('dropping rawbirdmeat');
            mouse(ix - 4, iy - 4 , 8, 8, false);
            chooseoption('rop');
            ftwait(2);
          end;

          if findbitmapmasktolerance(bonesmask, ix, iy, tb.x1, tb.y1, tb.x2, tb.y2, 20, 50) then
          begin
            if fawkidebug then writeln('dropping bones');
            mouse(ix - 4, iy - 4 , 8, 8, false);
            chooseoption('rop');
            ftwait(2);
          end;
        end;
      end;
      freebitmap(rawbirdmeat);
      freebitmap(bonesmask);
      progressreport;
    end;

    //----------------------------------------------------------------------------//

    procedure checklevels;
    begin
         gametab(tab_stats);
         huntinglevel  := getskilllevel('hunting');
         hplevel  := getskilllevel('hitpoints');
         gametab(tab_inv);
    end;

    //----------------------------------------------------------------------------//

    procedure quit(reason:string);
    begin
      writeln('quit: '+ reason + 'quit');
      logout;
      terminatescript;
    end;


    //----------------------------------------------------------------------------//

    procedure setup;
    begin
      setupsrl;
      declareplayers;
      loginplayer;
      checklevels;
    end;

    //----------------------------------------------------------------------------//

    begin
      setup;
      caltime := getsystemtime;

      repeat
          if placetrap(true) then
          begin
          repeat
            ftwait( 1 + random(3));
            if random(50) = 0 then sleepandmovemouse(1000 + random(200));
           repeat
              if findcolortolerance(obx, oby, 4880299, 265, 143, 331, 185, 20)
                or findcolortolerance(obx, oby, 3956845, 265, 143, 331, 185, 20) then
              begin
                mmouse(obx, oby, 0, 0);
                getmousepos(obx,oby);
              end;
            until not isuptext('walk here') or not isuptext('walk here / ');

            if isuptext('dismantle bird snare / 2 more options') then
            begin
              ftwait(2);
              mouse(obx, oby, 0, 0, true);
              ftwait(12);
              inc(missed);
              break;
            end;
            if isuptext('check bird snare / 2 more options') then
            begin
              ftwait(2);
              mouse(obx, oby, 0, 0, true);
              ftwait(12);
              inc(birds);
              if invcount > 10 + random(10) then dropandbury;
              break;
            end;
            if isuptext('take bird snare / 3 more options') then
            begin
              ftwait(2);
              mouse(obx, oby, 0, 0, true);
              ftwait(12);
              inc(fallentraps);
              break;
            end;
            until false;
       end;
      until not loggedin;
      quit('eof');
    end.
    thank you so much! :d

  2. #102
    Join Date
    Apr 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Awesome script for something basic, good job.

  3. #103
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have a problem, it lays traps but it doesnt loot them when bird falls in, it just waits till it collapses and then picks it up? any suggestions on what to do?

  4. #104
    Join Date
    Dec 2011
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Been this way for awhile....

  5. #105
    Join Date
    Apr 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Verry good script my friend !

  6. #106
    Join Date
    Dec 2011
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    abs....is yours working? It won't collect bird trap here to get the xp. it only picks up broken traps

  7. #107
    Join Date
    Feb 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ahhha nice script, loving the simplicty of it

    just what I needed to get my hunter skill going... Thanks!

  8. #108
    Join Date
    Feb 2012
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    [Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
    [Error] (170:27): Type mismatch at line 169
    Compiling failed.


    dafuq...? -.-

  9. #109
    Join Date
    Jan 2012
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    Is this script compatible with SRL 5? I updated my SRL, SPS, and MSI and I am getting this error: Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''
    What should I do?

  10. #110
    Join Date
    Jan 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm using idean's script, and it works great, now my only problem is it wont drop the bones, and meat. It'll attempt to drop it, but once it right clicks, it goes off screen, and to the next item.

  11. #111
    Join Date
    Mar 2008
    Posts
    200
    Mentioned
    1 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by kozak94 View Post
    Is this script compatible with SRL 5? I updated my SRL, SPS, and MSI and I am getting this error: Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''
    What should I do?
    change all the '.scar' to '.simba' should fix that problem.
    SRL has given me many 99s now, and many more to come. I hope to enhance the quality of the community here with feedback, progress reports, and testing scripts (and maybe learn a little along the way)

  12. #112
    Join Date
    Apr 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Error: Exception: Mask is invalid. Width/Height: (16,11). WhiteHi/BlackHi: (-1,175) at line 103
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, 3]

    Error I receive immediately after It logs in.

    Any Help? (I'm running Fixed, On Min, Safe Mode, Brightness Max)

  13. #113
    Join Date
    Feb 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    NVM, found the problem. script up and running for now =D


    <============== - Progress Report ===============>
    Worked for 9 Minutes and 25 Seconds
    Hunting Level 21
    Caught 10 Birds
    XP Gained 950
    Placed 14 Traps
    Missed 4 Times
    Picked Up 0 Fallen Traps
    Buried 0 Bones
    Last edited by shadow131; 04-28-2012 at 09:19 AM.

  14. #114
    Join Date
    Apr 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sticker94 View Post
    Error: Exception: Mask is invalid. Width/Height: (16,11). WhiteHi/BlackHi: (-1,175) at line 103
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, 3]

    Error I receive immediately after It logs in.

    Any Help? (I'm running Fixed, On Min, Safe Mode, Brightness Max)
    I'm getting this aswell.. any help?

  15. #115
    Join Date
    Feb 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Error: Exception: Mask is invalid. Width/Height: (16,11). WhiteHi/BlackHi: (-1,175) at line 103
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, 3]
    [Hint] C:\Simba\Includes\SRL/SRL/core/animation.simba(257:3): Variable 'X' never used at line 256
    [Hint] C:\Simba\Includes\SRL/SRL/core/animation.simba(257:3): Variable 'Y' never used at line 256

  16. #116
    Join Date
    May 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''

    whats that ?

  17. #117
    Join Date
    Apr 2012
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    completely broken.

  18. #118
    Join Date
    May 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could there possibly be an update for this script?

    /edit: Or atleast an update to bury the bones while catching birds :P
    Last edited by Leprikox; 05-15-2012 at 11:52 PM.

  19. #119
    Join Date
    May 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Error: Exception: Mask is invalid. Width/Height: (16,11). WhiteHi/BlackHi: (-1,175) at line 103
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, 3]

  20. #120
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I keep getting this error:

    [Error] (170:27): Type mismatch at line 169

    which is: MouseItem(i, True);

  21. #121
    Join Date
    May 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by xXBlakHawkXx View Post
    I keep getting this error:

    [Error] (170:27): Type mismatch at line 169

    which is: MouseItem(i, True);
    I got the script to run to that point aswell. Can anybody atleast point me to the right direction so i could try and figure this out myself? (: thanks

  22. #122
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    I can. There has probably been a little syntax change in MouseItem. Check the SRL documentation, or the include itself!
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  23. #123
    Join Date
    Feb 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Says this: [Error] (170:26): Type mismatch at line 169

    MouseItem(i, True);

  24. #124
    Join Date
    Feb 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This doesnt support SMART..?

  25. #125
    Join Date
    May 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    I can. There has probably been a little syntax change in MouseItem. Check the SRL documentation, or the include itself!
    Thanks Fakawi, ill look into it (:

Page 5 of 6 FirstFirst ... 3456 LastLast

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
  •