SRL Archive - First Scripts

SWF Soul Wars Fletcher by silor


silor

2010-03-11 07:30:37

This is not my first script but it's the first script which i'm releasing. ;)

I have improved the script during ~40k maple longbows being fletched so it should work pretty good, the script might be a bit messy and standards might be off at some points, mostly capital letters and such. :redface: I have commented some parts of the script aswell.

I am mostly looking for feedback/criticism/whatever so I can improve the script and make more advanced scripts later. :)

Tested using: SCAR 3.23 and SRL Open Dev rev. #44 (417 on SVN), Maple Log/Longbows

What it does:
  • Fletches Unstrung Longbows
  • Strings bows
  • Banks
  • Supports most logs/unstrung longbows
  • Antiban
  • Anti randoms just in case
  • Takes breaks

To do:
  • Improve the script based on feedback/criticism
  • Add more logs, shortbow support
  • Improve bank finding

Known issues:
  • Bank finding sometimes fails, could be due to something blocking the bank chest which happens in busy worlds

Changelog:

V1.05: Sacred Clay knife support
V1.04: Bug fixes
V1.03: Custom break times, bank finding should be really accurate now. :)
V1.02: Bow stringing
V1.01: Some fixes
V1.00: Release

Credits:
  • Naike for break handler
  • Baked0420 for FindEnterAmount function
  • Wizzup? for FindObjTPA function

Remember to post progress reports and any bugs you find, with as much information as possible, it helps improving the script.

Progress Reports:


Fletched: 6075
FPH: 771
Bows strung: 3122
Antibans: 933
Banking fails: 0
Script runtime: 7h 52min

************************

Fletched: 1944
FPH: 1155
Bows strung: 0
Antibans: 205
Banking fails: 0
Script runtime: 1h 40min

************************

Fletched: 837
FPH: 1431
Bows strung: 0
Antibans: 45
Banking fails: 0
Script runtime: 0h 35min

Bow strings in 1st bank slot, Unstrung Longbows in 2nd bank slot, Logs in 3rd bank slot! Knife in first inventory slot if fletching! Make sure Lines 28-29 are accurate round down the number if you have to! If using sacred clay knife put it in last slot in first row and more in the second row.

weequ

2010-03-11 07:53:02

  case Random(6) of
0: InvMouse(2, 1);
1: InvMouse(3, 1);
2: InvMouse(5, 1);
3: InvMouse(6, 1);
4: InvMouse(9, 1);
5: InvMouse(10, 1);
end;
=
InvMouse(2+Random(9), 1);


if Random(5 + Random(3)) = 1 then
same change as
if Random(6) = 1 then

Great job otherwice ;)

silor

2010-03-11 08:02:35

 case Random(6) of
0: InvMouse(2, 1);
1: InvMouse(3, 1);
2: InvMouse(5, 1);
3: InvMouse(6, 1);
4: InvMouse(9, 1);
5: InvMouse(10, 1);
end;

it doesn't click on 4, 7, 8 so 2 + random(9) might click on them?

if Random(5 + Random(3)) = 1 then
I thought it went like for example Random(3) –> 2 + 5 = Random(7), doesn't matter I just added the mouse movements as extra randomness. :)

edit: over time it would probably be the same as Random(6), whatever ill change it in next release, gonna start working on the stringing function now :)

weequ

2010-03-11 08:28:33

Random(5+Random(3)) can be eighter Random(5), Random(6) or Random(7) and the average is Random(6). I might as well be wrong as I was about the 1st thing :D

Matsetst

2010-03-11 08:51:33

Wow goodjob !!! Im gonna use this ;) and give you some good feedback/ proggy's ! Atleast im gonna try it :D Did you already had some long progress runs ?

silor

2010-03-11 10:52:23

From: antti mies
Random(5+Random(3)) can be eighter Random(5), Random(6) or Random(7) and the average is Random(6). I might as well be wrong as I was about the 1st thing :D


You're right about the random(6) thingy, about the InvMouse, does it matter if I just choose a random of the 10 first slots or should I keep it as it is (closest 6 inv slots)?

From: Matsetst
Wow goodjob !!! Im gonna use this ;) and give you some good feedback/ proggy's ! Atleast im gonna try it :D Did you already had some long progress runs ?


I left it overnight, 3hours before it failed, woke up and found myself near the portal logged out. how did I end up there :confused: .. I think it lasted about ~6hours once before I had the progress report procedure aswell, if you're using a low pop world the banking probably won't fail, gonna fix it later, I have an idea. :)

Blumblebee

2010-03-11 10:52:34

From: Dgby714
Random(3) can give 0-3 so it can be 5, 6, 7, or 8


I'm pretty sure random(3) returns 0..2, so it only returns 5, 6, or 7. (someone correct me if I'm wrong)

weequ

2010-03-11 11:04:10

From: silor
You're right about the random(6) thingy, about the InvMouse, does it matter if I just choose a random of the 10 first slots or should I keep it as it is (closest 6 inv slots)?
Keep the closest ones. You should not make the script worse just to get it look better or something ;)

Matsetst

2010-03-11 11:19:56

Here some feedback !


- Sometimes it starts with the second number of your bankpin. For example my bank pin is 1234 it will starts with 2. It happened already 3 times to me. If the script tries it again in 1-2 min it will work properly.

silor

2010-03-11 11:29:45

From: antti mies
Keep the closest ones. You should not make the script worse just to get it look better or something ;)


Alright. :)

From: Matsetst
Here some feedback !

- It doesn't find the logs if you have bank tabs in your bank. (with the ''+'' symbol you can add in your bank an tab)

- Sometimes it starts with the second number of your bankpin. For example my bank pin is 1234 it will starts with 2. It happened already 3 times to me. If the script tries it again in 1-2 min it will work properly.


You have to place the logs in the main bank tab with a specified location (check the setup lines), I know about the Pin it happens to me aswell, could be due to the mouse being on the first pin number button when the InPin is called, I guess a quick fix would be to move the mouse away from the pinscreen before calling InPin. :)
if your logs are in the first bank slot then the numbers would be 0, the script currently does not use DTMs for finding logs in bank mainly cause some DTMs also find other logs than they are supposed to, doesn't matter in the current state of the script, finding the logs in bank wasn't on my priority list but once i fix the DTMs ill work on it. ;)

ill upload a (hopefully) fixed pin version.

Matsetst

2010-03-11 11:44:35


You have to place the logs in the main bank tab with a specified location (check the setup lines), I know about the Pin it happens to me aswell, could be due to the mouse being on the first pin number button when the InPin is called, I guess a quick fix would be to move the mouse away from the pinscreen before calling InPin. :)
if your logs are in the first bank slot then the numbers would be 0, the script currently does not use DTMs for finding logs in bank mainly cause some DTMs also find other logs than they are supposed to, doesn't matter in the current state of the script, finding the logs in bank wasn't on my priority list but once i fix the DTMs ill work on it. ;)


I already edited it out about the tabs thingy :) I'm not really used to that system. I got it now properly working :D awesome script !

Going to seek some more feedback for your script ;)

Dgby714

2010-03-11 11:50:07

From: Blumblebee
I'm pretty sure random(3) returns 0..2, so it only returns 5, 6, or 7. (someone correct me if I'm wrong)


You're Correct =(

Tested with
program New;
var
I: integer;
begin
repeat
I := Random(2);
WriteLn(IntToStr(I));
until(I = 2);
end.

Matsetst

2010-03-11 13:27:23

(*******************************************************************)
(* Fletched approx: 1647 *)
(* Fletched approx per hour: 1453 *)
(* Antibans: 106 *)
(* Banking fails: 0 *)
(* Script has been running for: 1 hours 7 minutes *)
(*******************************************************************)

Works flawless ! I used no breaks.
Thanks :)

Feedback: With the rows its handy that the first tab = 0 but you have the same thing with the columns but I think that the most people will not understand this the first time. Like when I have my logs in column 2 I will put in the script use column 3 because it will see the the first column as a 0. Its more noob friendly if it sees the first column as 1 and the second as 2 etc ;)

silor

2010-03-11 16:20:15

From: Matsetst

Works flawless ! I used no breaks.
Thanks :)

Feedback: With the rows its handy that the first tab = 0 but you have the same thing with the columns but I think that the most people will not understand this the first time. Like when I have my logs in column 2 I will put in the script use column 3 because it will see the the first column as a 0. Its more noob friendly if it sees the first column as 1 and the second as 2 etc ;)


Alright thanks for the feedback.

I added bow stringing in the new version, tested with Maple Longbow (u) for a few loads, the stringing code might be a bit off as I'm tired and looked it through quickly, I will merge a few functions later but now I'm done for today. ;)

I also changed the withdrawing of items, check first post.

ForgotMyName

2010-03-11 22:21:38

I'm not sure how many people would benefit from this idea, but how hard do you think it would be to add handling for the sacred clay knives from stealing creation?

i luffs yeww

2010-03-11 22:47:28

Sacred Clay items don't give you any better exp/hr. >_> I hate when people say they want a fast 99 so they're getting tons of clay stuff. It doesn't make it any faster whatsoever. If anything, slower.

ZaSz

2010-03-11 23:17:54

The Sacred clay fletching knife is obtained from the Morphic tool (costing 20 Stealing Creation points). It is a fletching tool used to cut logs into unstrung bows. A difference from normal knife is that it gives double experience when fletching most items. It does not give a bonus on fletching Comp Ogre bows.


The Volatile fletching knife is created by operating the Volatile Tool. It is used in the Fletching skill for cutting logs into bows/arrow shafts and gives a 120% Experience bonus
.

I think I call that better exp?

Matsetst

2010-03-12 00:47:33

(*******************************************************************)
(* Fletched approx: 9585 *)
(* Fletched approx per hour: 1205 *)
(* Antibans: 569 *)
(* Banking fails: 12 *)
(* Script has been running for: 7 hours 56 minutes *)
(*******************************************************************)

Runs great overnight :) Maybe some longer breaks for better antiban?

ForgotMyName

2010-03-12 01:35:45

From: i luffs yeww
Sacred Clay items don't give you any better exp/hr. >_> I hate when people say they want a fast 99 so they're getting tons of clay stuff. It doesn't make it any faster whatsoever. If anything, slower.


If you consider all game time equal, then you more or less break even with sacred clay. What does happen is that it changes HOW your time is spent. Personally, I would much rather enjoy playing Stealing Creation, and using the rewards to boost my fletch exp rate. (Especially if I had to 100% legit it.)

Also, it's cheaper. Because enough people want the cape that fletch is now gp lost. Imagine that.

Also, playing SC about half the time makes your autoing the other half of the time probably less suspicious, just in case you get flagged or something.

As far as actual implementation, the SC knives look different and need to be rebanked because they break. They also require right click options. Other than that though, it seems pretty feasible.

silor

2010-03-12 02:12:56

I didn't play the game when the clay stuff came out so it's kind of new to me, ill see what I can do.

Matsetst: Did you use a busy world like 44? 12 banking fails is what concerns me about the script, I can add a constant so user can choose how long it will take breaks.

Matsetst

2010-03-12 02:36:25

Matsetst: Did you use a busy world like 44? 12 banking fails is what concerns me about the script, I can add a constant so user can choose how long it will take breaks.


Yes I used world 44 :) With like 100 people at the same spot ;) Good thing that you are working on adding a constant !

(*******************************************************************)
(* Fletched approx: 5319 *)
(* Fletched approx per hour: 1420 *)
(* Antibans: 292 *)
(* Banking fails: 2 *)
(* Script has been running for: 3 hours 44 minutes *)
(*******************************************************************)
Failed to open bank. Relogging 1-2 minutes.
Already on world 44

ForgotMyName

2010-03-13 02:47:35

I think you should specify the PIN as a string rather than an integer. That way, it won't act weird on leading zeroes. I just replaced Pin with a string and removed the IntToStr in the InPin calls.

I'm getting a weird thing where it tries to log in while the loading is still happening. (I think it's Java going crazy over garbage collection, since it's stuck at the allocating memory stage.) I stuck in a Wait and it works fine. I don't know why I'm getting this issue when other people aren't. It just might be my computer hating on me.

With minor editing, it's working great. (I admit I have weird needs.) I'll post progress when I get it.

Thanks for the script!

Ok… something's gone horribly wrong. The script thought it was logged out and managed to type my username and password into public chat. It's changed now, mind you, but that was scary. I think I caused it, too, because I did something weird with the SMART window and maybe confused it.

It's very late now and I can't do much of anything. I'm gonna watch it run tomorrow and see what happens. Since nobody else has this situation, I'm vaguely confident it's something I'm doing wrong rather than anything wrong with the library or script.

If it's any use, here's the last bit of the progress before it did that:

Banking fails: 0
Script runtime: 0h 34min
Welcome to Runescape.
******** (username was here)
One minute has passed…
NextPlayer
SwitchToPlayer(PlayerNo: 0, Active: False);

silor

2010-03-13 05:28:54

From: ForgotMyName
I think you should specify the PIN as a string rather than an integer. That way, it won't act weird on leading zeroes. I just replaced Pin with a string and removed the IntToStr in the InPin calls.

I'm getting a weird thing where it tries to log in while the loading is still happening. (I think it's Java going crazy over garbage collection, since it's stuck at the allocating memory stage.) I stuck in a Wait and it works fine. I don't know why I'm getting this issue when other people aren't. It just might be my computer hating on me.

With minor editing, it's working great. (I admit I have weird needs.) I'll post progress when I get it.

Thanks for the script!

Ok… something's gone horribly wrong. The script thought it was logged out and managed to type my username and password into public chat. It's changed now, mind you, but that was scary. I think I caused it, too, because I did something weird with the SMART window and maybe confused it.

It's very late now and I can't do much of anything. I'm gonna watch it run tomorrow and see what happens. Since nobody else has this situation, I'm vaguely confident it's something I'm doing wrong rather than anything wrong with the library or script.

If it's any use, here's the last bit of the progress before it did that:


All calls which use the username/pass are SRL functions and they have checks to see if you're logged in.
"One minute has passed…" suggests the LoginPlayer function thought RS still wasn't ready after clicking the play button.

I don't have any experience with java and such so I can't help much.

Matsetst

2010-03-13 06:13:26

Sometimes when It tries to bank It can click on the nomad. Then It clicks North-West on the map screen and is lost finding the bank. Somehow when it relogs it finds the bank :) So that's maybe why it causes to failed attempt banking.

Omg this was very scary ^^ ! It clicked on Report Abuse while it was fletching … then it typed in my username and password. Luckily I was watching the script so I could stop it. lol that was not funny :p I used 2.1 edition of your script when this happened.

(*******************************************************************)
(* Fletched approx: 729 *)
(* Fletched approx per hour: 1274 *)
(* Antibans: 41 *)
(* Banking fails: 1 *)
(* Script has been running for: 0 hours 34 minutes *)
(*******************************************************************)

silor

2010-03-13 07:06:58

Banking apparently sucks and the logging out then back in seems to fail, ill upload a version with those removed instead it will try to find the bank and if not it will log out and terminate script. get the latest version. The banking is flawless in low pop worlds as i used my plank maker during the bonus xp for ~15hours. :)

1.04 won't click on minimap or relog it will just logout and terminate if banking fails, also if it starts typing your username/pass ingame it's a problem in SRL functions (it has LoggedIn check) unless im using them wrong? ;)

always get the latest version, i removed the old ones.

ForgotMyName

2010-03-13 11:13:09

Here's some information about the sacred clay fletching knife. It might be helpful if you decide to implement this.


The only significant differences are:
1. Color/bitmap
2. Uptext
3. Need to right click to fletch with it
4. It will decay into dust, so you should rebank for a knife when you can't find one
5. They don't stack, so you would need them as the last item slot being used, and just put a bunch in the slots after.

Matsetst

2010-03-14 06:59:11

Your newest version runs great ! I had a longer proggy but forgot to copy it.

Fletched: 837
FPH: 1431
Bows strung: 0
Antibans: 45
Banking fails: 0
Script runtime: 0h 35min

You did a really great job :) !

Dynamite

2010-03-14 07:11:23

I am really amazed :)
I love the methods of fletching and checking you use :)
Well done!

silor

2010-03-14 17:20:35

ForgotMyName: I implemented sacred clay knife fletching into the script but I can't test it myself since I dont have one, I will upload a new version in a couple of days. ;)

Matsetst: Thank you for all the testing and feedback!

The Man: Thank you, the stringing code is still a mess though, I might clean it up one day. :redface:

swisspking

2010-03-19 04:41:38

To the clay items:
It DOES speed up your xp-gaining per hour. It just depends on how you're getting your points for the items.
Try joining a cc like "sc claymates" or "fast sc". They have about 12-13 minute games, so you get your points faster. Just follow their rules (no cb, no pickpocket etc.) and everything should work well.

(did 99 smith with clay items, 99 con half-way with clay items)

To the script, I will test it now, let's see how far I can get :)

~swiss

ForgotMyName

2010-03-19 16:07:55

I'm noticing many more fletchers at the SW bank lately. Congrats on your success.

silor

2010-03-22 09:33:17

Sacred Clay knife support added, it's untested but it should work.

I think I'm done with the script (what else is there to fletching?), I can't be bothered cleaning up the code since it works however I'll update it once it no longer works. :)

ForgotMyName

2010-03-23 18:18:44

In an extremely rare occurrence, sometimes the script will click on Nomad's head when he steps right in front of the bank chest. I've only seen this once and I wouldn't know how to reproduce it. I'm not sure how this happens, but perhaps he moves between the checking and the clicking.

ilikenubs

2010-03-31 17:53:56

ty got 99 fletch with this script worked great, usually lasted 6 hrs in 1 run before stopping for some reason

silor

2010-03-31 18:40:35

From: ilikenubs
ty got 99 fletch with this script worked great, usually lasted 6 hrs in 1 run before stopping for some reason


Runescape logs you out automatically after 6hours of logged in (which I didn't know until later), only latest version logs you in, only break checking function has the check so it probably won't work if you get logged out when it's doing something.