Results 1 to 13 of 13

Thread: Heretics Bow Fletcher

  1. #1
    Join Date
    Apr 2011
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Heretics Bow Fletcher

    My first pubicly released script, any feed back is appreciated
    features:
    Antiban
    Carves willow all the way to magic (tested)
    Reflection used for pretty much everything
    Fast

    -----Report-----
    Status: /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
    Status: | SRL Randoms Report |
    Status: | www.villavu.com |
    Status: |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
    Status: \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

    Total run time 12 Minutes and 51 Seconds
    Made 324 bows; Yeilding 24300 exp
    Averaging 1512 bows an hour
    And 113400 exp an hour

    I want to do a longer run, but I am out of cash and used up 3000 yew logs getting it to this point lol
    Last edited by theheretic; 04-27-2011 at 02:19 AM.
    Working on a Watchmen pickpocket-er, hope to get 80kxp / hour.

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    113k per/hour, that must be fast. You might include if it uses reflection or color, maybe add in a breaking system and multi player system (if you don't already have these two).

    Nice job.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Apr 2011
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    113k per/hour, that must be fast. You might include if it uses reflection or color, maybe add in a breaking system and multi player system (if you don't already have these two).

    Nice job.
    It uses reflection, I do include a short break system, only ~1min, but I completly forgot about a world switcher / extended break taker.

    Thanks for the advice and yes it really burns through logs, I am working on its counter part, a bow stringer now as well. Gotta do something with all these unstrung yew long bows XD
    Working on a Watchmen pickpocket-er, hope to get 80kxp / hour.

  4. #4
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    looks nice for a first release, i haven't tested, but you can shorten up some code

    Simba Code:
    if(longbow = true)then
        begin
          Mouse(248,435,20,20,true);
        end;
        if(longbow = false)then
        begin
            Mouse(156,426,23,23,true);
        end;

    can be

    Simba Code:
    if longbow then
      Mouse(248,435,20,20,true)
    else
      Mouse(156,426,23,23,true);

    just little things like that,

    you can also change things like

    Simba Code:
    integer := integer + 1;
     
      to
      inc(integer); //increases the variable by one
     
      or
      incex(integer, 28); //increases variable by 28
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  5. #5
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Although int := int + 1/int := int + 28 is faster .
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  6. #6
    Join Date
    Apr 2011
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    looks nice for a first release, i haven't tested, but you can shorten up some code

    Simba Code:
    if(longbow = true)then
        begin
          Mouse(248,435,20,20,true);
        end;
        if(longbow = false)then
        begin
            Mouse(156,426,23,23,true);
        end;

    can be

    Simba Code:
    if longbow then
      Mouse(248,435,20,20,true)
    else
      Mouse(156,426,23,23,true);

    just little things like that,


    [/simba]

    Trying to figure out else statements... they are very frustarting in pascal / simba, tried your example, tried fixing missing semicolon, fails to compile every time. Is that psuedocode?
    Working on a Watchmen pickpocket-er, hope to get 80kxp / hour.

  7. #7
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    You're supposed to leave the first semicolon out
    Interested in C# and Electrical Engineering? This might interest you.

  8. #8
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by Sex View Post
    Although int := int + 1/int := int + 28 is faster .
    not by anything noticeable, and it still looks much nicer
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  9. #9
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    not by anything noticeable, and it still looks much nicer
    Code:
    Compiled succesfully in 48 ms.
     tehVar := tehVar + 1; | 0.157553
              Inc(tehVar); | 0.176478
    tehVar := tehVar + 10; | 0.159216
        IncEx(tehVar, 10); | 0.315693
    Successfully executed.
    pascal Code:
    var
      a, i, x, tehVar, stupidArrVar: Integer;
      T: TIntegerArray;
      tempVar: Extended;
      avgTime: array of array of Integer;
      finAvgTime: array of Extended;

    const
      NPLUSONE    = 0;
      INCN        = 1;
      NPLUSTEN    = 2;
      INCEXNBYTEN = 3;

    begin
      SetArrayLength(T, 4);
      SetArrayLength(avgTime, 4);
      for stupidArrVar := 0 to 3 do
        SetArrayLength(avgTime[stupidArrVar], 100);
      SetArrayLength(finAvgTime, 4);

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[NPLUSONE] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          tehVar := tehVar + 1;
        avgTime[NPLUSONE][x] := (GetSystemTime - T[NPLUSONE]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[NPLUSONE][a];
      finAvgTime[NPLUSONE] := tempVar / 100.0 / 10000.0;

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[INCN] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          Inc(tehVar);
        avgTime[INCN][x] := (GetSystemTime - T[INCN]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[INCN][a];
      finAvgTime[INCN] := tempVar / 100.0 / 10000.0;

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[NPLUSTEN] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          tehVar := tehVar + 10;
        avgTime[NPLUSTEN][x] := (GetSystemTime - T[NPLUSTEN]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[NPLUSTEN][a];
      finAvgTime[NPLUSTEN] := tempVar / 100.0 / 10000.0;

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[INCEXNBYTEN] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          IncEx(tehVar, 10);
        avgTime[INCEXNBYTEN][x] := (GetSystemTime - T[INCEXNBYTEN]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[INCEXNBYTEN][a];
      finAvgTime[INCEXNBYTEN] := tempVar / 100.0 / 10000.0;

      Writeln(Padr(' tehVar := tehVar + 1; |', 25) + ToStr(finAvgTime[NPLUSONE]));
      Writeln(Padr('          Inc(tehVar); |', 25) + ToStr(finAvgTime[INCN]));
      Writeln(Padr('tehVar := tehVar + 10; |', 25) + ToStr(finAvgTime[NPLUSTEN]));
      Writeln(Padr('    IncEx(tehVar, 10); |', 25) + ToStr(finAvgTime[INCEXNBYTEN]));
    end.

    I also did it with 400,000,000 calculations and the results were similar, which is weird because I had done this before and Inc() was faster than i := i + 1, but I dunno.

  10. #10
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Code:
    Compiled succesfully in 48 ms.
     tehVar := tehVar + 1; | 0.157553
              Inc(tehVar); | 0.176478
    tehVar := tehVar + 10; | 0.159216
        IncEx(tehVar, 10); | 0.315693
    Successfully executed.
    pascal Code:
    var
      a, i, x, tehVar, stupidArrVar: Integer;
      T: TIntegerArray;
      tempVar: Extended;
      avgTime: array of array of Integer;
      finAvgTime: array of Extended;

    const
      NPLUSONE    = 0;
      INCN        = 1;
      NPLUSTEN    = 2;
      INCEXNBYTEN = 3;

    begin
      SetArrayLength(T, 4);
      SetArrayLength(avgTime, 4);
      for stupidArrVar := 0 to 3 do
        SetArrayLength(avgTime[stupidArrVar], 100);
      SetArrayLength(finAvgTime, 4);

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[NPLUSONE] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          tehVar := tehVar + 1;
        avgTime[NPLUSONE][x] := (GetSystemTime - T[NPLUSONE]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[NPLUSONE][a];
      finAvgTime[NPLUSONE] := tempVar / 100.0 / 10000.0;

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[INCN] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          Inc(tehVar);
        avgTime[INCN][x] := (GetSystemTime - T[INCN]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[INCN][a];
      finAvgTime[INCN] := tempVar / 100.0 / 10000.0;

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[NPLUSTEN] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          tehVar := tehVar + 10;
        avgTime[NPLUSTEN][x] := (GetSystemTime - T[NPLUSTEN]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[NPLUSTEN][a];
      finAvgTime[NPLUSTEN] := tempVar / 100.0 / 10000.0;

      x := 0;
      i := 0;
      tehVar := 0;
      tempVar := 0;

      T[INCEXNBYTEN] := GetSystemTime;
      for x := 0 to 99 do
      begin
        for i := 0 to 9999 do
          IncEx(tehVar, 10);
        avgTime[INCEXNBYTEN][x] := (GetSystemTime - T[INCEXNBYTEN]);
      end;

      for a := 0 to 99 do
        tempVar := tempVar + avgTime[INCEXNBYTEN][a];
      finAvgTime[INCEXNBYTEN] := tempVar / 100.0 / 10000.0;

      Writeln(Padr(' tehVar := tehVar + 1; |', 25) + ToStr(finAvgTime[NPLUSONE]));
      Writeln(Padr('          Inc(tehVar); |', 25) + ToStr(finAvgTime[INCN]));
      Writeln(Padr('tehVar := tehVar + 10; |', 25) + ToStr(finAvgTime[NPLUSTEN]));
      Writeln(Padr('    IncEx(tehVar, 10); |', 25) + ToStr(finAvgTime[INCEXNBYTEN]));
    end.

    I also did it with 400,000,000 calculations and the results were similar, which is weird because I had done this before and Inc() was faster than i := i + 1, but I dunno.
    i remember inc() being faster too, but wasn't that with scar? maybe something is different in simba
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  11. #11
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    In SCAR, Freddy used inline assembly or something crazy like that to speed it up. In Simba, inc just adds the overhead of a function call.
    Interested in C# and Electrical Engineering? This might interest you.

  12. #12
    Join Date
    Apr 2011
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    You're supposed to leave the first semicolon out
    Ill just keep my palm held to my face
    Working on a Watchmen pickpocket-er, hope to get 80kxp / hour.

  13. #13
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    In SCAR, Freddy used inline assembly or something crazy like that to speed it up. In Simba, inc just adds the overhead of a function call.
    The more you know.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •