Advertisement
Guest User

Untitled

a guest
Sep 4th, 2013
1,452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.15 KB | None | 0 0
  1. #singleinstance force
  2. Process, Priority, , High
  3.  
  4.  
  5. Sleep1= 100 ; Random Range Of sleep time
  6. Sleep2= 150 ; Used after pressing the F-Key to switch to run/prayer tab.
  7.  
  8. ;Mouse Positions X/Y Coordinates For Orion, AB For RSclient, change them if needed.
  9.  
  10. X1=684 ; melee prayer
  11. Y1=396 ; mouse position
  12.  
  13. X2=643 ; range prayer
  14. y2=396 ; mouse position
  15.  
  16. x3=608 ; mage prayer
  17. y3=396 ; mouse position
  18.  
  19. x4=681 ; steel skin
  20. y4=359 ; mouse position
  21.  
  22. x5=570 ; item protect
  23. y5=354 ; mouse position
  24.  
  25. x6=571 ; mystic might
  26. y6=430 ; mouse position
  27.  
  28. x7=639 ; final Mouse Position
  29. y7=237 ; after finishing prayer clicks
  30.  
  31. x8=641 ; Run icon
  32. y8=480 ; mouse position
  33.  
  34. x9=750 ; clicks Mouse Top right of screen
  35. y9=197 ; to cancel "cast bind" before activating prayer.
  36.  
  37. ;RSClient Coods
  38.  
  39. XR1=694
  40. YR1=369
  41.  
  42. XR2=654
  43. YR2=369
  44.  
  45. XR3=618
  46. YR3=369
  47.  
  48. XR4=694
  49. YR4=332
  50.  
  51. XR5=580
  52. YR5=335
  53.  
  54. XR6=582
  55. YR6=410
  56.  
  57. XR7=656
  58. YR7=208
  59.  
  60. XR8=655
  61. YR8=455
  62.  
  63. XR9=763
  64. YR9=174
  65.  
  66.  
  67. offset=2
  68.  
  69. F1Downs := "Melee"
  70. F2Downs := "Range"
  71. F3Downs := "Mage"
  72. F4Downs := "Melees"
  73. F5Downs := "Rangers"
  74. F6Downs := "Magers"
  75. goto ^g
  76. return
  77.  
  78. ^g::
  79. GUI Destroy
  80. GoSub GUI
  81. return
  82.  
  83. Gui:
  84. Gui, Margin, 10, 10
  85.  
  86. Gui, Add, Text, center Ym+20 w280 h15, OSRS Prayer: By Samerdl
  87. Gui, Add, Text, w50 h15 xm ym+60 section, F1 - key
  88. Gui, Add, Text, w50 h15 yp+30, F2 - Key
  89. Gui, Add, Text, w50 h15 yp+30, F3 - Key
  90. Gui, Add, Text, w70 h15 xp+15 yp+30, F4 - Key
  91. Gui, Add, Text, w70 h15 xp+65, F5 - Key
  92. Gui, Add, Text, w70 h15 xp+65, F6 - Key
  93. Gui, Add, Text, xp+55 yp+30 w300 h20, < Overheads Only
  94.  
  95.  
  96. Gui, Add, Text, w50 h15 xs+60 ys, OverHead:
  97. Gui, Add, Text, w50 h15 yp+30, OverHead:
  98. Gui, Add, Text, w50 h15 yp+30, OverHead:
  99.  
  100. Gui, Add, DropDownList, w60 xs+120 ys-3 vF1Downs choose1, Melee|Range|Mage
  101. Gui, Add, DropDownList, w60 yp+30 vF2Downs choose2, Melee|Range|Mage
  102. Gui, Add, DropDownList, w60 yp+30 vF3Downs choose3, Melee|Range|Mage
  103. Gui, Add, DropDownList, w60 xp-120 yp+60 vF4Downs choose1, Melees|Ranges|Magers
  104. Gui, Add, DropDownList, w60 xp+70 vF5Downs choose2, Melees|Rangers|Magers
  105. Gui, Add, DropDownList, w60 xp+70 vF6Downs choose3, Melees|Rangers|Magers
  106.  
  107. Gui, Add, Text, w50 ys-25 xs+200, Protections:
  108. Gui, Add, CheckBox, yp+20 vSteelskins checked, Steel Skin
  109. Gui, Add, CheckBox, yp+20 vItemProtects checked, Item Protect
  110. Gui, Add, CheckBox, yp+20 vMysticMight, Mystic Might
  111. Gui, Add, CheckBox, yp+20 vFRunning checked, ~ toggles run
  112. Gui, Add, CheckBox, yp+20 vFSleep checked, sleep time
  113. Gui, Add, CheckBox, yp+20 vFBinds, bind Unclick
  114.  
  115.  
  116. Gui, Add, Text, xm ys+150 w300 h20 section center, Mouse Position When Done:
  117.  
  118.  
  119. Gui, Add, Radio, w100 h15 ys+20 xm+30 vInv, Inventory Icon
  120. Gui, Add, Radio, w100 h15 ys+20 xm+160 vOrigin checked, Original Position
  121.  
  122. Gui, Add, Button, w290 ys+50 xm, Ok
  123. Gui, Add, Button, Xs YM w10, About
  124. Gui, Add, Button, Xs YM+30 w10, ResizeClient
  125. Gui, Show, w305, OSRS Prayer: By Samerdl
  126. Return
  127.  
  128. GuiClose:
  129. ExitApp
  130.  
  131. ButtonOK:
  132. 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).
  133. Gui, Submit
  134. return
  135.  
  136. ButtonResizeClient:
  137. 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).
  138. IfMsgBox Ok
  139. IfWinExist Old School RuneScape
  140. {
  141. WinActivate
  142. ResizeWin(793,571)
  143. }
  144. return
  145. return
  146.  
  147.  
  148. ButtonAbout:
  149. gui, 2:Default
  150. Gui, 2:Margin, 10, 10
  151. Gui, 2:Add, Text, center w240 h15, OSRS Prayer: By Samerdl
  152. Gui, 2:Add, Button, xp+5 yp+20,F-keys_And_Overheads
  153. Gui, 2:Add, button, default,Resizing_The_Rs_Client
  154. Gui, 2:Add, Button, default w+120,Run_toggling_feature
  155. Gui, 2:Add, Button, default w+140,Bind_Unclicking_Feature
  156. Gui, 2:Add, Button, default w+120,Mouse_Positioning_When_Done_Feature
  157. Gui, 2:Add, Button, default w+120,Sleep_time_feature
  158. Gui, 2:Add, Button, default xp+150 yp-100,General_Info
  159. Gui, 2:Add, Button, W240 xs-5 Close,Close
  160.  
  161. Gui, 2:Show, w250, About ~ OSRS Prayer: By Samerdl
  162. return
  163.  
  164.  
  165. 2ButtonClose:
  166. gui, 2:submit
  167. return
  168.  
  169. 2ButtonGeneral_Info:
  170. 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!}}.
  171. return
  172.  
  173. 2ButtonF-keys_And_Overheads:
  174. 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.
  175. return
  176.  
  177. 2buttonResizing_The_Rs_Client:
  178. 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).
  179. return
  180.  
  181. 2buttonRun_toggling_feature:
  182. 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.
  183. return
  184.  
  185. 2buttonMouse_Positioning_When_Done_Feature:
  186. 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.
  187. return
  188.  
  189. 2buttonBind_Unclicking_Feature:
  190. 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.
  191. return
  192.  
  193. 2buttonSleep_time_feature:
  194. 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.
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. #If WinActive("Orion") or WinActive("Old School RuneScape") or WinActive("OSBot") or WinActive("Runescape") or WinActive("Tribot")
  205.  
  206.  
  207. F1::
  208. BlockInput On
  209. gosub %F1Downs%
  210. BlockInput off
  211. return
  212.  
  213. F2::
  214. BlockInput On
  215. gosub %F2Downs%
  216. BlockInput off
  217. return
  218.  
  219. F3::
  220. BlockInput On
  221. gosub %F3Downs%
  222. BlockInput off
  223. return
  224.  
  225. F4::
  226. BlockInput On
  227. gosub %F4Downs%
  228. BlockInput off
  229. return
  230.  
  231. F5::
  232. BlockInput On
  233. gosub %F5Downs%
  234. BlockInput off
  235. return
  236.  
  237. F6::
  238. BlockInput On
  239. gosub %F6Downs%
  240. BlockInput off
  241. return
  242.  
  243. ^F12::
  244. IfWinExist Old School RuneScape
  245. {
  246. WinActivate
  247. ResizeWin(793,571)
  248. }
  249. return
  250.  
  251.  
  252.  
  253. `::
  254. BlockInput on
  255. if FRunning
  256. {
  257. MouseGetPos, XX, YY
  258. gosub binding
  259. send {f10}
  260. Gosub Sleeping
  261. IfWinNotActive Old School RuneScape
  262. {
  263. MouseClick , Left , X8+ Ran(offset), Y8+ Ran(offset)
  264. }
  265. IfWinActive Old School RuneScape
  266. {
  267. MouseClick , Left , Ran(offset)+ XR8, Ran(offset)+ Yr8
  268. }
  269. send {esc}
  270. gosub MouseArea
  271. }
  272. BlockInput off
  273. return
  274.  
  275.  
  276.  
  277. Melees:
  278. MouseGetPos, XX, YY
  279. gosub binding
  280. send {f5}
  281. Gosub Sleeping
  282. IfWinNotActive Old School RuneScape
  283. {
  284. MouseClick , Left , X1+ Ran(offset), Y1+ Ran(offset)
  285. }
  286. IfWinActive Old School RuneScape
  287. {
  288. MouseClick , Left , Ran(offset)+ XR1, Ran(offset)+ Yr1
  289. }
  290. send {esc}
  291. gosub MouseArea
  292. return
  293.  
  294. Rangers:
  295. MouseGetPos, XX, YY
  296. gosub binding
  297. send {f5}
  298. Gosub Sleeping
  299. IfWinNotActive Old School RuneScape
  300. {
  301. MouseClick , Left , X2+ Ran(offset), Y2+ Ran(offset)
  302. }
  303. IfWinActive Old School RuneScape
  304. {
  305. MouseClick , Left , Ran(offset)+ XR2, Ran(offset)+ Yr2
  306. }
  307.  
  308. send {esc}
  309. gosub MouseArea
  310. return
  311.  
  312. Magers:
  313. MouseGetPos, XX, YY
  314. gosub binding
  315. send {f5}
  316. Gosub Sleeping
  317. IfWinNotActive Old School RuneScape
  318. {
  319. MouseClick , Left , X3+ Ran(offset), Y3+ Ran(offset)
  320. }
  321. IfWinActive Old School RuneScape
  322. {
  323. MouseClick , Left , Ran(offset)+ XR3, Ran(offset)+ Yr3
  324. }
  325. send {esc}
  326. gosub MouseArea
  327. return
  328.  
  329.  
  330.  
  331. Melee:
  332. MouseGetPos, XX, YY
  333. gosub binding
  334. send {f5}
  335. Gosub Sleeping
  336. IfWinNotActive Old School RuneScape
  337. {
  338. MouseClick , Left , X1+ Ran(offset), Y1+ Ran(offset)
  339. }
  340. IfWinActive Old School RuneScape
  341. {
  342. MouseClick , Left , Ran(offset)+ XR1, Ran(offset)+ Yr1
  343. }
  344. gosub checkboxes
  345. Gosub Sleeping
  346. send {esc}
  347. gosub MouseArea
  348. return
  349.  
  350. Range:
  351. MouseGetPos, XX, YY
  352. gosub binding
  353. send {f5}
  354. Gosub Sleeping
  355. IfWinNotActive Old School RuneScape
  356. {
  357. MouseClick , Left , X2+ Ran(offset), Y2+ Ran(offset)
  358. }
  359. IfWinActive Old School RuneScape
  360. {
  361. MouseClick , Left , Ran(offset)+ XR2, Ran(offset)+ Yr2
  362. }
  363. gosub checkboxes
  364. Gosub Sleeping
  365. send {esc}
  366. gosub MouseArea
  367. return
  368.  
  369. Mage:
  370. MouseGetPos, XX, YY
  371. gosub binding
  372. send {f5}
  373. Gosub Sleeping
  374. IfWinNotActive Old School RuneScape
  375. {
  376. MouseClick , Left , X3+ Ran(offset), Y3+ Ran(offset)
  377. }
  378. IfWinActive Old School RuneScape
  379. {
  380. MouseClick , Left , Ran(offset)+ XR3, Ran(offset)+ Yr3
  381. }
  382. gosub checkboxes
  383. Gosub Sleeping
  384. send {esc}
  385. gosub MouseArea
  386. return
  387.  
  388.  
  389. checkboxes:
  390. if SteelSkins
  391. {
  392. IfWinNotActive Old School RuneScape
  393. {
  394. MouseClick , Left , X4+ Ran(offset), Y4+ Ran(offset)
  395. }
  396. IfWinActive Old School RuneScape
  397. {
  398. MouseClick , Left , Ran(offset)+ XR4, Ran(offset)+ Yr4
  399. }
  400.  
  401. }
  402. if ItemProtects
  403. {
  404. IfWinNotActive Old School RuneScape
  405. {
  406. MouseClick , Left , X5+ Ran(offset), Y5+ Ran(offset)
  407. }
  408. IfWinActive Old School RuneScape
  409. {
  410. MouseClick , Left , Ran(offset)+ XR5, Ran(offset)+ Yr5
  411. }
  412. }
  413. if MysticMight
  414. {
  415. IfWinNotActive Old School RuneScape
  416. {
  417. MouseClick , Left , X6+ Ran(offset), Y6+ Ran(offset)
  418. }
  419. IfWinActive Old School RuneScape
  420. {
  421. MouseClick , Left , Ran(offset)+ XR6, Ran(offset)+ Yr6
  422. }
  423. }
  424. return
  425.  
  426.  
  427. Mousearea:
  428. if Inv
  429. {
  430. IfWinNotActive Old School RuneScape
  431. {
  432. MouseMove, X7+ Ran(offset), Y7+ Ran(offset), 0
  433. }
  434. IfWinActive Old School RuneScape
  435. {
  436. MouseMove, Ran(offset)+ XR7, Ran(offset)+ Yr7, 0
  437. }
  438. }
  439. if Origin
  440. {
  441. IfWinNotActive Old School RuneScape
  442. {
  443. MouseMove, XX+ Ran(offset), YY+ Ran(offset), 0
  444. }
  445. IfWinActive Old School RuneScape
  446. {
  447. MouseMove, xx+ Ran(offset), yy+ Ran(offset), 0
  448. }
  449. }
  450. return
  451.  
  452.  
  453. Binding:
  454. if Fbinds
  455. {
  456. IfWinNotActive Old School RuneScape
  457. {
  458. MouseClick , Left , X9+ Ran(offset), Y9+ Ran(offset)
  459. }
  460. IfWinActive Old School RuneScape
  461. {
  462. MouseClick , Left , Ran(offset)+ XR9, Ran(offset)+ Yr9
  463. }
  464. }
  465. return
  466.  
  467. Sleeping:
  468. if Fsleep
  469. {
  470. Random, Rand, Sleep1, Sleep2
  471. sleep %rand%
  472. }
  473. return
  474.  
  475.  
  476.  
  477. Ran(Num)
  478. {
  479. Random, r, -1*Num, Num
  480. Return r
  481. }
  482.  
  483.  
  484. ResizeWin(Width = 0,Height = 0)
  485. {
  486. WinGetPos,X,Y,W,H,A
  487. If %Width% = 0
  488. Width := W
  489.  
  490. If %Height% = 0
  491. Height := H
  492.  
  493. WinMove,A,,%X%,%Y%,%Width%,%Height%
  494. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement