|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
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!
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Jan 2003
Posts: 53
Babel fish
|
Babel fish
Joined: Jan 2003
Posts: 53 |
not tested, but should work  replace if ($2 !isnum) { msg %who $2 is not a number. | return } with if ($2 !isnum) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
should work as expected it will show the result if number of matches does not exceed 20 if you wanna change that, change isnum 1-20 to 1-30 or whatever and also change the number in the last else line
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
Cool! Will the !quote "number" still work? I'll test it once I sober up.. Thank you!
Last edited by gomp; 30/12/06 05:38 PM.
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
Hey! I tested it now. I get this strange error.. 00:11:30 <curious> Matches for dream --> 11,25,56,78,81,89,91,96,121,128,132,163,164,165,176 00:11:30 <curious> Quote #buddhismdream doesn't exist.00:11:30 <curious> !quote dream Other than that it works fine! Thank you so much for helping. 00:13:14 <curious> Matches for ok --> 75,121,146,169,185,188 00:13:14 <curious> Quote #buddhismok doesn't exist. 00:13:14 <curious> !quote ok 00:13:22 <curious> "I w oke up from my dream, by 're-al(l) -I- ·zing' it!" 00:13:22 <curious> !quote 121 00:13:30 <curious> Haha.. It also works kind of strange.. 
Last edited by gomp; 11/01/07 11:17 PM.
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Look for this line in your script:
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
Change # to:
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $2 doesn't exist. | return }
It was turning # into the channel name.  From your example, I'm not sure why it was doing that unless the new code that searches for the word isn't merged correctly. Can you paste your full script that you're using now? When you do, I can also set it to not match "woke" for "ok".
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
My god, you are one nice individual! I love you! Thank you so much for being so helpful! You make my heart cry of joy!  It still gives the same error though: 10:17:22 <Curious> Matches for test --> 180 10:17:22 <Curious> Quote #narkotikatest doesn't exist. 10:17:22 <Curious> !quote test BTW: I tested it using a "puppet" too: [10:31:31] <IAmPartOf> !quote test [10:31:31] <Curious> Matches for test --> 180 [10:31:32] <Curious> Quote #test doesn't exist. Here is the whole script as it is today:
;--------------------------------------------------------------------------------------------------------:
;
; - !Quotescript...
;
on *:text:!quote*:*: {
if ($level($address($nick,8)) == Quote.Ban) { return }
else var %who = $nick
if ($chan) {
if (!$istok(#narkotika #paranormal #mensa #sirstargazer #4threich #asylum #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $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 #asylum #4threich #astral #br1 #TheSpot #philosophy! #Invision #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #felles #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
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. And: !quote "word" to search...
}
:--------------------------------------------------------------------------------------------------------:
Again, thank you for helping me so much. I really like you. Once everyone help each other as selfless as you do, the world will be a better! 
Last edited by gomp; 18/01/07 09:36 AM.
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Look for:
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
msg %who $read(quotes.txt,$2)
Put that in an ELSE statement:
else {
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
msg %who $read(quotes.txt,$2)
}
The way you have it, that IF will be wrong if $2 isn't a number, so you don't want it to happen if you searched for a word.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
Look for:
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
msg %who $read(quotes.txt,$2)
Put that in an ELSE statement:
else {
if ($lines(quotes.txt) < $2) { msg %who Quote # $+ $2 doesn't exist. | return }
msg %who $read(quotes.txt,$2)
}
The way you have it, that IF will be wrong if $2 isn't a number, so you don't want it to happen if you searched for a word. I must be doing it wrong... 18:39:27 <Curious> Matches for life --> 14,78,91,137,138,184,191,194,197,200,205 18:39:27 <Curious> Quote #narkotikalife doesn't exist. 18:39:27 <Curious> !quote life Could you quote the whole script as you fixed it? So I can just replace the whole thing? My bad again, I think.. Thanks for fixing!
Last edited by gomp; 22/01/07 05:55 PM.
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
18:56:44 -> *Curious* Available commands: !quote, !quotes, !quote "number", and !addquote "quote" - Author. And: !quote "word" to search... 18:56:44 <Curious> !quote reality I get a msg from myslef saying: Session Start: Mon Jan 22 18:56:44 2007 Session Ident: Curious 22/01 2007 - 18:56:44 Session Ident: Curious (~prejudice@ti211110a080-8994.bb.online.no) 18:56:44 <Curious> Available commands: !quote, !quotes, !quote "number", and !addquote "quote" - Author. And: !quote "word" to search... I got this quote script now:
;--------------------------------------------------------------------------------------------------------:
;
; - !Quotescript...
;
on *:text:!quote*:*: {
if ($level($address($nick,8)) == Quote.Ban) { return }
else var %who = $nick
if ($chan) {
if (!$istok(#narkotika #paranormal #mensa #sirstargazer #4threich #asylum #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
else {
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 #asylum #4threich #astral #br1 #TheSpot #philosophy! #Invision #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #felles #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
else {
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. And: !quote "word" to search...
}
:--------------------------------------------------------------------------------------------------------:
Somethign strange happened.. I shold not do this when drunk.. Damn me... /me slaps gomp
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
;--------------------------------------------------------------------------------------------------------:
;
; - !Quotescript...
;
on *:text:!quote*:*: {
if ($level($address($nick,8)) == Quote.Ban) { return }
else var %who = $nick
if ($chan) {
if (!$istok(#narkotika #paranormal #mensa #sirstargazer #4threich #asylum #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $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 #asylum #4threich #astral #br1 #TheSpot #philosophy! #Invision #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #felles #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
else {
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $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. And: !quote "word" to search...
}
:--------------------------------------------------------------------------------------------------------:
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
Thanks again, testing it now. 
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
THANK YOU!
If there is anything I can do for you!?
Anything...
I'll do what I can...
Thank you SO much for helping!
Works fine now.. (Just as assumed.)
You know you deal!
LOVE!
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
15:40:24 * Topic is '"buddhas dont practice nonsense."' 15:40:24 * Set by brianz!brian@Scroll.Z on Thu Jan 25 01:06:52 15:42:28 <korg_> hi 15:43:00 <Curious>  15:49:17 <Jagg1> My heart is beating 15:52:49 <Curious> Duh? 15:52:52 <Curious> Matches for heart --> 105 15:52:52 <Curious> !quote heart 15:52:57 <Curious> "The ultimate weapon is the fighters heart!"  15:52:57 <Curious> !quote 105 15:53:55 <Jagg1> !quote heart 15:53:55 <Curious> Matches for heart --> 105 15:53:55 <Curious> Quote #heart doesn't exist. 15:54:17 <Jagg1> ? 15:55:05 <Curious> Dang.. 15:55:11 <Curious> Still some errors.. What am I doing worng now? Here is the script: It is the one I copy pasted from you, I think..
;--------------------------------------------------------------------------------------------------------:
;
; - !Quotescript...
;
on *:text:!quote*:*: {
if ($level($address($nick,8)) == Quote.Ban) { return }
else var %who = $nick
if ($chan) {
if (!$istok(#narkotika #paranormal #mensa #sirstargazer #4threich #asylum #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $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 #asylum #4threich #astral #br1 #TheSpot #philosophy! #Invision #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #felles #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
else {
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $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. And: !quote "word" to search...
}
:----------------------------------
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
Joined: Jun 2004
Posts: 243
Fjord artisan
|
OP
Fjord artisan
Joined: Jun 2004
Posts: 243 |
I understood it after reading your /msg ... Here is the working script, for anyone interested..
;--------------------------------------------------------------------------------------------------------:
;
; - !Quotescript...
;
on *:text:!quote*:*: {
if ($level($address($nick,8)) == Quote.Ban) { return }
else var %who = $nick
if ($chan) {
if (!$istok(#narkotika #paranormal #mensa #sirstargazer #4threich #asylum #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
else {
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $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 #asylum #4threich #astral #br1 #TheSpot #philosophy! #Invision #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #felles #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) {
window -h @quote.search
loadbuf -r @quote.search quotes.txt
var %quote.temp $fline(@quote.search,$+(*,$2-,*),0)
if (%quote.temp isnum 1-20) {
var %i = 1,%quote.match
while ($fline(@quote.search,$+(*,$2-,*),%i)) {
%quote.match = $addtok(%quote.match,$v1,44)
inc %i
}
msg $chan Matches for $2 --> %quote.match
window -c @quote.search
}
elseif (%quote.temp == 0) { msg $chan No match found. }
else { msg $chan More than 20 matches found, please narrow your search down }
}
else {
if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $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. And: !quote "word" to search...
}
:----------------------------------
And here is the quotes.txt (I have written all that is not credited to "some one" ... ) http://terror.sintrax.net/~geir/quotes/quotes.txt It still works like this though: 16:07:29 <Curious> Matches for test --> 199 16:07:29 <Curious> !quote test 16:07:34 <Curious> "Among the great things which are to be found among us, the Being of Nothingness is the grea test." -- Leonardo Da Vinci (1452 - 1519) 16:07:34 <Curious> !quote 199 But, it might be for the better..
Last edited by gomp; 26/01/07 03:12 PM.
I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
|
|
|
|
|