KeepBotting
01-18-2012, 02:02 AM
Hello guys.
This is my script.
How would I get the script to recognise when the inventory is full, then drop everything except the first slot?
I'm using SRL4. Call me a noob, but I spent 3 hours reading a tutorial about SRL4, so I'm going to learn SRL4 first.
Any help is appreciated.
program kbPowerChopper;
{$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 = 'KeepBotting';
Name = 'kbPowerChopper';
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 kbPowerChopper 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(8) 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: Human-Like Mouse.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
PickUpMouse; //This moves the mouse in a jerky, human-like motion.
end;
2:
begin
WriteLn('AntiBan chosen: Move Camera.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
MakeCompass('N'); //This fiddles around with the Camera. Aligns the Camera North, rotates the Camera South, then aligns North again.
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;
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 ProgressReport; //This handles your proggies. DO NOT CHANGE.
begin
WriteLn('Time for a progress report!');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('kbPowerChopper by kbScripts and KeepBotting, Version 0.9');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;
procedure ChopTree; //This chops your trees.
var x, y: integer;
begin
repeat
FindNormalRandoms;
WriteLn('ChopTree procedure activated! Finding tree.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
if FindObj(x, y, 'illow', 2306095, 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, false);
ChooseOption('illow'); //This tells the script to right-click on the object and select "Tree".
end;
repeat //This is a repeat function. It repeats the steps above.
wait(400+random(250));
AntiBan;
Until not IsUpText('illow') 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.
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.
This is my script.
How would I get the script to recognise when the inventory is full, then drop everything except the first slot?
I'm using SRL4. Call me a noob, but I spent 3 hours reading a tutorial about SRL4, so I'm going to learn SRL4 first.
Any help is appreciated.
program kbPowerChopper;
{$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 = 'KeepBotting';
Name = 'kbPowerChopper';
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 kbPowerChopper 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(8) 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: Human-Like Mouse.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
PickUpMouse; //This moves the mouse in a jerky, human-like motion.
end;
2:
begin
WriteLn('AntiBan chosen: Move Camera.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
MakeCompass('N'); //This fiddles around with the Camera. Aligns the Camera North, rotates the Camera South, then aligns North again.
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;
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 ProgressReport; //This handles your proggies. DO NOT CHANGE.
begin
WriteLn('Time for a progress report!');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('kbPowerChopper by kbScripts and KeepBotting, Version 0.9');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;
procedure ChopTree; //This chops your trees.
var x, y: integer;
begin
repeat
FindNormalRandoms;
WriteLn('ChopTree procedure activated! Finding tree.');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
if FindObj(x, y, 'illow', 2306095, 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, false);
ChooseOption('illow'); //This tells the script to right-click on the object and select "Tree".
end;
repeat //This is a repeat function. It repeats the steps above.
wait(400+random(250));
AntiBan;
Until not IsUpText('illow') 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.
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.