Hello,

this might be something helpful for you:

Go to Start --> Run --> wordpad.exe and paste the following code in there.
Then copy paste from WordPad to your mIRC Scripts Editor Remote (in mIRC: alt+r --> Remote)
Code:
 
menu channel {
  .$iif($group(#quotes) == on,Disable,Enable) Quotes Script:{
    $iif($group(#quotes) == on,disable,enable) #quotes
  }
}
alias AddQuote { 
  if (!$1) { echo -a Error: You have to specify a nickname. | return }
  if ($2 == $null) { echo -a Error: You have to specify a quote. | return }
  write quotes.txt $+($1,=,$2-)
}
 [color:red]  [/color] 
#quotes on
on *:TEXT:!quote *:#:{
  if ($2 != $null) {
    if !$window(@quotes) { window -h @quotes }
    filter -fwc quotes.txt @quotes $+($2,=,*,$3-,*) 
    if !$filtered { msg # Sorry $nick but I didn't find any match for $2 | return }
    tokenize 61 $line(@quotes,$r(1,$line(@quotes,0)))
    msg # $+(Quote by $1,: ",$2-,") 
  }
}
#quotes end

There are 2 ways of adding quotes to the quotes.txt file:

1) Manually editing the quotes.txt file
2) Using the alias /AddQuote <nickname> <quote> without the <>


Explanation of the script: !quote <nick> [matchtext]

1.
If people type: !quote nickname then the script will filter all matches from the quotes.txt file to a hidden window called @quotes. It will then take a random line from that window (if any), and message it to the channel.

If people type: !quote nickname matchtext then the script will filter all matches for not only the nickname but for the specified matchtext as well together. Once again the script will then msg a random line (if any) to the channel.

2.
You can Enable/Disable the script by right clicking in a channel window.

3.
Important: the way the script is setup now, is that your script will trigger on ANY channel that you are in. Perhaps you can put your channels in a variable like /set %quotechans #chan1,#chan2,... and then use

on *:TEXT:!quote *:%quotechans: {

or simply manually put: on *:TEXT:!quote *:#chan1,#chan2: {

4.
Note that people could take advantage of this by getting you flooded off the server, due to excessive quote requests.

Greetz

Last edited by FiberOPtics; 26/05/04 12:48 PM.

Gone.