Woot! It's compiling with the Mining, Dropping, and Declareplayers (going to add other stuff today or after Christmas (probs after)), thanks Derek!
Mick, thanks - now I know what failsafes are and see why I should go read a tut on them :duh:
Negaal, thanks, but I'd rather try my own ;)
EDIT:Ok, so it's sort of working, but whats the best way to find a rock? Is color the only way? Or would DTM or Bitmap or w/e work better? What's the
best way? You don't have to explain it to me, just say what it is and I'll go read a tut on it ;)
EDIT: (Still need above edit to be answered ;)) Here, I've been adding stuff to it, tell me what you think
SCAR Code:
//This is my first script, a powerminer. Put your pickaxe in the first inventory slot (DO NOT
//TAKE ANYTHING ELSE) and fill in the info in lines 10-13 and 18-26
//Big thanks to Derek for helping me fix errors and and suggesting what functions I should use
program PowerMinerByScapian;
{.include SRL/SRL.scar}
{.include SRL/SRL/core/AntiBan.scar}
var
x,y:integer;
const
RockColor = 3890561; //put the color of the rock before the ; but after the =
WaitTime = 10000; //Time you want it to wait in between clicking rocks (multiply by 1000,
//1 second = 1000, 2 seconds = 2000, etc)
Procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players will you be using?
NumberOfPlayers(HowManyPlayers); //Ignore this line
CurrentPlayer := 0; //Which player do you want to start with? (0 is the first player)
Players[0].Name := ''; //Put the name of your rs character here
Players[0].Pass := ''; //Put the password of your rs character here
Players[0].Nick := ''; //Put 3-4 letters of your rs name in here(Not the first letter
//and no spaces or _'s.
Players[0].Active := True; //Are you using this player? True is Yes, False is no.
end;
procedure Mining;
begin
repeat
if(FindColorTolerance(x, y, RockColor, 1, 1, 100, 100, 20))then
mouse(x, y, 1, 1, true)
else
begin
Writeln('Rock color not found, terminating script');
TerminateScript;
end;
wait(WaitTime);
FindNormalRandoms;
until(InvFull)
end;
procedure Drop;
begin
FindNormalRandoms;
DropExcept([1])
end;
procedure Randoms;
begin
FindNormalRandoms;
end;
procedure AntiBan; //by SRL Devs
var Ban: Integer;
begin
Ban:= random(6);
case Ban of
0: RandomRClickEvery(3 + random(9);
1: LeaveScreenEvery(2 + random(14);
2: HoverSkill('mining', False);
3: PickUpMouseEvery(3 + random(4));
4: AlmostLogout;
5: Wait2(3 + random(9), true);
6: BoredHuman;
end;
begin
RandomRClickEvery(5)
LeaveScreenEvery(2)
HoverSkill(mining;false)
PickUpMouseEvery(3)
end;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
Mining;
Drop;
repeat
Mining;
Drop;
Randoms;
Antiban;
until(false)
end.
When I run it though, It opens up AntiBan.scar in another tab and says