SRL Archive - First Scripts

Boom Goes The Treeees!


**BANNED The Man

2010-12-23 14:01:55

Haiiiii guys :D
This is my first public script
It is a PowerCutter
It will power through or BLOW UP Normal trees, Oaks and Willows.
If you want you can request more :)
I havn't done much testing because my computer is doing quite a few things at the moment so it is lagging, but tonight I will give it a run.
Please test and give me feedback! :D:D:D

Thankyooooo
-Boom

Frement

2010-12-23 14:07:27

I read the script through quickly, you should try to make a color script, to get your skills up, basic layout of the script looked nice, you could try to get your standards a bit better, indenting was overall pretty good.

**BANNED The Man

2010-12-23 14:10:05

It is a colour script xD
Ok i will look at improving my standards :D

Thankyooooo
-Boom

Frement

2010-12-23 14:17:47

From: Dynamite
It is a colour script xD
Ok i will look at improving my standards :D

Thankyooooo
-Boom


Oh, lol sorry, I just checked FindObj and I immediately throught it was reflection script, well yeah, you should check "A low-down on wizzyplugin!" tutorial, it teaches you how to use TPA's and that stuff for object finding.

**BANNED The Man

2010-12-23 14:19:53

Yeah that will be in my next script, I have been putting off making a script with TPA's but I will do :)

Thankyoooo
-Boom

TomTuff

2010-12-23 16:06:02

Protip: DON'T USE GLOBAL VARIABLES UNLESS ABSOLUTELY NECESSARY! What i would do is use the aspects of TUser (look in players.scar in SRL) instead. Also, using x and y as global vars can lead to false positives.

**BANNED The Man

2010-12-23 16:12:06

From: TomTuff
Protip: DON'T USE GLOBAL VARIABLES UNLESS ABSOLUTELY NECESSARY! What i would do is use the aspects of TUser (look in players.scar in SRL) instead. Also, using x and y as global vars can lead to false positives.


Yeah, I thought about that after I released :D
Will update in a few minutes, with new version:
[-----------------------------]
[ BoomGoesTheTrees ]
[-----------------------------]
We worked for 41 Minutes and 40 Seconds
Booomed 4704trees
Loads Done:6
Leveled 0
[-----------------------------]
Just added a few failsafes
And fixed tree counter.

Thankyooooo
-Boom

**BANNED The Man

2010-12-23 16:19:02

Sorry for double post >_<
But Updated to v2
Changelog:
-More human like antiban
-Correct Tree counting
-Won't click wrong trees now :D
-More failsafes

Thankyoooo
-Boom

TomTuff

2010-12-23 16:30:12

other than standards, this is nice for a first script!

RISK

2010-12-23 16:34:57

You need to fix your standards. View here: http://villavu.com/forum/showthread.php?t=60288

On your TypeSends, you need to do this:

TypeSend(AddMistakes('Line of text'));

It will add mistakes that a human would do whilst typing.

You also need to put your chopping options and how many trees chopping in your individual players. Like this:

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active:=True;

Integers[0] := 0; // How many trees chopped | Progress report stuff
Integers[1] := 0; // How many levels gained | Progress report stuff
Integers[2] := 0; // How many loads to do?

Strings[0] := 'Normal'; // What tree are we going to be chopping?
end;

For your equipped axe const, you could just use "DropItemsByIdentifier". That would work just fine for dropping instead of relying on the person to say if they are equipping their hatchet or not.

"FindObj(x,y,'Tree',3892314,1)" would not work very well. The tolerance is too low. You should also use either TPA or use FindObjMulti for a better chance of finding the trees.

To find a good tolerance use AutoColor Aid v2.

Also try using types instead of cases like you have in your tree chopping procedure. It will look neater and provide better efficiency. View the types tutorial in this post: http://www.villavu.com/forum/showpost.php?p=618675&postcount=4

–

You have done very good for a first script. Don't give up and keep trying and I can see you being a very good scripter in the near future.

**BANNED The Man

2010-12-23 16:47:34

From: RISK
You need to fix your standards. View here: http://villavu.com/forum/showthread.php?t=60288
Will do thank you :)
On your TypeSends, you need to do this:

TypeSend(AddMistakes('Line of text'));
Hmm, seems like a logical addition.
It will add mistakes that a human would do whilst typing.

You also need to put your chopping options and how many trees chopping in your individual players. Like this:

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active:=True;

Integers[0] := 0; // How many trees chopped | Progress report stuff
Integers[1] := 0; // How many levels gained | Progress report stuff
Integers[2] := 0; // How many loads to do?

Strings[0] := 'Normal'; // What tree are we going to be chopping?
end;
I don't really see a difference other than if the person has more than one player then he will be able to choose different trees for each player.
With the Integers[0], again, I see no difference, enlighten me if there is :D

For your equipped axe const, you could just use "DropItemsByIdentifier". That would work just fine for dropping instead of relying on the person to say if they are equipping their hatchet or not.
Yeah, if I update I will add an axe check at the beginning.
Or what you said :
)

"FindObj(x,y,'Tree',3892314,1)" would not work very well. The tolerance is too low. You should also use either TPA or use FindObjMulti for a better chance of finding the trees.

To find a good tolerance use AutoColor Aid v2.

I did use AutoColor before I released this and always found that with 1 as the tolerance it would find the tree always, and not the ground etc.
I understand it may be weird but down to trial and error, it seems to work best :)


Also try using types instead of cases like you have in your tree chopping procedure. It will look neater and provide better efficiency. View the types tutorial in this post: http://www.villavu.com/forum/showpost.php?p=618675&postcount=4

Will do :)

–

You have done very good for a first script. Don't give up and keep trying and I can see you being a very good scripter in the near future.


Thank you very much for great constructive feedback :D

Thankyooooo
-Boom

TomTuff

2010-12-23 16:56:46

From: Dynamite
I don't really see a difference other than if the person has more than one player then he will be able to choose different trees for each player.
With the Integers[0], again, I see no difference, enlighten me if there is

It is usually a good idea to show multiplayer capability, and in the long haul will make your application to members flow smoother.
As for the Integers[0], it saves you from using global vars, and allows for multiplayer.

**BANNED The Man

2010-12-23 17:01:13

From: TomTuff
It is usually a good idea to show multiplayer capability, and in the long haul will make your application to members flow smoother.
As for the Integers[0], it saves you from using global vars, and allows for multiplayer.


Ah yes, point well proven :)

Thankyoooo TomTuff
-Boom

trojan

2011-02-01 05:31:33

As this is an old script i assume you didn't know about FindObjCustom then??
there seems to be
if FindObj(x,y,'Tree',1786423,1) or
FindObj(x,y,'Tree',3892314,1) then

instead of
 if FindObjCustom(x, y, ['ree'],[3892314, 1786423], 1) then 

Drugserrbad

2011-02-02 23:30:21

Everytime I try to run this or another script, Simba opens SMART, then it wont login. What do I do to fix this?

**BANNED The Man

2011-02-03 02:42:49

Go to my thread in FAQ forum