Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1. program nmz;
  2. {$DEFINE SMART}
  3. {$i AeroLib/AeroLib.Simba}
  4. {$i reflection/Reflection.simba}
  5.  
  6. const
  7. Loginname = 'User';
  8. Password = 'Password';
  9. Skill := 6;// Ranged = 4 Attack = 0 Strengh = 2 Defence = 1 Magic = 6
  10.  
  11. ScriptName = 'NMZ';
  12. v = '2';
  13. ScriptRev = '.1';
  14.  
  15. RockCakeIntial := 65; // Will rock cake to - Absorbs + Overload (Speeds things up) (65-99)
  16. AbsorptionStartMin := 7; // How many absorbs to intially drink
  17. AssorpMin :=1; // Was included for training mage/low defence attire
  18.  
  19. var
  20. locPlayer: TReflectLocalPlayer;
  21. mouse1: TReflectionMouse;
  22. tab1: TReflectionGameTab;
  23. timer1:TReflectTimer;
  24. lastpraytime, lastdrinktime, startingxp:Integer;
  25. theObject: TReflectObject;
  26. Temp: TReflectInvItem;
  27.  
  28. procedure setupPlayer;
  29. begin
  30. locPlayer.Username := Loginname;
  31. locPlayer.Password := Password;
  32. locPlayer.Active := True;
  33. locPlayer.Create;
  34. locPlayer.Login;
  35. timer1.Start;
  36. lastpraytime := 0;
  37. lastdrinktime := 0;
  38. startingxp := locPlayer.GetSkillExp(skill);
  39. Wait(1000+Random(1500));
  40. Reflect.Compass.MakePitch(10);
  41. end;
  42.  
  43. function Debugg (Action:string): boolean;
  44. begin
  45. Writeln(Action);
  46. end;
  47.  
  48. Procedure Progress;
  49. var
  50. Graphic: TReflectionGraphics;
  51. S: TStringArray;
  52. BreakString: String;
  53. I: Integer;
  54. begin
  55. S := [ScriptName + ' v '+ v + ScriptRev,
  56. '',
  57. 'Time running: ' + Reflect.Time.msToTime(GetTimeRunning, TIME_SHORT),
  58. '',
  59. 'TOTAL XP DONE: ' + IntToStr(locPlayer.GetSkillExp(skill) - startingxp),
  60. ('XP/HR: ' + ToString((locPlayer.GetSkillExp(skill) - startingxp)/(GetTimeRunning / 3600000.0)))];
  61. graphic := Reflect.Smart.Graphics;
  62. graphic.clear;
  63. For I:=0 to High(S) do
  64. Graphic.DrawClippedText(S[I], 'UpChars07', Point(24+((I div 8)*200), 240+((I mod 8)*14)), clYellow);
  65. Graphic.DrawClippedText('Made by AFoolS', 'BigChars', Point(244, 300), clYellow);
  66. end;
  67.  
  68. procedure antiban();
  69. begin
  70. Progress;
  71. wait(10+random(3000));
  72. case random(200) of
  73. 0..50:
  74. if (pointInBox(Reflect.Mouse.GetPoint, intToBox(0, 0, 763, 502))) then
  75. MMouseOffClient('rand');
  76. end;
  77. end;
  78.  
  79. Function drink(Pot: String;n:integer):boolean;
  80. var
  81. potion: TReflectInvItem;
  82. strings: TStringArray := ['(1)', '(2)', '(3)', '(4)'];
  83. index: Integer;
  84. invBox: TBox;
  85. mousePoint: TPoint;
  86. begin
  87. if (getCurrentHealth() >= n) then begin
  88. Debugg('Drink ' + pot);
  89. if (Reflect.Gametab.Current <> Gametab_Inventory) then
  90. Reflect.Gametab.Open(Gametab_Inventory);
  91. for index := 0 to high(strings) do
  92. begin
  93. if (potion.Find(pot + strings[index])) then
  94. break;
  95. if (index = high(strings)) then
  96. exit;
  97. end;
  98. invBox := potion.GetBox;
  99. mousePoint := middleBox(invBox);
  100. Reflect.Mouse.Move(mousePoint, 5, 7);
  101. sleep(50 + random(120));
  102. case randomRange(0, 6) of
  103. 0..4: Reflect.Mouse.Click(MOUSE_LEFT);
  104. 5..6: begin
  105. Reflect.Mouse.Click(MOUSE_RIGHT);
  106. Reflect.Text.ChooseOption('Drink', 500);
  107. end;
  108. end;
  109. sleep(500 + random(2000));
  110. result := True;
  111. end;
  112. end;
  113. function QuickPray(Pray: Boolean): Boolean;
  114. var
  115. CCountPurple, CCountWhite: integer;
  116. begin
  117. Result := False;
  118. CCountPurple := CountColorTolerance(5056052, 550, 95, 565, 108, 45);
  119. CCountWhite := CountColorTolerance(9723486, 550, 95, 565, 108, 22);
  120. if ((CCountPurple < 1) and (CCountWhite < 1)) then begin
  121. Exit;
  122. end;
  123. if (Pray) then begin
  124. if (CCountWhite < 1) then
  125. TReflectionMouse.Move(550, 95, 565, 108, mouse_left);
  126. Result := True;
  127. end else
  128. begin
  129. if (CCountWhite > 1) then
  130. TReflectionMouse.Move(550, 95, 565, 108, mouse_left);
  131. Result := True;
  132. end;
  133. end;
  134.  
  135. Function CheckInv(pot: String):boolean;
  136. var
  137. potion: TReflectInvItem;
  138. strings: TStringArray := ['(1)', '(2)', '(3)', '(4)'];
  139. index: Integer;
  140. begin
  141. for index := 0 to high(strings) do
  142. begin
  143. if (potion.Find(pot + strings[index])) then
  144. result :=true
  145. end;
  146. end;
  147.  
  148. Function Absorption (i:integer) : boolean;
  149. var
  150. C:integer;
  151. begin
  152. sleep(200+random(500));
  153. C := 0;
  154. while (C < i) do begin
  155. drink('Absorption ',1);
  156. (C := C+1);
  157. end;
  158. end;
  159.  
  160. procedure chancedrinkabsorp;
  161.  
  162. begin
  163. if CheckInv('Absorption ') then
  164. if (timer1.ElapsedTime() - lastdrinktime) > RandomRange(150000,2500000) then begin
  165. lastdrinktime := timer1.ElapsedTime();
  166. Absorption(AssorpMin+random(3));
  167. AntiBan;
  168. end;
  169. end;
  170.  
  171. procedure togglepray;
  172. begin
  173. lastpraytime := timer1.ElapsedTime();
  174. QuickPray(True);
  175. Wait(RandomRange(500,1200));
  176. QuickPray(False);
  177. end
  178.  
  179. procedure checkpray;
  180. begin
  181. if (timer1.ElapsedTime() - lastpraytime) > 35000 then
  182. begin
  183. togglepray;
  184. Wait(RandomRange(1,1500));
  185. end;
  186. end;
  187.  
  188. function RockCake(i:integer): Boolean;
  189. var
  190. Temp: TReflectInvItem;
  191. theObject: TReflectObject;
  192. Color_yellow: TColEx;
  193. foundPnt: Tpoint;
  194. begin
  195. if (getCurrentHealth() >= (i+1)) then begin
  196. if (Reflect.Gametab.Current <> Gametab_Inventory) then
  197. Reflect.Gametab.Open(Gametab_Inventory);
  198. if Temp.Find('Dwarven rock cake') then begin
  199. repeat
  200. if theObject.Find(objGame, 'Rewards chest',30) then exit;
  201. Reflect.Mouse.Move(Temp.GetPoint, 3, 3);
  202. sleep(10+random(100));
  203. Reflect.Mouse.Click(Mouse_Right);
  204. sleep(10+random(100));
  205. Result := Reflect.Text.ChooseOption('Guzzle');
  206. sleep(300+random(300));
  207. until (getCurrentHealth() <= i+1);
  208. end;
  209. end;
  210. end;
  211.  
  212.  
  213. Procedure Main;
  214. Begin
  215. Writeln(getCurrentHealth()); //To check HP is being recognised
  216. if locPlayer.IsLoggedIn and not theObject.Find(objGame, 'Rewards chest',30) and getCurrentHealth() > 52 then begin
  217. Absorption(AbsorptionStartMin+random(5));
  218. RockCake(RockCakeIntial+random(5));
  219. drink('Overload ',50); //Rock Cake at n+1
  220. RockCake(1);
  221. end;
  222. togglepray;
  223. While not theObject.Find(objGame, 'Rewards chest',20) and CheckInv('Overload ') do begin
  224. AntiBan;
  225. chancedrinkabsorp;
  226. checkpray;
  227. if getCurrentHealth() = 2 then begin RockCake(1);end;
  228. drink('Overload ',50);
  229. end;
  230. while not theObject.Find(objGame, 'Rewards chest',20) and not CheckInv('Overload ') do begin
  231. while (getCurrentHealth() < (51)) do begin
  232. chancedrinkabsorp;
  233. wait(500 + random(2000));
  234. end;
  235. AntiBan;
  236. ChanceDrinkAbsorp;
  237. CheckPray;
  238. if RockCake(1) then begin Writeln('Final Rock Cake'); end;
  239. end;
  240. end;
  241.  
  242.  
  243. begin
  244. InitAL;
  245. Reflect.Setup;
  246. setupPlayer;
  247. main();
  248. Writeln('Logging out');
  249. wait(5000+random(10000));
  250. locPlayer.logout;
  251. TerminateScript;
  252. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement