Caotom
2012-01-25 06:28:42
This is my first proper script. I spent the past 3 days learning the ropes and playing around with simba, as well as cursing at my computer when is stubbornly refused to do what I want. I am very happy with it for my first script and although it is a simple script I tried to add as much into it as I could.
~~Features~~
I'm not 100% sure if the script actually works with SRL as I was a bit hazy on how to implement it.
Some credit must go to YoHoJo as I used his Vid tuts as the inspiration for the base of my script.
I would love to hear feedback, bug reports, tips/advice, suggestions and advice on where to go from here.
The second script uploaded here is for the purposes of testing. If you were not linked here by me simply ignore it, thank you.
Thanks :)
~Caotom
~~Features~~
- Antiban
- Anti-Random (SRL)
- Multiple Ores
- High success rate colour finding
- Failsafes
- Breaks
- SMART
- SRL Stats
- Proggy
{¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
| Caotoms Power Miner |
| Version 1.0 |
| |
{_______________________________________}
program CaotomsPowerMiner;
{$DEFINE SRL5}
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i SPS/sps.simba}
////////////////////// Begin Setup \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Const
SRLStats_User = ''; // Your SRL Stats ID (If you dont have one then just leave it as it is)
SRLStats_Password = ''; // Your SRL Stats Password (If you dont have one then just leave it as it is)
SessionTime = 180; //How long to run for (In minutes)
BreakTime = 25; //How long to break for (In minutes)
StartPlayer = 0; //Leave as 0 (No multiplayer as of the moment due to 6 hour time limit)
AntibanFrequencey = 500; //Recommend Number between 300 and 550, the lower the more often the antiban
Pick = 0; //The inventory slot that your pick is in (1 for first slot, 0 if equipped)
MouseButton = 1; //Whether to use only right click (1), or both right and left (2). 1 is more reliable, but more bot-like.
Server = 35; //Enter which world you would like to use
Members = False; //True is members account, false if not
Ore = 2; //The type of ore you wish to mine:
// 1 = Tin, 2 = Clay, 3 = Iron, 4 = Copper, 5 = Silver
//Due to flashes of ore, silver is slightly buggy.
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Username Here
Pass := ''; //Password Here
BoxRewards := ['XP','xp','lamp']; //Choose Box rewards (Recommend Defult)
LampSkill := 'Mining'; //Choose xp lamp skill
Active := True;
end;
end;
////////////////////// End Setup \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
var
NumberOfOres: Integer;
Tries: Integer;
TimeMining: Integer;
procedure StatsGuise(wat:String); //Thanks to YoHoJo
begin
Status(wat);
Disguise(wat);
end;
Procedure Antiban; //Mostly Thanks to YoHoJo
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
Case Random(AntibanFrequencey) Of
0:
begin
StatsGuise('Antiban');
GameTab(tab_Stats) HoverSkill('Mining', False);
Wait(400 + Random(450));
GameTab(tab_Inv);
end;
1:
begin
StatsGuise('Antiban');
GameTab(tab_Inv);
ExamineInv;
end;
2:
begin
StatsGuise('Antiban');
SleepAndMoveMouse(3500 + Random(600));
end;
3:
begin
StatsGuise('Antiban');
GameTab(Tab_Stats);
Wait(3000 + Random(1500));
GameTab(tab_Inv);
end;
4:
begin
StatsGuise('Antiban');
HoverSkill('random', False);
Wait(1000 + Random(500));
GameTab(tab_Inv);
end;
5:
begin
StatsGuise('Antiban');
PickUpMouse;
end;
6:
begin
StatsGuise('Antiban');
BoredHuman;
end;
end;
end;
procedure MineOre;
var
X, Y, plusOre, oreWatcher: Integer;
begin
Tries := 0;
case Ore of
1:
begin
StatsGuise('Trying to find ores');
repeat
Wait(200+random(100));
Tries := Tries + 1;
if(Tries = 150)then
begin
Writeln('Failed to find rocks 150 times');
Logout;
TerminateScript;
end;
until FindObjCustom(X, Y, ['Mine', 'ine', 'Rocks', 'cks'], [10066336, 5066064, 7763836], 16) //Colours of tin ore, only change these if they don't work
begin
plusOre:= InvCount + 1;
StatsGuise('Found ore');
GetMousePos(X, Y);
MarkTime(oreWatcher);
Case Random(MouseButton) of
0:
begin
Mouse(X, Y, 5, 5, False);
WaitOption('Mine', 500);
end;
1: Mouse(X, Y, 5, 5, True);
end;
Repeat
Antiban;
Wait(100+random(50));
if InvCount=plusOre then
Writeln('Mined one tin ore!');
stats_IncVariable('Tin Ore (Mined)', 1);
until (InvCount=plusOre) or (TimeFromMark(oreWatcher) > 6500)
end;
end;
2:
begin
StatsGuise('Trying to find ores');
repeat
Wait(200+random(100));
Tries := Tries + 1;
if(Tries = 150)then
begin
Writeln('Failed to find rocks 150 times');
Logout;
TerminateScript;
end;
until FindObjCustom(X, Y, ['Mine', 'ine', 'Rocks', 'cks'], [8899312, 8108508, 9031156], 16) //Colours of Clay, only change these if they don't work
begin
plusOre:= InvCount + 1;
StatsGuise('Found ore');
GetMousePos(X, Y);
MarkTime(oreWatcher);
Case Random(MouseButton) of
0:
begin
Mouse(X, Y, 5, 5, False);
WaitOption('Mine', 500);
end;
1: Mouse(X, Y, 5, 5, True);
end;
Repeat
Antiban;
Wait(100+random(50));
if InvCount=plusOre then
Writeln('Mined one clay ore!');
stats_IncVariable('Clay (Mined)', 1);
until (InvCount=plusOre) or (TimeFromMark(oreWatcher) > 6500)
end;
end;
3:
begin
StatsGuise('Trying to find ores');
repeat
Wait(200+random(100));
Tries := Tries + 1;
if(Tries = 150)then
begin
Writeln('Failed to find rocks 150 times');
Logout;
TerminateScript;
end;
until FindObjCustom(X, Y, ['Mine', 'ine', 'Rocks', 'cks'], [2174028, 3359860, 2371923], 16) //Colours of iron ore, only change these if they don't work
begin
plusOre:= InvCount + 1;
StatsGuise('Found ore');
GetMousePos(X, Y);
MarkTime(oreWatcher);
Case Random(MouseButton) of
0:
begin
Mouse(X, Y, 5, 5, False);
WaitOption('Mine', 500);
end;
1: Mouse(X, Y, 5, 5, True);
end;
Repeat
Antiban;
Wait(100+random(50));
if InvCount=plusOre then
Writeln('Mined one Iron ore!');
stats_IncVariable('Iron Ore (Mined)', 1);
until (InvCount=plusOre) or (TimeFromMark(oreWatcher) > 6500)
end;
end;
4:
begin
StatsGuise('Trying to find ores');
repeat
Wait(200+random(100));
Tries := Tries + 1;
if(Tries = 150)then
begin
Writeln('Failed to find rocks 150 times');
Logout;
TerminateScript;
end;
until FindObjCustom(X, Y, ['Mine', 'ine', 'Rocks', 'cks'], [5082871, 4686820, 5149437], 16) //Colours of copper ore, only change these if they don't work
begin
plusOre:= InvCount + 1;
StatsGuise('Found ore');
GetMousePos(X, Y);
MarkTime(oreWatcher);
Case Random(MouseButton) of
0:
begin
Mouse(X, Y, 5, 5, False);
WaitOption('Mine', 500);
end;
1: Mouse(X, Y, 5, 5, True);
end;
Repeat
Antiban;
Wait(100+random(50));
if InvCount=plusOre then
Writeln('Mined one copper ore!');
stats_IncVariable('Copper Ore (Mined)', 1);
until (InvCount=plusOre) or (TimeFromMark(oreWatcher) > 6500)
end;
end;
5:
begin
StatsGuise('Trying to find ores');
repeat
Wait(200+random(100));
Tries := Tries + 1;
if(Tries = 150)then
begin
Writeln('Failed to find rocks 150 times');
Logout;
TerminateScript;
end;
until FindObjCustom(X, Y, ['Mine', 'ine', 'Rocks', 'cks'], [15856381, 15856381, 15461366], 16) //Colours of silver ore, only change these if they don't work
begin
plusOre:= InvCount + 1;
StatsGuise('Found ore');
GetMousePos(X, Y);
MarkTime(oreWatcher);
Case Random(MouseButton) of
0:
begin
Mouse(X, Y, 5, 5, False);
WaitOption('Mine', 500);
end;
1: Mouse(X, Y, 5, 5, True);
end;
Repeat
Antiban;
Wait(100+random(50));
if InvCount=plusOre then
Writeln('Mined one silver ore!');
stats_IncVariable('Silver Ore (Mined)', 1);
until (InvCount=plusOre) or (TimeFromMark(oreWatcher) > 6500)
end;
end;
end;
end;
Procedure Login;
begin
if not LoggedIn then
LogInPlayer
else
StatsGuise('Already logged in');
end;
Procedure Proggy;
begin
ClearDebug;
Writeln('|-----------------------------------------------------|');
Writeln('|You have been mining for a total of ' + TimeRunning + '|');
Writeln('| You have managed to mine ' + IntToStr(NumberOfOres) + ' ore(s) |');
case Ore of
1: Writeln('| You are currently mining tin ore |');
2: Writeln('| You are currently mining clay ore |');
3: Writeln('| You are currently mining iron ore |');
4: Writeln('| You are currently mining copper ore |');
5: Writeln('| You are currently mining silver ore |');
end;
Writeln('| Thankyou for using Caotoms Basic Powerminer :) |');
Writeln('|-----------------------------------------------------|');
SRLRandomsReport;
Stats_Commit;
end;
begin
Smart_Server := SERVER;
Smart_Members := MEMBERS;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
SetupSRLStats(598, SRLStats_User, SRLStats_Password);
NumberOfOres:= 0;
repeat
Login;
StatsGuise('Welcome To Runescape');
Wait(100+random(100));
ClickNorth(SRL_ANGLE_HIGH);
Wait(100+random(100));
SetRun(true);
MarkTime(TimeMining);
ClearDebug;
repeat
repeat
FindNormalRandoms;
MineOre;
incEx(NumberOfOres, 1);
Proggy;
if(InvFull = true) then
DropAllExcept([Pick]);
Stats_Commit;
Until(TimeMining >= SessionTime * 60000 + random(1000));
Until(TimeFromMark(TimeMining) >= SessionTime * 60000 + random(1000));
Writeln('Breaking for around ' + IntToStr(BreakTime) + ' minutes');
Logout;
Wait(BreakTime * 60000+random(1000));
Until(False);
end.I'm not 100% sure if the script actually works with SRL as I was a bit hazy on how to implement it.
Some credit must go to YoHoJo as I used his Vid tuts as the inspiration for the base of my script.
I would love to hear feedback, bug reports, tips/advice, suggestions and advice on where to go from here.
The second script uploaded here is for the purposes of testing. If you were not linked here by me simply ignore it, thank you.
Thanks :)
~Caotom