Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.03 KB | None | 0 0
  1. program RangedGuilder;
  2.  
  3. {$DEFINE SMART}
  4. {$DEFINE SPS}
  5. {$i SRL/SRL/misc/SMART.simba}
  6. {$i SRL/SRL.simba}
  7. {$i SPS/SPS.simba}
  8.  
  9. {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
  10. {User Config}
  11. {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
  12.  
  13. const
  14. World = 65; // World The Player Logs into.
  15. RightClickMethod = False; // Use Right Click To Schoot The Target.
  16. // (For Low End Computers.)
  17. LaggyComputer = 0; // Choose 0 (Fast), 1 (Normal) or 2 (Slow)
  18. // Depending On Your Computer Speed.
  19.  
  20. procedure DeclarePlayers;
  21. begin
  22. HowManyPlayers := 1;
  23. NumberOfPlayers(HowManyPlayers);
  24. CurrentPlayer := 0;
  25.  
  26. with Players[0] do
  27. begin
  28. Name := ''; // Player Username.
  29. Pass := ''; // Player Password.
  30. Nick := ''; //Player nickname, 3-4 letters of Player username.
  31. Pin := ''; // Bank PIN
  32. Active := True;
  33. end;
  34. end;
  35.  
  36. {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
  37. {End of User Config}
  38. {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
  39.  
  40. const
  41. Version = '1.22';
  42.  
  43. var
  44. x, y, Laggy, StartXP, CoursesDone, ClientTokenLogout, CTLRandom,
  45. ArrowDTM, TicketDTM, StartTickets, CurrentTickets : Integer;
  46.  
  47. {*******************************************************************************
  48. function InCords(x1, y1, x2, y2 : Integer) : Boolean;
  49. by; putonajonny
  50. Description: Checks if player is in certain SPS area, returns true if in area.
  51. *******************************************************************************}
  52. function InCords(x1, y1, x2, y2 : Integer) : Boolean;
  53. var
  54. Location : TPoint; xL, yL : Integer;
  55. begin
  56. Location := SPS_GetMyPos;
  57. xL := Location.x;
  58. yL := Location.y;
  59. if(xL < x1) then
  60. exit;
  61. if(xL > x2) then
  62. exit;
  63. if(yL < y1) then
  64. exit;
  65. if(yL > y2) then
  66. exit;
  67. Result := True;
  68. end;
  69.  
  70. procedure LaggyComp;
  71. begin
  72. if LaggyComputer = 0 then
  73. Laggy := 0;
  74. if LaggyComputer = 1 then
  75. Laggy := 500;
  76. if LaggyComputer = 2 then
  77. Laggy := 1000;
  78. end;
  79.  
  80. procedure StatsGuise(wat:string);
  81. begin
  82. Status(wat);
  83. Disguise(wat);
  84. end;
  85.  
  86. procedure Antiban;
  87. begin
  88. case Random(225) of
  89. 0..15: begin StatsGuise('Antiban...') GameTab(Tab_Stats) HoverSkill('Ranged', False); Wait(500 + Random(300)); GameTab(Tab_Inv); end;
  90. 25..30: begin StatsGuise('Antiban...') SleepAndMoveMouse(3000 + Random(500)); end;
  91. 50..55: begin StatsGuise('Antiban...') GameTab(Tab_Inv) ExamineInv; GameTab(Tab_Inv); end;
  92. 70..75: begin StatsGuise('Antiban...') GameTab(Tab_Stats); Wait(2000 + Random(500)); GameTab(Tab_Inv); end;
  93. 90..95: begin StatsGuise('Antiban...') GameTab(Tab_Stats) HoverSkill('random', False); GameTab(Tab_Inv); end;
  94. end;
  95. end;
  96.  
  97. procedure GetIntoPos; // (2515, 2970) // (2530, 2985) // (2520, 2980)
  98. begin
  99. if not InCords(2510, 2965, 2545, 2990) then
  100. SPS_WalkPath([Point(2520, 2980)]);
  101. end;
  102.  
  103. procedure MainLoop;
  104. var
  105. i, Timer : Integer;
  106. Judge, Judge2, RoundFin : Boolean;
  107. begin
  108. StatsGuise('MainLoop');
  109.  
  110. if FindNormalRandoms then
  111. if not LoggedIn then
  112. Exit;
  113.  
  114. StatsGuise('Finding Judge');
  115. repeat
  116. MarkTime(Timer);
  117. repeat
  118. if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
  119. FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
  120. begin
  121. Mouse(x, y, 5, 5, False);
  122. Wait(200 + Random(150) + Laggy);
  123.  
  124. if OptionsExist(['mpete'], Nothing) then
  125. begin
  126. Judge := True;
  127. ChooseOption('mpete');
  128. end else
  129. Judge2 := True;
  130. end else
  131. begin
  132. Mouse(266, 136, 10, 30, False);
  133. if WaitOption('mpete', 500) then
  134. Judge := True;
  135. end;
  136. until((TimeFromMark(Timer) > 20000) or Judge or Judge2);
  137.  
  138. if TimeFromMark(Timer) > 20000 then
  139. begin
  140. if not InCords(2510, 2965, 2545, 2990) then
  141. SPS_WalkPath([Point(2554, 2927), Point(2542, 2935), Point(2534, 2947), Point(2524, 2955), Point(2515, 2963), Point(2515, 2982)]);
  142. ClickNorth(1);
  143. MakeCompass(35 + Random(5));
  144.  
  145. if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
  146. FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
  147. Mouse(x, y, 5, 5, False);
  148. Wait(200 + Random(150) + Laggy);
  149. if WaitOption('to C', 500) then
  150. Judge2 := True;
  151. end;
  152. until (Judge or Judge2)
  153.  
  154. StatsGuise('MainLoop');
  155. Wait(800 + Random(150));
  156.  
  157. if Judge then
  158. begin
  159. KeyDown(49);
  160. Wait(20+random(20));
  161. KeyUp(49);
  162. Wait(1500);
  163. KeyDown(49);
  164. Wait(20+random(20));
  165. KeyUp(49);
  166.  
  167. Wait(800 + Random(150) + (Laggy * 2));
  168. If PinScreen Then
  169. begin
  170. StatsGuise('Enter pin...');
  171. InPin(Players[CurrentPlayer].Pin);
  172. end;
  173.  
  174. ArrowDTM := DTMFromString('mggAAAHicY2NgYOACYhEgFgBiXiDmYIAAZigN4vMDsTCUdtEA6WDCwCIM2AEjDgwBAGIcASA=');
  175. If FindDTM(ArrowDTM, x, y, MIX1, MIY1, MIX2, MIY2) Then
  176. begin
  177. Mouse(x, y, 5, 5, True);
  178. end;
  179. FreeDTM(ArrowDTM)
  180. end;
  181.  
  182. if not RightClickMethod then
  183. begin
  184. StatsGuise('Spamming Targets');
  185. MarkTime(Timer);
  186. repeat
  187. if FindColorTolerance(x, y, 4310482, 230, 162, 296, 219, 11) then
  188. MMouse(487, 42, 5, 5);
  189. Wait(480);
  190. if IsUpText('lose') then
  191. ClickMouse2(True);
  192.  
  193. if FindObjEx(x, y, ['arget'], [5041405, 5238269], 7, 31, MSX1, MSY1, 375, 65) then
  194. repeat
  195. ClickMouse2(True);
  196. Wait(RandomRange(15, 40));
  197. if FindNPCChatText('orry', Nothing) then
  198. RoundFin := True;
  199. until(not IsUpText('-at') or RoundFin);
  200. until(RoundFin or (TimeFromMark(Timer) > 40000));
  201.  
  202. if TimeFromMark(Timer) > 40000 then
  203. begin
  204. if not InCords(2510, 2965, 2545, 2990) then
  205. SPS_WalkPath([Point(2554, 2927), Point(2542, 2935), Point(2534, 2947), Point(2524, 2955), Point(2515, 2963), Point(2515, 2982)]);
  206. ClickNorth(1);
  207. MakeCompass(35 + Random(5));
  208. end;
  209. end;
  210.  
  211. if RightClickMethod then
  212. begin
  213. StatsGuise('Shooting Targets');
  214. for i := 1 to 10 do
  215. begin
  216. if FindObjEx(x, y, ['arget'], [5041405, 5238269], 7, 31, MSX1, MSY1, 375, 65) then
  217. ClickMouse2(False);
  218. Wait(200 + Random(150));
  219. ChooseOptionEx('arget', 'object');
  220. Wait(2400 + Random(150) + Laggy);
  221. MMouse(487, 42, 3, 3);
  222. Wait(550 + Random(150) + Laggy);
  223. if IsUpText('lose') then
  224. ClickMouse2(True);
  225. end;
  226. if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
  227. FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
  228. Mouse(x, y, 5, 5, False);
  229. WaitOption('to C', 500);
  230. end;
  231.  
  232. CoursesDone := (CoursesDone + 1);
  233. end;
  234.  
  235. procedure Proggy;
  236. var
  237. XPGained : Integer;
  238. begin
  239. ClearDebug;
  240. TicketDTM := DTMFromString('mggAAAHicY2NgYFjBxMCwhAlCbwDi9UC8FohDgTgRiJOAOBKIY4A4HoiLu+OAupgwsAgDdsCIA0MAABRsB8s=');
  241. CurrentTickets := (ItemAmount('inv', 'dtm', TicketDTM, []));
  242. FreeDTM(TicketDTM);
  243.  
  244. XPGained := GetXPBarTotal - StartXP;
  245. WriteLn('[~~~~~~RangeGuilder by Riyyi - Version ' + Version + '~~~~~]')
  246. WriteLn(' Time Running : ' + TimeRunning)
  247. WriteLn(' XP Gained : ' + ToStr(XPGained))
  248. WriteLn(' XP Per Hour : ' + ToStr(3600000 / GetTimeRunning * XPGained))
  249. WriteLn(' Courses Done : ' + ToStr(CoursesDone))
  250. WriteLn(' Tickets Gained : ' + ToStr(CurrentTickets - StartTickets))
  251. WriteLn(' Time Until Logout : ' + ToStr(MsToTime((CTLRandom - TimeFromMark(ClientTokenLogout)), Time_Formal)))
  252. WriteLn('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]')
  253. end;
  254.  
  255. procedure GeneralCheck;
  256. begin
  257. if (not LoggedIn()) then
  258. begin
  259. LoginPlayer();
  260. end;
  261. Antiban;
  262. end;
  263.  
  264. procedure SetupScript;
  265. begin
  266. Smart_Server := World;
  267. Smart_Members:= True;
  268. Smart_Signed := True;
  269. Smart_SuperDetail := False;
  270.  
  271. SetupSRL;
  272. DeclarePlayers;
  273. GeneralCheck;
  274.  
  275. SPS_Areas := ['6_7'];
  276.  
  277. ToggleXPPopUp(True);
  278. ToggleXPBar(True);
  279. StartXP := GetXPBarTotal;
  280. MarkTime(ClientTokenLogout);
  281. CTLRandom := (RandomRange(20400000, 21060000));
  282. if not (StartTickets > 0) then
  283. begin
  284. TicketDTM := DTMFromString('mggAAAHicY2NgYFjBxMCwhAlCbwDi9UC8FohDgTgRiJOAOBKIY4A4HoiLu+OAupgwsAgDdsCIA0MAABRsB8s=');
  285. StartTickets := (ItemAmount('inv', 'dtm', TicketDTM, []));
  286. FreeDTM(TicketDTM);
  287. end;
  288. ClearDebug();
  289.  
  290. end;
  291.  
  292. begin
  293. SetupScript;
  294. GetIntoPos;
  295. ClickNorth(1);
  296. MakeCompass(35 + Random(5));
  297.  
  298. repeat
  299. GeneralCheck;
  300. MainLoop;
  301. Proggy;
  302. until(TimeFromMark(ClientTokenLogout) < CTLRandom)
  303.  
  304. Logout;
  305. Wait(RandomRange(600000,650000))
  306. end.
Add Comment
Please, Sign In to add comment