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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}