zamaro

OSRS prayer FOOD + keys GUI done

Feb 25th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.65 KB | None | 0 0
  1. #NoEnv
  2. #singleinstance force
  3. Process, Priority, , High
  4.  
  5. SetWorkingDir, %A_ScriptDir%
  6. file = %A_ScriptDir%\settings.ini
  7.  
  8.  
  9.  
  10.  
  11.  
  12. loop, 28
  13. {
  14. IniRead, Inv%A_Index%, settings.ini, Foodsettings, Inv%A_Index%
  15. }
  16.  
  17.  
  18. loop, 28
  19. {
  20. IniRead, Inv2k%A_Index%, settings.ini, Foodsettings, Inv2k%A_Index%
  21. }
  22.  
  23. loop, 28
  24. {
  25. IniRead, Inv3k%A_Index%, settings.ini, Foodsettings, Inv3k%A_Index%
  26. }
  27.  
  28. loop, 28
  29. {
  30. IniRead, Inv4k%A_Index%, settings.ini, Foodsettings, Inv4k%A_Index%
  31. }
  32.  
  33. loop, 28
  34. {
  35. IniRead, Inv5k%A_Index%, settings.ini, Foodsettings, Inv5k%A_Index%
  36. }
  37.  
  38.  
  39.  
  40. IniRead, prot1, settings.ini, settings, prot1
  41. IniRead, prot2, settings.ini, settings, prot2
  42. IniRead, prot3, settings.ini, settings, prot3
  43. IniRead, prot4, settings.ini, settings, prot4
  44. IniRead, prot5, settings.ini, settings, prot5
  45. IniRead, prot6, settings.ini, settings, prot6
  46. IniRead, prot7, settings.ini, settings, prot7
  47.  
  48. IniRead, arm1, settings.ini, settings, arm1
  49. IniRead, arm2, settings.ini, settings, arm2
  50. IniRead, arm3, settings.ini, settings, arm3
  51. IniRead, arm4, settings.ini, settings, arm4
  52. IniRead, arm5, settings.ini, settings, arm5
  53. IniRead, arm6, settings.ini, settings, arm6
  54. IniRead, arm7, settings.ini, settings, arm7
  55.  
  56. IniRead, Steelskins, settings.ini, settings, Steelskins
  57. IniRead, mysticMight, settings.ini, settings, mysticMight
  58. IniRead, ItemProtects, settings.ini, settings, ItemProtects
  59.  
  60. IniRead, Radio1, settings.ini, Armors, Radio1
  61. IniRead, Radio2, settings.ini, Armors, Radio2
  62. IniRead, Radio3, settings.ini, Armors, Radio3
  63. IniRead, Radio4, settings.ini, Armors, Radio4
  64.  
  65. IniRead, Invs, settings.ini, Icons, Invs
  66. IniRead, Origin, settings.ini, Icons, origin
  67.  
  68. IniRead, Frunning, settings.ini, settings, Frunning
  69. IniRead, Fsleep, settings.ini, settings, Fsleep
  70. IniRead, Fbinds, settings.ini, settings, Fbinds
  71.  
  72. IniRead, Un1, settings.ini, settings, Un1
  73. IniRead, Un2, settings.ini, settings, Un2
  74. IniRead, Un3, settings.ini, settings, Un3
  75. IniRead, Un4, settings.ini, settings, Un4
  76. IniRead, Un5, settings.ini, settings, Un5
  77. IniRead, Un6, settings.ini, settings, Un6
  78. IniRead, Un7, settings.ini, settings, Un7
  79.  
  80.  
  81.  
  82. Sleep1= 50 ; Random Range Of sleep time
  83. Sleep2= 100 ; Used after pressing the F-Key to switch to run/prayer tab.
  84.  
  85. ;Mouse Positions X/Y Coordinates For Orion, AB For RSclient, change them if needed.
  86.  
  87. X1=684 ; melee prayer
  88. Y1=396 ; mouse position
  89.  
  90. X2=643 ; range prayer
  91. y2=396 ; mouse position
  92.  
  93. x3=608 ; mage prayer
  94. y3=396 ; mouse position
  95.  
  96. x4=681 ; steel skin
  97. y4=359 ; mouse position
  98.  
  99. x5=570 ; item protect
  100. y5=354 ; mouse position
  101.  
  102. x6=571 ; mystic might
  103. y6=430 ; mouse position
  104.  
  105. x7=639 ; final Mouse Position
  106. y7=237 ; after finishing prayer clicks
  107.  
  108. x8=583 ; Run icon
  109. y8=191 ; mouse position
  110.  
  111. x9=750 ; clicks Mouse Top right of screen
  112. y9=197 ; to cancel "cast bind" before activating prayer.
  113.  
  114. X10=560 ; Quicker minimap orb icon cords
  115. y10=165 ; Clicks quick prayer
  116.  
  117. x11=582 ; Invslot No.1 - Armor
  118. y11=280 ; mouse posion
  119.  
  120. x12=625 ; InvSlot No.2 - Armor
  121. y12=280 ; mouse position
  122.  
  123. x13=665 ; InvSlot No.3 - Armor
  124. y13=280 ; mouse position
  125.  
  126. x14=707 ; InvSlot No.4 - Armor
  127. y14=280 ; mouse position
  128.  
  129. X15=653 ; Platebody Equip - armor
  130. Y15=359 ; mouse position
  131.  
  132. X16=653 ; Platelgs Equip - Armor
  133. Y16=395 ; mouse position
  134.  
  135. X17=700 ; kite - armor
  136. Y17=350 ; mouse position
  137.  
  138. X18=650 ; helm - armor
  139. Y18=279 ; mouse position
  140.  
  141. YI5=1 : mouse position
  142.  
  143.  
  144. ;RSClient Coods
  145.  
  146. XR1=694
  147. YR1=369
  148.  
  149. XR2=654
  150. YR2=369
  151.  
  152. XR3=618
  153. YR3=369
  154.  
  155. XR4=694
  156. YR4=332
  157.  
  158. XR5=580
  159. YR5=335
  160.  
  161. XR6=582
  162. YR6=410
  163.  
  164. XR7=656
  165. YR7=208
  166.  
  167. XR8=595
  168. YR8=160
  169.  
  170. XR9=763
  171. YR9=174
  172.  
  173. xr10=571
  174. yr10=122
  175.  
  176.  
  177. xr11=591
  178. yr11=250
  179.  
  180.  
  181. xr12=633
  182. yr12=250
  183.  
  184. xr13=675
  185. yr13=250
  186.  
  187. xr14=715
  188. yr14=250
  189.  
  190. XR15=650
  191. YR15=330
  192.  
  193. XR16=650
  194. YR16=366
  195.  
  196. XR17=700
  197. YR17=330
  198.  
  199. XR18=650
  200. YR18=255
  201.  
  202. offset=2
  203.  
  204. YRi5=285
  205. YRI9=325
  206. YRi13=360
  207. YRi17=390
  208. YRI21=427
  209. YR25=468
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216. goto ^g
  217. return
  218.  
  219. ^g::
  220. GUI Destroy
  221. GoSub GUI
  222. return
  223.  
  224. Gui:
  225. Gui, Add, Button, x6 y7 w100 h20 , About
  226. Gui, Add, Button, x6 y27 w100 h20 , Resize RSclient
  227. Gui, Font, S10 CDefault, Verdana
  228. Gui, Add, Button, x5 y100 w100 h25 , Key setup
  229. Gui, Add, Text, x516 y107 w90 h20 , Protections:
  230. Gui, Add, Text, x116 y107 w20 h20 , F1
  231. Gui, Add, Text, x196 y107 w20 h20 , F2
  232. Gui, Add, Text, x256 y107 w20 h20 , F3
  233. Gui, Font, S8 CDefault, Verdana
  234. Gui, Font, S6 CDefault, Verdana
  235. Gui, Font, S7 CDefault, Verdana
  236. Gui, Add, DropDownList, x96 y137 w70 h90 vF1downs choose1 , Quick|Melee|Range|Mage|None
  237. Gui, Add, CheckBox, x116 y167 w10 h10 vProt1 checked%prot1% , Protections f1
  238. Gui, Add, CheckBox, x116 y197 w10 h10 vArm1 checked%arm1%, Armor equip f1
  239. Gui, Add, Text, x6 y137 w80 h20 , Prayer type:
  240. Gui, Add, DropDownList, x176 y137 w60 h130 vF2downs choose2 , Quick|Melee|Range|Mage|None
  241. Gui, Add, CheckBox, x196 y167 w10 h10 vprot2 checked%prot2%, Protections f2
  242. Gui, Add, CheckBox, x196 y197 w10 h10 varm2 checked%arm2%, Armor equipf2
  243. Gui, Add, DropDownList, x236 y137 w60 h110 vF3downs choose3 , Quick|Melee|Range|Mage|None
  244. Gui, Add, CheckBox, x256 y167 w10 h10 vprot3 checked%prot3% , Protections f3
  245. Gui, Add, Text, x6 y197 w100 h20 , Equip armor equip?
  246. Gui, Add, CheckBox, x256 y197 w10 h10 varm3 checked%arm3%, Armor equipf3
  247. Gui, Add, Text, x316 y107 w20 h20 , F4
  248. Gui, Add, Text, x366 y107 w20 h20 , F5
  249. Gui, Add, Text, x416 y107 w20 h20 , F6
  250. Gui, Add, Text, x466 y107 w20 h20 , F7
  251. Gui, Add, DropDownList, x296 y137 w60 h140 vf4downs choose2, Quick|Melee|Range|Mage|None
  252. Gui, Add, DropDownList, x356 y137 w50 h120 vF5downs choose3, Quick|Melee|Range|Mage|None
  253. Gui, Add, DropDownList, x406 y137 w50 h130 vF6downs choose4, Quick|Melee|Range|Mage|None
  254. Gui, Add, DropDownList, x456 y137 w50 h120 vF7downs choose5, Quick|Melee|Range|Mage|None
  255. Gui, Add, CheckBox, x316 y167 w10 h10 vprot4 checked%prot4%, Protections f4
  256. Gui, Add, CheckBox, x366 y167 w10 h10 vprot5 checked%prot5% , Protections f5
  257. Gui, Add, CheckBox, x416 y167 w10 h10 vprot6 checked%prot6% , Protections f6
  258. Gui, Add, CheckBox, x466 y167 w10 h10 vprot7 checked%prot7%, Protections f7
  259. Gui, Add, CheckBox, x316 y197 w10 h10 varm4 checked%arm4%, Armor equipf4
  260. Gui, Add, CheckBox, x366 y197 w10 h10 varm5 checked%arm5%, Armor equipf5
  261. Gui, Add, CheckBox, x416 y197 w10 h10 varm6 checked%arm6%, Armor equipf6
  262. Gui, Add, CheckBox, x466 y197 w10 h10 varm7 checked%arm7%, Armor equipf7
  263. Gui, Add, Text, x496 y87 w110 h0 , Text
  264. Gui, Add, Text, x616 y87 w-170 h-10 , Text
  265. Gui, Add, Text, x146 y247 w140 h-20 , Mouse position when done
  266. Gui, Add, Text, x6 y257 w60 h20 , Settings:
  267. Gui, Add, CheckBox, x6 y287 w90 h20 vFrunning checked%Frunning%, ~ toggles run
  268. Gui, Add, CheckBox, x6 y317 w90 h20 vFsleep checked%Fsleep%, Sleep time
  269. Gui, Add, CheckBox, x6 y347 w90 h20 vFbinds checked%Fbinds%, Bind unclick
  270. Gui, Add, Radio, x416 y287 w60 h20 vRadio1 checked%Radio1% , One
  271. Gui, Add, Radio, x416 y317 w60 h20 VRadio2 checked%Radio2%, Two
  272. Gui, Add, Radio, x526 y287 w60 h20 VRadio3 checked%Radio3%, Three
  273. Gui, Add, Radio, x526 y317 w60 h20 vRadio4 checked%Radio4%, Four
  274. Gui, Font, S12 CDefault, Verdana
  275. Gui, Add, Button, x206 y357 w220 h60 , Click here when done!
  276. Gui, Font, S10 CDefault, Verdana
  277. Gui, Add, Button, x6 y397 w110 h20 , Resize RSclient
  278. Gui, Font, S16 CDefault, Verdana
  279. Gui, Add, Text, x166 y27 w280 h40 , OSRS Prayer: By Samerdl
  280. Gui, Font, S8 CDefault, Verdana
  281. Gui, Add, Text, x6 y167 w100 h20 , Use protections ?
  282. Gui, Add, CheckBox, x516 y197 w100 h20 vmysticMight checked%mysticmight%, Mystic might
  283. Gui, Font, S7 CDefault, Verdana
  284. Gui, Font, S8 CDefault, Verdana
  285. Gui, Add, CheckBox, x516 y167 w100 h20 vItemProtects checked%itemprotects%, Item protect
  286. Gui, Add, CheckBox, x516 y137 w100 h20 vSteelskins checked%Steelskins%, Steel skin
  287. Gui, Add, Text, x446 y247 w100 h20 , Armor Equpping:
  288. Gui, Add, Text, x156 y247 w160 h30 , Mouse position when done:
  289. Gui, Add, Radio, x126 y287 w80 h40 vinvs checked%invs%, Inventory icon
  290. Gui, Add, Radio, x256 y287 w80 h40 vOrigin checked%origin% , Original position
  291. Gui, Add, Button, x526 y387 w100 h30 gSave1, Save
  292. Gui, Add, Text, x6 y227 w100 h20 , Armor un-equip?
  293. Gui, Add, CheckBox, x116 y227 w10 h10 vUn1 Checked%un1%, Un1
  294. Gui, Add, CheckBox, x196 y227 w10 h10 vUn2 Checked%un2%, Un2
  295. Gui, Add, CheckBox, x256 y227 w10 h10 vUn3 Checked%un3%, Un3
  296. Gui, Add, CheckBox, x316 y227 w10 h10 vUn4 Checked%un4%, Un4
  297. Gui, Add, CheckBox, x366 y227 w10 h10 vUn5 Checked%un5%, Un5
  298. Gui, Add, CheckBox, x416 y227 w10 h10 vUn6 Checked%un6%, Un6
  299. Gui, Add, CheckBox, x466 y227 w10 h10 vUn7 Checked%un7%, un7
  300. Gui, Add, DropDownList, x536 y347 w70 h140 vArmUn Choose2, One|Two|Three|Four
  301. Gui, Font, S8 CDefault, Verdana
  302. Gui, Add, Text, x466 y347 w60 h20 , un-equip:
  303. Gui, Add, Button, x6 y377 w110 h20 , Food Setup
  304. ; Generated using SmartGUI Creator 4.0
  305. Gui, Show, x279 y148 h422 w629, New GUI Window
  306. Gosub, ReadConfiguration
  307. Return
  308.  
  309.  
  310.  
  311. Save1:
  312. Gui, Submit, NoHide
  313. IniWrite, %F1downs%, %file%, DDL1, Quick|Melee|Range|Mage|None
  314. IniWrite, %F2downs%, %file%, DDL2, Quick|Melee|Range|Mage|None
  315. IniWrite, %F3downs%, %file%, DDL3, Quick|Melee|Range|Mage|None
  316. IniWrite, %F4downs%, %file%, DDL4, Quick|Melee|Range|Mage|None
  317. IniWrite, %F5downs%, %file%, DDL5, Quick|Melee|Range|Mage|None
  318. IniWrite, %F6downs%, %file%, DDL6, Quick|Melee|Range|Mage|None
  319. IniWrite, %F7downs%, %file%, DDL7, Quick|Melee|Range|Mage|None
  320. IniWrite, %ArmUn%, %file%, DDL8, One|Two|Three|Four
  321.  
  322. IniWrite, %prot1%, settings.ini, settings, prot1
  323. IniWrite, %prot2%, settings.ini, settings, prot2
  324. IniWrite, %prot3%, settings.ini, settings, prot3
  325. IniWrite, %prot4%, settings.ini, settings, prot4
  326. IniWrite, %prot5%, settings.ini, settings, prot5
  327. IniWrite, %prot6%, settings.ini, settings, prot6
  328. IniWrite, %prot7%, settings.ini, settings, prot7
  329.  
  330. IniWrite, %arm1%, settings.ini, settings, arm1
  331. IniWrite, %arm2%, settings.ini, settings, arm2
  332. IniWrite, %arm3%, settings.ini, settings, arm3
  333. IniWrite, %arm4%, settings.ini, settings, arm4
  334. IniWrite, %arm5%, settings.ini, settings, arm5
  335. IniWrite, %arm6%, settings.ini, settings, arm6
  336. IniWrite, %arm7%, settings.ini, settings, arm7
  337.  
  338. IniWrite, %itemprotects%, settings.ini, settings, itemprotects
  339. IniWrite, %steelskins%, settings.ini, settings, steelskins
  340. IniWrite, %mysticMight%, settings.ini, settings, mysticMight
  341.  
  342.  
  343. IniWrite, %Radio1%, settings.ini, Armors, Radio1
  344. IniWrite, %Radio2%, settings.ini, Armors, Radio2
  345. IniWrite, %Radio3%, settings.ini, Armors, Radio3
  346. IniWrite, %Radio4%, settings.ini, Armors, Radio4
  347.  
  348. IniWrite, %invs%, settings.ini, Icons, invs
  349. IniWrite, %origin%, settings.ini, Icons,origin
  350.  
  351. IniWrite, %Frunning%, settings.ini, settings, frunning
  352. IniWrite, %Fsleep%, settings.ini, settings, Fsleep
  353. IniWrite, %Fbinds%, settings.ini, settings, Fbinds
  354.  
  355. IniWrite, %un1%, settings.ini, settings, un1
  356. IniWrite, %un2%, settings.ini, settings, un2
  357. IniWrite, %un3%, settings.ini, settings, un3
  358. IniWrite, %un4%, settings.ini, settings, un4
  359. IniWrite, %un5%, settings.ini, settings, un5
  360. IniWrite, %un6%, settings.ini, settings, un6
  361. IniWrite, %un7%, settings.ini, settings, un7
  362. return
  363.  
  364.  
  365.  
  366. ReadConfiguration: ;Read the saved configuration
  367. IfExist, %file% ;First check if it was saved.
  368. {
  369. IniRead, F1downs, %file%, DDL1, Quick|Melee|Range|Mage|None
  370. GuiControl, ChooseString, F1downs, %F1downs% ;Submit
  371. IniRead, F2downs, %file%, DDL2, Quick|Melee|Range|Mage|None
  372. GuiControl, ChooseString, F2downs, %F2downs% ;Submit
  373. IniRead, F3downs, %file%, DDL3, Quick|Melee|Range|Mage|None
  374. GuiControl, ChooseString, F3downs, %F3downs% ;Submit
  375. IniRead, F4downs, %file%, DDL4, Quick|Melee|Range|Mage|None
  376. GuiControl, ChooseString, F4downs, %F4downs% ;Submit
  377. IniRead, F5downs, %file%, DDL5, Quick|Melee|Range|Mage|None
  378. GuiControl, ChooseString, F5downs, %F5downs% ;Submit
  379. IniRead, F6downs, %file%, DDL6, Quick|Melee|Range|Mage|None
  380. GuiControl, ChooseString, F6downs, %F6downs% ;Submit
  381. IniRead, F7downs, %file%, DDL7, Quick|Melee|Range|Mage|None
  382. GuiControl, ChooseString, F7downs, %F7downs% ;Submit
  383.  
  384. IniRead, ArmUn, %file%, DDL8, One|Two|Three|Four
  385. GuiControl, ChooseString, Armun, %Armun% ;Submit
  386.  
  387. }
  388. return
  389.  
  390. GuiClose:
  391. ExitApp
  392.  
  393.  
  394.  
  395. ButtonClickherewhendone!:
  396. gosub Save1
  397. MsgBox, 0, OSRS Prayer, You can restore and re-edit this interface at anytime by Pressing Control +G.`n`Remember to suspend the script when you have no use for it.`n`n`If you are using Jagex's RSclient Be sure to click the resize button so the clicks can work correctl (or press Control + F12 while your RSclient SCreen is on top).
  398. gosub, ButtonKeysetup
  399. gosub 3ButtonSaveandClose
  400. Gui, Destroy
  401. return
  402.  
  403. SetupScript:
  404. gosub, ButtonKeysetup
  405. gosub 3ButtonSaveandClose
  406.  
  407. return
  408.  
  409.  
  410. ButtonResizeRsClient:
  411. MsgBox, 1,OSRS Prayer, If you Click Ok the script will locate the Jagex RS client and resize it so the Hotkeys can work correctly. Orion needs to remain at defaul size - compact mode.`n`n`(Note you can also press Control + F12 To resize the rs client as well without clicking this message).
  412. IfMsgBox Ok
  413. IfWinExist Old School RuneScape
  414. {
  415. WinActivate
  416. ResizeWin(793,571)
  417. }
  418. return
  419. return
  420.  
  421. ButtonAbout:
  422. gui, 2:Default
  423. Gui, 2:Margin, 10, 10
  424. Gui, 2:Add, Text, center w240 h15, OSRS Prayer: By Samerdl
  425. Gui, 2:Add, Button, xp+5 yp+20,F-keys_And_Overheads
  426. Gui, 2:Add, button, default,Resizing_The_Rs_Client
  427. Gui, 2:Add, Button, default w+120,Run_toggling_feature
  428. Gui, 2:Add, Button, default w+140,Bind_Unclicking_Feature
  429. Gui, 2:Add, Button, default w+120,Mouse_Positioning_When_Done_Feature
  430. Gui, 2:Add, Button, default w+120,Sleep_time_feature
  431. Gui, 2:Add, Button, default xp+150 yp-100,General_Info
  432. Gui, 2:Add, Button, W240 xs-5 Close,Close
  433.  
  434. Gui, 2:Show, w250, About ~ OSRS Prayer: By Samerdl
  435. return
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442. 2ButtonClose:
  443. gui, 2:submit
  444. return
  445.  
  446. 2ButtonGeneral_Info:
  447. MsgBox, 0,OSRS Prayer, OSRS-Prayer is an Oldschool RS utility designed to speed up the act of Activating and De-activating Prayer & Run in the game.`n`n`It's is designed for the Orion client & the Rs client - use it at your own risk (against the rules).`n`n`{{ DO NOT USE IT ON BROWSERS!}}.
  448. return
  449.  
  450. 2ButtonF-keys_And_Overheads:
  451. MsgBox, 0,OSRS Prayer, F1-F3 Keys funciton as full on prayer activator, they will turn on: overhead, item protect, steel skin & Mystic might.`n`n`F4-F6 turns on Overheads only, coordinates for mouse clicks can be changed from within the script.
  452. return
  453.  
  454. 2buttonResizing_The_Rs_Client:
  455. MsgBox, 0,OSRS Prayer, The Resize feature (From the gui or just press Control + f12) will resize the RSClient to a pre-selected size so all the clicks will register properly and accordingly to the desired positions.`n`n` This feature is only needed for the Rsclient, as the Orion Client doesn't require a resize (yet).
  456. return
  457.  
  458. 2buttonRun_toggling_feature:
  459. MsgBox, 0,OSRS Prayer, This feature will turn run on and off when you press the backquote key.`n`n`Although the Gui shows the tilde (~) key is required for activation, you dont need to press shift to activate it - as the key bind is set to the backtick key (backquote, the tilde without shift I.E "`",`. Its just too hard to see it.
  460. return
  461.  
  462. 2buttonMouse_Positioning_When_Done_Feature:
  463. MsgBox, 0,OSRS Prayer, There are two options for the mouse position once the script finishes performing prayer/run toggles, it can eiher be the same position you've had it before, or it will move To X7/Y7 coords - the top of inventory close to the Inventory icon, you can change that within the script to any position you please.
  464. return
  465.  
  466. 2buttonBind_Unclicking_Feature:
  467. MsgBox, 0,OSRS Prayer, This feature will make sure to click at the top right of the screen before performing run/prayer activation/deactivation.`n`n`This is done to prevent the clicks from unregistering when you have 'cast bind' held (if you're a mager), not recommened to use this feature.
  468. return
  469.  
  470. 2buttonSleep_time_feature:
  471. msgbox,0,OSRS PRAYER, Sleep Time ads a wait time after & Before F-Keying between tabs, the Wait time is set in Sleep1, Sleep2.`n`n` By default the Sleep time is set to a random range between 100 to 150 MS.`n`Such Feature is needed to prevent bad clicks/failed clicks.
  472. return
  473.  
  474.  
  475.  
  476. ButtonKeysetup:
  477. #ctrls = 7 ;How many Hotkey controls to add?
  478. Loop,% #ctrls {
  479. Gui, 3:Add, Text, xm, Enter Activation key #%A_Index%:
  480. IniRead, savedHK%A_Index%, settings.ini, Hotkeys, %A_Index%, %A_Space%
  481. If savedHK%A_Index% ;Check for saved hotkeys in INI file.
  482. Hotkey,% savedHK%A_Index%, Label%A_Index% ;Activate saved hotkeys if found.
  483. StringReplace, noMods, savedHK%A_Index%, ~ ;Remove tilde (~) and Win (#) modifiers...
  484. StringReplace, noMods, noMods, #,,UseErrorLevel ;They are incompatible with hotkey controls (cannot be shown).
  485. Gui, 3:Add, Hotkey, x+5 vHK%A_Index% gGuiLabel, %noMods% ;Add hotkey controls and show saved hotkeys.
  486. } ;Check the box if Win modifier is used.
  487. Gui, 3:Add, Button, , Save and Close
  488. Gui, 3:Show,,Dynamic Hotkeys
  489. return
  490.  
  491. 3ButtonSaveandClose:
  492. Gui, 3:Submit
  493. savedHK%num% := HK%num%
  494. Gui, 3:Destroy
  495. return
  496.  
  497. GuiLabel:
  498. If %A_GuiControl% in +,^,!,+^,+!,^!,+^! ;If the hotkey contains only modifiers, return to wait for a key.
  499. return
  500. If InStr(%A_GuiControl%,"vk07") ;vk07 = MenuMaskKey (see below)
  501. GuiControl,,%A_GuiControl%, % lastHK ;Reshow the hotkey, because MenuMaskKey clears it.
  502. Else
  503. validateHK(A_GuiControl)
  504. return
  505.  
  506. validateHK(GuiControl) {
  507. global lastHK
  508. Gui, Submit, NoHide
  509. lastHK := %GuiControl% ;Backup the hotkey, in case it needs to be reshown.
  510. num := SubStr(GuiControl,3) ;Get the index number of the hotkey control.
  511. If (HK%num% != "") { ;If the hotkey is not blank...
  512. StringReplace, HK%num%, HK%num%, SC15D, AppsKey ;Use friendlier names,
  513. StringReplace, HK%num%, HK%num%, SC154, PrintScreen ; instead of these scan codes.
  514. If CB%num% ; If the 'Win' box is checked, then add its modifier (#).
  515. HK%num% := "#" HK%num%
  516. If !RegExMatch(HK%num%,"[#!\^\+]") ; If the new hotkey has no modifiers, add the (~) modifier.
  517. HK%num% := "~" HK%num% ; This prevents any key from being blocked.
  518. checkDuplicateHK(num)
  519. }
  520. If (savedHK%num% || HK%num%) ;Unless both are empty,
  521. setHK(num, savedHK%num%, HK%num%) ; update INI/GUI
  522. }
  523.  
  524. checkDuplicateHK(num) {
  525. global #ctrls
  526. Loop,% #ctrls
  527. If (HK%num% = savedHK%A_Index%) {
  528. dup := A_Index
  529. Loop,6 {
  530. GuiControl,% "Disable" b:=!b, HK%dup% ;Flash the original hotkey to alert the user.
  531. Sleep,200
  532. }
  533. GuiControl,,HK%num%,% HK%num% :="" ;Delete the hotkey and clear the control.
  534. break
  535. }
  536. }
  537.  
  538. setHK(num,INI,GUI) {
  539. If INI ;If previous hotkey exists,
  540. Hotkey, %INI%, Label%num%, Off ; disable it.
  541. If GUI ;If new hotkey exists,
  542. Hotkey, %GUI%, Label%num%, On ; enable it.
  543. IniWrite,% GUI ? GUI:null, settings.ini, Hotkeys, %num%
  544. savedHK%num% := HK%num%
  545. }
  546.  
  547. #MenuMaskKey vk07 ;Requires AHK_L 38+
  548. #If ctrl := HotkeyCtrlHasFocus()
  549. *AppsKey:: ;Add support for these special keys,
  550. *BackSpace:: ; which the hotkey control does not normally allow.
  551. *Delete::
  552. *Enter::
  553. *Escape::
  554. *Pause::
  555. *PrintScreen::
  556. *Space::
  557. *Tab::
  558. modifier := ""
  559. If GetKeyState("Shift","P")
  560. modifier .= "+"
  561. If GetKeyState("Ctrl","P")
  562. modifier .= "^"
  563. If GetKeyState("Alt","P")
  564. modifier .= "!"
  565. Gui, Submit, NoHide ;If BackSpace is the first key press, Gui has never been submitted.
  566. If (A_ThisHotkey == "*BackSpace" && %ctrl% && !modifier) ;If the control has text but no modifiers held,
  567. GuiControl,,%ctrl% ; allow BackSpace to clear that text.
  568. Else ;Otherwise,
  569. GuiControl,,%ctrl%, % modifier SubStr(A_ThisHotkey,2) ; show the hotkey.
  570. validateHK(ctrl)
  571. return
  572. #If
  573.  
  574. HotkeyCtrlHasFocus() {
  575. GuiControlGet, ctrl, Focus ;ClassNN
  576. If InStr(ctrl,"hotkey") {
  577. GuiControlGet, ctrl, FocusV ;Associated variable
  578. Return, ctrl
  579. }
  580. }
  581.  
  582.  
  583.  
  584. buttonFoodSetup:
  585. #If WinActive("Orion") or WinActive("Old School RuneScape") or WinActive("OSBot") or WinActive("Runescape") or WinActive("Tribot") or WinActive("SwiftKit")
  586. #ctrls = 5 ;How many Hotkey controls to add?
  587. Loop,% #ctrls {
  588. Gui, 4:Add, button, xm, Food Key%A_Index%
  589. IniRead, savedFK%A_Index%, settings.ini, Hotkeys2, %A_Index%, %A_Space%
  590. If savedFK%A_Index% ;Check for saved hotkeys in INI file.
  591. Hotkey,% savedFK%A_Index%, Labels%A_Index% ;Activate saved hotkeys if found.
  592. StringReplace, noMods, savedFK%A_Index%, ~ ;Remove tilde (~) and Win (#) modifiers...
  593. StringReplace, noMods, noMods, #,,UseErrorLevel ;They are incompatible with hotkey controls (cannot be shown).
  594. Gui, 4:Add, Hotkey, x+5 vFK%A_Index% gGuiLabels2, %noMods% ;Add hotkey controls and show saved hotkeys.
  595. }
  596. Gui, 4:Add, Button, , Save and exit ;Check the box if Win modifier is used.
  597. Gui, 4:Show,,Dynamic Hotkeys
  598. return
  599.  
  600. 4ButtonSaveandExit:
  601. Gui, 4:Submit
  602. savedFK%num% := FK%num%
  603. Gui, 4:Destroy
  604. return
  605.  
  606.  
  607.  
  608.  
  609. 4ButtonFoodKey1:
  610. gui, 5:default
  611. Gui, 5:Font, S16 CDefault, Verdana
  612. Gui, 5:Add, Text, x146 y27 w180 h40 , Key setup#1
  613. Gui, 5:Font, S6 CDefault, Verdana
  614. Gui, 5:Font, S7 CDefault, Verdana
  615. Gui, 5:Add, CheckBox, x376 y77 w80 h20 vInv1 checked%Inv1% , Inv1
  616. Gui, 5:Add, CheckBox, x266 y77 w80 h20 vInv2 checked%Inv2%, Inv2
  617. Gui, 5:Add, CheckBox, x136 y77 w80 h20 vInv3 checked%Inv3%, Inv3
  618. Gui, 5:Add, CheckBox, x26 y77 w80 h20 vInv4 checked%Inv4%, Inv4
  619. Gui, 5:Add, CheckBox, x376 y127 w80 h20 vInv5 checked%Inv5%, Inv5
  620. Gui, 5:Add, CheckBox, x266 y127 w80 h20 vInv6 checked%Inv6%, Inv6
  621. Gui, 5:Add, CheckBox, x136 y127 w80 h20 vInv7 checked%Inv7%, Inv7
  622. Gui, 5:Add, CheckBox, x26 y127 w80 h20 vInv8 checked%Inv8%, Inv8
  623. Gui, 5:Add, CheckBox, x376 y177 w80 h20 vInv9 checked%Inv9%, Inv9
  624. Gui, 5:Add, CheckBox, x256 y177 w80 h20 vInv10 checked%Inv10%, Inv10
  625. Gui, 5:Add, CheckBox, x136 y177 w80 h20 vInv11 checked%Inv11%, Inv11
  626. Gui, 5:Add, CheckBox, x26 y177 w80 h20 vInv12 checked%Inv12%, Inv12
  627. Gui, 5:Add, CheckBox, x376 y227 w80 h20 vInv13 checked%Inv13%, Inv13
  628. Gui, 5:Add, CheckBox, x256 y227 w80 h20 vInv14 checked%Inv14%, Inv14
  629. Gui, 5:Add, CheckBox, x136 y227 w80 h20 vInv15 checked%Inv15%, Inv15
  630. Gui, 5:Add, CheckBox, x26 y227 w80 h20 vInv16 checked%Inv16%, Inv16
  631. Gui, 5:Add, CheckBox, x376 y277 w80 h20 vInv17 checked%Inv17%, Inv17
  632. Gui, 5:Add, CheckBox, x256 y277 w80 h20 vInv18 checked%Inv18%, Inv18
  633. Gui, 5:Add, CheckBox, x136 y277 w80 h20 vInv19 checked%Inv19%, Inv19
  634. Gui, 5:Add, CheckBox, x26 y277 w80 h20 vInv20 checked%Inv20%, Inv20
  635. Gui, 5:Add, CheckBox, x376 y327 w80 h20 vInv21 checked%Inv21%, Inv21
  636. Gui, 5:Add, CheckBox, x256 y327 w80 h20 vInv22 checked%Inv22%, Inv22
  637. Gui, 5:Add, CheckBox, x136 y327 w80 h20 vInv23 checked%Inv23%, Inv23
  638. Gui, 5:Add, CheckBox, x26 y327 w80 h20 vInv24 checked%Inv24%, Inv24
  639. Gui, 5:Add, CheckBox, x376 y367 w80 h20 vInv25 checked%Inv25%, Inv25
  640. Gui, 5:Add, CheckBox, x256 y367 w80 h20 vInv26 checked%Inv26%, Inv26
  641. Gui, 5:Add, CheckBox, x136 y367 w80 h20 vInv27 checked%Inv27%, Inv27
  642. Gui, 5:Add, CheckBox, x26 y367 w80 h20 vInv28 checked%Inv28%, Inv28
  643. Gui, 5:Add, Button,w100 h30 xm x+70 gSave3, Save
  644. Gui, 5:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  645. Return
  646.  
  647.  
  648.  
  649. Save3:
  650. Gui, 5:Submit, NoHide
  651. loop, 28
  652. {
  653. IniWrite, % Inv%a_index%, settings.ini, Foodsettings, Inv%a_index%
  654. }
  655. Gui, 5:Destroy
  656. return
  657.  
  658.  
  659.  
  660.  
  661. 4ButtonFoodKey2:
  662. gui, 5:default
  663. Gui, 5:Font, S16 CDefault, Verdana
  664. Gui, 5:Add, Text, x146 y27 w180 h40 , Key setup #2
  665. Gui, 5:Font, S6 CDefault, Verdana
  666. Gui, 5:Font, S7 CDefault, Verdana
  667. Gui, 5:Add, CheckBox, x376 y77 w80 h20 vInv2k1 checked%Inv2k1% , Inv2k1
  668. Gui, 5:Add, CheckBox, x266 y77 w80 h20 vInv2k2 checked%Inv2k2%, Inv2k2
  669. Gui, 5:Add, CheckBox, x136 y77 w80 h20 vInv2k3 checked%Inv2k3%, Inv2k3
  670. Gui, 5:Add, CheckBox, x26 y77 w80 h20 vInv2k4 checked%Inv2k4%, Inv2k4
  671. Gui, 5:Add, CheckBox, x376 y127 w80 h20 vInv2k5 checked%Inv2k5%, Inv2k5
  672. Gui, 5:Add, CheckBox, x266 y127 w80 h20 vInv2k6 checked%Inv2k6%, Inv2k6
  673. Gui, 5:Add, CheckBox, x136 y127 w80 h20 vInv2k7 checked%Inv2k7%, Inv2k7
  674. Gui, 5:Add, CheckBox, x26 y127 w80 h20 vInv2k8 checked%Inv2k8%, Inv2k8
  675. Gui, 5:Add, CheckBox, x376 y177 w80 h20 vInv2k9 checked%Inv2k9%, Inv2k9
  676. Gui, 5:Add, CheckBox, x256 y177 w80 h20 vInv2k10 checked%Inv2k10%, Inv2k10
  677. Gui, 5:Add, CheckBox, x136 y177 w80 h20 vInv2k11 checked%Inv2k11%, Inv2k11
  678. Gui, 5:Add, CheckBox, x26 y177 w80 h20 vInv2k12 checked%Inv2k12%, Inv2k12
  679. Gui, 5:Add, CheckBox, x376 y227 w80 h20 vInv2k13 checked%Inv2k13%, Inv2k13
  680. Gui, 5:Add, CheckBox, x256 y227 w80 h20 vInv2k14 checked%Inv2k14%, Inv2k14
  681. Gui, 5:Add, CheckBox, x136 y227 w80 h20 vInv2k15 checked%Inv2k15%, Inv2k15
  682. Gui, 5:Add, CheckBox, x26 y227 w80 h20 vInv2k16 checked%Inv2k16%, Inv2k16
  683. Gui, 5:Add, CheckBox, x376 y277 w80 h20 vInv2k17 checked%Inv2k17%, Inv2k17
  684. Gui, 5:Add, CheckBox, x256 y277 w80 h20 vInv2k18 checked%Inv2k18%, Inv2k18
  685. Gui, 5:Add, CheckBox, x136 y277 w80 h20 vInv2k19 checked%Inv2k19%, Inv2k19
  686. Gui, 5:Add, CheckBox, x26 y277 w80 h20 vInv2k20 checked%Inv2k20%, Inv2k20
  687. Gui, 5:Add, CheckBox, x376 y327 w80 h20 vInv2k21 checked%Inv2k21%, Inv2k21
  688. Gui, 5:Add, CheckBox, x256 y327 w80 h20 vInv2k22 checked%Inv2k22%, Inv2k22
  689. Gui, 5:Add, CheckBox, x136 y327 w80 h20 vInv2k23 checked%Inv2k23%, Inv2k23
  690. Gui, 5:Add, CheckBox, x26 y327 w80 h20 vInv2k24 checked%Inv2k24%, Inv2k24
  691. Gui, 5:Add, CheckBox, x376 y367 w80 h20 vInv2k25 checked%Inv2k25%, Inv2k25
  692. Gui, 5:Add, CheckBox, x256 y367 w80 h20 vInv2k26 checked%Inv2k26%, Inv2k26
  693. Gui, 5:Add, CheckBox, x136 y367 w80 h20 vInv2k27 checked%Inv2k27%, Inv2k27
  694. Gui, 5:Add, CheckBox, x26 y367 w80 h20 vInv2k28 checked%Inv2k28%, Inv2k28
  695. Gui, 5:Add, Button,w100 h30 xm x+70 gSave4, Save
  696. Gui, 5:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  697. Return
  698.  
  699.  
  700. Save4:
  701. Gui, 5:Submit, NoHide
  702. loop, 28
  703. {
  704. IniWrite, % Inv2k%a_index%, settings.ini, Foodsettings, Inv2k%a_index%
  705. }
  706. Gui, 5:Destroy
  707. return
  708.  
  709.  
  710.  
  711.  
  712. 4ButtonFoodKey3:
  713. gui, 5:default
  714. Gui, 5:Font, S16 CDefault, Verdana
  715. Gui, 5:Add, Text, x146 y27 w180 h40 , Key setup#3
  716. Gui, 5:Font, S6 CDefault, Verdana
  717. Gui, 5:Font, S7 CDefault, Verdana
  718. Gui, 5:Add, CheckBox, x376 y77 w80 h20 vInv3k1 checked%Inv3k1% , Inv3k1
  719. Gui, 5:Add, CheckBox, x266 y77 w80 h20 vInv3k2 checked%Inv3k2%, Inv3k2
  720. Gui, 5:Add, CheckBox, x136 y77 w80 h20 vInv3k3 checked%Inv3k3%, Inv3k3
  721. Gui, 5:Add, CheckBox, x26 y77 w80 h20 vInv3k4 checked%Inv3k4%, Inv3k4
  722. Gui, 5:Add, CheckBox, x376 y127 w80 h20 vInv3k5 checked%Inv3k5%, Inv3k5
  723. Gui, 5:Add, CheckBox, x266 y127 w80 h20 vInv3k6 checked%Inv3k6%, Inv3k6
  724. Gui, 5:Add, CheckBox, x136 y127 w80 h20 vInv3k7 checked%Inv3k7%, Inv3k7
  725. Gui, 5:Add, CheckBox, x26 y127 w80 h20 vInv3k8 checked%Inv3k8%, Inv3k8
  726. Gui, 5:Add, CheckBox, x376 y177 w80 h20 vInv3k9 checked%Inv3k9%, Inv3k9
  727. Gui, 5:Add, CheckBox, x256 y177 w80 h20 vInv3k10 checked%Inv3k10%, Inv3k10
  728. Gui, 5:Add, CheckBox, x136 y177 w80 h20 vInv3k11 checked%Inv3k11%, Inv3k11
  729. Gui, 5:Add, CheckBox, x26 y177 w80 h20 vInv3k12 checked%Inv3k12%, Inv3k12
  730. Gui, 5:Add, CheckBox, x376 y227 w80 h20 vInv3k13 checked%Inv3k13%, Inv3k13
  731. Gui, 5:Add, CheckBox, x256 y227 w80 h20 vInv3k14 checked%Inv3k14%, Inv3k14
  732. Gui, 5:Add, CheckBox, x136 y227 w80 h20 vInv3k15 checked%Inv3k15%, Inv3k15
  733. Gui, 5:Add, CheckBox, x26 y227 w80 h20 vInv3k16 checked%Inv3k16%, Inv3k16
  734. Gui, 5:Add, CheckBox, x376 y277 w80 h20 vInv3k17 checked%Inv3k17%, Inv3k17
  735. Gui, 5:Add, CheckBox, x256 y277 w80 h20 vInv3k18 checked%Inv3k18%, Inv3k18
  736. Gui, 5:Add, CheckBox, x136 y277 w80 h20 vInv3k19 checked%Inv3k19%, Inv3k19
  737. Gui, 5:Add, CheckBox, x26 y277 w80 h20 vInv3k20 checked%Inv3k20%, Inv3k20
  738. Gui, 5:Add, CheckBox, x376 y327 w80 h20 vInv3k21 checked%Inv3k21%, Inv3k21
  739. Gui, 5:Add, CheckBox, x256 y327 w80 h20 vInv3k22 checked%Inv3k22%, Inv3k22
  740. Gui, 5:Add, CheckBox, x136 y327 w80 h20 vInv3k23 checked%Inv3k23%, Inv3k23
  741. Gui, 5:Add, CheckBox, x26 y327 w80 h20 vInv3k24 checked%Inv3k24%, Inv3k24
  742. Gui, 5:Add, CheckBox, x376 y367 w80 h20 vInv3k25 checked%Inv3k25%, Inv3k25
  743. Gui, 5:Add, CheckBox, x256 y367 w80 h20 vInv3k26 checked%Inv3k26%, Inv3k26
  744. Gui, 5:Add, CheckBox, x136 y367 w80 h20 vInv3k27 checked%Inv3k27%, Inv3k27
  745. Gui, 5:Add, CheckBox, x26 y367 w80 h20 vInv3k28 checked%Inv3k28%, Inv3k28
  746. Gui, 5:Add, Button,w100 h30 xm x+70 gSave5, Save
  747. Gui, 5:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  748. Return
  749.  
  750.  
  751. Save5:
  752. Gui, 5:Submit, NoHide
  753. loop, 28
  754. {
  755. IniWrite, % Inv3k%a_index%, settings.ini, Foodsettings, Inv3k%a_index%
  756. }
  757. Gui, 5:Destroy
  758. return
  759.  
  760. 4ButtonFoodKey4:
  761. gui, 5:default
  762. Gui, 5:Font, S16 CDefault, Verdana
  763. Gui, 5:Add, Text, x146 y27 w180 h40 , Key setup#4
  764. Gui, 5:Font, S6 CDefault, Verdana
  765. Gui, 5:Font, S7 CDefault, Verdana
  766. Gui, 5:Add, CheckBox, x376 y77 w80 h20 vInv4K1 checked%Inv4K1% , Inv4K1
  767. Gui, 5:Add, CheckBox, x266 y77 w80 h20 vInv4K2 checked%Inv4K2%, Inv4K2
  768. Gui, 5:Add, CheckBox, x136 y77 w80 h20 vInv4K3 checked%Inv4K3%, Inv4K3
  769. Gui, 5:Add, CheckBox, x26 y77 w80 h20 vInv4K4 checked%Inv4K4%, Inv4K4
  770. Gui, 5:Add, CheckBox, x376 y127 w80 h20 vInv4K5 checked%Inv4K5%, Inv4K5
  771. Gui, 5:Add, CheckBox, x266 y127 w80 h20 vInv4K6 checked%Inv4K6%, Inv4K6
  772. Gui, 5:Add, CheckBox, x136 y127 w80 h20 vInv4K7 checked%Inv4K7%, Inv4K7
  773. Gui, 5:Add, CheckBox, x26 y127 w80 h20 vInv4K8 checked%Inv4K8%, Inv4K8
  774. Gui, 5:Add, CheckBox, x376 y177 w80 h20 vInv4K9 checked%Inv4K9%, Inv4K9
  775. Gui, 5:Add, CheckBox, x256 y177 w80 h20 vInv4K10 checked%Inv4K10%, Inv4K10
  776. Gui, 5:Add, CheckBox, x136 y177 w80 h20 vInv4K11 checked%Inv4K11%, Inv4K11
  777. Gui, 5:Add, CheckBox, x26 y177 w80 h20 vInv4K12 checked%Inv4K12%, Inv4K12
  778. Gui, 5:Add, CheckBox, x376 y227 w80 h20 vInv4K13 checked%Inv4K13%, Inv4K13
  779. Gui, 5:Add, CheckBox, x256 y227 w80 h20 vInv4K14 checked%Inv4K14%, Inv4K14
  780. Gui, 5:Add, CheckBox, x136 y227 w80 h20 vInv4K15 checked%Inv4K15%, Inv4K15
  781. Gui, 5:Add, CheckBox, x26 y227 w80 h20 vInv4K16 checked%Inv4K16%, Inv4K16
  782. Gui, 5:Add, CheckBox, x376 y277 w80 h20 vInv4K17 checked%Inv4K17%, Inv4K17
  783. Gui, 5:Add, CheckBox, x256 y277 w80 h20 vInv4K18 checked%Inv4K18%, Inv4K18
  784. Gui, 5:Add, CheckBox, x136 y277 w80 h20 vInv4K19 checked%Inv4K19%, Inv4K19
  785. Gui, 5:Add, CheckBox, x26 y277 w80 h20 vInv4K20 checked%Inv4K20%, Inv4K20
  786. Gui, 5:Add, CheckBox, x376 y327 w80 h20 vInv4K21 checked%Inv4K21%, Inv4K21
  787. Gui, 5:Add, CheckBox, x256 y327 w80 h20 vInv4K22 checked%Inv4K22%, Inv4K22
  788. Gui, 5:Add, CheckBox, x136 y327 w80 h20 vInv4K23 checked%Inv4K23%, Inv4K23
  789. Gui, 5:Add, CheckBox, x26 y327 w80 h20 vInv4K24 checked%Inv4K24%, Inv4K24
  790. Gui, 5:Add, CheckBox, x376 y367 w80 h20 vInv4K25 checked%Inv4K25%, Inv4K25
  791. Gui, 5:Add, CheckBox, x256 y367 w80 h20 vInv4K26 checked%Inv4K26%, Inv4K26
  792. Gui, 5:Add, CheckBox, x136 y367 w80 h20 vInv4K27 checked%Inv4K27%, Inv4K27
  793. Gui, 5:Add, CheckBox, x26 y367 w80 h20 vInv4K28 checked%Inv4K28%, Inv4K28
  794. Gui, 5:Add, Button,w100 h30 xm x+70 gSave6, Save
  795. Gui, 5:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  796. Return
  797.  
  798.  
  799.  
  800. Save6:
  801. Gui, 5:Submit, NoHide
  802. loop, 28
  803. {
  804. IniWrite, % Inv4k%a_index%, settings.ini, Foodsettings, Inv4k%a_index%
  805. }
  806. Gui, 5:Destroy
  807. return
  808.  
  809.  
  810.  
  811. 4ButtonFoodKey5:
  812. gui, 5:default
  813. Gui, 5:Font, S16 CDefault, Verdana
  814. Gui, 5:Add, Text, x146 y27 w180 h40 , Keysetup #5
  815. Gui, 5:Font, S6 CDefault, Verdana
  816. Gui, 5:Font, S7 CDefault, Verdana
  817. Gui, 5:Add, CheckBox, x376 y77 w80 h20 vInv5k1 checked%Inv5k1% , Inv5k1
  818. Gui, 5:Add, CheckBox, x266 y77 w80 h20 vInv5k2 checked%Inv5k2%, Inv5k2
  819. Gui, 5:Add, CheckBox, x136 y77 w80 h20 vInv5k3 checked%Inv5k3%, Inv5k3
  820. Gui, 5:Add, CheckBox, x26 y77 w80 h20 vInv5k4 checked%Inv5k4%, Inv5k4
  821. Gui, 5:Add, CheckBox, x376 y127 w80 h20 vInv5k5 checked%Inv5k5%, Inv5k5
  822. Gui, 5:Add, CheckBox, x266 y127 w80 h20 vInv5k6 checked%Inv5k6%, Inv5k6
  823. Gui, 5:Add, CheckBox, x136 y127 w80 h20 vInv5k7 checked%Inv5k7%, Inv5k7
  824. Gui, 5:Add, CheckBox, x26 y127 w80 h20 vInv5k8 checked%Inv5k8%, Inv5k8
  825. Gui, 5:Add, CheckBox, x376 y177 w80 h20 vInv5k9 checked%Inv5k9%, Inv5k9
  826. Gui, 5:Add, CheckBox, x256 y177 w80 h20 vInv5k10 checked%Inv5k10%, Inv5k10
  827. Gui, 5:Add, CheckBox, x136 y177 w80 h20 vInv5k11 checked%Inv5k11%, Inv5k11
  828. Gui, 5:Add, CheckBox, x26 y177 w80 h20 vInv5k12 checked%Inv5k12%, Inv5k12
  829. Gui, 5:Add, CheckBox, x376 y227 w80 h20 vInv5k13 checked%Inv5k13%, Inv5k13
  830. Gui, 5:Add, CheckBox, x256 y227 w80 h20 vInv5k14 checked%Inv5k14%, Inv5k14
  831. Gui, 5:Add, CheckBox, x136 y227 w80 h20 vInv5k15 checked%Inv5k15%, Inv5k15
  832. Gui, 5:Add, CheckBox, x26 y227 w80 h20 vInv5k16 checked%Inv5k16%, Inv5k16
  833. Gui, 5:Add, CheckBox, x376 y277 w80 h20 vInv5k17 checked%Inv5k17%, Inv5k17
  834. Gui, 5:Add, CheckBox, x256 y277 w80 h20 vInv5k18 checked%Inv5k18%, Inv5k18
  835. Gui, 5:Add, CheckBox, x136 y277 w80 h20 vInv5k19 checked%Inv5k19%, Inv5k19
  836. Gui, 5:Add, CheckBox, x26 y277 w80 h20 vInv5k20 checked%Inv5k20%, Inv5k20
  837. Gui, 5:Add, CheckBox, x376 y327 w80 h20 vInv5k21 checked%Inv5k21%, Inv5k21
  838. Gui, 5:Add, CheckBox, x256 y327 w80 h20 vInv5k22 checked%Inv5k22%, Inv5k22
  839. Gui, 5:Add, CheckBox, x136 y327 w80 h20 vInv5k23 checked%Inv5k23%, Inv5k23
  840. Gui, 5:Add, CheckBox, x26 y327 w80 h20 vInv5k24 checked%Inv5k24%, Inv5k24
  841. Gui, 5:Add, CheckBox, x376 y367 w80 h20 vInv5k25 checked%Inv5k25%, Inv5k25
  842. Gui, 5:Add, CheckBox, x256 y367 w80 h20 vInv5k26 checked%Inv5k26%, Inv5k26
  843. Gui, 5:Add, CheckBox, x136 y367 w80 h20 vInv5k27 checked%Inv5k27%, Inv5k27
  844. Gui, 5:Add, CheckBox, x26 y367 w80 h20 vInv5k28 checked%Inv5k28%, Inv5k28
  845. Gui, 5:Add, Button,w100 h30 xm x+70 gSave7, Save
  846. Gui, 5:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  847. Return
  848.  
  849.  
  850. Save7:
  851. Gui, 5:Submit, NoHide
  852. loop, 28
  853. {
  854. IniWrite, % Inv5k%a_index%, settings.ini, Foodsettings, Inv5k%a_index%
  855. }
  856. Gui, 5:Destroy
  857. return
  858.  
  859.  
  860. GuiLabels2:
  861. If %A_GuiControl% in +,^,!,+^,+!,^!,+^! ;If the hotkey contains only modifiers, return to wait for a key.
  862. return
  863. If InStr(%A_GuiControl%,"vk07") ;vk07 = MenuMaskKey (see below)
  864. GuiControl,,%A_GuiControl%, % lastFK ;Reshow the hotkey, because MenuMaskKey clears it.
  865. Else
  866. validateFK(A_GuiControl)
  867. return
  868.  
  869. validateFK(GuiControl) {
  870. global lastFK
  871. Gui, Submit, NoHide
  872. lastFK := %GuiControl% ;Backup the hotkey, in case it needs to be reshown.
  873. num := SubStr(GuiControl,3) ;Get the index number of the hotkey control.
  874. If (FK%num% != "") { ;If the hotkey is not blank...
  875. StringReplace, FK%num%, FK%num%, SC15D, AppsKey ;Use friendlier names,
  876. StringReplace, FK%num%, FK%num%, SC154, PrintScreen ; instead of these scan codes.
  877. If CB%num% ; If the 'Win' box is checked, then add its modifier (#).
  878. FK%num% := "#" FK%num%
  879. If !RegExMatch(FK%num%,"[#!\^\+]") ; If the new hotkey has no modifiers, add the (~) modifier.
  880. FK%num% := "~" FK%num% ; This prevents any key from being blocked.
  881. checkDuplicateFK(num)
  882. }
  883. If (savedFK%num% || FK%num%) ;Unless both are empty,
  884. setFK(num, savedFK%num%, FK%num%) ; update INI/GUI
  885. }
  886.  
  887. checkDuplicateFK(num) {
  888. global #ctrls
  889. Loop,% #ctrls
  890. If (FK%num% = savedFK%A_Index%) {
  891. dup := A_Index
  892. Loop,6 {
  893. GuiControl,% "Disable" b:=!b, FK%dup% ;Flash the original hotkey to alert the user.
  894. Sleep,200
  895. }
  896. GuiControl,,FK%num%,% FK%num% :="" ;Delete the hotkey and clear the control.
  897. break
  898. }
  899. }
  900.  
  901. setFK(num,INI,GUI) {
  902. If INI ;If previous hotkey exists,
  903. Hotkey, %INI%, Labels%num%, Off ; disable it.
  904. If GUI ;If new hotkey exists,
  905. Hotkey, %GUI%, Labels%num%, On ; enable it.
  906. IniWrite,% GUI ? GUI:null, settings.ini, Hotkeys2, %num%
  907. savedFK%num% := FK%num%
  908. }
  909.  
  910. #MenuMaskKey vk07 ;Requires AFK_L 38+
  911. #If ctrl := HotkeyCtrlHasFocus1()
  912. modifier := ""
  913. If GetKeyState("Shift","P")
  914. modifier .= "+"
  915. If GetKeyState("Ctrl","P")
  916. modifier .= "^"
  917. If GetKeyState("Alt","P")
  918. modifier .= "!"
  919. Gui, Submit, NoHide ;If BackSpace is the first key press, Gui has never been submitted.
  920. If (A_ThisHotkey == "*BackSpace" && %ctrl% && !modifier) ;If the control has text but no modifiers held,
  921. GuiControl,,%ctrl% ; allow BackSpace to clear that text.
  922. Else ;Otherwise,
  923. GuiControl,,%ctrl%, % modifier SubStr(A_ThisHotkey,2) ; show the hotkey.
  924. validateFK(ctrl)
  925. return
  926. #If
  927.  
  928. HotkeyCtrlHasFocus1() {
  929. GuiControlGet, ctrl, Focus ;ClassNN
  930. If InStr(ctrl,"hotkey") {
  931. GuiControlGet, ctrl, FocusV ;Associated variable
  932. Return, ctrl
  933. }
  934. }
  935.  
  936.  
  937.  
  938. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  939.  
  940.  
  941. labels1:
  942. Blockinput on
  943.  
  944. gosub MouseArea
  945. Blockinput off
  946. return
  947.  
  948.  
  949. labels2:
  950. Blockinput on
  951.  
  952. gosub MouseArea
  953. Blockinput off
  954. return
  955.  
  956.  
  957. labels3:
  958. Blockinput on
  959.  
  960. gosub MouseArea
  961. Blockinput off
  962. return
  963.  
  964. labels4:
  965. Blockinput on
  966.  
  967. gosub MouseArea
  968. Blockinput off
  969. return
  970.  
  971. labels5:
  972. Blockinput on
  973.  
  974. gosub MouseArea
  975. Blockinput off
  976. return
  977.  
  978.  
  979. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  980.  
  981.  
  982.  
  983. Label1:
  984.  
  985. Blockinput on
  986. MouseGetPos, XX, YY
  987. gosub binding
  988. gosub %F1downs%
  989. if prot1 {
  990. gosub checkboxes
  991. } else {
  992. send {esc}
  993. }
  994. if arm1 {
  995. gosub armors
  996. }
  997.  
  998. if Un1 {
  999. gosub %Armun%
  1000. }
  1001. gosub MouseArea
  1002. Blockinput off
  1003. return
  1004.  
  1005.  
  1006. Label2:
  1007. Blockinput on
  1008. MouseGetPos, XX, YY
  1009. gosub binding
  1010. gosub %F2downs%
  1011. if prot2 {
  1012. gosub checkboxes
  1013. } else {
  1014. send {esc}
  1015. }
  1016. if arm2 {
  1017. gosub armors
  1018. }
  1019.  
  1020. if Un2 {
  1021. gosub %Armun%
  1022. }
  1023.  
  1024. gosub MouseArea
  1025. Blockinput off
  1026. return
  1027.  
  1028.  
  1029.  
  1030. Label3:
  1031. Blockinput on
  1032. MouseGetPos, XX, YY
  1033. gosub binding
  1034. gosub %F3downs%
  1035. if prot3 {
  1036. gosub checkboxes
  1037. } else {
  1038. send {esc}
  1039. }
  1040. if arm3 {
  1041. gosub armors
  1042. }
  1043.  
  1044.  
  1045. if Un3 {
  1046. gosub %Armun%
  1047. }
  1048.  
  1049. gosub MouseArea
  1050. Blockinput off
  1051. return
  1052.  
  1053.  
  1054.  
  1055. Label4:
  1056. Blockinput on
  1057. MouseGetPos, XX, YY
  1058. gosub binding
  1059. gosub %F4downs%
  1060. if prot4 {
  1061. gosub checkboxes
  1062. } else {
  1063. send {esc}
  1064. }
  1065. if arm4 {
  1066. gosub armors
  1067. }
  1068.  
  1069.  
  1070. if Un4 {
  1071. gosub %Armun%
  1072. }
  1073.  
  1074. gosub MouseArea
  1075. Blockinput off
  1076. return
  1077.  
  1078.  
  1079.  
  1080. Label5:
  1081. Blockinput on
  1082. MouseGetPos, XX, YY
  1083. gosub binding
  1084. gosub %F5downs%
  1085. if prot5 {
  1086. gosub checkboxes
  1087. } else {
  1088. send {esc}
  1089. }
  1090. if arm5 {
  1091. gosub armors
  1092. }
  1093.  
  1094.  
  1095. if Un5 {
  1096. gosub %Armun%
  1097. }
  1098.  
  1099. gosub MouseArea
  1100. Blockinput off
  1101. return
  1102.  
  1103.  
  1104. Label6:
  1105. Blockinput on
  1106. MouseGetPos, XX, YY
  1107. gosub binding
  1108. gosub %F6downs%
  1109. if prot6 {
  1110. gosub checkboxes
  1111. } else {
  1112. send {esc}
  1113. }
  1114. if arm6 {
  1115. gosub armors
  1116. }
  1117.  
  1118.  
  1119. if Un6 {
  1120. gosub %Armun%
  1121. }
  1122.  
  1123. gosub MouseArea
  1124. Blockinput off
  1125. return
  1126.  
  1127.  
  1128. Label7:
  1129. Blockinput on
  1130. MouseGetPos, XX, YY
  1131. gosub binding
  1132. gosub %F7downs%
  1133. if prot7 {
  1134. gosub checkboxes
  1135. } else {
  1136. send {esc}
  1137. }
  1138. if arm7 {
  1139. gosub armors
  1140. }
  1141.  
  1142.  
  1143. if Un7 {
  1144. gosub %Armun%
  1145. }
  1146.  
  1147. gosub MouseArea
  1148. Blockinput off
  1149. return
  1150.  
  1151. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  1152.  
  1153.  
  1154.  
  1155. Quick:
  1156. IfWinNotActive Old School RuneScape
  1157. {
  1158. MouseClick , Left , X10+ Ran(offset), Y10+ Ran(offset)
  1159. }
  1160. IfWinActive Old School RuneScape
  1161. {
  1162. MouseClick , Left , Ran(offset)+ XR10, Ran(offset)+ Yr10
  1163. }
  1164. return
  1165.  
  1166.  
  1167.  
  1168. Melee:
  1169. send {f5}
  1170. Gosub Sleeping
  1171. IfWinNotActive Old School RuneScape
  1172. {
  1173. MouseClick , Left , X1+ Ran(offset), Y1+ Ran(offset)
  1174. }
  1175. IfWinActive Old School RuneScape
  1176. {
  1177. MouseClick , Left , Ran(offset)+ XR1, Ran(offset)+ Yr1
  1178. }
  1179. return
  1180.  
  1181. Range:
  1182. send {f5}
  1183. Gosub Sleeping
  1184. IfWinNotActive Old School RuneScape
  1185. {
  1186. MouseClick , Left , X2+ Ran(offset), Y2+ Ran(offset)
  1187. }
  1188. IfWinActive Old School RuneScape
  1189. {
  1190. MouseClick , Left , Ran(offset)+ XR2, Ran(offset)+ Yr2
  1191. }
  1192. return
  1193.  
  1194.  
  1195.  
  1196. Mage:
  1197. send {f5}
  1198. Gosub Sleeping
  1199. IfWinNotActive Old School RuneScape
  1200. {
  1201. MouseClick , Left , X3+ Ran(offset), Y3+ Ran(offset)
  1202. }
  1203. IfWinActive Old School RuneScape
  1204. {
  1205. MouseClick , Left , Ran(offset)+ XR3, Ran(offset)+ Yr3
  1206. }
  1207. return
  1208.  
  1209.  
  1210. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  1211.  
  1212.  
  1213.  
  1214. `::
  1215. BlockInput on
  1216. if FRunning {
  1217. MouseGetPos, XX, YY
  1218. IfWinNotActive Old School RuneScape
  1219. {
  1220. MouseClick , Left , X8+ Ran(offset), Y8+ Ran(offset)
  1221. }
  1222. IfWinActive Old School RuneScape
  1223. {
  1224. MouseClick , Left , Ran(offset)+ XR8, Ran(offset)+ Yr8
  1225. }
  1226. }
  1227. gosub MouseArea
  1228. BlockInput off
  1229. return
  1230.  
  1231.  
  1232.  
  1233.  
  1234. checkboxes:
  1235. send {f5}
  1236. if SteelSkins {
  1237. IfWinNotActive Old School RuneScape
  1238. {
  1239. MouseClick , Left , X4+ Ran(offset), Y4+ Ran(offset)
  1240. }
  1241. IfWinActive Old School RuneScape
  1242. {
  1243. MouseClick , Left , Ran(offset)+ XR4, Ran(offset)+ Yr4
  1244. }
  1245.  
  1246. }
  1247. if ItemProtects {
  1248. IfWinNotActive Old School RuneScape
  1249. {
  1250. MouseClick , Left , X5+ Ran(offset), Y5+ Ran(offset)
  1251. }
  1252. IfWinActive Old School RuneScape
  1253. {
  1254. MouseClick , Left , Ran(offset)+ XR5, Ran(offset)+ Yr5
  1255. }
  1256. }
  1257. if MysticMight {
  1258. IfWinNotActive Old School RuneScape
  1259. {
  1260. MouseClick , Left , X6+ Ran(offset), Y6+ Ran(offset)
  1261. }
  1262. IfWinActive Old School RuneScape
  1263. {
  1264. MouseClick , Left , Ran(offset)+ XR6, Ran(offset)+ Yr6
  1265. }
  1266. }
  1267. send {esc}
  1268. return
  1269.  
  1270.  
  1271.  
  1272. One:
  1273. send {F4}
  1274. gosub sleeping
  1275. IfWinNotActive Old School RuneScape
  1276. {
  1277. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1278. }
  1279. IfWinActive Old School RuneScape
  1280. {
  1281. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1282. }
  1283. send {esc}
  1284. return
  1285.  
  1286.  
  1287. Two:
  1288. send {F4}
  1289. gosub sleeping
  1290. IfWinNotActive Old School RuneScape
  1291. {
  1292. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1293. MouseClick , Left , X16+ Ran(offset), Y16+ Ran(offset),,2
  1294. }
  1295. IfWinActive Old School RuneScape
  1296. {
  1297. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1298. MouseClick , Left , XR16 + Ran(offset), YR16 + Ran(offset),, 2
  1299. }
  1300. send {esc}
  1301. return
  1302.  
  1303. Three:
  1304. send {F4}
  1305. gosub sleeping
  1306. IfWinNotActive Old School RuneScape
  1307. {
  1308. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1309. MouseClick , Left , X16+ Ran(offset), Y16+ Ran(offset),,2
  1310. MouseClick , Left , X17+ Ran(offset), Y17+ Ran(offset),,2
  1311. }
  1312. IfWinActive Old School RuneScape
  1313. {
  1314. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1315. MouseClick , Left , XR16 + Ran(offset), YR16 + Ran(offset),, 2
  1316. MouseClick , Left , XR17 + Ran(offset), YR17 + Ran(offset),, 2
  1317. }
  1318. send {esc}
  1319. return
  1320.  
  1321. Four:
  1322. send {F4}
  1323. gosub sleeping
  1324. IfWinNotActive Old School RuneScape
  1325. {
  1326. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1327. MouseClick , Left , X16+ Ran(offset), Y16+ Ran(offset),,2
  1328. MouseClick , Left , X17+ Ran(offset), Y17+ Ran(offset),,2
  1329. MouseClick , Left , X18+ Ran(offset), Y18+ Ran(offset),,2
  1330. }
  1331. IfWinActive Old School RuneScape
  1332. {
  1333. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1334. MouseClick , Left , XR16 + Ran(offset), YR16 + Ran(offset),, 2
  1335. MouseClick , Left , XR17 + Ran(offset), YR17 + Ran(offset),, 2
  1336. MouseClick , Left , XR18 + Ran(offset), YR18 + Ran(offset),, 2
  1337. }
  1338. send {esc}
  1339. return
  1340.  
  1341.  
  1342. Armors:
  1343. if Radio1 {
  1344. IfWinNotActive Old School RuneScape
  1345. {
  1346. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  1347. }
  1348. IfWinActive Old School RuneScape
  1349. {
  1350. MouseClick , Left , XR11 + Ran(offset), YR11 + Ran(offset),, 2
  1351. }
  1352. }
  1353.  
  1354. if Radio2 {
  1355. IfWinNotActive Old School RuneScape
  1356. {
  1357. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  1358. gosub sleeping
  1359. MouseClick , Left , X12+ Ran(offset), Y12+ Ran(offset),,2
  1360. }
  1361.  
  1362. IfWinActive Old School RuneScape
  1363. {
  1364. MouseClick , Left , XR11 + Ran(offset), YR11 + Ran(offset),, 2
  1365. gosub sleeping
  1366. MouseClick , Left , XR12+ Ran(offset), YR12+ Ran(offset),,2
  1367. }
  1368. }
  1369.  
  1370.  
  1371. if Radio3 {
  1372. IfWinNotActive Old School RuneScape
  1373. {
  1374. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  1375. gosub sleeping
  1376. MouseClick , Left , X12+ Ran(offset), Y12+ Ran(offset),,2
  1377. gosub sleeping
  1378. MouseClick , Left , X13+ Ran(offset), Y13+ Ran(offset),,2
  1379. }
  1380.  
  1381. IfWinActive Old School RuneScape
  1382. {
  1383. MouseClick , Left , XR11 + Ran(offset), YR11 + Ran(offset),, 2
  1384. gosub sleeping
  1385. MouseClick , Left , XR12+ Ran(offset), YR12+ Ran(offset),,2
  1386. gosub sleeping
  1387. MouseClick , Left , XR13+ Ran(offset), YR13+ Ran(offset),,2
  1388. }
  1389. }
  1390.  
  1391.  
  1392. if Radio4 {
  1393. IfWinNotActive Old School RuneScape
  1394. {
  1395. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  1396. gosub sleeping
  1397. MouseClick , Left , X12+ Ran(offset), Y12+ Ran(offset),,2
  1398. gosub sleeping
  1399. MouseClick , Left , X13+ Ran(offset), Y13+ Ran(offset),,2
  1400. gosub sleeping
  1401. MouseClick , Left , X14+ Ran(offset), Y14+ Ran(offset),,2
  1402. }
  1403.  
  1404. IfWinActive Old School RuneScape
  1405. {
  1406. MouseClick , Left , XR11 + Ran(offset), YR11 + Ran(offset),, 2
  1407. gosub sleeping
  1408. MouseClick , Left , XR12+ Ran(offset), YR12+ Ran(offset),,2
  1409. gosub sleeping
  1410. MouseClick , Left , XR13+ Ran(offset), YR13+ Ran(offset),,2
  1411. gosub sleeping
  1412. MouseClick , Left , XR14+ Ran(offset), YR14+ Ran(offset),,2
  1413. }
  1414. }
  1415.  
  1416. return
  1417.  
  1418.  
  1419. ^F12::
  1420. IfWinExist Old School RuneScape
  1421. {
  1422. WinActivate
  1423. ResizeWin(793,571)
  1424. gosub sleeping
  1425. ResizeWin(793,571)
  1426. }
  1427. return
  1428.  
  1429.  
  1430.  
  1431. Mousearea:
  1432. if Invs {
  1433. IfWinNotActive Old School RuneScape
  1434. {
  1435. MouseMove, X7+ Ran(offset), Y7+ Ran(offset), 0
  1436. }
  1437. IfWinActive Old School RuneScape
  1438. {
  1439. MouseMove, Ran(offset)+ XR7, Ran(offset)+ Yr7, 0
  1440. }
  1441. }
  1442.  
  1443. if Origin {
  1444. IfWinNotActive Old School RuneScape
  1445. {
  1446. MouseMove, XX+ Ran(offset), YY+ Ran(offset), 0
  1447. }
  1448. IfWinActive Old School RuneScape
  1449. {
  1450. MouseMove, xx+ Ran(offset), yy+ Ran(offset), 0
  1451. }
  1452. }
  1453.  
  1454. return
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460. Binding:
  1461. if Fbinds {
  1462. IfWinNotActive Old School RuneScape
  1463. {
  1464. MouseClick , Left , X9+ Ran(offset), Y9+ Ran(offset),,0
  1465. }
  1466. IfWinActive Old School RuneScape
  1467. {
  1468. MouseClick , Left , Ran(offset)+ XR9, Ran(offset)+ Yr9,,0
  1469. }
  1470. }
  1471. return
  1472.  
  1473. none:
  1474. sleep 50
  1475. return
  1476.  
  1477.  
  1478.  
  1479. Sleeping:
  1480. if Fsleep {
  1481. Random, Rand, Sleep1, Sleep2
  1482. sleep %rand%
  1483. }
  1484. return
  1485.  
  1486.  
  1487.  
  1488. Ran(Num)
  1489. {
  1490. Random, r, -1*Num, Num
  1491. Return r
  1492. }
  1493.  
  1494.  
  1495. ResizeWin(Width = 0,Height = 0)
  1496. {
  1497. WinGetPos,X,Y,W,H,A
  1498. If %Width% = 0
  1499. Width := W
  1500.  
  1501. If %Height% = 0
  1502. Height := H
  1503.  
  1504. WinMove,A,,%X%,%Y%,%Width%,%Height%
  1505. }
Advertisement
Add Comment
Please, Sign In to add comment