Advertisement
Guest User

EasyUO Journal Logger

a guest
Apr 26th, 2013
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 KB | None | 0 0
  1. ; Script Name: TIM's Journal Scanner
  2. ; Author: TIM (timginter)
  3. ; Version: 1.1
  4. ; Client Tested with: 5.0.1j
  5. ; EUO version tested with: 1.5 v. 102
  6. ; Shard OSI / FS: OSI/FS
  7. ; Revision Date: 28/01/09
  8. ; Public Release: 28/01/09
  9. ; Purpose: Shows journal entries via resizeable menu. Saves journal entries to a specified file. Filters messages to display
  10.  
  11. gosub menuBody
  12.  
  13. ; magery
  14. set %wordsOfPower Uus_Jux__In_Mani_Ylem__Rel_Wis__In_Mani__In_Por_Ylem__In_Lor__Flam_Sanct__Des_Mani__Ex_Uus__Uus_Wis__An_Nox__An_Mani__In_Jux__An_Jux__Uus_Sanct__Uus_Mani__
  15. set %wordsOfPower %wordsOfPower , Rel_Sanct__Vas_Flam__An_Por__In_Nox__Ort_Por__Rel_Por__Ex_Por__In_Sanct_Ylem__Vas_An_Nox__Vas_Uus_Sanct__Des_Sanct__In_Flam_Grav__In_Vas_Mani__
  16. set %wordsOfPower %wordsOfPower , Por_Ort_Grav__Ort_Rel__Kal_Ort_Por__In_Jux_Hur_Ylem__An_Grav__Kal_In_Ex__In_Jux_Sanct__Por_Corp_Wis__An_Ex_Por__In_Nox_Grav__Kal_Xen__An_Ort__
  17. set %wordsOfPower %wordsOfPower , Corp_Por__Vas_Ort_Flam__An_Lor_Xen__Kal_Por_Ylem__Vas_Des_Sanct__In_Ex_Grav__Wis_Quas__Vas_Ort_Grav__In_Sanct_Grav__Kal_Vas_Flam__Vas_Rel_Por__
  18. set %wordsOfPower %wordsOfPower , Ort_Sanct__Vas_An_Ort__Flam_Kal_Des_Ylem__Vas_Ylem_Rel__In_Vas_Por__Vas_Corp_Por__An_Corp__Kal_Vas_Xen_Hur__Kal_Vas_Xen_Corp__Kal_Vas_Xen_Ylem__
  19. set %wordsOfPower %wordsOfPower , Kal_Vas_Xen_Flam__Kal_Vas_Xen_An_Flam__
  20. ; necromancy
  21. set %wordsOfPower %wordsOfPower , Uus_Corp__In_Jux_Mani_Xen__In_Agle_Corp_Ylem__An_Sanct_Gra_Char__Pas_Tym_An_Sanct__Rel_Xen_Vas_Bal__Rel_Xen_Corp_Ort__Wis_An_Ben__In_Sar__
  22. set %wordsOfPower %wordsOfPower , In_Vas_Nox__In_Bal_Nox__Kal_Xen_Bal__Rel_Xen_An_Sanct__Kal_Xen_Bal_Beh__Kal_Vas_An_Flam__Rel_Xen_Um__Ort_Corp_Grav__
  23. ; chivlary
  24. set %wordsOfPower %wordsOfPower , Expor_Flamus__Obsu_Vulni__Consecrus_Arma__Dispiro_Malas__Divinum_Furis__Forul_Solum__Augus_Luminos__Dium_Prostra__Extermo_Vomica__Sanctum_Viatas__
  25. ; spellweaving
  26. set %wordsOfPower %wordsOfPower , Myrshalee__Olorisstra__Thalshara__Haeldril__Erelonia__Rauvvrae__Alalithra__Nylisstra__Tarisstree__Haelyn__Anathrae__Rathril__Orlavdra__Nyraxle__
  27. set %wordsOfPower %wordsOfPower , Illorae__Aslavdra__
  28.  
  29. set %jEntry #jIndex
  30. set %listIndex 0
  31. mainLoop:
  32. if ( %jEntry < #jIndex || %jEntry = N/A )
  33. {
  34. set %scanLine #jIndex - %jEntry
  35. scanJournal %scanLine
  36. set %journal #journal
  37. menu get filter_spam
  38. set *filterSpam #menuRes
  39. menu get filter_spells
  40. set *filterSpells #menuRes
  41. menu get chat_only
  42. set *chatOnly #menuRes
  43. menu get filter_spotting
  44. set *filterSpotting #menuRes
  45. if *filterSpells = #true
  46. {
  47. str pos %journal : 1
  48. str del %journal 1 #strRes
  49. set %spellCheckStr #strRes
  50. }
  51.  
  52. ; ------------- THE "IF" BELOW FILTERS MESSAGES -------------
  53.  
  54. if ( %journal <> %lastEntry || *filterSpam = #false ) && ( %spellCheckStr notIn %wordsOfPower || *filterSpells = #false ) &&
  55. + ( :_ in %journal || *chatOnly = #false ) && ( You_see:_ notIn %journal || *filterSpotting = #false )
  56. {
  57. set %lastEntry %journal
  58. str count %journal _
  59. while #strRes > 0
  60. {
  61. str pos %journal _
  62. set %underscorePos #strRes
  63. str del %journal #strRes 1
  64. str ins #strRes #spc %underscorePos
  65. set %journal #strRes
  66. str count %journal _
  67. }
  68. set %listIndex %listIndex + 1
  69. gosub time
  70. set %line_ . %listIndex %time , #spc , %journal
  71. menu list add journal %line_ . %listIndex
  72. menu list select journal %listIndex
  73. }
  74. set %jEntry %jEntry + 1
  75. }
  76. if #menuButton <> NONE
  77. {
  78. gosub #menuButton
  79. set #menuButton NONE
  80. }
  81. goto mainLoop
  82.  
  83. ; ------------------------------------------------------
  84.  
  85. sub save
  86. menu get path
  87. set %file #menuRes
  88. gosub time
  89. set %listIndex %listIndex + 1
  90. set %line_ . %listIndex %time , #spc , SAVING , #SPC , TO: , #SPC , %file
  91. menu list add journal %line_ . %listIndex
  92. menu list select journal %listIndex
  93. set %jEntry %jEntry + 1
  94. if %saveIndex = N/A
  95. {
  96. set %saveIndex 1
  97. }
  98. set %saveGroupIndex 1
  99. set %groups ( %listIndex - %saveIdex ) / 20
  100. event sysMessage %groups
  101. saveLoop:
  102. set %params %listIndex - %saveIndex
  103. if %params > 20
  104. {
  105. set %params %saveIndex + 18
  106. set %lastParam %saveIndex + 19
  107. set %saveGroup . %saveGroupIndex
  108. for %save_i %saveIndex %params
  109. {
  110. set %saveLine %line_ . %save_i
  111. set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file , #SPC , && , #SPC , echo
  112. }
  113. set %saveLine %line_ . %lastParam
  114. set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file
  115. set %saveGroupIndex %saveGroupIndex + 1
  116. set %saveIndex %params + 1
  117. goto saveLoop
  118. }
  119. else
  120. {
  121. set %params %params - 1
  122. set %params %saveIndex + %params
  123. set %lastParam %saveIndex + %params + 1
  124. set %saveGroup . %saveGroupIndex
  125. for %save_i %saveIndex %params
  126. {
  127. set %saveLine %line_ . %save_i
  128. set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file , #SPC , && , #SPC , echo
  129. }
  130. set %saveLine %line_ . %lastParam
  131. set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file
  132. }
  133. for %save_i 1 %saveGroupIndex
  134. {
  135. execute cmd.exe /c echo %saveGroup . %save_i
  136. }
  137. gosub time
  138. set %listIndex %listIndex + 1
  139. set %line_ . %listIndex %time , #spc , SAVING , #SPC , DONE
  140. menu list add journal %line_ . %listIndex
  141. menu list select journal %listIndex
  142. set %jEntry %jEntry + 1
  143. return
  144.  
  145. sub left
  146. if %width > 300
  147. {
  148. gosub menuBody -100 0
  149. }
  150. gosub rewriteList
  151. return
  152.  
  153. sub right
  154. if %width < 1200
  155. {
  156. gosub menuBody 100 0
  157. }
  158. gosub rewriteList
  159. return
  160.  
  161. sub rewriteList
  162. menu list clear journal
  163. for %restoreList_i 1 %listIndex
  164. {
  165. menu list add journal %line_ . %restoreList_i
  166. }
  167. menu list select journal %listIndex
  168. return
  169.  
  170. sub closed
  171. stop
  172. return
  173.  
  174. ; -----------------------------------------------------
  175.  
  176. sub time
  177. set %time #time
  178. str ins %time : 5
  179. str ins #strRes : 3
  180. set %time [ , #strRes , ]
  181. return
  182.  
  183. sub menuBody
  184. menu Clear
  185. menu Font Name Comic Sans MS
  186. menu Window title TIM's Journal
  187. menu Window color black
  188. menu Font Name Verdana
  189. menu Font color green
  190. menu Font bgcolor black
  191. menu Font size 8
  192. if %width = N/A
  193. {
  194. set %width 500
  195. }
  196. if %height = N/A
  197. {
  198. set %height 120
  199. }
  200. set %yCoordinate 5
  201. if %0 > 0
  202. {
  203. set %width %width + %1
  204. }
  205. menu list create journal 5 %yCoordinate %width %height
  206.  
  207. menu Font Name Comic Sans MS
  208. set %yCoordinate %yCoordinate + %height
  209. set %yCoordinate %yCoordinate + 5
  210. if *filterSpam = N/A || *filterSpells = N/A || *filterSpotting = N/A || *chatOnly = N/A
  211. {
  212. set *filterSpam #false
  213. set *filterSpells #false
  214. set *filterSpotting #false
  215. set *chatOnly #false
  216. }
  217. menu check filter_spam 5 %yCoordinate 100 20 *filterSpam Filter spam?
  218. menu check filter_spells 100 %yCoordinate 100 20 *filterSpells Filter spells?
  219. menu check filter_spotting 200 %yCoordinate 100 20 *filterSpotting Filter spotting?
  220. menu check chat_only 400 %yCoordinate 100 20 *chatOnly Chat only?
  221.  
  222. set %yCoordinate %yCoordinate + 20
  223. menu button save 5 %yCoordinate 100 20 SAVE
  224. menu edit path 110 %yCoordinate 150 C:journal.txt
  225.  
  226. menu button left 265 %yCoordinate 20 20 <
  227. menu button right 287 %yCoordinate 20 20 >
  228.  
  229. set %yCoordinate %yCoordinate + 25
  230. set %windowSize %width + 10
  231. menu Window Size %windowSize %yCoordinate
  232. menu Show
  233. set #menuButton NONE
  234. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement