Ok, yes, I am another noob idiot player who knows NOTHING about scar, and really just wants to hack off those runescape losers by botting and shi*, so I was wondering if I could have a little help with this script:
I'm only using it for a single player, I would like him to hold onto gems, and I'll be mining iron, and i will be at the computer (most of the time) so no need to logout at the sign of a admin or random event. I'm sure this is the way it is for most people, so anyone could make this a new script and post it. I just need to know what i need to fill in, if anyone can check the parts I already did to tell me whats wrong I would REALLY appreciate it:
this one is by Pwnaz0r
}program Powerminer_Free;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
const Loads = 15;// Loads for each player to do before switching
RTimeout = 10;// Max time to wait before changing rocks(Seconds)
LTimeout = 5;// Max time for Load(Minutes);
PTimeout = 25;// Max time for Player(Minutes); He will not go inactive,just change
RunDir = 'N';// Direction to run if fight found
RunWaitTime = 15;// Time in seconds to wait if run away
UseMyGasFinder = true; //Set to true to try my gas finder.
(* ROCK COLORS, ONLY CHANGE IF SCRIPT CAN'T FIND! *)
const
Copper_Color = 4879778;
Tin_Color = 5794159;
Iron_Color = 2569302;
Silver_Color = 9277080;
Gold_Color = 4566465;
Coal_Color = 2703167;
Mithril_Color= 6307904;
Clay_Color = 4883618;
var
HeadColors: array [1..5] of integer;
RocksMined, GasesHandled, OreMask, OreFinds, OreTime, ClientHandle, RCheck, InvalidCount, LevelChecker: integer;
Recall: boolean;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
Procedure DeclarePlayers;
By: SRL
Description: Fill in with your players information.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
Procedure DeclarePlayers;
begin
SRLID := '12345'; (ill put my real one in here)
SRLPassword := 'aaaa'; (ditto)
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
(* --------- Player 1 --------- *)
Players[0].Name := 'AAAA';
Players[0].Pass := 'BBBB';
Players[0].Nick := 'AAAA';
Players[0].Integers[0]:= 0; //Leave at 0
Players[0].Strings[0]:= 'iron';
Players[0].Active := true;
(* --------- Player 2 --------- *)
{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Integers[0]:= 0; //Leave at 0
Players[1].Strings[0]:= 'iron';
Players[1].Active := true;
(* --------- Player 3 --------- *)
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Integers[0]:= 0; //Leave at 0
Players[2].Strings[0]:= 'iron';
Players[2].Active := true;
(* --------- Player 4 --------- *)
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Integers[0]:= 0; //Leave at 0
Players[3].Strings[0]:= 'iron';
Players[3].Active := true;
(* --------- Player 5 --------- *)
Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := '';
Players[4].Integers[0]:= 0; //Leave at 0
Players[4].Strings[0]:= 'iron';
Players[4].Active := true;}
Writeln(IntToStr(HowManyPlayers)+' Player(s).');
CheckUserNicks;
end;
const
GTX1 = 546; GTY1 = 202; GTX2 = 737; GTY2 = 466;
V = '3.04';
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure Loc(where: string);
By: Pwnaz0r
Description: Changes CurrentPlayers Location identifier.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure Loc(where: string);
begin
Players[CurrentPlayer].Loc:= where;
Players[CurrentPlayer].Rand:= where;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
function AllPlayersInactive: boolean;
By: Pwnaz0r
Description: Returns true if all players are inactive.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
function AllPlayersInactive: boolean;
var
p: integer;
begin
for p:= 0 to HowManyPlayers - 1 do
if Players[p].Active then exit;
result:= true;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure LoginWhich(Player: integer);
By: Pwnaz0r
Description: Starts up the script.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure LoginWhich(Player: integer);
begin
if LoggedIn then exit;
if Players[Player].Active = false then
begin
writeln('Changing player to active...');
Players[Player].Active:= true;
end;
CurrentPlayer:= Player;
LoginPlayer;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
Function FindFastRandoms: Boolean;
By: WT-Fakawi
Description: Finds all the fast randoms.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
function FindFastRandoms: Boolean; // By WT-Fakawi.
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
begin
Result := True;
Loc('Dead');
Logout;
end;
2: If FindTalk Then Result := True;
3: If FindMime then
begin
Result := True;
Loc('Mime');
Logout;
end;
4: If FindMaze then
begin
result:= true;
Loc('Maze');
logout;
end;
5: If FindQuiz then
begin
Result := True;
Loc('Quiz');
Logout;//Solve quiz in next SRL
end;
6: If FindDemon then
begin
Result := True;
Loc('Demon');
end;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].rand := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
If InBlack then
begin
Result := True;
Players[CurrentPlayer].rand := 'InBlack';
Logout;
Exit;
end;
end;
9 : If FindTalk Then Result := True;
10: if FindFight then
begin
RunTo(RunDir, false);
FTWait(RunWaitTime);
RunBack;
end;
end;
Wait(1);
end;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure GoToNextPlayer(IsPlayerActive: boolean);
By: Pwnaz0r
Description: Will go to Next Player in Order.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure ConvertMiningVarsToMyVars; forward;
procedure GoToNextPlayer(IsPlayerActive: boolean);
var
i: integer;
begin
if (IsPlayerActive)then
Writeln('Changing players...') else
Writeln('Player is logged out! exitting');
Logout;
NextPlayerOrder(IsPlayerActive);
Loc('Working');
if not loggedin then LoginPlayer;
FindPickHeadColor;
SetBar('brightness', 4);
SetRun(False);
if WearingItem(5) then
begin
Writeln('Please do not wield pick, it could mess up player''s mining.');
Takeoff(5);
wait(400);
end;
if WearingItem(7) then
begin
Writeln('Please Take off player''s shields. They can mess up mining.');
Takeoff(7);
wait(400);
end;
ConvertMiningVarsToMyVars;
GetAllLevels;
for i:= 0 to 2 do
ArrangeInv;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure ConvertMiningVarsToMyVars;
By: Pwnaz0r
Description: Turns HC 1 - 5 into an array of HeadColors
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure ConvertMiningVarsToMyVars;
begin
HeadColors[1]:= HC1;
HeadColors[2]:= HC2;
HeadColors[3]:= HC3;
HeadColors[4]:= HC4;
HeadColors[5]:= HC5;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
function HoldingPick: boolean;
By: Pwnaz0r
Description: Checks to see if the player is holding the pickaxe
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
function HoldingPick: boolean;
var
tab, cts, hcCount, px, py, PickCount: integer;
begin
PickCount:= 0;
cts:= GetColorToleranceSpeed;
ColorToleranceSpeed(1);
for tab:= 4 to 5 do
begin
Gametab(tab);
Case Tab of
4:begin
for hcCount:= 1 to 5 do
begin
if FindColor(px, py, HeadColors[hcCount], GTX1, GTY1, GTX2, GTY2) then
begin
Inc(PickCount);
if PickCount >= 4 then
begin
result:= true;
exit;
end;
end;
end;
break;
end;
5:begin
for hcCount:= 1 to 5 do
begin
if FindColor(px, py, HeadColors[hcCount], GTX1, GTY1, GTX2, GTY2) then
begin
Inc(PickCount);
if PickCount >= 4 then
begin
result:= true;
Mouse(px, py, 0, 0, true);
GameTab(4);
exit;
end;
end;
end;
break;
end;
end;
end;
ColorToleranceSpeed(cts);
Writeln('PICK LOST!');
Loc('Pick Lost');
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure HandleGas;
By: Pwnaz0r
Description: Handles Gas random.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure HandleGas;
begin
MouseSpeed:= 12;
Mouse(MMCX, MMCY, 3, 3, true);
FFlag(0);
Inc(GasesHandled);
Inc(Players[CurrentPlayer].integers[1]);
Loc('Waiting out for Gas');
ReportVars[2]:= 1;
SendSRLReport;
FTWait(40);
Loc('Working');
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
function FindPick2: Boolean;
By: Pwnaz0r
Description: Handles A Broken Pickaxe
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
function FindPick2: Boolean;
var
HeadDTM, HandleDTM, BrokenDTM, AxeDTM, hx, hy, mx, my, i, c, x, y: integer;
Lost, Wielded: boolean;
begin
BrokenDTM:= DTMFromString('78DA63CC62626098C0C8800A189148209D0 45' +
'4D347404D1E504D170135E540359388503385809A2A22D454 03D5' +
'4C26C21C42EE4907AA994B404D2A50CD2222C270190135894 0354' +
'B8950438C5D0B8870F32C026A328808C354C2E9070005DF11 92');
HandleDTM:= DTMFromString('78DA634C676260F0656440058C482490CE0 0A' +
'A0921A02605A82686809A4422D42401D54410615730116EF6 26A0' +
'260FA8C69D809A2CA01A0FDC6AD8417436508D1B013539403 5AE4' +
'498E347400DC83D0144A80924A02613A82608BF1A007DFD0B 4F');
HeadDTM:= DTMFromString('78DA8DD2390E80300C44D198E39250B0738 AB' +
'043071C15D34183BF0BBB79D2C8D2C89E38978BFB8EBCB6DE 434D' +
'6B980598494D6798084CAFA60159B561066046609EDF2BC3C CC0A' +
'CC06CD094C0148621DDB8D40460BC614E3529E86100C60393 FD9B' +
'1B6F23174D');
AxeDTM:= DTMFromString('78DA6374606260B8C38006189148206D095 4F' +
'389801A6BA09A67B8D530C2CC7945408D0550CD5B026ACC81 6A3E' +
'1050E30454F380801A67A09AFB04D47800D5DC26A0C60DA8E 6161' +
'16AAE13E19E6B44F8FD260135A684DD0300CC7D1006');
Lost:= false;
if FindDTM(BrokenDTM, hx, hy, 546, 203, 737, 466) then
begin
Writeln('Broken Pick Found!');
if FindDTM(AxeDTM, hx, hy, 546, 203, 737, 466) then
begin
Writeln('Found a new pickaxe.');
end else
begin
result:= true;
Writeln('No More picks found! Logging out.');
LogOut;
end;
end;
if not FindDTM(AxeDTM, hx, hy, 546, 203, 737, 466) then
for i:= 4 to 5 do
begin
GameTab(i);
if FindDTM(HandleDTM, hx, hy, 546, 203, 737, 466) then
begin
Writeln('Handle Found!');
Lost:= true
if i = 5 then
begin
Wielded:= true;
Mouse(hx, hy, 0 ,0, true);
end;
end;
end;
GameTab(4);
if not Lost then exit else Writeln('Lost!');
repeat
if not (LoggedIn) then Exit;
c := c + 1;
x := Random(510) + 5;
y := Random(330) + 5;
if (FindColorSpiral(x, y, hc1, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc2, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc3, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc4, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc5, 3, 3, 515, 338)) then
begin
MMouse(x, y, 2, 2);
if IsUpTextMulti('Take', 'pick', 'head') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
end;
Flag;
Wait(1000 + Random(100));
lost:= not FindDTM(HeadDTM, hx, hy, 546, 203, 737, 466);
end;
until(c >= 10) or (Lost = false);
if (c >= 10) then
begin
Writeln('Could not find pick!');
exit;
end else
Writeln('Pick Head Found!');
for c:= 0 to 10 do
begin
if FindDTM(HandleDTM, hx, hy, 546, 203, 737, 466) then
if FindDTM(HeadDTM, mx, my, 546, 203, 737, 466) then
begin
Mouse(mx, my, 0, 0, true);
wait(500+random(600));
Mouse(hx, hy, 0, 0, true);
wait(1000+random(500));
result:= not FindDTM(AxeDTM, hx, hy, 546, 203, 737, 466);
if not result then
begin
Writeln('Pick Attached!');
break;
end;
end;
end;
FreeDTM(BrokenDTM);
FreeDTM(HandleDTM);
FreeDTM(HeadDTM);
FreeDTM(AxeDTM);
end;
function w_GasCheck(gx, gy: integer): boolean;
Var
x1, y1, x2, y2, I, time, c: Integer;
R, G, B: Integer;
H, S, L: ExtEnded;
X, Y, Z: ExtEnded;
Gas, Gas2: TPointArray;
Colors, C2: TIntegerArray;
begin
Try
x1 := gx - 35;
If x1 < 0 Then
x1 := 0;
y1 := gy - 35;
If y1 < 0 Then
y1 := 0;
x2 := gx + 35;
If x2 > 515 Then
x2 := 515;
y2 := gy + 35;
If y2 > 336 Then
y2 := 336;
Time := GetSystemTime;
Result := False;
c := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2ModIfiers(0.2, 0.2);
FindColorsTolerance(Gas, 8886170, x1, y1, x2, y2, 20);
ColorToleranceSpeed(c);
If length(Gas) < 10 Then
Exit;
Colors := GetColors(Gas);
C2 := Colors;
ClearSameIntegers(C2);
//writeln('w_Colors Length: ' + inttostr(length(colors)));
// writeln('w_C2 Length: ' + inttostr(length(C2)));
If Length(C2) < 40 Then
Exit;
For I := 0 To High(Gas) Do
Begin
ColorToRGB(Colors[i], R, G, B);
If Abs(R - G) <= 10.0 Then
Begin
ColorToHSL(Colors[i], H, S, L);
If (H > 11.5) And (H < 16.0) And (S < 12.0) Then
Begin
ColorToXYZ(Colors[i], X, Y, Z);
If (Abs(X - Y) < 5.0) And (Abs(X - Z) < 5.0) And (Abs(Y - Z) < 5.0) Then
Begin
SetLength(Gas2, Length(Gas2) + 1);
Gas2[High(Gas2)] := Gas[i];
End;
End;
End;
End;
WriteLn('w_time: ' + IntToStr(GetSystemTime - Time));
WriteLn('w_gas2 length: ' + IntToStr(Length(Gas2)));
Result := (Length(Gas2) > 30); // The only number you might want to tweak.
//debugtpa(Gas2, '');
If Result Then
Begin
GasesHandled := GasesHandled + 1;
WriteLn('*** GAS FOUND ***');
End;
Except WriteLn('w_gasCheck ERROR: No window selected'); End;
End;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
function FindMiningRandoms: boolean;
By: Pwnaz0r
Description: Finds if Pick is lost or if Gas is found.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
function FindMiningRandoms(x, y: integer): boolean;
var
rCount: integer;
begin
for rCount:= 0 to 5 do
begin
Case rCount of
0: if w_GasCheck(x, y) then
begin
result:= true;
HandleGas;
end;
1:
begin
result:=FindPick2;
if(result)then
begin
Reportvars[3]:= 1;
SendSRLReport;
end;
end;
2: if FindFight then
begin
RunTo(RunDir, false);
FTWait(RunWaitTime);
RunBack;
end;
3: if FindFastRandoms then result:= true;
4: if ((TimeFromMark(LevelChecker)) > (15 * 60000))then
begin
GetAllLevels;
Writeln('Got all levels.');
MarkTime(LevelChecker);
end;
end;
if result then
Writeln('Random Found!');
if result then exit;
end;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure StartScript;
By: Pwnaz0r
Description: Starts up the script.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure StartScript;
var
i: integer;
begin
SetupSRL;
rCheck:= 0;
ScriptId:= '287';
RocksMined:= 0; OreFinds:= 0; OreTime:= 0; InvalidCount:= 0; Recall:= False;
OreMask:= BitmapFromString(18, 16, 'beNpjYMAF/v//D2fA2fjBfyTA' +
'QBxAU4lVI0E1uKzD7wU8uuDqybCLSF/g14U/GDEDhJgwJz5SKNdIn' +
'l10s4h+AABnp3GP');
if SRLId = '' then
begin
SRLId:= '2776';
SRLPassword:= 'pwnscripts';
end;
SendSRLReport;
ClearDebug;
Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|');
Writeln('| This Script was made by: ______ |');
Writeln('| .-----.--.--.--.-----.---.-.-----.| |.----. |');
Writeln('| | _ | | | | | _ |-- __|| -- || _| |');
Writeln('| | __|________|__|__|___._|_____||______||__| |');
Writeln('| |__| Pwnaz0r@hotmail.com |');
Writeln('|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|');
Writeln('');
DeclarePlayers;
if not FindRS then
begin
writeln('Could not find Runescape');
TerminateScript;
end else
begin
ActivateClient;
wait(1500);
ClientHandle:= GetClientWindowHandle;
end;
if not LoggedIn then LoginWhich(CurrentPlayer);
MarkTime(LevelChecker);
FindPickHeadColor;
SetBar('brightness', 4);
SetRun(False);
if WearingItem(5) then
begin
Writeln('Please do not wield pick, it could mess up player''s mining.');
Takeoff(5);
wait(400);
end;
if WearingItem(7) then
begin
Writeln('Please Take off player''s shields. They can mess up mining.');
Takeoff(7);
wait(400);
end;
GetAllLevels;
ConvertMiningVarsToMyVars;
for i:= 0 to 2 do
ArrangeInv;
ReportVars[1]:= 1;
SendSRLReport;
end;
procedure ProgressReport; forward;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure DropAndReportStatus;
By: Pwnaz0r
Description: Drops all rocks in inventory and reports status
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure DropAndReportStatus;
begin
Gametab(4);
IncEx(Players[CurrentPlayer].Integers[0], CountItemBmpMaskTol(OreMask, 5, 5));
IncEx(RocksMined, CountItemBmpMaskTol(OreMask, 5, 5));
ProgressReport;
ScriptId:= '287';
ReportVars[0]:= CountItemBmpMaskTol(OreMask, 5, 5);
SendSRLReport;
ClickAllItemsBmpMaskTolWait(OreMask, 'rop', 5, 5, 950);
ArrangeInv;
end;
function MineRock(var x, y, Color: integer): boolean;
var
RockType, i: integer;
rPoints: TPointArray;
srPoints: TPointArrayArray;
begin
RockType:= -1;
case Lowercase(Players[CurrentPlayer].Strings[0]) of
'copper': RockType:= Copper_Color;
'tin': RockType:= Tin_Color;
'iron': RockType:= Iron_Color;
'silver': RockType:= Silver_Color;
'gold': RockType:= Gold_Color;
'coal': RockType:= Coal_Color;
'mithril', 'mith': RockType:= Mithril_Color;
'clay': RockType:= Clay_Color;
end;
if RockType = -1 then
begin
writeln('Invalid Rock Name! Logging out to change players');
Logout;
end;
wait(700);
x:= MSCX;
y:= MSCY;
FindColorsSpiralTolerance(x, y, rPoints, RockType, 5, 5, 500, 320, 4);
if Length(rPoints) <= 0 then
begin
Writeln('No Rocks Found!');
exit;
end;
srPoints:= TPAtoATPA(rPoints, 30);
SetArrayLength(rPoints, Length(srPoints));
for i:= 0 to Length(srPoints) - 1 do
rPoints[i]:= MiddleTPA(srPoints[i]);
for i:= 0 to Length(rPoints) - 1 do
begin
MMouse(rPoints[i].x, rPoints[i].y, 4, 4);
if IsUpTextMulti('ine', 'Mine', 'Rocks')then
begin
result:= true;
GetMousePos(x, y);
Color:= RockType;
Mouse(x, y, 1, 2, true);
wait(200);
exit;
end;
end;
end;
function FollowRock(var x, y, Color : integer): boolean;
begin
result:= FindColorSpiralTolerance(x, y, Color, x - 25, y - 25, x + 25, y + 25, 2);
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
function TimeOver(TimeBase, TimeCheck, TimeModifier: integer): boolean;
By: Pwnaz0r
Description: Returns true if the time from mark base is over the time check
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
function TimeOver(TimeBase, TimeCheck, TimeModifier: integer): boolean;
begin
result:= TimeFromMark(TimeBase) >= TimeCheck * TimeModifier;
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
function LoadsDone(Int: integer): boolean;
By: Pwnaz0r
Description: Returns true if the loads are done.
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
function LoadsDone(Int: integer): boolean;
begin
result:= Int >= (Loads * 28);
if result then Logout;
end;
function FFlag2(var x, y, Color: integer): boolean;
var
XK, YK, XL, YL: Integer;
var
T1, T2: Extended;
begin
T1 := GetTickCount;
repeat
T2 := GetTickCount;
Wait(100);
result:= FindColorSpiralTolerance(x, y, Color, x - 25, y - 25, x + 25, y + 25, 2);
if HumanCircleFlag(0) then
Break;
Wait(100);
if T2 - T1 > 10000 then
begin
if FindColor(XL, YL, 255, MMX1, MMY1, MMX2, MMY2) then
MouseFindFlag(XL, YL, 1, 1)
else Mouse(MMCX, MMCY, 0, 0, True);
Break;
end;
if Random(20) = 1 then IdleTime(500, 1000, 0.01);
until (not FindColor(XK, YK, 255, MMX1, MMY1, MMX2, MMY2));
end;
function RockGone(var x, y, Color: integer): boolean;
begin
result:= not FindColorSpiralTolerance(x, y, Color, x - 25, y - 25, x + 25, y + 25, 2);
if result then exit else
result := FindColorSpiral(x, y, 5460825, x - 10, y - 10, x + 10, y + 10);
end;
{<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
procedure PlayerLoop(MaxplayerTime, MaxLoadTime, MaxRockTime: integer);
By: Pwnaz0r
Description: Executes the player loop
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> }
procedure PlayerLoop(MaxplayerTime, MaxLoadTime, MaxRockTime: integer);
var
PlayerTime, LoadTime, RockTime, rx, ry, Col: integer; //Failsafe vars. Timers.
begin
repeat
if not LoggedIn then LoginPlayer;
begin
MarkTime(PlayerTime);
repeat
if not LoggedIn then break;
begin
MarkTime(LoadTime);
repeat
if not LoggedIn then break;
HighestAngle;
begin
MarkTime(RockTime);
repeat
if InvFull then break;
if not LoggedIn then break;
if TimeOver(RockTime, MaxRockTime, 1000) then
begin
Writeln('Breakout');
break;
end;
FindFastRandoms;
if MineRock(rx, ry, Col) then
begin
FindNormalRandoms;
if FFlag2(rx, ry, Col) then
begin
repeat
if InvFull then break;
if not LoggedIn then break;
Loc('Mining');
FindMiningRandoms(rx, ry);
if TimeOver(RockTime, MaxRockTime, 1000) then break;
wait(1);
FindTalk;
until(RockGone(rx, ry, Col));
end;
FindFastRandoms;
if not LoggedIn then break;
end;
until(TimeOver(RockTime, MaxRockTime, 1000));
end;
if TimeOver(LoadTime, MaxLoadTime, 60000) then
begin
Writeln('Load time breakout');
break;
end;
Until(InvFull);
end;
DropAndReportStatus;
ProgressReport;
FindNormalRandoms;
if TimeOver(PlayerTime, MaxPlayerTime, 60000) then
begin
Writeln('Player time is up!');
break;
end;
Until(LoadsDone(Players[CurrentPlayer].Integers[0]));// <-- Must log you out!!!
end;
if AllPlayersInActive then break;
if Not Loggedin then GoToNextPlayer(false) else
GoToNextPlayer(true);
Until(AllplayersInactive);
end;
procedure ProgressReport;
var
H, M, S, I : integer;
begin
SRLRandomsReport;
Writeln(' /=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\');
Writeln(' | [SRL]Powerminer Version '+V+' |');
Writeln(' | By : Pwnaz0r |');
Writeln(' \-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/');
Writeln('');
ConvertTime(GetTimeRunning,H,M,S);
Writeln(' Worked For ' + InttoStr(H) + ' hours, ' + IntToStr(M) + ' minutes and '+ IntToStr(S) + ' seconds ');
Writeln(' Mined '+IntToStr(RocksMined)+' rock(s)');
Writeln(' Handled '+IntToStr(GasesHandled)+' gas(es)');
Writeln('');
Writeln(' # | Nick | MiningLevel | RocksMined | Gases Encountered | Loc');
For I := 0 to HowManyPlayers - 1 do
begin
Writeln(' '+IntToStr(I)+' | '+Players[i].Nick+' | ML = '+IntToStr(Players[i].Level[13])+' | Mined '+IntToStr(Players[i].Integers[0])+' rocks | Handled '+IntToStr(Players[CurrentPLayer].integers[1])+' gases | Loc: '+Players[i].Loc);
end;
end;
begin
StartScript;
PlayerLoop(PTimeout, LTimeout, RTimeout);;
end.
so... right? wrong? where did I screw up? and could you please mod it the way I requested at the top? would be happy to recommend you and add to your rep if this happens.
if anyone has a better script or can help me set it up I have all SRLID and that shi*, please just post or pm me.
Thanks for all:
M.A.O.X.


Reply With Quote













