SRL Archive - First Scripts

kbPowerMaples by kbScripts and KeepBotting


KeepBotting

2012-01-18 18:28:15

Hey there guys!
Welcome to my very first script, kbPowerMaples!

What are the features of this script?
  • It powercuts Maple logs for *insane* Woodcutting xp!
  • It is 100% Color!
  • It can chop at *any* location!
  • It drops your logs for you!
  • It has many powerful AntiBans!

What are the known bugs of this script?
  • There is a serious bug in V0.9 and V0.9u1 which involves players accidentally clicking on Dungeoneering doors. Caution!
  • If you aren't using V0.9u1, you'll get heaps of bugs and errors. These have been fixed in V0.9u1.


What are the additional warnings for this script?
  • Start the script with nothing in your inventory and your hatchet MUST BE in your FIRST inventory slot or it will be dropped.
  • The script has only been tested on the Daemonheim resource island.
  • You may have to fiddle around with the camera a bit to get it to see the colors most efficiently. The script only moves the camera side-to-side at the moment, so I like to point it North and all the way Up.

What are the coming features for this script?
  • My user's suggestions, of course! Hehe…;)
  • Adding more AntiBans. [90%]
  • Adding progress reports. [MAYBE]
  • Adding SRL Stats. [MAYBE]

What am I currently doing to make this script better?
[20 January 2012, 7:30 PM EST] Making my color finding procedure *perfect*, making it so that it doesn't drop your hatchet.

[23 January 2012 5:40 PM EST] Fixing a serious bug which involves the player accidentally clicking on Dungeoneering doors.

Anyway, I hope you guys like it. I need help with a couple things including my Progress Reports, and adding a Chop And Burn function. (I've got the walking nailed down, but I don't know how to make the script actually *burn* the logs :noobface: )

Best of Luck and Keep Botting my friends!
kbScripts and KeepBotting

Er1k

2012-01-18 20:04:40

A few things.

Why do you have to copy DropAllExcept? The SRL include takes an array, so if you want to drop all except slot one, you do

DropAllExcept([1]);

And this. I think you don't use ChooseOption if you left-click. ChooseOption is for choosing an option from a right click menu.

      Mouse(x, y, 0, 0, true);
ChooseOption('aple');

As for the cosmetics, just forget about it :D

Also if you would use indentations correctly and follow the standards the code would look neater.

Another suggestion is color finding with CTS2 :) but if your treefinder works well for now, you don't really have to do that.

KeepBotting

2012-01-18 20:07:25

From: nosaj.421
A few things.

Why do you have to copy DropAllExcept? The SRL include takes an array, so if you want to drop all except slot one, you do

DropAllExcept([1]);

And this. I think you don't use ChooseOption if you left-click. ChooseOption is for choosing an option from a right click menu.

      Mouse(x, y, 0, 0, true);
ChooseOption('aple');

As for the cosmetics, just forget about it :D

Also if you would use indentations correctly and follow the standards the code would look neater.

Another suggestion is color finding with CTS2 :) but if your treefinder works well for now, you don't really have to do that.

Wow, you solved all my problems in one post :duh: I feel noobish now…I uploaded the wrong version, running that one will produce an error. Let me replace it and I will do what you suggested soon.

EDIT: Actually (seeing as I'm still using SRL4 :noobface:) ChooseOption is what I'm supposed to use, unless I am abhorrently mistaken.

Flight

2012-01-18 21:06:50

Congratulations on your first script mate! kbScripts, huh? Keep it up, I'd like to see more. :)

KeepBotting

2012-01-18 21:08:25

From: Flight
Congratulations on your first script mate! kbScripts, huh? Keep it up, I'd like to see more. :)
Thanks ;) It stand for keep botting Scripts, because my goal is to make sure that everyone can always keep botting! Hence my name.

Herp

2012-01-19 18:13:02

Once you iron out your color finding-methods and/or other bugs, you should add a chop and burn option.

Heavenzeyez1

2012-01-19 18:29:38

Hello there, Kb!
First of all, a very well written first script, I really <3 your standards, well done! They are off at some places, but it's still a nice start!
A few things I noticed:
{$IfDef Reflection}
R_FindRandoms;
{$EndIf}
You can remove these, we no longer use reflection.
program kbPowerMaples;
{$DEFINE SMART}
{$I srl/srl.simba}

const
{---SMART Setup Constants---}
WORLD = 0; // Set a world, if you'd like. Leave 0 to choose a random world.
MEMBERS = False; // Are you Members or Free-To-Play? False for F2P, True for P2P.
SIGNED = True; // True if running a single account, false otherwise.
{---------------------------}
{--------Script Info--------}//DON'T CHANGE
Author = 'kbScripts and KeepBotting';
Name = 'kbPowerMaples';
Version = '0.9';
{---------------------------}//DON'T CHANGE

procedure DeclarePlayers; //This declares the players to be used in the script.
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Your Runescape username
Players[0].Pass := ''; //Your Runescape password
Players[0].Nick := ''; //3 or 4 lowercase letters from your Runescape username. Used as a Nickname.
Players[0].Active := True; //Set to true if you want to use this player. Set to False to disable this player.
Players[0].Pin := ''; //Leave blank if the player doesn't have a Bank PIN.
end;

procedure SetupScript; //This is almost purely cosmetic, it lets you know what procedures/functions are being activated when the script starts.
begin;
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('Welcome to kbPowerMaples by kbScripts and KeepBotting!');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('Initilizing DeclarePlayers procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('Initilizing LoginPlayer procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('Initilizing ChopTree procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('Initilizing AntiBan procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('All procedures initilized successfully! Happy botting!');
end;

procedure AntiBan; //This keeps the banhammah from striking.
begin
if (not (LoggedIn)) then
Exit;
FindNormalRandoms;
case Random(4) of
0:
begin
WriteLn('AntiBan chosen: Hover Skill.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
HoverSkill('Woodcutting', false); //This hovers your mouse over the Woodcutting skill.
wait(2453 + Random(432));
end;
1:
begin;
WriteLn('AntiBan chosen: Pick Up Mouse.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
PickUpMouse; //This simulates a human picking the mouse up off the mouse pad, then setting it back down.
end;
2:
begin
Wait(10000)
end;

end;
end;

procedure DropLogs;
var
i: integer;
begin
for i := 2 to 3 do
begin
DropPattern(Random(3) + 1);
if InvCount = 1 then
break;
end;
end;

procedure AntiRandoms; //This is currently broken (as Reflection does not work) but it would solve Random Events if it worked.
begin
{$IFDEF Reflection}
R_FindRandoms;
{$ENDIF}
FindNormalRandoms;
end;

procedure ChopTree; //This chops your trees.
var
x, y: integer;
begin
repeat
FindNormalRandoms;
ToggleXPBar(true);
WriteLn('ChopTree procedure activated! Finding tree.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
if FindObj(x, y, 'aple', 3621734, 35) then //This finds the object, records the X and Y values, and tells the script to find the option "Tree".
begin
WriteLn('Tree found! Clicking option.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Mouse(x, y, 0, 0, true);
ChooseOption('aple'); //This tells the script to left-click on the object and select "Maple".
end;
repeat //This is a repeat function. It repeats the steps above.
wait(400 + random(250));
AntiBan;
until not IsUpText('aple') or (InvFull); //This is an Until function. It stops the repeat function if the tree has been chopped or your inventory is full.
until (InvFull); //This tells the script to stop completely once your inventory is full.
end;

begin
Smart_Server := WORLD; //This sets up the SMART Minimizing Autoing Resource Thing.
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL; //This sets up SRL.

SetupScript; //This runs your SetupScript procedure, initilizing all of the procedures.
DeclarePlayers; //This runs your DeclarePlayers procedure, making sure that the script has a player to run.
LoginPlayer; //This logs in your player.
repeat //This is the start of the ChopTree procedure loop.
ChopTree; //Chops your trees.
DropLogs; //This drops your logs.
AntiBan; //Runs your AntiBans.

//Notice that AntiRandoms isn't in here. It would be useless to include because Reflection is currently broken.

until AllPlayersInactive; //This stops the script completely once your player has failed. e.g. Gotten into a random event, died (unlikely) or failed to find a tree.
end.
Here, I fixed your standards as well, hope you learn from these and helps you keep motivated! ;)
You had some missing semicolons as well, added them there! ;)

ChooseOption('aple');  //This tells the script to left-click on the object and select "Maple".          

I don't see what is this line for? You can use ChooseOption only when you have right-clicked something and you have the ChooseOption dialog open. But you did a left click before it..
repeat  //This is a repeat function. It repeats the steps above.
wait(400+random(250));
AntiBan;
Until not IsUpText('aple') or (InvFull);
This doesn't look good.
Let's say it you have 2 maples left of you. It will click the nearest, but the mouse stays still and when you move closer to the tree, it will then be hovering over the other maple. And what if there are no other cutters? Your script will then run into an infinite loop. You should look into:
MarkTime(); 
//and
TimeFromMark();
These will help you to prevent infinite loops, it's a failsafe.

until AllPlayersInactive;
You don't set your player(s) inactive ever in this script, do you? Only randoms can brake it right now. I suggest adding more failsaves.

Other than that, well done, a nice first script! Keep it up! ;)

~Eerik.

jeffadkins51

2012-01-19 19:05:57

Could I use your source as a starting point for my first script? I'm going to be making a fletching script, and I'd like to add the integration for cutting trees then fletching/burning them. I'll give credits where credits are deserved :).

KeepBotting

2012-01-19 21:14:56

From: Herp
Once you iron out your color finding-methods and/or other bugs, you should add a chop and burn option.
That seems like a good idea :p added to my To-Do list.

KeepBotting

2012-01-19 21:16:00

From: Heavenzeyez1
Hello there, Kb!
First of all, a very well written first script, I really <3 your standards, well done! They are off at some places, but it's still a nice start!
A few things I noticed:
{$IfDef Reflection}
R_FindRandoms;
{$EndIf}
You can remove these, we no longer use reflection.
program kbPowerMaples;
{$DEFINE SMART}
{$I srl/srl.simba}

const
{---SMART Setup Constants---}
WORLD = 0; // Set a world, if you'd like. Leave 0 to choose a random world.
MEMBERS = False; // Are you Members or Free-To-Play? False for F2P, True for P2P.
SIGNED = True; // True if running a single account, false otherwise.
{---------------------------}
{--------Script Info--------}//DON'T CHANGE
Author = 'kbScripts and KeepBotting';
Name = 'kbPowerMaples';
Version = '0.9';
{---------------------------}//DON'T CHANGE

procedure DeclarePlayers; //This declares the players to be used in the script.
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Your Runescape username
Players[0].Pass := ''; //Your Runescape password
Players[0].Nick := ''; //3 or 4 lowercase letters from your Runescape username. Used as a Nickname.
Players[0].Active := True; //Set to true if you want to use this player. Set to False to disable this player.
Players[0].Pin := ''; //Leave blank if the player doesn't have a Bank PIN.
end;

procedure SetupScript; //This is almost purely cosmetic, it lets you know what procedures/functions are being activated when the script starts.
begin;
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('Welcome to kbPowerMaples by kbScripts and KeepBotting!');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('Initilizing DeclarePlayers procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('Initilizing LoginPlayer procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('Initilizing ChopTree procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('Initilizing AntiBan procedure...');
wait(500);
WriteLn('Successful!');
WriteLn('All procedures initilized successfully! Happy botting!');
end;

procedure AntiBan; //This keeps the banhammah from striking.
begin
if (not (LoggedIn)) then
Exit;
FindNormalRandoms;
case Random(4) of
0:
begin
WriteLn('AntiBan chosen: Hover Skill.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
HoverSkill('Woodcutting', false); //This hovers your mouse over the Woodcutting skill.
wait(2453 + Random(432));
end;
1:
begin;
WriteLn('AntiBan chosen: Pick Up Mouse.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
PickUpMouse; //This simulates a human picking the mouse up off the mouse pad, then setting it back down.
end;
2:
begin
Wait(10000)
end;

end;
end;

procedure DropLogs;
var
i: integer;
begin
for i := 2 to 3 do
begin
DropPattern(Random(3) + 1);
if InvCount = 1 then
break;
end;
end;

procedure AntiRandoms; //This is currently broken (as Reflection does not work) but it would solve Random Events if it worked.
begin
{$IFDEF Reflection}
R_FindRandoms;
{$ENDIF}
FindNormalRandoms;
end;

procedure ChopTree; //This chops your trees.
var
x, y: integer;
begin
repeat
FindNormalRandoms;
ToggleXPBar(true);
WriteLn('ChopTree procedure activated! Finding tree.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
if FindObj(x, y, 'aple', 3621734, 35) then //This finds the object, records the X and Y values, and tells the script to find the option "Tree".
begin
WriteLn('Tree found! Clicking option.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
Mouse(x, y, 0, 0, true);
ChooseOption('aple'); //This tells the script to left-click on the object and select "Maple".
end;
repeat //This is a repeat function. It repeats the steps above.
wait(400 + random(250));
AntiBan;
until not IsUpText('aple') or (InvFull); //This is an Until function. It stops the repeat function if the tree has been chopped or your inventory is full.
until (InvFull); //This tells the script to stop completely once your inventory is full.
end;

begin
Smart_Server := WORLD; //This sets up the SMART Minimizing Autoing Resource Thing.
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL; //This sets up SRL.

SetupScript; //This runs your SetupScript procedure, initilizing all of the procedures.
DeclarePlayers; //This runs your DeclarePlayers procedure, making sure that the script has a player to run.
LoginPlayer; //This logs in your player.
repeat //This is the start of the ChopTree procedure loop.
ChopTree; //Chops your trees.
DropLogs; //This drops your logs.
AntiBan; //Runs your AntiBans.

//Notice that AntiRandoms isn't in here. It would be useless to include because Reflection is currently broken.

until AllPlayersInactive; //This stops the script completely once your player has failed. e.g. Gotten into a random event, died (unlikely) or failed to find a tree.
end.
Here, I fixed your standards as well, hope you learn from these and helps you keep motivated! ;)
You had some missing semicolons as well, added them there! ;)

ChooseOption('aple');  //This tells the script to left-click on the object and select "Maple".          

I don't see what is this line for? You can use ChooseOption only when you have right-clicked something and you have the ChooseOption dialog open. But you did a left click before it..
repeat  //This is a repeat function. It repeats the steps above.
wait(400+random(250));
AntiBan;
Until not IsUpText('aple') or (InvFull);
This doesn't look good.
Let's say it you have 2 maples left of you. It will click the nearest, but the mouse stays still and when you move closer to the tree, it will then be hovering over the other maple. And what if there are no other cutters? Your script will then run into an infinite loop. You should look into:
MarkTime(); 
//and
TimeFromMark();
These will help you to prevent infinite loops, it's a failsafe.

until AllPlayersInactive;
You don't set your player(s) inactive ever in this script, do you? Only randoms can brake it right now. I suggest adding more failsaves.

Other than that, well done, a nice first script! Keep it up! ;)

~Eerik.
Thank you so much!! :D This will help me tons, I will add all of this (creds to you ofc) ASAP. I don't have much time on my hands at the moment so…we'll see how it goes :noobface:

KeepBotting

2012-01-19 21:17:04

From: jeffadkins51
Could I use your source as a starting point for my first script? I'm going to be making a fletching script, and I'd like to add the integration for cutting trees then fletching/burning them. I'll give credits where credits are deserved :).


Hey sure man. My goal is to make sure that everyone can always keep botting. If you need to use my script, then go ahead :D whatever you need to do man. Any questions, ask me. I'll never tell you to :google:

KeepBotting

2012-01-20 19:30:31

Been testing the script for >3 hours, no errors or mess-ups. :D

KeepBotting

2012-01-20 19:35:47

Script was *just* updated guys! http://villavu.com/forum/attachment.php?attachmentid=13252&d=1327106062

Sin

2012-01-21 17:05:38

Woahhh there buddy, theres a edit hutton for a reason ;)

KeepBotting

2012-01-22 08:16:42

From: S1N
Woahhh there buddy, theres a edit hutton for a reason ;)
Yeah, sorry. I'm still getting used to these forums. I'm used to the powerbot forums…

KeepBotting

2012-01-23 20:01:27

Bumpage.

KeepBotting

2012-01-30 11:49:08

Meh, this script kind of fails. Check out me new one! 119 downloads already! http://villavu.com/forum/showthread.php?t=73414

evil1234221

2012-02-29 02:56:16

does this solve randoms

kingsleyeng

2012-02-29 04:11:58

From: evil1234221
does this solve randoms


this is done by smart not the script

KeepBotting

2012-02-29 06:55:32

From: evil1234221
does this solve randoms


From: kingsleyeng
this is done by smart not the script
Seeing as Simba is a color-based bot, and the SRL include works off of color as well, there is a very low chance that the bot will actually solve the random.
tl;dr version: it will try, at least.

Joe

2012-03-18 20:08:38

I modded it to fm… want it? PM me.

rice

2012-03-18 20:24:05

nice first script. Maybe add banking or FM to it for future updates.