SRL Archive - First Scripts

Edgeville Yew Chopper & Banker


ReadySteadyGo

2010-01-23 02:13:43

V0.07
Edgeville Yew Chopper & Banker
By ReadySteadyGo




Hi all.

This isn't actually my first script. I used to script a fair few years ago but the standard is that much higher and I had to go back to basics. SRL is crazy good and I'm enjoying all the new SCAR features such as ColorToleranceSpeed etc.

Anyway, thought I'd post and see if I can get some help.

Cheers.


Progress Report:

[==============================================]
[ Yew Chopper Version 1.04 by Jack ]
[==============================================]
[ Script duration : 1 Hours, 36 Minutes and 7 Seconds ]
[ Logs banked : 280 ]
[ Loads : 10 ]
[==============================================]


Version Updates

EDIT: Added V1.02 - Starting to work quite well now.

EDIT: V1.03 - Animation IsChopping, fixed various problems working very smoothly now. Can anyone test it for me?

EDIT: V1.04 -
Added a lot, took off animation after fiddling with it for hours, you can do the same thing faster and more accurate with a TPA.
Rewrote TreesToBank procedure.
Rewrote Banking procedure.

EDIT: V1.05
Fixed Logout error.
Cleaned up a few things.

EDIT: V1.06

EDIT: V1.07
Added more in function antiban and improved some procedures.

Smarter Child

2010-01-24 01:16:20

This script is really good, you should try attempting some TPAs soon ;)

By the way:

function BankToTrees : Boolean;
begin
if (not LoggedIn) then
Exit;
x := MMCX;
y := MMCY;
Result := FindColorSpiral(x, y, TreeSymbol, MMX1, MMY1, MMX2, MMY2);
if (Result) then
begin
Mouse(x + 5, y + 17, 2, 2, True)
WriteLn('Moving to trees');
end else
begin
WriteLn('Could not find Tree Symbol');
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
end;

When you do Mouse(x + 5 that can be a bit bot-like. Thus, I suggest doing x + 3 + Random(2) or

Mouse(x + RandomRange(1, 6),

etc.

Keep up the good work though :D

ReadySteadyGo

2010-01-24 01:35:58

Hey thanks Smarter Child :)

I just updated. I added some TPA's, failsafes etc. Lemme know what you think.

Ok I'll change that, think I'm going to add multiple routes.

Cheers for looking,

Jack

PS cool name!

Coh3n

2010-01-24 10:48:48

Here's some feedback for you ;)

FindTree
  • In your second for..to..do loop, you should add a length check to get rid of any colors SCAR may find that aren't on the tree (i.e. flowers, grass, bushes). Something like this:

    • if (Length(boxesArr[i]) < 80) then
      Continue;
      • You should add a short before you check for uptext. The uptext takes some time to show up after the mouse is moved over the object. This wait is also useful in case of lag. You could also just use WaitUpTextMulti. ;)
      Chop
      • You need a method of detecting whether the play is chopping or not. Check out Animation.scar. ;)
      Bank
      • You have it set to enter in the PIN every time the bank is opened. What if the player doesn't have a bank PIN?
      Overall this is a good script. I like your use of constants, it really makes the code more readable. There's not much else I can say about this script, other than great job. Cheers, Coh3n

ReadySteadyGo

2010-01-24 15:55:04

Cheers Coh3n, I've made the changes, I'll post when I've fixed a few more things.

First progress report:

[==============================================]
[ Yew Chopper Version 1.03 by Jack ]
[==============================================]
[ Script duration : 19 Minutes and 58 Seconds ]
[ Logs banked : 56 ]
[ Loads : 2 ]
[==============================================]

Ran well, stopped it to make some changes.

Freddie Shannon

2010-01-24 17:37:01

im available to test mate ;)

ReadySteadyGo

2010-01-24 17:44:07

aha little bro you do make me chuckle.

Freddie Shannon

2010-01-24 17:57:29

will be posted tomorrow morning check back at around 7:30 defenitely on by then :)

ReadySteadyGo

2010-01-26 00:33:06

Added a lot, took off animation after fiddling with it for hours, you can do the same thing faster and more accurate with a TPA.
Rewrote TreesToBank procedure.
Rewrote Banking procedure.

Progress Reports are getting better :

[==============================================]
[ Yew Chopper Version 1.04 by Jack ]
[==============================================]
[ Script duration : 53 Minutes and 40 Seconds ]
[ Logs banked : 112 ]
[ Loads : 4 ]
[==============================================]

ReadySteadyGo

2010-01-26 13:38:34

Wooo! Getting there!

[==============================================]
[ Yew Chopper Version 1.04 by Jack ]
[==============================================]
[ Script duration : 1 Hours, 36 Minutes and 7 Seconds ]
[ Logs banked : 280 ]
[ Loads : 10 ]
[==============================================]

Could not find Tree Symbol

ReadySteadyGo

2010-01-29 18:32:40

Can someone move this to the Free for all or junior scripts section please? I need people to test it.

Sex

2010-01-29 18:39:39

I shall test this in a few minutes :).

ReadySteadyGo

2010-01-29 18:41:11

Thank you! :)

Aardwolf

2010-01-29 18:46:20

Sorry I'm new to this…I got this error:

Line 847: [Error] (20810:4): Unknown identifier 'Respond' in script C:\Documents and Settings\Matthew\Desktop\scarprerelease\includes\SRL\SRL\Core\AntiRandoms\AntiRandoms.scar

Sex

2010-01-29 18:47:07

From: Baba mhillo
Sorry I'm new to this…I got this error:

Line 847: [Error] (20810:4): Unknown identifier 'Respond' in script C:\Documents and Settings\Matthew\Desktop\scarprerelease\includes\SRL\SRL\Core\AntiRandoms\AntiRandoms.scar

Try redownloading SRL via the SVN repository and move plugins.

Aardwolf

2010-01-29 19:26:12

It runs fine for a while, but eventually it clicks on the the levels tab and I get this error: [Runtime Error] : Exception: Could not convert variant of type (String) into type (Boolean) in line 366 in script C:\Documents and Settings\Matthew\Desktop\scarprerelease\includes\SRL\SRL\Core\GameTab.scar

Bad Boy JH

2010-01-30 02:42:33

dunno how, buy mine got lost and went an extra click to the south west or something, and then started chopping normal trees…dunno why…I'll run it again and sit here and watch what happens

ReadySteadyGo

2010-01-30 08:09:16

Baba mhillo, you might need to svn update, check this tutorial by coh3n. http://www.villavu.com/forum/showthread.php?t=47714

Bad Boy, what was the message in the debug box?

I just got a 6.5 hour proggie :D

[==============================================]
[ Yew Chopper Version 1.09 by ReadySteadyGo ]
[==============================================]
[ Script duration : 6 Hours, 57 Minutes and 23 Seconds ]
[ Logs banked : 336 ]
[ Loads : 12 ]
[==============================================]

Gu3st...

2010-01-30 08:51:33

That is actually a 6.95 hour proggie :P
How come it only gained 336 logs in nearly 7 hours? Isn't that low for a yew cutter?

ReadySteadyGo

2010-01-30 09:36:31

oh jeez, maybe there is something wrong with my loads counter, i'll take a look at that thanks. I know it was definitely running well for at least 3 hours and that is low for even 3 hours.

Bad Boy JH

2010-01-30 21:38:40

I got 140 for 1h 47m but I had a load that didn't get banked because the thing couldn't find the carpet…

perhaps more failsafes…

[==============================================]
[ Yew Chopper Version 1.09 by ReadySteadyGo ]
[==============================================]
[ Script duration : 1 Hours, 47 Minutes and 41 Seconds ]
[ Logs banked : 140 ]
[ Loads : 5 ]
[==============================================]
CurrentTree: Could not find Tree Symbol
Could not find carpet.
Used a blind click.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
Could not find carpet.
NextPlayer


Also the next player, I have only got 1 player, and the next player just sits there, and doesn't do anything, is this how you configured it, or the NextPlayer's Scripter's fault.

Edit:better clarify what that last thing meant, re-read and it was poorly worded…

When the next player function executes, it must get halfway done, then stop, because the script doesn't terminate and all players would be inactive…

Edit, the script got lost again, unfortunatly, didnt realise until after I restarted the script (which clears debug) it chops the normal trees, which is because you have an uptext option for 'hop' and 'own' which means it will repsond to any tree….not just yews…

ReadySteadyGo

2010-01-31 03:34:00

Thank you very much bad boy! I will fix those errors.

Bad Boy JH

2010-02-01 00:45:12

Lol, glad to help, you won't ever find all the errors on your own…lol

gamefreak054

2010-02-09 18:40:39

Alright i know im a new user and all and im pretty new to this script stuff but ive been trying to get this thing to work for hours but it will not work. It will click to the spost where its supposed to go , then it just sits there and clicks on the inventory bag and detects the tree every once in a while but does not click on the tree to cut. Can you please help me?

Bad Boy JH

2010-02-09 22:46:36

Allright, It is probable that you are using Scar 3.22, which is the most recently released version, however due to a update late last year which screwed with the uptext, which is what is used to detect trees, and it broke, you now need the pre-release of scar, version 3.23…

Tutorial here!

gamefreak054

2010-02-10 12:24:48

Yeah thats probably it thanks a ton, i wasted so much time trying to figure it out. ill post a proggie once or if i get this working.

gamefreak054

2010-02-10 14:28:39

srry to bug you again but now im receiving this anti random problem. What should i do now?
Line 270: [Error] (15567:1): Invalid number of parameters in script C:\Documents and Settings\Administrator\Desktop\MUSIC\scar\includes\SRL\SRL\Core\AntiRandoms\Sandwich.scar

Bad Boy JH

2010-02-11 00:46:08

Have you moved your plugins?
add me to MSN if you have it:lilbruvver2@hotmail.com
I will be able to help better there…

gamefreak054

2010-02-11 11:46:11

Yeah i moved everything, i dont have msn but thanks any ways. I just upgraded to members and have some better ways to earn money plus im working on my attack lvl so i can weild dragon weapons(god i suck).

danny2010

2010-02-13 01:44:51

I had it running for around 2 minutes then it logged me out and said possible mime
after a few tries i got it to work but sometimes it clicks the other side of the wall nearest to the bank
and its a bit slow at opening the bank to deposit the logs apart from that it works ok
btw how can i change the position to random ones around the trees
because i noticed it going to the same spot


[==============================================]
[ Yew Chopper Version 1.07 by ReadySteadyGo ]
[==============================================]
[ Script duration : 33 Minutes and 3 Seconds ]
[ Logs banked : 28 ]
[ Loads : 1 ]
[==============================================]

Bad Boy JH

2010-02-13 04:34:43

When you guys get enough posts (10) then you can use my script, I finally got a stable version out.

xSaintias

2010-02-19 16:10:50

heres a proggy :D
[==============================================]
[ Yew Chopper Version 1.09 by ReadySteadyGo ]
[==============================================]
[ Script duration : 8 Hours, 36 Minutes and 9 Seconds ]
[ Logs banked : 336 ]
[ Loads : 12 ]
[==============================================]

the only problem is… after 8 hours it only got 12 loads done.
Wtf?
i think u script pauses alot or something…..

pyroryano

2010-02-20 11:36:16

Works fine, but it only sits at one tree for me, is it supposed to go to both?

danny2010

2010-02-21 20:38:58

From: pyroryano
Works fine, but it only sits at one tree for me, is it supposed to go to both?

It goes to both trees

big d210

2010-09-26 14:53:03

I tried using it in the newest version of Scar and i get this error

Failed when compiling
Line 51: [Error] (360:11): Unknown identifier 'CreateTPAFromBMP' in script C:\Program Files\SCAR 3.22\includes\SRL\SRL\Core\Math.scar

Overtime

2010-09-26 16:15:19

Lol gravedig much?

This is from 1-23-10

This script wont work with all the new updates from RS and updates that SRL has done.

This script has to be updated in order to work.