Err...my 3rd post and 3rd script ^-^ Enjoy
on *:TEXT:!8ball*:#:{
set %8ball $rand(1,10)
if (%8ball == 1) msg $chan 10No!
if (%8ball == 2) msg $chan 10Yes
if (%8ball == 3) msg $chan 10Maybe
if (%8ball == 4) msg $chan 10Of course
if (%8ball == 5) msg $chan 10Are you crazy?!?!
if (%8ball == 6) msg $chan 10How should I know?
if (%8ball == 7) msg $chan 10What are you smoking?
if (%8ball == 8) msg $chan 10No way in hell!
if (%8ball == 9) msg $chan 10Only on the weekends
if (%8ball == 10) msg $chan 10Hahahaha, you make me laugh!
}
Do you mean this `green?
on :TEXT:!8ball:#:{
if ($2- == $null) {
msg $chan No Question was Entered!
}
else {
set %8ball $rand(1,10)
if (%8ball == 1) msg $chan 10No!
if (%8ball == 2) msg $chan 10Yes
if (%8ball == 3) msg $chan 10Maybe
if (%8ball == 4) msg $chan 10Of course
if (%8ball == 5) msg $chan 10Are you crazy?!?!
if (%8ball == 6) msg $chan 10How should I know?
if (%8ball == 7) msg $chan 10What are you smoking?
if (%8ball == 8) msg $chan 10No way in hell!
if (%8ball == 9) msg $chan 10Only on the weekends
if (%8ball == 10) msg $chan 10Hahahaha, you make me laugh!
}
}
heh probly so.
`Green wrote:
maybe add an if that will say "No Question Was Entered!" if nobody adds a question after !8Ball.
to do the if $2 was not said you can change the line
msg # 10 $gettok(%@,$r(1,10),124)
to this in my edited version of it.
msg # $iif(!$2,4Sorry No Question Was Entered!,10 $gettok(%@,$r(1,10),124))
you should use local vars instead of global and add a flood pro to it as well.
on *:TEXT:!8ball *:#:{
if (!$($+(%,8ballflood),2)) {
set -u4 $+(%,8ballflood) on
var %@ = No!|Yes|Maybe|Of course|Are you crazy?!?!|How should I know?|What are you smoking?|No way in hell!|Only on the weekends|Hahahaha, you make me laugh!
msg # 10 $gettok(%@,$r(1,10),124)
}
}