DavidJSGardner

Callum's Fast BardKeys 2.0

Jun 11th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.40 KB | None | 0 0
  1. ;==================================
  2. ; Script Name: Callum's Fast Bard Keys
  3. ; Author: Callum O'Lyre
  4. ; ICQ: 625-658-845
  5. ; Version: 1.0
  6. ; Shard: Pangaea
  7. ; Public Release: 15.10.2012
  8. ; Purpose: To speed up the casting of bard songs on Pangaea
  9. ; Originally Posted: http://pastebin.com/u/DavidJSGardner
  10. ;=============Song ID==============
  11. ;Illumination - 1
  12. ;Sounds of Injury - 2
  13. ;Fertility - 3
  14. ;Lightheadedness - 4
  15. ;Shielding - 5
  16. ;Transportation - 6
  17. ;Bane - 7
  18. ;Sounds of Damage - 8
  19. ;True Seeing - 9
  20. ;Boosting - 10
  21. ;Recovery - 11
  22. ;Cleansing - 12
  23. ;Transparency - 13
  24. ;Revival - 14
  25. ;Sounds of Demolition - 15
  26. ;Stunning - 16
  27. ;Dispelling - 17
  28. ;Feedback - 18
  29. ;==================================
  30. ;Let's Break it down:
  31. ;onhotkey F1
  32. ; {
  33. ; GoSub PlaySong 5
  34. ; }
  35. ;
  36. ;The onHotKey command performs the following line of code (brackets do NOT work) when a certain key is pressed.
  37. ;The key-specifier can either be A-Z, 0-9, F1-F12 and ESC, BACK, TAB, ENTER, PAUSE, CAPSLOCK, SPACE, PGDN, PGUP,
  38. ;END, HOME, LEFT, RIGHT, UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK or SCROLLLOCK.
  39. ;
  40. ;onHotKey {key-specifier} {[alt] | [ctrl] | [shift]}
  41. ;
  42. ;Ex: onhotkey t alt
  43. ;==================================
  44. ;As always if you need any help with setup, please do not hesitate to contact me via icq or a PM, I am more then
  45. ;happy to help out anyway I can.
  46. ;==================================
  47. ;Instrument Lists
  48. set %Harp QRF
  49. set %StandingHarp NRF
  50. set %Flute MNL
  51. set %Tambo LQF
  52. set %RibTambo OQF
  53. set %Drum MQF
  54. set %Lute1 KRF
  55. set %Lute2 PRF
  56.  
  57. While #true
  58. {
  59. ;Shielding
  60. onhotkey F1
  61. {
  62. GoSub PlaySong 5
  63. }
  64. ;Feedback
  65. onhotkey F1 SHIFT
  66. {
  67. GoSub PlaySong 17
  68. }
  69. ;Boosting
  70. onhotkey F1 ALT
  71. {
  72. GoSub PlaySong 10
  73. }
  74. ;Demo
  75. onhotkey F3
  76. {
  77. GoSub PlaySong 15
  78. }
  79. ;Lightheaded
  80. onhotkey F3 SHIFT
  81. {
  82. GoSub PlaySong 4
  83. }
  84. onhotkey F4
  85. {
  86. GoSub PlaySong 11
  87. }
  88. onhotkey F4 SHIFT
  89. {
  90. GoSub PlaySong 12
  91. }
  92. onhotkey F12
  93. {
  94. GoSub PlaySong 14
  95. }
  96. ;------
  97.  
  98. ;------
  99. }
  100.  
  101. ;==================================
  102. ; Script Name: PlaySong
  103. ; Author: Callum O'Lyre
  104. ; Version: 2.0
  105. ; Shard: Pangaea
  106. ; Public Release: 12.06.2013
  107. ; Purpose: Uses an instrument and plays the specified song it has been passed.
  108. ; Usage: GoSub PlaySong SongID
  109. ; SongID <the position of the song in the gump, range of numbers 1-18>
  110. ;=============Song ID==============
  111. ;Illumination - 1
  112. ;Sounds of Injury - 2
  113. ;Fertility - 3
  114. ;Lightheadedness - 4
  115. ;Shielding - 5
  116. ;Transportation - 6
  117. ;Bane - 7
  118. ;Sounds of Damage - 8
  119. ;True Seeing - 9
  120. ;Boosting - 10
  121. ;Recovery - 11
  122. ;Cleansing - 12
  123. ;Transparency - 13
  124. ;Revival - 14
  125. ;Sounds of Demolition - 15
  126. ;Stunning - 16
  127. ;Dispelling - 17
  128. ;Feedback - 18
  129. ;==================================
  130. Sub PlaySong
  131. set %lpc #lpc
  132. set #lpc 60
  133.  
  134. set %Song %1 - 1
  135. if %Song < 0 || %Song > 17
  136. {
  137. set #lpc %lpc
  138. return #False
  139. }
  140.  
  141. ;Modifier songs
  142. ;Fertility, Lightheadedness, Shielding, Bane, True Seeing, Boosting, Transparency, Feedback
  143. If %Song = 2 || %Song = 3 || %Song = 4 || %Song = 6 || %Song = 8 || %Song = 9 || %Song = 12 || %Song = 17
  144. {
  145. GoSub ItemFind %RibTambo %Tambo %Lute1 %Lute2 %StandingHarp %Harp %Drum %Flute
  146. }
  147. ;Helpful songs
  148. ;Illumination, Transportation, Recovery, Cleansing, Revival
  149. If %Song = 0 || %Song = 5 || %Song = 10 || %Song = 11 || %Song = 13
  150. {
  151. GoSub ItemFind %StandingHarp %Harp %Lute1 %Lute2 %RibTambo %Tambo %Flute %Drum
  152. }
  153. ;Aggressive Songs
  154. ;Sounds of Injury, Sounds of Damage, Sounds of Demolition, Stunning, Dispelling
  155. If %Song = 1 || %Song = 7 || %Song = 14 || %Song = 15 || %Song = 16
  156. {
  157. GoSub ItemFind %Drum %Flute %Lute1 %Lute2 %Tambo %Harp %StandingHarp %RibTambo
  158. }
  159.  
  160. if #Result = NoInstrumentToPlay
  161. {
  162. Event Sysmessage You have no instruments fool!
  163. set #lpc %lpc
  164. return
  165. }
  166.  
  167. set #LOBJECTID #Result
  168. Event Macro 17 0
  169.  
  170. set %TimeToWait #SCNT + 5
  171. while ( #contname <> generic_gump && #contPosX <> 0 )
  172. {
  173. if %TimeToWait < #SCNT
  174. {
  175. Event Sysmessage Couldn't Find Bard Gump!
  176. set #lpc %lpc
  177. return
  178. }
  179. }
  180.  
  181. set %PS_X #ContPosX + 48
  182. set %PS_Y #ContPosY + 75 + ( 20 * ( %Song % 18 ) )
  183.  
  184. click %PS_X %PS_Y f
  185. set #lpc %lpc
  186. return
  187.  
  188. ;==================================
  189. ; Script Name: Find Item In Specific Order
  190. ; Author: Callum O'Lyre
  191. ; Version: 2.0
  192. ; Shard: Pangaea
  193. ; Purpose: To search for and use the first instrument it finds, if the user wishes to
  194. ; use a sepcific instrument for a song list it first and it will use it assuming
  195. ; of course it is available to use. It is advisable to list all instrument types
  196. ; so that if one is not available it will move down the list and use the next
  197. ; available instrument.
  198. ; Usage: GoSub ItemFind firstitem seconditem thirditem ...
  199. ;==================================
  200. Sub ItemFind
  201. for %i 1 %0
  202. {
  203. FindItem % . %i CA
  204. Event Property #FindID
  205. if #FindID <> X
  206. {
  207. if Consonance in #Property
  208. {
  209. Set %InstrumentType #FindType
  210. return #findid
  211. }
  212. if Harmony in #Property
  213. {
  214. Set %InstrumentType #FindType
  215. return #findid
  216. }
  217. if Melody in #Property
  218. {
  219. Set %InstrumentType #FindType
  220. return #findid
  221. }
  222. if Accord in #Property
  223. {
  224. Set %InstrumentType #FindType
  225. return #findid
  226. }
  227. if Sonority in #Property
  228. {
  229. Set %InstrumentType #FindType
  230. return #findid
  231. }
  232. Set %InstrumentType #FindType
  233. return #findid
  234. }
  235. }
  236. return NoInstrumentToPlay
Advertisement
Add Comment
Please, Sign In to add comment