8Ball

By Storm2108 on Feb 22, 2008

All you do is type `8ball question and it will give you an answer.

on *:load:{ write 8ball8.txt Yes. | write 8ball8.txt No. | write 8ball8.txt Maybe. | write 8ball8.txt Try again later. | halt }
on *:TEXT:*`8Ball *:#:{
describe $chan is looking into the 8ball.
msg $chan $read(8ball8.txt)
halt 
}

Comments

Sign in to comment.
water_dragon   -  Feb 24, 2008

oh my mistake thats wot he has done :S

 Respond  
water_dragon   -  Feb 24, 2008

all just make it read from a text file that way people wouldnt have to edit the script and just put there own words in :)

 Respond  
guest598594   -  Feb 22, 2008

humming_hi, no need for $replace, just set the var with a delimeter like \"Yes.|No.|Maybe.|Try again later.|other words with spaces.\"

or better yet, u could $gettok 46 since they all end in periods

 Respond  
humming_hi   -  Feb 22, 2008

Hi, you could also do it like this. to add more answers, add them to the var and use + for spaces.

 on *:text:`8ball *:#: {
  describe $chan is looking into the 8ball.
  var %~ = Yes. No. Maybe. Try+again+later.
  msg # $replace($gettok(%~,$r(1,$numtok(%~,32)),32),+,$chr(32)) 
} 
 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.