SRL Archive - RS3 Outdated / Broken Scripts

Simple PowerCutter


NinjaTerrorist

2007-01-28 00:02:44

Simple PowerCutter v0.2a

This is my third script so far and I am still learning but I made this and worked quite well for me and hope it does for you. It will cut a full inventory of logs and drop them for how many loads you have set, you must set the tree color and name but remember so far this only cuts f2p trees as I am not a member.

[LEFT] Instructions:
  • Setup lines : 37- 41.
  • Declare players in DeclarePlayers;.
  • Set RuneScape window.
  • Start anywhere near trees.
Features:
  • Antiban.
  • SRL antirandoms.
  • If no tree is found the script will goto the nearest tree symbol. - Removed
  • Progress report. - Removed
Known bugs:
  • The antirandoms and antiban are used too much and the script lags. - Fixed
  • Sometimes only does 5 loads. - Fixed
  • No multiplayer support. ( Will add once I know how. xD) - Nearly did, got riddled with Access Violation errors. -.-
  • The DropAllLogs dosen't work sometimes but is generally ok. - Fixed
  • The antiban is used too much.. - Fixed
So yeah there it is, please post comments or progress reports this is only an earlier version and i am going to try to improve as much so it can work overnight easily. Long way yet… :eek:

V0.12 Changelog:

Removed all uneccisary things to make the script and bit tidier and faster and I have see the list above for the things removed. I removed the Option('Chop'); for the good ol' Mouse(x, y, 1, 1, True), works a hundred time better and as for the multiplayer support I tried but all the access errors stopped me so il get on doing that soon. This was working flawlessly for me earlier and the SRL axehead finding works great so you should have no problems.

Enjoy. ;)


[/LEFT]


For those who can't be arsed to download:


{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}
{// \\}
{// Simple PowerCutter v0.3b \\}
{// \\}
{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}
{// \\}
{// # ScriptName = Simple PowerCutter \\}
{// # Author = NinjaTerrorist \\}
{// # Description = Simple powercutter for all f2p trees. \\}
{// # Version = v0.3b \\}
{// # Date = January 29, 2007 \\}
{// # Comments = Start where trees are. \\}
{// # Contact = [email]NinjaTerrorist@Gmail.com[/email] \\}
{// \\}
{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}
{// Script by NinjaTerrorist, like it and/or use it? Please leave \\}
{// a comment on my thread. \\}
{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

program SimplePowerCutter;

{.include SRL/SRL.scar}
{.include SRL/SRL/SKILL/Woodcutting.scar}

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

var
Choped, Tol, Responded : Integer;
Loads, Loggs : Integer;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

const
TreeColor = 3696736; { - Ctrl+P to pick the color. - }
TreeName = 'Tree'; { - e.g Willow must be a string. - }
UsingAxe = False; { - Is your axe equiped? - }
Load = 100; { - Loads todo. Each player. - }
LogOutT = 5; { - Minutes to stay logged out for. - }
PanicKey = 12; { - 1 = F1, 2 = F2 ect. - }

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure DeclarePlayers;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
HowManyPlayers := 2;
CurrentPlayer:= 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;

Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;

{Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := True;

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := True;}
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure Setup;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
if(not(LoggedIn))then
begin
LoginPlayer;
Loggs := Logs+1;
WriteLn('Logged player in.');
end;
if(LoggedIn)then
begin
SetupSRL;
ActivateClient;
MakeCompass('N');
HighestAngle;
FixChat;
Status('Script started at: '+(TheTime));
FindAxeHeadColor;
Tol := 11;
end;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

function FindRetard : Boolean;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
if(InChatMulti('free stuff', 'noob', 'wanna be my gf?'))then
begin
Status('Found retard!');
Result := True;
end
else
Result := False;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure AutoRespond;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

var
TalkBack : array [1..5] of string;

begin

OldLine := TheLine;
TheName := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TheLine := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
NewLine := TheLine;

if(OldLine <> NewLine)then
begin
Exit;
end

if(pos('yo', TheName)<>0)or(pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
begin
end

else

begin
repeat

if(InChatMulti('lol', 'lmao', 'rofl'))then
begin
TalkBack[1] := 'lol';
TalkBack[2] := 'lolz';
TalkBack[3] := 'lmao';
TalkBack[4] := 'rofl';
TalkBack[5] := 'rofl!!';
Status('Responding to chat message.');
TypeSend(TalkBack[1+Random(5)]);
Responded := Responded+1;
end;

if(InChatMulti('hi', 'hey', 'sup'))then
begin
TalkBack[1] := 'hi';
TalkBack[2] := 'hey';
TalkBack[3] := 'sup';
TalkBack[4] := 'wassup?';
TalkBack[5] := 'who are you?';
Status('Responding to chat message.');
TypeSend(TalkBack[1+Random(5)]);
Responded := Responded+1;
end;

if(InChatMulti('wc lvl', 'wc lvl?', 'woodcutting lvls?'))then
begin
TalkBack[1] := IntToStr(GetSkillLevel('Woodcutting'));
Status('Responding to chat message.');
TypeSend(TalkBack[1]);
Responded := Responded+1;
end;

if(FindRetard)then
begin
TalkBack[1] := 'please leave..';
TalkBack[2] := 'no now go away';
TalkBack[3] := 'why won''t you die?';
TalkBack[4] := 'no thanks';
TalkBack[5] := '....';
Status('Responding to chat message.');
TypeSend(TalkBack[1+Random(5)]);
Responded := Responded+1;
end;

if(not(LoggedIn))then
Break;
until(false);
end;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure AntiStuff;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
FindNormalRandoms;
FindHead;
FindEnt(TreeColor);
AntiBan;
AutoRespond;
if(FindFight)then
begin
RunAwayDirection('N');
Wait(4000+Random(2000));
RunBack;
end;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure DropTheLogs;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
if(UsingAxe)
then
begin
DropAll;
end
else
begin
DropToPosition(2, 28);
end;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure ChopTree;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin

if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
MMouse(x,y,2,2);
Wait(200+Random(300));
end; // The Scar Noob
if(IsUpTextMulti('Cho', 'op dow', 'p down'))then // helped me with
begin // UpTextMulti :)
Mouse(x, y, 1, 1, True);
AntiStuff; // Madmoon helped me fix this.. :)
Choped := Choped+1;
Wait(2000+Random(2000));
end;

if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
begin
repeat
if(not(LoggedIn))then
begin
Break;
end;
LowestAngle;
AntiStuff;
Wait(2000+Random(3000));
Status('Tree not found, increasing tolerance.');
Tol := Tol+2;
until(FindObj(x, y, TreeName, TreeColor, Tol))or
(Tol > 25)
end;

if(Tol > 25)then
begin
Status('Maximum tolerance reached.. check your colors.');
NextPlayer(False);
end;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure Report;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
ClearDebug;
WriteLn(' --------------------------------');
WriteLn(' Simple PowerChopper v0.12a ');
WriteLn(' --------------------------------');
WriteLn(' Logged in: '+IntToStr(Loggs)+' times.');
WriteLn(' Droped: '+IntToStr(Loads)+' loads.');
WriteLn(' Choped: '+IntToStr(Choped)+' logs.');
WriteLn(' Player: '+Players[CurrentPlayer].Name);
WriteLn(' ---------------------------------');
SRLRandomsReport;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure MainLoop;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
repeat
ChopTree;
if(not(LoggedIn))then
begin
Break;
end;
until(InvFull)
DropTheLogs;
Loads := Loads+1;
Report;
if(LoggedIn)
and(Loads > Load)then
begin
LogOut;
Wait(LogOutT*60000);
NextPlayer(True);
end;
if(not(LoggedIn))
or(FindDead)
or(InBlack)then
begin
NextPlayer(False);
end
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin
DeclarePlayers;
Setup;
repeat
MainLoop;
until(IsFKeyDown(PanicKey))
WriteLn('Panic key pressed ending script..');
WriteLn('Script ended at: '+TheTime);
end.

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

Bramble

2007-01-28 00:24:36

suggestion for making ur antirandoms and antiban not lag u so much, use waits or sleeps inside of the function

edit:: and for the drop all logs, id make a dtm for each type of log, and search inventory for all of the dtms it contains and drop them using right click, then left click option

Ejjman

2007-01-28 00:40:59

* The antirandoms and antiban are used too much and the script lags.
* Sometimes only does 5 loads.
* No multiplayer support. ( Will add once I know how. xD)
* The DropAllLogs dosen't work sometimes but is generally ok.
* The antiban is used too much..


So lets see here.

1. I don't see how it can lag too much, you don't have that many stuff…
2. Wierd, maybe they set the Load thing wrong…
3. Look at Wizzup?'s tutorial on it in the tutorial section. Its very simple once you know how ;)
4. Um..Try this
procedure DropMyLogs;
begin
if(UsingAxe)then DropToPosition(1, 28); //Drops from 1-28 slot
if(not(UsingAxe))then DropToPosition(2, 28); //Drops from 2-28 slot
end;
Make sure you tell people to put the axe in the first inventory slot though.
5. I still don't see this. I don't know how to do the responder, so I'm actually learning from your script :D


All in all, there's lots of failsafes you need to do, but I don't want to tell you too much. Test it, and think of problems on how this could mess up. Awesome, peace.

the scar noob

2007-01-28 08:08:06

the only thing i can add is instead of using PopUp('Chop'); you can use IsUpText or IsUpTextMulti :)

NinjaTerrorist

2007-01-28 12:09:36

I tried using IsUpText before and I couldn't get it to work for some reason id use something like this and it wouldn't click the option:

[LEFT]

if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
Mouse(x, y, 1, 1, False);
IsUpText('Chop');
end;

EDIT: I just released V.012 much better. ;]
[/LEFT]

john smith

2007-01-28 17:56:10

im gonna use this and learn from it and hopefully make my own scripts based on it

NinjaTerrorist

2007-01-28 19:00:47

From: john smith
im gonna use this and learn from it and hopefully make my own scripts based on it


Thanks, hope you learn alot from this. ;)

smithspsbob

2007-01-28 19:46:48

Trying it now Hope that the Ent wont get me.

NinjaTerrorist

2007-01-28 19:47:47

From: smithspsbob
Trying it now Hope that the Ent wont get me.


Thanks, tell me how you got on with it. :)

the scar noob

2007-01-29 00:55:27

From: NinjaTerrorist
I tried using IsUpText before and I couldn't get it to work for some reason id use something like this and it wouldn't click the option:

[LEFT]

if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
Mouse(x, y, 1, 1, False);
IsUpText('Chop');
end;

EDIT: I just released V.012 much better. ;]
[/LEFT]


Well you don't command the script to actually click it…
This is the chop procedure from my powercutter(learn from it, not just going to say it, let's find ou:p)

procedure Chop;
begin
repeat
if (FindColorSpiralTolerance(x,y,Treecolor1,MSX1,MSY1,MSX2,MSY2,10)) or
(FindColorSpiralTolerance(x,y,Treecolor2,MSX1,MSY1,MSX2,MSY2,10)) or
(FindColorSpiralTolerance(x,y,Treecolor3,MSX1,MSY1,MSX2,MSY2,10)) then
MMouse(x,y,2,2)
If(IsUpTextMulti('Cho','down','p do')) Then
Mouse(x,y,5,5,True);
wait(Timetowait*1000+random(1500));
FindTheEnt;
until(InvFull);
end;

madmoon

2007-01-29 03:42:48

Nice script, and clean too… (I'm and indentation freak ;))

I had a look and found 1 problem. The FindEnt function is supposed to be called, before you click the tree, but while your mouse is on the tree (when the uptext is 'Chop down').

A simple fix for this, Change:

        if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
Mouse(x, y, 1, 1, True);
Choped := Choped+1;
Wait(2000+Random(2000));
AntiStuff;
end;
To:
        if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
Mouse(x, y, 1, 1, True);
AntiStuff;
Choped := Choped+1;
Wait(2000+Random(2000));
end;

NinjaTerrorist

2007-01-29 13:03:18

Thanks guys, i added your suggestions to my new chop procedure:


{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure ChopTree;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin

if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
MMouse(x,y,2,2);
Wait(200+Random(300));
end; // The Scar Noob
if(IsUpTextMulti('Cho', 'op dow', 'p down'))then // helped me with
begin // UpTextMulti :)
Mouse(x, y, 1, 1, True);
AntiStuff; // Madmoon helped me fix this.. :)
Choped := Choped+1;
Wait(2000+Random(2000));
end;

if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
begin
repeat
if(not(LoggedIn))then
begin
Break;
end;
LowestAngle;
AntiStuff;
Wait(2000+Random(3000));
Status('Tree not found, increasing tolerance.');
Tol := Tol+2;
until(FindObj(x, y, TreeName, TreeColor, Tol))or
(Tol > 25)
end;

if(Tol > 25)then
begin
Status('Maximum tolerance reached.. check your colors.');
NextPlayer(False);
end;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\

the scar noob

2007-01-29 14:56:31

Well this is a lot of better now, and thanks for the credits :)

NinjaTerrorist

2007-01-29 15:04:56

Np, just to make sure I know what IsUpText is, it searches for the text on the top left corner?

EDIT:


if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
Mouse(x, y, 1, 1, True);
AntiStuff;
Choped := Choped+1;
Wait(2000+Random(2000));
end;

Really lags the player after they chop the tree. :/

the scar noob

2007-01-29 16:16:15

yes that's true :)
also IsUpTextMulti, that searches for the tect at the left up corner 2 but then multi (3 strings)

NinjaTerrorist

2007-01-29 16:36:28

But i thought FindObj does that anyway?

madmoon

2007-01-29 16:46:22

From: NinjaTerrorist
Thanks guys, i added your suggestions to my new chop procedure:


{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

procedure ChopTree;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

begin

if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
MMouse(x,y,2,2);
Wait(200+Random(300));
end; // The Scar Noob
if(IsUpTextMulti('Cho', 'op dow', 'p down'))then // helped me with
begin // UpTextMulti :)
Mouse(x, y, 1, 1, True);
AntiStuff; // Madmoon helped me fix this.. :)
Choped := Choped+1;
Wait(2000+Random(2000));
end;

if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
begin
repeat
if(not(LoggedIn))then
begin
Break;
end;
LowestAngle;
AntiStuff;
Wait(2000+Random(3000));
Status('Tree not found, increasing tolerance.');
Tol := Tol+2;
until(FindObj(x, y, TreeName, TreeColor, Tol))or
(Tol > 25)
end;

if(Tol > 25)then
begin
Status('Maximum tolerance reached.. check your colors.');
NextPlayer(False);
end;
end;

{//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\


Ahh crap, sorry man, stupid mistake by me. Since find ent needs to be called before clicking, AntiStuff; should be before Mouse(x, y, 1, 1, True);.

I will be testing this script this afternoon, it' looks alot more reliable now :) Good work.

NinjaTerrorist

2007-01-29 19:39:59

From: madmoon
Ahh crap, sorry man, stupid mistake by me. Since find ent needs to be called before clicking, AntiStuff; should be before Mouse(x, y, 1, 1, True);.

I will be testing this script this afternoon, it' looks alot more reliable now :) Good work.


Thanks, tell me how you get on with it and also i find putting the Anti Randoms before clicking make the script lag's like hell but your right it should go there, any ideas how to reduce script lag?

smithspsbob

2007-01-30 20:36:54

It worked pretty good.:spot: But somtimes i found my self in Lummy or teled away…:confused:
But i just think the trees were in the way.:duh: :duh: :duh:

[BANANA]But, other wise it works great![/BANANA]


P.S. i need to try the 3rd one.

NinjaTerrorist

2007-01-30 23:44:48

This is v3 just a bit fixed up and better:


{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}
{/ \}
{/ Simple PowerCutter v0.3b \}
{/ \}
{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}
{/ \}
{/ # ScriptName = Simple PowerCutter \}
{/ # Author = NinjaTerrorist \}
{/ # Description = Simple powercutter for all f2p trees. \}
{/ # Version = v0.3b \}
{/ # Date = January 29, 2007 \}
{/ # Comments = Start where trees are. \}
{/ # Contact = [email]NinjaTerrorist@Gmail.com[/email] \}
{/ \}
{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}
{/ Script by NinjaTerrorist, like it and/or use it? Please leave \}
{/ a comment on my thread. \}
{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

program SimplePowerCutter;

{.include SRL/SRL.scar}
{.include SRL/SRL/SKILL/Woodcutting.scar}

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

var
Choped, Tol, Responded : Integer;
Loads, Loggs : Integer;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

const
TreeColor = 3553336; { - Ctrl+P to pick the color. - }
TreeName = 'Tree'; { - e.g Willow must be a string. - }
UsingAxe = False; { - Is your axe equiped? - }
Load = 100; { - Loads todo. Each player. - }
LogOutT = 5; { - Minutes to stay logged out for. - }
PanicKey = 12; { - 1 = F1, 2 = F2 ect. - }

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;

{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;

Players[2].Name := ''; // Remove comments if you are
Players[2].Pass := ''; // using more than one player.
Players[2].Nick := '';
Players[2].Active := True;

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := True;}
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure CheckName;
begin
if(TreeName = '')then
begin
WriteLn('Invalid tree name..');
TerminateScript;
end;
if(TreeColor = )then
begin
WriteLn('Invalid tree color..');
TerminateScript;
end;
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure Setup;
begin
if(not(LoggedIn))then
begin
LoginPlayer;
Loggs := Loggs+1;
WriteLn('Logged player in.');
end;
if(LoggedIn)then
begin
SetupSRL;
ActivateClient;
MakeCompass('N');
HighestAngle;
FixChat;
WriteLn('Script started at: '+(TheTime));
FindAxeHeadColor;
Tol := 11;
Loads := 0;
end;
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure AutoRespond;

var
TalkBack : array [1..5] of string;

begin

OldLine := TheLine;
TheName := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TheLine := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
NewLine := TheLine;

if(OldLine <> NewLine)then
begin
Exit;
end

if(pos('yo', TheName)<>0)or(pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
begin
end

else

begin
repeat

if(InChatMulti('lol', 'lmao', 'rofl'))then
begin
TalkBack[1] := 'lol';
TalkBack[2] := 'lolz';
TalkBack[3] := 'lmao';
TalkBack[4] := 'rofl';
TalkBack[5] := 'rofl!!';
WriteLn('Responding to chat message.');
TypeSend(TalkBack[1+Random(5)]);
Responded := Responded+1;
end;

if(InChatMulti('hi', 'hey', 'sup'))then
begin
TalkBack[1] := 'hi';
TalkBack[2] := 'hey';
TalkBack[3] := 'sup';
TalkBack[4] := 'wassup?';
TalkBack[5] := 'who are you?';
WriteLn('Responding to chat message.');
TypeSend(TalkBack[1+Random(5)]);
Responded := Responded+1;
end;

if(InChatMulti('wc lvl', 'wc lvl?', 'woodcutting lvls?'))then
begin
TalkBack[1] := IntToStr(GetSkillLevel('Woodcutting'));
WriteLn('Responding to chat message.');
TypeSend(TalkBack[1]);
Responded := Responded+1;
end;

if(InChatMulti('****', '***', '**** you'))then
begin
TalkBack[1] := 'dont swear its naughty';
TalkBack[2] := 'didnt you mother teach you manners?';
WriteLn('Responding to chat message.');
TypeSend(TalkBack[1+Random(3)]);
Responded := Responded+1;
end;

if(not(LoggedIn))then
Break;
until(false);
end;
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure AntiStuff;
begin
FindNormalRandoms;
FindHead;
FindEnt(TreeColor);
AutoRespond;
if(FindFight)then
begin
RunAwayDirection('N');
Wait(4000+Random(2000));
RunBack;
end;
end;
{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure DropTheLogs;
begin
if(UsingAxe)
then
begin
DropAll;
end
else
begin
DropToPosition(2, 28);
end;
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure RandomizeClick;
begin
case Random(2) of
0 : PopUp2(x, y, 1, 1, 'Chop');
1 : Mouse(x, y, 1, 1, True);
end;
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure ChopTree;
begin

if(FindObj(x, y, TreeName, TreeColor, Tol))then
begin
MMouse(x, y, 2, 2);
Wait(200+Random(300));
end;
if(IsUpTextMulti('Cho', 'op dow', 'p down'))then
begin
RandomizeClick;
Choped := Choped+1;
Wait(3000+Random(3000));
end;

if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
begin
repeat
if(not(LoggedIn))then
begin
Break;
end;
LowestAngle;
Wait(2000+Random(3000));
WriteLn('Tree not found, increasing tolerance.');
Tol := Tol+2;
until(FindObj(x, y, TreeName, TreeColor, Tol))or
(Tol > 25)
end;

if(Tol > 25)then
begin
WriteLn('Maximum tolerance reached.. check your colors.');
NextPlayer(False);
Loggs := Logs+1;
end;
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure Report;

begin
WriteLn('');
WriteLn(' --------------------------------');
WriteLn(' Simple PowerChopper v0.12a ');
WriteLn(' --------------------------------');
WriteLn(' Logged in: '+IntToStr(Loggs)+' times.');
WriteLn(' Droped: '+IntToStr(Loads)+' loads.');
WriteLn(' Choped: '+IntToStr(Choped)+' logs.');
WriteLn(' Player: '+Players[CurrentPlayer].Name);
WriteLn(' ---------------------------------');
WriteLn('');
SRLRandomsReport;
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

procedure MainLoop;

begin
repeat
AntiStuff;
ChopTree;
if(not(LoggedIn))then
begin
Break;
end;
until(InvFull)
DropTheLogs;
Loads := Loads+1;
Report;
if(LoggedIn)
and(Loads > Load)then
begin
LogOut;
Wait(LogOutT*60000);
NextPlayer(True);
Loggs := Logs+1;
end;
if(not(LoggedIn))
or(FindDead)
or(InBlack)then
begin
NextPlayer(False);
Loggs := Logs+1;
end
end;

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

begin
DeclarePlayers;
Setup;
repeat
MainLoop;
until(IsFKeyDown(PanicKey))
WriteLn('Panic key pressed ending script..');
WriteLn('Script ended at: '+TheTime);
end.

{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

madmoon

2007-01-31 00:52:01

One of the reasons of lag would be re-calling this,
if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then

Would it be easier and less lag if you did this:

    if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
begin
repeat
if(not(LoggedIn))then
begin
Break;
end;
LowestAngle;
Wait(2000+Random(3000));
WriteLn('Tree not found, increasing tolerance.');
Tol := Tol+2;
until(FindObj(x, y, TreeName, TreeColor, Tol))or
(Tol > 25)
end else
begin
MMouse(x, y, 2, 2);
Wait(200+Random(300));
end;

NinjaTerrorist

2007-01-31 12:10:15

From: madmoon
One of the reasons of lag would be re-calling this,
if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then

Would it be easier and less lag if you did this:

    if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
begin
repeat
if(not(LoggedIn))then
begin
Break;
end;
LowestAngle;
Wait(2000+Random(3000));
WriteLn('Tree not found, increasing tolerance.');
Tol := Tol+2;
until(FindObj(x, y, TreeName, TreeColor, Tol))or
(Tol > 25)
end else
begin
MMouse(x, y, 2, 2);
Wait(200+Random(300));
end;


Thanks I fixed the lag problem already but adding this might make the script more efficient , the problem with the lag I fixed by adding the AntiStuff; before ChopTree; in the mainloop:


procedure MainLoop;

begin
repeat
[B]AntiStuff;[/B]
ChopTree;
if(not(LoggedIn))then
begin
Break;
end;
until(InvFull)
DropTheLogs;
Loads := Loads+1;
Report;
if(LoggedIn)
and(Loads > Load)then
begin
LogOut;
Wait(LogOutT*60000);
NextPlayer(True);
Loggs := Logs+1;
end;
if(not(LoggedIn))
or(FindDead)
or(InBlack)then
begin
NextPlayer(False);
Loggs := Logs+1;
end
end;

Fourscape

2007-01-31 18:25:37

Just put Wait(10) between your antirandoms… easy…

NinjaTerrorist

2007-02-01 12:14:27

From: fourscape
Just put Wait(10) between your antirandoms… easy…


That works too. :)

smithspsbob

2007-02-01 20:49:39

Well… Version 3 didn't work that well for me. I came to the computer once and…well…it was like
Imao, Lol, rofl, ect.
for like forever, non-stop until it could shut it off.