SRL Archive - First Scripts

My Willow Power Chopper


I B X R

2008-08-24 02:06:33

Ok, I know, I know, I have posted like 5 scripts as my first script, and not been serious about them, well I was, then I quit rs lol, but I'm serious about this one =p

Ok, this is my Power Willow Chopper… There are so many errors, but I was hoping the kind people of SRL would like to give me a hand lol =D

Ok, this script is so bad, there is no need to download it, so I'll just post it as a scar code thingy haha. I've been reading some tuts, but most of them I don't really understand, or don't apply to what I am trying to do. Here's the script

program MyPowerWCer;
{.include SRL\SRL.scar}
/////////Credits due to the following/////////
////////////////ProphesyOfWolf////////////////
var
x,y: Integer;

const
W1 = 5731944;
W2 = 9550015;
W3 = 2176303;
W4 = 2770746;

Procedure FindnChopWillow;
begin
If(FindColor(x,y,W1,0,0,513,336))Then
MMouse(x,y,3,3,W1);
If(IsUpText('hop'))Then
Wait(250+random(500));
ClickMouse(x,y,true);
end Else(FindColor(x,y,W2,0,0,513,336)then
MMouse(x,y,4,4,W2);
If(IsUpText('hop'))then
Wait(250+random(500));
ClickMouse(true);
end Else(FindColor(x,y,W3,0,0,513,336)then
MMouse(x,y,4,4,W3);
If(IsUpText('hop'))then
Wait(250+random(500));
ClickMouse(true);
end Else(FindColor(x,y,W4,0,0,513,336)then
MMouse(x,y,4,4,W3);
If(IsUpText('hop'))then
Wait(250+random(500));
(ClickMouse(true);
end else
end;

procedure EmptyLoad;
begin
If(InvFull)
Then
Begin
DropAll;
end Else
end;

Procedure Chop;
begin
FindnChopWillow;
Wait(10000+random(4500));
EmptyLoad;
end;

Procedure MainLoop;
begin
Chop;
end;

begin
MainLoop;
end.

Ok so yea, there it is, first and foremost, I would like to get it to run lol, so can you help me fix the errors? Haha, after that, I will fix the form, and finally, I will add the anti ban, but please, no flaming me, or negative remarks =[

Ok, and if you help me I will credit you, because this will be a great script sooner or later lol haha, oo and yea, tell me what error I made, and why the other way is correct please and thank you!

Goobs

2008-08-24 02:20:10

O.O!!

Okay, first off, my main man…

DON'T USE MOVEMOUSESMOOTH!!!

It has been oh-so-conveniently replaced by:

{*******************************************************************************
procedure MMouse(x, y, rx, ry: integer);
By: Benland100
Description: Moves the mouse.
*******************************************************************************}

Same thing, except you won't get banned using MMouse.. =P

Same goes for "ClickMouse", Use:

{*******************************************************************************
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
By: Mutant Squirrle, with a small fix by hy71194
Description: Moves then clicks mouse.
*******************************************************************************}

That moves the Mouse and clicks it, all in one call. Pretty easy, huh?

(ranx and rany are a random number added to the x, y variables, set to like 3)

I don't think "TextUp" is a SRL procedure. I think you were thinking of:

{*******************************************************************************
function IsUpText(UpText: String): Boolean;
By: Freddy1990
Description: Returns up text that might be to the right
*******************************************************************************}


All in all, it was a pretty good first attempt. Pat yourself on the back for not coming to us with a "Hello World" script. Be proud =D

Look in Tutorial Island for failsafes, repeats, and STANDARDS!! Rawr~

ProphesyOfWolf/Faelstorm

I B X R

2008-08-24 02:23:33

Thanks dude, but there are still many problems, for instance, it still doesn't run lol.

Goobs

2008-08-24 02:33:49

On my other account, I am a Jr. Member. Let me tell you my short life story..

*deep breath*

I made this account, but didn't get a confirmation email, so I made Faelstorm, who is a Jr. Member, but then got the confirmation email, so now I'm not on this one and I am on the other one… *exhales*

But yeah, you'll probably like to make something like this:


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

var
x, y: Integer;

procedure Everything;
var
I: Integer;
begin
repeat
If(FindObjTPA(x, y, WILLOWCOLORHERE, 6, -1, 10, 10, 15, ['illow'])) then
begin
Mouse(x, y, 2, 2, True);
I := InvCount;
repeat
Wait(random(75));
until(I < InvCount)
FindNormalRandoms;
end;
until(InvFull);
DropAll;
end;

begin
SetupSRL;
repeat
Everything;
until(false)
end.

Heavily condensed, and untested. (I just made in like 3 mins, so yeah)

I made it for you for learning purposes. It's very simple, and does everything in one procedure. Of course, feel free to use it as you will. I just want you to learn from it, not blindly copy it and use it without understanding it.

I B X R

2008-08-24 02:39:13

From: ProphesyOfWolf
On my other account, I am a Jr. Member. Let me tell you my short life story..

*deep breath*

I made this account, but didn't get a confirmation email, so I made Faelstorm, who is a Jr. Member, but then got the confirmation email, so now I'm not on this one and I am on the other one… *exhales*

But yeah, you'll probably like to make something like this:


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

var
x, y: Integer;

procedure Everything;
var
I: Integer;
begin
repeat
If(FindObjTPA(x, y, WILLOWCOLORHERE, 6, -1, 10, 10, 15, ['illow'])) then
begin
Mouse(x, y, 2, 2, True);
I := InvCount;
repeat
Wait(random(75));
until(I < InvCount)
FindNormalRandoms;
end;
until(InvFull);
DropAll;
end;

begin
SetupSRL;
repeat
Everything;
until(false)
end.

Heavily condensed, and untested. (I just made in like 3 mins, so yeah)

I made it for you for learning purposes. It's very simple, and does everything in one procedure. Of course, feel free to use it as you will. I just want you to learn from it, not blindly copy it and use it without understanding it.


Whoa there partner! You lost me with all this hip young pascal language lol. FindObjTPA? What the! haha, gonna read some tuts tomorrow, I'm tired, plus I have church tomorrow. It's like 2:40 where I am :eek:

Goobs

2008-08-24 02:43:56

Likewise, 2:40 here, too (Michigan FTW)

Umm..

FindObjTPA finds an object with, basically…

Egh… I'm not that great at explaining. There are some good tutorials out there, though. Do you get the rest of it, though?

I B X R

2008-08-24 17:06:31

Ok, I get the rest of it, but I still don't know what the TPoint is… an array is multiple things right? I don't know where to input it the colors for willow tree, maybe I'm just not understanding the tpa's and stuff like that, what's the best beginners guide for it?

Heavenzeyez1

2008-08-24 17:11:22

From: I B X R
Ok, I get the rest of it, but I still don't know what the TPoint is… an array is multiple things right? I don't know where to input it the colors for willow tree, maybe I'm just not understanding the tpa's and stuff like that, what's the best beginners guide for it?


I don't think that there is one for beginners , but if you really want to learn then this will sure help you , i got all i needed to know from there , ;)
GL ,
~Eerik~

wewaka

2008-09-13 18:12:22

I copied prophesyofwolf's script that he posted, It cuts 1 tree then says script finnished what shoudl I do?

noidea

2008-09-13 19:56:11

That is an example my friend. It will not work. It is for demonstration purposes only.