SRL Archive - RS3 Outdated / Broken Scripts

Heretics Bow Fletcher


theheretic

2011-04-26 13:40:21

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

Flight

2011-04-26 20:06:38

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. :)

theheretic

2011-04-26 21:39:31

From: Flight
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

Awkwardsaw

2011-04-26 21:47:34

looks nice for a first release, :) i haven't tested, but you can shorten up some 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

   
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


integer := integer + 1;

to
inc(integer); //increases the variable by one

or
incex(integer, 28); //increases variable by 28

Sex

2011-04-27 02:47:04

Although int := int + 1/int := int + 28 is faster :p.

theheretic

2011-04-27 21:27:57

From: Awkwardsaw
looks nice for a first release, :) i haven't tested, but you can shorten up some 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

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

just little things like that, :)





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?

Smartzkid

2011-04-27 21:33:14

You're supposed to leave the first semicolon out ;)

Awkwardsaw

2011-04-27 21:41:32

From: Sex
Although int := int + 1/int := int + 28 is faster :p.


not by anything noticeable, and it still looks much nicer

i luffs yeww

2011-04-27 22:18:17

From: Awkwardsaw
not by anything noticeable, and it still looks much nicer



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.


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.

Awkwardsaw

2011-04-27 22:34:40

From: i luffs yeww

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.


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 :)

Smartzkid

2011-04-27 22:36:33

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.

theheretic

2011-04-27 23:51:58

From: Smartzkid
You're supposed to leave the first semicolon out ;)


Ill just keep my palm held to my face

i luffs yeww

2011-04-28 00:21:13

From: Smartzkid
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.