Advertisement
NeoJolt

Theme Engine

Oct 28th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 5.92 KB | None | 0 0
  1. ; Theme Engine v1.1.2 scripted by NeoJolt.
  2. ; Basic events covered, i plan to do the whole bunch
  3. ; Only supports one color scheme for now.
  4. ; Doesnt have a fancy GUI yet for configuring settings will do that later as well.
  5. ; It may contain bugs; please report bugs at freerk87@live.nl
  6. ; Use /load.theme to load a theme and see what will happen, you can also create your own theme by copying the example theme and modify stuff.
  7.  
  8.  
  9. ; /* EVENTS */
  10. on ^*:JOIN:#: {
  11.   haltdef
  12.   if ($nick == $me) {
  13.     if ($isalias(theme_selfjoin)) { echo $chan $theme_selfjoin($chan,$me) | halt }
  14.     else { echo $chan $+(,$color(join),$timestamp * Now talking in $chan) | halt }
  15.   }
  16.   else  {
  17.     if ($isalias(theme_join)) { echo $chan $theme_join($chan,$nick) | halt }
  18.     else { echo $chan $+(,$color(join),$nick has joined $chan) | halt }
  19.   }
  20. }
  21.  
  22. on ^*:PART:#: {
  23.   haltdef
  24.   if ($nick != $me) {
  25.     if ($isalias(theme_part)) { echo $chan $theme_part($chan,$nick,$1-) | halt }
  26.     else { echo $chan $+(,$color(part),$nick has left $chan $iif($3,$+($lp,$3-,$rp),$chr(44)) | halt }
  27.   }
  28. }
  29.  
  30. on ^*:QUIT:{
  31.   haltdef
  32.   var %i = 1
  33.   :loop
  34.   while (%i <= $comchan($nick,0)) {
  35.     if ($isalias(theme_quit)) { echo $comchan($nick,%i) $theme_quit($chan,$nick,$1-) | inc %i | goto loop }
  36.     else { echo $comchan($nick,%i) $+(,$color(quit),$timestamp Quit $+($lp,$1-,$rp,)) | inc %i | goto loop }
  37.   }
  38.   halt
  39. }
  40.  
  41. on *:INPUT:*: {
  42.   if (($left($1,1) == /) && ($ctrlenter == $false)) { return }
  43.   privmsg $active $1-
  44.   if ($isalias(theme_selftext)) { echo $active $theme_selftext($active,$me,$1-) | halt }
  45.   else { echo $active $+(,$color(text),$timestamp $+($lt,$me,$gt) $1-) | halt }
  46.   halt
  47. }
  48.  
  49.  
  50. on ^*:TEXT:*:*: {
  51.   haltdef
  52.   if ($chan) {
  53.     if ($isalias(theme_text)) {
  54.       if (($me isin $1-) && ($active != $chan)) {
  55.         echo -a $theme_inactive($chan,$nick,$1-)
  56.         echo $chan $theme_text($chan,$nick,$1-)
  57.         halt
  58.       }
  59.       else { echo $chan $theme_text($chan,$nick,$1-) | halt }
  60.     }
  61.     else { echo $chan $+(,$color(text),$timestamp $+($lt,$nick,$gt) $1-) | halt }
  62.   }
  63.   if ($nick) {
  64.     if ($isalias(theme_text)) { echo $nick $theme_text($query,$nick,$1-) | halt }
  65.     else { echo $nick $+(,$color(text),$timestamp $nick $1-) | halt }
  66.   }
  67. }
  68.  
  69. on ^*:ACTION:*:*: {
  70.   haltdef
  71.   if ($chan) {
  72.     if ($isalias(theme_action)) {
  73.       if (($me isin $1-) && ($active != $chan)) {
  74.         echo -a $theme_inactive2($chan,$nick,$1-)
  75.         echo $chan $theme_action($chan,$nick,$1-)
  76.         halt
  77.       }
  78.       else { echo $chan $theme_action($chan,$nick,$1-) | halt }
  79.     }
  80.     else { echo $chan $+(,$color(action),$timestamp * $nick $1-) | halt }
  81.   }
  82.   if ($nick) {
  83.     if ($isalias(theme_action)) { echo $nick $theme_action($query,$nick,$1-) | halt }
  84.     else { echo $nick $+(,$color(action),$timestamp * $nick $1-) | halt }
  85.   }
  86. }
  87.  
  88. on ^*:NOTICE:*:*: {
  89.   haltdef
  90.   if ($chan) {
  91.     if ($isalias(theme_notice)) { beep | echo $chan $theme_notice($chan,$nick,$1-) | halt }
  92.     else { echo $chan $+(,$color(notice),$timestamp $+(-,$nick,:,$chan,-) $1-) | halt };;
  93.     }
  94.   }
  95.   else {
  96.     var %i = 1
  97.     :loop
  98.     while (%i <= $comchan($nick,0)) {
  99.       if ($isalias(theme_notice)) { beep | echo $comchan($nick,%i) $theme_notice($query,$nick,$1-) | inc %i | goto loop }
  100.       else { echo $comchan($nick,%i) $+(,$color(notice),-,$nick,- $1-) | inc %i | goto loop }
  101.     }
  102.   }
  103.   halt
  104. }
  105.  
  106. on ^*:NICK:{
  107.   haltdef
  108.   var %i = 1
  109.   :loop
  110.   while (%i <= $comchan($nick,0)) {
  111.     if ($isalias(theme_nickchange)) { echo $comchan($nick,%i) $theme_nickchange($chan,$nick,$newnick) inc %i | goto loop }
  112.     else { echo $comchan($nick,%i) $+(,$color(nick),$timestamp * $nick is now known as $newnick) inc %i | goto loop }
  113.   }
  114.   halt
  115. }
  116.  
  117. on ^*:RAWMODE:#: {
  118.   haltdef
  119.   if ($nick == $me) {
  120.     if ($isalias(theme_selfmodechange)) { echo $chan $theme_selfmodechange($chan,$me,$1-) | halt }
  121.     else { echo $chan $+(,$color(mode),$timestamp * $me sets mode: $1-) | halt }
  122.   }
  123.   else {
  124.     if ($isalias(theme_modechange)) { echo $chan $theme_modechange($chan,$nick,$1-) | halt }
  125.     else { echo $chan $+(,$color(mode),$timestamp * $nick sets mode: $1-) | halt }
  126.   }
  127. }
  128.  
  129. ; /* ALIASES */
  130. alias action {
  131.   .describe $active $1-
  132.   if ($isalias(theme_action)) { echo $active $theme_selfaction($active,$me,$1-) | halt }
  133.   else { echo $active $+(,$color(action),$timestamp * $me $1-) | halt }
  134. }
  135.  
  136. alias me {
  137.   .describe $active $1-
  138.   if ($isalias(theme_selfaction)) { echo $active $theme_action($active,$me,$1-) | halt }
  139.   else { echo $active $+(,$color(action),$timestamp * $me $1-) | halt }
  140. }
  141.  
  142. alias ame {
  143.   var %i = 1
  144.   :loop
  145.   while (%i <= $comchan($me,0)) {
  146.     .describe $comchan($me,%i) $1-
  147.     if ($isalias(theme_selfaction)) { echo $comchan($me,%i) $theme_selfaction($comchan($me,%i),$me,$1-) | inc %i | goto loop }
  148.     else { echo $comchan($me,%i) $+(,$color(action),$timestamp * $me $1-) | inc %i | goto loop }
  149.   }
  150.   halt
  151. }
  152.  
  153. alias say {
  154.   privmsg $active $1-
  155.   if ($isalias(theme_selftext)) { echo $active $theme_selftext($active,$me,$1-) | halt }
  156.   else { echo $active $+(,$color(text),$timestamp $+($lt,$me,$gt) $1-) | halt }
  157. }
  158.  
  159. alias msg {
  160.   privmsg $1 $2
  161.   if ($isalias(theme_selftext)) { echo $active $theme_selftext($active,$me,$1-) | halt }
  162.   else { echo $active $+(,$color(text),$timestamp $+($lt,$me,$gt) $1-) | halt }
  163. }
  164.  
  165. alias amsg {
  166.   var %i = 1
  167.   :loop
  168.   while (%i <= $comchan($me,0)) {
  169.     .privmsg $comchan($me,%i) $1-
  170.     if ($isalias(theme_selftext)) { echo $comchan($me,%i) $theme_selftext($comchan($me,%i),$me,$1-) | inc %i | goto loop }
  171.     else { echo $comchan($me,%i) $+(,$color(text),$timestamp $+($lt,$me,$gt) $1-) | inc %i | goto loop }
  172.   }
  173.   halt
  174. }
  175.  
  176. ; misc
  177. alias amp return &
  178. alias lt return <
  179. alias gt return >
  180. alias lp return (
  181. alias rp return )
  182. alias lb return [
  183. alias rb return ]
  184. alias la return {
  185. alias ra return }
  186. alias sq return '
  187. alias dq return "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement