SHARE
TWEET

Untitled

craziplaya21 May 9th, 2013 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;[Addon]
  2. ;Script=nickAlert
  3. ;Version=2.1
  4. ;Author=b1u3j (on Newnet)
  5. ;Desc=Logs channel chat containing your nick (or alternates) to a window called @nickAlerts.
  6. ;For=any mIRC script
  7. ;Date=July 17th 2003
  8. ;[script]
  9. ; to load, type: /load -rs nickAlert.mrc
  10.  
  11.  
  12. menu menubar,channel {
  13.   nickAlert - See the chat about You. o_O:nickAlert
  14. }
  15.  
  16. alias nickAlert {
  17.   if ($dialog(nickAlert) == $null) { dialog -md nickAlert nickAlert }
  18.   else { dialog -v nickAlert nickAlert }
  19. }
  20.  
  21. on *:load: {
  22.   echo -s 12——————————————————————————————————————
  23.   echo -s 12 nickAlert 14 successfully  Started.
  24.   echo -s 12——————————————————————————————————————
  25.  
  26.   ;; set the defaults if not already set
  27.   if (%nickAlert.ActiveChannel == $null) { set %nickAlert.ActiveChannel Yes }
  28.   if (%nickAlert.PlaySound == $null) { set %nickAlert.PlaySound Yes }
  29.   if (%nickAlert.DesktopWindow == $null) { set %nickAlert.DesktopWindow No }
  30.   if (%nickAlert.SoundFile == $null) { set %nickAlert.SoundFile heheheh.mp3 }
  31. }
  32.  
  33. on *:unload: {
  34.   echo -s 12 nickAlert 14 successfully  Unloaded.
  35.   unset %nickAlert.Total
  36. }
  37.  
  38. on *:TEXT:*:#:{
  39.   if ($nickAlert.findMatch($strip($1-)) == $false) { return }
  40.   if ( *WB isin $strip($1) ) { return }
  41.   if ( $left($1,1) == ! ) { return }
  42.   if (($chan = $active) && (%nickAlert.ActiveChannel == No)) { return }
  43.   nickAlert.AddLine $1-
  44. }
  45.  
  46. on *:ACTION:*:#:{
  47.   if ($nickAlert.findMatch($1-) == $false) { return }
  48.   if (($chan = $active) && (%nickAlert.ActiveChannel == No)) { return }
  49.   nickAlert.AddLine 14says  $1-
  50. }
  51.  
  52. alias -l nickAlert.AddLine {
  53.   ; add a line to the nickAlert window
  54.   if ($1 != $null) {
  55.     nickAlert.InitilizeWindow
  56.     inc %nickAlert.Total
  57.     aline -ph @nickAlerts 14 $bracket($network) $bracket($chan) $bracket($time(HH:nn)) 11 < $+ $nick $+ >  $1-
  58.     renwin @nickAlerts @nickAlerts - $bracket(Total Lines Captured: %nickAlert.Total)
  59.     if (%nickAlert.PlaySound == Yes) { splay %nickAlert.SoundFile }
  60.   }
  61. }
  62.  
  63. alias -l nickAlert.InitilizeWindow {
  64.   ; create a nickAlert window if it doesnt already exist
  65.   if ($window(@nickAlerts) == $null) {
  66.     if (%nickAlert.DesktopWindow == No) { window -nk0a @nickAlerts -1 -1 500 300 @nickAlerts }
  67.     else { window -dnk0a @nickAlerts -1 -1 500 300 @nickAlerts }
  68.     set %nickAlert.Total 0
  69.   }
  70. }
  71.  
  72. alias -l nickAlert.findMatch {
  73.   ; check to see if your nick or any AlternateNicks is part of any word in the text.
  74.   var %match = $matchtok($1-,$me,1,32)
  75.   if ((%match != $null) && (%match != lolipop)) { return $true }
  76.   var %i 1
  77.   var %toks = $numtok(%nickAlert.AlternateNicks,32)
  78.   if (%toks == $null) { return $false }
  79.   while (%i <= %toks) {
  80.     var %token = $gettok(%nickAlert.AlternateNicks,%i,32)
  81.     var %match = $matchtok($1-,%token,1,32)
  82.     if ((%match != $null) && (%match != lolipop)) { return $true }
  83.     inc %i
  84.   }
  85.   return $false
  86. }
  87.  
  88. alias -l bracket { if ($1- != $null) { return $chr(91) $+ $1- $+ $chr(93) } }
  89.  
  90. dialog nickAlert {
  91.   title "nickAlert Settings"
  92.   size -1 -1 125 137
  93.   option dbu
  94.   text "Alternate nicks (seperated by spaces)", 9, 5 6 95 10
  95.   edit "", 10, 5 15 115 12
  96.   check "Watch Active Channel", 11, 20 31 70 9
  97.   text "(in addition to inactive channels)", 111, 20 39 80 8, center
  98.   radio "Normal Window", 12, 20 48 70 10, group
  99.   radio "Desktop Window", 13, 20 56 70 10
  100.   check "Play Audible nickAlert", 14, 20 69 70 9
  101.   text "Alert Sound (wav, mp3, or mid)", 15, 17 82 91 8
  102.   edit "", 16, 17 89 91 12
  103.   button "Play", 161, 85 67 16 7, flat
  104.   button "Stop", 162, 85 74 16 7, flat
  105.   text "(put the file in the mIRC Sounds folder, or add the complete path)", 17, 10 102 90 15, center
  106.   button "&OK", 1000, 47 122 30 10, default ok
  107.   button "&Cancel", 1001, 81 122 30 10, cancel
  108.   button "&Unload", 1002, 13 122 30 10
  109.  
  110. }
  111.  
  112. On *:dialog:nickAlert:*:*:{
  113.   if ($devent == init) {
  114.     did -ra $dname 10 %nickAlert.AlternateNicks
  115.     if (%nickAlert.ActiveChannel == Yes) { did -c $dname 11 }
  116.     if (%nickAlert.DesktopWindow == Yes) { did -c $dname 13 }
  117.     else { did -c $dname 12 }
  118.     if (%nickAlert.PlaySound == Yes) { did -c $dname 14 }
  119.     did -ra $dname 16 %nickAlert.SoundFile
  120.   }
  121.   if ($devent == sclick) {
  122.     if ($did == 161) { splay $did($dname,16).text }
  123.     if ($did == 162) { splay stop }
  124.     if ($did == 1001) {  }
  125.     if ($did == 1002) { dialog -c nickAlert | .unload -rs $script }
  126.     if ($did == 1000) {
  127.       set %nickAlert.AlternateNicks $did($dname,10).text
  128.       if ($did($dname,11).state == 1) { set %nickAlert.ActiveChannel Yes } | else { set %nickAlert.ActiveChannel No }
  129.       if ($did($dname,13).state == 1) { set %nickAlert.DesktopWindow Yes } | else { set %nickAlert.DesktopWindow No }
  130.       if ($did($dname,14).state == 1) { set %nickAlert.PlaySound Yes } | else { set %nickAlert.PlaySound No }
  131.       set %nickAlert.SoundFile $did($dname,16).text
  132.     }
  133.   }
  134. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top