mIRC Home    About    Download    Register    News    Help

Print Thread
Quote System #95886
28/08/04 01:11 AM
28/08/04 01:11 AM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
compaq  Offline OP
Pikka bird
C

Joined: May 2004
Posts: 12
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

Re: Quote System #95887
28/08/04 02:06 AM
28/08/04 02:06 AM
Joined: Jul 2003
Posts: 39
X
Xanadu Offline
Ameglian cow
Xanadu  Offline
Ameglian cow
X

Joined: Jul 2003
Posts: 39
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"

Re: Quote System #95888
28/08/04 03:23 AM
28/08/04 03:23 AM
Joined: Aug 2004
Posts: 4
E
eyerouge Offline
Self-satisified door
eyerouge  Offline
Self-satisified door
E

Joined: Aug 2004
Posts: 4
I wrote one some time ago...

.txt]http://mircscripts.org/downloads/sunquote21c[09-18].txt

Re: Quote System #95889
28/08/04 04:29 AM
28/08/04 04:29 AM
Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
KingTomato Offline
Hoopy frood
KingTomato  Offline
Hoopy frood

Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
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

Last edited by KingTomato; 28/08/04 04:52 AM.

-KingTomato
Re: Quote System #95890
28/08/04 08:51 PM
28/08/04 08:51 PM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
compaq  Offline OP
Pikka bird
C

Joined: May 2004
Posts: 12
King Tomato, The requested URL //mirc/code/quotes.mrc was not found on this server.

Thanks a lot!

Re: Quote System #95891
28/08/04 09:35 PM
28/08/04 09:35 PM
Joined: Dec 2002
Posts: 3,138
London, UK
C
Collective Offline
Hoopy frood
Collective  Offline
Hoopy frood
C

Joined: Dec 2002
Posts: 3,138
London, UK
It works if you remove the s from "https://".

http://www.kingtomato.org/mirc/code/quotes.mrc

Re: Quote System #95892
29/08/04 01:54 AM
29/08/04 01:54 AM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
compaq  Offline OP
Pikka bird
C

Joined: May 2004
Posts: 12
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

Re: Quote System #95893
29/08/04 03:42 AM
29/08/04 03:42 AM
Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
KingTomato Offline
Hoopy frood
KingTomato  Offline
Hoopy frood

Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
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.


-KingTomato
Re: Quote System #95894
30/08/04 05:51 PM
30/08/04 05:51 PM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
compaq  Offline OP
Pikka bird
C

Joined: May 2004
Posts: 12
King Tomato: Yes, but where do I add the remote etc.?

Re: Quote System #95895
30/08/04 06:02 PM
30/08/04 06:02 PM
Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
KingTomato Offline
Hoopy frood
KingTomato  Offline
Hoopy frood

Joined: Jan 2003
Posts: 3,012
New Hampshire, USA
The whole file belongs in the remotes section.


-KingTomato