/*
!monster monster_name/id
monster.txt must be like..
1002,PORING,Poring,1,50
1003,ZORRO,Zorro,1,51
1023,MAMBO,Mambo,1,51
ex of ussing.. !monster 1002 or !monster Zorro
monster_name is case insensitively
*/
on 1:TEXT:!monster *:#:{
var %f = monsters.txt
if ($2 isnum) { | ;User try to get info using the id
var %Data = $read(%f,w,$+($2,$chr(44),*) ) | ; $asc(,) = 44
msg $chan $nick %Data
}
elseif ($len($2) >= 1) {
close -@ @@
window -h @@
var %RegEx = /\d+\x2c(?i) $+ $2 $+ \x2c/ | ; \x2c = $asc(,) in hexadecimal
filter -fwg %f @@ %RegEx
var %Data = $line(@@,1)
window -c @@
msg $chan $nick %Data
}
}