This is a power miner Im working on and it logs on then clicks on rock then logs out. Please someone fix
Thanks
SCAR Code:
program powerminer;
{.include SRL/SRL.scar}
{.include SRL\SRL\Skill\Mining.scar}
const
rockcolor1= 9934755;//set the color of the rock
rockcolor2= 8487307;//set color of rock (these aren't the real colors)
var x,y,randomm: integer;
Procedure DeclarePlayers; // this procedure is used to logg players in
begin
HowManyPlayers :=1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=0; // CurrentPlayer = Array Index
Players[0].Name :='user';//USERNAME
Players[0].Pass :='pass';//PASS
Players[0].Nick :='ser';//3 LETTERS OF YOUR USERNAME NOT THE FIRST ONE
Players[0].Active:=True;//PLAYER IN USE OR NOT
end;
Procedure Randoms;
Begin
FindTalk; //finds talkin randoms
FindNormalRandoms; //finds normal randoms
SolveChatRandom; //sloves chat randoms
FindLamp('Woodcutting'); //solves lamp and then choses a skill to update
SolvePinball; //solves pinball random
DwarfItem; //dropes dawalf items
If(FindFight)Then //runs away from fight
Begin
MakeCompass('N');
RunTo('N', True);
Wait(7000 +Random(3000));
RunTo('S', True);
End;
End;
procedure antiban;
begin
randomm := Random(4)
case randomm of
0: begin
Wait(3591+(random(287)));
RandomRClick;
Wait(3591+(random(287)));
Randoms;
end;
1: begin
Wait(3694+(random(791)));
GameTab(random(13)+1);
Randoms;
Wait(3694+(random(791)));
GameTab(4);
end;
2: begin
Wait(3294+(random(873)));
Randoms;
HoverSkill('Woodcutting' ,false);
Wait(3294+(random(873)));
end;
3: begin
Wait(3694+(random(791)));
GameTab(random(13)+1);
Randoms;
Wait(3694+(random(791)));
GameTab(4);
end;
end;
end;
Procedure minerock;
begin
if not LoggedIn then
Exit;
repeat
if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2], 7) then
begin
MoveMouseSmoothEx(x,y, 20,40,45,25,20);
FTWait(1);
clickmouse(x,y,false);
Wait(500+(random(150)));
ChooseOption('ine')
randoms
antiban;
writeln('found rock');
end else
writeln('couldnt find rock');
randoms;
antiban;
until( InvFull )
end;
Procedure DropOres;
var
X, Y: Integer;
I : Byte;
begin
if InvFull then
for i := 2 to 28 do
if ExistsItem(I) then
begin
MMouseItem(I);
Wait(150 + random(170));
if Pos('ore', RS_GetUpText) <> 0 then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
ChooseOption('rop');
FTWait(1 + random(1));
end;
end;
end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
minerock;
dropores;
until(false);
end.