Advertisement
Guest User

Untitled

a guest
Jul 1st, 2017
643
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. program new;
  2. {$DEFINE SMART}
  3. {$i AeroLib/AeroLib.Simba}
  4. {$i Reflection/Reflection.Simba}
  5.  
  6. const
  7. burn_logs : string = 'Logs';
  8. raw_fish : string = 'Raw trout';
  9.  
  10.  
  11.  
  12. var
  13. MyPlayer: TReflectLocalPlayer;
  14.  
  15.  
  16.  
  17. {procedure Open_bank;
  18. var
  19. bank : TReflectNPC;
  20. location : TPoint;
  21. x,y : integer;
  22. begin
  23. writeln('Atveru banku.');
  24. repeat
  25. if bank.Find('Banker') then
  26. begin
  27. writeln(getUpText());
  28. humanMMouse(bank.GetMSPoint,2,2);
  29. wait(300);
  30. reflect.Mouse.Click(MOUSE_RIGHT);
  31. getRealMousePos(x,y);
  32. MoveMouse(x,y+40);
  33. wait(500);
  34. reflect.Mouse.Click(MOUSE_LEFT);
  35. wait(3000);
  36. if not Reflect.Bank.IsOpen then Reflect.Interfaces.CloseAll;
  37. end;
  38. until Reflect.Bank.IsOpen;
  39. end;}
  40.  
  41.  
  42. procedure Open_bank;
  43. var
  44. bank : TReflectObject;
  45. location : TPoint;
  46. x,y : integer;
  47. begin
  48. writeln('Atveru banku.');
  49. repeat
  50. if bank.Find(objGame,'Bank booth',15) then
  51. begin
  52. writeln(bank.Find(objGame,'Bank booth',15));
  53. accurateMMouse(reflect.Tiles.TileToMS(bank.GetTile),2,2);
  54. wait(300);
  55. fastClick(MOUSE_LEFT);
  56. wait(6500);
  57.  
  58. if not Reflect.Bank.IsOpen then Reflect.Interfaces.CloseAll;
  59. end;
  60. until Reflect.Bank.IsOpen;
  61. end;
  62.  
  63. Procedure Take_items;
  64. var
  65. bankas_itemi : TReflectBankItemArray;
  66. wood : TReflectBankItem;
  67. fish : TReflectBankItem;
  68. begin
  69. writeln('Paņemu lietas.');
  70. wood.Find(burn_logs);
  71. wood.Withdraw(1);
  72.  
  73. fish.Find(raw_fish);
  74. fish.Withdraw(27);
  75. wait(1000);
  76.  
  77. end;
  78.  
  79. Procedure Close_bank;
  80. begin
  81. writeln('Aizveru banku.');
  82. Reflect.Bank.Close;
  83. wait(500);
  84. end;
  85.  
  86. Procedure Fire;
  87. var
  88. wood : TReflectInvItem;
  89. tinderbox : TReflectInvItem;
  90. begin
  91. writeln('Taisu uguni.');
  92. wood.Find(burn_logs);
  93. tinderbox.Find('Tinderbox');
  94.  
  95. MoveMouse(150+random(35)-random(35),214+random(35)-random(35));
  96. wait(50);
  97. fastClick(MOUSE_LEFT);
  98. wait(3000);
  99.  
  100. reflect.Mouse.Move(wood.GetMSPoint,2,2);
  101. wait(50);
  102. fastClick(MOUSE_LEFT);
  103. wait(50);
  104. reflect.Mouse.Move(tinderbox.GetMSPoint,2,2);
  105. wait(50);
  106. fastClick(MOUSE_LEFT);
  107. wait(7000);
  108.  
  109. end;
  110.  
  111. procedure Cook_fish;
  112. var
  113. fish : TReflectInvItem;
  114. x,y :integer;
  115. fire : TReflectObject;
  116. point1 : TPoint;
  117. begin
  118. writeln('Cepju zivis.');
  119. repeat
  120. writeln('sakums');
  121. if not fire.Find(objGame, 'Fire', 7)then exit;
  122. if not fish.Find(raw_fish)then exit;
  123. accurateMMouse(fish.GetMSPoint,2,2);
  124. wait(100);
  125. fastClick(MOUSE_LEFT); //uzpsiez uz zivs
  126. writeln('debug1');
  127. wait(200);
  128. accurateMMouse(reflect.Tiles.TileToMS(fire.GetTile),0,0);
  129. wait(300);
  130. fastClick(MOUSE_RIGHT); //uz uguni ar labo
  131. wait(500);
  132. writeln('debug2');
  133. if not fire.Find(objGame, 'Fire', 7) then
  134. exit;
  135. if not FindColorSpiralTolerance(x,y,16776960,MSX1,MSY1,MSX2,MSY2,10) then
  136. exit;
  137. writeln('debug3');
  138. point1.Y := y;
  139. point1.X := x;
  140. humanMMouse(point1,2,2);
  141. wait(1000);
  142. fastClick(MOUSE_LEFT); // iet uz uguni
  143. wait(5000);
  144.  
  145. writeln('debug4');
  146. point1.Y := 413;
  147. point1.X := 256;
  148.  
  149. humanMMouse(point1,2,2);
  150.  
  151. wait(500);
  152. fastClick(MOUSE_RIGHT);
  153. wait(500);
  154. writeln('debug5');
  155. point1.Y := 480;
  156. point1.X := 256;
  157. humanMMouse(point1,2,2);
  158.  
  159. wait(500);
  160. fastClick(MOUSE_LEFT);
  161. wait(70000+random(3000)-random(3000));
  162.  
  163. writeln('beigas');
  164. until fish.Find(raw_fish) = false or not fire.Find(objGame, 'Fire', 7);
  165. end;
  166.  
  167. procedure Deposit_fish;
  168. var
  169. x,y :integer;
  170. fish : TReflectInvItem;
  171. burnt_fish : TReflectInvItem;
  172. wood : TReflectInvItem;
  173. rawfish : TReflectInvItem;
  174. ashes : TReflectInvItem;
  175. begin
  176. writeln('Nolieku lietas.');
  177. while fish.Find('Trout') do
  178. begin
  179. humanMMouse(fish.GetMSPoint,2,2);
  180. fastClick(MOUSE_RIGHT);
  181. wait(300);
  182. GetMousePos(x,y);
  183. MoveMouse(x,y+100);
  184. wait(300);
  185. fastClick(MOUSE_LEFT);
  186. wait(1500);
  187. end;
  188.  
  189. while fish.Find('Burnt fish') do
  190. begin
  191. humanMMouse(burnt_fish.GetMSPoint,2,2);
  192. fastClick(MOUSE_RIGHT);
  193. wait(300);
  194. GetMousePos(x,y);
  195. MoveMouse(x,y+100);
  196. wait(200);
  197. fastClick(MOUSE_LEFT);
  198. wait(1500);
  199. end;
  200.  
  201. while wood.Find(burn_logs) do
  202. begin
  203. humanMMouse(wood.GetMSPoint,2,2);
  204. fastClick(MOUSE_RIGHT);
  205. wait(200);
  206. GetMousePos(x,y);
  207. MoveMouse(x,y+100);
  208. wait(200);
  209. fastClick(MOUSE_LEFT);
  210. wait(1500);
  211. end;
  212.  
  213. while rawfish.Find(raw_fish) do
  214. begin
  215. humanMMouse(rawfish.GetMSPoint,2,2);
  216. fastClick(MOUSE_LEFT);
  217. wait(200);
  218. //GetMousePos(x,y);
  219. //MoveMouse(x,y+100);
  220. wait(1200);
  221. end;
  222.  
  223. while ashes.Find('Ashes') do
  224. begin
  225. humanMMouse(ashes.GetMSPoint,2,2);
  226. fastClick(MOUSE_LEFT);
  227. wait(200);
  228. //GetMousePos(x,y);
  229. //MoveMouse(x,y+100);
  230. fastClick(MOUSE_LEFT);
  231. wait(1200);
  232. end;
  233. end;
  234.  
  235. begin
  236. InitAL;
  237. Reflect.Setup;
  238. Myplayer.Create;
  239. LoginPlayer(false);
  240. MyPlayer.Username := 'darkijslv@tvnet.lv';
  241. MyPlayer.Password := 'Lapinskis123';
  242. MyPlayer.Pin := '';
  243. MyPlayer.Active := true;
  244. MyPlayer.ChangeWorld(382);
  245. MyPlayer.Login;
  246.  
  247. Reflect.Compass.MakePitch(4);
  248. Reflect.Compass.Make('S');
  249.  
  250. Open_bank;
  251. Deposit_fish;
  252. Take_items;
  253. Close_bank;
  254. Fire;
  255. Cook_fish;
  256.  
  257.  
  258. repeat
  259. Open_bank;
  260. Deposit_fish;
  261. Take_items;
  262. Close_bank;
  263. Fire;
  264. Cook_fish;
  265. until false;
  266.  
  267. writeln('Programmas beigas');
  268.  
  269. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement