Asl-database

By larry on Oct 31, 2006

This is my first script on Hawkee so just if i don't works like you want just tell me how i sould be. Save this in a text file in the mIRC direction and type in mIRC "/load -rs path-to-the-file" or got to your remote (Ctrl + R), and select File>Load... and select the file you saved. I tested it using mIRCv6.2
Enjoy It :p [This script is for a bot! Only other people then the bot where the script is loaded can use it!]

;Asl-database
;By Larry (Larry_bolt@mail.ru)
;
;tested with version 6.2
;Type !aslhelp to see the commands

on *:text:!asl *:#: {
  if (!$read(asldata.txt, s, $2)) { 
    if (-ask isin $3) .msg $2 Send me please your asl by typing here !myasl yourasl
    else {
      msg # $2 is not found 
          halt
    }
  }
  elseif (=> isin $read(asldata.txt, s, $2)) { 
    set %123 $remove($read(asldata.txt, s, $2),=> )
    msg # $2 => $read(asldata.txt, s, %123) 
        halt
  }
  else { msg # $2 => $read(asldata.txt, s, $2) }
}
on 100:text:!newasl *:#: {
  if ($read(asldata.txt, s, $2) != $null) { 
    msg # $2 allready exists >> $+ $read(asldata.txt, s, $2) 
    msg # !delasl nick to delete a nick
    halt
  }
  elseif ($read(asldata.txt, s, $2) == $null) {
    write asldata.txt $2-
    msg # added $2 !
    halt
  }
}
on 100:text:!chgasl *:#: {
  if ($read(asldata.txt, s, $2) == $null) msg # $2 doesn't exists!
  elseif ($read(asldata.txt, s, $2) != $null) {
    write -ds $+ $2 asldata.txt
    write asldata.txt $2-
    msg # changed asl !
    halt
  }
}
on 100:text:!newasl *:?: {
  if ($read(asldata.txt, s, $2) != $null) { 
    msg $nick $2 allready exists >> $+ $read(asldata.txt, s, $2) 
    msg $nick !delasl nick to delete a nick
    halt
  }
  elseif ($read(asldata.txt, s, $2) == $null) {
    write asldata.txt $2-
    msg $nick added $2 !
    halt
  } 
}
on 100:text:!delasl *:#: {
  if (!$read(asldata.txt, s, $2)) { msg # $2 is not found }
  else {
    write -ds $+ $2 asldata.txt
    msg $chan $2 is deleted!
  }
}
on 100:text:!asllist:#: play $nick asldata.txt
on *:text:!myasl *:?: {
  if ($read(asldata.txt, s, $nick) != $null) msg $nick You are alleady added $chr(91) $+ $read(asldata.txt, s, $nick) $+ $chr(93)
  elseif ($read(asldata.txt, s, $nick) == $null) {
    write asldata.txt $nick $2-
    msg $nick added ur asl !
    halt
  }
}
on *:text:!aslhelp:*: {
  .timer 1 2 msg $nick ~~~~Asl-database~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  .timer 1 4 msg $nick Type !asl <nick> to see the saved asl of the nick
  .timer 1 6 msg $nick You also can type !asl <nick> -ask, the bot will ask the nickname to give him his asl
  .timer 1 8 msg $nick Type !newasl nick asl To add the asl of nick, only users with the level 100 can do this
  .timer 1 10 msg $nick You also can forward a nick to another, by typing !newasl nick =>nick-to-forward
  .timer 1 12 msg $nick Type !delasl nick to delete somewans asl, only for users with level 100
  .timer 1 14 msg $nick Type !chgasl nick asl to change the asl of nick ,only for users with level 100
  .timer 1 16 msg $nick Type !asllist To see the list, the list will be played in your private and only level 100 again
  .timer 1 18 msg $nick If the bot askes somwans asl the users will have to type !myasl his-asl, then bot will add him then
  .timer 1 20 msg $nick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}

Comments

Sign in to comment.
larry   -  Nov 07, 2006

Yoinx, me to, i have all my help files in a txtfile and then just play them but this is a complete snippet. you just have to load it and thats all. Thats why i used timers ;)

 Respond  
Yoinx   -  Nov 06, 2006

for the help, I would personnally just make a topic at the end of the script file...

[help]
help item 1
help item 2
etc

then, you can just use
play -thelp nick $qt($script)
instead of all the timers.

 Respond  
[Jay]   -  Nov 06, 2006

thats pretty cool... though i dont see the point.. also, i might take this and make it into an alias, so it doesn\'t have to be for a remote client (ie, a bot)

-[Jay]-

 Respond  
larry   -  Oct 31, 2006

woops, i changed it :P

 Respond  
Noutrious   -  Oct 31, 2006

Don`t take this personal, but i was loughting seeing - your asl bye typing :D bye should be by :)

 Respond  
larry   -  Oct 31, 2006

btw, sorry for bad english, i\'m Russian/Belgian

 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.