Simple !8ball script.

By cdcyborg on May 25, 2005

Simply use "!8b on" to turn the game on, "!8b off" to turn it off and !8ball (question) to ask a question. Just change "%chan" to the name of your channel.

Script made by CdCyBoRg

on *:TEXT:!8b on:%chan: {
  /enable #8ball
  /set %8ballg on | /msg $chan 8Ball enabled.
}
#8ball on
on *:TEXT:!8ball*:%chan: { 
  if (%8ballg == on) {
    set %answer $rand(1,10)
    if (%answer == 1) { msg $chan %8ball Yes }
    if (%answer == 2) { msg $chan %8ball No }
    if (%answer == 3) { msg $chan %8ball Maybe }
    if (%answer == 4) { msg $chan %8ball Of course! }
    if (%answer == 5) { msg $chan %8ball never }
    if (%answer == 6) { msg $chan %8ball keep dreaming }
    if (%answer == 7) { msg $chan %8ball Yeah right.. }
    if (%answer == 8) { msg $chan %8ball And our survey says... | .timer 1 2 /msg $chan "UH UH" NOPE! }
    if (%answer == 9) { msg $chan %8ball And our survey says... | .timer 1 2 /msg $chan "DING" Yup }
    if (%answer == 10) { msg $chan %8ball Maby if u keep dreaming. }
  }
}
#8ball end
on *:TEXT:!8b off:%chan: {
  /disable #8ball
  /unset %8ballg | /msg $chan 8Ball disabled.
}

Comments

Sign in to comment.
Korvin   -  Nov 12, 2007

=p

 Respond  
guest598594   -  Nov 12, 2007

%8ballg rather

 Respond  
guest598594   -  Nov 12, 2007

korvin, u shold do else, so when u do !8b on, it duznt respond ;)

u could do something like

$iif(%8ball,unset $v1,set $v1 on)
 Respond  
Korvin   -  Nov 12, 2007

and what is the %8ball?

 Respond  
Korvin   -  Nov 12, 2007

i didnt see a point for the enable/disable, so you can make it all 1 text event:

on *:TEXT:!8b *:%chan: {
  if ($2 == on && $nick isop # && !%8ball) {
    /set %8ballg $2 | /msg $chan 8Ball enabled.
  }
  if ($2 == off && $nick isop # && %8ball) {
    /unset %8ballg | /msg $chan 8Ball disabled.
  }
  if (%8ballg == on) {
    set %answer $rand(1,10)
    if (%answer == 1) { msg $chan %8ball Yes }
    if (%answer == 2) { msg $chan %8ball No }
    if (%answer == 3) { msg $chan %8ball Maybe }
    if (%answer == 4) { msg $chan %8ball Of course! }
    if (%answer == 5) { msg $chan %8ball never }
    if (%answer == 6) { msg $chan %8ball keep dreaming }
    if (%answer == 7) { msg $chan %8ball Yeah right.. }
    if (%answer == 8) { msg $chan %8ball And our survey says... | .timer 1 2 /msg $chan \"UH UH\" NOPE! }
    if (%answer == 9) { msg $chan %8ball And our survey says... | .timer 1 2 /msg $chan \"DING\" Yup }
    if (%answer == 10) { msg $chan %8ball Maybe if u keep dreaming. }
  }
}
 Respond  
guest598594   -  Nov 12, 2007

also, its pointless turning it on/off, cuz anyone can turn it on/off

 Respond  
guest598594   -  Nov 12, 2007

i agree with helios, the if (%var == number) is a waste, i would use a txt or a variable

on *:TEXT:!8ball*:%chan: { 
  if (%8ballg == on) {
    var %x = yes|no|maybe so|i dont know|other answers
    msg $chan $gettok(%x,$r(1,$numtok(%x,124)),124)
  }
}
 Respond  
SLS10   -  Nov 12, 2007

I don\'t think it works for mine... ><

 Respond  
Heilos   -  May 29, 2005

8ball on

on :TEXT:!8ball :%chan: {
if (%8ballg == on) {
msg $chan $+(,04,8Ball:) $read(future.txt)
}
}

8ball end

Then put all the replies into a file called future.txt. It keeps the script file cleaner and replies dont have to be numbered =)

 Respond  
xDaeMoN   -  May 25, 2005

I don\'t see the purpose of the variable %8ball since it is not being set in any of the events. Also if you are enabling/disable a group for turning on/off the script, setting a variable is not needed.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.