Advertisement
Guest User

Untitled

a guest
Mar 10th, 2013
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. //OSRS07 - Willow Cutter and banker v0.2
  2. //Amberleaf
  3. //Instructions & more scripts can be found at http://www.scar-divi.com
  4. //9/3/13
  5.  
  6. {.include OSI\OSI.scar}
  7.  
  8. {$DEFINE RS07}
  9.  
  10. {$I MSSL\MSSL.scar}
  11.  
  12. const
  13. tree = 2317649;
  14. tree1 = 2910814;
  15. tree2 = 2447955;
  16. tree3 = 3632738;
  17. tree4 = 4094833;
  18.  
  19.  
  20. procedure ScriptTerminateMSSL;
  21. begin
  22. MSSL_Unsetup;
  23. end;
  24.  
  25. procedure ScriptTerminate;
  26. begin
  27. FreeOSI;
  28. end;
  29.  
  30. procedure GetBanking;
  31. var
  32. x, y, x1, y1: Integer;
  33.  
  34. begin
  35. if RS07_InventoryFull then // bag full
  36. begin
  37. RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_VERY_BRIGHT);
  38. MMouse(654, 26, 0, 0); //mouse over map
  39. Wait(50);
  40. If FindColorTol(x1, y1, 195836, 636, 14, 655, 45, 15) then // find ppl in bank
  41. begin
  42. MMouse(x, y, 0, 0); // mouse in bank on ppl
  43. Wait(200);
  44. Mouse(x1+17, y1+9, 0, 0, True); // left click position and run to bank
  45. WaitRR(13000, 16500);
  46. begin
  47. if RS07_OpenBank(RS07_BANK_DRAYNOR) then //find bank
  48. RS07_DepositEx(1, -1);
  49. MMouse(577, 231, 0, 0);
  50. WaitRR(250, 750);
  51. WaitRR(500, 1400);
  52.  
  53. WaitRR(550, 1250);
  54. RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_NORMAL);
  55. RS07_SetCompassDir('N');
  56. Mouse(626, 134, 1, 1, True);
  57. WaitRR(8000, 12000);
  58. end;
  59. end;
  60. end;
  61. end;
  62.  
  63. procedure GetChopping;
  64. var x, y, x1, y1: Integer;
  65. begin
  66. If FindColorsSpiralTol(227, 159, x, y, [tree, tree1, tree2, tree3, tree4], 1, 1, 510, 334, 2) then
  67. begin
  68. MMouse(x, y, 0, 0);
  69. Wait(50);
  70. WriteLn('found a tree...');
  71. GetMousePos(x1, y1);
  72. MMouse(x, y, 10, 5);
  73. If FindColorTol(x, y, 14474496, 12, 12, 90, 19, 99) then
  74. begin
  75. Mouse(x1, y1, 0, 0, True);
  76. repeat
  77. Wait(50+ Random(100));
  78. GetMousePos(x, y);
  79. Wait(50+ Random(100));
  80. MMouse(x, y, 6, 7);
  81. GetBanking;
  82. WaitRR(550, 7000);
  83. If GetKeyState(VK_F12) then
  84. begin
  85. TerminateScript;
  86. end;
  87. //search for randoms here would be awesome. WIP
  88. until (FindColorTol(x, y, 14474496, 12, 12, 90, 19, 99) = False);
  89. //MMouse(x + Random(100), y - Random(100), 0, 0);
  90. //Wait(RandomRange(MINWAITTIME, MAXWAITTIME)); // adjust this time for faster/slower switching speed between trees.
  91. FindColorsSpiralTol(227, 159, x, y, [tree, tree1, tree2, tree3, tree4], 1, 1, 510, 334, 14);
  92. end else ;
  93. If FindColorTol(x, y, 14474496, 12, 12, 90, 19, 99) = False then
  94. begin
  95. GetMousePos(x, y);
  96. MMouse(x, y, 45, 90);
  97. Wait(50 + Random(100));
  98. MMouse(x, y, 90, 45);
  99. Wait(50 + Random(100));
  100. MMouse(x, y, 30, 30);
  101. Wait(50 + Random(100));
  102. end;
  103. If GetKeyState(VK_F12) then
  104. begin
  105. TerminateScript;
  106. end;
  107. end;
  108. end;
  109.  
  110.  
  111. begin
  112. SetUpOSI;
  113. MSSL_Setup;
  114. RS07_SetCompassDir('N');
  115. repeat
  116. GetChopping;
  117. until GetKeyState(VK_F12);
  118. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement