hi guys iam trying to make a lil search script that goes somthing like this it consists on 2 ontexts
on *:TEXT:!adddvdr *:#test:{
if (($nick == $nick)) && ((bot == $me)) {
if ($read(dvdr.txt,w,$2-)) {
msg #test This already exists!
}
else {
write dvdr.txt $2-
msg #test This has been successfully added.
}
}
}
on *:TEXT:!deldvdr *:#test:{
if (($nick == $nick)) && ((bot == $me)) {
if (!$read(dvdr.txt,w,$2-)) {
msg #test This doesn't exist!
}
else {
write -dl $readn dvdr.txt
msg #test Has been successfully deleted.
}
}
the above works great,but what id like to try and do is make it so i dont have to have multi scripts of the above for each txt file..since it has to be able to read from around 12 txt files
and using diff triggers such as !addxvid !addgames etc any help gladly welcomed cheers guys