Quote System

By Cage on Jul 20, 2006

Quote System




Commands:


!quote - Displays a random quote recorded by the script.


!quote info - Displays the number of available quotes.




Records everything said on a channel if the length of message is greater than or equal to thirty characters. Those messages are sent to a text file. It does distinguish between different channels, and quotes the messages accordingly.

on *:TEXT:*:#: {
  if ($1 == !quote) && ($2 == info) {
    if (!%waitthreeagain) {
      msg $chan Total Number of Quotes: $+(,$lines(quotes. $+ $chan $+ .txt),)   
      msg $chan To prevent flooding, you can only request 1 quote every 3 seconds.
      set -u3 %waitthreeagain 1
    }
    else { halt }
  }
  elseif ($1 == !quote) && (!$2) {
    if (!%waitthree) {
      msg $chan Quote: $read(quotes. $+ $chan $+ .txt)
      set -u3 %waitthree 1
    }
    else { halt }
  }
  elseif ($len($1-) >= 30) {
    write quotes. $+ $chan $+ .txt $1- [By: $nick $+ ]
  }
}

Comments

Sign in to comment.
ZabuzaMomochi   -  Aug 02, 2006

And i would set it to more than 30 letters because i typed a very simple sentence yet it was 23 letters oo;

 Respond  
ZabuzaMomochi   -  Aug 02, 2006

ER WE GO! Sorry i just got done making something for a friend. 5 out of 10!

 Respond  
Cage   -  Aug 02, 2006

...

 Respond  
Cage   -  Jul 24, 2006

Rating..? Maybe? Please?

 Respond  
Cage   -  Jul 22, 2006

1) Every message said in a channel that is 20 characters or more is saved in quotes.#channel.txt. These messages are then randomly chosen and sent to the designated channel upon typing the command: !quote

2) I\'ll update it to using only one \"on TEXT\" event soon.

3) I\'m not sure how I could make the variables any cleaner than they are. heh.

 Respond  
Pibb   -  Jul 21, 2006

Not completely understanding the .txt file thing.
And then i\'m a nut on only having 1 (one) on text even.
And make the variables cleaner, to make it easier on editing.

 Respond  
Cage   -  Jul 21, 2006

Questions? Comments? Ratings..?

 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.