Shoutbox

[R] Random Quote Plugin - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: [R] Random Quote Plugin (/showthread.php?tid=12459)

[R] Random Quote Plugin by surfichris on 07-07-2003 at 07:53 AM

Just finished this small addon as an experiment.

This addon is basically a random quote generator.

When you type (!xquote) a random quote is presented.

You could use it as a random away message or something like that.. possibilities are unlimited.. well..yeah :P

The plugin comes with 2 files by default, the dll and default.quotes (the default quotes file). You can create different quote lists per msn messenger account by naming them [email address].quotes (eg me@myself.com.quotes). The quote files reside in the Plugins directory.

I have built a setup program so there is no need to fiddle around trying to install it yourself.

Please note you will require Messenger Plus! 2.20.46 and up to be able to use this plugin :)

Download: http://www.mybboard.com/mp_plugins/RandomQuote.exe

Please note that KoalaBlue and I have both tested the installer and can verify that it works.

Also, i added a command /xrquotes to refresh/reload the quotes file (as they are loaded on Initialize). I havent mentioned this because it still sends /xrquotes even when i set sResult = "". This should be fixed in the  next version.

Chris :)


RE: [R] Random Quote Plugin by Tandy on 07-07-2003 at 07:55 AM

very nice Chris

well done


RE: [R] Random Quote Plugin by segosa on 07-07-2003 at 07:56 AM

Do you think perhaps you can share the source of the installer with me if you made it in VB? :)


RE: [R] Random Quote Plugin by surfichris on 07-07-2003 at 07:57 AM

I used crappy Wise Installation System Professional :P


RE: [R] Random Quote Plugin by Chrono on 07-07-2003 at 07:59 AM

Cool (Y)


RE: [R] Random Quote Plugin by Chrono on 07-07-2003 at 08:01 AM

crappy indeed


RE: [R] Random Quote Plugin by qune on 07-07-2003 at 09:44 AM

superb...:)


RE: [R] Random Quote Plugin by n_b on 07-07-2003 at 09:48 AM

nice plugin :) (Y)


RE: [R] Random Quote Plugin by Predatory Kangaroo on 07-07-2003 at 04:30 PM

Nice :)
Let me see now...
In initialize, you create a file handle to sUserEmail.quotes and if it's not valid you create a file handle to Default.quotes
Then you parse all the quotes from the file into... an array of an array of chars? (an array of strings).
Then when the tag is parsed you select one at random (Rnd()%Number of quotes)?

I haven't downloaded it yet, these are just assumptions from the fact that the quotes are loaded in Initialize().

As long as the quotes file isn't too big, wouldn't it be easier to parse the quotes file on each parsetag call?  Because it's unlikely that anyone will have a REALLY huge quotes file, there wouldn't be too much processing time wasted and it would eliminate the need for /xrquotes :)

Or you could check if the last modified time has changed and reload only if it has been :)

And in case i didn't mention it... nice plugin :)


RE: [R] Random Quote Plugin by Sypher on 07-07-2003 at 06:09 PM

/xrquotes doesn't work :(


RE: [R] Random Quote Plugin by surfichris on 07-08-2003 at 01:43 AM

Yeah, thats basically how i did it.

I was trying to find the best way to make it work as quick as possible and loading the quotes file at startup was the easiest way.

I'll try and incorporate the quotes manager, fix the /xrquotes bug, and add the refresh thing in the next version :)


RE: [R] Random Quote Plugin by Predatory Kangaroo on 07-08-2003 at 02:39 AM

:)


RE: [R] Random Quote Plugin by Sypher on 07-08-2003 at 08:53 AM

Chris, this version doesn't work with the new 0048.. it gives an error and sends a test...