This is a script that Riamus2 made for me!
It works in /msg without limit, and limited with a random timer, in the channels, of my choise.
It got:
Available commands:
!quote,
!quotes,
!quote "number", and
!addquote "quote" - Author.
And I wonder if it is easy to add a
!quote "word" ..
So that it will [just for eksample:] respond on say
!quote sleep With: 3 matches; 3,67,120
And then one could type
!quote 3 (Or 67, or 120.) and get to see the quote on "sleep".
Here is the script as it is now. And all is working fine in it.
So, I just wonder if anyone can add the new function.
Thank you for your time!
;--------------------------------------------------------------------------------------------------------:
;
; - !Quotescript...
;
on *:text:!quote*:*: {
if ($level($address($nick,8)) == Quote.Ban) { return }
else var %who = $nick
if ($chan) {
if (!$istok(#narkotika #paranormal #mensa #sirstargazer #astral #br1 #TheSpot #philosophy! #Invision #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #immortal-technique #felles #tv.no #chemistry #filosofi #NanoTechnology #åndelig #ganja #pinehillhaints #Le·g·ion! #innvikling #Truth #Gudene #shamanism #christian #innsikt #2012 #utvikling #sms.no #tao #rytmeboksen #dreamt #3d_life #archangels #spiritual #ascension #ugdulf #dreaming #spirituality #buddhism #shrooms #psychedelics #spiritual #narkotika #filosofisk #filosofi #åndelighet,$chan,32)) { return }
var %who = $chan
if (%quote.delay) {
.notice $nick Please try again after random delay of: $duration(%quote.delay) - Or use !"commands" in a PM.
return
}
else {
var %delay = $rand(25,47)
set -u [ $+ [ %delay ] ] %quote.delay %delay
}
}
if ($2) {
if ($2 !isnum) { msg %who $2 is not a number. | return }
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
msg %who $read(quotes.txt,$2)
}
elseif ($1 == !quotes) { msg %who Total quotes: $lines(quotes.txt) }
else msg %who $read(quotes.txt)
}
on *:text:!addquote*:*: {
if ($2 == $null) { .notice $nick You need to include a quote to add. }
else write quotes.txt $2-
}
menu nicklist {
!Quote Ban: auser Quote.Ban $address($snick($chan,1),8)
}
on *:input:*: {
if ($1 == !quote) {
var %who = $iif($chan,$chan,$me)
if ($chan) {
if (!$istok(#narkotika #paranormal #sirstargazer #mensa #astral #br1 #TheSpot #philosophy! #Invision #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #immortal-technique #felles #tv.no #chemistry #filosofi #NanoTechnology #åndelig #ganja #pinehillhaints #Le·g·ion! #innvikling #Truth #Gudene #shamanism #christian #innsikt #2012 #utvikling #sms.no #tao #rytmeboksen #dreamt #3d_life #archangels #spiritual #ascension #ugdulf #dreaming #spirituality #buddhism #shrooms #psychedelics #spiritual #narkotika #filosofisk #filosofi #åndelighet,$chan,32)) { return }
if (%quote.delay) {
echo -a Please try again after $duration(%quote.delay) or use !quote in a PM.
return
}
else {
var %delay = $rand(3,5)
set -u [ $+ [ %delay ] ] %quote.delay %delay
}
}
if ($2) {
if ($2 !isnum) { msg %who $2 is not a number. | return }
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
msg %who $read(quotes.txt,$2)
}
else msg %who $read(quotes.txt)
}
elseif ($1 == !quotes) { msg %who Total quotes: $lines(quotes.txt) }
elseif ($1 == !addquote) {
if ($2 == $null) { echo -a You need to include a quote to add. }
else write quotes.txt $2-
}
}
on *:text:!help:#: {
msg $nick Available commands: !quote, !quotes, !quote "number", and !addquote "quote" - Author.
}
:--------------------------------------------------------------------------------------------------------:
Thank you!