SRL Archive - First Scripts

[SRL4] Putnam11's PowerCutter


Putnam

2007-12-21 21:00:23

Hey, this is my first thread, and my first script! Enjoy!!
Putnams Power Cutter
Can Cut any Tree/ any where!
I NEED HELP FOR TREE COLORS!!!!!! PLEASE HELP! ty

bugs=

colors for trees suck, i need help


FEATURES

you can cut anywhere
you can cut any tree
no wc lvl restrictions
no lvl restrictions


it took me 3 hours, it is my first script. thanks

This is your progress
U shud post it on SRL
Cut 794 Logs.
Enjoysez

download below

richk1693

2007-12-22 12:33:56

Not to bad for a first script. FindFastRandoms is old. Now all you need is FindNormalRandoms;. Try using FindObj(Search for it). If you do that then you don't need to pick a new color every time. Enjoy scripting and good luck. If you have any questions PM me.

Edit:Never use Mouse(x,y,0,0,true) use at least x,y,1,1. 0,0 will click on the exact color and is very detectable. You can also use IsUpText(String) to check if you are clicking the tree. (Uptext is included in findobj.)

WizOfTheOne

2007-12-22 12:48:30

looks good
ill try it out later

Naum

2007-12-22 13:18:49

richk good advice u didn't find out the main reason call SetupSRL; in your mainloop :P

richk1693

2007-12-22 13:23:56

Whoops. Shoulda taken a little bit more time to look over it huh? My bad.

Putnam

2007-12-22 13:29:15

ok thanks for you guys advice, ill update it later, did u guys figure out why mouse moves super slow? its really buggin me

richk1693

2007-12-22 13:40:51

You need
SetupSRL;
in your main loop. That will fix the mouse speed.

Cameron4811

2007-12-22 15:13:28

nice first script, u just gotta tweek the randoms and what not

scanjet92

2007-12-22 19:49:03

lol your not joking about the mouse moving super slow it takes like 5 mins just to sign you in:p when the mouse moves faster i will give u a report on how well it done :)

Putnam

2007-12-22 20:06:42

From: scanjet92
lol your not joking about the mouse moving super slow it takes like 5 mins just to sign you in:p when the mouse moves faster i will give u a report on how well it done :)



lol i know, im updating rite now, all i need to do is add setupSRL in mainloop, but ive been trying to get a better color finder:duh:

the mouse thing will be updated in like 2 mins :(h):

Putnam

2007-12-23 09:59:35

I need help wit randoms

scanjet92

2007-12-23 11:46:55

it says this when i try to run it:

Failed when compiling
Line 60: [Error] (14741:1): Identifier expected in script
does it say this to anyone else ? the old version worked fine with the really slow moving mouse.

richk1693

2007-12-23 12:49:32

From: putnam11
I need help wit randoms

PM me with exactly what you need. I'll help ya.

skooter1000

2007-12-23 14:30:55

looks nice except for the randoms thing i will post a proggie in a bit if it works

Datakovis

2007-12-23 14:32:56

tested it some time ago , a bit slow mouse -_-

Putnam

2007-12-23 20:04:43

datakovis, download the new version…. i fixed it, forgot the setupsrl in mainloop

minimario13

2007-12-23 21:13:53

yeah its giving the line 60 error. An identifier is expected. Fixing it would be nice :p

Exaligo I

2007-12-24 07:10:43

OK, good script, especially for a first. Works pretty well.

A bit of a problem: Standards.

I know it's your first script, so it doesn't matter too much, but if you get into good habits with your standards now, then you won't find you have too much trouble later on.

I've gone through your script and sorted it out. There might be a few errors that I missed, but this should mostly be right:

//===============================//
//Thanks fer Downloading My first Script//
// If you like, please rep//
// and post proggies =)//
// I also need help with antiban, mouse , tree colors, and maybe even banking
//--------------//
// KNOWN ISSUES//
//-------------//

//^^none at the moment^^//
//====================================//

{SETUP=
go to some where with the trees u wanna cut (can be anywhere)
go on low detail
DO NOT HAVE LVL3, DEFAULT CLOTHES, CRAPPY NAME! i will report u if i see you.
enter tree colors
declare players
press play ;-)
}

program Putnam11sPowercutter;
{.include SRL/SRL.scar}

var
Tree : String;
TreeColor : Array[0..2] of Integer;

procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;

Players[0].Name :='YOUR username'; //username
Players[0].Pass :='Your Passwerd'; //password
Players[0].Nick :='NickName'; //3-4 letters in middle of name
Players[0].Active := True; // used or not, false if not//
Players[0].Integers[0] := 10; //How many loads total to do on this player.
Players[0].Strings[0] := 'Tree'; //Type of tree. Tree,(more to come)
Players[0].Strings[1] := 'N'; //Direction to run when find ent. (N, NE, E, SE, S, SW, W, NW)
end;

Begin
Tree := Capitalize(Players[CurrentPlayer].Strings[0]);
Case Lowercase(Tree) of
'tree' : Begin
TreeColor[0] := 1059370;
TreeColor[1] := 3693652;
TreeColor[2] := 531484;
end;
end;

procedure ChopTree; //Cuts Tree.
begin
until(IsUpText('down ' + Tree))then
begin
wait(1+random(5));
Mouse(x,y,2,2,true);
wait(5000+random(5)); //Time Before Clicks New Tree.
i:= i + 1
end;
if(not(FindColor(x,y,TreeColour,0,0,600,600)))then
Writeln('Tree not found, retrying. If u get this fer a long time u better check ur player')
wait(2000+random(5));
end;

Procedure ChopTree;

var
ClickedTree : Integer;

Begin
repeat
GameTab(4);
if InvFull then exit;
repeat
FindFastRandoms;
if FindObjCustom(x, y, ['down ' + Tree], [TreeColor[0], TreeColor[1], TreeColor[2]], GameColorTolerance) then
Begin
Mouse(x, y, 1, 1, true);
end else
MainLoop;
end else
Begin
Tries := Tries + 1;
if (tries >= 10) then
end;
until(IsUpText('down ' + Tree));
repeat
CheckForRandoms;
if (TimeFromMark(ClickedTree) >= 30000 + random(5000)) then
Begin
Mouse(x, y ,0, 0, true);
MarkTime(ClickedTree);
end;
until InvFull or Not(IsUpText('down ' + Tree));
until(InvFull);
end;

Function FindFastRandoms: Boolean;
Var
i: Integer;
Begin
For i:=1 To 8 Do
Begin
Case I Of
1: If FindDead Then
Result := True;
2: If FindMod Then
Result := True;
3: If FindMime Then
Result := True;
4: If FindMaze Then
Result := True;
5: If FindQuiz Then
Result := True;
6: If FindDemon Then
Result := True;
7 : If RC Then Result := True;
8: If FindTalk Then Result := True;
End;
Wait(1);
End;
End;

procedure Setup;
begin
ClearDebug;
Writeln('Putnams First Script ')
Writeln('Its a Powercutter ')
Writeln('Enjoy ;-) ')
Writeln('Post Proggresses and FeedBack')
end;

procedure Report;
begin
ClearDebug;
Writeln('Putnams Powercutter ');
Writeln('Progress Report');
Writeln('Cut' +IntToStr(i)+' Logs.');
Writeln('Please post on SRL =)');
end;

begin Setup;
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
ChopTree;
findFastRandoms;
if InvFull then
begin
DropToPosition(2, 28);
Inc(Players[CurrentPlayer].Banked);
if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
begin
NextPlayer(True);
begin Report;
end;
end;
end;
until(false)
end.

Well there's the revised version, and I've also attached a SCAR file, if any one finds that easier.

Hope I could help. Anyway, here's the file:

Putnam

2007-12-25 03:16:10

o woops! i uploaded the wrong version up here!

Putnam

2007-12-31 03:36:24

need help with randoms! anybody?

King_Of_Kings

2007-12-31 16:21:40

cool and yea make a banker!

P1nky

2007-12-31 16:33:54

it didnt cut 794 logs dude fake but good try making btw i think you should make a procedure for droping instead in main loop

~KEEP IN MIND DONT POST FAKE PROGGIES~

Putnam

2008-01-12 11:53:30

From: p1nky
it didnt cut 794 logs dude fake but good try making btw i think you should make a procedure for droping instead in main loop

~KEEP IN MIND DONT POST FAKE PROGGIES~



yea it did cut 794 logs… i kept running like 5 hours

im tryin to make ( or find) a dropper that i could use

diboking

2008-09-11 21:05:45

i keep getting an error that says
Line 86: [Error] (16136:1) : Semicolon (";") expected in script

help please??

WithoutFear

2008-09-11 21:15:16

From: diboking
i keep getting an error that says
Line 86: [Error] (16136:1) : Semicolon (";") expected in script

help please??


your kidding right? it means there is a semicolon that is supposed to be at the end of the line above…:google:

Tom_Gower

2008-09-13 05:51:09

buddy, I have no clue about scripting but you have now encouraged me to get into it , ure script actually doesnt look to difficult to set up, might try to make an iron powerminer.