SRL Archive - Help and Support

Power Cutter/Burner


Phlame

2006-03-17 14:01:26

I've decided to make my first script a fully functional, around the clock, power cutter and burner…

So far it includes SRL's antibans, antirandoms, and basic skills of Woodchopping and Firemaking, along with a few custom procedures i've wrote.

Im starting to encounter errors and would love the help of a few skilled writers to help out on this. I have to finish some ToDo's before i start posting script snippets, but I will always be on AIM at elemntsk8r217 if anyone wantsto contact me to help out.

The Un-Named

2006-03-17 17:53:14

Post the errors you get when compiling and the lines, possibly a few lines before and after too.

WT-Fakawi

2006-03-17 18:09:42

Do you want to show us what you got so far?

I am sure plenty people are willing to assist you here…:)

Dankness

2006-03-17 18:17:31

show us what you wrote already so we can direct you where you need directed… Also don't worry about making a overnight script for your first script, it takes along time to debug scripts so it'll take you awhile… dont get discouraged…

Some one

2006-03-17 20:56:14

Yes, if you post what you have so far, then maybe myself (learning SCAR so any help I give helps me)and I know there are a lot of intelligent minds on these forums:).

Phlame

2006-03-18 02:45:13

Here are my Script snippets for my log cutting and burning procedures, havent been able to do anything yet cuz i am still writing out procedures, but tell me how the look and feel free to make suggestions.

–LogCutting–
[FONT="Courier New"]Procedure FindChopTree
Begin
wait(1000+random(5000))
If (FindObj(x,y,'Chop',TreeColor1,5))
Or (FindObj(x,y,'Chop',TreeColor2,5))
Or (FindObj(x,y,'Chop',TreeColor3,5)) then
Begin
wait(1000+random(2000));
getmousepos(rx,ry);
CMouse(x,y,rx,ry,true);
wait(5000+Random(3000);
end;
end;

--burning--
Procedure BurnInv
Begin
UseItem(Lognumber);
wait(100)
FindItemBmpTol(bmpTenderBox,5) then
Begin
Mouse(x,y,0,0,false);
ChooseOption(x,y,'logs with');
wait(2000+random(1500))
If (Lognumber < 28) then
Lognumber:=Lognumber+1
Else If (Lognumber = 28) then
Lognumber:=2
end;
end;[/FONT]

Phlame

2006-03-18 03:29:20

I decided that I was going for a way to complicated script to start off with, so i narrowed it down to the main bones, and ill start adding things in as i get it working such as randoms, etc. Heres what i Have so far though:

Feel free to pick it apart, as it hasnt even worked yet and comment on my code… But remember, please give constructive criticism, and not flame me.

Pyro

2006-03-18 15:07:58

OK just two things to fix up at quick glance. the mouse to the trees. You have a

getmousepos(rx,ry) Then you have a mouse(x,y,rx,ry) what if your mouse was at 500,500 to start with. this means the mouse will have a randomness of 500,500. WAaaaayyy to big. Take away that getmousepos and change the rx and ry in mouse to 5,5, to 9,9, or anywhere inbetween.

Next the mouse movement in your burner is not random at all. change those zeros in your mouse movement to 5

But nice work and keep on learning

WT-Fakawi

2006-03-18 15:24:08

As opposed to FindObj three times, you might consider using FindObjMulti, that inputs three colors.

Phlame

2006-03-18 18:20:36

The bmp find tinderbox proc was running pretty slow so i decided to try a new procedure to find the tinder box and use it:

Procedure BurnInv;
Begin
If (Not(Lognumber=28)) then
Begin
UseItem(Lognumber);
[B]Lognumber:=Lognumber+1[/B]
wait(100);
If FindItemName('TinderBox') then
Begin
Mouse(x,y,5,5,false);
ChooseOption(x,y,'logs with');
wait(2000+random(1500))
[B]end;[/B]
Else If (Not(FindItemName('TinderBox')) then
Begin
Writin ('No TinderBox');
Logout;
Exit;
end;
end;
Else If (Lognumber=28) then
Lognumber:=2
end;

I keep getting two errors:

"Line 60: [Error] (9060:1): Variable Expected in script C:\Program Files\SCAR 2.03\Scripts\MyChopper.scar" at the first bolded line.

"Line 67: [Error] (9067:1): Identifier expected in script C:\Program Files\SCAR 2.03\Scripts\MyChopper.scar" at the second bolded line. (when i take out the precious error line).

There may be more beyond that, but I wnat to fix those before i encounter others.

thanx!

timmyboy

2006-03-18 19:13:52

To fix the second bolded line, instead of this:
       
end;
Else If (Not(FindItemName('TinderBox')) then
Begin


try this:
       
end else
If (Not(FindItemName('TinderBox')) then
Begin

That should work. If it dosn't…well find a better scripter:p

Phlame

2006-03-19 01:43:49

Okay the script runs, it logs in, or if logge din continues on to next procedures, but when searching for tree colors, it just keeps searching and never actually clicks on them to smash em. Take a look at the script and let me know whats up if you can, but ill keep messing around with things.

Phlame

2006-03-19 02:47:12

Yay i got working, it works very poorly, but it works!

Sdcit

2006-03-19 11:00:27

You dont need te last exit in the main loop?