so im a little confused, what i would to accomplish is being able to use the same script in channel and query(pm) with bot. this is the code i have:
on *:TEXT:!item *:#,?:{
if ($target = $me) {
if ($read(C:\Users\...\AppData\Roaming\mIRC\txtfiles\items.txt,ns,$2-) != $null) {
var %pokemon $read(C:\Users\...\AppData\Roaming\mIRC\txtfiles\items.txt,ns,$2-)
notice $nick Name: $+ $chr(32) $gettok(%pokemon,1,59) $chr(32) $chr(124) $chr(32) $+ Description: $+ $chr(32) $gettok(%pokemon,2,59) $chr(32) $chr(124) $chr(32) $+ Sell-able from Player Shop: $+ $chr(32) $gettok(%pokemon,3,59) $chr(32) $chr(124) $chr(32) $+ Buyable: $+ $chr(32) $gettok(%pokemon,4,59) $chr(32) $chr(124) $chr(32) $+ Other: $+ $chr(32) $gettok(%pokemon,5,59) $chr(32)
}
}
else {
if ($read(C:\Users\camck\AppData\Roaming\mIRC\txtfiles\items.txt,ns,$2-) != $null) {
var %pokemon $read(C:\Users\camck\AppData\Roaming\mIRC\txtfiles\items.txt,ns,$2-)
notice $nick Name: $+ $chr(32) $gettok(%pokemon,1,59) $chr(32) $chr(124) $chr(32) $+ Description: $+ $chr(32) $gettok(%pokemon,2,59) $chr(32) $chr(124) $chr(32) $+ Sell-able from Player Shop: $+ $chr(32) $gettok(%pokemon,3,59) $chr(32) $chr(124) $chr(32) $+ Buyable: $+ $chr(32) $gettok(%pokemon,4,59) $chr(32) $chr(124) $chr(32) $+ Other: $+ $chr(32) $gettok(%pokemon,5,59) $chr(32)
}
else {
notice $nick I couldn't find a Item with that name. Check your spelling, and try again
}
}
}
it does what i want but, if im in channel it automatically sends pm to bot and displays again the script message again. so message is displayed in both channel and pm with bot not just one or the other like i would to happen. where did i mess up?