Advertisement
Guest User

Untitled

a guest
Sep 9th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.06 KB | None | 0 0
  1. program WineMaker;
  2. //{$DEFINE SMART}
  3. {$I AEROLIB/AEROLIB.SIMBA}
  4.  
  5.  
  6. var
  7. VIAL, IRIT, x, y, failed: Integer;
  8. WinesMade, xp, XPGained, expHour, winesHour: Integer;
  9. FailSafeTimer: Timer;
  10.  
  11. const
  12. Username = '';
  13. Password = '';
  14. Pin = '';
  15.  
  16.  
  17. Procedure DeclarePlayer;
  18. begin
  19. Me.Name := Username;
  20. Me.Pass := Password;
  21. Me.Pin := Pin;
  22. Me.Member := True;
  23. Me.Active := True;
  24. end;
  25.  
  26. Procedure levelCheck();
  27. begin
  28. if continueChat(False) then Exit;
  29. end;
  30.  
  31. Procedure DTMz;
  32. begin
  33. VIAL := DTMFromString('mlwAAAHicY2dgYChnZGAoAeICIK4B4iYgroOy04DyCUCcD8QFQJwDxClAnAjEK9YcAZKMWDEXA26AXQcEQwEAuUcIZw==');
  34. IRIT := DTMFromString('mrAAAAHic42BgYFjJyMCwGIhnA/EsIF4BxJuAeCsQbwbiz0A1rxkg9F8g/gfEf4D4IxA/A+LAMnMgyYgTczHgB7h1QjAMAABB8w4K');
  35.  
  36. addOnTerminate('FreeIt');
  37. end;
  38.  
  39. Procedure FreeIt;
  40. begin
  41. freeDTM(VIAL);
  42. freeDTM(IRIT);
  43. end;
  44.  
  45.  
  46. Procedure Antiban;
  47. begin
  48. case Random(310) of
  49. 0..150:
  50. if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
  51. begin
  52. MMouseOffClient('random');
  53. end else
  54. exit;
  55.  
  56.  
  57. {201..210:
  58. if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
  59. begin
  60. HoverSkill(SKILL_HERBLORE, false);
  61. FTab(TAB_INV);
  62. MMouseOffClient('Random');
  63. end else
  64. exit;
  65. }
  66. 211..300:
  67. if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
  68. begin
  69. Wait(RandomRange(2000, 4000));
  70. PickUpMouse;
  71. HumanRandomMouse();
  72. end else
  73. exit;
  74.  
  75. 301..310:
  76. if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
  77. begin
  78. CheckMovingObjs(True);
  79. end else
  80. exit;
  81.  
  82. end;
  83. end;
  84.  
  85. Procedure mouseBoxHover(x1, y1, x2, y2: Integer; Dist: Integer);
  86. var
  87. PT : TPoint;
  88. begin
  89. getMousePos(pt.x,pt.y);
  90. PT := randomPointBoxEx(pt,inttobox(x1,y1,x2,y2),Dist);
  91. brakeMMouse(PT, 0, 0, True);
  92. wait(randomRange(50,150));
  93.  
  94. end;
  95.  
  96. //Creds to Hoodz
  97. procedure openBank();
  98. var
  99. TPA: TPointArray;
  100. ATPA: T2DPointArray;
  101. I: Integer;
  102. spot: TPoint;
  103. t: Timer;
  104. tCol : TColEx;
  105. begin
  106.  
  107. if (isBankOpen()) then
  108. exit;
  109. tCol.create(5994889, 8, 0.04, 0.09);
  110. if (not tCol.findAllIn(AREA_MS, TPA)) then
  111. exit;
  112. ATPA := FloodFillTPA(TPA);
  113. if (length(ATPA) <= 0) then
  114. exit;
  115. SortATPAfromFirstPoint(ATPA, Point(275, 155));
  116. for I := 0 to high(ATPA) do
  117. begin
  118. if (length(ATPA[I]) < 36) then
  119. continue;
  120. spot := middleTPA(ATPA[I]);
  121. HumanMMouse(spot, 12,12);
  122. if (waitUptextMulti(['ank', 'est'], 300)) then
  123. begin
  124. fastClick(MOUSE_LEFT);
  125. break;
  126. end else
  127. if WaitUpTextMulti(['Use', '->', ' Bank'], 300) then
  128. begin
  129. HumanMMouse(Point(633, 362), 50, 50);
  130. FastClick(MOUSE_LEFT);
  131. exit;
  132. end;
  133. end;
  134. t.start();
  135. while ((not isBankOpen()) and (not Interfaces[PINSCREEN].isVisible())) and (t.TimeElapsed() < 3000) do
  136. sleep(random(150, 250));
  137.  
  138. end;
  139.  
  140.  
  141. Procedure banking;
  142. var
  143. g: Timer;
  144. begin
  145. if Interfaces[PINSCREEN].isVisible() then
  146. inPin(Pin);
  147. if isBankOpen() then
  148. if getCurrentBankTab() <> 0 then
  149. SwitchBankTab(0);
  150. begin
  151. QuickDeposit('inv');
  152. if FindDTM(VIAL, x, y, msx1, msy1, msx2, msy2) then
  153. begin
  154. HumanMMouse(Point(x, y), 5, 2);
  155. if WaitUpTextMulti(['Withdraw', 'Vial of', 'water'], 400) then
  156. fastClick(Mouse_Right);
  157. waitOption('Withdraw-14 ', 250);
  158. end else
  159. begin
  160. WriteLn('Ran out of supplies, logging off.');
  161. CloseInterface();
  162. LogoutPlayer();
  163. TerminateScript;
  164. end;
  165.  
  166. if FindDTM(IRIT, x, y, msx1, msy1, msx2, msy2) then
  167. begin
  168. HumanMMouse(Point(x, y), 5, 2);
  169. if WaitUpTextMulti(['Withdraw', 'Irit', 'leaf'], 400) then
  170. fastClick(Mouse_Right);
  171. waitOption('Withdraw-14', 250);
  172. end else
  173. begin
  174. WriteLn('Ran out of supplies, logging off.');
  175. CloseInterface();
  176. LogoutPlayer();
  177. TerminateScript;
  178. end;
  179. end;
  180. CloseInterface();
  181. FailSafeTimer.start();
  182. end;
  183.  
  184. Procedure MakeWines;
  185. begin
  186. if isBankOpen() then
  187. exit;
  188. if not GameTab(TAB_INV) then
  189. fTab(Tab_inv);
  190.  
  191. Wait(RandomRange(100, 400));
  192. if FindDTM(VIAL, x, y, mix1, miy1, mix2, miy2) then
  193. begin
  194. HumanMMouse(Point(x, y), 3, 3);
  195. if waitUpTextMulti(['Use', 'Irit leaf', 'Vial of', 'water'], 500) then
  196. FastClick(Mouse_LEFT);
  197. if FindDTM(IRIT, x, y, mix1, miy1, mix2, miy2) then
  198. begin
  199. HumanMMouse(Point(x, y), 3, 3);
  200. If WaitUpTextMulti(['Use', 'Irit', 'leaf'], 500) then
  201. FastClick(Mouse_LEFT);
  202. end;
  203. end else
  204. exit;
  205. end;
  206.  
  207.  
  208. Procedure doInterface;
  209. begin
  210. MouseBoxHover(32, 390, 293, 445, randomrange(5, 10));
  211. Wait(RandomRange(100, 250));
  212. if WaitUpText('ake', 400) then
  213. begin
  214. FastClick(Mouse_RIGHT);
  215. WaitOption('Make All', 200);
  216. end else
  217. begin
  218. inc(Failed);
  219. if (Failed > 5) then
  220. Failed := 0;
  221. exit;
  222. end;
  223.  
  224. While (getInvCount > 14) do
  225. begin
  226. if ContinueChat(False) then
  227. begin
  228. exit;
  229. end else;
  230. antiban;
  231. end;
  232. WinesMade := WinesMade + 14;
  233. xp := 200;
  234. wait(randomrange(250, 500));
  235. exit;
  236. end;
  237.  
  238. Procedure Progress;
  239. begin
  240. XPGained := (xp * WinesMade);
  241. expHour := Round((XPGained) / (GetTimeRunning / 3600000.0));
  242. winesHour := Round((WinesMade) / (GetTimeRunning / 3600000.0));
  243.  
  244. ClearDebug;
  245. WriteLn('Running for: ' + MsToTime(GetTimeRunning, 3));
  246. WriteLn('Wines made: ' + toStr(WinesMade));
  247. WriteLn('Exp gained: ' + toStr(XPGained));
  248. WriteLn('Exp p/hr: ' + toStr(expHour));
  249. WriteLn('Wines p/hr: ' + toStr(winesHour));
  250. WriteLn('*Note* Exp rates may be inaccurate if you dont have 68 cooking.');
  251. end;
  252.  
  253. Procedure MainLoop;
  254. begin
  255. if isLoggedIn then
  256. //setAngle(ANGLE_HIGH);
  257. repeat
  258. MouseSpeed := RandomRange(15, 22);
  259. if getInvCount <= 14 then
  260. openBank;
  261.  
  262. if isBankOpen() then
  263. Banking;
  264.  
  265. if isInvFull then
  266. MakeWines;
  267.  
  268. if FailSafeTimer.timeElapsed > (50000) then
  269. openBank;
  270.  
  271. doInterface;
  272. Progress;
  273. until not isLoggedIn;
  274. end;
  275.  
  276. begin
  277. InitAL();
  278. DTMz;
  279. DeclarePlayer;
  280. LoginPlayer(false);
  281.  
  282. while isLoggedIn() do
  283. MainLoop;
  284.  
  285. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement