SRL Archive - Senior Scripts and Snippets

Flax Picker + Spinner


Town

2007-08-18 17:44:08

Well, I was planning on selling this, hence the pretty form, etc. Then, my extreme sence of laziness kicked in and I changed my mind. I had a crap version out in the free scripts section for awhile, but it doesn't work anymore. I didn't want it out being leeched, and now that I'm an SSRL member I guess this is the place to put it. It does more use here than just laying around on my computer.

I spent a little bit changing some stuff around so it at least compiles with the new SRL. I tested a load and it still works pretty well. If there are some problems, that's why, they shouldn't be hard to fix if there are. I took FindMod out of FindNormalRandoms so if you'd rather use that then just edit all the 'FindMyNormalRandoms' to 'FindNormalRandoms'.

[B]Form boxes[/B] ---> 

Loads = Number of loads for that player to do before logging out.

Flax, Spin, or Both = Flax- Only pick flax. Spin- Only spin flax. Both- Reconfigures C: drive

MMLadder and Flax color = It has autocolor. . . If you feel like it you can set a color or two, but I doubt it would make much of a difference.

Debug Text = Proggies gives a normal report. All gives the time each thing took to do.

Starblaster helped me with it while I was still planning on selling it. Most of that applied to the 'efficiency' of the script which obviously I wasn't too pro on. :duh:

Has Dontpanic's bee keeper solver in it. I'm not really sure how good it is, but it gets the job done. You never really get that random.

Bugs, suggestions, proggies, etc. And yes, Yohojo, this is where those bow strings came from.

Pyro

2007-08-18 17:56:04

Wow. Lonnnggg script. Ill actually get some members and have a crack at it latter maybe. From what i can see it looks actually pretty decent. And nice work of multiplayers with the if(not(loggedin)) and nextplayer(loggedin). Always good to see people using it properly.

RAM

2007-08-18 19:39:10

Glad to see this here Town :) …I have a few days left on an account I made just for making strings in Lumby, maybe I'll get a chance to test it a bit….

Town

2007-08-18 21:19:41

I'll run it tonight and tell you guys how it's working. The only problem I see that may make a difference is going up the ladder, the procedure is pretty half-assed. There's nothing I can think of that would make it get lost though. Who knows, it may run all night. I've got 2 members accounts right now. Sadly while I was out of town my other accounts ran out of members and I have bow strings stuck on them. :(

EDIT: This one compiles with the SRL 4 beta.

Town

2007-08-30 21:42:37

Updated.

This Player Has Done: 12 Loads
All Players Have Combined For: 56 Loads
Running For: 4 Hours, 34 Minutes and 1 Seconds
Picked And Spun: 1568 Flax
Grew About: 0 Levels
Gained: 23520 Crafting Experience

Name | Loads Done | Active

* | 47 | True

* | 9 | False

(35/35 loads —> 9/15 (second char) loads —> 12/35 (first char) loads)

There's a bug where it gets caught coming out of the flax field (with a full inventory). I think it's mistaking the minimap tree symbol color with a regular tree. If it couldn't find the color then I wouldn't be standing where I am so it's something like that. It's possible I'm just losing connection, which causes most of my problems.

Tell me if you find anything :)

Dark_Sniper

2007-09-01 00:59:39

wow so when i first suggested him to be in SSRL who are the people who opposed me?

Looks good man.

RAM

2007-09-01 18:16:36

It was me that objected…I hate this script so much ;)

I'm having some problems running this…everything is fine, except when it gets time to pick the flax….does not move the mouse to the flax, but if i hover it over the flax, it finds it and clicks it….walking,m spinning and banking is all fine otherwise..

I've been experimenting with a few things..changing Colors, etc….the default value you have listed, corresponds with the color of the leaf of the flax, so i know the colors are good..any suggestions ?

Also, I get this "error" "| 0 | False"..but can't seem to find what is generating it ?

~RAM

Town

2007-09-01 19:31:00

Change lines 1459- 1461:

If (not (IsUpTextMulti('Pick', 'lax', 'ck Fl'))) then //If the up text isn't already "Pick Flax"
If (FlaxColor = 0) then if (not (FindObj(x, y, 'Pick Flax', 941321, 20))) then // And it can't find flax using a default color
If (not (FindObj(x, y, 'Pick Flax', FlaxColor, 15))) then Exit; // Or with the set color then it exits

To:

If (not (IsUpTextMulti('Pick', 'lax', 'ck Fl'))) then //If the up text isn't already "Pick Flax"
begin
If (FlaxColor = 0) then
begin
if (not (FindObj(x, y, 'Pick Flax', 941321, 20))) then Exit; // And it can't find flax using a default color
end else If (not (FindObj(x, y, 'Pick Flax', FlaxColor, 15))) then Exit; // Or with the set color then it exits
end;

(Sometimes it's hard understanding my own code, I had it set where it would only look for the flax using a color set in the form if the color was set at 0, which wouldn't work >.>)

Then, try setting your own color in the form.

If that doesn't work, make sure your FindObj in Object.scar looks like this:

{*******************************************************************************
function FindObj(var cx, cy: Integer; Text: String; color, tolerance: Integer): Boolean;
By: Stupid3ooo and modified by Ron.
Description: Finds Object.
*******************************************************************************}

function FindObj(var cx, cy: Integer; Text: string; color, tolerance: Integer): Boolean;
var
a, c, i, x1, y1, x2, y2: Integer;
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
Break;
a := a + 1;
if (a = 1) or (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(cx, cy, color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(cx, cy, 0, 0)
Wait(50+Random(50));
if (IsUpText(Text)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;

That's about all I can think of.

RAM

2007-09-01 20:29:55

This Player Has Done: 7 Loads
Running For: 32 Minutes and 44 Seconds
Picked And Spun: 196 Flax
Grew about: 0 Levels
Gained: 2940 Crafting Experience

Name | Loads Done | Active

*** | 7 | True
Thanks, I'll try your fixes..here is the one I made, modified from an arrow picker…

[banana]{===============================================}
{ Picks up Flax }
{=============================================== }
Procedure PickFlax2;
var
PickUpMarker, FailedAttemps: integer;
Begin
If not LoggedIn then exit;
MarkTime (PickUpMarker);
Repeat
Ix := mscx;
Iy := mscy;
If FindColorSpiralTolerance (Ix, Iy, FlaxColor, msx1, msy1, msx2, msy2, 5) then
begin
Wait(300+Random(100));
If IsUpTextMulti('Pick', 'lax', 'ck Fl') then Mouse (Ix, Iy, 1, 1, True) else
Begin
Mouse (Ix, Iy, 2, 2, False);
If ChooseOption ('Flax') then
Begin
wait(100+random(100));
If not FindColor (Ix, Iy, 255, mmx1, mmy1, mmx2, mmy2) then exit;
end
else FailedAttemps := FailedAttemps + 1;
end;
Flag;
Respond;
end;
wait(1000+random(500));
Until (TimeFromMark (PickUpMarker) > 15000) or (not LoggedIn)
or (not FindColorSpiralTolerance (Ix, Iy, FlaxColor, msx1, msy1, msx2, msy2, 1))
or (FailedAttemps > 1);
if InvFull then Exit;
end;
[/banana]

Try it if you want, needs to be cleaned up a bit, but worked well for me

and I see where my "error" False is from, the player array…

All was running good…then it stopped after spinning a load..and hung there for about 5 mins..I'm going to investigate that next…

Maybe I get a chance to try the autocolor flax..have you experimented with it any further ?

Town

2007-09-01 21:04:55

From: RAM_RUNE
Thanks, I'll try your fixes..here is the one I made, modified from an arrow picker…

[banana]{===============================================}
{ Picks up Flax }
{=============================================== }
Procedure PickFlax2;
var
PickUpMarker, FailedAttemps: integer;
Begin
If not LoggedIn then exit;
MarkTime (PickUpMarker);
Repeat
Ix := mscx;
Iy := mscy;
If FindColorSpiralTolerance (Ix, Iy, FlaxColor, msx1, msy1, msx2, msy2, 5) then
begin
Wait(300+Random(100));
If IsUpTextMulti('Pick', 'lax', 'ck Fl') then Mouse (Ix, Iy, 1, 1, True) else
Begin
Mouse (Ix, Iy, 2, 2, False);
If ChooseOption ('Flax') then
Begin
wait(100+random(100));
If not FindColor (Ix, Iy, 255, mmx1, mmy1, mmx2, mmy2) then exit;
end
else FailedAttemps := FailedAttemps + 1;
end;
Flag;
Respond;
end;
wait(1000+random(500));
Until (TimeFromMark (PickUpMarker) > 15000) or (not LoggedIn)
or (not FindColorSpiralTolerance (Ix, Iy, FlaxColor, msx1, msy1, msx2, msy2, 1))
or (FailedAttemps > 1);
if InvFull then Exit;
end;
[/banana]

Try it if you want, needs to be cleaned up a bit, but worked well for me


There's no reason that you have to right click the flax, but I'm still not sure why it works for me and not you.

From: RAM_RUNE
and I see where my "error" False is from, the player array…


I don't understand, what about the player array? Something I did?

From: RAM_RUNE
All was running good…then it stopped after spinning a load..and hung there for about 5 mins..I'm going to investigate that next…


I've had that happen before, I don't remember if I found out why. I thought I had fixed it.

From: RAM_RUNE
Maybe I get a chance to try the autocolor flax..have you experimented with it any further ?


The set color I had with a high tolerance had been working fine ;)

RAM

2007-09-08 12:06:31

I've been using it with the pick procedure i made, and has been working fine, but I decided to chage it to the one you posted….
This Player Has Done: 9 Loads
Running For: 38 Minutes and 39 Seconds
Picked And Spun: 252 Flax
Grew About: 0 Levels
Gained: 3780 Crafting Experience

Name | Loads Done | Active

*** | 9 | True


It works alright, except it tends to misclick quite a bit, until it has the plant in front of it….the reason I choose right click, was to add some randomness to it..My question about the player array was…This message was displayed "| 0 | False" , but seeing I was only using 1 character at this time, I realized it was just a message from the array..NBD…and I added a bit more tolerance, and I see there is no need to change the flax or ladder color now :)

Thanks Again,

~RAM

Town

2007-09-08 12:16:34

Alright, if you think you're going to keep using it then I'll keep posting updates. (Which I did)

This Player Has Done: 11 Loads
All Players Have Combined For: 60 Loads
Running For: 5 Hours, 27 Minutes and 5 Seconds
Picked And Spun: 1680 Flax
Grew About: 1 Levels
Gained: 25200 Crafting Experience

Name | Loads Done | Active

* | 4 | False

* | 37 | True

* | 19 | False

NextPlayer
Successfully executed

First character lagged out, second had finished spinning and didn't go down the ladder for some reason, third had a bee keeper. Still not a great report, but I always lose connection after awhile on at least one character. Annoying.

RAM

2007-09-08 16:50:22

Well, it works almost flawless on my fastest computer, but on the others, it tends to get lost at the yews to the south…I have yet to see it walk there…just logged in and it's there (with a full load of strings)

Town

2007-09-10 15:04:11

Updated.

This Player Has Done: 7 Loads
All Players Have Combined For: 89 Loads
Running For: 7 Hours, 16 Minutes and 38 Seconds
Picked And Spun: 2492 Flax
Grew About: 1 Levels
Gained: 37380 Crafting Experience

Name | Loads Done | Active

* | 5 | False

* | 59 | True

* | 24 | False

* | 1 | False

Successfully executed

I finally have all my accounts memberized again (except I had to remake one, banned for RL trading >.>). Ran overnight, stopped it myself.

First- Full inv of flax a few steps away from the ladder going up, there may be something with that specific spot because it's happened before. 2-3 squares to the left of the ladder.

Second- Stopped myself.

Third- Semi-full inventory of flax about a minimaps length away from the flax field. I think there was something wrong with running away and back from a fight, I added a wait there so it may help.

Fourth- Mostly full inventory of bow strings, rest flax, teleported to Wizard's Tower by random. Maybe the text was blocked, maybe bad luck, it should find randoms fine.

Just noticed that I had if (Random(10) = 10) on my random mouse moves. I guess I forgot to change that after I changed it down from Random(20), ++ points for me.

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| SRL 4 Randoms Report |
| www.srl-forums.com |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| SRL Logs : 8 |
| Fights : 2 |
| Boxes Solved : 1 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

Looks like the box solver is working fine, player #2. The fights are from player #3.

AH! Since x and y aren't global variables anywhere RunBack doesn't work.

– Oh, and I took out the bee keeper solver which didn't work anyway.

– – http://www.srl-forums.com/forum/vbugs.php?do=view&vbug_id=167, RunBack thread.

RAM

2007-09-10 18:07:39

Hmm, the bee keeper solver worked for me before, but I will check this new update out :)

Town

2007-09-10 18:26:09

Oh, you can edit it back in if you want to. Copy the main thing in from an old version, if you have it, and the variables, then edit DoRandoms by adding in:

  if (GetColor(649, 78) = 0) then BKdtms;
if (BeeKeeper) then Result := True;

Next time I get the random I'll make my own.

The Claw

2007-09-11 03:00:34

Looks like a great script :) Im thinking of running it, but worried about getting banned…what would the chances be of getting banned if i ran it with 6 players, all 35+ combat with an extensive auto responder do you think?

Town

2007-09-11 06:27:10

Hmmmm. . . I really don't think you will get banned. . . If you are really worried about it then run 5-8 loads per character before switching.

This Player Has Done: 7 Loads
All Players Have Combined For: 92 Loads
Running For: 7 Hours, 52 Minutes and 42 Seconds
Picked And Spun: 2576 Flax
Grew About: 3 Levels
Gained: 38640 Crafting Experience

Name | Loads Done | Active

* | 27 | False

* | 5 | False

* | 13 | False

* | 47 | True

Successfully executed

The Claw

2007-09-13 06:28:19

Hmm its very tempting to tell the truth, it looks like a very simple, fast and profitable way to get to 40 crafting for 6 chars (planning on making a crafting guild miner). I'm still a little cautious, the last time I ran a flax picker was about 9 months ago with an early release of ARGA and trading the gp from it over to my main got me banned. So you have had 0 bans using this? If you can get me those 6 pins that we talked about on PM then I'll probably use this script… I will give you some gp of course.

Also, would lvl 30's fit in at the flax fields? I havent been there for ages, and have no members accounts so just wondering if it would be suspicious.

Town

2007-09-13 09:11:41

My characters are level 20- 72 crafting, 82- 58 crafting, 5- 60 crafting, and 10- 39 crafting (I made him 2 days ago). Sorry my character aren't all high level, etc. In two (three for the first character, that's when I started making the script) months of using and testing this I have had no characters banned. The only character I have ever had banned that had used the script was for Real World Trading, which I did. I have never traded between characters. The first character currently has over 6M and a few thousand bow strings on him. The only way you will get banned using this script is by trading between characters.

As far as pins, you can add me on MSN [email]shadow.doctor@hotmail.com[/email]. You can give me 800k for each pin you want, I'll go buy them, I think you will need to give me you names and passwords and I'll just activate them on the spot. Or if we're on at the same time then you can activate them as I get them and you can keep your passwords to yourself.

The more you are willing to pay the easier it is to find a seller, of course, but I usually buy pins for 800k each.

The Claw

2007-09-13 17:48:33

Ok sweet as. As soon as I get home from school then tennis I'll add you

The Claw

2007-09-15 07:33:07

ah well it would have been good to run but i just got scammed 1.45m from sythe while trying to buy pins, from trusted members too. my fault for actually trusting someone from sythe though.

Town

2007-09-15 09:57:39

That's why I said to wait. They're are no trusted members on Sythe. If you still want them then I'll help you get some.