I have the dropping part good now. But when i run the script its very weird.
Once i click run it mines a tin ore then logs out and nothing happens. Help please.
SCAR Code:
program RockSmasher;
{.include SRL/SRL.scar}
Const
Rockcolor1= 7829378;
Rockcolor2= 6447723;
var x,y,randomm: integer;
Procedure DeclarePlayers;
begin
HowManyPlayers :=1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=0; // CurrentPlayer = Array Index
Players[0].Name :=''; //UserName
Players[0].Pass :=''; //PassWord
Players[0].Nick :=''; //NickName
Players[0].Active:=True;
end;
Procedure Randoms;
Begin
FindTalk;
FindNormalRandoms;
solveChatRandom;
FindLamp ('Mining') //Uses lamp on that skill
SolvePinball;
DwarfItem;
If (FindFight)Then
Begin
MakeCompass ('N')
RunTo('E', True)
Wait(7000 +Random(3000));
RunTo('W', 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 MineRocks;
Begin
repeat
if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2], 7) then
begin
Mouse(x,y,0,0,false);
Wait(500+(random(150))); // <- you dont need to wait this long, the rock will already be mined
ChooseOption('ine')
randoms;
antiban;
writeln('found rock');
end else
writeln('couldnt find rock'); //<-- this is the only line in the else statement
until( InvFull )
end;
Procedure DropOres;
var
i : Integer;
begin
if invfull then
begin
for i := 2 to 28 do
begin
DropItem(i);
Wait(RandomRange(501, 1501));
end;
end;
end;
Begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
MineRocks;
DropOres;
until (IsFKeyDown(3));
End.