Simple ASL Script for mIRC Bots

By Nienqster on May 03, 2021

Just a simple ASL script for mIRC bots!

People still have the tendency to ask another persons ASL - so this script is made to set your ASL and the BOT will tell everyone your ASL whenever you join the channel!

Enjoy!

alias -l asl return $readini(asl.ini, asl, $1)

on *:join:#: {
  if ($chan == #blabberbots) { halt }
  if ($nick ison $chan(#teenzone)) {
    /kick $chan $nick You are on TeenZone. $chan is for ADULTS ONLY!
  halt }

  if ($nick == $me) { halt }
  if ($nick == Robo-John) { halt }
  elseif (!$asl($nick)) {    
    msg $chan $nick $+ $chr(58)4 : Please set your ASL. You can do so by typing in 4!ASL SET Age / Sex / Location
    /msg $nick Please set your ASL by typing 4!ASL SET <Your Age, Sex, Location> in the channel.    
    /msg $nick .......
    showrules
    closemsg $nick
  }
  elseif ($asl($nick)) {
    if ($right($nick, 1) == $chr(115)) {
      msg $chan $nick $+ $chr(39) ASL is $chr(2) $+ $asl($nick) $+ $chr(2) $+ $chr(46)
    }
    else {
      msg $chan $nick $+ $chr(39) $+ $chr(115) ASL is $chr(2) $+ $asl($nick) $+ $chr(2) $+ $chr(46)

    }
  }
}

on 1:NICK: {
  if $chan == #blabberbots { halt }
  var %on = $nick
  var %nn = $newnick
  if (%nn == $me) { halt }
  if ($asl(%nn)) { halt } 
  if (!$asl(%on)) { halt }  
  elseif ($asl(%on)) { var %nnasl = $readini(asl.ini, asl, %on)
  writeini asl.ini asl %nn %nnasl }  
}

on *:text:asl*:#: {
  if ($2) {
    if ($2 == set) {     
      if ($3) { /msg # $nick $+ , to set your ASL, type 4!ASL SET $3- } 
      elseif (!$3) /msg # $nick $+, to set your ASL, type 4!ASL SET <Age/Sex/Location>
    }
    elseif ($2 ison $chan) { /msg # $nick $+ , to get $2 $+ 's ASL, type !ASL $2 }
    elseif ($2 == help) { aslhelper }
  }
}

on *:text:!asl*:#: {
  if (($2 == set) && ($3)) {
    if (!$isfile(asl.ini)) {
      write asl.ini
    }
    writeini asl.ini asl $nick $3-
    msg $chan $nick $+ $chr(58) your ASL has been set to $chr(2) $+ $3- $+ .
  }

  elseif ($2 == del) {
   if (!$3) {
    if (!$isfile(asl.ini)) {
      msg $chan $nick $+ $chr(58) The ASL database is empty, thus I don't have your asl set. Type $chr(2) $+ /msg $me ASL HELP $+ $chr(2) for more help on setting your ASL.
    }
    elseif (!$asl($nick)) {
      msg $chan $nick $+ $chr(58) You have not set your ASL, type $chr(2) $+ /msg $me ASL HELP $+ $chr(2) for more help on setting your ASL.
    }
    elseif ($asl($nick)) {
      remini asl.ini asl $nick
      msg $chan $nick $+ $chr(58) your asl has been removed from my records.
    }
   }
   else {
    if ($nick !isop $chan) {
     if ($nick !ishop $chan) { /msg $chan $nick $+ , removal of ASL records is reserved to OPS and Half-OPS only! }                            
     }
    else {

    if (!$isfile(asl.ini)) {
      msg $chan $nick $+ $chr(58) The ASL database is empty, thus I don't an asl for $3.
    }
    elseif (!$asl($3)) {
      msg $chan $nick $+ $chr(58) There is no ASL Record for $3.
    }
    elseif ($asl($3)) {
      remini asl.ini asl $3
      msg $chan $nick $+ $chr(58) $3 $+ 's asl has been removed from the records.
    }
   }
  }  
}

  elseif ($2 ison $chan) {
    if ($asl($2)) {
      if ($right($2, 1) == $chr(115)) {
        msg $chan $2 $+ $chr(39) ASL is $chr(2) $+ $asl($2) $+ $chr(2) $+ $chr(46)
      }
      else {
        msg $chan $2 $+ $chr(39) $+ $chr(115) ASL is $chr(2) $+ $asl($2) $+ $chr(2) $+ $chr(46)
      }
    }
    elseif (!$asl($2)) {
      msg $chan $nick $+ $chr(58) I have no record of $2 $+ $chr(39) $+ $chr(115) ASL.
    }
  }
  elseif (!$2) {
    if ($asl($nick)) {
      msg $chan $nick $+ $chr(58) From wot the Voices tells me, your ASL is $chr(2) $+ $asl($nick) $+ $chr(2) $+ .
    }
    elseif (!$asl($nick)) {
      msg $chan $nick $+ $chr(58) You have not set your ASL! Type 4!ASL SET Age/Sex/Location 1to set.
    }
  }
}

alias aslhelper {
  msg $nick +- ASL Help -+
  msg $nick ==============
  msg $nick !ASL           - Returns your current ASL
  msg $nick !ASL <nick>    - Returns <nicks> ASL if they have it set
  msg $nick !ASL SET <ASL> - Saves your ASL as <ASL>
  msg $nick .
  msg $nick You don't need to set an ASL for every nick that you use, as I
  msg $nick will keep track of the ASL you use with the nick you use to join
  msg $nick the channel, and set it automatically whenever you change your
  msg $nick nickname. Once you have set your first ASL, it will be stored
  msg $nick in my ASL database.
  msg $nick .
  msg $nick The ASL records are interchangeable between #truth-or-dare and
  msg $nick #tist
  msg $nick .
  msg $nick Failure to set your ASL will result in you getting kicked from the
  msg $nick channel. It is the one rule that MUST be followed.
  msg $nick .
  msg $nick Please note that these commands only work in the channel, and not in DCC Chats
  closemsg $nick
}

on *:text:*asl*:?: {
  if $2 == set { /msg Sorry, you can only set your ASL in the channel, not in a private message to me. }
  else { aslhelper }
  closemsg $nick
}

Comments

Sign in to comment.
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.