Advertisement
Guest User

Untitled

a guest
May 18th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.10 KB | None | 0 0
  1. //-----------------------------------------------------------------//
  2. //-- Scar Standard Resource Library --//
  3. //-- » Global Variables --//
  4. //-----------------------------------------------------------------//
  5.  
  6. { const SRLVersionNumber;
  7. Description: Repository Version Number. }
  8. const
  9. SRLVersionNumber = '3.60';
  10.  
  11. { var x, y: Integer;
  12. Description: Global Mouse Positions. }
  13. var
  14. x, y: Integer;
  15.  
  16. { var Mark, LogOutMark, RandomChatMark, RotateMark, RandomClickMark, PickUpMouseMark, BoredMark, HoverMark, KillScriptMark, LeaveScreenMark, MouseSpeedMark: Integer;
  17. Description: Timers. }
  18. var
  19. Mark, LogOutMark, RandomChatMark, RotateMark, RandomClickMark,
  20. PickUpMouseMark, BoredMark, HoverMark, KillScriptMark, LeaveScreenMark,
  21. MouseSpeedMark: Integer;
  22.  
  23. { var UpChars, SmallChars, StatChars, NpcChars: Integer;
  24. Description: Character BitMaps. }
  25. var
  26. UpChars, SmallChars, StatChars, NpcChars: Integer;
  27.  
  28. { var ST: LongInt;
  29. Description: Script Start Time. }
  30. var
  31. ST: LongInt;
  32.  
  33. { var FindClient: Boolean;
  34. Description: Set to True will Auto Find Client with FindWindowbySize. }
  35. var
  36. FindClient: Boolean;
  37.  
  38. { type PPoint;
  39. Description: A Polar Point. }
  40. type
  41. PPoint = record
  42. R, T: Extended;
  43. end;
  44.  
  45. { var Sinearray, Cosearray: Array[0..360] of Extended;
  46. Description: fill array for Radial- and LinearWalk. }
  47. var
  48. Sinearray, Cosearray: array[0..360] of Extended;
  49.  
  50. { type TUser;
  51. Description: The User Record. }
  52. type
  53. TUser = record
  54. Name: string; // * User Name
  55. Pass: string; // * User Pass
  56. Nick: string; // * Screen Name for random detection
  57. Active: Boolean; // * Set to True if Ok, False if Lost.
  58. Loc: string; // * User Location
  59. Skill: string; // * User Action to Perform
  60. Level: array[0..21] of word;
  61. // * Levels of all skills. SetIn GetPlayerLevels.
  62. Ore: string; // * test
  63. WaitTime: Integer; // * Wait Time for Each User, Good for Autofighters
  64. Fight: Boolean; // * If we want the Char to randomly fight
  65. Worked: Integer; // * Time User has worked
  66. Banked: Integer; // * Number of Banks User has done
  67. Killed: Integer; // * Number of Kills User has made
  68. Boolean1: Boolean; // * For reports, etc.
  69. Boolean2: Boolean; // * For reports, etc.
  70. Boolean3: Boolean; // * For reports, etc.
  71. Integer1: Integer; // * For reports, etc.
  72. Integer2: Integer; // * For reports, etc.
  73. Integer3: Integer; // * For reports, etc.
  74. Integer4: Integer; // * For reports, etc.
  75. String1: string; // * For reports, etc.
  76. String2: string; // * For reports, etc.
  77. String3: string; // * For reports, etc.
  78. Extended1: Extended; // * For reports, etc.
  79. Extended2: Extended; // * For reports, etc.
  80. Extended3: Extended; // * For reports, etc.
  81. end;
  82.  
  83. { Level 1 = Attack
  84. Level 2 = Strength
  85. Level 3 = Defence
  86. Level 4 = Range
  87. Level 5 = Prayer
  88. Level 6 = Mage
  89. Level 7 = RuneCrafting
  90. Level 8 = HP
  91. Level 9 = Agility
  92. Level 10 = Herblore
  93. Level 11 = Thiefing
  94. Level 12 = Crafting
  95. Level 13 = Fletching
  96. Level 14 = Slayer
  97. Level 15 = Mining
  98. Level 16 = Smithing
  99. Level 17 = Fishing
  100. Level 18 = Cooking
  101. Level 19 = Firemaking
  102. Level 20 = Woodcutting
  103. Level 21 = Farming
  104. }
  105.  
  106. { var Players: Array of TUser;
  107. Description: Array of users. }
  108. var
  109. Players: array of TUser;
  110.  
  111. { var kSecs, kRow, kLastChoice: Integer;
  112. Description: Used in MessageFriendEvery for data. }
  113. { var kMessages: Array of String;
  114. Description: Array of Messages. }
  115. var
  116. kSecs, kRow, kLastChoice: Integer;
  117. kMessages: array of string;
  118.  
  119. {*******************************************************************************
  120. procedure NumberOfPlayers(Number: Integer);
  121. By: BenLand100
  122. Description: Makes the Players array have Number indexes
  123. *******************************************************************************}
  124.  
  125. procedure NumberOfPlayers(Number: Integer);
  126. begin
  127. SetArrayLength(Players, Number);
  128. end;
  129.  
  130. { var RandomPlayer: Boolean;
  131. Description: Will Choose a Random Player or a Numberd Player according to True/False at NextPlayer. }
  132. var
  133. RandomPlayer: Boolean;
  134.  
  135. { var CurrentPlayer, HowManyPlayers, NickNameBMP: Integer;
  136. Description: CurrentPlayer = Arrayindex of Active Player, HowManyPlayers = Length of Player Array, NickNameBMP = Bitmap converted Players[CurrentPlayer].Nick }
  137. var
  138. CurrentPlayer, HowManyPlayers, NickNameBMP: Integer;
  139.  
  140. { var PlayerStartTime: Longint;
  141. Description: StartTime of Player at Login. }
  142. var
  143. PlayerStartTime: LongInt;
  144.  
  145. { var PlayerCurTime: Longint;
  146. Description: Player Current Time. }
  147. var
  148. PlayerCurTime: LongInt;
  149.  
  150. { var bmpAdmin, bmpMod, dtmPlant, bmpFreakyForester, Frog, CWindow, Lamp, Damien, NewBox: Integer;
  151. Description: Global Bitmaps. Need to be Global because of SCAR Memory leaks. }
  152. var
  153. bmpAdmin, bmpMod, dtmPlant, bmpFreakyForester, Frog, CWindow, Lamp, Damien,
  154. NewBox: Integer;
  155.  
  156. { var RoadColor, WaterColor, BankColor: Integer;
  157. Description: Three variables you will almost always use. :) }
  158. var
  159. RoadColor, WaterColor, BankColor: Integer;
  160.  
  161. { var LampSkill: String;
  162. Description: Set Lamp skill. }
  163. var
  164. LampSkill: string;
  165.  
  166. { var TheFile: Integer;
  167. Description: Use to log chat to file. See SaveToChatLog. }
  168. var
  169. TheFile: Integer;
  170.  
  171. { var OldLine, NewLine, TheLine, TheName: String;
  172. Description: ChatLog vars. }
  173. var
  174. OldLine, NewLine, TheLine, TheName: string;
  175.  
  176. { const MMCX, MMCY;
  177. Description: MiniMap Centre Point. }
  178. const
  179. MMCX = 648;
  180. MMCY = 86;
  181.  
  182. { const MMX1, MMY1, MMX2, MMY2;
  183. Description: MiniMap Edge Points. }
  184. const
  185. MMX1 = 570;
  186. MMY1 = 5;
  187. MMX2 = 735;
  188. MMY2 = 166;
  189.  
  190. { const MSX1, MSY1, MSX2, MSY2;
  191. Description: Main Screen EdgePoints. }
  192. const
  193. MSX1 = 5;
  194. MSY1 = 5;
  195. MSX2 = 515;
  196. MSY2 = 338;
  197.  
  198. { const MSCX, MSCY;
  199. Description: Main Screen Centre Points. }
  200. const
  201. MSCX = 255;
  202. MSCY = 166;
  203.  
  204. { const MIX1, MIY1, MIX2, MIY2;
  205. Description: Inventory EdgePoints. }
  206. const
  207. MIX1 = 555;
  208. MIY1 = 205;
  209. MIX2 = 740;
  210. MIY2 = 464;
  211.  
  212. { const MICX, MICY;
  213. Description: Inventory Centre Points. }
  214. const
  215. MICX = 370;
  216. MICY = 232;
  217.  
  218. { const MCX1, MCY1, MCX2, MCY2;
  219. Description: Chat Screen EdgePoints. }
  220. const
  221. MCX1 = 4;
  222. MCY1 = 342;
  223. MCX2 = 505;
  224. MCY2 = 460;
  225.  
  226. { const MCCX, MCCY;
  227. Description: Chat Screen Centre Points. }
  228. const
  229. MCCX = 252;
  230. MCCY = 230;
  231.  
  232. //****************************************************************************//
  233. // * I tried to make these Bitmaps Local, but I got after a couple of hours
  234. // * running scripts, CTB and DB handle errors. So sorry, declared them global
  235. //****************************************************************************//
  236.  
  237. {*******************************************************************************
  238. procedure LoadSRLBitMaps;
  239. By: SRL Dev Team
  240. Description: Loads SRL Bitmaps into memory.
  241. *******************************************************************************}
  242.  
  243. procedure LoadSRLBitMaps;
  244. begin
  245. bmpMod := BitmapFromString(9, 6, 'z78DA733472A41B74350041' +
  246. '08DB0009E012B13407414C5DF8D994E8220F0200F59E4633');
  247. bmpAdmin := BitmapFromString(9, 6, 'z78DA7333777333B070A3' +
  248. '0F0904162610B60112C025E26266E96A6488A90B3F9B125DE4910' +
  249. '0A83249DE');
  250. bmpFreakyForester := BitmapFromString(106, 2, 'z78DAA552410AC0' +
  251. '3008FBD23618B8A3C2FEFFA531BA4346D406DA8394D8468DB1ED3' +
  252. 'DE11EE67A34F885F7B8FCB47DC4817F59C07B36442A3C41C2EFEB' +
  253. 'E0F8CBB63C2BB1EF61D215E3BADAF437C9221BEC455295AA24B57' +
  254. '846A57FE2A9365EB1252FD163E4C0C48DC456EAAC7812676FA75B' +
  255. 'F21E5499F00B0E54F6B8C2D96BD8EBD0D7D555AD781E9D382154');
  256.  
  257. Frog := BitmapFromString(30, 2, 'z78DA73727274B534B23000012' +
  258. '74747270B47E249645DB84C808A836D4126C91447321317498C9B' +
  259. '5154426CC160633119C355982EC4A51E00B445523B');
  260.  
  261. CWindow := BitmapFromString(66, 8, 'z78DA33304000372460' +
  262. '800170890F1420C63DB473333D4D264664342E06CACCE11117D4F' +
  263. '2C5E08C0BFC251BA61A4ACCA145BE20C66DD4F205EDFC4EAD928D' +
  264. '76BA06BF083DE382F8D432506963A04488610FCE5C408C69F87D3' +
  265. '454E28276651D754B636A95F994E76E5AD49E002F369293');
  266. Lamp := BitmapFromString(6, 6,
  267. '81800E79780E84830E00000100000100000179780E75740E000001' +
  268. '000001C3C118B5B3156E6D0E525209000001302020000001000001' +
  269. '696809484709000001302020544A3B302020000001000001302020' +
  270. '302020544A3B564D42302020302020302020544A3B544A3B564D42' +
  271. '');
  272. dtmPlant := DTMFromString('78DA6354636060306100031E08C5D092B0824' +
  273. '103483302F17F2060D404323450D5046671C2D58000A31690B046' +
  274. '5533ABE0305C0D18EB00092DDCE630013100D4CB0B1F');
  275. Damien := BitmapFromString(27, 1, 'z78DAB3300001272747574B2' +
  276. '3274747270B4708690111C71481A8442231C58911214616220E00' +
  277. 'D7022518');
  278. NewBox := BitmapFromString(6, 6, 'z78DA8DCAC10DC0200C03C095' +
  279. 'A2C4317C5D28FB8F54DA3E1112B1740F3B2528AA6C8C0C0B5B7B6' +
  280. 'F2E571203E34476BE77601A04FDAE6BBD2B663E7181E0EEE70163' +
  281. 'FD2FF4');
  282. end;
  283.  
  284. { type TBox;
  285. Description: A box defined by the left upper and bottom right coordinates. }
  286. type
  287. TBox = record
  288. x1, y1, x2, y2: Integer;
  289. end;
  290.  
  291. { type TBoxArray;
  292. Description: An array of TBox'es. }
  293. type
  294. TBoxArray = array of TBox;
  295.  
  296. // * ANTIBAN CONSTANT
  297.  
  298. { const KillScriptTime;
  299. Description: Used in the preset AntiBan; procedure to kill the script after chosen hours, leave as 0 to not kill the script. }
  300. const
  301. KillScriptTime = 0;
  302.  
  303. // * Antirandom const
  304. { var UseSandwichSolver, UseBoxSolver, UseCerterSolve: Boolean;
  305. Description: For Slower Computers you may turn off and it will use other means to solve or logout. }
  306. var
  307. UseSandwichSolver, UseBoxSolver, UseCerterSolver: Boolean;
  308.  
  309. { var Screenshots: Boolean;
  310. Description: If you want the script to save screenshots of random events. }
  311. var
  312. Screenshots: Boolean;
  313.  
  314. { var CheckHpFirst: Boolean;
  315. Description: If you want the script to look at the hp and see that it's been lowered before it runs away from a fight. }
  316. var
  317. CheckHpFirst: Boolean;
  318.  
  319. { var ReinCarnate: Boolean;
  320. Description: If you want your Status to stay True when you die. (Autofighters) }
  321. var
  322. ReinCarnate: Boolean;
  323.  
  324. //* Logout
  325. { var LogTimeOut: Boolean;
  326. Description: If you want to let Runescape timeout not actually logging out. }
  327. var
  328. LogTimeOut: Boolean;
  329.  
  330. //* Roadwalk
  331. { var DebugRadialRoad: Boolean;
  332. Description: Shows Debug Info on RRW. }
  333. var
  334. DebugRadialRoad: Boolean;
  335.  
  336. //* Mouse
  337. { var BenMouse: Boolean;
  338. Description: Use BenLand100 Spline Algorhythm. }
  339. { var MouseSpeed: Integer;
  340. Description: The variable containing the mousespeed. }
  341. var
  342. BenMouse: Boolean;
  343. MouseSpeed: Integer;
  344.  
  345. //* Users
  346. { var FileName: String;
  347. Description: Filename to save and load users from. }
  348. var
  349. FileName: string;
  350.  
  351. { var PasswordChar: Boolean;
  352. Description: Decides to hide user manager passwords with '*' }
  353. var
  354. PasswordChar: Boolean;
  355.  
  356. { var FormCanvas: TCanvas;
  357. Description: Scripter can place image to be shown in the user manager }
  358. var
  359. FormCanvas: TCanvas;
  360.  
  361. { var FormColor: Integer;
  362. Description: Scripter can choose the background color in the user manager }
  363. var
  364. FormColor: Integer;
  365.  
  366. { var SRLID, SRLPassword: String;
  367. Description: User ID and Password for connection to Database }
  368.  
  369. var
  370. SRLID, SRLPassword : String;
  371.  
  372. { var Plants, Lamps, NOLamps, Fights, Talks, Deaths, Certers, NOCerters, Sandwiches, NOSandwiches, NOForester, Ricks, Dwarfs, Caps, Oldmen, Trades, NOTrades, Mods, Mimes, Mazes, ScapeRunes, EntsAvoided, Whirlpools, RodsFound, AxeAttaches, Birdsnest, PickAxeAttached, Jekylls, SGuard, Frogs, NOFrogs, Newboxes, NONewboxes: Integer;
  373. Description: Random Handler Counters. }
  374. var
  375. Plants, Lamps, NOLamps, Fights, Talks, Deaths, Certers, NOCerters,
  376. Sandwiches, NOSandwiches, NOForester, Ricks, Dwarfs, Caps, Oldmen,
  377. Trades, NOTrades, Mods, Mimes, Mazes, ScapeRunes, EntsAvoided,
  378. Whirlpools, RodsFound, AxeAttaches, Birdsnest, PickAxeAttached, Jekylls,
  379. SGuard, Frogs, NOFrogs, Newboxes, NONewboxes: Integer;
  380.  
  381. { var Banks: Integer;
  382. Description: Number of succesful banking operations performed. }
  383. var
  384. Banks: Integer; // Number of succesful banks perfomred.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement