SRL Archive - First Scripts

First script, power woodcutter.


orange

2008-08-08 09:01:02

Edit: my varrock west clay miner and banker is finished, and works extremely well, getting approximately 500 clay per hour, which is the fastest way you can get money that i'm aware of, for f2p… :)

If anyone has a char with 15+ woodcutting that i could borrow for 1-4 hours, i'll update this script for you all. :)

EvilChicken!

2008-08-08 09:48:17

Wow, TPointArrays in your first script. Not bad, I have to say. A whole lot better than mine.

But, there are a few things. TPAs by itself it very weak and detectable. If I were you, I would split the TPA into a two-dimensional TPA, (ATPA) using
TPAtoATPAEx

I'll explain really quickly what this does, but you should try to read a couple tutorials abut TPAs to fully understand.

Anyway, what the function does is that it "cuts" the TPA in squares, just like you cut your cucumber into small squares before throwing the pieces at mean people. (Look into Wizzyplugin for more functions & info)

The First parameter of TPAtoATPAex is (TPA, .. This is simply the TPA that you want to "cut up". Next is the (TPA, Width parameter. This simply is how wide you want the ATPA squares to be. Usually, they are the same size as the object you're trying to find. (Yes, they are in pixels.) And finally, the (TPA, Width, Height) parameter. Same a the Width parameter, but for height. :)


.. And this is the part where the tutorial's explanations step in, because I have to clean my room =.=`

orange

2008-08-08 10:13:55

Thanks and lol - owned :P

jbl

2008-08-08 11:03:31

Not working for me?
Anyone got this working?

Nava2

2008-08-08 11:21:18

From: jbl
Not working for me?
Anyone got this working?


Go away leecher, its his first script. Its here to be commented on and for help. Not to be uses straight away. It will be released when it can be used.

Have a nice day :).

Nava2

orange

2008-08-08 11:52:46

From: Nava2
Go away leecher, its his first script. Its here to be commented on and for help. Not to be uses straight away. It will be released when it can be used.

Have a nice day :).

Nava2



I spent a few hours banging my head trying to figure out why it wasnt working.

I had two copies of the script, one with a load of // notes on it, the other neatened up a bit and easier to use, the one with notes worked while the neat one didnt. A few hours later i discovered the reason for it not working was bebcause i had a // on the same line as {.include /SRL/SRL.scar} Lmfao, i was gutted ;)

Anyways, should 'work' now, although its not very effective :D

Ghostman

2008-08-11 16:01:09

good job on the first script

markuska815

2008-08-11 16:06:04

Not bad… you could work on your standards a bit (there are some easy tuts if you dont understand what i mean by that) but all in all its not bad for first try. :p good job

carlover

2008-08-11 17:43:51

For the drop items from slot 2 to 28 add a little note beside it to change it to 1 if wielding axe–just to make it more user friendly–
Maybe change the Antiban so that it does more of them i think 80 is bit high for a powercutter.
Put a declare players in and make a main loop. Thats all for now. :) hope i helped

~carlover~

Moebius

2008-08-28 19:48:57

Is this really your first script? wow
I wish I can write one as good as this.
Good job :)

orange

2008-09-06 06:40:46

Thanks. If anyone has a character with 15+ woodcutting, i'll update this script for you all :D.
Going to fix it up a load and add AntiRandoms, and everything else i didn't know how to do before. :)

TViYH

2008-09-09 23:45:22

Hmmm.

Well. Idk if you want me to do this.
But I edited it a lil.

To teach you ;]


// Use at your own risk, has NO ANTIRANDOMS... yet.
// Please tell me what can be improved etc on the forums.
// Power Woodcutter made by Orange. Thanks to
// Deathbyvirus for teaching me about arrays. :)
// This is the first version. It's a bit dodgey.
// Works best with lowest graphic settings and
// second lowest level of brightness.

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

const
TreeName = ''; // Tree, Oak, Willow, Yew
TreeColor = 0; // Pick a color from the tree

var
countVar: Integer;
TreeATPA: T2DPointArray;
TreeTPA: TPointArray;
TreePoint: TPoint;

procedure DropLogs;
var i: integer;
begin
repeat // Repeat
for i := 2 to 28 do // Using i as all of the number 2 through 28
begin
DropItem(i); // Drop the item using i
FindNormalRandoms; // Find Randoms;
end;
until(InvCount=1); // Until the inventory is down to 1 item
end;

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(80) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: SleepAndMoveMouse(1235+random(860));
6: MMouse(random(300), random(250), 10, 10);
7: begin
GameTab(1 + Random(12));
wait(1200+random(1000));
GameTab(4);
end;
end;
end;

begin
SetUpSRL;
repeat // Repeat
FindColorsTolerance(TreeTPA, TreeColor, MSx1, MSy1, MSx2, MSy2, 2); //Find all points with the tree color
TreeATPA := TPAToATPAEx(TreeTPA, 5, 5); // Turn the TPA into many TPAs sorted by size
for countVar := 0 to High(TreeATPA) do // Using countVar being the first TPA to the highest
begin
if InvFull then DropLogs; // If the inventory is full then drop the logs
FindNormalRandoms; // Find Randoms
TreePoint := MiddleTPA(TreeATPA[countVar]); // Turn the middle of the current TPA into a point
MMouse(TreePoint.X, TreePoint.Y, 3, 3); // Move to the point
Wait(30 + random(70));
if IsUpText(TreeName) then
begin
Mouse(TreePoint.x, TreePoint.y, 0, 0, True); //Click the point
Wait(4000 + random(1000));
AntiBan;
end else
wait(5000 + random(3000));
end;
until false;
end.

mightezezima

2008-09-10 14:44:17

oo cool works :)

Hack

2008-09-29 20:20:22

I couldn't get too work, so i read though it, looks like it'swell coded, I'm too lazy to fix it though, sorry. :)

TViYH

2008-09-29 21:01:44


// Use at your own risk, has NO ANTIRANDOMS... yet.
// Please tell me what can be improved etc on the forums.
// Power Woodcutter made by Orange. Thanks to
// Deathbyvirus for teaching me about arrays. :)
// This is the first version. It's a bit dodgey.
// Works best with lowest graphic settings and
// second lowest level of brightness.

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

var
x,y: Integer; //This program was designed to power
i: Integer; //woodcut ONE type of tree, specifically
item:integer; //oaks, but if you want to change what tree
OakColourTPA: TPointArray; //you cut then go to line 58
OakColourATPA: T2DPointArray;
OakPoint: TPoint;


const
OakColour = 3634023; // <-- Best to use your own Colour.


procedure DropLogs;
begin
for item:=2 to 28 do
dropitem(item);
end;


procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(80) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: SleepAndMoveMouse(1235+random(860));
6: MMouse(random(300), random(250), 10, 10);
7: begin
GameTab(1 + Random(12));
wait(1200+random(1000));
GameTab(4);
end;
end;
end;


begin
SetUpSRL;
repeat
FindColorsSpiralTolerance(MSCX, MSCY, OakColourTPA, OakColour, MSX1, MSY1, MSX2, MSY2, 2);
OakColourATPA := SplitTPAEx(OakColourTPA, 5, 5);
SortATPASize(OakColourATPA, True);
for i := 0 to High(OakColourATPA) do
begin
OakPoint := MiddleTPA(OakColourATPA[i]);
MMouse(OakPoint.x, OakPoint.y, 0, 0);
Wait(75 + Random(25));
if IsUpText('Oak') then
begin
if InvFull then DropLogs;
Mouse(OakPoint.x, OakPoint.y, 0, 0, True);
Wait(1250+ Random(125));
AntiBan;
Exit;
end else
Continue;
end;
until(False);
end.

that should work.

Andyz55

2008-10-06 16:12:18

Great script man! Seriously though its really advanced for your first script lol. Only thing i recommend is that you dont have it repete until(false) because that can be kind of risky and it would be nice to have it log out after x number of loads dropped or x amount of exp gained etc. Anyway, awesome script dude.

pray4bed

2008-10-08 20:15:03

mines not working…….

joelster134

2008-10-09 05:12:27

Do you mind explaining WHY it dosnt work for you…could be numerous reasons…check if you have latest SRL and latest Rev…also check if the script is SMART or not…if it is download that…you may also need Reflection…Great script for first one pwns mine by far :p

orange

2008-10-10 18:45:03

:o bit of a dig there, i'm no longer continuing this script by the way, i'm going to release a power miner soon, which will be my "second" first script, xD, seeing as this script was crap tbh :p

gl3nni

2008-10-10 21:30:37

You sure you didnt buy this script?

Awesome for a first time!

gl3nni

2008-10-10 21:32:20

From: pray4bed
mines not working…….



First time poster, you should go to tutorial's section and look for some clues :P

in2it

2008-10-13 03:36:01

Nice features very good for a beginer scripter

joelster134

2008-10-13 03:44:33

Ill have a look at it abit later and post feedback :)


Added in Anti-Randoms+my Anti Ban…also added in Player setups :)

Ok i fixed up a bit…tired atm..might add some more later…nice try for first script! :)

also fix standards there will be a few guides for it some where :p


// Use at your own risk, has NO ANTIRANDOMS... yet.
// Please tell me what can be improved etc on the forums.
// Power Woodcutter made by Orange. Thanks to
// Deathbyvirus for teaching me about arrays. :)
// This is the first version. It's a bit dodgey.
// Works best with lowest graphic settings and
// second lowest level of brightness.

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

var
x,y: Integer; //This program was designed to power
i: Integer; //woodcut ONE type of tree, specifically
item:integer; //oaks, but if you want to change what tree
OakColourTPA: TPointArray; //you cut then go to line 58


const
OakColour = 3634023; // <-- Best to use your own Colour.


procedure DeclarePlayers;
begin
HowManyPlayers := 1; //how many players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //current player

Players[0].Name := ''; //username!
Players[0].Pass := ''; //password
Players[0].Nick := 'equ'; //Nick (3-4 letters of ur name
Players[0].Active := True; //is the player active?

{Players[1].Name := 'Username'; //username!
Players[1].Pass := 'password'; //password
Players[1].Nick := ''; //Nick (3-4 letters of ur name
Players[1].Active := True; //is the player active?

Players[2].Name := 'Username'; //username!
Players[2].Pass := 'password'; //password
Players[2].Nick := ''; //Nick (3-4 letters of ur name
Players[2].Active := True; //is the player active? }

end;

procedure PreparePlayer;
begin
if not LoggedIn then LoginPlayer;
SetRun(True);
end;

procedure DropLogs;
begin
for item:=2 to 28 do
dropitem(item);
end;



//~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//Anti-ban and randoms //

procedure AntiRandoms;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
end;


procedure AntiBan;
begin
if not LoggedIn then Exit;
case (Random(30)) of
1: RandomRClick;
5: HoverSkill('Woodcutting', False);
5: HoverSkill('Smithing', False);
11: RandomMovement;
15: BoredHuman;
21: DoEmote(400 +Random(90));
24: PickUpMouse;
27: begin
Gametab(1 + Random(12));
Wait(3000 + Random(2000));
Gametab(4);
end;
30: SleepAndMoveMouse(3600);
end;
end;

begin
SetUpSRL;
repeat
FindColorsTolerance(OakColourTPA, OakColour, MSx1, MSy1, MSx2, MSy2, 2);
for i := 0 to High(OakColourTPA) do begin
MMouse (OakColourTPA[i].X, OakColourTPA[i].Y, 3, 3);
wait(30 + random(70));
if IsUpText('Oak') then begin //<Change pink text to tree you desire.
GetMousePos(x, y); //^Eg, 'Tree' Must be shown as is
Mouse(x, y, 3, 3, true); //^in-game, with a capital letter.
wait(4000 + random(1000)); //^If you don't care what tree you cut
AntiBan; //^then put in 'Down' which will cut
AntiRandoms;
if InvFull then DropLogs //^down all trees.
end
else
wait(5000 + random(3000));
end;
until false;

end.

joelster134

2008-10-25 04:28:12

From: Zixi
Nice;)




Not needed post please say WHY it was nice…etc..

orange

2008-10-25 07:52:21

I have, can you let this thread die please? It's well old, and i'm not such a poor scripter :S