My Quote System

By Ace99 on Nov 30, 2005

A regular quote system with some extra commands. You can let other users type !Quote to see a quote in your quotes.txt, and you have the option to let them add quotes themselves. It also lets you view your quotes. I did enough to get you started, you can add the colors to the messages if you want. Make sure you have a quotes.txt

menu channel,status,nicklist {
  Quote System
  .Add A Quote: set %newquote $$?="What is your quote?" | write quotes.txt %newquote | msg $chan Quote Added: %newquote 
  .Say A Quote: msg $chan $nick Random Quote $read quotes.txt 
  .View Quotes:window @quotes | if ($exists(quotes.txt)) { loadbuf -p @quotes quotes.txt 
    .Enable Auto Quote:.enable #autoquote on | msg $chan You can now type !Quote to view the random quote and to add one Type !AddMessage <Random Message>.
    .Disable Auto Quote:.disable #autoquote off | msg $chan !Quote And !AddMessage <Random Message> are now disabled.
    .View Quotes In File:run $findfile($mircdir,quotes.txt,1)
  }
}

#autoquote on
on 1:text:!quote:#:{
  if ($lines(quotes.txt) == 0) { .notice $nick Sorry, but there are no quotes. Do !AddMessage <Random Quote Message> to add your quotes! | halt }
  msg $chan Random Quote : $read(quotes.txt)
}

on 1:text:!Addmessage *:#: {
msg $chan Added Quote: $nick $+ : $2-  
  write quotes.txt $nick $+ : $2-  
}
#autoquote end

Comments

Sign in to comment.
Moose   -  Dec 04, 2005

You should think about adding to it. Like !quote which would give you the quote for that id. Also finding quotes, with a specified word, or phrase, Just some Ideas :), GJ

 Respond  
Sasuke   -  Dec 01, 2005

Ah yes, sorry everyone, my apologies.

 Respond  
Ace99   -  Dec 01, 2005

Sasuke: Yes it would be those quotes.
Anthalus: Sorry, it was made to work with my script, I fixed it, I think.
Ronin: Maybe in another quote system.

 Respond  
RoninWarrior   -  Dec 01, 2005

if (%whatever =$null) { halt } just incase there are quotes in the file.txt it wont return Random Quote: and no quote and also your @quotes window add some popups to it so you can edit remove etc etc from the @quotes window that would be nice.

 Respond  
Sasuke   -  Dec 01, 2005

I know that, but it wouldn\'t be those quotes XD

 Respond  
anthalus   -  Nov 30, 2005

You forgot to define this variable:

if (%autoflooded >= 2)

 Respond  
`Kazuma   -  Nov 30, 2005

Sasuke, you could change the file name you know.

 Respond  
Sasuke   -  Nov 30, 2005

Tis good, pretty clean, but What if someone already has the text file as Quote.txt ?

 Respond  
Ace99   -  Nov 30, 2005

I edited it around a bit, so if you find any errors, just point them out. I hope you like it... :)

 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.