SRL Archive - First Scripts

PowerzChopper v1.0


Powerz

2007-12-31 07:39:11

Hello, this is the first script i've ever made.
It's called PowerzChopper.

NEW: Update 1.5!

Some details;
- Cuts all trees you like; just fill in which tree you want too cut. (It drops the logs when full inventory).
- Anti-Random!
- Anti-Ban!
- Auto-Responder!
- EntFinder!


Post Proggies, help etc. pls ^^.

If you are too lazy too download it and test it and just wanna have a look at the script;




{
Instructions:
1. Make sure SRL you use SRL rev 7 and SCAR 3.12.
2. Set AxeEquipped True or False.
3. Fill in your SRL information.
4. Fill in your Login information.
5. Press "run" and have fun!
*NOTE*: Make sure u position your character at the trees u wanna cut.
U have too fill in the tree color with the colors i set in the list under here! or else it won't work!!
PowerzChopper doesn't bank logs, but it drops then when the inventory is full.
}


program PowerzChopper; //My first script, can cut every non-member tree.
{.include SRL/SRL.scar}


const
YourSRLId = ''; //your SRL Id!
YourSRLPassword = ''; //Your SRL Password

{- Fill in the player information! -}

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Set this the amount of players u want too use.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;

Players[0].Name := 'Username'; //Fill in your Username here.
Players[0].Pass := 'Password'; //Fill in your Password here.
Players[0].Nick := 'Nickname'; //Fill in a nickname here (3/4 letters(This is necassary for Anti-Random/Anti-Ban!))
Players[0].Active := True; //set false if you want player not to be ran in script.
Players[0].Strings[1] := ''; //insert which tree u want too cut: tree, oak, willow, yew.(Use LOWERCASE letters!)
{
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := False;
Players[1].Strings[1] := '';

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := False;
Players[2].Strings[1] := '';

Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := False;
Players[3].Strings[1] := '';

Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := '';
Players[4].Active := False;
Players[4].Strings[1] := '';
}

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;

{- Fill in the information! -}
const
LoadsToBlow = 1; //amounts of loads per player before switching.
TreeColor = 2122071; //Don't change this!
OakColor = 2124898; //Don't Change this!
WillowColor = 3696222; //Don't Change this!
YewColor = 347201; //Don't change this!
AxeEquipped = True; //Set true if axe is equipped, and false if Axe is in inventory.
WaitPerTree = 5000; //the time to wait while we are chopping the tree in MS.
AutoRespond = True; //If u want the script too auto-respond too players.

{- No need too change anything below this line! -}

Procedure SetUp;
Begin
SetupSRL;
ClearDebug;
ActivateClient;
DeclarePlayers;
if Loggedin then Logout;
LoginPlayer;
end;


{- AntiBan! -}
procedure AntiBan;
begin
case random(50) of //do a random number so it won't always perform the antiban
0: RandomRClick;
1: BoredHuman;
2: HoverSkill('Woodcutting', False);
3: AlmostLogout;
4: PickUpMouse;
5: RandomMovement;
end;
end;

{- AntiRandom! -}
procedure AntiRandom;
begin
FTWait(4);
FindNormalRandoms;
if FindFight then
begin
RunTo('E', False);
Wait(5000 + random(3000));
Runback;
end;
end;

{- AutoResponce! -}
function AutoResponce:Boolean;
var Responce, Lvl : String;
Reply, Responds : Integer;
begin
if AutoRespond then
if FindBlackChatMessage(Players[CurrentPlayer].Name) then Exit;
if (InChat(Players[CurrentPlayer].Name)) then
begin
Reply := Random(10);
case Reply of
0: Responce := ('Yea?');
1: Responce := ('What?');
2: Responce := ('Yo');
3: Responce := ('wassup');
4: Responce := ('wut');
5: Responce := ('Ya?');
6: Responce := ('Hello');
7: Responce := ('Hi');
8: Responce := ('uhu?');
9: Responce := ('Hii');
end;
TypeSend(Responce);
Result := True;
Responds := Responds + 1;
end;

if (InChatMulti('lol', 'lawl', 'haha')) or
(InChatMulti('haha', 'rofl', 'lmfao')) or
(InChatMulti('lmoa', 'funny', 'hehe')) then
begin
Reply := Random(10);
case Reply of
0: Responce := ('lol');
1: Responce := ('rofl');
2: Responce := ('lawl');
3: Responce := ('lmao');
4: Responce := ('lmfao');
5: Responce := ('haha');
6: Responce := ('hahaha');
7: Responce := ('hehe');
8: Responce := ('omg lol');
9: Responce := ('roflcoaster');
end;
TypeSend(Responce);
Result := True;
Responds := Responds + 1;
end;

if (InChatMulti('str', 'strength', 'str')) then
begin
Lvl := IntToStr(GetSkillLevel('strength'));
Reply:= Random(5);
case Reply of
0, 2, 4: Responce := (Lvl);
1: Responce := ('My str lvl is '+ Lvl);
3: Responce := (Lvl +' is my str lvl');
end;
TypeSend(Responce);
Result := True;
Responds := Responds + 1;
end;

if (InChatMulti('att', 'attack', 'att')) then
begin
Lvl := IntToStr(GetSkillLevel('attack'));
Reply:= Random(5);
case Reply of
0, 2, 4: Responce := (Lvl);
1: Responce := ('My att lvl is '+ Lvl);
3: Responce := (Lvl +' is my att lvl');
end;
TypeSend(Responce);
Responds := Responds + 1;
Result := True;
end;

if (InChatMulti('wc?', 'wc levels?', 'wc lvl?')) then
begin
Lvl := IntToStr(GetSkillLevel('Woodcutting'));
Reply:= Random(5);
case Reply of
0, 2, 4: Responce := (Lvl);
1: Responce := ('My wc lvl is '+ Lvl);
3: Responce := (Lvl +'is my wc level.');
end;
TypeSend(Responce);
Responds := Responds + 1;
Result := True;
end;

if (InChatMulti('Fishing?', 'fishing levels?', 'fishing lvl?')) then
begin
Lvl := IntToStr(GetSkillLevel('Fishing'));
Reply:= Random(5);
case Reply of
0, 2, 4: Responce := (Lvl);
1: Responce := ('My fishing level is '+ Lvl);
3: Responce := (Lvl +' is my fishing lvl');
end;
TypeSend(Responce);
Responds := Responds + 1;
Result := True;
end;
Result := False;
end;

{- Entfinder! -}

procedure EntFinder;
var
EX, EY: integer;
FX, FY: integer;
SafeEntWait: LongInt;
begin
if (not (LoggedIn)) then
Exit;
begin
Status('Checking For Ent')
if (FindObjCustom(EX, EY, ['Tree', 'Oak', 'Willow', 'Yew'], [4690821], 5)) then
begin
MMouse(EX, EY, 0, 0)
if FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) then
begin
Status('Ent Found');
MouseFindFlag(645, 83, 2, 2);
MarkTime(SafeEntWait)
repeat
FTWait(5)
FindNormalRandoms;
until TimeFromMark(SafeEntWait) > 29000 + Random(10000)
end;
end;
end;
end;



{- ChopTree! -}
procedure ChopTree;
var
x, y, MyMark : integer;
begin
if not Loggedin then Exit;
MarkTime(MyMark);
repeat
Entfinder;
if FindObj(x, y, 'Tree', TreeColor, 30) then
Wait(2500)
begin
Mouse(x, y, 0, 0, False);
if ChooseOption('hop') then
begin
EntFinder;
AntiRandom;
AntiBan;
Exit;
end;
end;
if TimeFromMark(MyMark) > (2*60*1000) then
begin
Logout
Exit;
end;
until false
end;

{- ChopOak! -}
procedure ChopOak;
var
x, y, MyMark : integer;
begin
if not Loggedin then Exit;
MarkTime(MyMark);
repeat
EntFinder;
if FindObj(x, y, 'Oak', OakColor, 30) then
wait(2500)
begin
Mouse(x, y, 0, 0, False);
if ChooseOption('hop') then
begin
Entfinder;
AntiRandom;
AntiBan;
Exit;
end;
end;
if TimeFromMark(MyMark) > (2*60*1000) then
begin
Logout
Exit;
end;
until false
end;

{- ChopWillow! -}
procedure ChopWillow;
var
x, y, MyMark : integer;
begin
if not Loggedin then Exit;
MarkTime(MyMark);
repeat
EntFinder;
if FindObj(x, y, 'Willow', WillowColor, 30) then
wait(2500)
begin
Mouse(x, y, 0, 0, False);
if ChooseOption('hop') then
begin
EntFinder;
AntiRandom;
AntiBan;
Exit;
end;
end;
if TimeFromMark(MyMark) > (2*60*1000) then
begin
Logout
Exit;
end;
until false
end;

{- ChopYew! -}
procedure ChopYew;
var
x, y, MyMark : integer;
begin
if not Loggedin then Exit;
MarkTime(MyMark);
repeat
EntFinder;
if FindObj(x, y, 'Yew', YewColor, 30) then
wait(2500)
begin
Mouse(x, y, 0, 0, False);
if ChooseOption('hop') then
begin
EntFinder;
AntiRandom;
AntiBan;
Exit;
end;
end;
if TimeFromMark(MyMark) > (2*60*1000) then
begin
Logout
Exit;
end;
until false
end;

{- Dropping Procedure! -}
procedure Drop;
begin
DropToPosition(2,28);
if AxeEquipped then DropAll;
end;

Const
v = '1.5';

{- Progress Report! -}
procedure ProgressReport;
begin
SRLRandomsReport;
ClearDebug;
Writeln(' {- PowerzChopper v'+v+' -}');
Writeln(' {- Thanks For using! -}');
end;

{- PowerzChopper! -}
procedure PowerzChopper;
begin
Setup;
repeat
if(Players[CurrentPlayer].Strings[1]) = 'tree' then
begin
ChopTree;
end;
if(Players[CurrentPlayer].Strings[1]) = 'oak' then
begin
ChopOak;
end;
if(Players[CurrentPlayer].Strings[1]) = 'willow' then
begin
ChopWillow;
end;
if(Players[CurrentPlayer].Strings[1]) = 'yew' then
begin
ChopYew;
end;
if InvFull then
Drop;
Inc(Players[CurrentPlayer].Banked);
if Players[CurrentPlayer].Banked mod LoadsToBlow = 0 then
ProgressReport;
begin
NextPlayer(True);
end;
if not Loggedin then NextPlayer(False);
until true
end;


{- Main Line! -}

begin
PowerzChopper;
end.

Attachments;
[ATTACH]9439[/ATTACH]
[ATTACH]9427[/ATTACH]
[ATTACH]9412[/ATTACH]
[ATTACH]9405[/ATTACH]
[ATTACH]9403[/ATTACH]

Bye,
Powerz.(h)

Powerz

2007-12-31 12:39:05

Test please.. Need some advices, and help for making anti-randoms and SRL Stats because i fail every time i try too make it.

P1nky

2007-12-31 12:46:31

your whole setup is wrong…. declare players go 1st. and const before declare players… where da hell is the dropping proc…btw instead of it posting like that please make a attach it

Powerz

2007-12-31 13:42:04

From: p1nky
your whole setup is wrong…. declare players go 1st. and const before declare players… where da hell is the dropping proc…btw instead of it posting like that please make a attach it


I'll work on it ASAP.
Thanks for telling, i did this whole scripting thing for 1 day, so i kinda didn't knew anything..
Sorry..

Btw there is an attachment.

P1nky

2007-12-31 13:52:47

ok NP dude…. if you need help please let me know. happy that you learning how to script.

Powerz

2008-01-01 06:12:06

Hey, I updated the PowerzChopper too v1.1 :D
Here are some details;
- Changed the setup a bit; Const now after the declareplayers proc.
- Added random support! (still needs testing:redface: )

Future updates;
- Getting that SRL stats thing working.


Bye,
Powerz.

Powerz

2008-01-01 08:37:01

Hey i've updated PowerzChopper too version 1.3!

Details;
- Made an improvement, so you don't have too fill in the treecolor each time, just fill in which tree u want too cut (in the DeclarePlayers Procedure(this is where you insert your login information)).



Note*:
You MUST use LOWERCASE letters when entering the tree you want too cut, or else it wil fail!.

P1nky

2008-01-01 13:44:03

you should change ur string setup.Looks exact like mine and forgot some other script had that.

but looks quite good now.

Powerz

2008-01-01 14:13:44

Fixed :D
If u have downloaded v1.3 redownload it agaiin for this fix..:P

Ty.

Powerz

2008-01-02 07:36:52

Updated too v1.4 :D

Details;
- Added Anti-Randoms!
- Added Anti-Ban!

I hope you guys like it :)

Bye,
Powerz.

Sebo

2008-01-02 11:13:08

try not to double post much.
it's kind of annoying. :)

P1nky

2008-01-02 12:09:53

its good you keep updating and all just dont double lol…

Naum

2008-01-02 12:53:45

Wow this pwn's P1nkie's Power Choppa 5 times over again [j/k]
Looks good try updating the standards XD

rawsilk

2008-01-02 22:55:01

I tried it out and I am going to give it 7/10 well done but could be more efficient in the make up.

Good job though and keep going.

haseebcash4u

2008-01-03 00:36:42

Nice script pretty Good Tested it out works just fine