Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.41 KB | None | 0 0
  1.  
  2. ;;;;;;;;;;;;;;;;;;;Voodoo² for mIRC 7+;;;;;;;;;;;;;;;;;;;
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;; ;;
  5. ;; Release 2.5 2013-02-19 ;;
  6. ;; ;;
  7. ;; This script requires colorcombo.dll to be present ;;
  8. ;; in the same directory as the script. ;;
  9. ;; ;;
  10. ;; See README for details ;;
  11. ;; ;;
  12. ;; Special thanks to Nymphetamine for cracking the ;;
  13. ;; whip, composing the in-script help and writing the ;;
  14. ;; README. ;;
  15. ;; ;;
  16. ;; http://www.voodoo-script.com ;;
  17. ;; ;;
  18. ;;;;;;;;;;;;;;;;;;;;By: Freakuancy;;;;;;;;;;;;;;;;;;;;;;;
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20.  
  21. ;; Follows is sexy code:
  22.  
  23.  
  24. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  25. ;; ;;
  26. ;; Dialog Tables and Events ;;
  27. ;; ;;
  28. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  29.  
  30.  
  31. dialog dlgCharacter {
  32. ;; Add/Edit Character Dialog Table
  33. title "Grimoire - Add/Edit Character"
  34. size -1 -1 234 238
  35. option dbu
  36. button "&Save", 3, 152 223 37 12, default ok
  37. button "+", 4, 45 212 12 8
  38. button "--", 5, 61 212 12 8
  39. tab "Formatting", 7, 76 2 154 217
  40. box "Triggers:", 15, 80 127 145 50, tab 7
  41. box "Commands:", 23, 80 179 145 37, tab 7
  42. box "PNick:", 13, 80 100 145 26, tab 7
  43. box "Cut Options:", 28, 80 49 145 50, tab 7
  44. check "Auto-Cut Posts", 29, 91 58 50 10, tab 7
  45. edit "--", 30, 185 71 18 10, tab 7 autohs center
  46. edit "--", 34, 123 84 18 10, tab 7 autohs center
  47. edit "", 36, 185 84 18 10, tab 7 autohs center
  48. edit "--", 32, 123 71 18 10, tab 7 autohs center
  49. edit "<Nickname>", 16, 146 111 58 10, tab 7 autohs
  50. check "Use Pnick:", 14, 103 111 34 10, tab 7
  51. text "Cont.:", 35, 103 85 17 8, tab 7
  52. text "Next:", 31, 167 72 17 8, tab 7
  53. text "Begin:", 33, 101 72 17 8, tab 7
  54. text "End:", 37, 167 85 13 8, tab 7
  55. text "Dialog:", 17, 103 139 17 8, tab 7
  56. text "Telepathy:", 18, 103 151 33 8, tab 7
  57. text "Foreign Language:", 19, 103 163 49 8, tab 7
  58. edit *, 21, 194 163 10 10, tab 7 center
  59. edit ~, 20, 194 150 10 10, tab 7 limit 1 center
  60. edit , 22, 194 138 10 10, tab 7 limit 1 center
  61. text "OOC Left Bracket:", 24, 104 190 49 8, tab 7
  62. text "OOC Right Bracket:", 25, 104 202 49 8, tab 7
  63. edit " ))", 27, 179 200 26 10, tab 7 autohs center
  64. edit "(( ", 26, 179 188 26 10, tab 7 autohs center
  65. text "Formatting options for this character. Turn auto-cuts on or off, change the cut brackets or set different triggers for your dialog.", 85, 98 20 105 27, tab 7 center
  66. tab "Colors", 8
  67. combo 1, 116 69 20 9, tab 8 size drop
  68. box "General Colors", 41, 80 59 145 50, tab 8
  69. text "Default:", 42, 94 69 21 8, tab 8
  70. text "Action:", 43, 94 82 17 8, tab 8
  71. combo 39, 116 82 20 9, tab 8 size drop
  72. combo 40, 116 95 20 9, tab 8 size drop
  73. text "Dialog:", 44, 94 96 17 8, tab 8
  74. combo 48, 190 82 20 9, tab 8 size drop
  75. combo 47, 190 69 20 9, tab 8 size drop
  76. text "Telepathy:", 46, 164 70 28 8, tab 8
  77. text "Foreign:", 45, 164 84 25 8, tab 8
  78. box "Cut Colors:", 49, 80 112 145 37, tab 8
  79. combo 54, 190 135 20 9, tab 8 size drop
  80. combo 57, 116 122 20 9, tab 8 size drop
  81. combo 50, 190 122 20 9, tab 8 size drop
  82. combo 52, 116 135 20 9, tab 8 size drop
  83. text "Cont:", 53, 94 135 17 8, tab 8
  84. text "Next:", 51, 168 122 21 8, tab 8
  85. text "Begin:", 56, 92 123 17 8, tab 8
  86. text "End:", 55, 170 137 17 8, tab 8
  87. check "Auto-Color Posts", 60, 81 48 50 10, tab 8
  88. combo 59, 190 95 20 9, tab 8 size drop
  89. text "OOC:", 58, 164 96 25 8, tab 8
  90. text "Color options for this character. Turn auto-color on or off, or change the color scheme entirely.", 86, 103 21 97 24, tab 8 center
  91. tab "Notifications", 11
  92. box "Channels:", 61, 79 57 145 53, tab 11
  93. check "Enable", 67, 83 67 30 10, tab 11
  94. text "Delay in Seconds:", 68, 155 68 45 8, tab 11
  95. check "Inactive Channels Only", 70, 88 81 68 10, tab 11
  96. check "Except When mIRC is", 71, 88 91 92 10, tab 11
  97. text "Behind Other Windows", 72, 98 100 57 8, tab 11
  98. box "Queries:", 73, 79 112 145 53, tab 11
  99. text "Delay in Seconds:", 74, 155 122 45 8, tab 11
  100. edit 60, 75, 201 121 18 10, tab 11 limit 1 center
  101. check "Inactive Queries Only", 76, 88 135 68 10, tab 11
  102. check "Enable", 77, 83 121 30 10, tab 11
  103. check "Except When mIRC is", 78, 88 145 92 10, tab 11
  104. edit 60, 69, 201 67 18 10, tab 11 limit 1 center
  105. text "Behind Other Windows", 79, 98 154 57 8, tab 11
  106. text "Notifications alert you whenever somebody posts in your RP channels or queries. You can set how long you want the notification to remain on-screen with the Delay option, with appropriate ranges being between 1 - 60 seconds", 80, 91 20 121 35, tab 11 center
  107. check "Alert Beep", 81, 175 81 42 10, tab 11
  108. check "Alert Beep", 82, 174 135 42 10, tab 11
  109. tab "Details", 84
  110. edit "Full Name", 63, 149 49 76 10, tab 84 autohs
  111. edit "Info", 64, 149 63 76 82, tab 84 multi return autovs vsbar
  112. edit "Description", 65, 80 149 145 68, tab 84 multi return autovs vsbar
  113. icon 62, 80 49 63 87, $mircexe, 0, tab 84
  114. button "Set", 66, 131 125 13 12, tab 84
  115. link "Open Notes", 83, 81 139 30 8, tab 84
  116. text "Optional details about this character. You can send this information to a query or channel with a single click or command.", 12, 95 20 113 22, tab 84 center
  117. text "Select a character below and edit their respective properties to the right. The Standard profile acts as an editable template for your new characters.", 38, 7 7 65 40
  118. list 6, 4 49 69 160, size vsbar
  119. button "&Okay", 9, 193 223 37 12, default ok
  120. button "&Cancel", 2, 111 223 37 12, default cancel
  121. button "~", 10, 5 212 12 8
  122. }
  123.  
  124. dialog dlgOptions {
  125. ;; Script Options Dialog Table
  126. title "Voodoo² Options"
  127. size -1 -1 83 138
  128. option dbu
  129. button "&Okay", 1, 47 122 32 12, ok
  130. button "&Cancel", 2, 11 122 32 12, cancel
  131. box "Cut Length:", 4, 4 59 76 59
  132. edit "430", 17, 11 104 21 10, result %txtBufLen
  133. edit "400", 18, 53 104 21 10, result %txtCutLen
  134. text "Cut Length:", 19, 47 95 29 8
  135. text "Buffer Size:", 16, 7 95 29 8
  136. text "Do not change unless you are sure of what you are doing!", 15, 8 67 66 21
  137. box "Default Channel Profile:", 3, 4 4 76 26
  138. combo 5, 8 13 66 14, vsbar drop
  139. box "Default Query Profile:", 6, 4 31 76 26
  140. combo 7, 8 40 66 14, vsbar drop
  141. }
  142.  
  143. dialog dlgScratch {
  144. ;; Scratchpad/Note Dialog Table
  145. title "Scratchpad"
  146. size -1 -1 154 139
  147. option dbu
  148. edit "", 1, 0 0 154 138, multi return autovs vsbar
  149. }
  150.  
  151. on 1:dialog:dlgCharacter:init:0: {
  152. ;; INIT event handler for Add/Edit Char
  153. var %fpath = $qt($scriptdir $+ colorcombo.dll)
  154. var %curchan = %uchan $+ $network
  155. var %curquery = %uquery $+ $network
  156. ;; DLL turns combo into color select combo
  157. dll %fpath COMBO dlgCharacter 1
  158. dll %fpath COMBO dlgCharacter 47
  159. dll %fpath COMBO dlgCharacter 39
  160. dll %fpath COMBO dlgCharacter 48
  161. dll %fpath COMBO dlgCharacter 40
  162. dll %fpath COMBO dlgCharacter 59
  163. dll %fpath COMBO dlgCharacter 50
  164. dll %fpath COMBO dlgCharacter 52
  165. dll %fpath COMBO dlgCharacter 57
  166. dll %fpath COMBO dlgCharacter 54
  167.  
  168. var %tmp = $findfile($qt(%charpath),*.rpg,0,did -a dlgCharacter 6 $left($nopath($1-), $calc($len($nopath($1-)) - 4)))
  169. var %lstCount = $did(dlgCharacter, 6).lines
  170. var %i = 0
  171.  
  172. did -c dlgCharacter 6 1
  173. $iif(%uquery, %curchan = %curquery)
  174. if ($hget(%curchan, curProfile) != None) {
  175. while (%i <= %lstCount) {
  176. $iif($did(dlgCharacter, 6, %i).text == $hget(%curchan, curProfile), did -c dlgCharacter 6 %i)
  177. inc %i
  178. }
  179. }
  180. var %tblname = $qt(%charpath $+ $did(dlgCharacter, 6).seltext $+ .rpg)
  181. load_table %tblname
  182. }
  183.  
  184. on 1:dialog:dlgCharacter:sclick:6:{
  185. ;; Listbox Handler for Add/Rem Char
  186. if (%edited == 1) {
  187. var %charname = $hget(tbl_char, curProfile)
  188. if ($input(You have not saved. Would you like to save changes to %charname $+ ?,ywa, Save?)) {
  189. if (%charname) save_table %charname
  190. }
  191. }
  192. var %tblname = $qt(%charpath $+ $did(dlgCharacter, 6).seltext $+ .rpg)
  193. load_table %tblname
  194. }
  195.  
  196. on 1:dialog:dlgCharacter:sclick:83: {
  197. ;; Open Notes Link
  198. run notepad.exe $qt(%charpath $+ $hget(tbl_char, curProfile) $+ .txt)
  199. }
  200.  
  201. on 1:dialog:dlgCharacter:sclick:4:{
  202. ;; Add Character Sub
  203. if (%edited == 1) {
  204. var %charname = $did(dlgCharacter, 6).seltext
  205. if ($input(You have not saved. Would you like to save changes to %charname $+ ?,ywa, Save?)) {
  206. if (%charname) save_table %charname
  207. }
  208. }
  209. var %newchar = $input(Please enter the name of your new character,eog,Add New Character)
  210. var %tblname = $qt(%charpath $+ %newchar $+ .rpg)
  211. if (%newchar != $null) {
  212.  
  213. if ($isfile(%tblname)) {
  214. %tmp = $input(Error: A profile named %newchar already exists,o,Voodoo² - Error)
  215. }
  216. else {
  217. load_table $qt(%charpath $+ Standard.rpg)
  218. did -a dlgCharacter 6 %newchar
  219. save_table %newchar
  220. did -c dlgCharacter 6 $did(dlgCharacter, 6).lines
  221. }
  222.  
  223. }
  224. else {
  225. %tmp = $input(Error: You must enter a profile name.,o,Voodoo² - Error)
  226. }
  227. unset %edited
  228. }
  229.  
  230. on 1:dialog:dlgCharacter:sclick:66: {
  231. ;; Set Character Image Sub
  232. %tmpFile = $sfile($scriptdir $+ *.jpg, Select Character Image, Select)
  233. did -g dlgCharacter 62 $qt(%tmpFile)
  234. hadd tbl_char imgCharImage %tmpFile
  235. set %edited 1
  236. }
  237. on 1:dialog:dlgCharacter:sclick:10:{
  238. ;; Copy Character Sub
  239. if (%edited) {
  240. var %charname = $did(dlgCharacter, 6).seltext
  241. if ($input(You have not saved. Would you like to save changes to %charname $+ ?,ywa, Save?)) {
  242. if (%charname) save_table %charname
  243. }
  244. }
  245. var %newchar = $input(Please enter the name of the character to copy to:,eog,Copy Character)
  246. var %tblname = $qt(%charpath $+ %newchar $+ .rpg)
  247. if (%newchar != $null) {
  248.  
  249. if ($isfile(%tblname)) {
  250. %tmp = $input(Error: A profile named %newchar already exists,o,Voodoo² - Error)
  251. }
  252. else {
  253. did -a dlgCharacter 6 %newchar
  254. save_table %newchar
  255. did -c dlgCharacter 6 $did(dlgCharacter, 6).lines
  256. }
  257. }
  258. else {
  259. %tmp = $input(Error: You must enter a profile name.,o,Voodoo² - Error)
  260. }
  261. unset %edited
  262. }
  263.  
  264. on 1:dialog:dlgCharacter:edit:*: {
  265. ;; Edited? For Prompt to Save
  266. set %edited 1
  267. }
  268.  
  269. on 1:dialog:dlgCharacter:sclick:1,47,39,48,40,59,50,52,57,54,14,16,29,60,66,67,81,82,70,71,76,78,64,65: {
  270. ;; Edited? For Prompt to Save
  271. set %edited 1
  272. ;; Keep user from selecting clear/no color
  273. $iif($did(dlgCharacter, $did).sel == 1, did -c dlgCharacter $did 2)
  274. }
  275.  
  276. on 1:dialog:dlgCharacter:sclick:3: {
  277. ;; Save Button sub
  278. var %charname = $did(dlgCharacter, 6).seltext
  279. if (%charname) save_table %charname
  280. }
  281.  
  282. on 1:dialog:dlgCharacter:sclick:9:{
  283. ;; Okay Button sub
  284. dll -u colorcombo.dll
  285. if (%edited) {
  286. var %charname = $did(dlgCharacter, 6).seltext
  287. if ($input(You have not saved. Would you like to save changes to %charname $+ ?,ywa, Save?)) {
  288. if (%charname) save_table %charname
  289. }
  290. }
  291. }
  292.  
  293. on 1:dialog:dlgCharacter:close:0: {
  294. var %curchan = $active $+ $network
  295. ;; On Close, unset variables and unload DLL
  296. dll -u colorcombo.dll
  297. $iif($hget(tbl_char), hfree tbl_char)
  298. unset %uchan
  299. unset %uquery
  300. unset %edited
  301.  
  302. $iif($hget(%curchan, curProfile) != None && $active != Status Window, swchar 2 %charpath $+ $hget(%curchan, curProfile) $+ .rpg)
  303. }
  304.  
  305. on 1:dialog:dlgCharacter:sclick:5: {
  306. ;; Delete Profile sub
  307. var %iniPath = %charpath $+ colors\
  308. var %delchar = $did(dlgCharacter, 6).seltext
  309. var %delindex = $did(dlgCharacter, 6).sel
  310.  
  311. if (%delchar == Standard) {
  312. %tmp = $input(Error: You cannot delete the Standard profile template,o,Voodoo² - Error)
  313. }
  314. else {
  315. if ($input(Are you sure you wish to delete %delchar $+ ?,ywa, Delete?)) {
  316. did -d dlgCharacter 6 %delindex
  317. remove $qt(%charpath $+ %delchar $+ .rpg)
  318. remove $qt(%iniPath $+ %delchar $+ .clr)
  319. }
  320. }
  321. }
  322.  
  323. on 1:dialog:dlgOptions:init:0: {
  324. ;; INIT event handler for Options Dialog
  325. var %i = 0
  326. var %selprof = $readini($qt($scriptdir $+ chansettings.ini), Global, Default)
  327. var %selprofq = $readini($qt($scriptdir $+ chansettings.ini), Global, Query_Default)
  328. did -a dlgOptions 5 None
  329. did -a dlgOptions 7 None
  330. var %newtmp = $findfile($qt(%charpath),*.rpg,0,did -a dlgOptions 5 $left($nopath($1-), $calc($len($nopath($1-)) - 4)))
  331. var %newtmpq = $findfile($qt(%charpath),*.rpg,0,did -a dlgOptions 7 $left($nopath($1-), $calc($len($nopath($1-)) - 4)))
  332. var %lstCount = $did(dlgOptions, 5).lines
  333. did -o dlgOptions 17 1 %txtBufLen
  334. did -o dlgOptions 18 1 %txtCutLen
  335. did -c dlgOptions 5 1
  336. did -c dlgOptions 7 1
  337. if (%selprof) {
  338. while (%i <= %lstCount) {
  339. $iif($did(dlgOptions, 5, %i).text == %selprof, did -c dlgOptions 5 %i)
  340. inc %i
  341. }
  342. %i = 0
  343. }
  344. if (%selprofq) {
  345. while (%i <= %lstCount) {
  346. $iif($did(dlgOptions, 7, %i).text == %selprofq, did -c dlgOptions 7 %i)
  347. inc %i
  348. }
  349. %i = 0
  350. }
  351. }
  352.  
  353. on 1:dialog:dlgOptions:sclick:1: {
  354. ;; Options Dialog Okay Button sub
  355. writeini $qt($scriptdir $+ chansettings.ini) Global Default $did(dlgOptions, 5)
  356. writeini $qt($scriptdir $+ chansettings.ini) Global Query_Default $did(dlgOptions, 7)
  357. }
  358.  
  359. on 1:dialog:sc_*:close:0: {
  360. ;; Close events for scratchpad sc_curprofile
  361. var %i = 2
  362. tokenize $asc(_) $dname
  363. var %sfile = $qt(%charpath $+ $2 $+ .txt)
  364.  
  365. $iif($did(1).lines == 0, remove %sfile)
  366.  
  367. write -ca1 %sfile $did(1, 1).text
  368. while %i <= $did(1).lines {
  369. write -a%i %sfile $did(1, %i).text
  370. inc %i
  371. }
  372. }
  373.  
  374. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  375. ;; ;;
  376. ;; Pop-up Menus & Routines ;;
  377. ;; ;;
  378. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  379.  
  380. menu channel {
  381. ;; Create context menu
  382. -
  383. Voodoo²
  384. .Open Grimoire...:set %uchan $chan | dialog -m dlgCharacter dlgCharacter
  385. .$submenu($mnuedit($1))
  386. .Command List: vhelp
  387. .-
  388. .Notes
  389. ..$submenu($notelist($1))
  390. .-
  391. .$submenu($filelist($1))
  392. .-
  393. .Script Options...:/dialog -m dlgOptions dlgOptions
  394. }
  395.  
  396. menu query {
  397. ;; Create context menu
  398. -
  399. Voodoo²
  400. .Open Grimoire...:set %uquery $query($active) | dialog -m dlgCharacter dlgCharacter
  401. .$submenu($mnuedit($1))
  402. .Command List: vhelp
  403. .Send Character Picture:sendpic $query($active)
  404. .-
  405. .Notes
  406. ..$submenu($notelist($1))
  407. .-
  408. .$submenu($filelist($1))
  409. .-
  410. .Script Options...:/dialog -m dlgOptions dlgOptions
  411. }
  412.  
  413. alias -l mnuedit {
  414. if ($1 == 1) {
  415. if ($isfile($qt($scriptdir $+ fat mouth v2.exe))) {
  416. RETURN Advanced Editor... :ae
  417. }
  418. else {
  419. RETURN $!style(2) Advanced Editor... :ae
  420. }
  421. }
  422. }
  423.  
  424. alias -l notelist {
  425. ;; List Created Notes $submenu
  426. if ($1) {
  427. var %tfNames = $findfile($qt(%charpath),*.txt,$1)
  428. var %nNames = $left($nopath(%tfNames), $calc($len($nopath(%tfNames)) - 4))
  429.  
  430. RETURN %nNames :note %nNames
  431. }
  432. }
  433.  
  434. alias -l filelist {
  435. ;; Switch Profiles $submenu
  436. var %curchan = $chan $+ $network
  437. var %curquery = $query($active) $+ $network
  438.  
  439. $iif($query($active),%curchan = %curquery)
  440.  
  441. if (!$hget(%curchan)) {
  442. hmake %curchan 10
  443. hadd %curchan curProfile None
  444. titlebar Voodoo²: Active Profile - $+ $chr(32) $+ $hget(%curchan, curProfile)
  445. }
  446. if (!$hget(%curChan, curProfile)) { hadd %curchan curProfile None }
  447. if ($1 == begin) {
  448. if ($hget(%curChan, curProfile) == None) {
  449. RETURN $!style(1) None/Disabled :swnone %curchan
  450. }
  451. else {
  452. RETURN None/Disabled :swnone %curchan
  453. }
  454. }
  455. if ($1) {
  456. var %fNames = $findfile($qt(%charpath),*.rpg,$1)
  457. var %CNames = $left($nopath(%fNames), $calc($len($nopath(%fNames)) - 4))
  458.  
  459. if (%CNames == $hget(%curchan, curProfile)) {
  460. RETURN $!style(1) %CNames :swchar 1 %fNames
  461. }
  462. else {
  463. RETURN %CNames :swchar 1 %fNames
  464. }
  465. }
  466. if ($1 == end) { RETURN - }
  467. }
  468.  
  469. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  470. ;; ;;
  471. ;; Script Events ;;
  472. ;; ;;
  473. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  474.  
  475.  
  476. on 1:LOAD: {
  477. ;;First Time Run Handler
  478. set %charpath $scriptdir $+ chars\
  479. var %iniPath = %charpath $+ colors\
  480. echo 14Voodoo05²1: 15Performing first-time initialization...
  481. set %txtCutLen 370
  482. set %txtBufLen 400
  483. $iif($hget(tbl_char), hfree tbl_char)
  484.  
  485. ;; Create Default.rpg profile
  486. hmake -s tbl_char 10
  487. hadd -s tbl_char UsePnick 0
  488. hadd -s tbl_char txtPnick <Nickname>
  489. hadd -s tbl_char UseCut 1
  490. hadd -s tbl_char UseColor 1
  491. hadd -s tbl_char useCNotification 1
  492. hadd -s tbl_char useCBeep 1
  493. hadd -s tbl_char nfyChanActive 1
  494. hadd -s tbl_char nfyCAppActive 1
  495. hadd -s tbl_char txtCDelay 60
  496. hadd -s tbl_char useQNotification 1
  497. hadd -s tbl_char useQBeep 1
  498. hadd -s tbl_char nfyQueryActive 1
  499. hadd -s tbl_char nfyQAppActive 1
  500. hadd -s tbl_char txtQDelay 60
  501. hadd -s tbl_char txtBegin --
  502. hadd -s tbl_char txtContinue --
  503. hadd -s tbl_char txtDone
  504. hadd -s tbl_char txtNext --
  505. hadd -s tbl_char txtDialog $chr(34)
  506. hadd -s tbl_char txtTelepathy ~
  507. hadd -s tbl_char txtForeign *
  508. hadd -s tbl_char txtOOCLeft ((
  509. hadd -s tbl_char txtOOCRight ))
  510. hadd -s tbl_char txtFullName Full Name
  511. hadd -s tbl_char txtInfo Info
  512. hadd -s tbl_char txtDescription Description
  513. hadd -s tbl_char imgCharImage $scriptdir $+ empty_profile.jpg
  514. hadd -s tbl_char colDefault 6
  515. hadd -s tbl_char colAction 6
  516. hadd -s tbl_char colDialog 1
  517. hadd -s tbl_char colTelepathy 14
  518. hadd -s tbl_char colForeign 2
  519. hadd -s tbl_char colOOC 1
  520. hadd -s tbl_char colNext 6
  521. hadd -s tbl_char colBegin 6
  522. hadd -s tbl_char colContinue 6
  523. hadd -s tbl_char colDone 6
  524. hadd -s tbl_char curProfile Standard
  525. $iif(!$isdir($qt(%charpath)), mkdir $qt(%charpath))
  526. $iif(!$isdir($qt(%iniPath)), mkdir $qt(%iniPath))
  527. hsave -sbo tbl_char $qt(%charpath $+ Standard.rpg)
  528. hfree tbl_char
  529.  
  530. ;; Reset chansettings cache if exists
  531. $iif($isfile($qt($scriptdir $+ chansettings.ini)), remove $qt($scriptdir $+ chansettings.ini))
  532. writeini $qt($scriptdir $+ chansettings.ini) Global Default None
  533. writeini $qt($scriptdir $+ chansettings.ini) Global Query_Default None
  534. dialog -m dlgCharacter dlgCharacter
  535. }
  536.  
  537. on 1:START: {
  538. ;; Set Global Variables
  539. set %charpath $scriptdir $+ chars\
  540. echo 14Voodoo05²1: 15Loaded.
  541. }
  542.  
  543. on *:TEXT:*:*: {
  544. ;; New Post Notication on TEXT
  545. var %curchan = $chan $+ $network
  546. var %curquery = $query($active) $+ $network
  547. var %hwndCur = $chan
  548. var %useNotice = $hget(%curchan, useCNotification)
  549. var %nfyActive = $hget(%curchan, nfyChanActive)
  550. var %nfyAppActive = $hget(%curchan, nfyCAppActive)
  551. var %useBeep = $hget(%curchan, useCBeep)
  552. var %cMsg = $nick has posted in $+ $chr(32) $+ $chan $+ .
  553.  
  554. if ($chan) || ($query($active)) {
  555. ;; IF channel or query else do nothing
  556. if ($query($active)) {
  557. ;; Switch Variables if Query
  558. %curchan = %curquery
  559. %hwndCur = $query($active)
  560. %useNotice = $hget(%curchan, useQNotification)
  561. %nfyActive = $hget(%curchan, nfyQueryActive)
  562. %nfyAppActive = $hget(%curchan, nfyQAppActive)
  563. %useBeep = $hget(%curchan, useQBeep)
  564. %cMSG = $nick has posted.
  565. }
  566.  
  567. if ($hget(%curchan, curProfile) != None) {
  568. ;; IF Profile is active
  569. if (%useNotice == 1) {
  570. if (%nfyActive == 1 && %hwndCur != $active) {
  571. $iif(!$tip(%hwndCur), %tmp = $tip(%hwndCur,New Post!,%cMsg,60))
  572. $iif(%useBeep == 1,beep 2)
  573. halt
  574. }
  575. if (%nfyAppActive == 1 && !$appactive) {
  576. $iif(!$tip(%hwndCur), %tmp = $tip(%hwndCur,New Post!,%cMsg,60))
  577. $iif(%useBeep == 1,beep 2)
  578. halt
  579. }
  580. if ($active != %hwndCur) {
  581. $iif(!$tip(%hwndCur), %tmp = $tip(%hwndCur,New Post!,%cMsg,60))
  582. $iif(%useBeep == 1,beep 2)
  583. }
  584. }
  585. }
  586. }
  587. }
  588.  
  589. on *:ACTION:*:*: {
  590.  
  591. var %curchan = $chan $+ $network
  592. var %curquery = $query($active) $+ $network
  593. var %hwndCur = $chan
  594. var %useNotice = $hget(%curchan, useCNotification)
  595. var %nfyActive = $hget(%curchan, nfyChanActive)
  596. var %nfyAppActive = $hget(%curchan, nfyCAppActive)
  597. var %useBeep = $hget(%curchan, useCBeep)
  598. var %cMsg = $nick has posted in $+ $chr(32) $+ $chan $+ .
  599.  
  600. if ($chan) || ($query($active)) {
  601.  
  602. if ($query($active)) {
  603. ;; Switch Variables if Query
  604. %curchan = %curquery
  605. %hwndCur = $query($active)
  606. %useNotice = $hget(%curchan, useQNotification)
  607. %nfyActive = $hget(%curchan, nfyQueryActive)
  608. %nfyAppActive = $hget(%curchan, nfyQAppActive)
  609. %useBeep = $hget(%curchan, useQBeep)
  610. %cMSG = $nick has posted.
  611. }
  612.  
  613. if ($hget(%curchan, curProfile) != None) {
  614. if (%useNotice == 1) {
  615. if (%nfyActive == 1 && %hwndCur != $active) {
  616.  
  617. $iif(!$tip(%hwndCur), %tmp = $tip(%hwndCur,New Post!,%cMsg,60))
  618. $iif(%useBeep == 1,beep 2)
  619. halt
  620. }
  621. if (%nfyAppActive == 1 && !$appactive) {
  622.  
  623. $iif(!$tip(%hwndCur), %tmp = $tip(%hwndCur,New Post!,%cMsg,60))
  624. $iif(%useBeep == 1,beep 2)
  625. halt
  626. }
  627. if ($active != %hwndCur) {
  628. $iif(!$tip(%hwndCur), %tmp = $tip(%hwndCur,New Post!,%cMsg,60))
  629. $iif(%useBeep == 1,beep 2)
  630. }
  631. }
  632. }
  633. }
  634. }
  635.  
  636. on *:INPUT:*: {
  637. ;; Handles INPUT to be passed to $saytext for cut and color
  638. var %curchan = $chan $+ $network
  639. var %curquery = $query($active) $+ $network
  640.  
  641. if ($chan) || ($query($active)) {
  642. $iif($query($active), %curchan = %curquery)
  643.  
  644. if (!$hget(%curchan)) {
  645. ;; Intentional redundancy, makes sure hash is proper
  646. hmake %curchan 10
  647. hadd %curchan curProfile None
  648. titlebar Voodoo²: Active Profile - $+ $chr(32) $+ $hget(%curchan, curProfile)
  649. }
  650. if ($hget(%curchan, curProfile) != None) {
  651. ;; Checks last access time on profile and refreshes if necessary
  652. var %curprofile = $hget(%curchan, curProfile)
  653. var %tblname = $qt(%charpath $+ %curprofile $+ .rpg)
  654. if ($hget(%curchan, dateMod) != $file(%tblname).mtime) {
  655. swchar 2 %tblname
  656. }
  657. if ( ( $left($1,1) != / && $left($1,1) != ! && $left($1,1) != ` ) || ( $1 == /me ) ) {
  658. ;; IF not a slash or ! command besides /me
  659. if ($pos($1-, $chr(92)) && $len($1-) > 370) {
  660. ;; Process paragraph breaks. Single-line solution elegance
  661. tokenize 92 $1- | saytext $* | halt
  662. }
  663. else {
  664. saytext $1-
  665. halt
  666. }
  667. }
  668. }
  669. }
  670. }
  671.  
  672. on *:ACTIVE:*: {
  673. ;; Handles channel and query hash creation and titlebar updates
  674. var %curquery = $query($active) $+ $network
  675. var %dSetting = Query_Default
  676.  
  677. if ($chan) || ($query($active)) {
  678. if ($chan) {
  679. %curquery = $chan $+ $network
  680. %dSetting = Default
  681. }
  682. var %pProfile = $readini($qt($scriptdir $+ chansettings.ini), %curquery, profile)
  683. if (!$hget(%curquery)) {
  684.  
  685. hmake %curquery 10
  686. if (%pProfile) {
  687. var %tblname = $qt(%charpath $+ %pProfile $+ .rpg)
  688. hload -b %curquery %tblname
  689. hadd %curquery dateMod $file(%tblname).mtime
  690. hadd %curquery curProfile %pProfile
  691. }
  692. else {
  693. var %uProfile = $readini($qt($scriptdir $+ chansettings.ini), Global, %dSetting)
  694. var %tblname = $qt(%charpath $+ %uProfile $+ .rpg)
  695. if (%uProfile == None) {
  696. hadd %curquery curProfile None
  697. }
  698. else {
  699. hload -b %curquery %tblname
  700. hadd %curquery curProfile %uProfile
  701. hadd %curquery dateMod $file(%tblname).mtime
  702. }
  703. }
  704. }
  705. $iif($hget(%curchan), titlebar Voodoo²: Active Profile - $+ $chr(32) $+ $hget(%curchan, curProfile), titlebar Voodoo²: Active Profile - None)
  706. $iif($hget(%curquery), titlebar Voodoo²: Active Profile - $+ $chr(32) $+ $hget(%curquery, curProfile), titlebar Voodoo²: Active Profile - None)
  707. }
  708. }
  709.  
  710. CTCP *:Version:*:{
  711. ;; Add script name to mIRC version reply
  712. ctcpreply $nick VERSION 05 $+ $me $+ 14 is using 14Voodoo05² 14Role Player's 05Script14 for mIRC 7+
  713. }
  714.  
  715. on *:CLOSE:*: {
  716. ;; Close channels and queries cleanly
  717. var %curchan = $chan $+ $network
  718. var %curchan = $right($chan, $calc($len($chan) - 1))
  719.  
  720. $iif($hget(%curquery), hfree %curquery)
  721. $iif($hget(%curchan), hfree %curchan)
  722. }
  723.  
  724. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  725. ;; ;;
  726. ;; Script Subroutines ;;
  727. ;; ;;
  728. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  729.  
  730.  
  731. alias -l load_table {
  732. ;; Load Profile Values into dlgCharacter
  733. $iif($hget(tbl_char), hfree tbl_char)
  734. hmake tbl_char 10
  735. hload -b tbl_char $1-
  736.  
  737. ;; COMBO Color Boxes
  738. var %colDefault = $hget(tbl_char, colDefault)
  739. var %colAction = $hget(tbl_char, colAction)
  740. var %colDialog = $hget(tbl_char, colDialog)
  741. var %colTelepathy = $hget(tbl_char, colTelepathy)
  742. var %colForeign = $hget(tbl_char, colForeign)
  743. var %colOOC = $hget(tbl_char, colOOC)
  744. var %colNext = $hget(tbl_char, colNext)
  745. var %colBegin = $hget(tbl_char, colBegin)
  746. var %colContinue = $hget(tbl_char, colContinue)
  747. var %colDone = $hget(tbl_char, colDone)
  748.  
  749. did -c dlgCharacter 1 $calc(%colDefault + 2)
  750. did -c dlgCharacter 47 $calc(%colTelepathy + 2)
  751. did -c dlgCharacter 39 $calc(%colAction + 2)
  752. did -c dlgCharacter 48 $calc(%colForeign + 2)
  753. did -c dlgCharacter 40 $calc(%colDialog + 2)
  754. did -c dlgCharacter 59 $calc(%colOOC + 2)
  755. did -c dlgCharacter 50 $calc(%colNext + 2)
  756. did -c dlgCharacter 52 $calc(%colContinue + 2)
  757. did -c dlgCharacter 57 $calc(%colBegin + 2)
  758. did -c dlgCharacter 54 $calc(%colDone + 2)
  759.  
  760. ;; EDIT boxes
  761. did -o dlgCharacter 16 1 $hget(tbl_char, txtPnick)
  762. did -o dlgCharacter 20 1 $hget(tbl_char, txtTelepathy)
  763. did -o dlgCharacter 21 1 $hget(tbl_char, txtForeign)
  764. did -o dlgCharacter 22 1 $hget(tbl_char, txtDialog)
  765. did -o dlgCharacter 26 1 $hget(tbl_char, txtOOCLeft)
  766. did -o dlgCharacter 27 1 $hget(tbl_char, txtOOCRight)
  767. did -o dlgCharacter 30 1 $hget(tbl_char, txtNext)
  768. did -o dlgCharacter 32 1 $hget(tbl_char, txtBegin)
  769. did -o dlgCharacter 34 1 $hget(tbl_char, txtContinue)
  770. did -o dlgCharacter 36 1 $hget(tbl_char, txtDone)
  771. did -o dlgCharacter 69 1 $hget(tbl_char, txtCDelay)
  772. did -o dlgCharacter 75 1 $hget(tbl_char, txtQDelay)
  773. did -r dlgCharacter 63,64,65
  774. did -a dlgCharacter 63 $hget(tbl_char, txtFullName)
  775. did -a dlgCharacter 64 $hget(tbl_char, txtInfo)
  776. did -a dlgCharacter 65 $hget(tbl_char, txtDescription)
  777.  
  778. ;; CHECK Boxes
  779. $iif($hget(tbl_char, UsePNick) == 1, /did -c dlgCharacter 14, /did -u dlgCharacter 14)
  780. $iif($hget(tbl_char, UseCut) == 1, /did -c dlgCharacter 29, /did -u dlgCharacter 29)
  781. $iif($hget(tbl_char, UseColor) == 1, /did -c dlgCharacter 60, /did -u dlgCharacter 60)
  782. $iif($hget(tbl_char, useCNotification) == 1, /did -c dlgCharacter 67, /did -u dlgCharacter 67)
  783. $iif($hget(tbl_char, useQNotification) == 1, /did -c dlgCharacter 77, /did -u dlgCharacter 77)
  784. $iif($hget(tbl_char, useCBeep) == 1, /did -c dlgCharacter 81, /did -u dlgCharacter 81)
  785. $iif($hget(tbl_char, useQBeep) == 1, /did -c dlgCharacter 82, /did -u dlgCharacter 82)
  786. $iif($hget(tbl_char, nfyChanActive) == 1, /did -c dlgCharacter 70, /did -u dlgCharacter 70)
  787. $iif($hget(tbl_char, nfyQueryActive) == 1, /did -c dlgCharacter 76, /did -u dlgCharacter 76)
  788. $iif($hget(tbl_char, nfyCAppActive) == 1, /did -c dlgCharacter 71, /did -u dlgCharacter 71)
  789. $iif($hget(tbl_char, nfyQAppActive) == 1, /did -c dlgCharacter 78, /did -u dlgCharacter 78)
  790. $iif($hget(tbl_char, imgCharImage), did -g dlgCharacter 62 $qt($hget(tbl_char, imgCharImage)))
  791. unset %edited
  792. }
  793.  
  794. alias -l save_table {
  795. ;; Save Dialog Values to Profile
  796. $iif($hget(tbl_char), hfree tbl_char)
  797. hmake tbl_char 10
  798.  
  799. var %iniPath = %charpath $+ colors\
  800. var %iniFile = $qt(%iniPath $+ $1- $+ .clr)
  801. var %colDefault = $did(dlgCharacter, 1).sel
  802. var %colAction = $did(dlgCharacter, 39).sel
  803. var %colDialog = $did(dlgCharacter, 40).sel
  804. var %colTelepathy = $did(dlgCharacter, 47).sel
  805. var %colForeign = $did(dlgCharacter, 48).sel
  806. var %colOOC = $did(dlgCharacter, 59).sel
  807. var %colNext = $did(dlgCharacter, 50).sel
  808. var %colBegin = $did(dlgCharacter, 57).sel
  809. var %colContinue = $did(dlgCharacter, 52).sel
  810. var %colDone = $did(dlgCharacter, 54).sel
  811. var %bufInfo = $null
  812. var %bufDesc = $null
  813. var %i = 1
  814. var %n = 1
  815.  
  816. $iif(!$isdir($qt(%charpath)), mkdir $qt(%charpath))
  817. $iif(!$isdir($qt(%iniPath)), mkdir $qt(%iniPath))
  818. hadd tbl_char curProfile $1-
  819. hadd tbl_char UsePnick $did(dlgCharacter, 14).state
  820. hadd tbl_char txtPnick $did(dlgCharacter, 16).text
  821. hadd tbl_char UseCut $did(dlgCharacter, 29).state
  822. hadd tbl_char UseColor $did(dlgCharacter, 60).state
  823. hadd tbl_char useCNotification $did(dlgCharacter, 67).state
  824. hadd tbl_char useQNotification $did(dlgCharacter, 77).state
  825. hadd tbl_char useCBeep $did(dlgCharacter, 81).state
  826. hadd tbl_char useQBeep $did(dlgCharacter, 82).state
  827. hadd tbl_char nfyChanActive $did(dlgCharacter, 70).state
  828. hadd tbl_char nfyQueryActive $did(dlgCharacter, 76).state
  829. hadd tbl_char nfyCAppActive $did(dlgCharacter, 71).state
  830. hadd tbl_char nfyQAppActive $did(dlgCharacter, 78).state
  831. hadd tbl_char txtBegin $did(dlgCharacter, 32).text
  832. hadd tbl_char txtContinue $did(dlgCharacter, 34).text
  833. hadd tbl_char txtDone $did(dlgCharacter, 36).text
  834. hadd tbl_char txtNext $did(dlgCharacter, 30).text
  835. hadd tbl_char txtDialog $did(dlgCharacter, 22).text
  836. hadd tbl_char txtTelepathy $did(dlgCharacter, 20).text
  837. hadd tbl_char txtForeign $did(dlgCharacter, 21).text
  838. hadd tbl_char txtOOCLeft $did(dlgCharacter, 26).text
  839. hadd tbl_char txtOOCRight $did(dlgCharacter, 27).text
  840. hadd tbl_char txtCDelay $did(dlgCharacter, 69).text
  841. hadd tbl_char txtQDelay $did(dlgCharacter, 75).text
  842.  
  843. %bufInfo = $didtok(dlgCharacter, 64, 10)
  844. %bufDesc = $didtok(dlgCharacter, 65, 10)
  845.  
  846. hadd tbl_char txtFullName $did(dlgCharacter, 63).text
  847. hadd tbl_char txtInfo %bufInfo
  848. hadd tbl_char txtDescription %bufDesc
  849. hadd tbl_char imgCharImage $did(dlgCharacter, 62)
  850. hadd tbl_char colDefault $calc(%colDefault - 2)
  851. hadd tbl_char colAction $calc(%colAction - 2)
  852. hadd tbl_char colDialog $calc(%colDialog - 2)
  853. hadd tbl_char colTelepathy $calc(%colTelepathy - 2)
  854. hadd tbl_char colForeign $calc(%colForeign - 2)
  855. hadd tbl_char colOOC $calc(%colOOC - 2)
  856. hadd tbl_char colNext $calc(%colNext - 2)
  857. hadd tbl_char colBegin $calc(%colBegin - 2)
  858. hadd tbl_char colContinue $calc(%colContinue - 2)
  859. hadd tbl_char colDone $calc(%colDone - 2)
  860.  
  861.  
  862. ;; Create color file for advanced editor
  863. writeini %iniFile Palette 00 $color(0)
  864. writeini %iniFile Palette 01 $color(1)
  865. writeini %iniFile Palette 02 $color(2)
  866. writeini %iniFile Palette 03 $color(3)
  867. writeini %iniFile Palette 04 $color(4)
  868. writeini %iniFile Palette 05 $color(05)
  869. writeini %iniFile Palette 06 $color(06)
  870. writeini %iniFile Palette 07 $color(07)
  871. writeini %iniFile Palette 08 $color(08)
  872. writeini %iniFile Palette 09 $color(09)
  873. writeini %iniFile Palette 10 $color(10)
  874. writeini %iniFile Palette 11 $color(11)
  875. writeini %iniFile Palette 12 $color(12)
  876. writeini %iniFile Palette 13 $color(13)
  877. writeini %iniFile Palette 14 $color(14)
  878. writeini %iniFile Palette 15 $color(15)
  879.  
  880. writeini %iniFile Colors colDefault $calc(%colDefault - 2)
  881. writeini %iniFile Colors colAction $calc(%colAction - 2)
  882. writeini %iniFile Colors colDialog $calc(%colDialog - 2)
  883. writeini %iniFile Colors colTelepathy $calc(%colTelepathy - 2)
  884. writeini %iniFile Colors colForeign $calc(%colForeign - 2)
  885. writeini %iniFile Colors colOOC $calc(%colOOC - 2)
  886. writeini %iniFile Colors colNext $calc(%colNext - 2)
  887. writeini %iniFile Colors colBegin $calc(%colBegin - 2)
  888. writeini %iniFile Colors colContinue $calc(%colContinue - 2)
  889. writeini %iniFile Colors colDone $calc(%colDone - 2)
  890. writeini %iniFile Brackets txtBegin $qt($did(dlgCharacter, 32).text)
  891. writeini %iniFile Brackets txtContinue $qt($did(dlgCharacter, 34).text)
  892. writeini %iniFile Brackets txtDone $qt($did(dlgCharacter, 36).text)
  893. writeini %iniFile Brackets txtNext $qt($did(dlgCharacter, 30).text)
  894. writeini %inifile Chars txtDialog $qt($did(dlgCharacter, 22).text)
  895. writeini %inifile Chars txtForeign $qt($did(dlgCharacter, 21).text)
  896. writeini %inifile Chars txtTelepathy $qt($did(dlgCharacter, 20).text)
  897. hsave -sbo tbl_char $qt(%charpath $+ $1- $+ .rpg)
  898. unset %edited
  899. }
  900.  
  901. alias -l swchar {
  902. ;; Profile Navigation Handler
  903. var %curchan = $active $+ $network
  904. var %CNames = $left($nopath($2-), $calc($len($nopath($2-)) - 4))
  905. var %curquery = $query($active) $+ $network
  906.  
  907. $iif($query($active), %curchan = %curquery)
  908. $iif($hget(%curchan), hfree %curchan)
  909. hmake %curchan 10
  910. hload -b %curchan $qt($2-)
  911. hadd %curchan dateMod $file($qt($2-)).mtime
  912. hadd %curchan curProfile %CNames
  913. writeini $qt($scriptdir $+ chansettings.ini) %curchan profile %CNames
  914. $iif($1 == 1, echo 14Voodoo05²1: 15Changed active profile to 05 $+ %CNames)
  915. titlebar Voodoo²: Active Profile - $+ $chr(32) $+ $hget(%curchan, curProfile)
  916. ;; Too Noisy: $iif($1 == 2, echo 14Voodoo05²1: 15Refreshed %CNames)
  917. }
  918.  
  919. alias -l swnone {
  920. ;; Update titlebar and hash for No Profile
  921. hadd $1- curProfile None
  922. titlebar Voodoo²: Active Profile - None)
  923. }
  924.  
  925. alias -l saytext {
  926. ;; Main Cut-Color loop as called by INPUT event
  927. if ( ( $left($1,1) != / && $left($1,1) != ! && $left($1,1) != ` ) || ( $1 == /me ) ) {
  928.  
  929. var %curchan = $chan $+ $network
  930. var %curquery = $query($active) $+ $network
  931.  
  932. $iif($query($active), %curchan = %curquery)
  933. var %re = (^\x03\d{1,2}$)
  934. var %txtBuffer = $1-
  935. var %colDefault = 
  936. var %colAction = 
  937. var %pnick = $null
  938. var %colNext = $null
  939. var %colDone = $null
  940. var %colCont = $null
  941. var %colBegin = $null
  942.  
  943. var %txtNext = $hget(%curchan, txtNext)
  944. var %txtCont = $hget(%curchan, txtContinue)
  945. var %txtDone = $hget(%curchan, txtDone))
  946. var %txtBegin = $hget(%curchan, txtBegin))
  947.  
  948. if ($hget(%curchan, useColor) == 1) {
  949. ;; Color loop? Replace $NULL values from above
  950. %colDefault = $hget(%curchan, colDefault)
  951. %colAction = $hget(%curchan, colAction)
  952. %colNext = $hget(%curchan, colNext)
  953. %colCont = $hget(%curchan, colContinue)
  954. %colDone = $hget(%curchan, colDone)
  955. %colBegin = $hget(%curchan, colBegin)
  956.  
  957. $iif(%colDefault < 10, %colDefault = $chr(3) $+ $chr(48) $+ %colDefault, %colDefault = $chr(3) $+ %colDefault)
  958. $iif(%colAction < 10, %colAction = $chr(3) $+ $chr(48) $+ %colAction, %colAction = $chr(3) $+ %colAction)
  959. $iif(%colNext < 10, %colNext = $chr(3) $+ $chr(48) $+ %colNext, %colNext = $chr(3) $+ %colNext)
  960. $iif(%colCont < 10, %colCont = $chr(3) $+ $chr(48) $+ %colCont, %colCont = $chr(3) $+ %colCont)
  961. $iif(%colDone < 10, %colDone = $chr(3) $+ $chr(48) $+ %colDone, %colDone = $chr(3) $+ %colDone)
  962. $iif(%colBegin < 10, %colBegin = $chr(3) $+ $chr(48) $+ %colBegin, %colBegin = $chr(3) $+ %colBegin)
  963.  
  964. $iif($len($hget(%curchan, txtNext)), %txtNext = %colNext $+ $hget(%curchan, txtNext))
  965. $iif($len($hget(%curchan, txtContinue)), %txtCont = %colCont $+ $hget(%curchan, txtContinue))
  966. $iif($len($hget(%curchan, txtDone)), %txtDone = %colDone $+ $hget(%curchan, txtDone))
  967. $iif($len($hget(%curchan, txtBegin)), %txtBegin = %colBegin $+ $hget(%curchan, txtBegin))
  968. }
  969. ;; PNICK?
  970. $iif($hget(%curchan, usePNick) == 1, %pnick = $hget(%curchan, txtPNick))
  971.  
  972. if ($gettok($1-, 1, 32) == /me) {
  973. ;; IF /me set ACTION color
  974. %txtBuffer = $right(%txtBuffer,-4)
  975. %txtBuffer = %colAction $+ %txtBuffer
  976. }
  977. else {
  978. ;; Otherwise set DEFAULT color
  979. %txtBuffer = %colDefault $+ %txtBuffer
  980. }
  981. if ($hget(%curchan, UseColor) == 1) {
  982. ;; Colorize dialog, telepathy and foreign...
  983. %colored = $colorquotes(%curchan, %txtBuffer )
  984. %colored = $colortele(%curchan, %colored)
  985. %colored = $colorfor(%curchan, %colored)
  986. }
  987. else {
  988. ;; ...or just pass on text
  989. %colored = %txtBuffer
  990. }
  991. ;; Lastly, assign PNICK text
  992. %colored = %pnick $+ $chr(32) $+ %colored
  993. if ($hget(%curchan, UseCut) == 1) {
  994. ;; CUT on? Main cut loop
  995. var %txtNewBuflen = $len(%colored)
  996. if (%txtNewBuflen > 400) {
  997. ;; Big enough to cut?
  998. var %pos = 1
  999. var %txtNewBuf = $mid(%colored, %pos, %txtBufLen)
  1000. var %firsttime = 1
  1001. var %txtLastColor = $null
  1002. var %txtNextcolor = $null
  1003.  
  1004. while ( %txtNewBuf != $null ) {
  1005. ;; Do until END OF POST
  1006. if ( $len($deltok(%txtNewBuf, -1, 32)) < %txtCutLen ) {
  1007. var %txtNewBuf = $left(%txtNewBuf, %txtCutLen)
  1008. inc %pos %txtCutLen
  1009. }
  1010. else {
  1011. var %txtNewBuf = $deltok(%txtNewBuf,-1,32)
  1012. inc %pos $len(%txtNewBuf)
  1013. inc %pos
  1014. }
  1015. var %txtResult = %txtNewBuf
  1016. var %txtNewBuf = $mid(%colored, %pos, %txtBufLen)
  1017. if (%firsttime == 1) {
  1018. ;; Get last active color and prepend
  1019. var %txtLastColor = $get_end_cc(%txtResult)
  1020. if ($gettok($1-, 1, 32) == /me) {
  1021. ;; IF ACTION then /ME with %colAction
  1022. if ( $len(%colored) <= %txtCutLen) {
  1023. action %txtResult %txtDone
  1024. }
  1025. else {
  1026. action %txtResult %txtNext
  1027. }
  1028. if (%txtLastColor == $null) {
  1029. %txtLastColor = %colDefault
  1030. }
  1031. }
  1032. else {
  1033. ;; otherwise use /SAY
  1034. say %txtBegin %txtResult %txtNext
  1035. if (%txtLastColor == $null) {
  1036. var %txtLastColor = %colDefault
  1037. }
  1038. }
  1039. var %firsttime = 0
  1040. }
  1041. else {
  1042. var %txtColNewest = $chr(3) $+ %txtLastColor
  1043. if (%txtNewBuf != $null) {
  1044. say %txtCont $+ %txtColNewest %txtResult %txtNext
  1045. }
  1046. else {
  1047. if (%txtNewBuflen <= 945) {
  1048.  
  1049. if (!$regex(%txtResult,%re)) {
  1050. say %txtCont $+ %txtColNewest %txtResult %txtDone
  1051. }
  1052. }
  1053. else {
  1054. if (!$regex(%txtResult,%re)) {
  1055. say %txtCont $+ %txtColNewest %txtResult %txtDone
  1056. }
  1057. }
  1058. }
  1059. %txtNextcolor = $get_end_cc(%txtResult)
  1060. if (%txtNextcolor != $null) {
  1061. var %txtLastColor = %txtNextcolor
  1062. }
  1063. }
  1064. }
  1065. }
  1066. else {
  1067. ;; Last post
  1068. if ($gettok($1-, 1, 32) == /me) {
  1069. action %colored
  1070. }
  1071. else {
  1072. say %colored
  1073. }
  1074. }
  1075. }
  1076. else {
  1077. ;; From above, IF NOT long enough to cut, just /SAY or /ME
  1078. if ($gettok($1-, 1, 32) == /me) {
  1079. action %colored
  1080. }
  1081. else {
  1082. say %colored
  1083. }
  1084. }
  1085. }
  1086. }
  1087.  
  1088. alias -l colorquotes {
  1089. ;; Colorize Dialog
  1090. var %num = 1
  1091. var %out = $2-
  1092. var %txtDialog = $hget($1, txtDialog)
  1093. var %txtColorD = $hget($1, colDialog)
  1094.  
  1095. $iif(%txtColorD < 10, %txtColorD = $chr(48) $+ %txtColorD)
  1096.  
  1097. :loop
  1098. if ($pos(%out,%txtDialog,%num) != $null) {
  1099. if ($calc(%num % 2) == 1) {
  1100. set %txtColorD2 $get_end_cc($left(%out,$calc($pos(%out,%txtDialog,%num) + 1)))
  1101. %out = $left(%out,$calc($pos(%out,%txtDialog,%num) - 1)) $+  $+ %txtDialog $+ $right(%out,$calc($pos(%out,%txtDialog,%num) * -1))
  1102. }
  1103. else {
  1104. if ($right(%out,$calc($pos(%out,%txtDialog,%num) * -1))) {
  1105. %out = $left(%out,$calc($pos(%out,%txtDialog,%num) - 1)) $+ %txtDialog $+  $+ %txtColorD2 $+ $right(%out,$calc($pos(%out,%txtDialog,%num) * -1))
  1106. }
  1107. else {
  1108. %out = $left(%out,$calc($pos(%out,%txtDialog,%num) - 1)) $+ %txtDialog
  1109. }
  1110. }
  1111. inc %num 1
  1112. goto loop
  1113. }
  1114. return %out
  1115. }
  1116.  
  1117. alias -l colortele {
  1118. ;; Colorize Telepathy
  1119. var %numt = 1
  1120. var %outt = $2-
  1121. var %txtTele = $hget($1, txtTelepathy)
  1122. var %txtColorT = $hget($1, colTelepathy)
  1123.  
  1124. $iif(%txtColorT < 10, %txtColorT = $chr(48) $+ %txtColorT)
  1125. :loop
  1126. if ($pos(%outt,%txtTele,%numt) != $null) {
  1127. if ($calc(%numt % 2) == 1) {
  1128. set %txtColorT2 $get_end_cc($left(%outt,$calc($pos(%outt,%txtTele,%numt) + 1)))
  1129. %outt = $left(%outt,$calc($pos(%outt,%txtTele,%numt) - 1)) $+  $+ %txtColorT $+ %txtTele $+ $right(%outt,$calc($pos(%outt,%txtTele,%numt) * -1))
  1130. }
  1131. else {
  1132. if ($right(%outt,$calc($pos(%outt,%txtTele,%numt) * -1))) {
  1133. %outt = $left(%outt,$calc($pos(%outt,%txtTele,%numt) - 1)) $+ %txtTele $+  $+ %txtColorT2 $+ $right(%outt,$calc($pos(%outt,%txtTele,%numt) * -1))
  1134. }
  1135. else {
  1136. %outt = $left(%outt,$calc($pos(%outt,%txtTele,%numt) - 1)) $+ %txtTele
  1137. }
  1138. }
  1139. inc %numt 1
  1140. goto loop
  1141. }
  1142. return %outt
  1143. }
  1144.  
  1145. alias -l colorfor {
  1146. ;; Colorize Foreign Language
  1147. var %numf = 1
  1148. var %outf = $2-
  1149. var %txtForeign = $hget($1, txtForeign)
  1150. var %txtColorF = $hget($1, colForeign)
  1151.  
  1152. $iif(%txtColorF < 10, %txtColorF = $chr(48) $+ %txtColorF)
  1153.  
  1154. :loop
  1155. if ($pos(%outf,%txtForeign,%numf) != $null) {
  1156. if ($calc(%numf % 2) == 1) {
  1157. set %txtColorf2 $get_end_cc($left(%outf,$calc($pos(%outf,%txtForeign,%numf) + 1)))
  1158. %outf = $left(%outf,$calc($pos(%outf, %txtForeign,%numf) -1)) $+  $+ %txtColorf $+ %txtForeign $+ $right(%outf,$calc($pos(%outf,%txtForeign,%numf) * -1))
  1159. }
  1160. else {
  1161. if ($right(%outf,$calc($pos(%outf,%txtForeign,%numf) * -1))) {
  1162. %outf = $left(%outf,$calc($pos(%outf,%txtForeign,%numf) -1)) $+ %txtForeign $+  $+ %txtColorf2 $+ $right(%outf,$calc($pos(%outf,%txtForeign,%numf) * -1))
  1163. }
  1164. else {
  1165. %outf = $left(%outf,$calc($pos(%outf,%txtForeign,%numf) -1)) $+ %txtForeign
  1166. }
  1167. }
  1168. inc %numf 1
  1169. goto loop
  1170. }
  1171. return %outf
  1172. }
  1173.  
  1174. alias -l get_end_cc {
  1175. ;; Get last color code in saytext chunk
  1176. if ($prop == bold) return $iif($calc($count($$1,) % 2),$true,$null)
  1177. if ($prop == underline) return $iif($calc($count($$1,) % 2),$true,$null)
  1178. if ($prop == reverse) return $iif($calc($count($$1,) % 2),$true,$null)
  1179. var %re = /(\d{1,2}(?:,\d{1,2})*)(?:[^]*)$/
  1180. !.echo -q $regex(get_last,$$1,%re)
  1181. return $iif($regml(get_last,1),$ifmatch,$null)
  1182. }
  1183.  
  1184. alias -l saycmd {
  1185. ;; Cut-Color loop for /npc commands
  1186.  
  1187. var %txtBuffer = $right($1-, $calc($len($1-) - $pos($1-,:,1)))
  1188. $iif($1 == 3, %txtBuffer = $2-)
  1189.  
  1190. var %cmdLine = $left($1-, $calc($pos($1-,:,1) - 1))
  1191. var %curchan = $chan $+ $network
  1192. var %colDefault = 
  1193. var %colAction = 
  1194. var %pnick = $null
  1195. var %colNext = $null
  1196. var %colDone = $null
  1197. var %colCont = $null
  1198. var %colBegin = $null
  1199.  
  1200. var %txtNext = $hget(%curchan, txtNext)
  1201. var %txtCont = $hget(%curchan, txtContinue)
  1202. var %txtDone = $hget(%curchan, txtDone))
  1203. var %txtBegin = $hget(%curchan, txtBegin))
  1204.  
  1205. tokenize 32 %cmdLine
  1206.  
  1207. $iif($1 == 1, %cmdPrefix = npc $+ $chr(32) $+ $chan $+ $chr(32) $+ $2 $+ $chr(32) $+ :)
  1208. $iif($1 == 2, %cmdPrefix = npca $+ $chr(32) $+ $chan $+ $chr(32) $+ $2 $+ $chr(32) $+ :)
  1209. $iif($1 == 3, %cmdPrefix = scene $+ $chr(32) $+ $chan $+ $chr(32) $+ :)
  1210.  
  1211. if ($hget(%curchan, useColor) == 1) {
  1212. %colDefault = $hget(%curchan, colDefault)
  1213. %colAction = $hget(%curchan, colAction)
  1214. %colNext = $hget(%curchan, colNext)
  1215. %colCont = $hget(%curchan, colContinue)
  1216. %colDone = $hget(%curchan, colDone)
  1217. %colBegin = $hget(%curchan, colBegin)
  1218.  
  1219. $iif(%colDefault < 10, %colDefault = $chr(3) $+ $chr(48) $+ %colDefault, %colDefault = $chr(3) $+ %colDefault)
  1220. $iif(%colAction < 10, %colAction = $chr(3) $+ $chr(48) $+ %colAction, %colAction = $chr(3) $+ %colAction)
  1221. $iif(%colNext < 10, %colNext = $chr(3) $+ $chr(48) $+ %colNext, %colNext = $chr(3) $+ %colNext)
  1222. $iif(%colCont < 10, %colCont = $chr(3) $+ $chr(48) $+ %colCont, %colCont = $chr(3) $+ %colCont)
  1223. $iif(%colDone < 10, %colDone = $chr(3) $+ $chr(48) $+ %colDone, %colDone = $chr(3) $+ %colDone)
  1224. $iif(%colBegin < 10, %colBegin = $chr(3) $+ $chr(48) $+ %colBegin, %colBegin = $chr(3) $+ %colBegin)
  1225.  
  1226. $iif($len($hget(%curchan, txtNext)), %txtNext = %colNext $+ $hget(%curchan, txtNext))
  1227. $iif($len($hget(%curchan, txtContinue)), %txtCont = %colCont $+ $hget(%curchan, txtContinue))
  1228. $iif($len($hget(%curchan, txtDone)), %txtDone = %colDone $+ $hget(%curchan, txtDone))
  1229. $iif($len($hget(%curchan, txtBegin)), %txtBegin = %colBegin $+ $hget(%curchan, txtBegin))
  1230. }
  1231.  
  1232. $iif($1 == 2, %colDefault = %colAction)
  1233. if ($hget(%curchan, UseCut) == 1) {
  1234. var %txtNext = %colNext $+ $hget(%curchan, txtNext)
  1235. var %txtCont = %colCont $+ $hget(%curchan, txtContinue)
  1236. var %txtDone = %colDone $+ $hget(%curchan, txtDone)
  1237. var %txtBegin = %colBegin $+ $hget(%curchan, txtBegin)
  1238. }
  1239. %txtBuffer = %colDefault $+ %txtBuffer
  1240.  
  1241. if ($hget(%curchan, UseColor) == 1 && $hget(%curchan, curProfile) != None) {
  1242. %colored = $colorquotes(%curchan, %txtBuffer )
  1243. %colored = $colortele(%curchan, %colored)
  1244. %colored = $colorfor(%curchan, %colored)
  1245. }
  1246. else {
  1247. %colored = %txtBuffer
  1248. }
  1249. var %txtNewBuflen = $len(%colored)
  1250.  
  1251. if (%txtNewBuflen > 400) {
  1252.  
  1253. var %pos = 1
  1254. var %txtNewBuf = $mid(%colored, %pos, %txtBufLen)
  1255. var %firsttime = 1
  1256. var %txtLastColor = $null
  1257. var %txtNextcolor = $null
  1258.  
  1259. while ( %txtNewBuf != $null ) {
  1260. if ( $len($deltok(%txtNewBuf, -1, 32)) < %txtCutLen ) {
  1261. var %txtNewBuf = $left(%txtNewBuf, %txtCutLen)
  1262. inc %pos %txtCutLen
  1263. }
  1264. else {
  1265. var %txtNewBuf = $deltok(%txtNewBuf,-1,32)
  1266. inc %pos $len(%txtNewBuf)
  1267. inc %pos
  1268. }
  1269. var %txtResult = %txtNewBuf
  1270. var %txtNewBuf = $mid(%colored, %pos, %txtBufLen)
  1271. if (%firsttime == 1) {
  1272. var %txtLastColor = $get_end_cc(%txtResult)
  1273.  
  1274. %cmdPrefix $+ %txtResult %txtNext
  1275. if (%txtLastColor == $null) {
  1276. var %txtLastColor = %colDefault
  1277. }
  1278. var %firsttime = 0
  1279. }
  1280. else {
  1281. var %txtColNewest = $chr(3) $+ %txtLastColor
  1282. if (%txtNewBuf != $null) {
  1283. %cmdPrefix $+ %txtCont %txtColNewest $+ %txtResult %txtNext
  1284. }
  1285. else {
  1286. if (%txtNewBuflen <= 945) {
  1287. %cmdPrefix $+ %txtCont %txtColNewest $+ %txtResult %txtDone
  1288. }
  1289. else {
  1290. %cmdPrefix $+ %txtCont %txtColNewest $+ %txtResult %txtDone
  1291. }
  1292. }
  1293. %txtNextcolor = $get_end_cc(%txtResult)
  1294. if (%txtNextcolor != $null) {
  1295. var %txtLastColor = %txtNextcolor
  1296. }
  1297. }
  1298. }
  1299.  
  1300. }
  1301. else {
  1302. %cmdPrefix $+ $chr(32) $+ %colored
  1303. }
  1304. }
  1305.  
  1306. alias -l saytrim {
  1307. ;; Stupid workaround for string concat on internal $* loop
  1308. if ($pos($1-,:,1)) {
  1309. tokenize 58 $1-
  1310. var %nospace = $trim($2-)
  1311. saycmd $1 $+ $chr(32) $+ : $+ %nospace
  1312. }
  1313. else {
  1314. saycmd $1-
  1315. }
  1316. }
  1317.  
  1318. alias -l trim {
  1319. ;; Trim exploits mIRC's poor preservation of space characters
  1320. return $1-
  1321. }
  1322.  
  1323. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1324. ;; ;;
  1325. ;; User Commands ;;
  1326. ;; ;;
  1327. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1328.  
  1329. alias quit {
  1330. ;; On quit, advertise script
  1331. if ($1) {
  1332. quit Voodoo²: $+ $chr(32) $+ $1-
  1333. }
  1334. else {
  1335. quit Voodoo²: http://www.voodoo-script.com
  1336. }
  1337. }
  1338.  
  1339. alias note {
  1340. ;; Open note for curProfile or $1
  1341. var %curchan = $chan $+ $network
  1342. var %curprofile = $hget(%curchan, curProfile)
  1343. var %i = 1
  1344.  
  1345. $iif($1, %curprofile = $1-)
  1346. var %sfile = $qt(%charpath $+ %curprofile $+ .txt)
  1347.  
  1348. if (!$dialog(sc_ $+ %curprofile)) {
  1349. dialog -m sc_ $+ %curprofile dlgScratch
  1350. dialog -t sc_ $+ %curprofile Scratchpad for %curprofile
  1351.  
  1352. while %i <= $lines($qt(%sfile)) {
  1353. ;; Maintaining line breaks
  1354. did -a sc_ $+ %curprofile 1 $read(%sfile, %i) $+ $chr(10) $+ $crlf
  1355. inc %i
  1356. }
  1357. did -a sc_ $+ %curprofile 1 $date $+ $chr(32) $+ at $+ $chr(32) $+ $time $+ $chr(10) $+ $crlf
  1358. }
  1359. else {
  1360. echo 14Voodoo05²1: 15Scratchpad already open for 05 $+ %curprofile
  1361. }
  1362. }
  1363.  
  1364. alias sendpic {
  1365. ;; Send character profile image to $active query or $1
  1366. var %curchan = $chan $+ $network
  1367. var %curquery = $query($active) $+ $network
  1368.  
  1369. $iif($query($active), %curchan = %curquery)
  1370.  
  1371. if ($hget(%curchan, curProfile) != None) {
  1372. if ($1) {
  1373. var %tfName = $hget(%curchan, imgCharImage)
  1374. var %sName = $1-
  1375. dcc send -c %sName %tfName
  1376. }
  1377. else {
  1378. echo 14Voodoo05²1: 15You must specify a nickname to send to.
  1379. }
  1380. }
  1381. }
  1382.  
  1383. alias sayinfo {
  1384. ;; Output txtINFO, useful premade slot
  1385. var %curchan = $chan $+ $network
  1386. $iif($query($active), %curchan = $query($active) $+ $network)
  1387. $iif($hget(%curchan, curProfile) != None, saytext $hget(%curchan, txtInfo))
  1388. }
  1389.  
  1390. alias describe {
  1391. ;; Output txtDescribe, another useful premade slot
  1392. var %curchan = $chan $+ $network
  1393. $iif($query($active), %curchan = $query($active) $+ $network)
  1394. $iif($hget(%curchan, curProfile) != None, saytext $hget(%curchan, txtDescription))
  1395. }
  1396.  
  1397. alias ooc {
  1398. ;; Embrace OOC text
  1399. var %curchan = $chan $+ $network
  1400. var %curquery = $query($active) $+ $network
  1401. var %txtColorO = $hget(%curchan, colOOC)
  1402. var %txtOpening = $hget(%curchan, txtOOCLeft)
  1403. var %txtClosing = $hget(%curchan, txtOOCRight)
  1404.  
  1405. $iif($query($active), %curchan = %curquery)
  1406.  
  1407. if ($1) {
  1408. say %txtOpening $+  $+ %txtColorO $+ $chr(32) $+ $1- $+ $chr(32) $+  $+ %txtClosing
  1409. }
  1410. else {
  1411. echo -i11 14 - Syntax: /ooc <text>
  1412. }
  1413. }
  1414.  
  1415. alias char {
  1416. ;; Pass me a beer, this is getting repetitive
  1417. var %curchan = $chan $+ $network
  1418. var %newprof = $qt(%charpath $+ $1- $+ .rpg)
  1419. var %curquery = $query($active) $+ $network
  1420.  
  1421. $iif($query($active), %curchan = %curquery)
  1422.  
  1423. if ($1) {
  1424. if ($1 != None) {
  1425. $iif($isfile(%newprof),swchar 1 %newprof, echo Voodoo: $+ $chr(32) $+ $1 $+ $chr(32) $+ -- No such profile)
  1426. }
  1427. else {
  1428. hadd %curchan curProfile None
  1429. echo 14Voodoo05²1: 15Changed active profile to 05None
  1430. titlebar Voodoo²: Active Profile - $+ $chr(32) $+ $hget(%curchan, curProfile)
  1431. }
  1432. }
  1433. else {
  1434. echo -i11 14 - Syntax: /char <profile name>
  1435. }
  1436. }
  1437.  
  1438. alias aschar {
  1439. ;; A bit more fun. Temporarily switches chars
  1440. var %curquery = $query($active) $+ $network
  1441. var %txtBuffer = $right($1-, $calc($len($1-) - $pos($1-,:,1)))
  1442. var %curchan = $chan $+ $network
  1443.  
  1444. $iif($query($active), %curchan = %curquery)
  1445.  
  1446. var %profname = $left($1-, $calc($pos($1-,:,1) - 1))
  1447. var %newprof = $qt(%charpath $+ %profname $+ .rpg)
  1448. var %testprof = $hget(%curchan, curProfile)
  1449. var %oldprof = $qt(%charpath $+ %testprof $+ .rpg)
  1450.  
  1451. if ($pos($1-,:,1)) {
  1452. swchar 3 %newprof
  1453. saytext %txtBuffer
  1454. if (%testprof == None) {
  1455. hadd %curchan curProfile None
  1456. halt
  1457. }
  1458. else {
  1459. swchar 3 %oldprof
  1460. }
  1461. }
  1462. else {
  1463. echo -i11 14 - Syntax: /aschar <profile name> : <text>
  1464. }
  1465. }
  1466.  
  1467. alias npcsay {
  1468. ;; Cut/Color for DarkMyst.org /NPC
  1469. var %curchan = $chan $+ $network
  1470. var %curprofile = $hget(%curchan, curProfile)
  1471. var %tblname = $qt(%charpath $+ %curprofile $+ .rpg)
  1472.  
  1473. if (%curprofile != None) {
  1474. if ($hget(%curchan, dateMod) != $file(%tblname).mtime) {
  1475. swchar 2 %tblname
  1476. }
  1477. }
  1478.  
  1479. if ($pos($1-,:,1)) {
  1480. tokenize 58 $1-
  1481.  
  1482. if ($pos($2-, $chr(92)) && $len($2-) > 370) {
  1483. %cmdLine = $1
  1484. tokenize 92 $2- | saytrim 1 %cmdLine : $*
  1485. }
  1486. else {
  1487. saycmd 1 $+ $chr(32) $+ $1 $+ : $+ $2-
  1488. halt
  1489. }
  1490. }
  1491. else {
  1492. echo -i11 14 - Syntax: /npcsay <npc name> : <text>
  1493. }
  1494. }
  1495.  
  1496. alias npcscene {
  1497. ;; Cut/Color for Darkmyst.org /SCENE
  1498. var %curchan = $chan $+ $network
  1499. var %curprofile = $hget(%curchan, curProfile)
  1500. var %tblname = $qt(%charpath $+ %curprofile $+ .rpg)
  1501.  
  1502. if (%curprofile != None) {
  1503. if ($hget(%curchan, dateMod) != $file(%tblname).mtime) {
  1504. swchar 2 %tblname
  1505. }
  1506. }
  1507. if ($pos($2-, $chr(92)) && $len($2-) > 370) {
  1508. %cmdLine = $1
  1509. tokenize 92 $2- | saytrim 3 $*
  1510. }
  1511. else {
  1512. saycmd 3 $+ $chr(32) $+ $1-
  1513. }
  1514. }
  1515.  
  1516. alias npcact {
  1517. ;; Cut/Color for DarkMyst.org /NPCA
  1518. var %curchan = $chan $+ $network
  1519. var %curprofile = $hget(%curchan, curProfile)
  1520. var %tblname = $qt(%charpath $+ %curprofile $+ .rpg)
  1521.  
  1522. if (%curprofile != None) {
  1523. if ($hget(%curchan, dateMod) != $file(%tblname).mtime) {
  1524. swchar 2 %tblname
  1525. }
  1526. }
  1527.  
  1528. if ($pos($1-,:,1)) {
  1529. tokenize 58 $1-
  1530.  
  1531. if ($pos($2-, $chr(92)) && $len($2-) > 370) {
  1532. %cmdLine = $1
  1533. tokenize 92 $2- | saytrim 2 %cmdLine : $*
  1534. }
  1535. else {
  1536. saycmd 2 $+ $chr(32) $+ $1 $+ : $+ $2-
  1537. halt
  1538. }
  1539. }
  1540. else {
  1541. echo -i11 14 - Syntax: /npcsay <npc name> : <text>
  1542. }
  1543. }
  1544.  
  1545. alias ae {
  1546. ;; Added for external FatMouth advanced editor
  1547. if ($isfile($qt($scriptdir $+ fat mouth v2.exe))) {
  1548. run $qt($scriptdir $+ fat mouth v2.exe)
  1549. }
  1550. else {
  1551. echo 14Voodoo05²1: 15FatMouth Advanced Editor not found in05 $scriptdir
  1552. echo 14Voodoo05²1: 15Please visit 05http://www.voodoo-script.com 15for more information.
  1553. }
  1554. }
  1555. alias editor {
  1556. ae
  1557. }
  1558. alias fatmouth {
  1559. ae
  1560. }
  1561. alias advanced {
  1562. ae
  1563. }
  1564.  
  1565. alias vhelp {
  1566. ;; Command Listing
  1567. window -k0 @Voodoo²
  1568. echo @Voodoo² 14-= Voodoo05²14Command List = -
  1569. echo @Voodoo² $chr(13)
  1570. echo -i11 @Voodoo² 14/ooc - Prints comments in OOC brackets set by the profile.
  1571. echo -i11 @Voodoo² 14 - Syntax: /ooc <text>
  1572. echo @Voodoo² $chr(13)
  1573. echo -i11 @Voodoo² 14/describe - Posts the text in your character's description box to the active channel or query.
  1574. echo -i11 @Voodoo² 14 - Syntax: /describe
  1575. echo @Voodoo² $chr(13)
  1576. echo -i11 @Voodoo² 14/sayinfo - Posts the text in your character's info box to the active channel or query.
  1577. echo -i11 @Voodoo² 14 - Syntax: /sayinfo
  1578. echo @Voodoo² $chr(13)
  1579. echo -i11 @Voodoo² 14/sendpic - Sends your character's profile picture to the specified user.
  1580. echo -i11 @Voodoo² 14 - Syntax: /sendpic <name>
  1581. echo @Voodoo² $chr(13)
  1582. echo -i11 @Voodoo² 14/note - Opens your characters scratch pad for notes.
  1583. echo -i11 @Voodoo² 14 - Syntax: /note [profile]
  1584. echo @Voodoo² $chr(13)
  1585. echo -i11 @Voodoo² 14/aschar - Sends a single post with the specified profile settings.
  1586. echo -i11 @Voodoo² 14 - Syntax: /aschar <profile name> : <text>
  1587. echo @Voodoo² $chr(13)
  1588. echo -i11 @Voodoo² 14/char - Switches character profiles.
  1589. echo -i11 @Voodoo² 14 - Syntax: /char <profile name>
  1590. echo @Voodoo² $chr(13)
  1591. echo -i11 @Voodoo² 14/npcsay - Utilizes DarkMyst's /npc command in the active channel, and cuts text accordingly. Carries colors over from the active profile in the channel.
  1592. echo -i11 @Voodoo² 14 - Syntax: /npcsay <npc name> : <text>
  1593. echo @Voodoo² $chr(13)
  1594. echo -i11 @Voodoo² 14/npcact - Utilizes DarkMyst's /npca command in the active channel, and cuts text accordingly. This is like the default /me command and uses the action color. Carries over colors from the active profile in the channel.
  1595. echo -i11 @Voodoo² 14 - Syntax: /npcact <npc name> : <action>
  1596. echo @Voodoo² $chr(13)
  1597. echo -i11 @Voodoo² 14/npcscene - Utilizes DarkMyst's /scene command in the active channel.
  1598. echo -i11 @Voodoo² 14 - Syntax: /npcscene <scene>
  1599. echo @Voodoo² $chr(13)
  1600. echo -i11 @Voodoo² 14/advanced, /fatmouth, /ae - Opens FatMouth Advanced Post Editor
  1601. echo -i11 @Voodoo² 14 - Syntax: /advanced
  1602. echo @Voodoo² $chr(13)
  1603. }
  1604. ;; fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement