Alert System with Dialog

By Bouncer on Jul 11, 2007

This is a nick/name/other alert system with dialog. Your Alert Realname and Other are set just by typing them into the corresponding editboxes. Once those are set and the script is Enabled, no matter what nick you are using, when someone says it, it opens an @Nick window telling you who said your nick, on what channel, at what time, and exactly what was said. It does the same for the Alert Realname and Alert Other that you set, except it uses @Name and @Other respectively.
Any comments and suggestions are welcome

Press Alt+R and paste this into your remotes. Right click in your nicklist to access it.

-Edit-
Added a feature so if you clear all text in either the Realname or Other fields, that it unsets the variable. That way you won't have to manually do it through your scripts editor.

-Edit-
Took out the Set Realname and Set Other buttons. They are now set as you type them into the editbox and likewise if you backspace and take letters off. Also if nothing is set in the Realname or Other edit boxes then the words above them are disabled. They re-enable when you put something in the editbox.

menu nicklist,status {
  Alert System:alert_system
}

alias alert_system {
  dialog -mdo alert_system alert_system
}

dialog alert_system {
  title "Alert System"
  size -1 -1 100 100
  option dbu

  text "Alert Nickname", 1, 6 6 36 7
  text "Alert Realname", 2, 6 31 37 7
  text "Alert Other", 3, 6 55 27 7

  edit "", 4, 6 13 88 10, autohs
  edit "", 5, 6 38 88 10, autohs
  edit "", 6, 6 62 88 10, autohs

  radio "Enable", 7, 6 80 44 11, push group
  radio "Disable", 8, 50 80 44 11, push
}

on *:dialog:alert_system:*:*: {
  if ( $devent == init ) {
    did -a $dname 4 $me
    did -a $dname 5 %alert.name
    did -a $dname 6 %alert.other
    if ( $did(5) == $null ) { did -b $dname 2 }
    if ( $did(6) == $null ) { did -b $dname 3 }
    did -c $dname $iif(%alert_system == enabled,7,8)
  }
  elseif ( $devent == sclick ) {
    if ( $did == 7 ) {
      set %alert_system enabled
      echo -a Alert System is now Enabled.
    }
    elseif ( $did == 8 ) {
      set %alert_system disabled
      echo -a Alert System is now Disabled.
    }
  }
  elseif ( $devent == edit ) {
    if ( $did(5) != $null ) {
      set %alert.name $didtok(5).text
      did -e $dname 2
    }
    elseif ( $did(5) == $null ) {
      unset %alert.name
      did -b $dname 2
    }
    if ( $did(6) != $null ) {
      set %alert.other $didtok(6).text
      did -e $dname 3
    }
    elseif ( $did(6) == $null ) {
      unset %alert.other
      did -b $dname 3
    }
  }
}

on *:TEXT:*:#: {
  if ($chan == $active) { halt }
  if (andrew isin $1-) { halt }
  if (%alert_system == enabled) {
    if ($me isin $1-) {
      window @Nick
      aline @Nick 14,1 $nick 0,1called you at14,1 $time 0,1on channel14,1 $chan 0,1saying:14,1 $1- $+ 0,1.
      aline @Nick 14,1 -
    }
    elseif (%alert.name isin $1-) {
      window @Name
      aline @Name 14,1 $nick 0,1called you at14,1 $time 0,1on channel14,1 $chan 0,1saying:14,1 $1- $+ 0,1.
      aline @Name 14,1 -
    }
    elseif (%alert.other isin $1-) {
      window @Other
      aline @Other 14,1 $nick 0,1called you at14,1 $time 0,1on channel14,1 $chan 0,1saying:14,1 $1- $+ 0,1.
      aline @Other 14,1 -
    }
  }
}

Comments

Sign in to comment.
Bouncer   -  Apr 23, 2008

Lol, a long time with no comments. bump

 Respond  
Bouncer   -  Jul 23, 2007

Comments or suggestions anyone?

 Respond  
Bouncer   -  Jul 11, 2007

Ok, the problem should be fixed. Let me know if you find anything else wrong.

 Respond  
Bouncer   -  Jul 11, 2007

Ok, thanks for pointing that out. I will work out the bug.

 Respond  
AHBARAR   -  Jul 11, 2007

i dunno i enabled it but it didnt want to make me set the alert real name or alret others + it just cop paste all wht is been talking in main just saying before it called u and the time example
i using name Yuki_bot


Pretty_Sa called you at 23:36:50 on channel #south_africa saying: or u used to live here vick?.

Hugo777 called you at 23:36:54 on channel #south_africa saying: ek gaan mos Op verlof nou moet als gedoen word.

Pretty_Sa called you at 23:37:03 on channel #south_africa saying: ohh ek sien.

georgyporgy called you at 23:37:04 on channel #south_africa saying: just gonna disapear for a while, bye all.

Pretty_Sa called you at 23:37:06 on channel #south_africa saying: lekker.

Hugo777 called you at 23:37:14 on channel #south_africa saying: ja.


there is something wrong

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.