SRL Archive - First Scripts

Woohoo's Cutter


woohoo530

2008-01-24 00:50:20

So basically I was bored and decided I'd give this a shot. This is what I came up with…a tree chopper. Basically it logs you in, cuts trees until the inventory is full, and finally drops the logs when the inventory is full. Worked on my comp, hope you get the same results. Anyways lemme know what you think!

Raskolnikov

2008-01-24 00:56:59

Very nice first script :D Keep working and scripting and learning so then you will create better scripts for others.

A few comments though…

Don't use an endless loop like
until(false);

That will make the script run forever. Instead you can make a record variable of how many loads the script has done. Then there would be a constant of how many loads the person needs done. So:

repeat
DoStuff;
Loads := Loads + 1;
until(Loads=HowLoads);

That's all I have to say about this script. Please keep working!

cut em2 it

Johura

2008-01-24 00:58:57

Script is not bad for a first script. BUT, 1 post???? That makes me a lil suspicious.

Anyway, change this:
if(FindObj(x,y,'Tree',TreeColor,15))then

To this:
if(FindObj(x,y,'hop',TreeColor,15))then

So the user can cut any type of tree.

woohoo530

2008-01-24 01:05:12

From: Jahuro
Script is not bad for a first script. BUT, 1 post???? That makes me a lil suspicious.

Anyway, change this:
if(FindObj(x,y,'Tree',TreeColor,15))then

To this:
if(FindObj(x,y,'hop',TreeColor,15))then

So the user can cut any type of tree.


Ya i only have one post lol….just found this SCAR stuff yesterday so I figured I'd take a crack at it. Thx for the suggestions. About the looping, I just figured running it forever was easiest lol but I see your point.

Edit: With a tad bit of editing you could make it into a Miner….i might play around with that tomorrow….neways peace for now

Raskolnikov

2008-01-24 01:17:14

Right, just don't leech. Post proggies when you use scripts, ect. It's good to see more members that don't leech :D

Keep working at it and hopefully you can become and awesome scripter one day!

One more thing I just noticed:

begin
SetupSrl;
DeclarePlayers;
ActivateClient;
if LoggedIn then
begin
LogOut;
Wait(120000+random(400)); //I added this wait here so that you aren't automatically logging out then all of a sudden you are logging in again :D
LoginPlayer;
repeat
if(not(LoggedIn))then
Exit;
begin
Cutter;
Drop;
End;
Until(false);
end.

Edit: Also learn about standards for spacing and other things here.

P1nky

2008-01-24 16:22:35

dropping looks similar like mines and frozens…..

and theres no anti ban

alexispigy

2008-01-25 21:22:57

ive tryed everything it dosent work for me none do!!!!!!!! alwayse errors and cant find files help!!:confused: