This is a very simple Random number or text script.
============================================================================================
*UPDDATE*
============================================================================================
on *:TEXT:!random*:#:{
if ($2 == number) {
msg $chan $r(1,10) %+ $r(1,10) $+ $r(1,10)
}
elseif ($2 == text) {
msg $chan $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z)
}
else {
msg $chan $nick Please select either Number or Text.
}
}
Nice script!
I think a good idea would be to use else-if instead. If you use this, then mIRC will automatically skip the stage if it has already found the answer, thus meaning the script doesn't keep looking:
on *:TEXT:!random*:#:{
if ($2 == number) {
msg $chan $rand(1,10) %+ $rand(1,10) $+ $rand(1,10)
}
elseif ($2 == text) {
msg $chan $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) $+ $rand(a,z)
}
else {
msg $chan $nick Please select either Number or Word.
}
}
If anything which is NOT number or text is typed, then the script tells them what to select!
on the script the
if ($2 == $something)
u have them like this
if($2 == $something)
so it won't work
on *:TEXT:!random*:#:{
if ($2 == number)
msg $chan $rand(1,10) %+ $rand(1,10) $+ $rand(1,10)
if ($2 == text)
msg $chan $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) $+ $rand(a,z)
if ($2 == $null)
msg $chan $nick Please select either Number or Word.
}