|
illyism Wanderer
Joined: 09 Dec 2007 Posts: 58
|
Posted: Sun Apr 27, 2008 2:29 pm
quote finder(QuoteDB) |
tired of looking up quotations? then try this script.
QUOTEMSG (channel) sends a quote to your mud in the channel.
SETCAT lets you choose a category
UPDATED: added an 'all' category.
Quote: |
#CLASS {Vote_Scripts}
#al {cg} {#var category}
#ALIAS quotemsg {
showfile
%-1 '@quoteend' -@authorquote
}
#ALIAS {setcat}
#ALIAS setcat {#pick {@categories}}
#ALIAS showfile {
#script {strHTML = ~"~"}
#script {Sub getHTML:Set objHTTP = CreateObject~(~"MSXML2.ServerXMLHTTP~"):objHTTP.Open ~"GET~", ~"@linkcat~", ~"FALSE~":objHTTP.Send:strHTML = objHTTP.ResponseText:Set objHTTP = Nothing:End Sub}
#mss {getHTML}
#show %mss( strHTML)
}
#VAR category {98Envy}
#VAR categories {p:Select a category|o:1|all:#var category all;#echo your option was 1all!|cg 49America|cg 69Anger|cg 96Animals|cg 44Art|cg 40Beauty|cg 50Children|cg 8Comedy|cg 126Computers|cg 38Education|cg 121Emotion|cg 98Envy|cg 80Experience|cg 31Faith|cg 119Fame|cg 86Family|cg 48Fear|cg 77Food|cg 13Freedom|cg 6Friendship|cg 2God|cg 7Government|cg 45Happiness|cg 91Health|cg 117History|cg 66Holidays|cg 115Hope|cg 74Humor|cg 101Inspiration|cg 93Justice|cg 27Leadership|cg 43LifeandDeath|cg 5Love|cg 14Miscellaneous|cg 37Money|cg 11Morality|cg 28Patriotism|cg 62Philosophy|cg 20Politics|cg 109Power|cg 84Pride|cg 29Race|cg 39Reading|cg 60Religion|cg 71Risk|cg 15Science|cg 53Sex|cg 76Sleep|cg 75Sports|cg 9Success|cg 79Talking|cg 73Thinking|cg 51Time|cg 33TruthandLies|cg 64Virtue|cg 32WarandPeace|cg 81Wisdom|cg 34Work|cg 26Writing}
#VAR numbercat {98}
#VAR wordcat {Envy}
#VAR linkcat {http://www.quotedb.com/quote/quote.php?action=random_quote&c[@numbercat]=@numbercat}
#VAR quoteend {When men are full of envy they disparage everything, whether it be good or bad.}
#VAR authorquote {Tacitus }
#TRIGGER {your option was (%d)(%w)!} {
#if (@category=all) {
#var linkcat http://www.quotedb.com/quote/quote.php?action=random_quote
say your quotes will be about everything,http://www.quotedb.com/quote/quote.php?action=random_quote
#mxp ~<a "@linkcat">clicky clicky</a>
}
#if (@category<>all) {
#var numbercat %1
#var wordcat %2
#var linkcat "http://www.quotedb.com/quote/quote.php?action=random_quote&c[@numbercat]=@numbercat"
say @wordcat ...your link is @linkcat
#mxp ~<a "@linkcat">clicky clicky</a>
}
}
#TRIGGER {document.write*'(*)<br>*} {#var quoteend "%1"}
#TRIGGER {document.write*'More quotes from <a href=~"http://www.quotedb.com/authors/*~">(*)</a>'*;} {
#var authorquote "%1"
#var authorquote %replace( @authorquote, "-", " ")
}
#CLASS 0 |
|
|
Last edited by illyism on Mon Apr 28, 2008 12:57 am; edited 1 time in total |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Apr 27, 2008 6:41 pm |
You're missing the cg alias, I'm assuming. :P
Plus, what's up with the empty aliases? and the #alias {setcat} then #alias {setcat} again?
Charneus |
|
|
|
illyism Wanderer
Joined: 09 Dec 2007 Posts: 58
|
Posted: Sun Apr 27, 2008 10:30 pm |
ahh, the cg alias is "#var category"
#al {cg} {#var category}
and the empty aliases, are used to compress the script. ";" won't semi-colon.
something like an export version.
I've simply forgotten to delete them at the end |
|
|
|
illyism Wanderer
Joined: 09 Dec 2007 Posts: 58
|
Posted: Tue Apr 29, 2008 6:47 pm |
this is a Joke finder, similar to the quote finder, but from a different site;
(WARNING:THIS CAN LAG YOU TO DEATH!)
Code: |
#CLASS {randomjoke}
#ALIAS showjoke {#script {strHTML = ~"~"};#script {Sub getHTML:Set objHTTP = CreateObject~(~"MSXML2.ServerXMLHTTP~"):objHTTP.Open ~"GET~", ~"http://www.jokes2go.com/cgi-bin/includejoke.cgi?type=j~", ~"FALSE~":objHTTP.Send:strHTML = objHTTP.ResponseText:Set objHTTP = Nothing:End Sub};#mss {getHTML};#show %mss(strHTML)}
#ALIAS jokemsg {#t+ joker;showjoke;#var jokeend %replace(@jokeend, "<br>", "");#var jokeend %replace(@jokeend, "\", "");%-1 '@jokeend'}
#VAR jokeend {Have you heard the one about the . . . . . . . recent survey on cigarettes which found that 90% of the men that tried Camels still prefer women. }
#VAR badmsg {<br><br>Brought to you by <a href=~"http://www.jokes2go.com~" target=~"_top~">http://www.jokes2go.com</a>}
#CLASS 0
#CLASS {randomjoke|joker}
#TRIGGER {this.document.write~('(*)'~);*} {#var jokeend "%1";#t- joker}
#CLASS 0 |
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|