Guest User

Untitled

a guest
May 20th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 19.03 KB | None | 0 0
  1. {/----------------------------------------------------------------------\\
  2. | .: [D]warven [R]esource. [D]ungeon [I]nsane [C]oal [K]ollector :.      |
  3. \\----------------------------------------------------------------------//
  4. {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}                                    {
  5. //----------------------------------------------------------------------\\
  6. |                            .:Version History:.                         |
  7. |  ☼1.00:                                                                |
  8. |     -Initial Release, Should Work :p, Feedback Appreciated             |
  9. \------------------------------------------------------------------------/}
  10.  
  11. Program DrDick;
  12. {$DEFINE SMART}
  13. {$i SRL\SRL.simba}
  14. {$i SRL\SRL\Misc\Debug.simba}
  15.  
  16.  
  17. Const
  18.  SRLStats_Username = ''; // Your SRL Stats Username
  19.  SRLStats_Password = ''; // Your SRL Stats Password
  20.  NumbOfPlayers= 1;     //How many players are you using
  21.  StartPlayer=   0;     //Player to start auoting with! (0 means first char)
  22.  LoadsPerLogin= 15;     //How Many Loads To Do Per Login!
  23.  LoadsTotal=    9999;  //How Many Total Lods To Do Per Character!
  24.  YDebug=        False;  //Leave Alone
  25.  Version=       '1.00'; //NO TOUCHY!
  26.  
  27. {*******************************************************************************
  28. procedure DeclarePlayers;
  29. By: SRL
  30. Description: SRL's Player Setup
  31. *******************************************************************************}
  32. procedure DeclarePlayers;
  33. var i:integer;
  34. begin
  35.   NumberOfPlayers(NumbOfPlayers);
  36.   CurrentPlayer := StartPlayer;
  37.   for i := 0 to NumbOfPlayers-1 do
  38.     Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
  39.  
  40.   with Players[0] do
  41.   begin
  42.     Name        := '';     //Player username.
  43.     Pass        := '';     //Player password.
  44.     Active      := True;
  45.     Integers[2] := 10;      //Seconds to try mining rock before clicking another.
  46.   end;
  47.  
  48. end;
  49.  
  50. Var TOres,TLoads,WeMined,StartTime:Integer;
  51. Var SleepTime,SleepCounter,SleepMinutes,RT,LoginWait:Integer;
  52.  
  53.  
  54. {*******************************************************************************
  55. Procedure StatsGuise(wat:String);
  56. By: YoHoJo
  57. Description: Combination of Status & Diguise
  58. *******************************************************************************}
  59. Procedure StatsGuise(wat:String);
  60. Begin
  61.   Status(wat);
  62.   Disguise(wat);
  63. End;
  64.  
  65.  
  66. Procedure FailSafe(Reason:String);
  67. Begin
  68.   Players[CurrentPlayer].Loc:=Reason;
  69.   Logout;
  70.   Stats_Commit;
  71.   //ProgressReport;
  72.   LogOut;
  73.   Writeln(Reason);
  74. End;
  75.  
  76. {*******************************************************************************
  77. Function CheckAndClick(X,Y:Integer):Boolean;
  78. By: YoHoJo
  79. Description: Moves mouse to x,y, checks for uptext, and clikcs if found
  80. *******************************************************************************}
  81. Function CheckAndClick(UpText:String; X,Y:Integer; RClick:String):Boolean;
  82. Begin
  83.   MMouse(x, y, 5, 5);
  84.   If WaitUptext(UpText, 1500+Random(500)) Then
  85.   Begin
  86.     Result:=True;
  87.     GetMousePos(x, y);
  88.  
  89.     Case RClick Of
  90.  
  91.       'R':
  92.       Begin
  93.         Mouse(x, y, 0, 0, False);
  94.         Result:= WaitOption('own', 2000);
  95.         If Result Then FFlag(0);
  96.       End;
  97.  
  98.       'L':
  99.       Begin
  100.         Mouse(x, y, 0, 0,True);
  101.         Wait(100+Random(50));
  102.         FFlag(0);
  103.       End;
  104.  
  105.     End;
  106.   End;
  107. End;
  108.  
  109. {Flght made these two}
  110.   Function Mining: Boolean;
  111.   var
  112.     PBox: TBox;
  113.   begin
  114.     PBox := IntToBox(245, 130, 285, 195);
  115.     Result := (AveragePixelShift(PBox, 250, 500) > 260);
  116.   end;
  117.  
  118.   Function GetShiftCount: Integer;
  119.   var
  120.     PBox: TBox;
  121.   begin
  122.     PBox := IntToBox(245, 130, 285, 195);
  123.     Result := AveragePixelShift(PBox, 250, 500);
  124.   end;
  125. {hope you enjoyed your flight}
  126.  
  127. {*******************************************************************************
  128. Function OreInLast:Boolean;
  129. By: YoHoJo
  130. Description: Checks if an ore/gem is in last inventory slot
  131. *******************************************************************************}
  132. Function OreInLast:Boolean;
  133. Begin
  134.   {If ( GetColor(703, 458) And GetColor(702, 441) = 131072 ) Or
  135.      ( GetColor(696, 436) And GetColor(708, 456) = 131072 ) Then}
  136.   If InvFull Then
  137.    Result:=True;
  138. End;
  139.  
  140. {*******************************************************************************
  141. Procedure Antiban;
  142. By: YoHoJo/SRL
  143. Description: Multiple antiban procedures from SRL
  144. *******************************************************************************}
  145. Procedure Antiban;
  146. Begin
  147.   Case Random(350) Of
  148.     0: HoverSkill('Mining', False);
  149.     1: Begin PickUpMouse; SleepAndMoveMouse(5000 + Random(500)); End;
  150.     2: ExamineInv;
  151.     3: RandomAngle(1);
  152.     4: Begin GameTab(Tab_Stats); Wait(1500 + Random(500)); GameTab(Tab_Inv); End;
  153.     5: HoverSkill('random', False);
  154.   End;
  155. End;
  156.  
  157. function AC(What:String): Integer;
  158. var
  159.   arP: TPointArray;
  160.   arC, ACInfoI: TIntegerArray;
  161.   ACInfoE: TExtendedArray;
  162.   tmpCTS, i, arL: Integer;
  163. begin
  164.   Case What of
  165.  
  166.     'GreyFloor':  Begin ACInfoI:=[7171430, 5]; ACInfoE:=[9.45, 0.39]; End;
  167.     'BrownFloor': Begin ACInfoI:=[5994118, 5]; ACInfoE:=[0.51, 0.72]; End;
  168.  
  169.   End;
  170.   tmpCTS := GetColorToleranceSpeed;
  171.   ColorToleranceSpeed(2);
  172.   SetColorSpeed2Modifiers(ACInfoE[0], ACInfoE[1]);
  173.  
  174.   FindColorsTolerance(arP, ACInfoI[0], MMX1, MMY1, MMX2, MMY2, ACInfoI[1])
  175.  
  176.   arC := GetColors(arP);
  177.   ClearSameIntegers(arC);
  178.   arL := High(arC);
  179.   Writeln(IntToStr(Length(arC)));
  180.   for i := 0 to arL do
  181.   begin
  182.     Result := arC[i];
  183.     Break;
  184.   end;
  185.  
  186.   ColorToleranceSpeed(tmpCTS);
  187.   SetColorSpeed2Modifiers(0.2, 0.2);
  188.  
  189. end;
  190.  
  191. Function ClickObject(WhatObject:String):Boolean;
  192. var I:Integer;
  193.     ObjectInfoI: TIntegerArray;
  194.     ObjectInfoE: TExtendedArray;
  195.     ObjString, Click:   String;
  196.     GatePts:TPointArray;
  197.     GatePtsBox: T2DPointArray;
  198.     GatePt: TPoint;
  199.     HighGate, Pixels:Integer;
  200.  
  201. Begin
  202.  
  203.   Case WhatObject of
  204.    {ObjectInfoI[Color, Tolerance, BoxX, BoxY, Xmov, Ymov, SortX, SortY]}
  205.     'DBox':
  206.     Begin
  207.       StatsGuise('Clicking Deposit Box');
  208.       ObjString:= 'Bank';
  209.       ObjectInfoE:=[0.15 , 0.58];
  210.       ObjectInfoI:=[6653850, 3, 20, 20, 0, 0, MSX2, MSY1];
  211.       Pixels:= 120;
  212.       Click:= 'L';
  213.     End;
  214.  
  215.     {'DungeonDown':
  216.     Begin
  217.       StatsGuise('Trying To Go Down Broken Stairs');
  218.       ObjString:='ung';
  219.       ObjectInfoE:=[1.12 , 0.43];
  220.       ObjectInfoI:=[2237477, 10, 25, 25, 5, 0, MSCX, MSCY];
  221.       Pixels:= 400;
  222.       RiCli:= False;
  223.     End;}
  224.  
  225.   End;
  226.   ColorToleranceSpeed(2);
  227.   SetColorSpeed2Modifiers(ObjectInfoE[0] , ObjectInfoE[1]);
  228.   FindColorsSpiralTolerance(MSCX,MSCY,GatePts,ObjectInfoI[0],MSX1,MSY1,MSX2,MSY2,ObjectInfoI[1]);
  229.   SetColorSpeed2Modifiers(0.2,0.2);
  230.   ColorToleranceSpeed(1);
  231.   GatePtsBox:= TPAtoATPAEx(GatePts,ObjectInfoI[2],ObjectInfoI[3]);
  232.   //DebugATPA(GatePtsBox,'');
  233.   SortATPAFrom(GatePtsBox,Point(ObjectInfoI[6],ObjectInfoI[7]));
  234.   HighGate:=High(GatePtsBox);
  235.   For I:=0 To HighGate Do
  236.   Begin
  237.     If Not(LoggedIn) Then Break;
  238.     If GetArrayLength(GatePtsBox[I])>Pixels Then
  239.     Begin
  240.       GatePt:= MiddleTPA(GatePtsBox[I]);
  241.       //If GatePt.Y > 120 Then Continue;
  242.       If CheckAndClick( ObjString, GatePt.x + (ObjectInfoI[4]),GatePt.y + (ObjectInfoI[5]), Click) Then
  243.       Begin
  244.         Result:=True;
  245.         Break;
  246.       End Else
  247.       Continue;
  248.     End;
  249.   End;
  250. End;
  251.  
  252. function Walking(Color, Tolerance, dX, dY: Integer; SortFrom: tpoint): Boolean;
  253. var
  254.   i, x, y, rx, ry: Integer;
  255.   TPA: TPointArray;
  256. begin
  257.   if not LoggedIn then Exit;
  258.   FindNormalRandoms;
  259.   FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
  260.   //Writeln(IntToStr(Length(TPA)));
  261.   SortTPAFrom(TPA, SortFrom);
  262.  
  263.   for i := 0 to High(TPA) do
  264.   begin
  265.     x := TPA[i].x;
  266.     y := TPA[i].y;
  267.  
  268.     rx := RandomRange(-6, 6);
  269.     ry := RandomRange(-6, 6);
  270.     if (not rs_OnMinimap(x + rx, y + ry)) then
  271.       Continue;
  272.  
  273.     Mouse(x + rx + dX, y + ry + dY, 0, 0, true);
  274.     FFlag(0);
  275.     Wait(200 + Random(500));
  276.     Result := True;
  277.     Break;
  278.   end;
  279. end;
  280.  
  281. Procedure WalkToDBox;
  282. //Var
  283.   ///I, X, Y: Integer;
  284.  
  285. Begin
  286.   StatsGuise('Walking To DBox');
  287.   Walking(AC('BrownFloor'), 20, 0, 0,Point(MMX1, MMCY));
  288.   Wait(2000);
  289.   FFlag(2);
  290.   Walking(AC('GreyFloor'), 15, 0, 0,Point(MMX1, MMY1));
  291.   FFlag(2);
  292.   {If RadialWalkEx(WalkTPA, AC('BrownFloor'),230, 320, 65, -1, 0, 15) Then
  293.   Begin
  294.     For I:=0 To High(WalkTPA) Do
  295.     Begin
  296.       If MouseFlagEx(X, Y, 2, 2, -1, -1, 2, True, False) Then
  297.       Break;
  298.     End;
  299.   End;
  300.   If RadialWalkEx(WalkTPA, AC('BrownFloor'),340, 270, 30, -1, 0, 15) Then
  301.   Begin
  302.     For I:=0 To High(WalkTPA) Do
  303.     Begin
  304.       If MouseFlagEx(X, Y, 2, 2, -1, -1, 2, True, False) Then
  305.       Break;
  306.     End;
  307.   End; }
  308.   Repeat
  309.     Wait(100)
  310.   Until (Not(IsMoving))
  311.   StatsGuise('Reached DBox');
  312. End;
  313.  
  314. Procedure WalkToRocks;
  315. Begin
  316.   Walking(AC('BrownFloor'), 20, 0, 0,Point(MMX2, MMCY));
  317.   Wait(2000);
  318.   FFlag(2);
  319.   Case Random(2) Of
  320.     0:
  321.     Begin
  322.       Mouse(660, 45, 5, 5, True);
  323.       Wait(500+Random(100));
  324.       Flag;
  325.     End;
  326.     1:
  327.     Begin
  328.       Mouse(674, 129, 5, 5, True);
  329.       Wait(500+Random(100));
  330.       Flag;
  331.     End;
  332.   End;
  333. End;
  334.  
  335. Procedure DepositOres;
  336. Begin
  337.   If Not ClickObject('DBox') Then
  338.   Begin
  339.     Walking(AC('GreyFloor'), 15, 0, 0,Point(MMX1, MMY1));
  340.     FFlag(2);
  341.   End;
  342.   ClickObject('DBox');
  343.   FFlag(0);
  344.   If WaitColor(370, 39, 0, 0, 5000) Then
  345.     Mouse(312, 278, 10, 10, True)
  346.   Else
  347.     FailSafe('Deposit Box');
  348. End;
  349.  
  350. Procedure DepositAndBank;
  351. Begin
  352.   WalkToDBox;
  353.   DepositOres;
  354.   WalkToRocks;
  355. End;
  356.  
  357. type
  358.   Custom = record
  359.     Bool: boolean;
  360.     Int: Integer;
  361.   end;
  362.  
  363.  
  364. {*******************************************************************************
  365. Function MineRock(WutRock:Integer):Boolean;
  366. By: YoHoJo
  367. Description: Mines rock, uses ATPAs, waits until ore recieved or timer reached
  368. *******************************************************************************}
  369. Function MineRock(WutRock:Integer):Custom;
  370. var I,PlusOne,tMine,J:Integer;
  371.     OrePts, RockPts:TPointArray;
  372.     RockPtsBox, BingoBox: T2DPointArray;
  373.     BingoPt: TPoint;
  374.     SearchBox: TBox;
  375. Begin
  376.   If Not(LoggedIn) Then Exit;
  377.   J:=0;
  378.   StatsGuise('Searching For Rock: '+ IntToStr(InvCount));
  379.   If OreInLast Then Exit;
  380.  
  381.   ColorToleranceSpeed(2);
  382.   SetColorSpeed2Modifiers(0.04, 1.27);
  383.   FindColorsSpiralTolerance(MSCX, MSCY, RockPts, 1461093, MSX1, MSY1, MSX2, MSY2, 10);
  384.   SetColorSpeed2Modifiers(0.2,0.2);
  385.   ColorToleranceSpeed(1);
  386.  
  387.   RockPtsBox:=TPAtoATPAEx(RockPts,35,35);
  388.   {DebugATPABounds(RockPtsBox);
  389.   Writeln('This is RockPtsBox');}
  390.  
  391.  
  392.   //Writeln('RockPts ' + IntToStr (GetArrayLength(RockPts) ) );
  393.  
  394.   For I:=0 To High(RockPtsBox) Do
  395.   Begin
  396.     If Not(LoggedIn) Then Break;
  397.     //Writeln('Searching Box ' +IntToStr (i));
  398.     SearchBox:= GetTPABounds(RockPtsBox[i]);
  399.     //Writeln( IntToStr(SearchBox.x1) + ',' + IntToStr(SearchBox.y1)+ ',' + IntToStr(SearchBox.x2)+ ',' + IntToStr(SearchBox.y2) );
  400.     If (GetArrayLength(RockPtsBox[I]) > 30) Then
  401.     Begin
  402.       If YDebug Then DebugATPA(RockPtsBox,'');
  403.       ColorToleranceSpeed(2);
  404.       SetColorSpeed2Modifiers(1.39,0.11);
  405.       FindColorsSpiralTolerance(MSCX,MSCY,OrePts,2434854,SearchBox.x1,SearchBox.y1,SearchBox.x2,SearchBox.y2,10);
  406.       //Writeln('OrePts ' + IntToStr (GetArrayLength(OrePts) ) );
  407.       SetColorSpeed2Modifiers(0.2,0.2);
  408.       ColorToleranceSpeed(1);
  409.       If High(OrePts) > 1 Then
  410.       Begin
  411.         BingoBox:=TPAtoATPAEx(OrePts, 10, 10);
  412.         For I:=0 To High(BingoBox) Do
  413.         Begin
  414.           //DebugTPA(OrePts,'');
  415.           //Writeln('This is BingoBox');
  416.           If GetArrayLength(BingoBox[I])>4 Then
  417.           Begin
  418.             BingoPt:= MiddleTPA(BingoBox[I]);
  419.             If CheckAndClick('ine', BingoPt.x,BingoPt.y, 'L') Then
  420.             Begin
  421.               Result.Bool:=True;
  422.               MarkTime(tMine);
  423.               StatsGuise('Mining Rock: '+ IntToStr(InvCount));
  424.               Players[CurrentPlayer].Loc:='Mining';
  425.               PlusOne:=InvCount+1;
  426.               Repeat
  427.                 If Not(LoggedIn) Then Break;
  428.                 Antiban;
  429.                 LevelUp;
  430.                 Wait(500);
  431.                 RT:=GetSystemTime;
  432.                 If FindNormalRandoms Then
  433.                   IncEx(WeMined,GetSystemTime - RT);
  434.                 If Random(50)=1 Then SleepAndMoveMouse(500+Random(100));
  435.                 //If (Not(IsMoving)) Then Begin Writeln('a'); Break; End;
  436.                 If InvCount=PlusOne Then
  437.                 Begin
  438.                   Inc(J);
  439.                   TOres:=TOres + J;
  440.                   Inc(Players[CurrentPlayer].Integers[81]);
  441.                 End;
  442.               Until (InvCount = PlusOne) Or Not Mining  Or (TimeFromMark(tMine) > ((Players[CurrentPlayer].Integers[2]*1000) + Random(500)));
  443.               Exit;
  444.             End;
  445.           End;
  446.         End;
  447.       End Else Continue;
  448.     End;
  449.   Wait(750+Random(250));
  450.   End;
  451. End;
  452.  
  453. {*******************************************************************************
  454. Procedure ProgXP;
  455. By: YoHoJo
  456. Description: Calculates player's XP for progress reprot
  457. *******************************************************************************}
  458. Procedure ProgXP;
  459. var
  460.   I:Integer;
  461. Begin
  462.   For I:=0 to HowManyPlayers -1 Do
  463.     Players[i].Extendeds[1]:=50;
  464. End;
  465.  
  466. Procedure StatsCommit;
  467. Var
  468.   OreMid{X, Y}:Integer;
  469.   HowMany, CoalInteger:Integer;
  470. Begin
  471.   OreMid := DTMFromString('78DA63CC626260E0606440054C601226CA584' +
  472.        'C849A3C209F8F809A6C209F19BF1A00AD2101F4');
  473.  
  474.   HowMany:=CountItemsIn('inv', 'DTM', OreMid, []);
  475.  
  476.   //WriteLn('Coal Count:'+IntToStr(HowMany));
  477.   stats_IncVariable('Coal Ore (Mined)', HowMany );
  478.   stats_IncVariable('Mining EXP (Gained)', (HowMany) * 50);
  479.   stats_IncVariable('Loads Done', 1);
  480.  
  481.   Inc(TLoads);
  482.   Inc(Players[CurrentPlayer].Integers[82]);
  483.  
  484.   FreeDTM(OreMid)
  485. End;
  486.  
  487. {*******************************************************************************
  488. Procedure BasicSetup;
  489. By: YoHoJo Mainly:Tarajunky/Dankness
  490. Description: Mini progress reprot for each individual player
  491. *******************************************************************************}
  492. procedure PlayerStats;
  493. var Active: string;
  494.     i: Integer;
  495. begin
  496.   Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
  497.   Writeln('# : Nick = A : Level  Worked   Mined  Loads  XP   Location');
  498.   for i := 0 to HowManyPlayers - 1 do
  499.   begin
  500.     if (Players[i].Active) then Active:='T' else Active:='F';
  501.     Writeln(Padr(Inttostr(I),2) + ': ' + Padr(Players[i].Nick,4) + ' = ' + Padr(Active,5)
  502.     +''+Padr(inttostr(Players[i].level[15]),5)+''
  503.     +''+Padr(MsToTime(Players[i].Worked,Time_Bare),11)+''
  504.     +''+Padr(IntToStr(Players[i].integers[80]),7)+''
  505.     +''+Padr(IntToStr(Players[i].integers[81]),6)+''
  506.     +''+Padr(FloatToStr((Players[i].integers[80])*(Players[i].Extendeds[1])),6)+''
  507.     +'L:'+Players[i].Loc);
  508.   end;
  509.   Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
  510. end;
  511.  
  512. {*******************************************************************************
  513. procedure ProgressReport;
  514. By: YoHoJo Mainly:Tarajunky/Dankness
  515. Description: Overall progress/randoms reprot
  516. *******************************************************************************}
  517. procedure ProgressReport;
  518. var Sec,Orerate,LoadRate:integer;
  519. begin
  520.   SRLRandomsReport;
  521.   Stats_Commit;
  522.   Sec:= (1+((Getsystemtime-StartTime)/1000));
  523.   OreRate:=(3600*(TOres))/(Sec);
  524.   LoadRate:=(3600*(TLoads))/(Sec);
  525.   Writeln('[REPORT]');
  526.   Writeln ('8=======================================D');
  527.   Writeln ('| -->     Dr. Dick '+Version+'             <-- |');
  528.   Writeln ('8=======================================D');
  529.   Writeln('|' + PadR(  ('Worked for '+ TimeRunning), 39) + '|');
  530.   Writeln('|' + PadR(  ('Mined '+IntToStr(TOres)+' ores at a rate of '+IntToStr(OreRate)+' per hour'), 39) + '|');
  531.   Writeln('|' + PadR(  ('Mined '+IntToStr(TLoads)+' loads at a rate of '+IntToStr(LoadRate)+' per hour'), 39) + '|');
  532.   Writeln ('8=======================================D');
  533.   Writeln('[/REPORT]');
  534.  // PlayerStats;
  535. end;
  536.  
  537. {*******************************************************************************
  538. Function OverAnd:Boolean;
  539. By: YoHoJo
  540. Description: Checks if its time to switch players based on loads mined
  541. *******************************************************************************}
  542. Function OverAnd:Boolean;
  543. Begin
  544.   If (not(Players[CurrentPlayer].Integers[82]=0)) Then
  545.    If (Players[CurrentPlayer].Integers[82] Mod LoadsPerLogin)=0 Then
  546.     Result:=True;
  547. End;
  548.  
  549. Begin
  550.  
  551.   SMART_Server:=35;
  552.   SMART_Signed:=True;
  553.   SMART_Members:=False;
  554.  
  555.   SetupSRL;
  556.  
  557.   if (SRLStats_Username = '') then
  558.     SetupSRLStats(331, 'Anonymous', 'anon1337')
  559.   else
  560.     SetupSRLStats(331, SRLStats_Username, SRLStats_Password);
  561.   MouseSpeed:=30;
  562.   StartTime:=GetSystemTime;
  563.   DeclarePlayers;
  564.   ProgXP;
  565.   Repeat
  566.     LoginPlayer; if (SRL_Logs < 1) then SRL_Logs := 1;
  567.     Players[CurrentPlayer].Integers[82]:=0; //Temp Loads
  568.     //Players[CurrentPlayer].Level[14]:=GetSkillLevel(14);
  569.     //StatsGuise(Players[CurrentPlayer].Nick + ' Mining Lv ' +IntToStr(Players[CurrentPlayer].Level[15]));
  570.     SetRun(True);
  571.     SetAngle(SRL_ANGLE_HIGH);
  572.     MarkTime(WeMined);
  573.     Repeat
  574.       If Not(LoggedIn) Then Break;
  575.       If MineRock(Players[CurrentPlayer].Integers[1]).Bool=True Then MarkTime(WeMined);
  576.       RT:=GetSystemTime;
  577.       If FindNormalRandoms Then
  578.        IncEx(WeMined,GetSystemTime - RT);
  579.       If (TimeFromMark(WeMined) > 90000) Then
  580.       Begin
  581.         SaveScreenShot(TheDate(1) + ' ' + Replace(TheTime, ':', '_') + '.bmp');
  582.         Players[CurrentPlayer].Loc:='Cant Find Rock :(';
  583.         StatsGuise('NP:Cnt.Fnd.Rock');
  584.         PlayerCurTime := GetSystemTime;
  585.         Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked + (PlayerCurTime - PlayerStartTime);
  586.         Logout;
  587.         Break;
  588.       End;
  589.       If OreInLast Then Begin MarkTime(WeMined);StatsCommit; DepositAndBank; ProgressReport; End;
  590.       If (Players[CurrentPlayer].Integers[81] = LoadsTotal) Then
  591.       Begin
  592.         Players[CurrentPlayer].Loc:='Finished Loads!';
  593.         StatsGuise('NP:Fin.All.Load');
  594.         PlayerCurTime := GetSystemTime;
  595.         Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked + (PlayerCurTime - PlayerStartTime);
  596.         Logout;
  597.         Break;
  598.       End;
  599.     Until (OverAnd);
  600.     Players[CurrentPlayer].Active := LoggedIn;
  601.     PlayerCurTime := GetSystemTime;
  602.     Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked + (PlayerCurTime - PlayerStartTime);
  603.     Logout;
  604.     StatsGuise('NP:NextPlayer');
  605.     ProgressReport;
  606.     If AllPlayersInactive Then
  607.     Begin
  608.       PlayerCurTime := GetSystemTime;
  609.       Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked + (PlayerCurTime - PlayerStartTime);
  610.       LogOut;
  611.       StatsGuise('All Players Inactive');
  612.       TerminateScript;
  613.     End;
  614.     Currentplayer:=NextPlayerIndex;
  615.     MarkTime(LoginWait);
  616.     While Not(RsReady) Do
  617.     Begin
  618.       Wait(1000);
  619.       If TimeFromMark(LoginWait)>30000 Then Break
  620.     End;
  621.   Until(False);
  622. End.
Add Comment
Please, Sign In to add comment