Top

VOICE ON AGE 1.9


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Feb 26, 2009
Last Updated  Feb 28, 2009
Tags  age  automatic  bot  script  voice 

Description

YOU NEVER HAVE TO RE-DOWNLOAD THIS SCRIPT EVER AGIAN BECUASE IT AUTOMATICALLY UPDATES FROM THE HAWKEE SITE!!!

README_START
Voice On Age Script 1.9
by pope
JAN2009
#scripters.united
chat.peercommons.net:6667
*
*
DESCRIPTION:
Are you tired of that old !age script that you're running? Tired of constantly asking people their age over and over and having to manually kick them? Well your problems are solved! 'Voice On Age' automatically asks for a user's age upon entry and kicks a user who doesn't state their age after two minutes. When a user enters the room they must type a ! before their name (ei !18). If they are voiced by another op it will automatically not kick them and changing names will not help users escape the wrath of this script.
*
*
*OPTIONS: (Rightclick in any channel and choose VOICE ON AGE to access options)
1. Enable/Disable this script without having to unload it to turn it off and on.
2. Exclude certain nicks from being asked for age (ALL ops already excluded)
3. Choose what channels that you want to monitor
4. Share this script
5. AUTOMATICALLY OR MANUALLY UPDATE FROMT HE WEB!!! Even the readme is updated!
*
*
INSTRUCTIONS:
1. Open mIRC and open the script editor ->TOOLS ->SCRIPT EDITOR
2. Load the script from wherever you saved it, into the REMOTES section ->File ->Load
3. Rightclick in ANY channel and choose 'Voice On Age' to set options
*
**NOTE** This script uses timers for some kicks so if you are lagging pretty bad it might not exclude ops from stating thier age. This rarely happens though.
README_END

Grab the Code

;VOICE ON AGE 1.9 script by pope
;PEERCOMMONS chat.peercommons.net 6667
;#scripters.united
;
on *:connect: {
  set %ageversion 1.9
  if (%age.update == 1) {
    age.update
  }
}
on *:load: {
  set %ageversion 1.9
  echo -a 4 VOICE ON AGE script - VERSION %ageversion by pope. Rightclick and choose 12VOICE ON AGE 4for more options.
  set %age.update 1
  set %age.enable 1
  set %age.timer 0
  run $scriptdirreadme.txt
}
on *:unload: {
  echo -a 10 
  echo -a 10 'Voice On Age' Script And Settings Successfully Unloaded!
  echo -a 10 
}
menu * { 
  -
  VOICE ON AGE: {
    if ($exists($qt($scriptdirage_script_exempt)) == $false) {
      write -c $scriptdirage_script_exempt
    }
    if ($exists($qt($scriptdirage_script_chan)) == $false) {
      write -c $scriptdirage_script_chan
    }
    dialog -mo ageonvoice ageonvoice
  }
  -
}
on *:join:#: { 
  .timer 1 4 checkstat $chan $nick
}
on *:part:#: { 
  if ($timer($nick $+ $chan)) {
    .timer $+ $nick $+ $chan off
  }
}
on *:nick: {
  var %i 1
  while (%i <= $comchan($newnick,0)) {
    if ($timer($nick $+ $comchan($newnick,%i))) {
      if (($left($nick($comchan($newnick,%i),$me).pnick,1) isin ~&@%) && (%age.enable == 1) && ($nick != $read($qt($scriptdirage_script_exempt), w, $nick)) && ($read($qt($scriptdirage_script_chan), w, $comchan($newnick,%i)) == $comchan($newnick,%i))) {
        .timer $+ $newnick $+ $comchan($newnick,%i) 1 $timer($nick $+ $comchan($newnick,%i)).secs kick $comchan($newnick,%i) $newnick 4,1©º°¨¨°º©©º°¨¨°º© 9,1Come Back When You Can Type Your Age. (Like This: 4,1!179,1) 4,1©º°¨¨°º©©º°¨¨°º©
        .notice $newnick 4,1©º°¨¨°º©©º°¨¨°º© 9,1Changing Your Nick Won't Help. You Still Have To State Your Age! ;) 4,1©º°¨¨°º©©º°¨¨°º©
        .timer $+ $nick $+ $comchan($newnick,%i) off
      }
    }
    inc %i
  }
}
alias checkstat {
  if (($left($nick($1,$2).pnick,1) !isin ~&@%+) && ($left($nick($1,$me).pnick,1) isin ~&@%) && (%age.enable == 1) && ($2 != $read($qt($scriptdirage_script_exempt), w, $2)) && ($read($qt($scriptdirage_script_chan), w, $1) == $1)) {
    .notice $2  4,1©º°¨¨°º©©º°¨¨°º© 9,1Welcome to $1 $2 $+ ! You Have 4,1Two Minutes 9,1To State Your Age (Like This: 4,1!179,1) Or You Will Be Kicked. Thanks! :) 4,1©º°¨¨°º©©º°¨¨°º©
    .timer $+ $2 $+ $1 1 123 kick $1 $2  4,1©º°¨¨°º©©º°¨¨°º© 9,1Come Back When You Can Type Your Age. (Like This: 4,1!179,1) 4,1©º°¨¨°º©©º°¨¨°º©
  }
}
on *:voice:#: {
  if ((%age.enable == 1) && ($vnick != $read($qt($scriptdirage_script_exempt), w, $vnick)) && ($read($qt($scriptdirage_script_chan), w, $chan) == $chan) && ($left($nick($chan,$me).pnick,1) isin ~&@%)) {
    .notice $vnick  4,1©º°¨¨°º©©º°¨¨°º© 9,1Thank You $vnick $+ . Enjoy Your Stay! :) 4,1©º°¨¨°º©©º°¨¨°º©
    .timer $+ $vnick $+ $chan off
    halt
  }
}
on !*:text:!*:#: {
  if ((%age.enable == 1) && ($read($qt($scriptdirage_script_chan), w, $chan) == $chan) && ($left($nick($chan,$me).pnick,1) isin ~&@%) && ($left($nick($chan,$nick).pnick,1) !isin ~&@%)) {
    set %age $mid($1,2,3)
    if (%age isnum 18-100) {
      mode $chan +v $nick
    }
    if (%age isnum 1-17) {
      mode $chan +b $wildsite
      kick $chan $nick  4,1©º°¨¨°º©©º°¨¨°º© 9,1Sorry, This Is Where The Big Boys And Girls Chat. Come Back When You're 18 :) 4,1©º°¨¨°º©©º°¨¨°º©
      .timer $+ $nick $+ $chan off
    }
    if (%age == ag) {
      kick $chan $nick  4,1©º°¨¨°º©©º°¨¨°º© 9,1No One Likes A Smartass :) 4,1©º°¨¨°º©©º°¨¨°º©
    }
  } 
}
dialog ageonvoice {
  title "VOICE ON AGE OPTIONS"
  size -1 -1 98 150
  option dbu
  check "enable", 1, 1 1 30 9
  tab "Nicks", 2, 2 12 95 122
  text "Exempt List", 3, 35 27 40 7, tab 2
  list 4, 9 35 80 60, tab 2 sort size autovs
  text "OPs ARE ALREADY EXEMPT", 5, 17 97 70 7, tab 2
  button "Add", 6, 17 107 30 10, tab 2
  button "Remove", 7, 51 107 30 10, disable tab 2
  tab "Channels", 8
  text "Channels this script monitors", 9, 15 27 70 7, tab 8
  list 10, 9 35 80 60, tab 8 sort size autovs
  text "CHANNELS MUST BEGIN WITH #", 11, 10 97 80 7, tab 8
  button "Add", 12, 17 107 30 10, tab 8
  button "Remove", 13, 51 107 30 10, disable tab 8
  tab "About", 15
  text "Voice On Age v 1.9", 16, 25 40 50 7, tab 15
  text "by", 17, 47 48 40 7, tab 15
  text "pope", 18, 43 56 40 7, tab 15
  text "JAN 2009", 19, 37 64 40 7, tab 15
  link "myspace.com/nohopepope2187" 21, 10 90 80 7, tab 15
  button "Share", 22, 17 107 25 10, tab 15
  button "Unload", 23, 51 107 25 10, tab 15
  button "Update", 24, 17 120 25 10, tab 15
  check "auto update?", 25, 51 120 40 10, tab 15
  button "CLOSE" 14, 34 136 30 10, cancel
}
alias -l age.filter {
  did -r ageonvoice 4
  did -r ageonvoice 10
  filter -fo $qt($scriptdirage_script_exempt) ageonvoice 4
  filter -fo $qt($scriptdirage_script_chan) ageonvoice 10
}
on *:dialog:ageonvoice:init:*: {
  if (%age.enable == 1) {
    did -c ageonvoice 1
  }
  if (%age.enable == 0) {
    did -u ageonvoice 1
  }
  if (%age.update == 1) {
    did -c ageonvoice 25
  }
  if (%age.update == 0) {
    did -u ageonvoice 25
  }
  age.filter
}
on *:dialog:ageonvoice:sclick:*: {
  if ($did == 1) {
    if (%age.enable == 1) {
      set %age.enable 0
      halt
    }
    set %age.enable 1
  }
  if ($did == 4) {
    did -e ageonvoice 7
  }
  if ($did == 10) {
    did -e ageonvoice 13
  }
  if ($did == 6) {
    dialog -mo agenewnick agenewnick
  }
  if ($did == 12) {
    dialog -mo agenewchan agenewchan
  }
  if ($did == 7) {
    noop $read($qt($scriptdirage_script_exempt), w, $did(4).seltext) {
      write -dl $+ $readn $qt($scriptdirage_script_exempt)
      did -b ageonvoice 7
    }
    age.filter
  }
  if ($did == 13) {
    noop $read($qt($scriptdirage_script_chan), w, $did(10).seltext) {
      write -dl $+ $readn $qt($scriptdirage_script_chan)
      did -b ageonvoice 13
    }
    age.filter 
  }
  if ($did == 21) {
    url http://www.myspace.com/nohopepope2187
  }
  if ($did == 22) {
    dialog -mo ageshare ageshare
  }
  if ($did == 23) {
    dialog -mo unloadage unloadage
  }
  if ($did == 24) {
    age.update
  }
  if ($did == 25) {
    if (%age.update == 1) {
      set %age.update 0
      halt
    }
    set %age.update 1
  }
}
;******SHARE SCRIPT******
dialog ageshare {
  title "Share Voice On Age"
  size -1 -1 75 45
  option dbu 
  text "Enter A Nick", 1, 20 5 50 10
  edit "", 2, 7 15 60 10, autohs
  button "Add", 3, 15 30 20 10, ok
  button "Close", 4, 38 30 20 10, cancel
}
on *:dialog:ageshare:edit:*:{
  set %ageshare $did(ageshare,2).text 
}
on *:dialog:ageshare:sclick:3: {
  query %ageshare VOICE ON AGE VERSION %ageversion by pope can be downloaded from: 4hawkee.com /snippet/5798
}
;******UPDATE******
alias age.update { 
  set %next 0
  set %getreadme 0
  if ($sock(fileget)) {
    sockclose fileget
  }
  sockopen fileget www.hawkee.com 80
}
on *:SOCKOPEN:fileget: {
  echo -a 10Checking for 4VOICE ON AGE 10update...
  sockwrite -nt $sockname GET /snippet/5798/ HTTP/1.1
  sockwrite -nt $sockname Host: www.hawkee.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:fileget: {
  if ($sockerr) {
    echo -a SOCKET ERROR: $sockerr
    halt
  }
  else {
    var %sniprip
    sockread %sniprip
    if (<title> isin %sniprip) {
      set %vers $mid(%sniprip,21,3)
      if (%vers <= %ageversion) {
        sockclose fileget
        unset %vers
        echo -a 10You have the lastest version of 4VOICE ON AGE10.
        halt
      }
      else echo -a 10Downloading and installing updates. Please do not exit mIRC until complete...
      set %vers $replace(%vers,.,-)
    }
    if ((README_END isin %sniprip) && (if !isin %sniprip)) {
      set %getreadme 0
    }
    if (%getreadme == 1) {
      write $qt($scriptdir $+ readme.txt) $remove(%sniprip, <br />)
    }
    if ((README_START isin %sniprip) && (if !isin %sniprip)) {
      set %getreadme 1
      write -c $qt($scriptdir $+ readme.txt)
 
    }
    if (</textarea isin %sniprip) {
      set %sniprip $remove(%sniprip,</textarea>)
      sockclose fileget
      set %ageunload $scriptdir $+ VoiceOnAgeV $+ %ageversion $+ .mrc
      .load -rs $qt($scriptdir $+ VoiceOnAgeV $+ %vers $+ .mrc)
      .timer 1 7 echo -a 10Update Complete. You Are Now Running 4VOICE ON AGE VERSION %vers $+ . | .remove -b $script | .unload -rsn $script
      unset %vers
      halt
    }
    if (%next == 1) {
      if (replace !isin %sniprip) {
        set %agetext $replace(%sniprip,&quot;,",&gt;,>,&lt;,<,&amp;,&)
      }
      write $qt($scriptdir $+ VoiceOnAgeV $+ %vers $+ .mrc) %agetext
    }
    if (<textarea isin %sniprip) {
      tokenize 62 %sniprip
      if (replace !isin %sniprip) {
        set %agetext $replace($2,&quot;,",&gt;,>,&lt;,<,&amp;,&)
      }
      write -c $qt($scriptdir $+ VoiceOnAgeV $+ %vers $+ .mrc) %agetext
      set %next 1
    }
  }
}
;******UNLOAD SCRIPT******
dialog unloadage {
  title "Unload Voice On Age"
  size -1 -1 90 30
  option dbu 
  text "Unload Voice On Age Script", 1, 12 1 70 10
  text "This Will Also Erase Settings", 2, 12 8 80 10
  button "Unload", 3, 22 18 20 10, ok
  button "Cancel", 4, 48 18 20 10, cancel
}
on *:dialog:unloadage:sclick:3: {
  dialog -x ageonvoice ageonvoice
  remove -b $qt($scriptdirage_script_exempt)
  remove -b $qt($scriptdirage_script_chan)
  unload -rs $script
}
;******ADD A NICK******
dialog agenewnick {
  title "Add A Nick"
  size -1 -1 75 45
  option dbu 
  text "Enter A Nick", 1, 10 5 70 10
  edit "", 2, 12 15 50 10, autohs
  button "Add", 3, 15 30 20 10, ok
  button "Close", 4, 38 30 20 10, cancel
}
on *:dialog:agenewnick:edit:*:{
  set %agenewnick $did(agenewnick,2).text 
}
on *:dialog:agenewnick:sclick:3: {
  .timer $+ %agenewnick off
  write $qt($scriptdirage_script_exempt) %agenewnick
  age.filter
  .notice %agenewnick 10You've been added to my exemptions list. That means i won't ask you to state your age when you come to any room i monitor and you won't be kicked, BUT if you want to be voiced automatically you will have to state your age in this format: 4!18 10[automated message]
}
;******ADD A CHAN******
dialog agenewchan {
  title "Add A Channel"
  size -1 -1 75 42
  option dbu 
  text "Enter A Channel", 1, 18 5 50 10
  edit "", 2, 12 14 50 10, autohs
  button "Add", 3, 15 28 20 10, ok
  button "Close", 4, 38 28 20 10, cancel
}
on *:dialog:agenewchan:edit:*:{
  set %agenewchan $did(agenewchan,2).text 
}
on *:dialog:agenewchan:sclick:3: {
  if ($left(%agenewchan,1) == $chr(35)) {
    write $qt($scriptdirage_script_chan) %agenewchan
  }
  if ($left(%agenewchan,1) != $chr(35)) {
    write $qt($scriptdirage_script_chan) $chr(35) $+ %agenewchan
  }
  age.filter
}

Comments

  (7)  RSS
Kirby
Comments: 480
 
mIRC Snippet:  VOICE ON AGE 1.9
Posted on Feb 27, 2009 11:47 am
Auto-update detection? That's pretty nice - now I see why you posted it before.
However,
Code:
      else echo -a 10Downloading and installing updates. Please do not exit mIRC until complete...

Instead of automatically updating, how about asking the person whether he/she would like to update or not. He/she might be already content with their script, but they'll most likely want to, so set what I had just said aside.

As for the dialog:
Code:
  did -r ageonvoice 4
  did -r ageonvoice 10

You can perform dialog actions through one command, such as:
Code:
did -r ageonvoice 4,10

If, for instance, you had something like:
Code:
did -r ageonvoice 3,4,5,6,7,8
, you could make it:
Code:
did -r ageonvoice 3-8
. This same concept applies when you have something like:
Code:
 did -r ageonvoice 3
did -a ageonvoice 3
...could be rewritten as
Code:
did -ra ageonvoice 3

If the dialog id name is too long, you could replace it with $dname.
I'm just saying for future occasions, which you might encounter. :)

As for the rest it looks nice, but instead of having multiple dialogs, why not add tabs to save space?
Spanky
Comments: 232
 
mIRC Snippet:  VOICE ON AGE 1.9
Posted on Feb 27, 2009 6:47 pm
Idea make it remember pepoles ages. and um work with or without ! so they can just state there age like 19. it looks nice :)
pope
Comments: 14
 
mIRC Snippet:  VOICE ON AGE 1.9
Posted on Feb 27, 2009 9:53 pm
i didn't do either of those for these reasons: 1. if i make it work without the !, it could kick someone for stating a number not related to their age. the ! makes it intentional. 2. if someone enters with a nick and is underage, it will blacklist the nick (even if the next person that uses that nick is of age). Thanks for the ideas though! keep em coming and give me more feedback! :)

i really hope im one of the first to employ auto update scripts bc that would be cool! :)
pope
Comments: 14
 
mIRC Snippet:  VOICE ON AGE 1.9
Posted on Feb 27, 2009 9:56 pm
@ kirby 1. auto updating is a feature that is able to be turned off, but i will consider a dialog that lets you know and select whether to update or not. 2. i am using tabs :P
Kirby
Comments: 480
 
mIRC Snippet:  VOICE ON AGE 1.9
Posted on Feb 28, 2009 6:10 am
Oh, I did not realize that. That's awesome.
Kirby
Comments: 480
 
mIRC Snippet:  VOICE ON AGE 1.9
Posted on Feb 28, 2009 6:32 am
Also if you are going to use tabs, I suggest you use DSTUDIO if you have already not done so.
It significantly reduces your time spent on making dialogs, as it is much easier to make them.
The only flaw is that it sometimes mixes up [the order] of your dialog ID's if you decide to make modifications to parts of the dialog after you have made everything - so plan everything out before you do anything!
It's a "visual" program so it's user-friendly and very easy to get accustomed to.
muller87
Comments: 8
 
mIRC Snippet:  VOICE ON AGE 1.9
Posted on Mar 4, 2009 5:10 pm
;p

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom