Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.35 KB | None | 0 0
  1. /*
  2. unRealIRC
  3. Theme Engine
  4. Scripted By: DarkWarrior
  5. Version 5.0
  6. */
  7.  
  8. dialog unrthemecreator {
  9. title "Theme Creator"
  10. size -1 -1 232 161
  11. option dbu
  12. list 1, 5 9 110 98, size hsbar vsbar
  13. text "*** Double Click to edit field***", 2, 6 109 108 8, disable center
  14. check "Enable Schemes", 3, 124 20 50 10
  15. combo 4, 124 33 53 40, disable size edit vsbar
  16. button "Add", 5, 180 34 37 10, disable
  17. button "Delete", 6, 180 48 37 10, disable
  18. box "Schemes", 7, 117 9 109 73
  19. button "Reset Fields", 8, 132 91 78 10
  20. button "Save Theme", 9, 132 131 78 10
  21. edit "", 10, 132 116 78 10
  22. text "Filename: (No Spaces)", 11, 133 107 69 8
  23. check "Load into Theme Loader", 12, 132 146 75 11
  24. edit "", 13, 5 120 110 31, read multi vsbar
  25. }
  26.  
  27. alias createtheme { dialog $iif($dialog(unrthemecreator),-v unrthemecreator,-md unrthemecreator unrthemecreator) }
  28.  
  29. alias -l unrfieldinfo {
  30. var %info
  31. if ($1 == 1) { %info = #NAME $+ $crlf $+ This field's parameters are merely the name of the Theme itself. (ie. unReal) The parameters will not translate any of the UNR Theme Engine tags. }
  32. elseif ($1 == 3) { %info = #PREFIX $+ $crlf $+ The parameter for this field will be used to prefix most events. }
  33. elseif ($1 == 4) { %info = #RAWPREFIX $+ $crlf $+ The paremeter for this field will be used as a prefix to raw events and other misc. events or scripts to be distingushable from normal events. It is recommended the #PREFIX be different then #RAWPREFIX. }
  34. elseif ($1 == 6) { %info = #LEFT $+ $crlf $+ The parameter of this field will be the left bracket used in the '$skin' feature of the UNR Theme Engine. }
  35. elseif ($1 == 7) { %info = #RIGHT $+ $crlf $+ The parameter of this field will be the right bracket used in the '$skin' feature of the UNR Theme Engine. }
  36. elseif ($1 == 9) { %info = #TIMESTAMP $+ $crlf $+ The parameter of this field determines the look and format of your timestamp. }
  37. elseif ($1 == 11) { %info = #FONT $+ $crlf $+ The parameters of this field will determine the font style and size of the text displayed throughout mIRC's windows. }
  38. elseif ($1 == 13) { %info = #AMSG $+ $crlf $+ This field's parameters determine who each of your amsg's (All channel messages) will be prefixed. }
  39. elseif ($1 == 15) { %info = #NICKMSG $+ $crlf $+ This field's parameters will determine how the text is displayed in the chat when someone is speaking. }
  40. elseif ($1 == 17) { %info = #PALETTE $+ $crlf $+ The parameters of this field will determine the 16 color codes available to mIRC in scripts and display. }
  41. elseif ($1 > 18) {
  42. if ($gettok($gettok($did(1).seltext,1,32),1,46) == #COLORS) { %info = #COLORS $+ $crlf $+ The parameters of this field determine the four main colors used in the '$skin' function, various scripts, and events. }
  43. elseif ($gettok($gettok($did(1).seltext,1,32),1,46) == #MODECOLOR) { %info = #MODECOLOR $+ $crlf $+ The parameters of this field determine the colors of individual nicknames based on their status. }
  44. elseif ($gettok($gettok($did(1).seltext,1,32),1,46) == #OWNCOLOR) { %info = #OWNCOLOR $+ $crlf $+ The parameters of this field determine the color your nickname will be displayed in the chat. }
  45. elseif ($gettok($gettok($did(1).seltext,1,32),1,46) == #SCHEME) { %info = #SCHEME $+ $crlf $+ This field's parameters determine the color of each event displayed within the chat. }
  46. elseif ($gettok($gettok($did(1).seltext,1,32),1,46) == #SCHEMES) { %info = #SCHEMES $+ $crlf $+ This field tells UNR Theme Engine that there are multiple schemes to be used within this theme and the name of each scheme. }
  47. }
  48. did -a $dname 13 %info
  49. }
  50.  
  51. alias -l unrfieldedit {
  52. if ($1 == 1) {
  53. dialog -mao name unrcedit
  54. }
  55. if ($1 == 3) {
  56. dialog -mao prefix unrcedit
  57. }
  58. if ($1 == 4) {
  59. dialog -mao rprefix unrcedit
  60. }
  61. if ($1 == 6) {
  62. dialog -mao leftbracket unrcedit
  63. }
  64. if ($1 == 7) {
  65. dialog -mao rightbracket unrcedit
  66. }
  67. if ($1 == 9) {
  68. dialog -mao timestamp unrcedit
  69. }
  70. if ($1 == 11) {
  71. editfont
  72. }
  73. if ($1 == 13) {
  74. dialog -mao amsg unrcedit
  75. }
  76. if ($1 == 15) {
  77. dialog -mao nickmsg unrcedit
  78. }
  79. if ($1 == 17) {
  80. dialog -mao editpal editpal
  81. }
  82. elseif ($1 > 18) {
  83. set %did $1
  84. set %field $gettok($did(unrthemecreator,1,$1),1,32)
  85. set %entry $gettok($did(unrthemecreator,1,$1),2-,32)
  86. if ($gettok(%field,1,46) == #COLORS) {
  87. dialog -mao colors editcol
  88. }
  89. elseif ($gettok(%field,1,46) == #MODECOLOR) {
  90. dialog -mao modecolors editcol
  91. }
  92. elseif ($gettok(%field,1,46) == #OWNCOLOR) {
  93. dialog -mao owncolor editcol
  94. }
  95. elseif ($gettok(%field,1,46) == #SCHEME) {
  96. dialog -mao editscheme editscheme
  97. }
  98. }
  99. }
  100.  
  101. dialog -l schmpre {
  102. title "Scheme Preview"
  103. size -1 -1 254 116
  104. option dbu
  105. icon 1, 2 2 250 100, $scriptdirdpreview.bmp, 0
  106. button "Close", 2, 87 104 80 10, ok cancel
  107. }
  108.  
  109. on *:dialog:schmpre:init:*:scheme.preview
  110.  
  111. alias -l scheme.preview {
  112. if (%unrc.dialog == editscheme) {
  113. var %font = $qt($gettok($gettok($did(unrthemecreator,1,11),2-,32),2-,32)) $gettok($gettok($did(unrthemecreator,1,11),2-,32),1,32),%timestamp = $gettok($did(unrthemecreator,1,9),2-,32),%rawprefix = $pttok_($gettok($did(unrthemecreator,1,4),2-,32)),%prefix = $pttok_($gettok($did(unrthemecreator,1,3),2-,32))
  114. window -hp +f @scheme.preview 0 0 500 200 | clear @scheme.preview
  115. drawfill -r @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,1,44) + 1),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok(%entry,$gettok(%entry,1,44),44),44) 0 0
  116. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,8,44) +1),44) %font 0 0 $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,02,ss,52,tt,pm,t,p,TT,PM,T,P)) %prefix (Join) Hirako : ~Vizard@XC-DW1337.socal.res.com
  117. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,10,44) + 1),44) %font 0 $linespace_(13) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,02,ss,53,tt,pm,t,p,TT,PM,T,P)) %prefix (Mode Set) +o Hirako : set by ChanServ
  118. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,12,44) + 1),44) %font 0 $linespace_(26) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,02,ss,55,tt,pm,t,p,TT,PM,T,P)) $pttok_(5,+,Pyro,How do I use this script?).n
  119. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,10,44) + 1 ),44) %font 0 $linespace_(39) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,01,tt,pm,t,p,TT,PM,T,P)) %prefix (Mode Set) +b *!*@XC-568DH48.cable.cal.net : set by $me
  120. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,9,44) + 1),44) %font 0 $linespace_(52) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,01,tt,pm,t,p,TT,PM,T,P)) %prefix (Kick) Pyro from #unReal : by $me » BOOM! Headshot! - unRealIRC - 89
  121. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,16,44) + 1),44) %font 0 $linespace_(65) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,05,tt,pm,t,p,TT,PM,T,P)) $pttok_(@,$me,Noobs really annoy me...).m
  122. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,12,44) + 1),44) %font 0 $linespace_(78) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,08,tt,pm,t,p,TT,PM,T,P)) $pttok_(3,@,Hirako,Lulz. Abuse much?).n
  123. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,2,44) + 1),44) %font 0 $linespace_(91) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,14,tt,pm,t,p,TT,PM,T,P)) » @ $me slaps Hirako around with a "Ask me if I care?"
  124. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,12,44) + 1),44) %font 0 $linespace_(104) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,21,tt,pm,t,p,TT,PM,T,P)) $pttok_(4,%,Hyrule,Hey $me can you help me for a sec?).n
  125. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,16,44) + 1),44) %font 0 $linespace_(117) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,23,tt,pm,t,p,TT,PM,T,P)) $pttok_(@,$me,Sure Hyrule).m
  126. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,6,44) + 1),44) %font 0 $linespace_(130) $chr(160) $pttok_($replacecs(%timestamp.e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,27,tt,pm,t,p,TT,PM,T,P)) %rawprefix [Incoming Private Message] Hyrule : ~Zelda@XC-5895J7.dslw.net
  127. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,18,44) + 1),44) %font 0 $linespace_(143) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,49,tt,pm,t,p,TT,PM,T,P)) %prefix (Quit) Hyrule : ~Zelda@XC-5895J7.dsl.net « Quit: user exited
  128. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,13,44) + 1),44) %font 0 $linespace_(156) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,53,tt,pm,t,p,TT,PM,T,P)) %prefix (Notice : #unReal) @ Hirako » Behave while I'm away!
  129. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,11,44) + 1),44) %font 0 $linespace_(169) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,04,ss,01,tt,pm,t,p,TT,PM,T,P)) %prefix (Nick Change) Hirako is now Hir[a]ko
  130. drawtext -pr @scheme.preview $gettok($gettok($did(unrthemecreator,1,17),2-,32),$calc($gettok(%entry,17,44) + 1),44) %font 0 $linespace_(182) $chr(160) $pttok_($replacecs(%timestamp,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,04,ss,09,tt,pm,t,p,TT,PM,T,P)) %prefix (Part) Dead : ~Death@XC-32LK4R.socal.cable.com
  131. drawsave @scheme.preview schemepreview.bmp
  132. window -c @scheme.preview
  133. did -gv $dname 1 schemepreview.bmp
  134. .remove schemepreview.bmp
  135. }
  136. }
  137.  
  138. alias linespace_ {
  139. if ($left($gettok($gettok($did(unrthemecreator,1,11),2-,32),1,32),1) == -) {
  140. var %fontsize = $remove($gettok($gettok($did(unrthemecreator,1,11),2-,32),1,32),-)
  141. return $round($calc((%fontsize * $1) / 8),0)
  142. }
  143. else {
  144. var %fontsize = $gettok($gettok($did(unrthemecreator,1,11),2-,32),1,32)
  145. return $round($calc((%fontsize * $1) / 11),0)
  146. }
  147. }
  148.  
  149. alias pc_ { return $+($chr(3),$dd($gettok($gettok($did(unrthemecreator,1,$calc(%did - 3)),2-,32),$1,32))) }
  150.  
  151. alias pttok_ {
  152. if ($prop == n) {
  153. var %preturn2 = $replace($gettok($did(unrthemecreator,1,15),2-,32),<nick>,$2 $+($chr(3),$gettok($gettok($did(unrthemecreator,1,$calc(%did - 2)),2-,32),$1,32),$3,$chr(3)),<msg>,$4-,<o>,,<c>,$chr(3),<c1>,$pc_(1),<c2>,$pc_(2),<c3>,$pc_(3),<c4>,$pc_(4),<u>,,<r>,,<b>,)
  154. return %preturn2
  155. }
  156. if ($prop == m) {
  157. var %preturn4 = $replace($gettok($did(unrthemecreator,1,15),2-,32),<nick>,$1 $+($chr(3),$gettok($gettok($did(unrthemecreator,1,$calc(%did - 1)),2-,32),2-,32),$2,$chr(3)),<msg>,$3-,<o>,,<c>,$chr(3),<c1>,$pc_(1),<c2>,$pc_(2),<c3>,$pc_(3),<c4>,$pc_(4),<u>,,<r>,,<b>,)
  158. return %preturn4
  159. }
  160. if (!$prop) {
  161. var %preturn3 = $replace($1-,<o>,,<c>,,<c1>,$pc_(1),<c2>,$pc_(2),<c3>,$pc_(3),<c4>,$pc_(4),<u>,,<r>,,<b>,)
  162. return %preturn3
  163. }
  164. }
  165.  
  166. dialog -l editscheme {
  167. title "Edit Field - Scheme"
  168. size -1 -1 100 66
  169. option dbu
  170. list 1, 5 5 54 35, size vsbar
  171. combo 2, 65 5 27 60, size limit 2 drop
  172. icon 3, 68 18 15 15
  173. button "Save", 4, 32 53 37 10
  174. button "Preview", 5, 32 42 37 10
  175. }
  176.  
  177. on *:dialog:editscheme:init:*: {
  178. set %unrc.dialog editscheme
  179. did -a $dname 1 Background
  180. did -a $dname 1 Action text
  181. did -a $dname 1 Ctcp text
  182. did -a $dname 1 Highlight text
  183. did -a $dname 1 Info text
  184. did -a $dname 1 Info2 text
  185. did -a $dname 1 Invite text
  186. did -a $dname 1 Join text
  187. did -a $dname 1 Kick text
  188. did -a $dname 1 Mode text
  189. did -a $dname 1 Nick test
  190. did -a $dname 1 Normal text
  191. did -a $dname 1 Notice text
  192. did -a $dname 1 Notify text
  193. did -a $dname 1 Other text
  194. did -a $dname 1 Own text
  195. did -a $dname 1 Part text
  196. did -a $dname 1 Quit text
  197. did -a $dname 1 Topic text
  198. did -a $dname 1 Wallops text
  199. did -a $dname 1 Whois text
  200. did -a $dname 1 Editbox
  201. did -a $dname 1 Editbox text
  202. did -a $dname 1 Listbox
  203. did -a $dname 1 Listbox text
  204. did -a $dname 1 Gray text
  205. did -a $dname 1 Title text
  206. did -a $dname 1 Inactive
  207. did -a $dname 1 Treebar
  208. did -a $dname 1 Treebar text
  209. var %x = 0
  210. while (%x <= 15) {
  211. did -a $dname 2 $dd(%x)
  212. inc %x
  213. }
  214. did -c $dname 1 1
  215. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,1,44),32)
  216. window -hp +f @editcol 0 0 60 60
  217. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,44),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,44),32),44) 0 0
  218. drawsave @editcol editcol.bmp
  219. did -gv $dname 3 editcol.bmp
  220. }
  221.  
  222. on *:dialog:editscheme:sclick:*: {
  223. if ($did == 1) {
  224. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,44),32)
  225. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,44),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,44),32),44) 0 0
  226. drawsave @editcol editcol.bmp
  227. did -gv $dname 3 editcol.bmp
  228. }
  229. if ($did == 2) {
  230. set %entry $puttok(%entry,$did(2),$did(1).sel,44)
  231. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,44),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,44),32),44) 0 0
  232. drawsave @editcol editcol.bmp
  233. did -gv $dname 3 editcol.bmp
  234. }
  235. if ($did == 4) {
  236. set %unrc.dialog unrthemecreator
  237. dialog -x editscheme
  238. did -o unrthemecreator 1 %did %field %entry
  239. unset %field
  240. unset %entry
  241. unset %did
  242. window -c @editcol
  243. .remove editcol.bmp
  244. }
  245. if ($did == 5) {
  246. if ($dialog(schmpre)) {
  247. dialog -x schmpre
  248. dialog -mao schmpre schmpre
  249. }
  250. else {
  251. dialog -mao schmpre schmpre
  252. }
  253. }
  254. }
  255.  
  256.  
  257. on *:dialog:editscheme:close:*: {
  258. set %unrc.dialog unrthemecreator
  259. unset %field
  260. unset %did
  261. unset %entry
  262. window -c @editcol
  263. .remove editcol.bmp
  264. }
  265.  
  266.  
  267. dialog -l editcol {
  268. title "Edit Field"
  269. size -1 -1 100 56
  270. option dbu
  271. list 1, 5 5 54 35, size vsbar
  272. combo 2, 65 5 27 50, size limit 2 drop
  273. icon 3, 68 18 15 15
  274. button "Save", 4, 32 42 37 10
  275. }
  276.  
  277. on *:dialog:owncolor:init:*: {
  278. set %unrc.dialog owncolor
  279. dialog -t owncolor Edit Field - Your Color
  280. did -a $dname 1 Your Color
  281. var %x = 0
  282. while (%x <= 15) {
  283. did -a $dname 2 $dd(%x)
  284. inc %x
  285. }
  286. did -c $dname 1 1
  287. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,1,32),32)
  288. window -hp +f @editcol 0 0 60 60
  289. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,32),32),44) 0 0
  290. drawsave @editcol editcol.bmp
  291. did -gv $dname 3 editcol.bmp
  292. }
  293.  
  294. on *:dialog:owncolor:sclick:*: {
  295. if ($did == 1) {
  296. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32)
  297. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) 0 0
  298. drawsave @editcol editcol.bmp
  299. did -gv $dname 3 editcol.bmp
  300. }
  301. if ($did == 2) {
  302. set %entry $puttok(%entry,$did(2),$did(1).sel,32)
  303. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) 0 0
  304. drawsave @editcol editcol.bmp
  305. did -gv $dname 3 editcol.bmp
  306. }
  307. if ($did == 4) {
  308. set %unrc.dialog unrthemecreator
  309. dialog -x owncolor
  310. did -o unrthemecreator 1 %did %field %entry
  311. unset %field
  312. unset %entry
  313. unset %did
  314. window -c @editcol
  315. .remove editcol.bmp
  316. }
  317. }
  318.  
  319.  
  320. on *:dialog:owncolor:close:*: {
  321. set %unrc.dialog unrthemecreator
  322. unset %field
  323. unset %did
  324. unset %entry
  325. window -c @editcol
  326. .remove editcol.bmp
  327. }
  328.  
  329. on *:dialog:modecolors:init:*: {
  330. set %unrc.dialog modecolors
  331. dialog -t modecolors Edit Field - Mode Colors
  332. did -a $dname 1 Owner(~)
  333. did -a $dname 1 Protect(&)
  334. did -a $dname 1 Operator(@)
  335. did -a $dname 1 Half-Op(%)
  336. did -a $dname 1 Voice(+)
  337. var %x = 0
  338. while (%x <= 15) {
  339. did -a $dname 2 $dd(%x)
  340. inc %x
  341. }
  342. did -c $dname 1 1
  343. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,1,32),32)
  344. window -hp +f @editcol 0 0 60 60
  345. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,32),32),44) 0 0
  346. drawsave @editcol editcol.bmp
  347. did -gv $dname 3 editcol.bmp
  348. }
  349.  
  350. on *:dialog:modecolors:sclick:*: {
  351. if ($did == 1) {
  352. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32)
  353. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) 0 0
  354. drawsave @editcol editcol.bmp
  355. did -gv $dname 3 editcol.bmp
  356. }
  357. if ($did == 2) {
  358. set %entry $puttok(%entry,$did(2),$did(1).sel,32)
  359. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) 0 0
  360. drawsave @editcol editcol.bmp
  361. did -gv $dname 3 editcol.bmp
  362. }
  363. if ($did == 4) {
  364. set %unrc.dialog unrthemecreator
  365. dialog -x modecolors
  366. did -o unrthemecreator 1 %did %field %entry
  367. unset %field
  368. unset %entry
  369. unset %did
  370. window -c @editcol
  371. .remove editcol.bmp
  372. }
  373. }
  374.  
  375.  
  376. on *:dialog:modecolors:close:*: {
  377. set %unrc.dialog unrthemecreator
  378. unset %field
  379. unset %did
  380. unset %entry
  381. window -c @editcol
  382. .remove editcol.bmp
  383. }
  384.  
  385. on *:dialog:colors:init:*: {
  386. set %unrc.dialog colors
  387. dialog -t colors Edit Field - Main Colors
  388. var %x = 1
  389. while (%x <= 4) {
  390. did -a $dname 1 Color %x
  391. inc %x
  392. }
  393. var %x = 0
  394. while (%x <= 15) {
  395. did -a $dname 2 $dd(%x)
  396. inc %x
  397. }
  398. did -c $dname 1 1
  399. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,1,32),32)
  400. window -hp +f @editcol 0 0 60 60
  401. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,1,32),32),44) 0 0
  402. drawsave @editcol editcol.bmp
  403. did -gv $dname 3 editcol.bmp
  404. }
  405.  
  406. on *:dialog:colors:sclick:*: {
  407. if ($did == 1) {
  408. did -c $dname 2 $findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32)
  409. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) 0 0
  410. drawsave @editcol editcol.bmp
  411. did -gv $dname 3 editcol.bmp
  412. }
  413. if ($did == 2) {
  414. set %entry $puttok(%entry,$did(2),$did(1).sel,32)
  415. drawfill -r @editcol $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) $gettok($gettok($did(unrthemecreator,1,17),2-,32),$findtok($didtok($dname,2,32),$gettok(%entry,$did(1).sel,32),32),44) 0 0
  416. drawsave @editcol editcol.bmp
  417. did -gv $dname 3 editcol.bmp
  418. }
  419. if ($did == 4) {
  420. set %unrc.dialog unrthemecreator
  421. dialog -x colors
  422. did -o unrthemecreator 1 %did %field %entry
  423. unset %field
  424. unset %entry
  425. unset %did
  426. window -c @editcol
  427. .remove editcol.bmp
  428. }
  429. }
  430.  
  431.  
  432. on *:dialog:colors:close:*: {
  433. set %unrc.dialog unrthemecreator
  434. unset %field
  435. unset %did
  436. unset %entry
  437. window -c @editcol
  438. .remove editcol.bmp
  439. }
  440.  
  441. dialog -l editpal {
  442. title "Field Edit - Palette"
  443. size -1 -1 183 123
  444. option dbu
  445. icon 1, 11 8 15 15
  446. icon 2, 31 8 15 15
  447. icon 3, 51 8 15 15
  448. icon 4, 71 8 15 15
  449. icon 5, 91 8 15 15
  450. icon 6, 111 8 15 15
  451. icon 7, 132 8 15 15
  452. icon 8, 151 8 15 15
  453. icon 9, 31 28 15 15
  454. icon 10, 51 28 15 15
  455. icon 11, 71 28 15 15
  456. icon 12, 91 28 15 15
  457. icon 13, 111 28 15 15
  458. icon 14, 132 28 15 15
  459. icon 15, 11 28 15 15
  460. icon 16, 151 28 15 15
  461. box "Palette", 17, 5 0 168 50
  462. combo 18, 11 53 60 46, size drop
  463. button "Load", 19, 72 53 30 10
  464. button "Add", 20, 107 53 30 10
  465. button "Delete", 21, 142 53 30 10
  466. text "R:", 22, 11 72 8 8
  467. edit "", 23, 21 71 17 10, limit 3 center
  468. scroll "", 24, 40 72 90 8, range 255 horizontal bottom
  469. scroll "", 25, 40 84 90 8, range 255 horizontal bottom
  470. edit "", 26, 21 83 17 10, limit 3 center
  471. text "G:", 27, 11 84 8 8
  472. scroll "", 28, 40 96 90 8, range 255 horizontal bottom
  473. edit "", 29, 21 95 17 10, limit 3 center
  474. text "B:", 30, 11 96 8 8
  475. icon 31, 140 73 30 30
  476. button "Save", 32, 72 110 37 10
  477. }
  478.  
  479. on *:dialog:editpal:init:*: {
  480. set %unrc.dialog editpal
  481. window -hp +f @editpal 0 0 60 60
  482. var %x = 1,%pal = $gettok($did(unrthemecreator,1,17),2-,32),%editcol = $rgb($gettok(%pal,1,44))
  483. set %temp.pal %pal
  484. set %sel.col 1
  485. while (%x <= 16) {
  486. clear @editpal
  487. drawfill -r @editpal $gettok(%pal,%x,44) $gettok(%pal,%x,44) 0 0
  488. drawsave @editpal editpal.bmp
  489. did -gv $dname %x editpal.bmp
  490. .remove editpal.bmp
  491. inc %x
  492. }
  493.  
  494. window -c @editpal
  495. window -hp +f @editcol 0 0 60 60
  496. drawfill -r @editcol $gettok(%pal,1,44) $gettok(%pal,1,44) 0 0
  497. drawsave @editcol editcol.bmp
  498. did -gv $dname 31 editcol.bmp
  499.  
  500. did -a $dname 23 $gettok(%editcol,1,44)
  501. did -a $dname 26 $gettok(%editcol,2,44)
  502. did -a $dname 29 $gettok(%editcol,3,44)
  503. did -c $dname 24 $gettok(%editcol,1,44)
  504. did -c $dname 25 $gettok(%editcol,2,44)
  505. did -c $dname 28 $gettok(%editcol,3,44)
  506.  
  507. var %x = 1, %y = $lines($qt($scriptdirunrcpal.pal))
  508. while (%x <= %y) {
  509. did -a $dname 18 $gettok($read($qt($scriptdirunrcpal.pal),%x),1,44)
  510. inc %x
  511. }
  512. did -c $dname 18 1
  513. }
  514.  
  515. on *:dialog:editpal:sclick:*: {
  516. if ($did isnum 1-16) {
  517. set %sel.col $did
  518. drawfill -r @editcol $gettok(%temp.pal,$did,44) $gettok(%temp.pal,$did,44) 0 0
  519. drawsave @editcol editcol.bmp
  520. did -gv $dname 31 editcol.bmp
  521. var %editcol = $rgb($gettok(%temp.pal,$did,44))
  522. did -ra $dname 23 $gettok(%editcol,1,44)
  523. did -ra $dname 26 $gettok(%editcol,2,44)
  524. did -ra $dname 29 $gettok(%editcol,3,44)
  525. did -c $dname 24 $gettok(%editcol,1,44)
  526. did -c $dname 25 $gettok(%editcol,2,44)
  527. did -c $dname 28 $gettok(%editcol,3,44)
  528.  
  529. }
  530. if ($did == 19) {
  531. window -hp +f @editpal 0 0 60 60
  532. var %x = 1,%pal = $gettok($read($qt($scriptdirunrcpal.pal),$did(18).sel),2-,44),%editcol = $rgb($gettok(%pal,1,44))
  533. set %temp.pal %pal
  534. set %sel.col 1
  535. while (%x <= 16) {
  536. clear @editpal
  537. drawfill -r @editpal $gettok(%pal,%x,44) $gettok(%pal,%x,44) 0 0
  538. drawsave @editpal editpal.bmp
  539. did -gv $dname %x editpal.bmp
  540. .remove editpal.bmp
  541. inc %x
  542. }
  543. window -c @editpal
  544. drawfill -r @editcol $gettok(%pal,1,44) $gettok(%pal,1,44) 0 0
  545. drawsave @editcol editcol.bmp
  546. did -gv $dname 31 editcol.bmp
  547. var %editcol = $rgb($gettok(%temp.pal,1,44))
  548. did -ra $dname 23 $gettok(%editcol,1,44)
  549. did -ra $dname 26 $gettok(%editcol,2,44)
  550. did -ra $dname 29 $gettok(%editcol,3,44)
  551. did -c $dname 24 $gettok(%editcol,1,44)
  552. did -c $dname 25 $gettok(%editcol,2,44)
  553. did -c $dname 28 $gettok(%editcol,3,44)
  554. }
  555. if ($did == 20) {
  556. var %input = $$input(Enter a name for your new palette:,oue)
  557. write $qt($scriptdirunrcpal.pal) $+(%input,$chr(44),%temp.pal)
  558. did -r $dname 18
  559. var %x = 1, %y = $lines($qt($scriptdirunrcpal.pal))
  560. while (%x <= %y) {
  561. did -a $dname 18 $gettok($read($qt($scriptdirunrcpal.pal),%x),1,44)
  562. inc %x
  563. }
  564. did -c $dname 18 %y
  565. }
  566. if ($did == 21) {
  567. if ($did(18).sel > 2) {
  568. write -dl [ $+ [ $did(18).sel ] ] $qt($scriptdirunrcpal.pal)
  569. did -r $dname 18
  570. var %x = 1, %y = $lines($qt($scriptdirunrcpal.pal))
  571. while (%x <= %y) {
  572. did -a $dname 18 $gettok($read($qt($scriptdirunrcpal.pal),%x),1,44)
  573. inc %x
  574. }
  575. did -c $dname 18 %y
  576. }
  577. }
  578. if ($did == 32) {
  579. set %unrc.dialog unrthemecreator
  580. dialog -x editpal
  581. did -o unrthemecreator 1 17 #PALETTE %temp.pal
  582. .remove editcol.bmp
  583. window -c @editcol
  584. unset %temp.pal
  585. unset %sel.col
  586. }
  587. }
  588.  
  589. on *:dialog:editpal:scroll:*: {
  590. if ($did == 24) {
  591. did -ra $dname 23 $did(24).sel
  592. clear @editcol
  593. drawfill -r @editcol $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) 0 0
  594. drawsave @editcol editcol.bmp
  595. did -gv $dname 31 editcol.bmp
  596. did -gv $dname %sel.col editcol.bmp
  597. set %temp.pal $puttok(%temp.pal,$rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ),%sel.col,44)
  598. }
  599. if ($did == 25) {
  600. did -ra $dname 26 $did(25).sel
  601. clear @editcol
  602. drawfill -r @editcol $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) 0 0
  603. drawsave @editcol editcol.bmp
  604. did -gv $dname 31 editcol.bmp
  605. did -gv $dname %sel.col editcol.bmp
  606. set %temp.pal $puttok(%temp.pal,$rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ),%sel.col,44)
  607. }
  608. if ($did == 28) {
  609. did -ra $dname 29 $did(28).sel
  610. clear @editcol
  611. drawfill -r @editcol $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) 0 0
  612. drawsave @editcol editcol.bmp
  613. did -gv $dname 31 editcol.bmp
  614. did -gv $dname %sel.col editcol.bmp
  615. set %temp.pal $puttok(%temp.pal,$rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ),%sel.col,44)
  616. }
  617. }
  618.  
  619. on *:dialog:editpal:edit:*: {
  620. if ($did == 23) {
  621. if ($did(23) isnum) && ($did(26) isnum) && ($did(29) isnum) {
  622. if ((($did(23) >= 0) && ($did(23) <= 255)) && (($did(26) >= 0) && ($did(26) <= 255)) && (($did(29) >= 0) && ($did(29) <= 255))) {
  623. did -c $dname 24 $did(23)
  624. clear @editcol
  625. drawfill -r @editcol $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) 0 0
  626. drawsave @editcol editcol.bmp
  627. did -gv $dname 31 editcol.bmp
  628. did -gv $dname %sel.col editcol.bmp
  629. set %temp.pal $puttok(%temp.pal,$rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ),%sel.col,44)
  630. }
  631. }
  632. }
  633. if ($did == 26) {
  634. if ($did(23) isnum) && ($did(26) isnum) && ($did(29) isnum) {
  635. if ((($did(23) >= 0) && ($did(23) <= 255)) && (($did(26) >= 0) && ($did(26) <= 255)) && (($did(29) >= 0) && ($did(29) <= 255))) {
  636. did -c $dname 25 $did(26)
  637. clear @editcol
  638. drawfill -r @editcol $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) 0 0
  639. drawsave @editcol editcol.bmp
  640. did -gv $dname 31 editcol.bmp
  641. did -gv $dname %sel.col editcol.bmp
  642. set %temp.pal $puttok(%temp.pal,$rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ),%sel.col,44)
  643. }
  644. }
  645. }
  646. if ($did == 29) {
  647. if ($did(23) isnum) && ($did(26) isnum) && ($did(29) isnum) {
  648. if ((($did(23) >= 0) && ($did(23) <= 255)) && (($did(26) >= 0) && ($did(26) <= 255)) && (($did(29) >= 0) && ($did(29) <= 255))) {
  649. did -c $dname 28 $did(29)
  650. clear @editcol
  651. drawfill -r @editcol $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) $rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ) 0 0
  652. drawsave @editcol editcol.bmp
  653. did -gv $dname 31 editcol.bmp
  654. did -gv $dname %sel.col editcol.bmp
  655. set %temp.pal $puttok(%temp.pal,$rgb( [ $+($did(23),$chr(44),$did(26),$chr(44),$did(29)) ] ),%sel.col,44)
  656. }
  657. }
  658. }
  659. }
  660.  
  661. on *:dialog:editpal:close:*: {
  662. set %unrc.dialog unrthemecreator
  663. .remove editcol.bmp
  664. window -c @editcol
  665. unset %temp.pal
  666. unset %sel.col
  667. }
  668.  
  669. dialog -l viewtags {
  670. title "View Tags"
  671. size -1 -1 158 75
  672. option dbu
  673. edit "", 1, 4 4 150 57, read multi autohs autovs hsbar vsbar
  674. button "Close", 2, 49 62 60 10, ok cancel
  675. }
  676.  
  677. on *:dialog:viewtags:init:*: {
  678. did -a viewtags 1 These are the tags that the UNR Theme Engine reads and evaluates:
  679. did -a viewtags 1 $crlf $chr(32) <cN> - Returns the Nth color as stated in the #COLORS field. (N = 1-4)
  680. did -a viewtags 1 $crlf $str($chr(32),2) <c> - Returns the color code given by ctrl + k.
  681. did -a viewtags 1 $crlf $str($chr(32),2) <b> - Returns the bold code given by ctrl + b.
  682. did -a viewtags 1 $crlf $str($chr(32),2) <u> - Returns the underline code given by ctrl + u.
  683. did -a viewtags 1 $crlf $str($chr(32),2) <r> - Returns the reverse code given by ctrl + r.
  684. did -a viewtags 1 $crlf $str($chr(32),2) <o> - Returns the strip code give by ctrl + o.
  685. did -a viewtags 1 $crlf $chr(32) (It is recommended that you use the tags instead of the actual code as the script was made to evaluate and save the tags.)
  686. }
  687.  
  688. on *:dialog:viewtagsnick:init:*: {
  689. did -a viewtagsnick 1 These are the tags that the UNR Theme Engine reads and evaluates:
  690. did -a viewtagsnick 1 $crlf $chr(32) <cN> - Returns the Nth color as stated in the #COLORS field. (N = 1-4)
  691. did -a viewtagsnick 1 $crlf $str($chr(32),2) <c> - Returns the color code given by ctrl + k.
  692. did -a viewtagsnick 1 $crlf $str($chr(32),2) <b> - Returns the bold code given by ctrl + b.
  693. did -a viewtagsnick 1 $crlf $str($chr(32),2) <u> - Returns the underline code given by ctrl + u.
  694. did -a viewtagsnick 1 $crlf $str($chr(32),2) <r> - Returns the reverse code given by ctrl + r.
  695. did -a viewtagsnick 1 $crlf $str($chr(32),2) <o> - Returns the strip code give by ctrl + o.
  696. did -a viewtagsnick 1 $crlf $chr(32) (It is recommended that you use the tags instead of the actual code as the script was made to evaluate and save the tags.)
  697. did -a viewtagsnick 1 $crlf $chr(32)
  698. did -a viewtagsnick 1 $crlf $chr(32) <nick> - Returns the nickname of person talking.
  699. did -a viewtagsnick 1 $crlf $chr(32) <msg> - Returns the message of the person talking.
  700. }
  701.  
  702. on *:dialog:viewtagsts:init:*: {
  703. did -a viewtagsts 1 These are the tags that the UNR Theme Engine reads and evaluates:
  704. did -a viewtagsts 1 $crlf $chr(32) <cN> - Returns the Nth color as stated in the #COLORS field. (N = 1-4)
  705. did -a viewtagsts 1 $crlf $str($chr(32),2) <c> - Returns the color code given by ctrl + k.
  706. did -a viewtagsts 1 $crlf $str($chr(32),2) <b> - Returns the bold code given by ctrl + b.
  707. did -a viewtagsts 1 $crlf $str($chr(32),2) <u> - Returns the underline code given by ctrl + u.
  708. did -a viewtagsts 1 $crlf $str($chr(32),2) <r> - Returns the reverse code given by ctrl + r.
  709. did -a viewtagsts 1 $crlf $str($chr(32),2) <o> - Returns the strip code give by ctrl + o.
  710. did -a viewtagsts 1 $crlf $chr(32) (It is recommended that you use the tags instead of the actual code as the script was made to evaluate and save the tags.)
  711. did -a viewtagsts 1 $crlf $chr(32)
  712. did -a viewtagsts 1 $crlf $chr(32) The format of the timestamp itself [ie. (hh:nn:sstt)] look up '$asctime' in the mIRC Help File (F1 or /help).
  713. }
  714.  
  715. alias -l viewtags { dialog $iif($dialog($iif($1,$1,viewtags)),-v,-mao) $iif($1,$1,viewtags) viewtags }
  716.  
  717. dialog -l editfont {
  718. title "Edit Field - Font"
  719. size -1 -1 153 60
  720. option dbu
  721. edit "8", 2, 5 12 15 12, read limit 2 center
  722. edit "", 3, 35 13 70 10, autohs
  723. text "Size:", 4, 7 2 16 8
  724. text "Font Name:", 5, 36 2 30 8
  725. button "Preview", 6, 108 13 37 9
  726. icon 7, 5 28 142 18
  727. button "Save", 8, 60 51 37 8
  728. button "+", 9, 20 11 7 7
  729. button "-", 10, 20 18 7 7
  730. }
  731.  
  732. on *:dialog:editfont:init:*: {
  733. set %unrc.dialog editfont
  734. window -hp +f @font.preview 0 0 296 36 | clear @font.preview
  735. drawfill -r @font.preview $rgb(255,255,255) $rgb(255,255,255) 0 0
  736. drawsave @font.preview fontpreview.bmp
  737. window -c @font.preview
  738. did -gv $dname 7 fontpreview.bmp
  739. }
  740.  
  741. on *:dialog:editfont:sclick:*: {
  742. if ($did == 6) {
  743. if ($did(3)) {
  744. window -hp +f @font.preview 0 0 296 36 | clear @font.preview
  745. drawfill -r @font.preview $rgb(255,255,255) $rgb(255,255,255) 0 0
  746. drawtext -r @font.preview $rgb(0,0,0) $qt($did(3)) $+(-,$did(2)) 1 1 $did(3)
  747. drawsave @font.preview fontpreview.bmp
  748. window -c @font.preview
  749. did -gv $dname 7 fontpreview.bmp
  750. }
  751. }
  752. if ($did == 8) {
  753. if ($did(3)) {
  754. did -o unrthemecreator 1 11 #FONT $+(-,$did(2)) $did(3)
  755. dialog -x editfont
  756. set %unrc.dialog unrthemecreator
  757. }
  758. else noop $input(A font must be entered to save!,owu,Error!)
  759. }
  760. if ($did == 9) {
  761. if ($did(2) < 28) {
  762. did -ra $dname 2 $calc($v1 + 1)
  763. }
  764. }
  765. if ($did == 10) {
  766. if ($did(2) > 8) {
  767. did -ra $dname 2 $calc($v1 - 1)
  768. }
  769. }
  770. }
  771.  
  772. on *:dialog:editfont:close:*: {
  773. set %unrc.dialog unrthemecreator
  774. .remove fontpreview.bmp
  775. }
  776.  
  777. alias -l editfont { dialog $iif($dialog(editfont),-v,-mao) editfont editfont }
  778.  
  779. dialog -l unrcedit {
  780. title "Field Edit"
  781. size -1 -1 176 49
  782. option dbu
  783. text "", 1, 4 9 167 8
  784. edit "", 2, 4 19 167 10
  785. button "View Tags", 3, 92 31 34 9
  786. button "Save", 4, 130 31 37 9
  787. }
  788.  
  789. on *:dialog:nickmsg:init:*: {
  790. set %unrc.dialog nickmsg
  791. dialog -t $dname Field Edit - Message Format
  792. did -a $dname 1 Enter what you would like to use as your message format:
  793. did -a $dname 2 $gettok($did(unrthemecreator,1,15).text,2-,32)
  794. }
  795.  
  796. on *:dialog:nickmsg:sclick:*: {
  797. if ($did == 3) { viewtags viewtagsnick }
  798.  
  799. if ($did == 4) {
  800. if ($did(2)) {
  801. did -o unrthemecreator 1 15 #NICKMSG $did(2)
  802. dialog -x nickmsg
  803. set %unrc.dialog unrthemecreator
  804. }
  805. else noop $input(A value must be entered to save!,owu,Error!)
  806. }
  807. }
  808.  
  809. on *:dialog:amsg:close:*:set %unrc.dialog unrthemecreator
  810.  
  811. on *:dialog:amsg:sclick:*: {
  812. if ($did == 3) { viewtags }
  813.  
  814. if ($did == 4) {
  815. if ($did(2)) {
  816. did -o unrthemecreator 1 13 #AMSG $did(2)
  817. dialog -x amsg
  818. set %unrc.dialog unrthemecreator
  819. }
  820. else noop $input(A value must be entered to save!,owu,Error!)
  821. }
  822. }
  823.  
  824. on *:dialog:amsg:close:*:set %unrc.dialog unrthemecreator
  825.  
  826. on *:dialog:timestamp:init:*: {
  827. set %unrc.dialog timestamp
  828. dialog -t $dname Field Edit - Timestamp
  829. did -a $dname 1 Enter the format of your desired timestamp:
  830. did -a $dname 2 $gettok($did(unrthemecreator,1,9).text,2-,32)
  831. }
  832.  
  833. on *:dialog:timestamp:sclick:*: {
  834. if ($did == 3) { viewtags viewtagsts }
  835.  
  836. if ($did == 4) {
  837. if ($did(2)) {
  838. did -o unrthemecreator 1 9 #TIMESTAMP $did(2)
  839. dialog -x timestamp
  840. set %unrc.dialog unrthemecreator
  841. }
  842. else noop $input(A value must be entered to save!,owu,Error!)
  843. }
  844. }
  845.  
  846. on *:dialog:timestamp:close:*:set %unrc.dialog unrthemecreator
  847.  
  848. on *:dialog:rightbracket:init:*: {
  849. set %unrc.dialog rightbracket
  850. dialog -t $dname Field Edit - Right Bracket
  851. did -a $dname 1 Enter the characters you would like to use for your right bracket:
  852. did -a $dname 2 $gettok($did(unrthemecreator,1,7).text,2-,32)
  853. }
  854.  
  855. on *:dialog:rightbracket:sclick:*: {
  856. if ($did == 3) { viewtags }
  857.  
  858. if ($did == 4) {
  859. if ($did(2)) {
  860. did -o unrthemecreator 1 7 #RIGHT $did(2)
  861. dialog -x rightbracket
  862. set %unrc.dialog unrthemecreator
  863. }
  864. else noop $input(A value must be entered to save!,owu,Error!)
  865. }
  866. }
  867.  
  868. on *:dialog:rightbracket:close:*:set %unrc.dialog unrthemecreator
  869.  
  870. on *:dialog:rightbracket:init:*: {
  871. set %unrc.dialog rightbracket
  872. dialog -t $dname Field Edit - Right Bracket
  873. did -a $dname 1 Enter the characters you would like to use for your right bracket:
  874. did -a $dname 2 $gettok($did(unrthemecreator,1,7).text,2-,32)
  875. }
  876.  
  877. on *:dialog:rightbracket:sclick:*: {
  878. if ($did == 3) { viewtags }
  879.  
  880. if ($did == 4) {
  881. if ($did(2)) {
  882. did -o unrthemecreator 1 7 #RIGHT $did(2)
  883. dialog -x rightbracket
  884. set %unrc.dialog unrthemecreator
  885. }
  886. else noop $input(A value must be entered to save!,owu,Error!)
  887. }
  888. }
  889.  
  890. on *:dialog:rightbracket:close:*:set %unrc.dialog unrthemecreator
  891.  
  892. on *:dialog:leftbracket:init:*: {
  893. set %unrc.dialog leftbracket
  894. dialog -t $dname Field Edit - Left Bracket
  895. did -a $dname 1 Enter the characters you would like to use for your left bracket:
  896. did -a $dname 2 $gettok($did(unrthemecreator,1,6).text,2-,32)
  897. }
  898.  
  899. on *:dialog:leftbracket:sclick:*: {
  900. if ($did == 3) { viewtags }
  901.  
  902. if ($did == 4) {
  903. if ($did(2)) {
  904. did -o unrthemecreator 1 6 #LEFT $did(2)
  905. dialog -x leftbracket
  906. set %unrc.dialog unrthemecreator
  907. }
  908. else noop $input(A value must be entered to save!,owu,Error!)
  909. }
  910. }
  911.  
  912. on *:dialog:leftbracket:close:*:set %unrc.dialog unrthemecreator
  913.  
  914. on *:dialog:rprefix:init:*: {
  915. set %unrc.dialog rprefix
  916. dialog -t $dname Field Edit - Raw Event Prefix
  917. did -a $dname 1 Enter the characters you would like to use for your raw event prefix:
  918. did -a $dname 2 $gettok($did(unrthemecreator,1,4).text,2-,32)
  919. }
  920.  
  921. on *:dialog:rprefix:sclick:*: {
  922. if ($did == 3) { viewtags }
  923.  
  924. if ($did == 4) {
  925. if ($did(2)) {
  926. did -o unrthemecreator 1 4 #RAWPREFIX $did(2)
  927. dialog -x rprefix
  928. set %unrc.dialog unrthemecreator
  929. }
  930. else noop $input(A value must be entered to save!,owu,Error!)
  931. }
  932. }
  933.  
  934. on *:dialog:rprefix:close:*:set %unrc.dialog unrthemecreator
  935.  
  936. on *:dialog:prefix:init:*: {
  937. set %unrc.dialog prefix
  938. dialog -t $dname Field Edit - Event Prefix
  939. did -a $dname 1 Enter the characters you would like to use for your event prefix:
  940. did -a $dname 2 $gettok($did(unrthemecreator,1,3).text,2-,32)
  941. }
  942.  
  943. on *:dialog:prefix:sclick:*: {
  944. if ($did == 3) { viewtags }
  945.  
  946. if ($did == 4) {
  947. if ($did(2)) {
  948. did -o unrthemecreator 1 3 #PREFIX $did(2)
  949. dialog -x prefix
  950. set %unrc.dialog unrthemecreator
  951. }
  952. else noop $input(A value must be entered to save!,owu,Error!)
  953. }
  954. }
  955.  
  956. on *:dialog:prefix:close:*:set %unrc.dialog unrthemecreator
  957.  
  958. on *:dialog:name:init:*: {
  959. set %unrc.dialog name
  960. dialog -t $dname Field Edit - Theme Name
  961. did -b $dname 3
  962. did -a $dname 1 Enter the name of your new theme:
  963. did -a $dname 2 $gettok($did(unrthemecreator,1,1).text,2-,32)
  964. }
  965.  
  966. on *:dialog:name:sclick:*: {
  967. if ($did == 3) { halt }
  968.  
  969. if ($did == 4) {
  970. if ($did(2)) {
  971. did -o unrthemecreator 1 1 #NAME $did(2)
  972. dialog -x name
  973. set %unrc.dialog unrthemecreator
  974. }
  975. else noop $input(A value must be entered to save!,owu,Error!)
  976. }
  977. }
  978.  
  979. on *:dialog:name:close:*: {
  980. set %unrc.dialog unrthemecreator
  981. }
  982.  
  983. on *:dialog:unrthemecreator:init:*: {
  984. set %unrc.dialog unrthemecreator
  985. var %f = $shortfn($scriptdirdefault.unrc)
  986. loadbuf $lines(%f) -o $dname 1 %f
  987. }
  988.  
  989.  
  990. on *:dialog:unrthemecreator:close:*: {
  991. $iif($hget(unrcschemes),.hfree unrcschemes,halt)
  992. }
  993.  
  994. on *:dialog:unrthemecreator:sclick:*: {
  995. if (%unrc.dialog == unrthemecreator) {
  996. if ($did == 1) {
  997. did -r $dname 13
  998. unrfieldinfo $did(1).sel
  999. }
  1000.  
  1001. if ($did == 3) {
  1002. if ($did(3).state == 1) {
  1003. .hmake unrcschemes 10
  1004. did -e $dname 4-6
  1005. while (%input == $null) { var %input = $input(Enter the name of a default scheme (Required. Only 1 word.),oeu,Schemes Enabled,Default) }
  1006. .hadd unrcschemes %input %input
  1007. did -a $dname 4 %input
  1008. var %x = $gettok($did(1,19),2-,32),%y = $gettok($did(1,20),2-,32),%z = $gettok($did(1,21),2-,32),%w = $gettok($did(1,22),2-,32)
  1009. did -o $dname 1 19 #SCHEMES %input
  1010. did -o $dname 1 20 $+($chr(47),$chr(47))
  1011. did -o $dname 1 21 $addtok(#COLORS,%input,46) %x
  1012. did -o $dname 1 22 $addtok(#MODECOLOR,%input,46) %y
  1013. did -a $dname 1 $addtok(#OWNCOLOR,%input,46) %z
  1014. did -a $dname 1 $addtok(#SCHEME,%input,46) %w
  1015. }
  1016. else {
  1017. while (%input == $null) { var %input = $input(Are you sure you want to disable schemes? All your schemes will be deleted!,uyvw) }
  1018. if (%input == $yes) {
  1019. .hfree unrcschemes
  1020. did -r $dname 4
  1021. did -b $dname 4-6
  1022. var %w = $gettok($did(1,21),2-,32),%x = $gettok($did(1,22),2-,32),%y = $gettok($did(1,23),2-,32),%z = $gettok($did(1,24),2-,32)
  1023. while ($did(1).lines >= 19) {
  1024. did -d $dname 1 $did(1).lines
  1025. }
  1026. did -a $dname 1 #COLORS %w
  1027. did -a $dname 1 #MODECOLOR %x
  1028. did -a $dname 1 #OWNCOLOR %y
  1029. did -a $dname 1 #SCHEME %z
  1030. }
  1031. else {
  1032. did -c $dname 3
  1033. halt
  1034. }
  1035. }
  1036. }
  1037. if ($did == 5) {
  1038. if ($did(4)) {
  1039. if (!$hget(unrcschemes,$did(4))) {
  1040. hadd unrcschemes $did(4) $did(4)
  1041. did -a $dname 4 $did(4)
  1042. var %f = $shortfn($scriptdirdefault.unrc),%nschm = $addtok($did(1,19),$did(4),32)
  1043. did -o $dname 1 19 %nschm
  1044. did -a $dname 1 $addtok(#COLORS,$did(4),46) $gettok($read(%f,19),2-,32)
  1045. did -a $dname 1 $addtok(#MODECOLOR,$did(4),46) $gettok($read(%f,20),2-,32)
  1046. did -a $dname 1 $addtok(#OWNCOLOR,$did(4),46) $gettok($read(%f,21),2-,32)
  1047. did -a $dname 1 $addtok(#SCHEME,$did(4),46) $gettok($read(%f,22),2-,32)
  1048. }
  1049. }
  1050. }
  1051. if ($did == 6) {
  1052. if ($did(4).seltext) && ($numtok($didtok($dname,4,32),32) > 1) {
  1053. hdel unrcschemes $did(4).seltext
  1054. var %num = 21
  1055. while ($gettok($gettok($did(1,%num),1,32).text,2,46) != $did(4).seltext) {
  1056. inc %num
  1057. }
  1058. var %num2 = $calc(%num + 3)
  1059. while (%num <= %num2) {
  1060. did -d $dname 1 %num2
  1061. dec %num2
  1062. }
  1063. did -d $dname 4 $did(4).sel
  1064. }
  1065. }
  1066. if ($did == 8) {
  1067. var %input = $input(Are you sure you want to reset all fields? All preferences and schemes will be lost.,ywvu)
  1068. if (%input = $yes) {
  1069. did -r $dname 1
  1070. var %f = $shortfn($scriptdirdefault.unrc)
  1071. loadbuf $lines(%f) -o $dname 1 %f
  1072. if ($did(3).state == 1) {
  1073. did -u $dname 3
  1074. .hfree unrcschemes
  1075. did -r $dname 4
  1076. did -b $dname 4-6
  1077. }
  1078. }
  1079. }
  1080. if ($did == 9) {
  1081. if ($did(10)) {
  1082. var %seldir = $sdir($scriptdir,Select where you'd like to save your theme:),%x = 1, %y = $did($dname,1).lines
  1083. if (!$exists($qt($+(%seldir,$gettok($did(10),1,32),.unr)))) {
  1084. while (%x <= %y) {
  1085. write $qt($+(%seldir,$gettok($did(10),1,32),.unr)) $did($dname,1,%x)
  1086. inc %x
  1087. }
  1088. if ($did(12).state == 1) {
  1089. if (!$read($themes.lst,w,$shortfn($+(%seldir,$gettok($did(10),1,32),.unr)))) {
  1090. write $themes.lst $shortfn($+(%seldir,$gettok($did(10),1,32),.unr))
  1091. $iif($dialog(dialogThmLdr),refresh.Themes)
  1092. }
  1093. }
  1094. dialog -x $dname
  1095. }
  1096. else noop $input(Theme file already exists. Please select a different filename or directory.,owu)
  1097. }
  1098. else noop $input(A Filename must be entered to save.,owu)
  1099. }
  1100. }
  1101. }
  1102.  
  1103. on *:dialog:unrthemecreator:dclick:*: {
  1104. if (%unrc.dialog == unrthemecreator) {
  1105. if ($did == 1) {
  1106. unrfieldedit $did(1).sel
  1107. }
  1108. }
  1109. }
  1110.  
  1111. on *:LOAD: {
  1112. if ($hget(theme)) .hfree theme
  1113. temp.thm
  1114. hsave theme $shortfn($scriptdirtheme.hsh)
  1115. if (!$isfile($shortfn($scriptdirReadMe.txt))) { write $shortfn($scriptdirReadMe.txt) NO README FILE FOUND }
  1116. if (!$isfile($shortfn($scriptdirdpreview.bmp))) {
  1117. window -hp +f @Theme.dPreview 0 0 500 200 | clear @Theme.dPreview
  1118. drawfill -r @Theme.dpreview $rgb(192,192,192) $rgb(192,192,192) 0 0
  1119. drawsave @Theme.dpreview $qt($scriptdirdpreview.bmp)
  1120. window -c @Theme.dpreview
  1121. }
  1122. $iif(!$exists($themes.lst),write $qt($scriptdirthemes.lst))
  1123. write -c $qt($scriptdirdefault.unrc)
  1124. var %w = write $qt($scriptdirdefault.unrc)
  1125. %w #NAME Default
  1126. %w //
  1127. %w #PREFIX **
  1128. %w #RAWPREFIX *
  1129. %w //
  1130. %w #LEFT <b><c1>[<b><o>
  1131. %w #RIGHT <b><c1>]<b><o>
  1132. %w //
  1133. %w #TIMESTAMP <c1><b>[<b><o>hh<c1>:<o>nn<c1>:<o>sstt<c1><b>]<b><o>
  1134. %w //
  1135. %w #FONT -8 Verdana
  1136. %w //
  1137. %w #AMSG xAmsgx
  1138. %w //
  1139. %w #NICKMSG (<nick>) <msg>
  1140. %w //
  1141. %w #PALETTE 16777215,0,14772545,2330216,190,2763429,14822282,1803490,55295,3329434,11829830,15453831,13434880,8421616,9470064,12632256
  1142. %w //
  1143. %w #COLORS 12 14 04 15
  1144. %w #MODECOLOR 12 14 04 15 11
  1145. %w #OWNCOLOR 10
  1146. %w #SCHEME 00,06,04,05,02,03,03,03,03,03,03,01,05,07,06,01,03,02,03,05,01,00,01,00,01,15,06,00,00,01
  1147. write -c $qt($scriptdirunrcpal.pal)
  1148. var %w = write $qt($scriptdirunrcpal.pal)
  1149. %w unReal,16777215,0,14772545,2330216,190,2763429,14822282,1803490,55295,3329434,11829830,15453831,13434880,8421616,9470064,12632256
  1150. %w mIRC Classic,16777215,0,8323072,37632,255,127,10223772,32764,65535,64512,9671424,16776960,16515072,16711935,8355711,13816530
  1151. echo -s *** unRealIRC Theme Engine Successfully Loaded.
  1152. echo -s *** Make Sure the File is Placed Last in the Order of Files. (Remotes -> File -> Order)
  1153. }
  1154.  
  1155. alias -l temp.thm { var %h = hadd -m Theme
  1156. %h Theme Temporary Default | %h File N/A
  1157. %h c1 12 | %h c2 14 | %h c3 04 | %h c4 15 | %h Owncolor 10
  1158. %h c~ 12 | %h c& 14 | %h c@ 04 | %h c% 15 | %h c+ 11
  1159. %h Prefix ** | %h Rawprefix *
  1160. %h Left 15[ | %h Right 15]
  1161. %h Timestamp (hh:nn:sstt)
  1162. %h Amsg (AmsG)
  1163. %h Nickmsg (<nick>) <msg>
  1164. .cnick -r $+($chr(36),me)
  1165. .cnick -a $+($chr(36),me) $ttok(OWNCOLOR)
  1166. var %mnum = 1
  1167. while (%mnum <= 5) { .cnick -r *
  1168. inc %mnum }
  1169. .cnick * $ttok(c~) ~ | .cnick * $ttok(c&) & | .cnick * $ttok(c@) @ | .cnick * $ttok(c%) % | .cnick * $ttok(c+) +
  1170. .timestamp -f $ttok(Timestamp)
  1171. }
  1172.  
  1173. menu channel,menubar,status,query {
  1174. Theme Loader:thmldr
  1175. }
  1176.  
  1177. alias thmldr { if ($dialog(dialogThmLdr)) { dialog -v dialogThmLdr dialogThmLdr }
  1178. else { dialog -vdm dialogThmLdr dialogThmLdr } }
  1179.  
  1180. alias -l themes.lst { return $shortfn($scriptdirthemes.lst) }
  1181.  
  1182. alias refresh.Themes {
  1183. did -r dialogThmLdr 2
  1184. did -ra dialogThmLdr 9 Themes: $lines($themes.lst)
  1185. var %thmnum = 1
  1186. while (%thmnum <= $lines($themes.lst)) {
  1187. did -a dialogThmLdr 2 $read($read($themes.lst,%thmnum),s,#NAME)
  1188. inc %thmnum
  1189. }
  1190. if (%theme.autogen) { did -c dialogThmLdr 7 }
  1191. }
  1192.  
  1193. dialog dialogThmLdr {
  1194. title "Theme Loader"
  1195. size -1 -1 337 135
  1196. option dbu
  1197.  
  1198. icon 1, 84 1 250 100, $scriptdirdpreview.bmp, 0
  1199.  
  1200. list 2, 3 1 80 100, size
  1201.  
  1202. combo 3, 3 104 80 36, size drop
  1203.  
  1204. button "Apply", 4, 258 104 37 12
  1205. button "Preview", 5, 218 104 37 12
  1206. button "Exit", 6, 298 104 37 12, ok
  1207.  
  1208. check "Auto-Generate Preview", 7, 96 105 69 10
  1209.  
  1210. edit "", 8, 145 120 190 10, read
  1211. edit "", 9, 2 120 50 10, read
  1212. edit "", 10, 53 120 90 10, read
  1213.  
  1214. menu "File", 11
  1215.  
  1216. item "Load...", 12, 11
  1217. item "Unload", 13, 11
  1218. item Break, 14, 11
  1219. item "Reload Current", 15, 11
  1220. item Break, 16, 11
  1221. item "Exit", 17, 11, cancel
  1222.  
  1223. menu "Help", 18
  1224.  
  1225. item "Read Me", 19, 18
  1226. item Break, 20, 18
  1227. item "About", 21, 18
  1228.  
  1229. button "Create New...", 22, 178 104 37 12
  1230. }
  1231.  
  1232. on *:dialog:dialogThmLdr:init:*: {
  1233. refresh.Themes
  1234. did -ra $dname 10 Theme: $thm \ Scheme: $schm
  1235. }
  1236.  
  1237. on *:dialog:dialogThmLdr:sclick:*: {
  1238. if ($did == 2) {
  1239. if ($did(2).seltext) {
  1240. if (!%theme.autogen) did -gv $dname 1 $shortfn($scriptdirdpreview.bmp)
  1241. did -r $dname 3
  1242. if ($read($shortfn($read($themes.lst,$did(2).sel)),s,#SCHEMES)) {
  1243. did -e $dname 3
  1244. var %schemes = $read($shortfn($read($themes.lst,$did(2).sel)),s,#SCHEMES)
  1245. var %schmnum = 1
  1246. while (%schmnum <= $numtok(%schemes,32)) {
  1247. did -a $dname 3 $gettok(%schemes,%schmnum,32)
  1248. inc %schmnum
  1249. }
  1250. did -c $dname 3 1
  1251. if (%theme.autogen) preview.theme
  1252. }
  1253. else {
  1254. did -b $dname 3
  1255. if (%theme.autogen) {
  1256. preview.Theme
  1257. }
  1258. }
  1259. }
  1260. }
  1261. if (($did == 3) && ($did(3).seltext)) {
  1262. if (%theme.autogen) { preview.Theme }
  1263. }
  1264. if ($did == 4) {
  1265. if ($did(2).seltext) {
  1266. if ($read($shortfn($read($themes.lst,$did(2).sel)),s,#SCHEMES)) {
  1267. if ($did(3).seltext) {
  1268. theme.load $shortfn($read($themes.lst,$did(2).sel)) $did(3).seltext
  1269. }
  1270. else { did -ra $dname 8 ERROR: To apply Theme a Scheme must be selected!
  1271. }
  1272. else { theme.load $shortfn($read($themes.lst,$did(2).sel)) }
  1273. did -ra $dname 10 Theme: $thm \ Scheme: $schm
  1274. }
  1275. else { theme.load $shortfn($read($themes.lst,$did(2).sel)) }
  1276. }
  1277. else { did -ra $dname 8 ERROR: A theme must be selected! }
  1278. }
  1279. if ($did == 5) { preview.theme }
  1280. if ($did == 7) {
  1281. if ($did(7).state == 0) { unset %theme.autogen }
  1282. if ($did(7).state == 1) { set %theme.autogen On }
  1283. }
  1284. if ($did == 22) { createtheme }
  1285. }
  1286.  
  1287. on *:dialog:dialogThmLdr:menu:*: {
  1288. if ($did == 12) {
  1289. var %newThm = $sfile($mircdir*unr,Select Theme to Load...,Load)
  1290. if (!$read($themes.lst,w,$shortfn(%newThm))) {
  1291. write $themes.lst $shortfn(%newThm)
  1292. refresh.Themes
  1293. }
  1294. else { did -ra $dname 8 ERROR: Theme file already loaded! }
  1295. }
  1296. if ($did == 13) {
  1297. if ($did(2).seltext) {
  1298. var %thmunl = $input(You sure you would like to unload: $did(2).seltext ?,yu,Confirm Action)
  1299. if (%thmunl == $true) { write -dl [ $+ [ $did(2).sel ] ] $themes.lst
  1300. refresh.Themes
  1301. }
  1302. }
  1303. else { did -ra $dname 8 ERROR: Please select a Theme to Unload! }
  1304. }
  1305. if ($did == 15) { theme.reload | did -ra $dname 10 Theme: $thm \ Scheme: $schm }
  1306. if ($did == 19) {
  1307. if ($isfile($shortfn($scriptdirReadMe.txt))) {
  1308. if (!$window(@Theme.ReadMe)) {
  1309. window -ad @Theme.ReadMe -1 -1 -1 -1
  1310. loadbuf $lines($scriptdirReadMe.txt) @Theme.ReadMe $shortfn($scriptdirReadMe.txt)
  1311. }
  1312. else { window -ar @Theme.ReadMe }
  1313. }
  1314. }
  1315. if ($did == 21) { dialog $iif($dialog(dialogThmAbout),-v,-vma) dialogThmAbout dialogThmAbout }
  1316. }
  1317.  
  1318. on *:dialog:dialogThmLdr:mouse:*: {
  1319. if ($did == 0) { did -r $dname 8 }
  1320. elseif ($did == 1) { did -ra $dname 8 Here is where your Theme's Preview will be generated. }
  1321. elseif ($did == 2) { did -ra $dname 8 Your loaded Themes. }
  1322. elseif ($did == 3) { did -ra $dname 8 The schemes of your selected Theme. }
  1323. elseif ($did == 4) { did -ra $dname 8 Applies your selected Theme. }
  1324. elseif ($did == 5) { did -ra $dname 8 Generate a Preview of your selected Theme. }
  1325. elseif ($did == 6) { did -ra $dname 8 Closes the dialog. }
  1326. elseif ($did == 7) { did -ra $dname 8 If checked preview will auto-generate (Scheme must be selected if available). }
  1327. elseif ($did == 8) { did -ra $dname 8 Here is where your 'On-Task' Help will be generated. }
  1328. elseif ($did == 9) { did -ra $dname 8 Number of Themes you currently have loaded. }
  1329. elseif ($did == 10) { did -ra $dname 8 Theme you are currently using. }
  1330. elseif ($did == 22) { did -ra $dname 8 Opens the UNR Theme Creator dialog. }
  1331. }
  1332.  
  1333. alias -l preview.Theme {
  1334. if ($dialog(dialogThmLdr)) {
  1335. if ($did(2).seltext) {
  1336. set %thmfile $shortfn($read($themes.lst,$did(2).sel))
  1337. if ($read(%thmfile,s,#SCHEMES)) {
  1338. if (!$did(3)) { did -ra $dname 8 ERROR: A Scheme must be selected! | halt }
  1339. set %schm $+(#SCHEME,$chr(46),$did(3).seltext)
  1340. set %pschm $+($chr(46),$did(3).seltext)
  1341. }
  1342. else { var %schm = #SCHEME }
  1343. }
  1344. window -hp +f @Theme.Preview 0 0 500 200 | clear @Theme.Preview
  1345. if ($isfile($shortfn($scriptdirpreview.bmp))) { .remove $shortfn($scriptdirpreview.bmp) }
  1346. drawfill -r @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),1,44) + 1),44) $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),1,44) + 1),44) 0 0
  1347. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),8,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 0 $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,02,ss,52,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Join) Hirako : ~Vizard@XC-DW1337.socal.res.com
  1348. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),10,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,13) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,02,ss,53,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Mode Set) +o Hirako : set by ChanServ
  1349. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),12,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,26) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,02,ss,55,tt,pm,t,p,TT,PM,T,P) $pttok(5,+,Pyro,How do I use this script?).n
  1350. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),10,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,39) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,01,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Mode Set) +b *!*@XC-568DH48.cable.cal.net : set by $me
  1351. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),9,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,52) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,01,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Kick) Pyro from #unReal : by $me » BOOM! Headshot! - unRealIRC - 89
  1352. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),16,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,65) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,05,tt,pm,t,p,TT,PM,T,P) $pttok(@,$me,Noobs really annoy me...).m
  1353. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),12,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,78) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,08,tt,pm,t,p,TT,PM,T,P) $pttok(3,@,Hirako,Lulz. Abuse much?).n
  1354. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),2,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,91) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,14,tt,pm,t,p,TT,PM,T,P) » @ $me slaps Hirako around with a "Ask me if I care?"
  1355. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),12,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,104) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,21,tt,pm,t,p,TT,PM,T,P) $pttok(4,%,Hyrule,Hey $me can you help me for a sec?).n
  1356. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),16,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,117) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,23,tt,pm,t,p,TT,PM,T,P) $pttok(@,$me,Sure Hyrule).m
  1357. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),6,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,130) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,27,tt,pm,t,p,TT,PM,T,P) $pttok(#RAWPREFIX).e [Incoming Private Message] Hyrule : ~Zelda@XC-5895J7.dslw.net
  1358. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),18,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,143) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,49,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Quit) Hyrule : ~Zelda@XC-5895J7.dsl.net « Quit: user exited
  1359. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),13,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,156) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,03,ss,53,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Notice : #unReal) @ Hirako » Behave while I'm away!
  1360. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),11,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,169) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,04,ss,01,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Nick Change) Hirako is now Hir[a]ko
  1361. drawtext -pr @Theme.Preview $gettok($read(%thmfile,s,#PALETTE),$calc($gettok($read(%thmfile,s,%schm),17,44) + 1),44) $qt($gettok($read(%thmfile,s,#FONT),2-,32)) $gettok($read(%thmfile,s,#FONT),1,32) 0 $linespace(%thmfile,182) $chr(160) $replacecs($pttok(#TIMESTAMP).e,yy,10,yyyy,2010,m,1,mm,01,mmm,Jan,mmmm,January,d,1,dd,01,ddd,Mon,dddd,Monday,HH,13,H,13,hh,01,h,1,nn,04,ss,09,tt,pm,t,p,TT,PM,T,P) $pttok(#PREFIX).e (Part) Dead : ~Death@XC-32LK4R.socal.cable.com
  1362. drawsave @Theme.Preview $qt($scriptdirpreview.bmp)
  1363. window -c @Theme.Preview
  1364. did -gv $dname 1 $qt($scriptdirpreview.bmp)
  1365. unset %thmfile
  1366. unset %schm
  1367. unset %pschm
  1368. }
  1369. else { did -ra $dname 8 ERROR: Please select a theme to preview! }
  1370. }
  1371.  
  1372.  
  1373. alias -l linespace {
  1374. if ($left($gettok($read($1,s,#FONT),1,32),1) == -) {
  1375. var %fontsize = $remove($gettok($read($1,s,#FONT),1,32),-)
  1376. return $round($calc((%fontsize * $2) / 8),0)
  1377. }
  1378. else {
  1379. var %fontsize = $gettok($read($1,s,#FONT),1,32)
  1380. return $round($calc((%fontsize * $2) / 11),0)
  1381. }
  1382. }
  1383.  
  1384. dialog -l dialogThmAbout {
  1385. title About...
  1386. size -1 -1 176 73
  1387. option dbu
  1388. text unRealIRC Theme Engine V5 $+ $crlf $+ $crlf $+ Version: Public Beta 1.0 $+ $crlf $+ $crlf $+ Created by DarkWarrior $+ $crlf $+ $crlf $+ Contact: irc.xerocreative.com @ #AK / User: DarkWarrior , 1, 14 3 150 45, center
  1389. text DarkWarrior© 2009 All Rights Reserved., 2, 14 51 150 8, disable centerr
  1390. button "Close", 3, 68 62 37 10, ok cancel
  1391. }
  1392.  
  1393. alias pc { return $+($chr(3),$gettok($read(%thmfile,s,$+(#COLORS,%pschm)),$1,32)) }
  1394.  
  1395.  
  1396. alias pttok {
  1397. if ($prop == e) {
  1398. var %preturn1 = $replace($read(%thmfile,s,$1),<c>,$chr(3),<c1>,$pc(1),<c2>,$pc(2),<c3>,$pc(3),<c4>,$pc(4),<u>,,<r>,,<b>,,<o>,)
  1399. return %preturn1
  1400. }
  1401. if ($prop == n) {
  1402. var %preturn2 = $replace($read(%thmfile,s,#NICKMSG),<nick>,$2 $+($chr(3),$gettok($read(%thmfile,s,$+(#MODECOLOR,%pschm)),$1,32),$3,$chr(3)),<msg>,$4-,<c>,$chr(3),<c1>,$pc(1),<c2>,$pc(2),<c3>,$pc(3),<c4>,$pc(4),<u>,,<r>,,<b>,,<o>,)
  1403. return %preturn2
  1404. }
  1405. if ($prop == m) {
  1406. var %preturn4 = $replace($read(%thmfile,s,#NICKMSG),<nick>,$1 $+($chr(3),$read(%thmfile,s,$+(#OWNCOLOR,%pschm)),$2,$chr(3)),<msg>,$3-,<c>,$chr(3),<c1>,$pc(1),<c2>,$pc(2),<c3>,$pc(3),<c4>,$pc(4),<u>,,<r>,,<b>,,<o>,)
  1407. return %preturn4
  1408. }
  1409. if (!$prop) {
  1410. var %preturn3 = $replace($1-,<c>,,<c1>,$pc(1),<c2>,$pc(2),<c3>,$pc(3),<c4>,$pc(4),<u>,,<r>,,<b>,,<o>,)
  1411. return %preturn3
  1412. }
  1413. }
  1414.  
  1415. alias ttok {
  1416. if (!$prop) { return $hget(Theme,$1) }
  1417. if ($prop == c) {
  1418. if ($1 isnum 1-4) { return c [ $+ [ $1 ] ] $gettok($2,$1,32) }
  1419. }
  1420. if ($prop == r) { return $replace($1,<c>,,<c1>,$c(1),<c2>,$c(2),<c3>,$c(3),<c4>,$c(4),<u>,,<b>,,<r>,,<o>,)
  1421. }
  1422. }
  1423.  
  1424. alias thm { return $ttok(Theme) }
  1425.  
  1426. alias schm {
  1427. if ($ttok(Schm)) {
  1428. return $ttok(Schm)
  1429. }
  1430. else {
  1431. return N/A
  1432. }
  1433. }
  1434.  
  1435. alias -l theme.load {
  1436. if ($isfile($1)) {
  1437. if ($right($1,4) == .unr) { var %thm = $1
  1438. if ($read(%thm,st,#SCHEMES)) { var %thm.schm = $+($chr(46),$2) }
  1439. if ($hget(Theme)) { hfree theme }
  1440. hmake theme 20
  1441. var %h = hadd -m Theme
  1442. %h Theme $read(%thm,st,#NAME)
  1443. %h Schm $2
  1444. %h File %thm
  1445. var %cnum = 1,%clrs = $read(%thm,st,$+(#COLORS,%thm.schm))
  1446. while (%cnum <= 4) {
  1447. %h $ttok(%cnum,%clrs).c
  1448. inc %cnum
  1449. }
  1450. %h Owncolor $read(%thm,st,$+(#OWNCOLOR,%thm.schm))
  1451. .cnick -r $+($chr(36),me)
  1452. .cnick -a $+($chr(36),me) $ttok(OWNCOLOR)
  1453. var %mcol = $read(%thm,st,$+(#MODECOLOR,%thm.schm))
  1454. %h c~ $gettok(%mcol,1,32)
  1455. %h c& $gettok(%mcol,2,32)
  1456. %h c@ $gettok(%mcol,3,32)
  1457. %h c% $gettok(%mcol,4,32)
  1458. %h c+ $gettok(%mcol,5,32)
  1459. var %mnum = 1
  1460. while (%mnum <= 5) { .cnick -r *
  1461. inc %mnum }
  1462. .cnick * $ttok(c~) ~
  1463. .cnick * $ttok(c&) &
  1464. .cnick * $ttok(c@) @
  1465. .cnick * $ttok(c%) %
  1466. .cnick * $ttok(c+) +
  1467. %h Prefix $ttok($read(%thm,st,#PREFIX)).r
  1468. %h Rawprefix $ttok($read(%thm,st,#RAWPREFIX)).r
  1469. %h Left $ttok($read(%thm,st,#LEFT)).r
  1470. %h Right $ttok($read(%thm,st,#RIGHT)).r
  1471. %h Timestamp $ttok($read(%thm,st,#TIMESTAMP)).r
  1472. %h Amsg $ttok($read(%thm,st,#AMSG)).r
  1473. %h Nickmsg $ttok($read(%thm,st,#NICKMSG)).r
  1474. %h Font $read(%thm,st,#FONT)
  1475. %h Scheme $read(%thm,st,$+(#SCHEME,%thm.schm))
  1476. %h Palette $read(%thm,st,#PALETTE)
  1477. writeini mirc.ini colors n0 Theme, $+ $ttok(Scheme)
  1478. writeini mirc.ini palettes n0 $ttok(Palette)
  1479. color -ls Theme
  1480. .timestamp -f $ttok(Timestamp)
  1481. .font -zd $ttok(Font)
  1482. if ($hget(theme)) .hsave -o theme $scriptdirtheme.hsh
  1483. else { hmake theme 20 | .hsave -o theme $scriptdirtheme.hsh }
  1484. echo $color(info2) -a $rpre Theme: $thm \ Scheme: $schm (Successfully Loaded.)
  1485. halt
  1486. }
  1487. else { did -ra $dname 8 ERROR: Incorrect file type! (Theme files: *.unr) | halt }
  1488. }
  1489. else { did -ra $dname 8 ERROR: Theme file does not exist! | halt }
  1490. :error
  1491. did -ra $dname 8 ERROR: Theme File unable to Load. ( $+ $error $+ )
  1492. }
  1493.  
  1494. alias -l theme.reload {
  1495. if ($isfile($ttok(file))) {
  1496. if ($right($ttok(file),4) == .unr) { var %thm = $ttok(file)
  1497. if ($read(%thm,st,#SCHEMES)) { var %thm.schm = $+($chr(46),$schm) }
  1498. if ($hget(Theme)) { hfree theme }
  1499. hmake theme 20
  1500. var %h = hadd -m Theme
  1501. %h Theme $read(%thm,st,#NAME)
  1502. %h Schm $right(%thm.schm,$calc($len(%thm.schm) - 1))
  1503. %h File %thm
  1504. var %cnum = 1,%clrs = $read(%thm,st,$+(#COLORS,%thm.schm))
  1505. while (%cnum <= 4) {
  1506. %h $ttok(%cnum,%clrs).c
  1507. inc %cnum
  1508. }
  1509. %h Owncolor $read(%thm,st,$+(#OWNCOLOR,%thm.schm))
  1510. .cnick -r $+($chr(36),me)
  1511. .cnick -a $+($chr(36),me) $ttok(OWNCOLOR)
  1512. var %mcol = $read(%thm,st,$+(#MODECOLOR,%thm.schm))
  1513. %h c~ $gettok(%mcol,1,32)
  1514. %h c& $gettok(%mcol,2,32)
  1515. %h c@ $gettok(%mcol,3,32)
  1516. %h c% $gettok(%mcol,4,32)
  1517. %h c+ $gettok(%mcol,5,32)
  1518. var %mnum = 1
  1519. while (%mnum <= 5) { .cnick -r *
  1520. inc %mnum }
  1521. .cnick * $ttok(c~) ~
  1522. .cnick * $ttok(c&) &
  1523. .cnick * $ttok(c@) @
  1524. .cnick * $ttok(c%) %
  1525. .cnick * $ttok(c+) +
  1526. %h Prefix $ttok($read(%thm,st,#PREFIX)).r
  1527. %h Rawprefix $ttok($read(%thm,st,#RAWPREFIX)).r
  1528. %h Left $ttok($read(%thm,st,#LEFT)).r
  1529. %h Right $ttok($read(%thm,st,#RIGHT)).r
  1530. %h Timestamp $ttok($read(%thm,st,#TIMESTAMP)).r
  1531. %h Amsg $ttok($read(%thm,st,#AMSG)).r
  1532. %h Nickmsg $ttok($read(%thm,st,#NICKMSG)).r
  1533. %h Font $read(%thm,st,#FONT)
  1534. %h Scheme $read(%thm,st,$+(#SCHEME,%thm.schm))
  1535. %h Palette $read(%thm,st,#PALETTE)
  1536. writeini mirc.ini colors n0 Theme, $+ $ttok(Scheme)
  1537. writeini mirc.ini palettes n0 $ttok(Palette)
  1538. color -ls Theme
  1539. .timestamp -f $ttok(Timestamp)
  1540. .font -zd $ttok(Font)
  1541. if ($hget(theme)) .hsave -o theme $scriptdirtheme.hsh
  1542. else { hmake theme 20 | .hsave -o theme $scriptdirtheme.hsh }
  1543. echo $color(info2) -a $rpre Theme: $thm \ Scheme: $schm (Successfully Reloaded.)
  1544. halt
  1545. }
  1546. else { did -ra $dname 8 ERROR: Incorrect file type! (Theme files: *.unr) | halt }
  1547. }
  1548. else { did -ra $dname 8 ERROR: Theme file does not exist! | temp.thm | halt }
  1549. :error
  1550. did -ra $dname 8 ERROR: Theme File unable to Reload. ( $+ $error $+ )
  1551. }
  1552.  
  1553. alias rpre { return $ttok(Rawprefix) }
  1554.  
  1555. alias pre { return $ttok(Prefix) }
  1556.  
  1557. alias c { if ($1 isnum 1-4) {
  1558. return $+(,$dd($ttok(c [ $+ [ $1 ] ]))) }
  1559. }
  1560.  
  1561. alias dd { if ($1 isnum) { return $iif($len($1) < 2, $+(0,$1),$1) } }
  1562.  
  1563. alias stat { if ($1 ison $2) { return $left($remove($nick($2,$1).pnick,$1),1) } }
  1564.  
  1565. alias statc { return $iif($cnick($stat($1,$2)).color >= 0,  $+ $cnick($stat($1,$2)).color $+ $1 $+ ,$1) }
  1566.  
  1567. alias ownc { return $iif($cnick(1).color >= 0,  $+ $cnick(1).color $+ $1 $+ ,$1) }
  1568.  
  1569. on &^*:TEXT:*:?: { echo $color(normal) -mt $nick $replace($ttok(Nickmsg),<nick>,$nick,<msg>,$1-)
  1570. haltdef }
  1571.  
  1572. on &^*:TEXT:*:#: { echo $color(normal) -mt $chan $replace($ttok(Nickmsg),<nick>,$stat($nick,$chan) $statc($nick,$chan),<msg>,$1-)
  1573. haltdef }
  1574.  
  1575. on &^*:ACTION:*:#: {
  1576. echo $color(Action) -mt $target » $stat($nick,$chan) $nick $1-
  1577. haltdef }
  1578.  
  1579. on &^*:ACTION:*:?: { echo $color(Action) -mt $nick » $nick $1- | haltdef }
  1580.  
  1581. on &*:INPUT:*: { if (!$iscmd($1)) { msg $active $1- } }
  1582.  
  1583. on &^*:NOTICE:*:*: {
  1584. if ($target == $me) {
  1585. var %target = -atm
  1586. if ($nick isin $serv) {
  1587. var %notice = ( $+ $nick $+ )
  1588. }
  1589. else var %notice = (Private Notice) $nick
  1590. }
  1591. else {
  1592. if ($target == $chan) {
  1593. var %target = -tm $chan
  1594. if ($nick isin $serv) var %notice = ( $+ $nick : $chan $+ )
  1595. else var %notice = (Notice : $target $+ ) $stat($nick,$chan) $nick
  1596. }
  1597. else {
  1598. var %target -astm
  1599. if ($nick isin $serv) var %notice = ( $+ $nick : $target $+ )
  1600. else var %notice = (Notice : $target $+ ) $nick
  1601. }
  1602. }
  1603. echo $color(Notice) %target $pre %notice » $1-
  1604. haltdef
  1605. }
  1606.  
  1607. on &^*:JOIN:#: { if ($nick != $me) {
  1608. echo $color(Join) -t $chan $pre (Join) $nick : $address }
  1609. haltdef }
  1610.  
  1611. on &^*:PART:#: { if ($nick != $me) {
  1612. if ($1) var %part = ( $1- )
  1613. echo $color(Part) -t $chan $pre (Part) $nick : $address %part }
  1614. haltdef }
  1615.  
  1616. on ^&*:RAWMODE:#: { echo $color(mode) -t $chan $pre (Mode Set) $1- : set by $nick
  1617. haltdef }
  1618.  
  1619. on ^&*:NICK: {
  1620. if ($nick == $me) { echo $color(nick) -ts $pre (Nick Change) $nick is now $newnick }
  1621. var %n = 1
  1622. while (%n <= $comchan($newnick,0)) {
  1623. echo $color(nick) -t $comchan($newnick,%n) $pre (Nick Change) $nick is now $newnick
  1624. inc %n }
  1625. haltdef }
  1626.  
  1627. on ^&*:QUIT: { var %q = 1
  1628. while (%q <= $comchan($nick,0)) {
  1629. echo $color(quit) -t $comchan($nick,%q) $pre (Quit) $nick : $address « $1-
  1630. inc %q }
  1631. haltdef }
  1632.  
  1633. on &^*:KICK:#: { if ($knick == $me) {
  1634. var %kick = (Kicked) }
  1635. else var %kick = (Kick) $knick
  1636. echo $color(kick) -t $chan $pre %kick from $chan : by $nick » $1-
  1637. haltdef }
  1638.  
  1639. on &^*:TOPIC:#: { echo $color(topic) -t $chan $pre (Topic Change) ' $1- ' : by $nick
  1640. haltdef }
  1641.  
  1642. on &^*:SNOTICE:*: { echo $color(notice) -st $pre $nick :: $1-
  1643. haltdef }
  1644.  
  1645. on &^*:OPEN:?:*: { echo $color(info2) -at $rpre [Incoming Private Message] $nick : $address }
  1646.  
  1647. alias msg {
  1648. if ($2) && ($2-3 != Status Window) {
  1649. if ($show) {
  1650. if (!$window($1)) {
  1651. echo $color(own) -atm $chr(32) $+ - ( $1 ) - $2-
  1652. .msg $1-
  1653. haltdef }
  1654. elseif ($1 ischan) {
  1655. echo $color(own) -tm $1 $replace($ttok(Nickmsg),<nick>,$stat($me,$1) $ownc($me),<msg>,$2-)
  1656. .msg $1-
  1657. haltdef }
  1658. else {
  1659. echo $color(own) -tm $1 $replace($ttok(Nickmsg),<nick>,$ownc($me),<msg>,$2-)
  1660. .msg $1-
  1661. haltdef }
  1662. }
  1663. else .msg $1- }
  1664. }
  1665.  
  1666. alias amsg { if ($1) {
  1667. if ($1 == -a) && ($2) { var %amsg = 1
  1668. while (%amsg <= $chan(0)) {
  1669. msg $chan(%amsg) $2-
  1670. inc %amsg }
  1671. }
  1672. else { var %amsg = 1
  1673. while (%amsg <= $chan(0)) { msg $chan(%amsg) $tamsg $1-
  1674. inc %amsg } }
  1675. }
  1676. }
  1677.  
  1678. alias tamsg { return $ttok(Amsg) }
  1679.  
  1680. alias describe { if ($2) && ($2-3 != Status Window) {
  1681. if ($show) {
  1682. if (!$window($1)) {
  1683. echo $color(action) -atm $chr(32) $+ - ( $1 : Act ) - $me $2-
  1684. .describe $1-
  1685. haltdef }
  1686. elseif ($1 ischan) {
  1687. echo $color(action) -tm $1 » $stat($me,$1) $me $2-
  1688. .describe $1-
  1689. haltdef }
  1690. else {
  1691. echo $color(action) -tm $1 » $me $2-
  1692. .describe $1-
  1693. haltdef }
  1694. }
  1695. else .describe $1- }
  1696. }
  1697.  
  1698. alias me { describe $active $1- }
  1699.  
  1700. alias ame { if ($1) { var %ame = 1
  1701. while (%ame <= $chan(0)) {
  1702. describe $chan(%ame) $1-
  1703. inc %ame } }
  1704. }
  1705.  
  1706. alias whois { set -u2 %whois Yes
  1707. whois $$1 }
  1708.  
  1709. alias l return $ttok(Left)
  1710.  
  1711. alias r return $ttok(Right)
  1712.  
  1713. alias skin {
  1714. if (!$prop) {
  1715. var %x = 1
  1716. while (%x <= $calc($numtok($1-,32) + 1)) {
  1717. var %b = %b $c(1) $+ $left($gettok($1-,%x,32),1) $+ $c(2) $+ $mid($gettok($1-,%x,32),2)
  1718. inc %x
  1719. }
  1720. var %a = $l %b $+ $r $+ 
  1721. }
  1722. if ($prop == n) { var %a = $1- }
  1723. if ($prop == b) { var %a = $l $+  $1- $r $+  }
  1724. if ($prop == bn) {
  1725. var %x = 1
  1726. while (%x <= $calc($numtok($1-,32) + 1)) {
  1727. var %a = %a $c(1) $+ $left($gettok($1-,%x,32),1) $+ $c(2) $+ $mid($gettok($1-,%x,32),2)
  1728. inc %x
  1729. }
  1730. }
  1731. if ($prop == s) {
  1732. var %x = 1
  1733. while (%x <= $calc($numtok($1-,32) + 1)) {
  1734. var %b = %b $c(3) $+ $left($gettok($1-,%x,32),1) $+ $c(4) $+ $mid($gettok($1-,%x,32),2)
  1735. inc %x
  1736. }
  1737. var %a = $l %b $+ $r $+ 
  1738. }
  1739. if ($prop == bs) {
  1740. var %x = 1
  1741. while (%x <= $calc($numtok($1-,32) + 1)) {
  1742. var %a = %a $c(3) $+ $left($gettok($1-,%x,32),1) $+ $c(4) $+ $mid($gettok($1-,%x,32),2)
  1743. inc %x
  1744. }
  1745. }
  1746. if ($left($prop,1) == c) {
  1747. var %c = $c($right($prop,1))
  1748. var %a = $l $1- $r
  1749. var %a = $replace(%a,<c>,%c,<c1>,$c(1),<c2>,$c(2),<c3>,$c(3),<c4>,$c(4)) $+ 
  1750. }
  1751. if ($left($prop,2) == bc) {
  1752. var %c = $c($right($prop,1))
  1753. var %a = $replace($1-,<c>,%c,<c1>,$c(1),<c2>,$c(2),<c3>,$c(3),<c4>,$c(4)) $+ 
  1754. }
  1755. return %a
  1756. }
  1757.  
  1758. alias say { msg $active $1- }
  1759.  
  1760. alias iscmd { if ($left($1,1) == $readini(mirc.ini,text,commandchar)) && (!$ctrlenter) { return $true } }
  1761.  
  1762. alias serv return ChanServ NickServ MemoServ GlobalServ Global BotServ OperServ
  1763.  
  1764. on *:EXIT: { hsave theme $qt($scriptdirtheme.hsh) }
  1765.  
  1766. on *:START: {
  1767. if (!$hget(theme)) {
  1768. hmake theme 20
  1769. hload theme $shortfn($scriptdirtheme.hsh)
  1770. theme.reload
  1771. }
  1772. }
  1773.  
  1774. raw 001:*: {
  1775. haltdef
  1776. echo $color(info2) -s $rpre You are now connected. Network : $network
  1777. echo $color(info2) -s $rpre $2-
  1778. }
  1779.  
  1780. raw 002:*: {
  1781. haltdef
  1782. echo $color(info2) -s $rpre Server : $server - Version $gettok($2-,$numtok($2-,32),32)
  1783. }
  1784.  
  1785. raw 003:*: {
  1786. haltdef
  1787. echo $color(info2) -s $rpre $2-
  1788. }
  1789.  
  1790. raw 004:*: {
  1791. var %x = 1
  1792. var %num = $calc($numtok($2-,32) - 1)
  1793. while (%x < %num) {
  1794. var %rmsg = %rmsg $gettok($2-,%x,32)
  1795. inc %x
  1796. }
  1797. var %rmsg = %rmsg (UserModes Supported) $gettok($2-,%num,32) (ChannelModes Supported) $gettok($2-,$numtok($2-,32),32)
  1798. echo $color(info2) -s $rpre %rmsg
  1799. haltdef
  1800. }
  1801.  
  1802. raw 005:*: { echo $color(info2) -s $rpre $2-
  1803. haltdef }
  1804.  
  1805. raw 007:*: {
  1806. echo $color(info2) -s $rpre $skin(End of MAP Request)
  1807. haltdef
  1808. }
  1809.  
  1810. raw 251:*: { echo $color(info2) -s $rpre $2-
  1811. haltdef }
  1812.  
  1813. raw 252:*: { echo $color(info2) -s $rpre $2-
  1814. haltdef }
  1815.  
  1816. raw 254:*: { echo $color(info2) -s $rpre $2-
  1817. haltdef }
  1818.  
  1819. raw 255:*: { echo $color(info2) -s $rpre $2-
  1820. haltdef }
  1821.  
  1822. raw 265:*: { echo $color(info2) -s $rpre $2-
  1823. haltdef }
  1824.  
  1825. raw 266:*: { echo $color(info2) -s $rpre $2-
  1826. haltdef }
  1827.  
  1828. raw 301:*: {
  1829. haltdef
  1830. if (!%whois) {
  1831. echo $color(Info2) -s $rpre $2 is currently Away: $3-
  1832. }
  1833. else {
  1834. echo $color(whois) -a $rpre Away : $3-
  1835. }
  1836. }
  1837.  
  1838. raw 305:*: { halt }
  1839.  
  1840. raw 306:*: { halt }
  1841.  
  1842. raw 307:*: {
  1843. haltdef
  1844. echo $color(whois) -a $rpre Registered : Yes
  1845. }
  1846.  
  1847. raw 310:*: {
  1848. haltdef
  1849. ;echo $color(whois) -a $rpre IRCOp : Yes
  1850. }
  1851.  
  1852. raw 311:*: {
  1853. haltdef
  1854. echo $color(whois) -a $rpre $skin(Whois : $2)
  1855. echo $color(whois) -a $rpre Address : $+($3 ,@,$4)
  1856. echo $color(whois) -a $rpre Name : $6-
  1857. }
  1858.  
  1859. raw 312:*: {
  1860. haltdef
  1861. echo $color(whois) -a $rpre Server : $3 - $4-
  1862. }
  1863.  
  1864. raw 313:*: {
  1865. haltdef
  1866. echo $color(whois) -a $rpre Status : $5-
  1867. }
  1868.  
  1869. raw 317:*: {
  1870. haltdef
  1871. echo $color(whois) -a $rpre Idle : $duration($3)
  1872. echo $color(whois) -a $rpre Online Since : $asctime($4,ddd mmm dd [hh:nn:sstt] yyyy)
  1873. }
  1874.  
  1875. raw 318:*: {
  1876. haltdef
  1877. echo $color(whois) -a $rpre $skin(End of Whois)
  1878. }
  1879.  
  1880. raw 319:*: {
  1881. haltdef
  1882. echo $color(whois) -a $rpre Channels : $remove($3-,Status Window)
  1883. }
  1884.  
  1885. raw 320:*: {
  1886. haltdef
  1887. echo $color(whois) -a $rpre $3-
  1888. }
  1889.  
  1890. raw 324:*: { haltdef
  1891. echo $color(info) -t $2 $rpre ( $2 ) Modes : $3- }
  1892.  
  1893. raw 329:*: { haltdef
  1894. echo $color(info) -t $2 $rpre ( $2 ) Created : $asctime($3,ddd mmm dd yyyy hh:nn:sstt) }
  1895.  
  1896. raw 332:*: { haltdef
  1897. echo $color(topic) -t $2 $rpre ( $2 ) Topic : $3- }
  1898.  
  1899. raw 333:*: { haltdef
  1900. echo $color(info) -t $2 $rpre ( $2 ) Set by $3 : $asctime($4,ddd mmm dd hh:nn:sstt) }
  1901.  
  1902. raw 335:*: {
  1903. haltdef
  1904. echo $color(whois) -a $rpre Bot : Yes
  1905. }
  1906.  
  1907. raw 341:*: {
  1908. haltdef
  1909. echo $color(info2) -s $rpre $2 has successfully been invited to $3
  1910. }
  1911.  
  1912. raw 353:*: { haltdef
  1913. echo $color(info2) -st $rpre ( $3 ) Names : $4- }
  1914.  
  1915. raw 366:*: { haltdef
  1916. echo $color(info) -st $pre $skin(End of Names) }
  1917.  
  1918. raw 372:*: { echo $color(info2) -s $rpre $2-
  1919. haltdef }
  1920.  
  1921. raw 375:*: { echo $color(info2) -s $rpre $skin($2-)
  1922. haltdef }
  1923.  
  1924. raw 376:*: { echo $color(info2) -s $rpre $skin(End of MOTD)
  1925. haltdef }
  1926.  
  1927. raw 378:*: {
  1928. haltdef
  1929. echo $color(whois) -a $rpre Connected From : $6
  1930. echo $color(whois) -a $rpre IP Address : $7
  1931. }
  1932.  
  1933. raw 379:*: {
  1934. haltdef
  1935. echo $color(whois) -a $rpre Using Modes : $6-
  1936. }
  1937.  
  1938. raw 401:*: {
  1939. haltdef
  1940. echo $color(info2) -a $rpre The Nickname/Channel isn't currently in use or does not exist : $2
  1941. }
  1942.  
  1943. raw 403:*: {
  1944. haltdef
  1945. echo $color(info2) -s $rpre The Channel does not exist : $2
  1946. }
  1947.  
  1948. raw 406:*: {
  1949. haltdef
  1950. echo $color(info2) -s $rpre Nickname does not exist or is currently offline : $2
  1951. }
  1952.  
  1953. raw 432:*: {
  1954. haltdef
  1955. echo $color(info2) -s $rpre Erroneus Nickname. Contains Illegal Characters.
  1956. }
  1957.  
  1958. raw 433:*: {
  1959. haltdef
  1960. echo $color(info2) -s Nickname already in use : $2
  1961. }
  1962.  
  1963. raw 438:*: { echo $color(info2) -a $rpre $skin(Nick Change Too Fast) Please wait $8-
  1964. haltdef }
  1965.  
  1966. raw 520:*: { echo $color(info2) -s $skin(Cannot Join : $4) IRCOps Only
  1967. haltdef }
  1968.  
  1969. raw 671:*: {
  1970. haltdef
  1971. echo $color(whois) -a $rpre Secure Connections : Yes
  1972. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement