zamaro

FOSRSHelper

Feb 25th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.63 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 w50 h20 , Key 1
  231. Gui, Add, Text, x196 y107 w50 h20 , key 2
  232. Gui, Add, Text, x256 y107 w50 h20 , key 3
  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 w50 h20 , Key 4
  248. Gui, Add, Text, x366 y107 w50 h20 , Key 5
  249. Gui, Add, Text, x416 y107 w50 h20 , Key 6
  250. Gui, Add, Text, x466 y107 w50 h20 , Key 7
  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.  
  404.  
  405.  
  406. ButtonResizeRsClient:
  407. 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).
  408. IfMsgBox Ok
  409. IfWinExist Old School RuneScape
  410. {
  411. WinActivate
  412. ResizeWin(793,571)
  413. }
  414. return
  415. return
  416.  
  417. ButtonAbout:
  418. gui, 2:Default
  419. Gui, 2:Margin, 10, 10
  420. Gui, 2:Add, Text, center w240 h15, OSRS Prayer: By Samerdl
  421. Gui, 2:Add, Button, xp+5 yp+20,F-keys_And_Overheads
  422. Gui, 2:Add, button, default,Resizing_The_Rs_Client
  423. Gui, 2:Add, Button, default w+120,Run_toggling_feature
  424. Gui, 2:Add, Button, default w+140,Bind_Unclicking_Feature
  425. Gui, 2:Add, Button, default w+120,Mouse_Positioning_When_Done_Feature
  426. Gui, 2:Add, Button, default w+120,Sleep_time_feature
  427. Gui, 2:Add, Button, default xp+150 yp-100,General_Info
  428. Gui, 2:Add, Button, W240 xs-5 Close,Close
  429.  
  430. Gui, 2:Show, w250, About ~ OSRS Prayer: By Samerdl
  431. return
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438. 2ButtonClose:
  439. gui, 2:submit
  440. return
  441.  
  442. 2ButtonGeneral_Info:
  443. 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!}}.
  444. return
  445.  
  446. 2ButtonF-keys_And_Overheads:
  447. 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.
  448. return
  449.  
  450. 2buttonResizing_The_Rs_Client:
  451. 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).
  452. return
  453.  
  454. 2buttonRun_toggling_feature:
  455. 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.
  456. return
  457.  
  458. 2buttonMouse_Positioning_When_Done_Feature:
  459. 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.
  460. return
  461.  
  462. 2buttonBind_Unclicking_Feature:
  463. 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.
  464. return
  465.  
  466. 2buttonSleep_time_feature:
  467. 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.
  468. return
  469.  
  470.  
  471.  
  472. ButtonKeysetup:
  473. #ctrls = 7 ;How many Hotkey controls to add?
  474. Loop,% #ctrls {
  475. Gui, 3:Add, Text, xm, Enter Activation key #%A_Index%:
  476. IniRead, savedHK%A_Index%, settings.ini, Hotkeys, %A_Index%, %A_Space%
  477. If savedHK%A_Index% ;Check for saved hotkeys in INI file.
  478. Hotkey,% savedHK%A_Index%, Label%A_Index% ;Activate saved hotkeys if found.
  479. StringReplace, noMods, savedHK%A_Index%, ~ ;Remove tilde (~) and Win (#) modifiers...
  480. StringReplace, noMods, noMods, #,,UseErrorLevel ;They are incompatible with hotkey controls (cannot be shown).
  481. Gui, 3:Add, Hotkey, x+5 vHK%A_Index% gGuiLabel, %noMods% ;Add hotkey controls and show saved hotkeys.
  482. } ;Check the box if Win modifier is used.
  483. Gui, 3: Font, underline cred
  484. Gui, 3:Add, Text, xm , Add Run Activation key:
  485. Gui, 3: Font,
  486. IniRead, savedHK%A_Index%, settings.ini, Hotkeys, %A_Index%, %A_Space%
  487. If savedHK%A_Index% ;Check for saved hotkeys in INI file.
  488. Hotkey,% savedHK%A_Index%, Label%A_Index% ;Activate saved hotkeys if found.
  489. StringReplace, noMods, savedHK%A_Index%, ~ ;Remove tilde (~) and Win (#) modifiers...
  490. StringReplace, noMods, noMods, #,,UseErrorLevel ;They are incompatible with hotkey controls (cannot be shown).
  491. Gui, 3:Add, Hotkey, x+5 vHK%A_Index% gGuiLabel, %noMods% ;Add hotkey controls and show saved hotkeys.
  492. Gui, 3:Add, Button, , Save and Close
  493. Gui, 3:Show,,Dynamic Hotkeys
  494. return
  495.  
  496. 3ButtonSaveandClose:
  497. Gui, 3:Submit
  498. savedHK%num% := HK%num%
  499. Gui, 3:Destroy
  500. return
  501.  
  502. GuiLabel:
  503. If %A_GuiControl% in +,^,!,+^,+!,^!,+^! ;If the hotkey contains only modifiers, return to wait for a key.
  504. return
  505. If InStr(%A_GuiControl%,"vk07") ;vk07 = MenuMaskKey (see below)
  506. GuiControl,,%A_GuiControl%, % lastHK ;Reshow the hotkey, because MenuMaskKey clears it.
  507. Else
  508. validateHK(A_GuiControl)
  509. return
  510.  
  511. validateHK(GuiControl) {
  512. global lastHK
  513. Gui, Submit, NoHide
  514. lastHK := %GuiControl% ;Backup the hotkey, in case it needs to be reshown.
  515. num := SubStr(GuiControl,3) ;Get the index number of the hotkey control.
  516. If (HK%num% != "") { ;If the hotkey is not blank...
  517. StringReplace, HK%num%, HK%num%, SC15D, AppsKey ;Use friendlier names,
  518. StringReplace, HK%num%, HK%num%, SC154, PrintScreen ; instead of these scan codes.
  519. If CB%num% ; If the 'Win' box is checked, then add its modifier (#).
  520. HK%num% := "#" HK%num%
  521. If !RegExMatch(HK%num%,"[#!\^\+]") ; If the new hotkey has no modifiers, add the (~) modifier.
  522. HK%num% := "~" HK%num% ; This prevents any key from being blocked.
  523. checkDuplicateHK(num)
  524. }
  525. If (savedHK%num% || HK%num%) ;Unless both are empty,
  526. setHK(num, savedHK%num%, HK%num%) ; update INI/GUI
  527. }
  528.  
  529. checkDuplicateHK(num) {
  530. global #ctrls
  531. Loop,% #ctrls
  532. If (HK%num% = savedHK%A_Index%) {
  533. dup := A_Index
  534. Loop,6 {
  535. GuiControl,% "Disable" b:=!b, HK%dup% ;Flash the original hotkey to alert the user.
  536. Sleep,200
  537. }
  538. GuiControl,,HK%num%,% HK%num% :="" ;Delete the hotkey and clear the control.
  539. break
  540. }
  541. }
  542.  
  543. setHK(num,INI,GUI) {
  544. If INI ;If previous hotkey exists,
  545. Hotkey, %INI%, Label%num%, Off ; disable it.
  546. If GUI ;If new hotkey exists,
  547. Hotkey, %GUI%, Label%num%, On ; enable it.
  548. IniWrite,% GUI ? GUI:null, settings.ini, Hotkeys, %num%
  549. savedHK%num% := HK%num%
  550. }
  551.  
  552. #MenuMaskKey vk07 ;Requires AHK_L 38+
  553. #If ctrl := HotkeyCtrlHasFocus()
  554. *AppsKey:: ;Add support for these special keys,
  555. *BackSpace:: ; which the hotkey control does not normally allow.
  556. *Delete::
  557. *Enter::
  558. *Escape::
  559. *Pause::
  560. *PrintScreen::
  561. *Space::
  562. *Tab::
  563. modifier := ""
  564. If GetKeyState("Shift","P")
  565. modifier .= "+"
  566. If GetKeyState("Ctrl","P")
  567. modifier .= "^"
  568. If GetKeyState("Alt","P")
  569. modifier .= "!"
  570. Gui, Submit, NoHide ;If BackSpace is the first key press, Gui has never been submitted.
  571. If (A_ThisHotkey == "*BackSpace" && %ctrl% && !modifier) ;If the control has text but no modifiers held,
  572. GuiControl,,%ctrl% ; allow BackSpace to clear that text.
  573. Else ;Otherwise,
  574. GuiControl,,%ctrl%, % modifier SubStr(A_ThisHotkey,2) ; show the hotkey.
  575. validateHK(ctrl)
  576. return
  577. #If
  578.  
  579. HotkeyCtrlHasFocus() {
  580. GuiControlGet, ctrl, Focus ;ClassNN
  581. If InStr(ctrl,"hotkey") {
  582. GuiControlGet, ctrl, FocusV ;Associated variable
  583. Return, ctrl
  584. }
  585. }
  586.  
  587.  
  588.  
  589. buttonFoodSetup:
  590. #If WinActive("Orion") or WinActive("Old School RuneScape") or WinActive("OSBot") or WinActive("Runescape") or WinActive("Tribot") or WinActive("SwiftKit")
  591. #ctrls = 5 ;How many Hotkey controls to add?
  592. Loop,% #ctrls {
  593. Gui, 4:Add, button, xm, Food Key%A_Index%
  594. IniRead, savedFK%A_Index%, settings.ini, Hotkeys2, %A_Index%, %A_Space%
  595. If savedFK%A_Index% ;Check for saved hotkeys in INI file.
  596. Hotkey,% savedFK%A_Index%, Labels%A_Index% ;Activate saved hotkeys if found.
  597. StringReplace, noMods, savedFK%A_Index%, ~ ;Remove tilde (~) and Win (#) modifiers...
  598. StringReplace, noMods, noMods, #,,UseErrorLevel ;They are incompatible with hotkey controls (cannot be shown).
  599. Gui, 4:Add, Hotkey, x+5 vFK%A_Index% gGuiLabels2, %noMods% ;Add hotkey controls and show saved hotkeys.
  600. }
  601. Gui, 4:Add, Button, , Save and exit ;Check the box if Win modifier is used.
  602. Gui, 4:Show,,Dynamic Hotkeys
  603. return
  604.  
  605. 4ButtonSaveandExit:
  606. Gui, 4:Submit
  607. savedFK%num% := FK%num%
  608. Gui, 4:Destroy
  609. return
  610.  
  611.  
  612.  
  613.  
  614. 4ButtonFoodKey1:
  615. gui, 5:default
  616. Gui, 5:Font, S16 CDefault, Verdana
  617. Gui, 5:Add, Text, x146 y27 w180 h40 , Key setup#1
  618. Gui, 5:Font, S6 CDefault, Verdana
  619. Gui, 5:Font, S7 CDefault, Verdana
  620. Gui, 5:Add, CheckBox, x376 y77 w80 h20 vInv1 checked%Inv1% , Inv1
  621. Gui, 5:Add, CheckBox, x266 y77 w80 h20 vInv2 checked%Inv2%, Inv2
  622. Gui, 5:Add, CheckBox, x136 y77 w80 h20 vInv3 checked%Inv3%, Inv3
  623. Gui, 5:Add, CheckBox, x26 y77 w80 h20 vInv4 checked%Inv4%, Inv4
  624. Gui, 5:Add, CheckBox, x376 y127 w80 h20 vInv5 checked%Inv5%, Inv5
  625. Gui, 5:Add, CheckBox, x266 y127 w80 h20 vInv6 checked%Inv6%, Inv6
  626. Gui, 5:Add, CheckBox, x136 y127 w80 h20 vInv7 checked%Inv7%, Inv7
  627. Gui, 5:Add, CheckBox, x26 y127 w80 h20 vInv8 checked%Inv8%, Inv8
  628. Gui, 5:Add, CheckBox, x376 y177 w80 h20 vInv9 checked%Inv9%, Inv9
  629. Gui, 5:Add, CheckBox, x256 y177 w80 h20 vInv10 checked%Inv10%, Inv10
  630. Gui, 5:Add, CheckBox, x136 y177 w80 h20 vInv11 checked%Inv11%, Inv11
  631. Gui, 5:Add, CheckBox, x26 y177 w80 h20 vInv12 checked%Inv12%, Inv12
  632. Gui, 5:Add, CheckBox, x376 y227 w80 h20 vInv13 checked%Inv13%, Inv13
  633. Gui, 5:Add, CheckBox, x256 y227 w80 h20 vInv14 checked%Inv14%, Inv14
  634. Gui, 5:Add, CheckBox, x136 y227 w80 h20 vInv15 checked%Inv15%, Inv15
  635. Gui, 5:Add, CheckBox, x26 y227 w80 h20 vInv16 checked%Inv16%, Inv16
  636. Gui, 5:Add, CheckBox, x376 y277 w80 h20 vInv17 checked%Inv17%, Inv17
  637. Gui, 5:Add, CheckBox, x256 y277 w80 h20 vInv18 checked%Inv18%, Inv18
  638. Gui, 5:Add, CheckBox, x136 y277 w80 h20 vInv19 checked%Inv19%, Inv19
  639. Gui, 5:Add, CheckBox, x26 y277 w80 h20 vInv20 checked%Inv20%, Inv20
  640. Gui, 5:Add, CheckBox, x376 y327 w80 h20 vInv21 checked%Inv21%, Inv21
  641. Gui, 5:Add, CheckBox, x256 y327 w80 h20 vInv22 checked%Inv22%, Inv22
  642. Gui, 5:Add, CheckBox, x136 y327 w80 h20 vInv23 checked%Inv23%, Inv23
  643. Gui, 5:Add, CheckBox, x26 y327 w80 h20 vInv24 checked%Inv24%, Inv24
  644. Gui, 5:Add, CheckBox, x376 y367 w80 h20 vInv25 checked%Inv25%, Inv25
  645. Gui, 5:Add, CheckBox, x256 y367 w80 h20 vInv26 checked%Inv26%, Inv26
  646. Gui, 5:Add, CheckBox, x136 y367 w80 h20 vInv27 checked%Inv27%, Inv27
  647. Gui, 5:Add, CheckBox, x26 y367 w80 h20 vInv28 checked%Inv28%, Inv28
  648. Gui, 5:Add, Button,w100 h30 xm x+70 gSave3, Save
  649. Gui, 5:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  650. Return
  651.  
  652.  
  653.  
  654. Save3:
  655. Gui, 5:Submit, NoHide
  656. loop, 28
  657. {
  658. IniWrite, % Inv%a_index%, settings.ini, Foodsettings, Inv%a_index%
  659. }
  660. Gui, 5:Destroy
  661. return
  662.  
  663.  
  664.  
  665. 4ButtonFoodKey2:
  666. gui, 6:default
  667. gui, 6:Font, S16 CDefault, Verdana
  668. gui, 6:Add, Text, x146 y27 w180 h40 , Key setup #2
  669. gui, 6:Font, S6 CDefault, Verdana
  670. gui, 6:Font, S7 CDefault, Verdana
  671. gui, 6:Add, CheckBox, x376 y77 w80 h20 vInv2k1 checked%Inv2k1% , Inv1
  672. gui, 6:Add, CheckBox, x266 y77 w80 h20 vInv2k2 checked%Inv2k2%, Inv2
  673. gui, 6:Add, CheckBox, x136 y77 w80 h20 vInv2k3 checked%Inv2k3%, Inv3
  674. gui, 6:Add, CheckBox, x26 y77 w80 h20 vInv2k4 checked%Inv2k4%, Inv4
  675. gui, 6:Add, CheckBox, x376 y127 w80 h20 vInv2k5 checked%Inv2k5%, Inv5
  676. gui, 6:Add, CheckBox, x266 y127 w80 h20 vInv2k6 checked%Inv2k6%, Inv6
  677. gui, 6:Add, CheckBox, x136 y127 w80 h20 vInv2k7 checked%Inv2k7%, Inv7
  678. gui, 6:Add, CheckBox, x26 y127 w80 h20 vInv2k8 checked%Inv2k8%, Inv8
  679. gui, 6:Add, CheckBox, x376 y177 w80 h20 vInv2k9 checked%Inv2k9%, Inv9
  680. gui, 6:Add, CheckBox, x256 y177 w80 h20 vInv2k10 checked%Inv2k10%, Inv10
  681. gui, 6:Add, CheckBox, x136 y177 w80 h20 vInv2k11 checked%Inv2k11%, Inv11
  682. gui, 6:Add, CheckBox, x26 y177 w80 h20 vInv2k12 checked%Inv2k12%, Inv12
  683. gui, 6:Add, CheckBox, x376 y227 w80 h20 vInv2k13 checked%Inv2k13%, Inv13
  684. gui, 6:Add, CheckBox, x256 y227 w80 h20 vInv2k14 checked%Inv2k14%, Inv14
  685. gui, 6:Add, CheckBox, x136 y227 w80 h20 vInv2k15 checked%Inv2k15%, Inv15
  686. gui, 6:Add, CheckBox, x26 y227 w80 h20 vInv2k16 checked%Inv2k16%, Inv16
  687. gui, 6:Add, CheckBox, x376 y277 w80 h20 vInv2k17 checked%Inv2k17%, Inv17
  688. gui, 6:Add, CheckBox, x256 y277 w80 h20 vInv2k18 checked%Inv2k18%, Inv18
  689. gui, 6:Add, CheckBox, x136 y277 w80 h20 vInv2k19 checked%Inv2k19%, Inv19
  690. gui, 6:Add, CheckBox, x26 y277 w80 h20 vInv2k20 checked%Inv2k20%, Inv20
  691. gui, 6:Add, CheckBox, x376 y327 w80 h20 vInv2k21 checked%Inv2k21%, Inv21
  692. gui, 6:Add, CheckBox, x256 y327 w80 h20 vInv2k22 checked%Inv2k22%, Inv22
  693. gui, 6:Add, CheckBox, x136 y327 w80 h20 vInv2k23 checked%Inv2k23%, Inv23
  694. gui, 6:Add, CheckBox, x26 y327 w80 h20 vInv2k24 checked%Inv2k24%, Inv24
  695. gui, 6:Add, CheckBox, x376 y367 w80 h20 vInv2k25 checked%Inv2k25%, Inv25
  696. gui, 6:Add, CheckBox, x256 y367 w80 h20 vInv2k26 checked%Inv2k26%, Inv26
  697. gui, 6:Add, CheckBox, x136 y367 w80 h20 vInv2k27 checked%Inv2k27%, Inv27
  698. gui, 6:Add, CheckBox, x26 y367 w80 h20 vInv2k28 checked%Inv2k28%, Inv28
  699. gui, 6:Add, Button,w100 h30 xm x+70 gSave4, Save
  700. gui, 6:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  701. Return
  702.  
  703. Save4:
  704. Gui, 6:Submit, NoHide
  705. loop, 28
  706. {
  707. IniWrite, % Inv2k%a_index%, settings.ini, Foodsettings, Inv2k%a_index%
  708. }
  709. Gui, 6:Destroy
  710. return
  711.  
  712.  
  713.  
  714.  
  715. 4ButtonFoodKey3:
  716. Gui,7:default
  717. Gui,7:Font, S16 CDefault, Verdana
  718. Gui,7:Add, Text, x146 y27 w180 h40 , Key setup#3
  719. Gui,7:Font, S6 CDefault, Verdana
  720. Gui,7:Font, S7 CDefault, Verdana
  721. Gui,7:Add, CheckBox, x376 y77 w80 h20 vInv3k1 checked%Inv3k1% , Inv1
  722. Gui,7:Add, CheckBox, x266 y77 w80 h20 vInv3k2 checked%Inv3k2%, Inv2
  723. Gui,7:Add, CheckBox, x136 y77 w80 h20 vInv3k3 checked%Inv3k3%, Inv3
  724. Gui,7:Add, CheckBox, x26 y77 w80 h20 vInv3k4 checked%Inv3k4%, Inv4
  725. Gui,7:Add, CheckBox, x376 y127 w80 h20 vInv3k5 checked%Inv3k5%, Inv5
  726. Gui,7:Add, CheckBox, x266 y127 w80 h20 vInv3k6 checked%Inv3k6%, Inv6
  727. Gui,7:Add, CheckBox, x136 y127 w80 h20 vInv3k7 checked%Inv3k7%, Inv7
  728. Gui,7:Add, CheckBox, x26 y127 w80 h20 vInv3k8 checked%Inv3k8%, Inv8
  729. Gui,7:Add, CheckBox, x376 y177 w80 h20 vInv3k9 checked%Inv3k9%, Inv9
  730. Gui,7:Add, CheckBox, x256 y177 w80 h20 vInv3k10 checked%Inv3k10%, Inv10
  731. Gui,7:Add, CheckBox, x136 y177 w80 h20 vInv3k11 checked%Inv3k11%, Inv11
  732. Gui,7:Add, CheckBox, x26 y177 w80 h20 vInv3k12 checked%Inv3k12%, Inv12
  733. Gui,7:Add, CheckBox, x376 y227 w80 h20 vInv3k13 checked%Inv3k13%, Inv13
  734. Gui,7:Add, CheckBox, x256 y227 w80 h20 vInv3k14 checked%Inv3k14%, Inv14
  735. Gui,7:Add, CheckBox, x136 y227 w80 h20 vInv3k15 checked%Inv3k15%, Inv15
  736. Gui,7:Add, CheckBox, x26 y227 w80 h20 vInv3k16 checked%Inv3k16%, Inv16
  737. Gui,7:Add, CheckBox, x376 y277 w80 h20 vInv3k17 checked%Inv3k17%, Inv17
  738. Gui,7:Add, CheckBox, x256 y277 w80 h20 vInv3k18 checked%Inv3k18%, Inv18
  739. Gui,7:Add, CheckBox, x136 y277 w80 h20 vInv3k19 checked%Inv3k19%, Inv19
  740. Gui,7:Add, CheckBox, x26 y277 w80 h20 vInv3k20 checked%Inv3k20%, Inv20
  741. Gui,7:Add, CheckBox, x376 y327 w80 h20 vInv3k21 checked%Inv3k21%, Inv21
  742. Gui,7:Add, CheckBox, x256 y327 w80 h20 vInv3k22 checked%Inv3k22%, Inv22
  743. Gui,7:Add, CheckBox, x136 y327 w80 h20 vInv3k23 checked%Inv3k23%, Inv23
  744. Gui,7:Add, CheckBox, x26 y327 w80 h20 vInv3k24 checked%Inv3k24%, Inv24
  745. Gui,7:Add, CheckBox, x376 y367 w80 h20 vInv3k25 checked%Inv3k25%, Inv325
  746. Gui,7:Add, CheckBox, x256 y367 w80 h20 vInv3k26 checked%Inv3k26%, Inv26
  747. Gui,7:Add, CheckBox, x136 y367 w80 h20 vInv3k27 checked%Inv3k27%, Inv27
  748. Gui,7:Add, CheckBox, x26 y367 w80 h20 vInv3k28 checked%Inv3k28%, Inv28
  749. Gui,7:Add, Button,w100 h30 xm x+70 gSave5, Save
  750. Gui,7:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  751. Return
  752.  
  753.  
  754.  
  755. Save5:
  756. Gui, 7:Submit, NoHide
  757. loop, 28
  758. {
  759. IniWrite, % Inv3k%a_index%, settings.ini, Foodsettings, Inv3k%a_index%
  760. }
  761. Gui, 7:Destroy
  762. return
  763.  
  764. 4ButtonFoodKey4:
  765. Gui, 8:default
  766. Gui, 8:Font, S16 CDefault, Verdana
  767. Gui, 8:Add, Text, x146 y27 w180 h40 , Key setup#4
  768. Gui, 8:Font, S6 CDefault, Verdana
  769. Gui, 8:Font, S7 CDefault, Verdana
  770. Gui, 8:Add, CheckBox, x376 y77 w80 h20 vInv4K1 checked%Inv4K1% , Inv1
  771. Gui, 8:Add, CheckBox, x266 y77 w80 h20 vInv4K2 checked%Inv4K2%, Inv2
  772. Gui, 8:Add, CheckBox, x136 y77 w80 h20 vInv4K3 checked%Inv4K3%, Inv3
  773. Gui, 8:Add, CheckBox, x26 y77 w80 h20 vInv4K4 checked%Inv4K4%, Inv4
  774. Gui, 8:Add, CheckBox, x376 y127 w80 h20 vInv4K5 checked%Inv4K5%, Inv5
  775. Gui, 8:Add, CheckBox, x266 y127 w80 h20 vInv4K6 checked%Inv4K6%, Inv6
  776. Gui, 8:Add, CheckBox, x136 y127 w80 h20 vInv4K7 checked%Inv4K7%, Inv7
  777. Gui, 8:Add, CheckBox, x26 y127 w80 h20 vInv4K8 checked%Inv4K8%, Inv8
  778. Gui, 8:Add, CheckBox, x376 y177 w80 h20 vInv4K9 checked%Inv4K9%, Inv9
  779. Gui, 8:Add, CheckBox, x256 y177 w80 h20 vInv4K10 checked%Inv4K10%, Inv10
  780. Gui, 8:Add, CheckBox, x136 y177 w80 h20 vInv4K11 checked%Inv4K11%, Inv11
  781. Gui, 8:Add, CheckBox, x26 y177 w80 h20 vInv4K12 checked%Inv4K12%, Inv12
  782. Gui, 8:Add, CheckBox, x376 y227 w80 h20 vInv4K13 checked%Inv4K13%, Inv13
  783. Gui, 8:Add, CheckBox, x256 y227 w80 h20 vInv4K14 checked%Inv4K14%, Inv14
  784. Gui, 8:Add, CheckBox, x136 y227 w80 h20 vInv4K15 checked%Inv4K15%, Inv15
  785. Gui, 8:Add, CheckBox, x26 y227 w80 h20 vInv4K16 checked%Inv4K16%, Inv16
  786. Gui, 8:Add, CheckBox, x376 y277 w80 h20 vInv4K17 checked%Inv4K17%, Inv17
  787. Gui, 8:Add, CheckBox, x256 y277 w80 h20 vInv4K18 checked%Inv4K18%, Inv18
  788. Gui, 8:Add, CheckBox, x136 y277 w80 h20 vInv4K19 checked%Inv4K19%, Inv19
  789. Gui, 8:Add, CheckBox, x26 y277 w80 h20 vInv4K20 checked%Inv4K20%, InK20
  790. Gui, 8:Add, CheckBox, x376 y327 w80 h20 vInv4K21 checked%Inv4K21%, Inv21
  791. Gui, 8:Add, CheckBox, x256 y327 w80 h20 vInv4K22 checked%Inv4K22%, Inv22
  792. Gui, 8:Add, CheckBox, x136 y327 w80 h20 vInv4K23 checked%Inv4K23%, Inv23
  793. Gui, 8:Add, CheckBox, x26 y327 w80 h20 vInv4K24 checked%Inv4K24%, Inv24
  794. Gui, 8:Add, CheckBox, x376 y367 w80 h20 vInv4K25 checked%Inv4K25%, Inv25
  795. Gui, 8:Add, CheckBox, x256 y367 w80 h20 vInv4K26 checked%Inv4K26%, Inv26
  796. Gui, 8:Add, CheckBox, x136 y367 w80 h20 vInv4K27 checked%Inv4K27%, Inv27
  797. Gui, 8:Add, CheckBox, x26 y367 w80 h20 vInv4K28 checked%Inv4K28%, Inv28
  798. Gui, 8:Add, Button,w100 h30 xm x+70 gSave6, Save
  799. Gui, 8:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  800. Return
  801.  
  802. Save6:
  803. Gui, 8:Submit, NoHide
  804. loop, 28
  805. {
  806. IniWrite, % Inv4k%a_index%, settings.ini, Foodsettings, Inv4k%a_index%
  807. }
  808. Gui, 8:Destroy
  809. return
  810.  
  811.  
  812. 4ButtonFoodKey5:
  813. Gui, 9:default
  814. Gui, 9:Font, S16 CDefault, Verdana
  815. Gui, 9:Add, Text, x146 y27 w180 h40 , Keysetup #5
  816. Gui, 9:Font, S6 CDefault, Verdana
  817. Gui, 9:Font, S7 CDefault, Verdana
  818. Gui, 9:Add, CheckBox, x376 y77 w80 h20 vInv5k1 checked%Inv5k1% , Inv1
  819. Gui, 9:Add, CheckBox, x266 y77 w80 h20 vInv5k2 checked%Inv5k2%, Inv2
  820. Gui, 9:Add, CheckBox, x136 y77 w80 h20 vInv5k3 checked%Inv5k3%, Inv3
  821. Gui, 9:Add, CheckBox, x26 y77 w80 h20 vInv5k4 checked%Inv5k4%, Inv4
  822. Gui, 9:Add, CheckBox, x376 y127 w80 h20 vInv5k5 checked%Inv5k5%, Inv5
  823. Gui, 9:Add, CheckBox, x266 y127 w80 h20 vInv5k6 checked%Inv5k6%, Inv6
  824. Gui, 9:Add, CheckBox, x136 y127 w80 h20 vInv5k7 checked%Inv5k7%, Inv7
  825. Gui, 9:Add, CheckBox, x26 y127 w80 h20 vInv5k8 checked%Inv5k8%, Inv8
  826. Gui, 9:Add, CheckBox, x376 y177 w80 h20 vInv5k9 checked%Inv5k9%, Inv9
  827. Gui, 9:Add, CheckBox, x256 y177 w80 h20 vInv5k10 checked%Inv5k10%, Inv10
  828. Gui, 9:Add, CheckBox, x136 y177 w80 h20 vInv5k11 checked%Inv5k11%, Inv11
  829. Gui, 9:Add, CheckBox, x26 y177 w80 h20 vInv5k12 checked%Inv5k12%, Inv12
  830. Gui, 9:Add, CheckBox, x376 y227 w80 h20 vInv5k13 checked%Inv5k13%, Inv13
  831. Gui, 9:Add, CheckBox, x256 y227 w80 h20 vInv5k14 checked%Inv5k14%, Inv14
  832. Gui, 9:Add, CheckBox, x136 y227 w80 h20 vInv5k15 checked%Inv5k15%, Inv15
  833. Gui, 9:Add, CheckBox, x26 y227 w80 h20 vInv5k16 checked%Inv5k16%, Inv16
  834. Gui, 9:Add, CheckBox, x376 y277 w80 h20 vInv5k17 checked%Inv5k17%, Inv17
  835. Gui, 9:Add, CheckBox, x256 y277 w80 h20 vInv5k18 checked%Inv5k18%, Inv18
  836. Gui, 9:Add, CheckBox, x136 y277 w80 h20 vInv5k19 checked%Inv5k19%, Inv19
  837. Gui, 9:Add, CheckBox, x26 y277 w80 h20 vInv5k20 checked%Inv5k20%, Inv20
  838. Gui, 9:Add, CheckBox, x376 y327 w80 h20 vInv5k21 checked%Inv5k21%, Inv21
  839. Gui, 9:Add, CheckBox, x256 y327 w80 h20 vInv5k22 checked%Inv5k22%, Inv22
  840. Gui, 9:Add, CheckBox, x136 y327 w80 h20 vInv5k23 checked%Inv5k23%, Inv23
  841. Gui, 9:Add, CheckBox, x26 y327 w80 h20 vInv5k24 checked%Inv5k24%, Inv24
  842. Gui, 9:Add, CheckBox, x376 y367 w80 h20 vInv5k25 checked%Inv5k25%, Inv25
  843. Gui, 9:Add, CheckBox, x256 y367 w80 h20 vInv5k26 checked%Inv5k26%, Inv26
  844. Gui, 9:Add, CheckBox, x136 y367 w80 h20 vInv5k27 checked%Inv5k27%, Inv27
  845. Gui, 9:Add, CheckBox, x26 y367 w80 h20 vInv5k28 checked%Inv5k28%, Inv28
  846. Gui, 9:Add, Button,w100 h30 xm x+70 gSave7, Save
  847. Gui, 9:Show, h500 w500, About ~ OSRS Prayer: By Samerdl
  848. Return
  849.  
  850. Save7:
  851. Gui, 9:Submit, NoHide
  852. loop, 28
  853. {
  854. IniWrite, % Inv5k%a_index%, settings.ini, Foodsettings, Inv5k%a_index%
  855. }
  856. Gui, 9: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.  
  942. /*
  943. Inven= inven-1
  944. Slot=mod(Inven,4)
  945. Row=Inven/4
  946.  
  947. IIX=720
  948. IIY=250 ;Am too lazy, went the easy way.
  949.  
  950. EIX=41
  951. EIY=35
  952.  
  953. IndexVar := Mod(A_Index, 50)
  954. */
  955.  
  956. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  957.  
  958. labels1:
  959. Blockinput on
  960. IfWinActive Old School RuneScape
  961. {
  962. loop,28
  963. {
  964. if inv%A_index%
  965. {
  966. if A_Index < 5
  967. {
  968. mouseclick, left, 720 - 41*(A_index-1),250,,2
  969. }
  970. if a_index < 5
  971. continue
  972.  
  973.  
  974. if a_index < 9
  975. {
  976. mouseclick, left, 720 - 41*(A_index-5),250+35,,2
  977. }
  978. if a_index < 9
  979. continue
  980.  
  981.  
  982. if a_index < 13
  983. {
  984. mouseclick, left, 720 - 41*(A_index-9),250+ (35*2),,2
  985. }
  986. if a_index < 13
  987. continue
  988.  
  989.  
  990. if a_index < 17
  991. {
  992. mouseclick, left, 720 - 41*(A_index-13),250+ (35*3),,2
  993. }
  994. if a_index < 17
  995. continue
  996.  
  997. if a_index < 21
  998. {
  999. mouseclick, left, 720 - 41*(A_index-17),250+ (35*4),,2
  1000. }
  1001. if a_index < 21
  1002. continue
  1003.  
  1004. if a_index < 25
  1005. {
  1006. mouseclick, left, 720 - 41*(A_index-21),250+ (35*5),,2
  1007. }
  1008. if a_index < 25
  1009. continue
  1010.  
  1011. if a_index < 29
  1012. {
  1013. mouseclick, left, 720 - 41*(A_index-25),250+ (35*6),,2
  1014. }
  1015. }
  1016. }
  1017. }
  1018.  
  1019.  
  1020. IfWinNotActive Old School RuneScape
  1021. {
  1022.  
  1023. loop,28
  1024. {
  1025.  
  1026. if inv%A_index%
  1027. {
  1028. if a_index < 5
  1029. {
  1030. mouseclick, left, 705 - 41*(A_index-1),280,,2
  1031. }
  1032. if a_index < 5
  1033. continue
  1034.  
  1035. if a_index < 9
  1036. {
  1037. mouseclick, left, 705 - 41*(A_index-5),280+35,,2
  1038. }
  1039. if a_index < 9
  1040. continue
  1041.  
  1042.  
  1043.  
  1044. if a_index < 13
  1045. {
  1046. mouseclick, left, 705 - 41*(A_index-9),280+ (35*2),,2
  1047. }
  1048. if a_index < 13
  1049. continue
  1050.  
  1051.  
  1052. if a_index < 17
  1053. {
  1054. mouseclick, left, 705 - 41*(A_index-13),280+ (35*3),,2
  1055. }
  1056. if a_index < 17
  1057. continue
  1058.  
  1059. if a_index < 21
  1060. {
  1061. mouseclick, left, 705 - 41*(A_index-17),280+ (35*4),,2
  1062. }
  1063.  
  1064. if a_index < 21
  1065. continue
  1066.  
  1067. if a_index < 25
  1068. {
  1069. mouseclick, left, 705 - 41*(A_index-21),280+ (35*5),,2
  1070. }
  1071.  
  1072. if a_index < 25
  1073. continue
  1074.  
  1075.  
  1076. if a_index < 29
  1077. {
  1078. mouseclick, left, 705 - 41*(A_index-25),280+ (35*6),,2
  1079. }
  1080.  
  1081. }
  1082. }
  1083. }
  1084. gosub MouseArea
  1085. Blockinput off
  1086. return
  1087.  
  1088. labels2:
  1089. Blockinput on
  1090. IfWinActive Old School RuneScape
  1091. {
  1092. loop,28
  1093. {
  1094. if inv2k%A_index%
  1095. {
  1096. if A_Index < 5
  1097. {
  1098. mouseclick, left, 720 - 41*(A_index-1),250,,2
  1099. }
  1100. if a_index < 5
  1101. continue
  1102.  
  1103. if a_index < 9
  1104. {
  1105. mouseclick, left, 720 - 41*(A_index-5),250+35,,2
  1106. }
  1107. if a_index < 9
  1108. continue
  1109.  
  1110.  
  1111. if a_index < 13
  1112. {
  1113. mouseclick, left, 720 - 41*(A_index-9),250+ (35*2),,2
  1114. }
  1115. if a_index < 13
  1116. continue
  1117.  
  1118.  
  1119. if a_index < 17
  1120. {
  1121. mouseclick, left, 720 - 41*(A_index-13),250+ (35*3),,2
  1122. }
  1123. if a_index < 17
  1124. continue
  1125.  
  1126. if a_index < 21
  1127. {
  1128. mouseclick, left, 720 - 41*(A_index-17),250+ (35*4),,2
  1129. }
  1130. if a_index < 21
  1131. continue
  1132.  
  1133. if a_index < 25
  1134. {
  1135. mouseclick, left, 720 - 41*(A_index-21),250+ (35*5),,2
  1136. }
  1137. if a_index < 25
  1138. continue
  1139.  
  1140. if a_index < 29
  1141. {
  1142. mouseclick, left, 720 - 41*(A_index-25),250+ (35*6),,2
  1143. }
  1144. }
  1145. }
  1146. }
  1147.  
  1148.  
  1149. IfWinNotActive Old School RuneScape
  1150. {
  1151.  
  1152. loop,28
  1153. {
  1154. if inv2k%A_index%
  1155. {
  1156. if a_index < 5
  1157. {
  1158. mouseclick, left, 705 - 41*(A_index-1),280,,2
  1159. }
  1160. if a_index < 5
  1161. continue
  1162.  
  1163. if a_index < 9
  1164. {
  1165. mouseclick, left, 705 - 41*(A_index-5),280+35,,2
  1166. }
  1167. if a_index < 9
  1168. continue
  1169.  
  1170.  
  1171.  
  1172. if a_index < 13
  1173. {
  1174. mouseclick, left, 705 - 41*(A_index-9),280+ (35*2),,2
  1175. }
  1176. if a_index < 13
  1177. continue
  1178.  
  1179.  
  1180. if a_index < 17
  1181. {
  1182. mouseclick, left, 705 - 41*(A_index-13),280+ (35*3),,2
  1183. }
  1184. if a_index < 17
  1185. continue
  1186.  
  1187. if a_index < 21
  1188. {
  1189. mouseclick, left, 705 - 41*(A_index-17),280+ (35*4),,2
  1190. }
  1191. if a_index < 21
  1192. continue
  1193.  
  1194. if a_index < 25
  1195. {
  1196. mouseclick, left, 705 - 41*(A_index-21),280+ (35*5),,2
  1197. }
  1198. if a_index < 25
  1199. continue
  1200.  
  1201.  
  1202. if a_index < 29
  1203. {
  1204. mouseclick, left, 705 - 41*(A_index-25),280+ (35*6),,2
  1205. }
  1206. }
  1207. }
  1208. }
  1209. gosub MouseArea
  1210. Blockinput off
  1211. return
  1212.  
  1213.  
  1214. labels3:
  1215. Blockinput on
  1216. IfWinActive Old School RuneScape
  1217. {
  1218. loop,28
  1219. {
  1220. if inv3k%A_index%
  1221. {
  1222. if A_Index < 5
  1223. {
  1224. mouseclick, left, 720 - 41*(A_index-1),250,,2
  1225. }
  1226. if a_index < 5
  1227. continue
  1228.  
  1229.  
  1230. if a_index < 9
  1231. {
  1232. mouseclick, left, 720 - 41*(A_index-5),250+35,,2
  1233. }
  1234. if a_index < 9
  1235. continue
  1236.  
  1237.  
  1238. if a_index < 13
  1239. {
  1240. mouseclick, left, 720 - 41*(A_index-9),250+ (35*2),,2
  1241. }
  1242. if a_index < 13
  1243. continue
  1244.  
  1245.  
  1246. if a_index < 17
  1247. {
  1248. mouseclick, left, 720 - 41*(A_index-13),250+ (35*3),,2
  1249. }
  1250. if a_index < 17
  1251. continue
  1252.  
  1253. if a_index < 21
  1254. {
  1255. mouseclick, left, 720 - 41*(A_index-17),250+ (35*4),,2
  1256. }
  1257. if a_index < 21
  1258. continue
  1259.  
  1260. if a_index < 25
  1261. {
  1262. mouseclick, left, 720 - 41*(A_index-21),250+ (35*5),,2
  1263. }
  1264. if a_index < 25
  1265. continue
  1266.  
  1267. if a_index < 29
  1268. {
  1269. mouseclick, left, 720 - 41*(A_index-25),250+ (35*6),,2
  1270. }
  1271. }
  1272. }
  1273. }
  1274.  
  1275.  
  1276. IfWinNotActive Old School RuneScape
  1277. {
  1278.  
  1279. loop,28
  1280. {
  1281.  
  1282. if inv3k%A_index%
  1283. {
  1284. if a_index < 5
  1285. {
  1286. mouseclick, left, 705 - 41*(A_index-1),280,,2
  1287. }
  1288. if a_index < 5
  1289. continue
  1290.  
  1291. if a_index < 9
  1292. {
  1293. mouseclick, left, 705 - 41*(A_index-5),280+35,,2
  1294. }
  1295. if a_index < 9
  1296. continue
  1297.  
  1298.  
  1299.  
  1300. if a_index < 13
  1301. {
  1302. mouseclick, left, 705 - 41*(A_index-9),280+ (35*2),,2
  1303. }
  1304. if a_index < 13
  1305. continue
  1306.  
  1307.  
  1308. if a_index < 17
  1309. {
  1310. mouseclick, left, 705 - 41*(A_index-13),280+ (35*3),,2
  1311. }
  1312. if a_index < 17
  1313. continue
  1314.  
  1315. if a_index < 21
  1316. {
  1317. mouseclick, left, 705 - 41*(A_index-17),280+ (35*4),,2
  1318. }
  1319. if a_index < 21
  1320. continue
  1321.  
  1322. if a_index < 25
  1323. {
  1324. mouseclick, left, 705 - 41*(A_index-21),280+ (35*5),,2
  1325. }
  1326. if a_index < 25
  1327. continue
  1328.  
  1329.  
  1330. if a_index < 29
  1331. {
  1332. mouseclick, left, 705 - 41*(A_index-25),280+ (35*6),,2
  1333. }
  1334.  
  1335. }
  1336. }
  1337. }
  1338. gosub MouseArea
  1339. Blockinput off
  1340. return
  1341.  
  1342. labels4:
  1343. Blockinput on
  1344. IfWinActive Old School RuneScape
  1345. {
  1346. loop,28
  1347. {
  1348. if inv4k%A_index%
  1349. {
  1350. if A_Index < 5
  1351. {
  1352. mouseclick, left, 720 - 41*(A_index-1),250,,2
  1353. }
  1354. if a_index < 5
  1355. continue
  1356.  
  1357.  
  1358. if a_index < 9
  1359. {
  1360. mouseclick, left, 720 - 41*(A_index-5),250+35,,2
  1361. }
  1362. if a_index < 9
  1363. continue
  1364.  
  1365.  
  1366. if a_index < 13
  1367. {
  1368. mouseclick, left, 720 - 41*(A_index-9),250+ (35*2),,2
  1369. }
  1370. if a_index < 13
  1371. continue
  1372.  
  1373.  
  1374. if a_index < 17
  1375. {
  1376. mouseclick, left, 720 - 41*(A_index-13),250+ (35*3),,2
  1377. }
  1378. if a_index < 17
  1379. continue
  1380.  
  1381. if a_index < 21
  1382. {
  1383. mouseclick, left, 720 - 41*(A_index-17),250+ (35*4),,2
  1384. }
  1385. if a_index < 21
  1386. continue
  1387.  
  1388. if a_index < 25
  1389. {
  1390. mouseclick, left, 720 - 41*(A_index-21),250+ (35*5),,2
  1391. }
  1392. if a_index < 25
  1393. continue
  1394.  
  1395. if a_index < 29
  1396. {
  1397. mouseclick, left, 720 - 41*(A_index-25),250+ (35*6),,2
  1398. }
  1399. }
  1400. }
  1401. }
  1402.  
  1403.  
  1404. IfWinNotActive Old School RuneScape
  1405. {
  1406.  
  1407. loop,28
  1408. {
  1409.  
  1410. if inv4k%A_index%
  1411. {
  1412. if a_index < 5
  1413. {
  1414. mouseclick, left, 705 - 41*(A_index-1),280,,2
  1415. }
  1416. if a_index < 5
  1417. continue
  1418.  
  1419. if a_index < 9
  1420. {
  1421. mouseclick, left, 705 - 41*(A_index-5),280+35,,2
  1422. }
  1423. if a_index < 9
  1424. continue
  1425.  
  1426.  
  1427.  
  1428. if a_index < 13
  1429. {
  1430. mouseclick, left, 705 - 41*(A_index-9),280+ (35*2),,2
  1431. }
  1432. if a_index < 13
  1433. continue
  1434.  
  1435.  
  1436. if a_index < 17
  1437. {
  1438. mouseclick, left, 705 - 41*(A_index-13),280+ (35*3),,2
  1439. }
  1440. if a_index < 17
  1441. continue
  1442.  
  1443. if a_index < 21
  1444. {
  1445. mouseclick, left, 705 - 41*(A_index-17),280+ (35*4),,2
  1446. }
  1447. if a_index < 21
  1448. continue
  1449.  
  1450. if a_index < 25
  1451. {
  1452. mouseclick, left, 705 - 41*(A_index-21),280+ (35*5),,2
  1453. }
  1454. if a_index < 25
  1455. continue
  1456.  
  1457.  
  1458. if a_index < 29
  1459. {
  1460. mouseclick, left, 705 - 41*(A_index-25),280+ (35*6),,2
  1461. }
  1462.  
  1463. }
  1464. }
  1465. }
  1466. gosub MouseArea
  1467. Blockinput off
  1468. return
  1469.  
  1470. labels5:
  1471. Blockinput on
  1472. IfWinActive Old School RuneScape
  1473. {
  1474. loop,28
  1475. {
  1476. if inv5k%A_index%
  1477. {
  1478. if A_Index < 5
  1479. {
  1480. mouseclick, left, 720 - 41*(A_index-1),250,,2
  1481. }
  1482. if a_index < 5
  1483. continue
  1484.  
  1485.  
  1486. if a_index < 9
  1487. {
  1488. mouseclick, left, 720 - 41*(A_index-5),250+35,,2
  1489. }
  1490. if a_index < 9
  1491. continue
  1492.  
  1493.  
  1494. if a_index < 13
  1495. {
  1496. mouseclick, left, 720 - 41*(A_index-9),250+ (35*2),,2
  1497. }
  1498. if a_index < 13
  1499. continue
  1500.  
  1501.  
  1502. if a_index < 17
  1503. {
  1504. mouseclick, left, 720 - 41*(A_index-13),250+ (35*3),,2
  1505. }
  1506. if a_index < 17
  1507. continue
  1508.  
  1509. if a_index < 21
  1510. {
  1511. mouseclick, left, 720 - 41*(A_index-17),250+ (35*4),,2
  1512. }
  1513. if a_index < 21
  1514. continue
  1515.  
  1516. if a_index < 25
  1517. {
  1518. mouseclick, left, 720 - 41*(A_index-21),250+ (35*5),,2
  1519. }
  1520. if a_index < 25
  1521. continue
  1522.  
  1523. if a_index < 29
  1524. {
  1525. mouseclick, left, 720 - 41*(A_index-25),250+ (35*6),,2
  1526. }
  1527. }
  1528. }
  1529. }
  1530.  
  1531.  
  1532. IfWinNotActive Old School RuneScape
  1533. {
  1534.  
  1535. loop,28
  1536. {
  1537.  
  1538. if inv5k%A_index%
  1539. {
  1540. if a_index < 5
  1541. {
  1542. mouseclick, left, 705 - 41*(A_index-1),280,,2
  1543. }
  1544. if a_index < 5
  1545. continue
  1546.  
  1547. if a_index < 9
  1548. {
  1549. mouseclick, left, 705 - 41*(A_index-5),280+35,,2
  1550. }
  1551. if a_index < 9
  1552. continue
  1553.  
  1554.  
  1555.  
  1556. if a_index < 13
  1557. {
  1558. mouseclick, left, 705 - 41*(A_index-9),280+ (35*2),,2
  1559. }
  1560. if a_index < 13
  1561. continue
  1562.  
  1563.  
  1564. if a_index < 17
  1565. {
  1566. mouseclick, left, 705 - 41*(A_index-13),280+ (35*3),,2
  1567. }
  1568. if a_index < 17
  1569. continue
  1570.  
  1571. if a_index < 21
  1572. {
  1573. mouseclick, left, 705 - 41*(A_index-17),280+ (35*4),,2
  1574. }
  1575. if a_index < 21
  1576. continue
  1577.  
  1578. if a_index < 25
  1579. {
  1580. mouseclick, left, 705 - 41*(A_index-21),280+ (35*5),,2
  1581. }
  1582. if a_index < 25
  1583. continue
  1584.  
  1585.  
  1586. if a_index < 29
  1587. {
  1588. mouseclick, left, 705 - 41*(A_index-25),280+ (35*6),,2
  1589. }
  1590. }
  1591. }
  1592. }
  1593. gosub MouseArea
  1594. Blockinput off
  1595. return
  1596.  
  1597. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit") || WinActive("Smart")
  1598.  
  1599.  
  1600. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  1601.  
  1602.  
  1603.  
  1604. Label1:
  1605.  
  1606. Blockinput on
  1607. MouseGetPos, XX, YY
  1608. gosub binding
  1609. gosub %F1downs%
  1610. if prot1 {
  1611. gosub checkboxes
  1612. } else {
  1613. send {esc}
  1614. }
  1615. if arm1 {
  1616. gosub armors
  1617. }
  1618.  
  1619. if Un1 {
  1620. gosub %Armun%
  1621. }
  1622. gosub MouseArea
  1623. Blockinput off
  1624. return
  1625.  
  1626.  
  1627. Label2:
  1628. Blockinput on
  1629. MouseGetPos, XX, YY
  1630. gosub binding
  1631. gosub %F2downs%
  1632. if prot2 {
  1633. gosub checkboxes
  1634. } else {
  1635. send {esc}
  1636. }
  1637. if arm2 {
  1638. gosub armors
  1639. }
  1640.  
  1641. if Un2 {
  1642. gosub %Armun%
  1643. }
  1644.  
  1645. gosub MouseArea
  1646. Blockinput off
  1647. return
  1648.  
  1649.  
  1650.  
  1651. Label3:
  1652. Blockinput on
  1653. MouseGetPos, XX, YY
  1654. gosub binding
  1655. gosub %F3downs%
  1656. if prot3 {
  1657. gosub checkboxes
  1658. } else {
  1659. send {esc}
  1660. }
  1661. if arm3 {
  1662. gosub armors
  1663. }
  1664.  
  1665.  
  1666. if Un3 {
  1667. gosub %Armun%
  1668. }
  1669.  
  1670. gosub MouseArea
  1671. Blockinput off
  1672. return
  1673.  
  1674.  
  1675.  
  1676. Label4:
  1677. Blockinput on
  1678. MouseGetPos, XX, YY
  1679. gosub binding
  1680. gosub %F4downs%
  1681. if prot4 {
  1682. gosub checkboxes
  1683. } else {
  1684. send {esc}
  1685. }
  1686. if arm4 {
  1687. gosub armors
  1688. }
  1689.  
  1690.  
  1691. if Un4 {
  1692. gosub %Armun%
  1693. }
  1694.  
  1695. gosub MouseArea
  1696. Blockinput off
  1697. return
  1698.  
  1699.  
  1700.  
  1701. Label5:
  1702. Blockinput on
  1703. MouseGetPos, XX, YY
  1704. gosub binding
  1705. gosub %F5downs%
  1706. if prot5 {
  1707. gosub checkboxes
  1708. } else {
  1709. send {esc}
  1710. }
  1711. if arm5 {
  1712. gosub armors
  1713. }
  1714.  
  1715.  
  1716. if Un5 {
  1717. gosub %Armun%
  1718. }
  1719.  
  1720. gosub MouseArea
  1721. Blockinput off
  1722. return
  1723.  
  1724.  
  1725. Label6:
  1726. Blockinput on
  1727. MouseGetPos, XX, YY
  1728. gosub binding
  1729. gosub %F6downs%
  1730. if prot6 {
  1731. gosub checkboxes
  1732. } else {
  1733. send {esc}
  1734. }
  1735. if arm6 {
  1736. gosub armors
  1737. }
  1738.  
  1739.  
  1740. if Un6 {
  1741. gosub %Armun%
  1742. }
  1743.  
  1744. gosub MouseArea
  1745. Blockinput off
  1746. return
  1747.  
  1748.  
  1749. Label7:
  1750. Blockinput on
  1751. MouseGetPos, XX, YY
  1752. gosub binding
  1753. gosub %F7downs%
  1754. if prot7 {
  1755. gosub checkboxes
  1756. } else {
  1757. send {esc}
  1758. }
  1759. if arm7 {
  1760. gosub armors
  1761. }
  1762.  
  1763.  
  1764. if Un7 {
  1765. gosub %Armun%
  1766. }
  1767.  
  1768. gosub MouseArea
  1769. Blockinput off
  1770. return
  1771.  
  1772. Label0:
  1773. BlockInput on
  1774. if FRunning {
  1775. MouseGetPos, XX, YY
  1776. IfWinNotActive Old School RuneScape
  1777. {
  1778. MouseClick , Left , X8+ Ran(offset), Y8+ Ran(offset)
  1779. }
  1780. IfWinActive Old School RuneScape
  1781. {
  1782. MouseClick , Left , Ran(offset)+ XR8, Ran(offset)+ Yr8
  1783. }
  1784. }
  1785. gosub MouseArea
  1786. BlockInput off
  1787. return
  1788.  
  1789. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  1790.  
  1791.  
  1792.  
  1793. Quick:
  1794. IfWinNotActive Old School RuneScape
  1795. {
  1796. MouseClick , Left , X10+ Ran(offset), Y10+ Ran(offset)
  1797. }
  1798. IfWinActive Old School RuneScape
  1799. {
  1800. MouseClick , Left , Ran(offset)+ XR10, Ran(offset)+ Yr10
  1801. }
  1802. return
  1803.  
  1804.  
  1805.  
  1806. Melee:
  1807. send {f5}
  1808. Gosub Sleeping
  1809. IfWinNotActive Old School RuneScape
  1810. {
  1811. MouseClick , Left , X1+ Ran(offset), Y1+ Ran(offset)
  1812. }
  1813. IfWinActive Old School RuneScape
  1814. {
  1815. MouseClick , Left , Ran(offset)+ XR1, Ran(offset)+ Yr1
  1816. }
  1817. return
  1818.  
  1819. Range:
  1820. send {f5}
  1821. Gosub Sleeping
  1822. IfWinNotActive Old School RuneScape
  1823. {
  1824. MouseClick , Left , X2+ Ran(offset), Y2+ Ran(offset)
  1825. }
  1826. IfWinActive Old School RuneScape
  1827. {
  1828. MouseClick , Left , Ran(offset)+ XR2, Ran(offset)+ Yr2
  1829. }
  1830. return
  1831.  
  1832.  
  1833.  
  1834. Mage:
  1835. send {f5}
  1836. Gosub Sleeping
  1837. IfWinNotActive Old School RuneScape
  1838. {
  1839. MouseClick , Left , X3+ Ran(offset), Y3+ Ran(offset)
  1840. }
  1841. IfWinActive Old School RuneScape
  1842. {
  1843. MouseClick , Left , Ran(offset)+ XR3, Ran(offset)+ Yr3
  1844. }
  1845. return
  1846.  
  1847.  
  1848. #If WinActive("Orion") || WinActive("Old School RuneScape") || WinActive("OSBot") || WinActive("Runescape") || WinActive("Tribot") || WinActive("SwiftKit")
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856. checkboxes:
  1857. send {f5}
  1858. if SteelSkins {
  1859. IfWinNotActive Old School RuneScape
  1860. {
  1861. MouseClick , Left , X4+ Ran(offset), Y4+ Ran(offset)
  1862. }
  1863. IfWinActive Old School RuneScape
  1864. {
  1865. MouseClick , Left , Ran(offset)+ XR4, Ran(offset)+ Yr4
  1866. }
  1867.  
  1868. }
  1869. if ItemProtects {
  1870. IfWinNotActive Old School RuneScape
  1871. {
  1872. MouseClick , Left , X5+ Ran(offset), Y5+ Ran(offset)
  1873. }
  1874. IfWinActive Old School RuneScape
  1875. {
  1876. MouseClick , Left , Ran(offset)+ XR5, Ran(offset)+ Yr5
  1877. }
  1878. }
  1879. if MysticMight {
  1880. IfWinNotActive Old School RuneScape
  1881. {
  1882. MouseClick , Left , X6+ Ran(offset), Y6+ Ran(offset)
  1883. }
  1884. IfWinActive Old School RuneScape
  1885. {
  1886. MouseClick , Left , Ran(offset)+ XR6, Ran(offset)+ Yr6
  1887. }
  1888. }
  1889. send {esc}
  1890. return
  1891.  
  1892.  
  1893.  
  1894. One:
  1895. send {F4}
  1896. gosub sleeping
  1897. IfWinNotActive Old School RuneScape
  1898. {
  1899. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1900. }
  1901. IfWinActive Old School RuneScape
  1902. {
  1903. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1904. }
  1905. send {esc}
  1906. return
  1907.  
  1908.  
  1909. Two:
  1910. send {F4}
  1911. gosub sleeping
  1912. IfWinNotActive Old School RuneScape
  1913. {
  1914. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1915. MouseClick , Left , X16+ Ran(offset), Y16+ Ran(offset),,2
  1916. }
  1917. IfWinActive Old School RuneScape
  1918. {
  1919. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1920. MouseClick , Left , XR16 + Ran(offset), YR16 + Ran(offset),, 2
  1921. }
  1922. send {esc}
  1923. return
  1924.  
  1925. Three:
  1926. send {F4}
  1927. gosub sleeping
  1928. IfWinNotActive Old School RuneScape
  1929. {
  1930. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1931. MouseClick , Left , X16+ Ran(offset), Y16+ Ran(offset),,2
  1932. MouseClick , Left , X17+ Ran(offset), Y17+ Ran(offset),,2
  1933. }
  1934. IfWinActive Old School RuneScape
  1935. {
  1936. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1937. MouseClick , Left , XR16 + Ran(offset), YR16 + Ran(offset),, 2
  1938. MouseClick , Left , XR17 + Ran(offset), YR17 + Ran(offset),, 2
  1939. }
  1940. send {esc}
  1941. return
  1942.  
  1943. Four:
  1944. send {F4}
  1945. gosub sleeping
  1946. IfWinNotActive Old School RuneScape
  1947. {
  1948. MouseClick , Left , X15+ Ran(offset), Y15+ Ran(offset),,2
  1949. MouseClick , Left , X16+ Ran(offset), Y16+ Ran(offset),,2
  1950. MouseClick , Left , X17+ Ran(offset), Y17+ Ran(offset),,2
  1951. MouseClick , Left , X18+ Ran(offset), Y18+ Ran(offset),,2
  1952. }
  1953. IfWinActive Old School RuneScape
  1954. {
  1955. MouseClick , Left , XR15 + Ran(offset), YR15 + Ran(offset),, 2
  1956. MouseClick , Left , XR16 + Ran(offset), YR16 + Ran(offset),, 2
  1957. MouseClick , Left , XR17 + Ran(offset), YR17 + Ran(offset),, 2
  1958. MouseClick , Left , XR18 + Ran(offset), YR18 + Ran(offset),, 2
  1959. }
  1960. send {esc}
  1961. return
  1962.  
  1963.  
  1964. Armors:
  1965. if Radio1 {
  1966. IfWinNotActive Old School RuneScape
  1967. {
  1968. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  1969. }
  1970. IfWinActive Old School RuneScape
  1971. {
  1972. MouseClick , Left , XR11 + Ran(offset), YR11 + Ran(offset),, 2
  1973. }
  1974. }
  1975.  
  1976. if Radio2 {
  1977. IfWinNotActive Old School RuneScape
  1978. {
  1979. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  1980. gosub sleeping
  1981. MouseClick , Left , X12+ Ran(offset), Y12+ Ran(offset),,2
  1982. }
  1983.  
  1984. IfWinActive Old School RuneScape
  1985. {
  1986. MouseClick , Left , XR11 + Ran(offset), YR11 + Ran(offset),, 2
  1987. gosub sleeping
  1988. MouseClick , Left , XR12+ Ran(offset), YR12+ Ran(offset),,2
  1989. }
  1990. }
  1991.  
  1992.  
  1993. if Radio3 {
  1994. IfWinNotActive Old School RuneScape
  1995. {
  1996. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  1997. gosub sleeping
  1998. MouseClick , Left , X12+ Ran(offset), Y12+ Ran(offset),,2
  1999. gosub sleeping
  2000. MouseClick , Left , X13+ Ran(offset), Y13+ Ran(offset),,2
  2001. }
  2002.  
  2003. IfWinActive Old School RuneScape
  2004. {
  2005. MouseClick , Left , XR11 + Ran(offset), YR11 + Ran(offset),, 2
  2006. gosub sleeping
  2007. MouseClick , Left , XR12+ Ran(offset), YR12+ Ran(offset),,2
  2008. gosub sleeping
  2009. MouseClick , Left , XR13+ Ran(offset), YR13+ Ran(offset),,2
  2010. }
  2011. }
  2012.  
  2013.  
  2014. if Radio4 {
  2015. IfWinNotActive Old School RuneScape
  2016. {
  2017. MouseClick , Left , X11+ Ran(offset), Y11+ Ran(offset),,2
  2018. gosub sleeping
  2019. MouseClick , Left , X12+ Ran(offset), Y12+ Ran(offset),,2
  2020. gosub sleeping
  2021. MouseClick , Left , X13+ Ran(offset), Y13+ Ran(offset),,2
  2022. gosub sleeping
  2023. MouseClick , Left , X14+ Ran(offset), Y14+ Ran(offset),,2
  2024. }
  2025.  
  2026. IfWinActive Old School RuneScape
  2027. {
  2028. MouseClick , Left , XR11+ Ran(offset), YR11+ Ran(offset),, 0
  2029. MouseClick , Left , XR11+ Ran(offset), YR11+ Ran(offset),, 0
  2030. gosub sleeping
  2031. MouseClick , Left , XR12+ Ran(offset), YR12+ Ran(offset),,0
  2032. MouseClick , Left , XR12+ Ran(offset), YR12+ Ran(offset),,0
  2033. gosub sleeping
  2034. MouseClick , Left , XR13+ Ran(offset), YR13+ Ran(offset),,0
  2035. MouseClick , Left , XR13+ Ran(offset), YR13+ Ran(offset),,0
  2036. gosub sleeping
  2037. MouseClick , Left , XR14+ Ran(offset), YR14+ Ran(offset),,0
  2038. MouseClick , Left , XR14+ Ran(offset), YR14+ Ran(offset),,0
  2039. }
  2040. }
  2041.  
  2042. return
  2043.  
  2044.  
  2045. ^F12::
  2046. IfWinExist Old School RuneScape
  2047. {
  2048. WinActivate
  2049. ResizeWin(793,571)
  2050. gosub sleeping
  2051. ResizeWin(793,571)
  2052. }
  2053. return
  2054.  
  2055.  
  2056.  
  2057. Mousearea:
  2058. if Invs {
  2059. IfWinNotActive Old School RuneScape
  2060. {
  2061. MouseMove, X7+ Ran(offset), Y7+ Ran(offset), 0
  2062. }
  2063. IfWinActive Old School RuneScape
  2064. {
  2065. MouseMove, Ran(offset)+ XR7, Ran(offset)+ Yr7, 0
  2066. }
  2067. }
  2068.  
  2069. if Origin {
  2070. IfWinNotActive Old School RuneScape
  2071. {
  2072. MouseMove, XX+ Ran(offset), YY+ Ran(offset), 0
  2073. }
  2074. IfWinActive Old School RuneScape
  2075. {
  2076. MouseMove, xx+ Ran(offset), yy+ Ran(offset), 0
  2077. }
  2078. }
  2079.  
  2080. return
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086. Binding:
  2087. if Fbinds {
  2088. IfWinNotActive Old School RuneScape
  2089. {
  2090. MouseClick , Left , X9+ Ran(offset), Y9+ Ran(offset),,0
  2091. }
  2092. IfWinActive Old School RuneScape
  2093. {
  2094. MouseClick , Left , Ran(offset)+ XR9, Ran(offset)+ Yr9,,0
  2095. }
  2096. }
  2097. return
  2098.  
  2099. none:
  2100. sleep 50
  2101. return
  2102.  
  2103.  
  2104.  
  2105. Sleeping:
  2106. if Fsleep {
  2107. Random, Rand, Sleep1, Sleep2
  2108. sleep %rand%
  2109. }
  2110. return
  2111.  
  2112.  
  2113.  
  2114. Ran(Num)
  2115. {
  2116. Random, r, -1*Num, Num
  2117. Return r
  2118. }
  2119.  
  2120.  
  2121. ResizeWin(Width = 0,Height = 0)
  2122. {
  2123. WinGetPos,X,Y,W,H,A
  2124. If %Width% = 0
  2125. Width := W
  2126.  
  2127. If %Height% = 0
  2128. Height := H
  2129.  
  2130. WinMove,A,,%X%,%Y%,%Width%,%Height%
  2131. }
Advertisement
Add Comment
Please, Sign In to add comment