Advertisement
Guest User

Untitled

a guest
May 7th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.14 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.23';
  42.  
  43. var
  44. x, y, Laggy, StartXP,CoursesDone,
  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. var
  99. myPath: TPointArray;
  100. begin
  101. if not InCords(2510, 2965, 2545, 2990) then
  102. myPath := [Point(2520, 2980)];
  103. SPS_WalkPath(myPath);
  104. end;
  105.  
  106. procedure MainLoop;
  107. var
  108. i, Timer : Integer;
  109. Judge, Judge2, RoundFin : Boolean;
  110. myPath: TPointArray;
  111. begin
  112. StatsGuise('MainLoop');
  113.  
  114. if FindNormalRandoms then
  115. if not LoggedIn then
  116. Exit;
  117.  
  118. StatsGuise('Finding Judge');
  119. repeat
  120. MarkTime(Timer);
  121. repeat
  122. if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
  123. FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
  124. begin
  125. Mouse(x, y, 5, 5, False);
  126. Wait(200 + Random(150) + Laggy);
  127.  
  128. if OptionsExist(['mpete'], Nothing) then
  129. begin
  130. Judge := True;
  131. ChooseOption('mpete');
  132. end else
  133. Judge2 := True;
  134. end else
  135. begin
  136. Mouse(266, 136, 10, 30, False);
  137. if WaitOption('mpete', 500) then
  138. Judge := True;
  139. end;
  140. until((TimeFromMark(Timer) > 20000) or Judge or Judge2);
  141.  
  142. if TimeFromMark(Timer) > 20000 then
  143. begin
  144. if not InCords(2510, 2965, 2545, 2990) then
  145. myPath := [Point(2554, 2927), Point(2542, 2935), Point(2534, 2947), Point(2524, 2955), Point(2515, 2963), Point(2515, 2982)];
  146. SPS_WalkPath(myPath);
  147. ClickNorth(1);
  148. MakeCompass(35 + Random(5));
  149.  
  150. if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
  151. FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
  152. Mouse(x, y, 5, 5, False);
  153. Wait(200 + Random(150) + Laggy);
  154. if WaitOption('to C', 500) then
  155. Judge2 := True;
  156. end;
  157. until (Judge or Judge2)
  158.  
  159. StatsGuise('MainLoop');
  160. Wait(800 + Random(150));
  161.  
  162. if Judge then
  163. begin
  164. KeyDown(49);
  165. Wait(20+random(20));
  166. KeyUp(49);
  167. Wait(1500);
  168. KeyDown(49);
  169. Wait(20+random(20));
  170. KeyUp(49);
  171.  
  172. Wait(800 + Random(150) + (Laggy * 2));
  173. If PinScreen Then
  174. begin
  175. StatsGuise('Enter pin...');
  176. InPin(Players[CurrentPlayer].Pin);
  177. end;
  178.  
  179. ArrowDTM := DTMFromString('mggAAAHicY2NgYOACYhEgFgBiXiDmYIAAZigN4vMDsTCUdtEA6WDCwCIM2AEjDgwBAGIcASA=');
  180. If FindDTM(ArrowDTM, x, y, MIX1, MIY1, MIX2, MIY2) Then
  181. begin
  182. Mouse(x, y, 5, 5, True);
  183. end;
  184. FreeDTM(ArrowDTM)
  185. end;
  186.  
  187. if not RightClickMethod then
  188. begin
  189. StatsGuise('Spamming Targets');
  190. MarkTime(Timer);
  191. repeat
  192. if FindColorTolerance(x, y, 4310482, 230, 162, 296, 219, 11) then
  193. MMouse(487, 42, 5, 5);
  194. Wait(600);
  195. if IsUpText('lose') then
  196. ClickMouse2(True);
  197.  
  198. if FindObjEx(x, y, ['arget'], [5041405, 5238269], 7, 31, MSX1, MSY1, 375, 65) then
  199. repeat
  200. ClickMouse2(True);
  201. Wait(RandomRange(15, 40));
  202. if FindNPCChatText('orry', Nothing) then
  203. RoundFin := True;
  204. until(not IsUpText('-at') or RoundFin);
  205. until(RoundFin or (TimeFromMark(Timer) > 40000));
  206.  
  207. if TimeFromMark(Timer) > 40000 then
  208. begin
  209. if not InCords(2510, 2965, 2545, 2990) then
  210. myPath := [Point(2554, 2927), Point(2542, 2935), Point(2534, 2947), Point(2524, 2955), Point(2515, 2963), Point(2515, 2982)];
  211. SPS_WalkPath(myPath);
  212. ClickNorth(1);
  213. MakeCompass(35 + Random(5));
  214. end;
  215. end;
  216.  
  217. if RightClickMethod then
  218. begin
  219. StatsGuise('Shooting Targets');
  220. for i := 1 to 10 do
  221. begin
  222. if FindObjEx(x, y, ['arget'], [5041405, 5238269], 7, 31, MSX1, MSY1, 375, 65) then
  223. ClickMouse2(False);
  224. Wait(200 + Random(150));
  225. ChooseOptionEx('arget', 'object');
  226. Wait(2400 + Random(150) + Laggy);
  227. MMouse(487, 42, 3, 3);
  228. Wait(550 + Random(150) + Laggy);
  229. if IsUpText('lose') then
  230. ClickMouse2(True);
  231. end;
  232. if FindObjTPA(x, y, 1845548, 11, 2, 15, 15, 50, ['ition']) or
  233. FindObjTPA(x, y, 2702911, 13, 2, 15, 15, 50, ['ition']) then
  234. Mouse(x, y, 5, 5, False);
  235. WaitOption('to C', 500);
  236. CoursesDone := (CoursesDone + 1);
  237. end;
  238. end;
  239. procedure Progress;
  240. begin
  241. ClearDebug;
  242. TicketDTM := DTMFromString('mggAAAHicY2NgYFjBxMCwhAlCbwDi9UC8FohDgTgRiJOAOBKIY4A4HoiLu+OAupgwsAgDdsCIA0MAABRsB8s=');
  243. CurrentTickets := (ItemAmount('inv', 'dtm', TicketDTM, []));
  244. FreeDTM(TicketDTM);
  245. end;
  246. var
  247. XPTotal: Integer;
  248. XPGained : Integer;
  249. begin
  250. XPGained := XPTotal - StartXP;
  251. WriteLn('[~~~~~~RangeGuilder by Riyyi - Version ' + Version + '~~~~~]')
  252. WriteLn(' Time Running : ' + TimeRunning)
  253. WriteLn(' XP Gained : ' + ToStr(XPGained))
  254. WriteLn(' XP Per Hour : ' + FloatToStr((3600000 / GetTimeRunning) * XPGained))
  255. WriteLn(' Courses Done : ' + ToStr(CoursesDone))
  256. WriteLn(' Tickets Gained : ' + ToStr(CurrentTickets - StartTickets))
  257. WriteLn('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]')
  258. end.;
  259. procedure GeneralCheck;
  260. begin
  261. if (not LoggedIn()) then
  262. begin
  263. LoginPlayer();
  264. end;
  265. Antiban;
  266. end;
  267.  
  268. procedure SetupScript;
  269. begin
  270. Smart_Server := World;
  271. Smart_Members:= True;
  272. Smart_Signed := True;
  273. Smart_SuperDetail := False;
  274.  
  275. SetupSRL;
  276. DeclarePlayers;
  277. GeneralCheck;
  278.  
  279. SPS_Areas := ['6_7'];
  280. SPS_Setup(RUNESCAPE_SURFACE, ['6_7']);
  281.  
  282. ToggleXPPopUp(True);
  283. ToggleXPBar(True);
  284. StartXP := XPTotal;
  285. MarkTime(ClientTokenLogout);
  286. CTLRandom := (RandomRange(20400000, 21060000));
  287. GameTab(Tab_Inv);
  288. if not (StartTickets > 0) then
  289. begin
  290. TicketDTM := DTMFromString('mggAAAHicY2NgYFjBxMCwhAlCbwDi9UC8FohDgTgRiJOAOBKIY4A4HoiLu+OAupgwsAgDdsCIA0MAABRsB8s=');
  291. StartTickets := (ItemAmount('inv', 'dtm', TicketDTM, []));
  292. FreeDTM(TicketDTM);
  293. end;
  294. ClearDebug();
  295. end;
  296.  
  297. begin
  298. repeat
  299. SetupScript;
  300. GetIntoPos;
  301. ClickNorth(1);
  302. MakeCompass(35 + Random(5));
  303.  
  304. repeat
  305. GeneralCheck;
  306. MainLoop;
  307. Progress;
  308. until(TimeFromMark(ClientTokenLogout) < CTLRandom)
  309.  
  310. Logout;
  311. Wait(RandomRange(600000,650000))
  312. until(true)
  313. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement