Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. Program Huthaifahs_Great_WoodCutter;
  2. {$DEFINE SMART}
  3. {$i SRL/SRL.scar}
  4.  
  5. const
  6. LOGS = 99999; //How many logs you want to cut
  7. //Bank_DR = 'db'; // (Draynor Bank)
  8. Var Logs_Chopped: Integer;
  9.  
  10. procedure DeclarePlayers;
  11. begin
  12. HowManyPlayers := 1;
  13. CurrentPlayer := 0;
  14. NumberOfPlayers(HowManyPlayers);
  15.  
  16. with Players[0] do
  17. begin
  18. Name := '';
  19. Pass := '';
  20. Nick := '';
  21. Pin := '';
  22. Member := True;
  23. Active := True;
  24. end;
  25. end;
  26.  
  27. function FindTree: Boolean;
  28. Var
  29. TreeLocation :Tpoint;
  30. begin
  31. if not LoggedIn then Exit;
  32.  
  33. if (FindColorTolerance(TreeLocation.x, TreeLocation.y, 1324067, MSX1, MSY1, MSX2, MSY2, 5)) then
  34. begin
  35. MMouse(TreeLocation.X, TreeLocation.Y, 0, 0);
  36. if (WaitUpTextMulti(['Chop_Down', 'Willow'], RandomRange(400, 550))) then
  37. begin
  38. Result := True;
  39. writeln('Successfully found and clicked a tree');
  40. Mouse(0, 0, 0, 0, leftclick): true;
  41. end else
  42. begin
  43. Result := False;
  44. writeln('FindColor true but uptext false, Result := False');
  45. end;
  46. end else
  47. begin
  48. Result := False;
  49. writeln('Could not find the correct colour, Result := False');
  50. Exit;
  51. end;
  52. end;
  53.  
  54. Procedure BankLogs;
  55. begin
  56. Logs_Chopped := Logs_Chopped + 28;
  57. end;
  58.  
  59. Procedure WalkToTrees;
  60. begin
  61. end;
  62.  
  63. Procedure WalkToBank;
  64. begin
  65. end;
  66.  
  67. begin
  68. SetupSRL;
  69. DeclarePlayers;
  70. LoginPlayer;
  71. Logs_Chopped := 0;
  72. repeat
  73. while (not(InvFull)) do
  74. FindTree;
  75. WalkToBank;
  76. BankLogs;
  77. WalkToTrees;
  78. until (Logs_Chopped >= LOGS);
  79. Logout;
  80. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement