SRL Archive - First Scripts

Troll's Yew PowerChoppper


Vinyl Scratch

2012-02-02 23:27:22

-So, I'm working on a new Script, and i compile it, and get this error -

Here's the [Updated] code(no Leechers, It Isn't finished.):
program Trolls_PowerChopper;
//{$DEFINE SMART}

//{$IFDEF SMART}
// {$i SRL/SRL/Misc/Smart.simba}
//{$ENDIF}
{$i SRL/SRL.simba}
//{$i SRL/SRL/Misc/Paintsmart.simba}

const
SRLStats_Username = ''; //SRL Stats User
SRLStats_Pass = ''; //SRL Stats Pass
BreakEvery = '45'; //Break Every Log, Or Never.
BreakFor = '7'; //Break For How long, Now?
Version = '1.0'; // Don't Touch. You'll Break.
NumbOfPlayers = 1; //Number of Players That You Will Be using.
StartPlayer = 0; //Start Which Player?

procedure DeclarePlayers;
var i: Integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Active := True;
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
var
X, Y, TreesChopped: integer;
StartingXP: integer;
//Anything after this point DON'T TOUCH!
//............................................................................\\

procedure StatsGuise(Stats:String);
begin
Status(stats);
Disguise(stats);
end;

function CheckAndClick(UpText, Option:string; X,Y:Integer; RClick:Boolean) :Boolean;
begin
MMouse (x, y, 5, 5);
if WaitUpText(UpText, 2300+random(400)) then
begin
Result:=True;
GetMousePos(x, y);
if RClick then
begin
Mouse(X, Y, 0, 0, False);
Result:= WaitOption (Option, 2000);
if Result then FFlag(0);
end else
begin
Mouse(x, y, 0, 0,True);
wait(230+random(70));
FFlag(0);
end;
end;
end;

procedure AntiBan;
begin
case Random(250) of
0: begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill ('Woodcutting', false) GameTab(28); end;
1: begin StatsGuise('AntiBan') SleepAndMoveMouse (9000+random(600)); end;
2: begin StatsGuise('AntiBan') GameTab(tab_inv) ExamineInv; GameTab(28); end;
3: begin StatsGuise('AntiBan') RandomAngle(1); end;
end;
end;

Procedure ProgressReport;
var Exp: integer;
begin
Exp := (GetXPBarTotal - StartingXP);
writeLn('================================');
writeLn('=======Trolls PowerChopper======');
writeLn('=======Time Running: ' + TimeRunning);
writeLn('=======Logs: ' + IntToStr(TreesChopped));
writeLn('=======Exp: ' + IntToStr(EXP));
writeLn('================================');
end;

procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
ProgressReport;
TerminateScript;
end;

Procedure Chop;
var X, Y, PlusOne, TreeCounter: Integer;
begin
//if FindObjCustom(x, y, ['Chop', 'Down'], [4937570, 4344918], 5) Then
X:=MSCX
Y:=MSCY
if FindObjTPA(X, Y, 4937570, 15, 1, 20, 60, 600, ['Chop']) then
begin
StatsGuise('Tree! Cutting.....')
GetMousePos(X, Y);

case Random(2) of
0: Mouse(X, Y, 5, 5, True);
1: begin
Mouse(X, Y, 5, 5, False);
WaitOption('Chop', 250);
end;
end;

Flag;

repeat
Marktime(TreeCounter);
AntiBan;
wait(100);
if InvCount=PlusOne then
WriteLn ('Got That Tree!');
until (InvCount=PlusOne) or (TimeFromMark(TreeCounter) > 15000)
end;
end;

procedure Drop;
var
X, Y, LogDTM, I:Integer;
SlotBox: TBox;
LogPattern:TIntegerArray;

begin
LogDTM := DTMFromString('m1gAAAHic42JgYEhnZmCIguIkIM4G4kIgLgXiVCAuAOIcIA5nBMoDcRgQBwCxLxAHAnEcECcDcQIQJwKxmzEX0FQmIjBxgJFIjAAAi5QIYA==');
LogPattern := 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28

for I:=0 to 27 do

SlotBox:=InvBox(LogPattern[I]);
if FindDTM(LogDTM, x, y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) then
begin
MouseItem(LogPattern[I], false);


end;



begin
DeclarePlayers;
SetupSRL;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);
TreesChopped := 0;
repeat
Chop;
Drop;
until(false);
end.

Drax

2012-02-03 01:05:32

Here you go bro a compiling version.

I haven't tested it but i filled in some gaps for you.

Vinyl Scratch

2012-02-03 17:37:40

Ok, Thanks. I see what I was forgetting. It was the "Players.[0] := '';"
It works, but I need to get it to click. Forgot how to do that, I'll go look at a tutorial, thanks for your help,

Troll

Rezozo

2012-02-03 18:18:11

Yew Power chopper…?
Y would you powerchop yews, so much money in them, and they are all near banks.

Vinyl Scratch

2012-02-03 23:29:59

There isn't as much as maples, if you have a good level. But I updated, So it should look, and work WAY better. :D If you want a tutorial, I could try to post one.

–^
For the above post, it's my FIRST SCRIPT! I want to see you trying to do this. If you see this, post a code that you did yourself. I'll know if you did it yourself.

farmer jack

2012-02-04 03:50:56

From: xXTrollXx
There isn't as much as maples, if you have a good level. But I updated, So it should look, and work WAY better. :D If you want a tutorial, I could try to post one.

–^
For the above post, it's my FIRST SCRIPT! I want to see you trying to do this. If you see this, post a code that you did yourself. I'll know if you did it yourself.


Hes right ya know :p have a go at a maple powerchopper maybe

trials6112

2012-02-04 04:37:44

i might take on the idea about the powerchopper, the maple one. i might do one i know where i am going to do it to :P

farmer jack

2012-02-04 05:16:47

* cough cough * resource dungeoner * cough cough * good idea hehe

Rezozo

2012-02-04 10:27:13

From: farmer jack
* cough cough * resource dungeoner * cough cough * good idea hehe


Lol, true that.

Resource dungeon in deighmonheim (spelling?) has a huge collection (i think 32?) of maple and willow trees!
If anyone were to make one, and go to the link on my discription, and maybe post…

Well bye!

Vinyl Scratch

2012-02-04 13:24:33

I'll look into that Resource dungeon, I'll definitely let you test. as for the maple powerchopper, I'll get to work on it right now.