mIRC Homepage
Posted By: compaq Quote System - 28/08/04 01:11 AM
I tried several quote systems, and so far, I haven't seen one (with not too many bugs!) where users can !add the quotes themselves. Anyway, I found this one, but I can't change the file's location. (C:\quotes.txt) If I do change it, people cannot !add anymore. Any.. suggestions?

Code:
 
on *:load: { write -c C:\quotes.txt | set %QuoteN 0 } 
on *:unload: { write -c C:\quotes.txt | unset %QuoteN } 
on *:text:!AddQuote*:#: { if ($2) { inc %QuoteN 1 | write -l $+ %QuoteN C:\quotes.txt %QuoteN 7Quote5 %QuoteN $+ 1:5" $+ $2- $+ " 1- 7Set by5 $nick $+ 1 7on1 $adate $+ . | msg # 7Added quote1 "5 $+ $2- $+ 1"7 by5 $nick $+ . } 
  else { 
    msg # 3Please add a quote! 
  }
}
on *:text:!Quote*:#: { if (!$2) { msg # $read(C:\quotes.txt) 
  }
  elseif ($2) && ($2 isin $read(C:\quotes.txt,$2)) {
    msg # $read(C:\quotes.txt,$2) 
  }
  elseif ($2 !isin $read(C:\quotes.txt,$2)) {
    msg # 3Quote not found!  Please try another number!
  }
}
alias rquotes {
  .timerquote 0 4 msg # $read(C:\quotes.txt)
}
wink
Posted By: Xanadu Re: Quote System - 28/08/04 02:06 AM
WHere are you trying to change the location to? Might be as simple as adding " " around the file path.

example:

write -c "c:\path to\file.txt"
Posted By: eyerouge Re: Quote System - 28/08/04 03:23 AM
I wrote one some time ago...

.txt]http://mircscripts.org/downloads/sunquote21c[09-18].txt
Posted By: KingTomato Re: Quote System - 28/08/04 04:29 AM
Here is one a little simpler I just whipped up. Commands are
!quote - Reads random quote
!quote <num> - Reads quote <num>
!addquote <quote> - Adds a quote to the database

https://kingtomato.org//mirc/code/quotes.mrc
Posted By: compaq Re: Quote System - 28/08/04 08:51 PM
King Tomato, The requested URL //mirc/code/quotes.mrc was not found on this server.

Thanks a lot!
Posted By: Collective Re: Quote System - 28/08/04 09:35 PM
It works if you remove the s from "https://".

http://www.kingtomato.org/mirc/code/quotes.mrc
Posted By: compaq Re: Quote System - 29/08/04 01:54 AM
I realized that everytime I started my script, the quotes.txt file got erased. Anyway... maybe I should get another code. King Tomato, yours is a bit confusing smirk
Posted By: KingTomato Re: Quote System - 29/08/04 03:42 AM
Collective: thanks. I was in my server's control panel, and copied it wrong wink

compaq: Confusing? in what way? All you really need to know is:
!quote - Generates random quote
!quote N - Reads Quote N
!addquote quote - Adds quote to the quote database.
Posted By: compaq Re: Quote System - 30/08/04 05:51 PM
King Tomato: Yes, but where do I add the remote etc.?
Posted By: KingTomato Re: Quote System - 30/08/04 06:02 PM
The whole file belongs in the remotes section.
© mIRC Discussion Forums