SRL Archive - RS3 Outdated / Broken Scripts

SuperFlaxer [SRL 4]


n3ss3s

2008-04-23 09:10:01

The end result of me needing lobster cash for Bounty Hunter.


The average roundtime hangs in the 150 seconds, and gets better depending of your agility level ofcourse.

If one load is 150 seconds, and you gain 28 * 85 = 2380gp per load, so gp per one second is ~15,9, so you gain 15,9 * 3600 = 57k per hour =]


Place your player in the Seers Village bank and hit run.

The SMART loads world 121 default which's prefix is swe5, you can change it if you want to…


I think that's it, remember to post proggies and feedback! :)


Oh, I almost forgot, you get a beekeeper random very rarely using this script, atleast by my experience, but if you happen to get one, it's a good sign to take a little break from flaxpicking.

EvilChicken!

2008-04-23 09:14:25

Aww, I was gonna make one.

you're more l33t = you win = i loose = i give up..

Shit, this script looks really good. Good job, SRL needed a flax spinner.

Edit: why do you use Div? "/" is so much easier..?

n3ss3s

2008-04-23 09:15:56

Ehm, it's a picker :p


Thanks :)


Though you shouldn't give up, what about you make the spinner then? ;)

kor

2008-04-23 09:19:14

Bo Yah! i was looking for a good working flax picker! ill try it now, since my char is already in seers bank. ill post again soon telling how it worked out for me.

EDIT: i keep getting this error when starting the script:

Line 880: [Error] (13619:39): Unknown identifier 'LoadPerLog' in script D:\Scar3.15\Scripts\Flax\SuperFlaxer.scar

n3ss3s

2008-04-23 09:20:42

Download again, I accidentally managed to somehow copy an 'S' out of the mainloop =p

EvilChicken!

2008-04-23 09:22:17

Picker?

*hides in corner*
Well, a picker was even more needed.
I'm working on a spinner for lumby. Though I need to finish G.A.R. first.

Since I'm not a leecher (atleast I'm not trying to give that impression) I have to make this post useful. Well, theres a really cool but very small thing you can add that'll l33ten up j00r script. I hate the word 'script'. So, here it goes:

{*******************************************************************************
procedure SaveToTxt;
By: EvilChicken! with inspiration from Hy's Fight Cave Runner.
Description: Saves the text in the debug box to a '.txt' file.
*******************************************************************************}
procedure SaveToTxt;
var
JX2: Integer;

begin
JX2 := ReWriteFile(ScriptPath + 'SuperFlaxer Progress Report.txt', True);
if JX2 <= 0 then Exit;
WriteFileString(JX2, GetDebugText);
CloseFile(JX2);
end;

Easy to add, and you won't get leechers saying they 'accidentaly' closed SCAR. Eh? Whaddyathink?

n3ss3s

2008-04-23 09:28:11



Function SaveToText(Shared: Boolean): Boolean;
Begin
Result := WriteFileString(ReWriteFile(ScriptPath + 'SuperFlaxer Proggie.txt', True), GetDebugText);
End;

ReWriteFile returns -1 if it fails, so you can use it like that. I know how to save into a file :p

EvilChicken!

2008-04-23 09:33:18

Short. Ø_ø

What about closefile? j00 w4nt m3m0ry l33kz?
ANd why didn't you use it?

ShowerThoughts

2008-04-23 09:39:56

From: EvilChicken!
Short. Ø_ø

What about closefile? j00 w4nt m3m0ry l33kz?
ANd why didn't you use it?


Hmm evil i made some interesting stuff for you, the only problem is, my comp is dead i will fix him soon -.-


N3ss3s you are tah master :D

edit:
Procedure LocAndLoad(S: String);
Begin
Players[CurrentPlayer].Loc := S;
Logout;
End;

why LocAndLOAD

mastaraymond

2008-04-23 09:42:50

From: n3ss3s
The end result of me needing lobster cash for Bounty Hunter.


The average roundtime hangs in the 150 seconds, and gets better depending of your agility level ofcourse.

If one load is 150 seconds, and you gain 28 * 85 = 2380gp per load, so gp per one second is ~15,9, so you gain 15,9 * 3600 = 57k per hour =]


Place your player in the Seers Village bank and hit run.

The SMART loads world 121 default which's prefix is swe5, you can change it if you want to…


I think that's it, remember to post proggies and feedback! :)


Oh, I almost forgot, you get a beekeeper random very rarely using this script, atleast by my experience, but if you happen to get one, it's a good sign to take a little break from flaxpicking.

Ever considered loading you ddtms the leet way?

Like this?


Function MakeDDTM(TheDDTM: TIntegerArray): integer;
var
TempLength,i:integer;
DDTM:TDTM;
begin;
TempLength:= (Length(TheDDTM) div 6)
DDTM.MainPoint.x:= TheDDTM[0];
DDTM.MainPoint.y:= TheDDTM[1];
DDTM.MainPoint.AreaSize:= TheDDTM[2];
DDTM.MainPoint.AreaShape:= TheDDTM[3];
DDTM.MainPoint.Color:= TheDDTM[4];
DDTM.MainPoint.Tolerance:= TheDDTM[5];
SetArrayLength(DDTM.SubPoints, 0);
for i := 0 to TempLength -2 do
begin
SetArrayLength(DDTM.SubPoints, Length(DDTM.SubPoints) +1);
DDTM.SubPoints[Length(DDTM.SubPoints) -1].x:= TheDDTM[(I+1)*6];
DDTM.SubPoints[Length(DDTM.SubPoints) -1].y:= TheDDTM[(I+1)*6 + 1];
DDTM.SubPoints[Length(DDTM.SubPoints) -1].AreaSize:= TheDDTM[(I+1)*6 + 2];
DDTM.SubPoints[Length(DDTM.SubPoints) -1].AreaShape:= TheDDTM[(I+1)*6 + 3];
DDTM.SubPoints[Length(DDTM.SubPoints) -1].Color:= TheDDTM[(I+1)*6 + 4];
DDTM.SubPoints[Length(DDTM.SubPoints) -1].Tolerance:= TheDDTM[(I+1)*6 + 5];
end;
Result := AddDTM(DDTM);
end;
Function LoadRightDTM(Name : String): integer;
begin;
Case LowerCase(Name) of
'dwarfcoal' : Result := MakeDDTM([621,120,0,0,1796464,300,
598,107,3,0,0,0,
648,134,1,0,0,0,
613,102,5,0,GreyRock,0,
660,55,1,0,0,0]);
'brownrocks': Result := MakeDDTM([633, 51,6,0,BrownRock,0,
624, 50,6,0,BrownRock,0,
640, 50,6,0,BrownRock,0,
632, 58,6,0,BrownRock,0,
632, 43,6,0,BrownRock,0]);
end;
end;
It just uses so many space in your script :p

EvilChicken!

2008-04-23 09:46:07

Wow. N3s, sorry for totally hijacking your thread, but look on the bright side: At least I'm bumping it. And, please answer my memory leak question while we're at it.

So, hermpie, mind PMing me and telling me what you made? And why for ME?

n3ss3s

2008-04-23 09:56:53

The memory leak answer - you got me. You have to have an integer variable to free it.


I've done the declaration of DDTMs before like


Function CreatePoint(Vars: TIntegerArray): TDTMPointDef;
Begin
Result.X := Vars[0];
Result.Y := Vars[1];
Result.AreaSize := Vars[2];
Result.AreaShape := Vars[3];
Result.Color := Vars[4];
Result.Tolerance := Vars[5];
End;

and done that to each point of a dtm, but didn't remember about doing it cleaner… About that code chunk of yours, -


[(I+1)*6 + 5]

..?

Why wouldn't you just have an array of TIntegerArray?


LocAndLOAD


You need to watch more action movies/ play games :D

Just a small 'joke' from the phrase "Lock and load".

kor

2008-04-23 09:57:42

i just tried it, worked like a charm ^^. ill try to make a overnight proggy for ya!

mastaraymond

2008-04-23 09:58:23

From: n3ss3s
The memory leak answer - you got me. You have to have an integer variable to free it.


I've done the declaration of DDTMs before like


Function CreatePoint(Vars: TIntegerArray): TDTMPointDef;
Begin
Result.X := Vars[0];
Result.Y := Vars[1];
Result.AreaSize := Vars[2];
Result.AreaShape := Vars[3];
Result.Color := Vars[4];
Result.Tolerance := Vars[5];
End;

and done that to each point of a dtm, but didn't remember about doing it cleaner… About that code chunk of yours, -


[(I+1)*6 + 5]

..?

Why wouldn't you just have an array of TIntegerArray?

Cuz this is old code maybe? And this makes the arguments easier..

n3ss3s

2008-04-23 10:01:56

Matter of preferral.

Small proggie for you people -

7 / 8; Flax: 532
Average RoundTime: 151 Seconds.


:)

kor

2008-04-23 13:14:38

i made this little thingie (it's my evil plan to 70 mage lol)

Magic Longbows x 1000 = 1.283.000 (1.3m)
Nature Rune x 1000 = 298.000 (298k)
Longs + Nats = 1.283.000 + 298.000 = 1581.000 (1.6m)

Flax picking:

Flax price: 84 gp Ea
How many to sell: 18821 (18.8k)
Time to pick all the flax's:

92736 Secs = 1545 Mins = 25,75 Hours


a plus is that i will keep alot of the money too, since i get cash from alching!

Sweet.

ShowerThoughts

2008-04-23 14:28:27

Yeah good luck on your ban :p

kingarabian

2008-04-23 15:23:43

Wow nesses, sweet ass script. Well I to am gonna make lumby spinner. ITs finished but needs some tweaking a lil.

@evil chicken, I cant wait to see how your script looks like. Hey if you wana work together, ill be happy to.

kor

2008-04-23 16:04:14

From: Hermpie
Yeah good luck on your ban :p

i didnt mean that i'll run it 25 hours straight, that would've been really stupid. since flax picking is risky :P

kingarabian

2008-04-23 16:13:12

MMm some things that need fixing.
[SCAR]


For the bank pin its going to be a mismatch.

So:
Players[0].Strings[1]:='0000';
instead of
Players[0].Pin := '';

And this function
Function OpenTheBank: Boolean;
Begin
If FastFindBank Then
Begin
BankWait;
if Length(Players[CurrentPlayer].Strings[1])>0 then
If PinScreen Then
Result := InPin(Players[CurrentPlayer].Strings[1]);
Result := BankScreen;
End;
End;

instead of


Function OpenTheBank: Boolean;
Begin
If FastFindBank Then
Begin
BankWait;
If Players[CurrentPlayer].Pin <> '' Then
If PinScreen Then
Result := InPin(Players[CurrentPlayer].Pin);
Result := BankScreen;
End;
End;
Oh yea in your loop:
 Until(Not(LoggedIn)) or (FC > Players[CurrentPlayer].Integers[0]);

There nothing like that in the player setup (.Integers[0]).
So Declare players should look like this:

Players[0].Name := 'UserName';
Players[0].Pass := 'Password';
Players[0].Nick := 'assw';
Players[0].Integers[0]:= 20;//loads
Players[0].Strings[1]:='0000'; // Bank PIN
Players[0].Active := True;

Just something's you probably forgot :p. I know I may have gotten some things wrong or you intended something different in your script, but it would'nt compile for me.

Edit: Proggie:

*** Inventory full, heading to bank ***
Failed to find bank symbol, finding bankers on minimap…
7 / 24; Flax: 196
Average RoundTime: 165 Seconds.
NextPlayer

The weird thing is that, it was inside the bank….

Timer

2008-04-23 16:39:22

Testing Now, I Will Calculate Any Amounts Of Money Needed… I Have A Script For It!

Heres Me:

833333 Flax Needed For 70000000 GP
1240 Hours Needed About
- OR -
52 Days Needed About

:D

Shuttleu

2008-04-23 16:52:21

nooooooooo now this might make my flax picker a bit less popular :(
how could you
there was already a good working flax picker

lol jks good work on this script

may the best man win lol

~shut

Timer

2008-04-23 16:55:13

No Offense, Works Like Crap… >.<

Improve The Walk To Bank, Walk To Flax, And Picking The Flax. It All Needs Work…

And The Banking Fucks Up.

Shuttleu

2008-04-23 17:15:39

From: Timer
No Offense, Works Like Crap… >.<

Improve The Walk To Bank, Walk To Flax, And Picking The Flax. It All Needs Work…

And The Banking Fucks Up.

what on mine or this one
because i re-done all the walking a few days ago and i haven't had any problems with it

~shut

Timer

2008-04-23 17:24:19

'SuperFlaxer' Not Gardener By You And … Whats His Name… :D

doucette

2008-04-23 18:59:42

hey man this is great work.

4 / 7; Flax: 112
Average RoundTime: 134 Seconds.

Ill get a better one when this one stops.

Maybe for a future update, an auto responder?

kor

2008-04-24 01:45:29

darn it. i was going to run this but then when i woke up it said this:
*** Time from last flax picked exceeded 10 seconds ***
- breaking out of picking. and then it stopped ^^ better luck next night

Santa_Clause

2008-04-24 02:27:40

From: kingarabian
MMm some things that need fixing.
[SCAR]


For the bank pin its going to be a mismatch.

So:
Players[0].Strings[1]:='0000';
instead of
Players[0].Pin := '';

And this function
Function OpenTheBank: Boolean;
Begin
If FastFindBank Then
Begin
BankWait;
if Length(Players[CurrentPlayer].Strings[1])>0 then
If PinScreen Then
Result := InPin(Players[CurrentPlayer].Strings[1]);
Result := BankScreen;
End;
End;

instead of


Function OpenTheBank: Boolean;
Begin
If FastFindBank Then
Begin
BankWait;
If Players[CurrentPlayer].Pin <> '' Then
If PinScreen Then
Result := InPin(Players[CurrentPlayer].Pin);
Result := BankScreen;
End;
End;
Oh yea in your loop:
 Until(Not(LoggedIn)) or (FC > Players[CurrentPlayer].Integers[0]);

There nothing like that in the player setup (.Integers[0]).
So Declare players should look like this:

Players[0].Name := 'UserName';
Players[0].Pass := 'Password';
Players[0].Nick := 'assw';
Players[0].Integers[0]:= 20;//loads
Players[0].Strings[1]:='0000'; // Bank PIN
Players[0].Active := True;

Just something's you probably forgot :p. I know I may have gotten some things wrong or you intended something different in your script, but it would'nt compile for me.

Edit: Proggie:
The weird thing is that, it was inside the bank….


I'm quite sure that the bank pin is a string in Revision 16.

Nice script N3ss3s…TPAs…not surprising.

n3ss3s

2008-04-24 08:39:10

Kingarabian, I know my code. The [CurrentPlayer].Integers[0] is being declared in the mainloop.

Also, about the pin, I do If Players[CurrentPlayer].Pin <> '' Then, which means it checks for pin only if the Pin is not "empty".

You didn't consider that I maybe compiled it before releasing and even posted a proggie?


No Offense, Works Like Crap… >.<

Improve The Walk To Bank, Walk To Flax, And Picking The Flax. It All Needs Work…

And The Banking Fucks Up.




kingarabian

2008-04-24 15:16:44

From: n3ss3s
Kingarabian, I know my code. The [CurrentPlayer].Integers[0] is being declared in the mainloop.

Also, about the pin, I do If Players[CurrentPlayer].Pin <> '' Then, which means it checks for pin only if the Pin is not "empty".

You didn't consider that I maybe compiled it before releasing and even posted a proggie?







No dude, for the integers[0], was not declared, so i filled up the consts to 20 and it only did 2 and then logout. I put the integers[0] in the playersetup and made it to 20 and it did more loads.

So what you took this all offensively right? Yea some people (like you) think there perfect and if it works for them it works for the rest of the world. To bad for you the world aint like that. So when you get feedback appreciate it or dont expect anything at all.

God and I thought this forum couldnt get any more immature…

@santa, my bad >.<.

Timer

2008-04-24 15:43:48

Im Serious… -.- I'm Not Leaching, It Does, 'Suck'.

Sneakdella

2008-04-24 22:53:26

From: Timer
Im Serious… -.- I'm Not Leaching, It Does, 'Suck'.


You're just a plain jerk Welcome to my ignore list.


EDIT: Good job on the script.

Timer

2008-04-24 22:55:29

Haha, I don't even wanna be your friend… it's shit… are you blinded of scripting???

Sneakdella

2008-04-24 23:04:38


n3ss3s

2008-04-25 01:37:35

Timer, make sure your screen is on 32bit true color…


So what you took this all offensively right? Yea some people (like you) think there perfect and if it works for them it works for the rest of the world. To bad for you the world aint like that. So when you get feedback appreciate it or dont expect anything at all.


Too far too fast, let's look at the mainloop -


begin
SmartSetup('swe5', False, True);
Wait(5000);
SetTargetDC(SmartGetDC);
SetupSRL;
LoadDTMs;
DeclarePlayers;
Repeat
LoginPlayer;
SetChat('off', 2);
SetAngle(True);
Players[CurrentPlayer].Integers[0] := LoadsPerLog + Random(6);
FC := 0;
Repeat
RoundMarker := GetSystemTime;
If Not WalkTo(False) Then
Begin
LocAndLoad('Lost');
Break;
End;
PickingLoop;
If Not LoggedIn Then Break;
If Not WalkTo(True) Then
Begin
LocAndLoad('Lost');
Break;
End;
If Not OpenTheBank Then
Begin
LocAndLoad('BankFail');
Break;
End;
DepositFlax;
CloseBank;
FindNormalRandoms;
FC := FC + 1;
Inc(Players[CurrentPlayer].Integers[1]);
Counter := Counter + 1;
ShowStats;
Until(Not(LoggedIn)) or (FC > Players[CurrentPlayer].Integers[0]);
ShowStats;
NextPlayer(LoggedIn);
Until(False);
end.

See the Integers[0] being declared and the until statement, I believe the logic is correct?


Also, about your rest of the world thing, if it compiles for me, it compiles for you, expecting you have the same SCAR and SRL revision as me.


If I get offended, I will say so, I only proved your worries about a type mismatch wrong, though now I saw your edit @ santa…


Im Serious… -.- I'm Not Leaching, It Does, 'Suck'.


You've posted three times that it's either shit or sucks, you might want to tell what doesn't work for you?

kor

2008-04-25 15:32:57

this script works sorta good. it always (almost) ends up standing on the grey part of the house above the flax field (where the drop party place used to be). my best run is 4 banks so far ^^

ill try get a picture :P

Shuttleu

2008-04-25 15:49:12

lol it seems that quite a few people have been having problems with this script :p

~shut

mastaraymond

2008-04-25 15:55:13

Stop bitching on eachother it's not worth it..

Timer

2008-04-25 15:57:32

it clicks like little tiny clicks going there, and logs out at bank because u dont have a wait after the flag for a complete stop… plus.. its just clicks the same spots every time, plus clicks flax to fast.

MylesMadness

2008-04-25 16:29:49

From: Timer
it clicks like little tiny clicks going there, and logs out at bank because u dont have a wait after the flag for a complete stop… plus.. its just clicks the same spots every time, plus clicks flax to fast.
Instead of telling him to fix the script like a leecher, make your own. Your a member, you can do it.

kingarabian

2008-04-25 16:39:16

From: n3ss3s
Timer, make sure your screen is on 32bit true color…



Too far too fast, let's look at the mainloop -


begin
SmartSetup('swe5', False, True);
Wait(5000);
SetTargetDC(SmartGetDC);
SetupSRL;
LoadDTMs;
DeclarePlayers;
Repeat
LoginPlayer;
SetChat('off', 2);
SetAngle(True);
Players[CurrentPlayer].Integers[0] := LoadsPerLog + Random(6);
FC := 0;
Repeat
RoundMarker := GetSystemTime;
If Not WalkTo(False) Then
Begin
LocAndLoad('Lost');
Break;
End;
PickingLoop;
If Not LoggedIn Then Break;
If Not WalkTo(True) Then
Begin
LocAndLoad('Lost');
Break;
End;
If Not OpenTheBank Then
Begin
LocAndLoad('BankFail');
Break;
End;
DepositFlax;
CloseBank;
FindNormalRandoms;
FC := FC + 1;
Inc(Players[CurrentPlayer].Integers[1]);
Counter := Counter + 1;
ShowStats;
Until(Not(LoggedIn)) or (FC > Players[CurrentPlayer].Integers[0]);
ShowStats;
NextPlayer(LoggedIn);
Until(False);
end.

See the Integers[0] being declared and the until statement, I believe the logic is correct?


Also, about your rest of the world thing, if it compiles for me, it compiles for you, expecting you have the same SCAR and SRL revision as me.


If I get offended, I will say so, I only proved your worries about a type mismatch wrong, though now I saw your edit @ santa…




You've posted three times that it's either shit or sucks, you might want to tell what doesn't work for you?


Im saying that dont it have to be in the declare players section?

Players[0].Name := 'User';
Players[0].Pass := 'pass';
Players[0].Nick := 'nick';
Players[0].Integers[0]:= 20;
Players[0].Strings[1]:='5902'; // Bank PIN
Players[0].Active := True;

n3ss3s

2008-04-26 02:27:33

Im saying that dont it have to be in the declare players section?


It would be if I wanted the user to set the amount which will stay for the whole runtime of the script, randomizing that is harder, but not hard, than just doing
Players[CurrentPlayer].Integers[0] := LoadsToDo + Random(6),

which randomizes the load amount for every logon in the mainloop :)

kor

2008-04-26 04:47:41

i really think everyone should stop argument about this script -.- post some useful posts instead. and kingarabiain, i really think n3ss3s knows his code ^^ no need to argue about it.

n3ss3s

2008-04-26 08:33:28

Thanks lol, by the way, if the walking doesn't work for you, -

let me guess, it has stopped behind the courthouse?

You can solve that by going to the WalkTo function, and going to were it says GoToDDTM(CourtRight,…) change the two digits in the params to 5, 15.

kor

2008-04-27 13:57:20

From: n3ss3s
Thanks lol, by the way, if the walking doesn't work for you, -

let me guess, it has stopped behind the courthouse?

You can solve that by going to the WalkTo function, and going to were it says GoToDDTM(CourtRight,…) change the two digits in the params to 5, 15.

no problem ^^ oh and btw, is that line 633? (im pretty sure it is) just want to be sure. thanks

n3ss3s

2008-04-29 10:36:48

Propably.

kor

2008-04-29 11:11:36

ill try it again soon, to see if it works better now. im currently getting my ranged up with Timers guild ranger ^^

n3ss3s

2008-04-29 11:20:44

I don't think it works very well :p

kor

2008-04-29 11:21:58

From: n3ss3s
I don't think it works very well :p

well, are you planning to updating it or was it just a little script to get some quick cash? :P

n3ss3s

2008-04-30 05:22:46

I might update it some time, I made it because I needed cash for my pure but I managed to transfer 1.8M through party room from my main :p

spart300

2008-05-10 09:43:01

finally a flax PICKER and not a stringer maker thingy lol. cant wait to test it out.

spart300

2008-05-10 10:29:17

it keeps logging off before its done with the set amount of loads -.-

n3ss3s

2008-05-10 10:32:10

You would've saved time not testing it by reading the posts above you…

spart300

2008-05-10 10:35:59

i did read the above posts actually, and i figured i'd test it so I could let you know what was wrong with it so IF you were to update it, you would know what to update.

gothguydante

2008-05-31 20:52:18

i don't really see what the problem is…. when i set 271 as loads per log it seems to run fine… i mean there is that off chance it gets lost and well yeah just reset it… but i'm running right now and i'm at
11 / 275; Flax: 308
Average RoundTime: 131 Seconds.

but well it works and it's awesome rep++

gothguydante

2008-05-31 21:20:44

16 / 275; Flax: 448
Average RoundTime: 137 Seconds.
thats what i ended up with but it's not the scripts fault my wifi lost conection… anyways that 448 more than i had time to restart…

yourock12345

2008-06-02 17:29:02

i was only able to get like 246 flaxes for some reason it just logged out and stopped. it said time to flax picking exceeded 10 seconds. how can i fix the time thing

ghfghf7

2009-02-06 16:39:58

Line 578: [Error] (16890:62): Invalid number of parameters in script C:\Program Files\SCAR 3.15\Scripts\Smart flaxer.scar


help plz

Q Golden Q

2009-02-06 17:37:32

ghfghf7 try pressing ctrl f and then replacing:

Smartsetup(SmartPrefix, true, true, false);
Settargetdc(smartgetdc);

with

SMARTSetupEx(30, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);

not sure if that will help but it helped with another script

cycrosism

2009-02-21 16:22:20

Line 560: [Error] (16872:62): Invalid number of parameters in script

EvilChicken!

2009-02-21 19:36:37

N3s, if it doesn't work, why not just close it?