Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.29 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. write -c $qt($scriptdirdefault.unrc)
  1123. var %w = write $qt($scriptdirdefault.unrc)
  1124. %w #NAME Default
  1125. %w //
  1126. %w #PREFIX **
  1127. %w #RAWPREFIX *
  1128. %w //
  1129. %w #LEFT <b><c1>[<b><o>
  1130. %w #RIGHT <b><c1>]<b><o>
  1131. %w //
  1132. %w #TIMESTAMP <c1><b>[<b><o>hh<c1>:<o>nn<c1>:<o>sstt<c1><b>]<b><o>
  1133. %w //
  1134. %w #FONT -8 Verdana
  1135. %w //
  1136. %w #AMSG xAmsgx
  1137. %w //
  1138. %w #NICKMSG (<nick>) <msg>
  1139. %w //
  1140. %w #PALETTE 16777215,0,14772545,2330216,190,2763429,14822282,1803490,55295,3329434,11829830,15453831,13434880,8421616,9470064,12632256
  1141. %w //
  1142. %w #COLORS 12 14 04 15
  1143. %w #MODECOLOR 12 14 04 15 11
  1144. %w #OWNCOLOR 10
  1145. %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
  1146. write -c $qt($scriptdirunrcpal.pal)
  1147. var %w = write $qt($scriptunrcpal.pal)
  1148. %w unReal,16777215,0,14772545,2330216,190,2763429,14822282,1803490,55295,3329434,11829830,15453831,13434880,8421616,9470064,12632256
  1149. %w mIRC Classic,16777215,0,8323072,37632,255,127,10223772,32764,65535,64512,9671424,16776960,16515072,16711935,8355711,13816530
  1150. echo -s *** unRealIRC Theme Engine Successfully Loaded.
  1151. echo -s *** Make Sure the File is Placed Last in the Order of Files. (Remotes -> File -> Order)
  1152. }
  1153.  
  1154. alias -l temp.thm { var %h = hadd -m Theme
  1155. %h Theme Temporary Default | %h File N/A
  1156. %h c1 12 | %h c2 14 | %h c3 04 | %h c4 15 | %h Owncolor 10
  1157. %h c~ 12 | %h c& 14 | %h c@ 04 | %h c% 15 | %h c+ 11
  1158. %h Prefix ** | %h Rawprefix *
  1159. %h Left 15[ | %h Right 15]
  1160. %h Timestamp (hh:nn:sstt)
  1161. %h Amsg (AmsG)
  1162. %h Nickmsg (<nick>) <msg>
  1163. .cnick -r $+($chr(36),me)
  1164. .cnick -a $+($chr(36),me) $ttok(OWNCOLOR)
  1165. var %mnum = 1
  1166. while (%mnum <= 5) { .cnick -r *
  1167. inc %mnum }
  1168. .cnick * $ttok(c~) ~ | .cnick * $ttok(c&) & | .cnick * $ttok(c@) @ | .cnick * $ttok(c%) % | .cnick * $ttok(c+) +
  1169. .timestamp -f $ttok(Timestamp)
  1170. }
  1171.  
  1172. menu channel,menubar,status,query {
  1173. Theme Loader:thmldr
  1174. }
  1175.  
  1176. alias thmldr { if ($dialog(dialogThmLdr)) { dialog -v dialogThmLdr dialogThmLdr }
  1177. else { dialog -vdm dialogThmLdr dialogThmLdr } }
  1178.  
  1179. alias -l themes.lst { return $shortfn($scriptdirthemes.lst) }
  1180.  
  1181. alias refresh.Themes {
  1182. did -r dialogThmLdr 2
  1183. did -ra dialogThmLdr 9 Themes: $lines($themes.lst)
  1184. var %thmnum = 1
  1185. while (%thmnum <= $lines($themes.lst)) {
  1186. did -a dialogThmLdr 2 $read($read($themes.lst,%thmnum),s,#NAME)
  1187. inc %thmnum
  1188. }
  1189. if (%theme.autogen) { did -c dialogThmLdr 7 }
  1190. }
  1191.  
  1192. dialog dialogThmLdr {
  1193. title "Theme Loader"
  1194. size -1 -1 337 135
  1195. option dbu
  1196.  
  1197. icon 1, 84 1 250 100, $scriptdirdpreview.bmp, 0
  1198.  
  1199. list 2, 3 1 80 100, size
  1200.  
  1201. combo 3, 3 104 80 36, size drop
  1202.  
  1203. button "Apply", 4, 258 104 37 12
  1204. button "Preview", 5, 218 104 37 12
  1205. button "Exit", 6, 298 104 37 12, ok
  1206.  
  1207. check "Auto-Generate Preview", 7, 96 105 69 10
  1208.  
  1209. edit "", 8, 145 120 190 10, read
  1210. edit "", 9, 2 120 50 10, read
  1211. edit "", 10, 53 120 90 10, read
  1212.  
  1213. menu "File", 11
  1214.  
  1215. item "Load...", 12, 11
  1216. item "Unload", 13, 11
  1217. item Break, 14, 11
  1218. item "Reload Current", 15, 11
  1219. item Break, 16, 11
  1220. item "Exit", 17, 11, cancel
  1221.  
  1222. menu "Help", 18
  1223.  
  1224. item "Read Me", 19, 18
  1225. item Break, 20, 18
  1226. item "About", 21, 18
  1227.  
  1228. button "Create New...", 22, 178 104 37 12
  1229. }
  1230.  
  1231. on *:dialog:dialogThmLdr:init:*: {
  1232. refresh.Themes
  1233. did -ra $dname 10 Theme: $thm \ Scheme: $schm
  1234. }
  1235.  
  1236. on *:dialog:dialogThmLdr:sclick:*: {
  1237. if ($did == 2) {
  1238. if ($did(2).seltext) {
  1239. if (!%theme.autogen) did -gv $dname 1 $shortfn($scriptdirdpreview.bmp)
  1240. did -r $dname 3
  1241. if ($read($shortfn($read($themes.lst,$did(2).sel)),s,#SCHEMES)) {
  1242. did -e $dname 3
  1243. var %schemes = $read($shortfn($read($themes.lst,$did(2).sel)),s,#SCHEMES)
  1244. var %schmnum = 1
  1245. while (%schmnum <= $numtok(%schemes,32)) {
  1246. did -a $dname 3 $gettok(%schemes,%schmnum,32)
  1247. inc %schmnum
  1248. }
  1249. did -c $dname 3 1
  1250. if (%theme.autogen) preview.theme
  1251. }
  1252. else {
  1253. did -b $dname 3
  1254. if (%theme.autogen) {
  1255. preview.Theme
  1256. }
  1257. }
  1258. }
  1259. }
  1260. if (($did == 3) && ($did(3).seltext)) {
  1261. if (%theme.autogen) { preview.Theme }
  1262. }
  1263. if ($did == 4) {
  1264. if ($did(2).seltext) {
  1265. if ($read($shortfn($read($themes.lst,$did(2).sel)),s,#SCHEMES)) {
  1266. if ($did(3).seltext) {
  1267. theme.load $shortfn($read($themes.lst,$did(2).sel)) $did(3).seltext
  1268. }
  1269. else { did -ra $dname 8 ERROR: To apply Theme a Scheme must be selected!
  1270. }
  1271. else { theme.load $shortfn($read($themes.lst,$did(2).sel)) }
  1272. did -ra $dname 10 Theme: $thm \ Scheme: $schm
  1273. }
  1274. else { theme.load $shortfn($read($themes.lst,$did(2).sel)) }
  1275. }
  1276. else { did -ra $dname 8 ERROR: A theme must be selected! }
  1277. }
  1278. if ($did == 5) { preview.theme }
  1279. if ($did == 7) {
  1280. if ($did(7).state == 0) { unset %theme.autogen }
  1281. if ($did(7).state == 1) { set %theme.autogen On }
  1282. }
  1283. if ($did == 22) { createtheme }
  1284. }
  1285.  
  1286. on *:dialog:dialogThmLdr:menu:*: {
  1287. if ($did == 12) {
  1288. var %newThm = $sfile($mircdir*unr,Select Theme to Load...,Load)
  1289. if (!$read($themes.lst,w,$shortfn(%newThm))) {
  1290. write $themes.lst $shortfn(%newThm)
  1291. refresh.Themes
  1292. }
  1293. else { did -ra $dname 8 ERROR: Theme file already loaded! }
  1294. }
  1295. if ($did == 13) {
  1296. if ($did(2).seltext) {
  1297. var %thmunl = $input(You sure you would like to unload: $did(2).seltext ?,yu,Confirm Action)
  1298. if (%thmunl == $true) { write -dl [ $+ [ $did(2).sel ] ] $themes.lst
  1299. refresh.Themes
  1300. }
  1301. }
  1302. else { did -ra $dname 8 ERROR: Please select a Theme to Unload! }
  1303. }
  1304. if ($did == 15) { theme.reload | did -ra $dname 10 Theme: $thm \ Scheme: $schm }
  1305. if ($did == 19) {
  1306. if ($isfile($shortfn($scriptdirReadMe.txt))) {
  1307. if (!$window(@Theme.ReadMe)) {
  1308. window -ad @Theme.ReadMe -1 -1 -1 -1
  1309. loadbuf $lines($scriptdirReadMe.txt) @Theme.ReadMe $shortfn($scriptdirReadMe.txt)
  1310. }
  1311. else { window -ar @Theme.ReadMe }
  1312. }
  1313. }
  1314. if ($did == 21) { dialog $iif($dialog(dialogThmAbout),-v,-vma) dialogThmAbout dialogThmAbout }
  1315. }
  1316.  
  1317. on *:dialog:dialogThmLdr:mouse:*: {
  1318. if ($did == 0) { did -r $dname 8 }
  1319. elseif ($did == 1) { did -ra $dname 8 Here is where your Theme's Preview will be generated. }
  1320. elseif ($did == 2) { did -ra $dname 8 Your loaded Themes. }
  1321. elseif ($did == 3) { did -ra $dname 8 The schemes of your selected Theme. }
  1322. elseif ($did == 4) { did -ra $dname 8 Applies your selected Theme. }
  1323. elseif ($did == 5) { did -ra $dname 8 Generate a Preview of your selected Theme. }
  1324. elseif ($did == 6) { did -ra $dname 8 Closes the dialog. }
  1325. elseif ($did == 7) { did -ra $dname 8 If checked preview will auto-generate (Scheme must be selected if available). }
  1326. elseif ($did == 8) { did -ra $dname 8 Here is where your 'On-Task' Help will be generated. }
  1327. elseif ($did == 9) { did -ra $dname 8 Number of Themes you currently have loaded. }
  1328. elseif ($did == 10) { did -ra $dname 8 Theme you are currently using. }
  1329. elseif ($did == 22) { did -ra $dname 8 Opens the UNR Theme Creator dialog. }
  1330. }
  1331.  
  1332. alias -l preview.Theme {
  1333. if ($dialog(dialogThmLdr)) {
  1334. if ($did(2).seltext) {
  1335. set %thmfile $shortfn($read($themes.lst,$did(2).sel))
  1336. if ($read(%thmfile,s,#SCHEMES)) {
  1337. if (!$did(3)) { did -ra $dname 8 ERROR: A Scheme must be selected! | halt }
  1338. set %schm $+(#SCHEME,$chr(46),$did(3).seltext)
  1339. set %pschm $+($chr(46),$did(3).seltext)
  1340. }
  1341. else { var %schm = #SCHEME }
  1342. }
  1343. window -hp +f @Theme.Preview 0 0 500 200 | clear @Theme.Preview
  1344. if ($isfile($shortfn($scriptdirpreview.bmp))) { .remove $shortfn($scriptdirpreview.bmp) }
  1345. 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
  1346. 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
  1347. 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
  1348. 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
  1349. 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
  1350. 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
  1351. 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
  1352. 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
  1353. 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?"
  1354. 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
  1355. 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
  1356. 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
  1357. 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
  1358. 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!
  1359. 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
  1360. 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
  1361. drawsave @Theme.Preview $qt($scriptdirpreview.bmp)
  1362. window -c @Theme.Preview
  1363. did -gv $dname 1 $qt($scriptdirpreview.bmp)
  1364. unset %thmfile
  1365. unset %schm
  1366. unset %pschm
  1367. }
  1368. else { did -ra $dname 8 ERROR: Please select a theme to preview! }
  1369. }
  1370.  
  1371.  
  1372. alias -l linespace {
  1373. if ($left($gettok($read($1,s,#FONT),1,32),1) == -) {
  1374. var %fontsize = $remove($gettok($read($1,s,#FONT),1,32),-)
  1375. return $round($calc((%fontsize * $2) / 8),0)
  1376. }
  1377. else {
  1378. var %fontsize = $gettok($read($1,s,#FONT),1,32)
  1379. return $round($calc((%fontsize * $2) / 11),0)
  1380. }
  1381. }
  1382.  
  1383. dialog -l dialogThmAbout {
  1384. title About...
  1385. size -1 -1 176 73
  1386. option dbu
  1387. 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
  1388. text DarkWarrior© 2009 All Rights Reserved., 2, 14 51 150 8, disable centerr
  1389. button "Close", 3, 68 62 37 10, ok cancel
  1390. }
  1391.  
  1392. alias pc { return $+($chr(3),$gettok($read(%thmfile,s,$+(#COLORS,%pschm)),$1,32)) }
  1393.  
  1394.  
  1395. alias pttok {
  1396. if ($prop == e) {
  1397. 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>,)
  1398. return %preturn1
  1399. }
  1400. if ($prop == n) {
  1401. 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>,)
  1402. return %preturn2
  1403. }
  1404. if ($prop == m) {
  1405. 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>,)
  1406. return %preturn4
  1407. }
  1408. if (!$prop) {
  1409. var %preturn3 = $replace($1-,<c>,,<c1>,$pc(1),<c2>,$pc(2),<c3>,$pc(3),<c4>,$pc(4),<u>,,<r>,,<b>,,<o>,)
  1410. return %preturn3
  1411. }
  1412. }
  1413.  
  1414. alias ttok {
  1415. if (!$prop) { return $hget(Theme,$1) }
  1416. if ($prop == c) {
  1417. if ($1 isnum 1-4) { return c [ $+ [ $1 ] ] $gettok($2,$1,32) }
  1418. }
  1419. if ($prop == r) { return $replace($1,<c>,,<c1>,$c(1),<c2>,$c(2),<c3>,$c(3),<c4>,$c(4),<u>,,<b>,,<r>,,<o>,)
  1420. }
  1421. }
  1422.  
  1423. alias thm { return $ttok(Theme) }
  1424.  
  1425. alias schm {
  1426. if ($ttok(Schm)) {
  1427. return $ttok(Schm)
  1428. }
  1429. else {
  1430. return N/A
  1431. }
  1432. }
  1433.  
  1434. alias -l theme.load {
  1435. if ($isfile($1)) {
  1436. if ($right($1,4) == .unr) { var %thm = $1
  1437. if ($read(%thm,st,#SCHEMES)) { var %thm.schm = $+($chr(46),$2) }
  1438. if ($hget(Theme)) { hfree theme }
  1439. hmake theme 20
  1440. var %h = hadd -m Theme
  1441. %h Theme $read(%thm,st,#NAME)
  1442. %h Schm $2
  1443. %h File %thm
  1444. var %cnum = 1,%clrs = $read(%thm,st,$+(#COLORS,%thm.schm))
  1445. while (%cnum <= 4) {
  1446. %h $ttok(%cnum,%clrs).c
  1447. inc %cnum
  1448. }
  1449. %h Owncolor $read(%thm,st,$+(#OWNCOLOR,%thm.schm))
  1450. .cnick -r $+($chr(36),me)
  1451. .cnick -a $+($chr(36),me) $ttok(OWNCOLOR)
  1452. var %mcol = $read(%thm,st,$+(#MODECOLOR,%thm.schm))
  1453. %h c~ $gettok(%mcol,1,32)
  1454. %h c& $gettok(%mcol,2,32)
  1455. %h c@ $gettok(%mcol,3,32)
  1456. %h c% $gettok(%mcol,4,32)
  1457. %h c+ $gettok(%mcol,5,32)
  1458. var %mnum = 1
  1459. while (%mnum <= 5) { .cnick -r *
  1460. inc %mnum }
  1461. .cnick * $ttok(c~) ~
  1462. .cnick * $ttok(c&) &
  1463. .cnick * $ttok(c@) @
  1464. .cnick * $ttok(c%) %
  1465. .cnick * $ttok(c+) +
  1466. %h Prefix $ttok($read(%thm,st,#PREFIX)).r
  1467. %h Rawprefix $ttok($read(%thm,st,#RAWPREFIX)).r
  1468. %h Left $ttok($read(%thm,st,#LEFT)).r
  1469. %h Right $ttok($read(%thm,st,#RIGHT)).r
  1470. %h Timestamp $ttok($read(%thm,st,#TIMESTAMP)).r
  1471. %h Amsg $ttok($read(%thm,st,#AMSG)).r
  1472. %h Nickmsg $ttok($read(%thm,st,#NICKMSG)).r
  1473. %h Font $read(%thm,st,#FONT)
  1474. %h Scheme $read(%thm,st,$+(#SCHEME,%thm.schm))
  1475. %h Palette $read(%thm,st,#PALETTE)
  1476. writeini mirc.ini colors n0 Theme, $+ $ttok(Scheme)
  1477. writeini mirc.ini palettes n0 $ttok(Palette)
  1478. color -ls Theme
  1479. .timestamp -f $ttok(Timestamp)
  1480. .font -zd $ttok(Font)
  1481. if ($hget(theme)) .hsave -o theme $scriptdirtheme.hsh
  1482. else { hmake theme 20 | .hsave -o theme $scriptdirtheme.hsh }
  1483. echo $color(info2) -a $rpre Theme: $thm \ Scheme: $schm (Successfully Loaded.)
  1484. halt
  1485. }
  1486. else { did -ra $dname 8 ERROR: Incorrect file type! (Theme files: *.unr) | halt }
  1487. }
  1488. else { did -ra $dname 8 ERROR: Theme file does not exist! | halt }
  1489. :error
  1490. did -ra $dname 8 ERROR: Theme File unable to Load. ( $+ $error $+ )
  1491. }
  1492.  
  1493. alias -l theme.reload {
  1494. if ($isfile($ttok(file))) {
  1495. if ($right($ttok(file),4) == .unr) { var %thm = $ttok(file)
  1496. if ($read(%thm,st,#SCHEMES)) { var %thm.schm = $+($chr(46),$schm) }
  1497. if ($hget(Theme)) { hfree theme }
  1498. hmake theme 20
  1499. var %h = hadd -m Theme
  1500. %h Theme $read(%thm,st,#NAME)
  1501. %h Schm $right(%thm.schm,$calc($len(%thm.schm) - 1))
  1502. %h File %thm
  1503. var %cnum = 1,%clrs = $read(%thm,st,$+(#COLORS,%thm.schm))
  1504. while (%cnum <= 4) {
  1505. %h $ttok(%cnum,%clrs).c
  1506. inc %cnum
  1507. }
  1508. %h Owncolor $read(%thm,st,$+(#OWNCOLOR,%thm.schm))
  1509. .cnick -r $+($chr(36),me)
  1510. .cnick -a $+($chr(36),me) $ttok(OWNCOLOR)
  1511. var %mcol = $read(%thm,st,$+(#MODECOLOR,%thm.schm))
  1512. %h c~ $gettok(%mcol,1,32)
  1513. %h c& $gettok(%mcol,2,32)
  1514. %h c@ $gettok(%mcol,3,32)
  1515. %h c% $gettok(%mcol,4,32)
  1516. %h c+ $gettok(%mcol,5,32)
  1517. var %mnum = 1
  1518. while (%mnum <= 5) { .cnick -r *
  1519. inc %mnum }
  1520. .cnick * $ttok(c~) ~
  1521. .cnick * $ttok(c&) &
  1522. .cnick * $ttok(c@) @
  1523. .cnick * $ttok(c%) %
  1524. .cnick * $ttok(c+) +
  1525. %h Prefix $ttok($read(%thm,st,#PREFIX)).r
  1526. %h Rawprefix $ttok($read(%thm,st,#RAWPREFIX)).r
  1527. %h Left $ttok($read(%thm,st,#LEFT)).r
  1528. %h Right $ttok($read(%thm,st,#RIGHT)).r
  1529. %h Timestamp $ttok($read(%thm,st,#TIMESTAMP)).r
  1530. %h Amsg $ttok($read(%thm,st,#AMSG)).r
  1531. %h Nickmsg $ttok($read(%thm,st,#NICKMSG)).r
  1532. %h Font $read(%thm,st,#FONT)
  1533. %h Scheme $read(%thm,st,$+(#SCHEME,%thm.schm))
  1534. %h Palette $read(%thm,st,#PALETTE)
  1535. writeini mirc.ini colors n0 Theme, $+ $ttok(Scheme)
  1536. writeini mirc.ini palettes n0 $ttok(Palette)
  1537. color -ls Theme
  1538. .timestamp -f $ttok(Timestamp)
  1539. .font -zd $ttok(Font)
  1540. if ($hget(theme)) .hsave -o theme $scriptdirtheme.hsh
  1541. else { hmake theme 20 | .hsave -o theme $scriptdirtheme.hsh }
  1542. echo $color(info2) -a $rpre Theme: $thm \ Scheme: $schm (Successfully Reloaded.)
  1543. halt
  1544. }
  1545. else { did -ra $dname 8 ERROR: Incorrect file type! (Theme files: *.unr) | halt }
  1546. }
  1547. else { did -ra $dname 8 ERROR: Theme file does not exist! | temp.thm | halt }
  1548. :error
  1549. did -ra $dname 8 ERROR: Theme File unable to Reload. ( $+ $error $+ )
  1550. }
  1551.  
  1552. alias rpre { return $ttok(Rawprefix) }
  1553.  
  1554. alias pre { return $ttok(Prefix) }
  1555.  
  1556. alias c { if ($1 isnum 1-4) {
  1557. return $+(,$dd($ttok(c [ $+ [ $1 ] ]))) }
  1558. }
  1559.  
  1560. alias dd { if ($1 isnum) { return $iif($len($1) < 2, $+(0,$1),$1) } }
  1561.  
  1562. alias stat { if ($1 ison $2) { return $left($remove($nick($2,$1).pnick,$1),1) } }
  1563.  
  1564. alias statc { return $iif($cnick($stat($1,$2)).color >= 0,  $+ $cnick($stat($1,$2)).color $+ $1 $+ ,$1) }
  1565.  
  1566. alias ownc { return $iif($cnick(1).color >= 0,  $+ $cnick(1).color $+ $1 $+ ,$1) }
  1567.  
  1568. on &^*:TEXT:*:?: { echo $color(normal) -mt $nick $replace($ttok(Nickmsg),<nick>,$nick,<msg>,$1-)
  1569. haltdef }
  1570.  
  1571. on &^*:TEXT:*:#: { echo $color(normal) -mt $chan $replace($ttok(Nickmsg),<nick>,$stat($nick,$chan) $statc($nick,$chan),<msg>,$1-)
  1572. haltdef }
  1573.  
  1574. on &^*:ACTION:*:#: {
  1575. echo $color(Action) -mt $target » $stat($nick,$chan) $nick $1-
  1576. haltdef }
  1577.  
  1578. on &^*:ACTION:*:?: { echo $color(Action) -mt $nick » $nick $1- | haltdef }
  1579.  
  1580. on &*:INPUT:*: { if (!$iscmd($1)) { msg $active $1- } }
  1581.  
  1582. on &^*:NOTICE:*:*: {
  1583. if ($target == $me) {
  1584. var %target = -atm
  1585. if ($nick isin $serv) {
  1586. var %notice = ( $+ $nick $+ )
  1587. }
  1588. else var %notice = (Private Notice) $nick
  1589. }
  1590. else {
  1591. if ($target == $chan) {
  1592. var %target = -tm $chan
  1593. if ($nick isin $serv) var %notice = ( $+ $nick : $chan $+ )
  1594. else var %notice = (Notice : $target $+ ) $stat($nick,$chan) $nick
  1595. }
  1596. else {
  1597. var %target -astm
  1598. if ($nick isin $serv) var %notice = ( $+ $nick : $target $+ )
  1599. else var %notice = (Notice : $target $+ ) $nick
  1600. }
  1601. }
  1602. echo $color(Notice) %target $pre %notice » $1-
  1603. haltdef
  1604. }
  1605.  
  1606. on &^*:JOIN:#: { if ($nick != $me) {
  1607. echo $color(Join) -t $chan $pre (Join) $nick : $address }
  1608. haltdef }
  1609.  
  1610. on &^*:PART:#: { if ($nick != $me) {
  1611. if ($1) var %part = ( $1- )
  1612. echo $color(Part) -t $chan $pre (Part) $nick : $address %part }
  1613. haltdef }
  1614.  
  1615. on ^&*:RAWMODE:#: { echo $color(mode) -t $chan $pre (Mode Set) $1- : set by $nick
  1616. haltdef }
  1617.  
  1618. on ^&*:NICK: {
  1619. if ($nick == $me) { echo $color(nick) -ts $pre (Nick Change) $nick is now $newnick }
  1620. var %n = 1
  1621. while (%n <= $comchan($newnick,0)) {
  1622. echo $color(nick) -t $comchan($newnick,%n) $pre (Nick Change) $nick is now $newnick
  1623. inc %n }
  1624. haltdef }
  1625.  
  1626. on ^&*:QUIT: { var %q = 1
  1627. while (%q <= $comchan($nick,0)) {
  1628. echo $color(quit) -t $comchan($nick,%q) $pre (Quit) $nick : $address « $1-
  1629. inc %q }
  1630. haltdef }
  1631.  
  1632. on &^*:KICK:#: { if ($knick == $me) {
  1633. var %kick = (Kicked) }
  1634. else var %kick = (Kick) $knick
  1635. echo $color(kick) -t $chan $pre %kick from $chan : by $nick » $1-
  1636. haltdef }
  1637.  
  1638. on &^*:TOPIC:#: { echo $color(topic) -t $chan $pre (Topic Change) ' $1- ' : by $nick
  1639. haltdef }
  1640.  
  1641. on &^*:SNOTICE:*: { echo $color(notice) -st $pre $nick :: $1-
  1642. haltdef }
  1643.  
  1644. on &^*:OPEN:?:*: { echo $color(info2) -at $rpre [Incoming Private Message] $nick : $address }
  1645.  
  1646. alias msg {
  1647. if ($2) && ($2-3 != Status Window) {
  1648. if ($show) {
  1649. if (!$window($1)) {
  1650. echo $color(own) -atm $chr(32) $+ - ( $1 ) - $2-
  1651. .msg $1-
  1652. haltdef }
  1653. elseif ($1 ischan) {
  1654. echo $color(own) -tm $1 $replace($ttok(Nickmsg),<nick>,$stat($me,$1) $ownc($me),<msg>,$2-)
  1655. .msg $1-
  1656. haltdef }
  1657. else {
  1658. echo $color(own) -tm $1 $replace($ttok(Nickmsg),<nick>,$ownc($me),<msg>,$2-)
  1659. .msg $1-
  1660. haltdef }
  1661. }
  1662. else .msg $1- }
  1663. }
  1664.  
  1665. alias amsg { if ($1) {
  1666. if ($1 == -a) && ($2) { var %amsg = 1
  1667. while (%amsg <= $chan(0)) {
  1668. msg $chan(%amsg) $2-
  1669. inc %amsg }
  1670. }
  1671. else { var %amsg = 1
  1672. while (%amsg <= $chan(0)) { msg $chan(%amsg) $tamsg $1-
  1673. inc %amsg } }
  1674. }
  1675. }
  1676.  
  1677. alias tamsg { return $ttok(Amsg) }
  1678.  
  1679. alias describe { if ($2) && ($2-3 != Status Window) {
  1680. if ($show) {
  1681. if (!$window($1)) {
  1682. echo $color(action) -atm $chr(32) $+ - ( $1 : Act ) - $me $2-
  1683. .describe $1-
  1684. haltdef }
  1685. elseif ($1 ischan) {
  1686. echo $color(action) -tm $1 » $stat($me,$1) $me $2-
  1687. .describe $1-
  1688. haltdef }
  1689. else {
  1690. echo $color(action) -tm $1 » $me $2-
  1691. .describe $1-
  1692. haltdef }
  1693. }
  1694. else .describe $1- }
  1695. }
  1696.  
  1697. alias me { describe $active $1- }
  1698.  
  1699. alias ame { if ($1) { var %ame = 1
  1700. while (%ame <= $chan(0)) {
  1701. describe $chan(%ame) $1-
  1702. inc %ame } }
  1703. }
  1704.  
  1705. alias whois { set -u2 %whois Yes
  1706. whois $$1 }
  1707.  
  1708. alias l return $ttok(Left)
  1709.  
  1710. alias r return $ttok(Right)
  1711.  
  1712. alias skin {
  1713. if (!$prop) {
  1714. var %x = 1
  1715. while (%x <= $calc($numtok($1-,32) + 1)) {
  1716. var %b = %b $c(1) $+ $left($gettok($1-,%x,32),1) $+ $c(2) $+ $mid($gettok($1-,%x,32),2)
  1717. inc %x
  1718. }
  1719. var %a = $l %b $+ $r $+ 
  1720. }
  1721. if ($prop == n) { var %a = $1- }
  1722. if ($prop == b) { var %a = $l $+  $1- $r $+  }
  1723. if ($prop == bn) {
  1724. var %x = 1
  1725. while (%x <= $calc($numtok($1-,32) + 1)) {
  1726. var %a = %a $c(1) $+ $left($gettok($1-,%x,32),1) $+ $c(2) $+ $mid($gettok($1-,%x,32),2)
  1727. inc %x
  1728. }
  1729. }
  1730. if ($prop == s) {
  1731. var %x = 1
  1732. while (%x <= $calc($numtok($1-,32) + 1)) {
  1733. var %b = %b $c(3) $+ $left($gettok($1-,%x,32),1) $+ $c(4) $+ $mid($gettok($1-,%x,32),2)
  1734. inc %x
  1735. }
  1736. var %a = $l %b $+ $r $+ 
  1737. }
  1738. if ($prop == bs) {
  1739. var %x = 1
  1740. while (%x <= $calc($numtok($1-,32) + 1)) {
  1741. var %a = %a $c(3) $+ $left($gettok($1-,%x,32),1) $+ $c(4) $+ $mid($gettok($1-,%x,32),2)
  1742. inc %x
  1743. }
  1744. }
  1745. if ($left($prop,1) == c) {
  1746. var %c = $c($right($prop,1))
  1747. var %a = $l $1- $r
  1748. var %a = $replace(%a,<c>,%c,<c1>,$c(1),<c2>,$c(2),<c3>,$c(3),<c4>,$c(4)) $+ 
  1749. }
  1750. if ($left($prop,2) == bc) {
  1751. var %c = $c($right($prop,1))
  1752. var %a = $replace($1-,<c>,%c,<c1>,$c(1),<c2>,$c(2),<c3>,$c(3),<c4>,$c(4)) $+ 
  1753. }
  1754. return %a
  1755. }
  1756.  
  1757. alias say { msg $active $1- }
  1758.  
  1759. alias iscmd { if ($left($1,1) == $readini(mirc.ini,text,commandchar)) && (!$ctrlenter) { return $true } }
  1760.  
  1761. alias serv return ChanServ NickServ MemoServ GlobalServ Global BotServ OperServ
  1762.  
  1763. on *:EXIT: { hsave theme $qt($scriptdirtheme.hsh) }
  1764.  
  1765. on *:START: {
  1766. if (!$hget(theme)) {
  1767. hmake theme 20
  1768. hload theme $shortfn($scriptdirtheme.hsh)
  1769. theme.reload
  1770. }
  1771. }
  1772.  
  1773. raw 001:*: {
  1774. haltdef
  1775. echo $color(info2) -s $rpre You are now connected. Network : $network
  1776. echo $color(info2) -s $rpre $2-
  1777. }
  1778.  
  1779. raw 002:*: {
  1780. haltdef
  1781. echo $color(info2) -s $rpre Server : $server - Version $gettok($2-,$numtok($2-,32),32)
  1782. }
  1783.  
  1784. raw 003:*: {
  1785. haltdef
  1786. echo $color(info2) -s $rpre $2-
  1787. }
  1788.  
  1789. raw 004:*: {
  1790. var %x = 1
  1791. var %num = $calc($numtok($2-,32) - 1)
  1792. while (%x < %num) {
  1793. var %rmsg = %rmsg $gettok($2-,%x,32)
  1794. inc %x
  1795. }
  1796. var %rmsg = %rmsg (UserModes Supported) $gettok($2-,%num,32) (ChannelModes Supported) $gettok($2-,$numtok($2-,32),32)
  1797. echo $color(info2) -s $rpre %rmsg
  1798. haltdef
  1799. }
  1800.  
  1801. raw 005:*: { echo $color(info2) -s $rpre $2-
  1802. haltdef }
  1803.  
  1804. raw 007:*: {
  1805. echo $color(info2) -s $rpre $skin(End of MAP Request)
  1806. haltdef
  1807. }
  1808.  
  1809. raw 251:*: { echo $color(info2) -s $rpre $2-
  1810. haltdef }
  1811.  
  1812. raw 252:*: { echo $color(info2) -s $rpre $2-
  1813. haltdef }
  1814.  
  1815. raw 254:*: { echo $color(info2) -s $rpre $2-
  1816. haltdef }
  1817.  
  1818. raw 255:*: { echo $color(info2) -s $rpre $2-
  1819. haltdef }
  1820.  
  1821. raw 265:*: { echo $color(info2) -s $rpre $2-
  1822. haltdef }
  1823.  
  1824. raw 266:*: { echo $color(info2) -s $rpre $2-
  1825. haltdef }
  1826.  
  1827. raw 301:*: {
  1828. haltdef
  1829. if (!%whois) {
  1830. echo $color(Info2) -s $rpre $2 is currently Away: $3-
  1831. }
  1832. else {
  1833. echo $color(whois) -a $rpre Away : $3-
  1834. }
  1835. }
  1836.  
  1837. raw 305:*: { halt }
  1838.  
  1839. raw 306:*: { halt }
  1840.  
  1841. raw 307:*: {
  1842. haltdef
  1843. echo $color(whois) -a $rpre Registered : Yes
  1844. }
  1845.  
  1846. raw 310:*: {
  1847. haltdef
  1848. ;echo $color(whois) -a $rpre IRCOp : Yes
  1849. }
  1850.  
  1851. raw 311:*: {
  1852. haltdef
  1853. echo $color(whois) -a $rpre $skin(Whois : $2)
  1854. echo $color(whois) -a $rpre Address : $+($3 ,@,$4)
  1855. echo $color(whois) -a $rpre Name : $6-
  1856. }
  1857.  
  1858. raw 312:*: {
  1859. haltdef
  1860. echo $color(whois) -a $rpre Server : $3 - $4-
  1861. }
  1862.  
  1863. raw 313:*: {
  1864. haltdef
  1865. echo $color(whois) -a $rpre Status : $5-
  1866. }
  1867.  
  1868. raw 317:*: {
  1869. haltdef
  1870. echo $color(whois) -a $rpre Idle : $duration($3)
  1871. echo $color(whois) -a $rpre Online Since : $asctime($4,ddd mmm dd [hh:nn:sstt] yyyy)
  1872. }
  1873.  
  1874. raw 318:*: {
  1875. haltdef
  1876. echo $color(whois) -a $rpre $skin(End of Whois)
  1877. }
  1878.  
  1879. raw 319:*: {
  1880. haltdef
  1881. echo $color(whois) -a $rpre Channels : $remove($3-,Status Window)
  1882. }
  1883.  
  1884. raw 320:*: {
  1885. haltdef
  1886. echo $color(whois) -a $rpre $3-
  1887. }
  1888.  
  1889. raw 324:*: { haltdef
  1890. echo $color(info) -t $2 $rpre ( $2 ) Modes : $3- }
  1891.  
  1892. raw 329:*: { haltdef
  1893. echo $color(info) -t $2 $rpre ( $2 ) Created : $asctime($3,ddd mmm dd yyyy hh:nn:sstt) }
  1894.  
  1895. raw 332:*: { haltdef
  1896. echo $color(topic) -t $2 $rpre ( $2 ) Topic : $3- }
  1897.  
  1898. raw 333:*: { haltdef
  1899. echo $color(info) -t $2 $rpre ( $2 ) Set by $3 : $asctime($4,ddd mmm dd hh:nn:sstt) }
  1900.  
  1901. raw 335:*: {
  1902. haltdef
  1903. echo $color(whois) -a $rpre Bot : Yes
  1904. }
  1905.  
  1906. raw 341:*: {
  1907. haltdef
  1908. echo $color(info2) -s $rpre $2 has successfully been invited to $3
  1909. }
  1910.  
  1911. raw 353:*: { haltdef
  1912. echo $color(info2) -st $rpre ( $3 ) Names : $4- }
  1913.  
  1914. raw 366:*: { haltdef
  1915. echo $color(info) -st $pre $skin(End of Names) }
  1916.  
  1917. raw 372:*: { echo $color(info2) -s $rpre $2-
  1918. haltdef }
  1919.  
  1920. raw 375:*: { echo $color(info2) -s $rpre $skin($2-)
  1921. haltdef }
  1922.  
  1923. raw 376:*: { echo $color(info2) -s $rpre $skin(End of MOTD)
  1924. haltdef }
  1925.  
  1926. raw 378:*: {
  1927. haltdef
  1928. echo $color(whois) -a $rpre Connected From : $6
  1929. echo $color(whois) -a $rpre IP Address : $7
  1930. }
  1931.  
  1932. raw 379:*: {
  1933. haltdef
  1934. echo $color(whois) -a $rpre Using Modes : $6-
  1935. }
  1936.  
  1937. raw 401:*: {
  1938. haltdef
  1939. echo $color(info2) -a $rpre The Nickname/Channel isn't currently in use or does not exist : $2
  1940. }
  1941.  
  1942. raw 403:*: {
  1943. haltdef
  1944. echo $color(info2) -s $rpre The Channel does not exist : $2
  1945. }
  1946.  
  1947. raw 406:*: {
  1948. haltdef
  1949. echo $color(info2) -s $rpre Nickname does not exist or is currently offline : $2
  1950. }
  1951.  
  1952. raw 432:*: {
  1953. haltdef
  1954. echo $color(info2) -s $rpre Erroneus Nickname. Contains Illegal Characters.
  1955. }
  1956.  
  1957. raw 433:*: {
  1958. haltdef
  1959. echo $color(info2) -s Nickname already in use : $2
  1960. }
  1961.  
  1962. raw 438:*: { echo $color(info2) -a $rpre $skin(Nick Change Too Fast) Please wait $8-
  1963. haltdef }
  1964.  
  1965. raw 520:*: { echo $color(info2) -s $skin(Cannot Join : $4) IRCOps Only
  1966. haltdef }
  1967.  
  1968. raw 671:*: {
  1969. haltdef
  1970. echo $color(whois) -a $rpre Secure Connections : Yes
  1971. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement