Austintheman
2011-12-19 03:07:25
Hello, after following YoHoJo's tutorial on making a RS script, I've attempted to make one, after many problems I've got the script to run.
However, after I run the script, it only mines one iron ore, and then immediately clicks on the iron ore that I just mined again. I've tried changing the tolerance, I've included many different colors and I've even tried including few colors, however it doesn't seem to work :(. After it clicks on the ore again, it just sits there and stays at the stage "We are mining!"
Any help would be greatly appreciated.
This is my first script, so it may be a bit messy ;)
PS: Does anyone know how to make it not drop my pickaxe without removing '1' in my ore pattern.
However, after I run the script, it only mines one iron ore, and then immediately clicks on the iron ore that I just mined again. I've tried changing the tolerance, I've included many different colors and I've even tried including few colors, however it doesn't seem to work :(. After it clicks on the ore again, it just sits there and stays at the stage "We are mining!"
Any help would be greatly appreciated.
This is my first script, so it may be a bit messy ;)
program LeggoMine;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SRL\SRL\Misc\Stats.simba}
Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
BreakEvery = 855; //How Many Minutes To Break After
BreakFor = 5; //How Long To Break For
Version = '1.0';
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ' '; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
//Integers[1] := 4;
//Integers[2] := 3;
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Function CheckAndClick(Uptext, Option:String; X, Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(Uptext, 100+Random(50)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
Function MineOre:Boolean;
Var
X, Y, PlusOne, OreCounter: Integer;
Begin
PlusOne:= InvCount + 1;
If FindObjCustom(x, y, ['Mine', 'ocks'], [3096426, 3162220, 2569561, 3030632], 5) Then
Begin
StatsGuise('Yay, we mining');
GetMousePos(x, y);
Case Random(1) Of
0: Mouse(x, y, 2, 3, true);
1: Begin
Mouse(x, y, 2, 3, false);
WaitOption('Mine', 500);
End;
End;
Repeat
MarkTime(OreCounter);
//Antiban;
Wait(100);
If InvCount=Plusone Then
writeln('Woot we got some oar! +1');
Until (InvCount=Plusone) Or (TimeFromMark(OreCounter) > 10000)
End;
End;
Procedure DropDemOre;
var
X, Y, OreDTM, I:Integer;
SlotBox:TBox;
DemOrePattern:TIntegerArray;
Begin
OreDTM:= DTMFromString('mPwEAAHic42dgYGhmYWBoB+JuIO4D4i4g7gXiJiCugeJWKL8BiDug8hOA+CMjA8NLIH4GxM8ZIfwvQPwDyn4NlQPhV0D8FopBbBN5cQYrJUkGQ1kxBis9BQZzBQkwP97HjCEtyJIh3NWQQVVMAOhCJgYDBQWwukh3I4accFsGcsEJIGakAKMBAA5fHy0=');
DemOrePattern:=[5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
For I:=0 To 27 Do
Begin
SlotBox:=InvBox(DemOrePattern[I]);
If FindDTm(OreDTM,x,y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(DemOrePattern[I],False);
ChooseOption('Dro');
End;
End;
End;
Begin
SetupSRL;
DeclarePlayers;
SetAngle(True);
Repeat
MineOre;
Until(false);
End. PS: Does anyone know how to make it not drop my pickaxe without removing '1' in my ore pattern.