Top

8ball (different approach)


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  3.3 (of 4 scores)
Date Added  Oct 24, 2009
Last Updated  Oct 24, 2009
Tags  8ball  random  script  slub  slub77 

Introduction

I have seen a lot of 8 ball scripts and they all look alike really so i have made one that is different.

The commands are: !8 !8 where is !8 what color !8 what is

The menu will change to notice or msg depending on what you choose

Op's can turn it off as well using the command !8m or !8n n = notice m = msg the channel

The turn off button will cycle you if u say no to msg and notice it will turn it off but as soon as u put it back on via tell it to msg it will work again

REMEMBER TO ADD THINGS TO IT BEFORE YOU START USING THE ADD MENU

Grab the Code

on *:LOAD:{
write where.txt IN A BIN
write can.txt No you can't
write color.txt RED!
write what.txt A balloon
write where.txt IN A HOUSE
write can.txt maybe..
write color.txt RED!
write what.txt A Dragon with not one not two but 3 heads!
write can.txt SAY PLEASE
}
 
 
 
#qq off
 
on *:TEXT:!8 where is*:#:/msg $chan $read(where.txt)
on *:TEXT:!8 can*:#:/msg $chan $read(Can.txt)
on *:TEXT:!8 what color*:#:/msg $chan $read(color.txt)
on *:TEXT:!8 what is*:#:/msg $chan $read(what.txt)
on *:TEXT:!8 *:#:/msg $chan $read(can.txt)
 
#qq end
 
#pp off
 
on *:TEXT:!8 where is*:#:/notice $nick $read(where.txt)
on *:TEXT:!8 can*:#:/notice $nick $read(Can.txt)
on *:TEXT:!8 what color*:#:/notice $nick $read(color.txt)
on *:TEXT:!8 what is*:#:/notice $nick $read(what.txt)
on *:TEXT:!8 *:#:/notice $nick $read(can.txt)
 
#pp end
 
on @:TEXT:!8N:*:{
  enable #pp 
  disable #qq
  msg $chan !8 will now reply via notice and can be used by soldiers now
}
 
 
on @:TEXT:!8m:*:{
  enable #qq
  disable #pp
  msg $chan 8 ill reply via msg now
}
 
menu * {
  .8ball 
  ..Add
  ..What Text
  ...Write:/write what.txt $$?"What do you want to add to this script?"
  ...Read:/msg $chan $$?"Enter the name here" $read(what.txt)
  ...Open:/run What.txt
 
  ..Where
  ...Write:/Write where.txt $$?"What do you want to put in th where text?"
  ...Read:/msg $chan $$?"Enter the name here" is $read(where.txt)
  ...Open:/run Where.txt
 
  ..color
  ...Write:/write color.txt $$?"what color do you want to add to the list?"
  ...Read:/msg $chan $$?"Enter the name here" is the color $read(color.txt)
  ...Open:/run color.txt
 
  ..Can i
  ...Write:/write Can.txt $$?"what reply do you want to add to the list?"
  ...Read:/msg $chan $read(can.txt)
  ...open:/run can.txt
 
  .Turn msg/notice:{
    echo $?!="Turn on the messages to channel"
    if $! = $true { 
      enable #qq
      disable #pp
      notice $chan !8 will now shout notice $chan !8 will now shout out in the channel and can only be used for officers and up
    }
    else {
      echo $?!="Turn on the notice to nicks"
      if $! = $true { 
        enable #pp
        disable #qq
        notice $chan !8 will now reply via notice and can be used by soldiers now
      }
      else { /halt }    
    }
  }
}
 
 
 
 
menu * {
  .8ball 
  ..Add
  ..What Text
  ...Write:/write what.txt $$?"What do you want to add to this script?"
  ...Read:/msg $chan $$?"Enter the name here" $read(what.txt)
  ...Open:/run What.txt
 
  ..Where
  ...Write:/Write where.txt $$?"What do you want to put in th where text?"
  ...Read:/msg $chan $$?"Enter the name here" is $read(where.txt)
  ...Open:/run Where.txt
 
  ..Color
  ...Write:/write Color.txt $$?"what color do you want to add to the list?"
  ...Read:/msg $chan $$?"Enter the name here" is the color $read(color.txt)
  ...Open:/run Color.txt
 
  ..Can i
  ...Write:/write Can.txt $$?"what reply do you want to add to the list?"
  ...Read:/msg $chan $read(can.txt)
  ...open:/run can.txt
 
  .Turn msg/notice:{
    echo $?!="Turn on the messages to channel"
    if $! = $true { 
      enable #qq
      disable #pp
      notice $chan !8 will now shout ootice $chan !8 will now shout out in the channel and can only be used for officers and up
    }
    else {
      echo $?!="Turn on the notice to nicks"
      if $! = $true { 
        enable #pp
        disable #qq
        notice $chan !8 will now reply via notice and can be used by soldiers now
      }
      else {echo $?!="Turn off 8ball"
      if $! = $true { 
        disable #pp
        disable #qq
        notice $chan !8 is now off
      }
    }    
  }
}
 

Comments

  (27)  RSS
slub77
Comments: 44
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 7:35 am
What no comments :(
Testor
Comments: 81
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 8:54 am
Line 34
Code:
  notice chan 8 ill reply via msg now

Should be Notice $Chan.
However, that's even worse than /Msg $Chan as everyone gets beeped, so you should do notice $Nick.
You can also delete a bracket from line 75-78 because you forgot the space after { /Halt} so that'd cut down a line if you remove that line + add a space.
slub77
Comments: 44
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 9:05 am
good eye had not noticed that thanks and i changed it to msg chan as it is meant to be an announcement.
Ghost-writer
Comments: 255
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 9:38 am
Code:

on *:TEXT:!8 where is*:#:/notice $nick $read(where.txt)
on *:TEXT:!8 can*:#:/notice $nick $read(Can.txt)
on *:TEXT:!8 what color*:#:/notice $nick $read(color.txt)
on *:TEXT:!8 what is*:#:/notice $nick $read(what.txt)
on *:TEXT:!8 *:#:/notice $nick $read(can.txt)

Could all be put in 1 on text event :p.
Btw, you should put an on load and not have us have to put it in ourselves :(!
slub77
Comments: 44
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 9:48 am
well i though u may like making ur own up :( ok let me edit

EDIT:

ok put some in for you :)

Please rate and like i wana get this one up as all the others are all most the same thing
Testor
Comments: 81
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 2:12 pm
Code:

on @:TEXT:!8m:*:{
  enable #qq
  disable #pp
  msg chan 8 ill reply via msg now
}

You forgot to change to $Chan :3.
slub77
Comments: 44
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 4:54 pm
i could have swore that i did ;-; rating 2 ;-;
sunslayer
Comments: 266
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 8:00 pm
the /'s arent needed but im glad to see that its different from all other of the 30-40 some 8ball scripts on here

another approach could be using a socket to get many more possibilities
Code:
alias 8ball {
  sockopen 8ball web.ics.purdue.edu 80
  sockmark 8ball $replace($1-,$chr(32),_)
}
on *:sockopen:8ball: {
  sockwrite -n $sockname GET $+(/~ssanty/cgi-bin/eightball.cgi?question=,$sock($sockname).mark)  HTTP/1.1
  sockwrite -n $sockname HOST: web.ics.purdue.edu $+ $crlf $+ $crlf
}
on *:sockread:8ball: {
  var %a | sockread %a
  if ($regex(%a,/<center><h1>Magic Eight Ball</h1> <hr /> <img src="/~ssanty/images/\d.gif" alt="(.*?)" /> <hr /> Question:/i)) {
    echo -a $replace($sock($sockname).mark,_,$chr(32)) $+ : $regml(1)
  }
}
that site doesnt have that many responses but its just an example
Jethro_
Comments: 436
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 24, 2009 11:41 pm
Quote:
the /'s arent needed but im glad to see that its different from all other of the 30-40 some 8ball scripts on here
<- I hope you don't mean the difference being the slashes. lol Just kidding...
slub77
Comments: 44
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 5:41 am
lol i aint very good at scokects been meaning to get around to learning how to use em just have not yet also this script was actually smaller and simpler because i used it but when i uploaded it i though i would put more detail in to it aka the menu ect but i was looking through all the 8balls and they are all mainly the same ect that dialog one that was good but other then that they were the same just with different names %var ect lol
Ghost-writer
Comments: 255
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 6:19 am
Sunslayer :| you should make that a script!
sunslayer
Comments: 266
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 9:14 am
the code is right there?
slub77
Comments: 44
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 1:05 pm
lol
Xpl0reR
Comments: 223
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 2:57 pm
you should put all the files in a folder

Code:
on *:load: { mkdir 8balz }


because people have allrady a lot of files in their $mircdir. it would be less annoying when its time for cleaning
Jethro_
Comments: 436
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 4:08 pm
I think Ghost-writer is being a funny loudmouth.
slub77
Comments: 44
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 5:20 pm
amazing 15 comments (16 noew) yet no one liked or gave it a good rating ;-;
Jethro_
Comments: 436
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 6:32 pm
Dude...It's like spreading the word about your birthday when it's supposed to be a surprise, right? lol

P.S. But I've given you a 4 for your effort and to make you happy.
Aucun50
Comments: 548
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 10:15 pm
Code:
on *:LOAD:{
write where.txt IN A BIN
write can.txt No you can't
write color.txt RED!
write what.txt A balloon
write where.txt IN A HOUSE
write can.txt maybe..
write color.txt RED!
write what.txt A Dragon with not one not two but 3 heads!
write can.txt SAY PLEASE
}


Does no one care to use ini files anymore? This would be a great time to start. One ini looks better then 4 txt files.

Code:
[8ball]
where=IN A BIN,IN A HOUSE
can=No you can't,maybe..,SAY PLEASE
color=RED!,BLUE!
what=A balloon,A Dragon with not one not two but 3 heads!


Throw in a $readini, $r, $numtok and $gettok and your set.
Jethro_
Comments: 436
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 25, 2009 11:57 pm
Aucun50, you fogot to mention hash tables.
Aucun50
Comments: 548
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 27, 2009 8:10 am
Quote:
Does no one care to use ini files anymore?
Jethro_
Comments: 436
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 27, 2009 10:37 am
Quote:
Does no one care to use ini files anymore?
Does no one care about the use of ini files or hash tables anymore?
Aucun50
Comments: 548
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 27, 2009 11:31 pm
tbh using a hash table here would just be extra work when an ini file does it fine. Also i was making a point about ini files not hash tables, so please don't quote my quote and change my words around thanks.
Jethro_
Comments: 436
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 28, 2009 12:34 am
Dude, don't get vehement over what I quoted you. Why would there be an extra work for using hash tables? Explain.
sunslayer
Comments: 266
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 28, 2009 5:26 am
Quote:
so please don't quote my quote
LOL
id have to agree with Jethro_ tho, in hash table vs. ini, hashes are usually the better choice unless your gonna be using a very large amount of data
for ~10 lines using an ini is a waste imo
napa182
Comments: 1,454
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 28, 2009 7:56 pm
lmao...... most people that act alike hash is more work dont really understand them so just agree an move on it's just another magic 8 ball script ffs.

old version i made long ago
ask in the form of a question
Code:
on $*:text:/^(8ball\s(.+)\?)$/S:#:{ if (!$($+(%,ball8flood),2)) { set -u3 $+(%,ball8flood) $nick | if ($sock(8ball)) .sockclose 8ball | sockopen 8ball pages.cs.wisc.edu 80 | .sockmark 8ball #  } }
on *:SOCKOPEN:8ball: { sockwrite -nt $sockname GET /~craft/8ball.cgi HTTP/1.1 | sockwrite -nt $sockname Host: $+(pages.cs.wisc.edu,$str($crlf,2)) }
on *:SOCKREAD:8ball: {
  var %8ball | sockread %8ball
  if ($regex(%8ball,/<h4>(.+)<\/h4>/)) { msg $sock(8ball).mark 14[04The magic 8ball says:14] $regml(1) | sockclose 8ball }
}
Jethro_
Comments: 436
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 28, 2009 11:26 pm
Oh man guess who's back, back again? Napa! lol How ya been dude....nice seein' ya 'round.
Ghost-writer
Comments: 255
 
mIRC Snippet:  8ball (different approach)
Posted on Oct 29, 2009 7:04 pm
ahh for frig tarts sake :| somone just remake the code for him, and tbh inis are better that hash tables for long term storage, i dont want to hload the hash table everytime i start and inis are not bad for small things but tbh a variable would be better since its only 1 thing and your only using 4 :|, and tbh setting a variable -e is as good as using hash tables.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom