mIRC Home    About    Download    Register    News    Help

Print Thread
#95886 28/08/04 01:11 AM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
OP Offline
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

#95887 28/08/04 02:06 AM
Joined: Jul 2003
Posts: 39
X
Ameglian cow
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"

#95888 28/08/04 03:23 AM
Joined: Aug 2004
Posts: 4
E
Self-satisified door
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

#95889 28/08/04 04:29 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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
#95890 28/08/04 08:51 PM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
OP Offline
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!

#95891 28/08/04 09:35 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
It works if you remove the s from "https://".

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

#95892 29/08/04 01:54 AM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
OP Offline
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

#95893 29/08/04 03:42 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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
#95894 30/08/04 05:51 PM
Joined: May 2004
Posts: 12
C
compaq Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: May 2004
Posts: 12
King Tomato: Yes, but where do I add the remote etc.?

#95895 30/08/04 06:02 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
The whole file belongs in the remotes section.


-KingTomato

Link Copied to Clipboard