We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 4 of 4
  1. #1

    [Plugin] LOTRivia

    I've written a plugin which allows you to host a trivia game in the chat channel of your choosing. It's available for download from its page on LOTRinterface.com.

    Features include:
    • Over 850 questions and riddles, written specifically for this project
    • Topics ranging from J.R.R. Tolkien's world, characters and history, to Lord of the Rings Online itself
    • Configurable quiz length and question timer
    • Automated score-keeping
    • Pretty colored questions and announcements
    • Easy-to-use interface


    I wrote this to host party events with my kin, and it's been a massive hit. Hope you have fun with it, too!

    LOTRivia 1.0.28

  2. #2
    Join Date
    Aug 2012
    Location
    ENGLAND
    Posts
    253
    Quote Originally Posted by Carentil View Post
    I've written a plugin which allows you to host a trivia game in the chat channel of your choosing. It's available for download from its page on LOTRinterface.com.

    Features include:
    • Over 850 questions and riddles, written specifically for this project
    • Topics ranging from J.R.R. Tolkien's world, characters and history, to Lord of the Rings Online itself
    • Configurable quiz length and question timer
    • Automated score-keeping
    • Pretty colored questions and announcements
    • Easy-to-use interface


    I wrote this to host party events with my kin, and it's been a massive hit. Hope you have fun with it, too!

    LOTRivia 1.0.28


    Awesome plugins and i for one appreciate your time spent making this. Has kept me entertained through many hours of crafting

  3. #3
    Join Date
    Jun 2011
    Location
    Slovenia
    Posts
    226
    Plugin is super great! Only thing that would make it amazing at this point is if you'd put in the option for /world channel.

    I managed to tweak it a bit myself and questions are appearing in /world. Just can't see any guesses that people post back. Any ideas what should I change?

    I suppose it ahs to do with something in here or a previous set var on the line which channelId's are allowed into parsing. can't find anything like it yet though:

    Code:
    function parseChat(chatfunc, received)
    
    		-- Continue only for the current channel we're watching
    		--
    		if (received["ChatType"] ~= channels[Settings.channel]["channelId"]) then
    			return;
    		end
    
    		-- Strip out any leading text (timestamps, if there) the channel name, and EOLs
    		--
    		-- [11/24 01:35:15 PM] [glff] Forestgreenthumb: blah blah blah
    		-- first, find the start and end positions of the channel name
    
    		-- Strip off a leading timestamp, if there is one
    		local pattern = "^[%d+/%d+%s+[%d:%s]+%a%a] "
    
    		_ = string.gsub(tostring(received["Message"]), "<[^>]+>",'')
    
    		-- grab the positions of the channel header
    		--
    		pattern = "%[%a+%] "
    		local channelHeaderStart,channelHeaderEnd = string.find(_,pattern)
    
    		-- Skip any "gone offline" or "come online" messages. These do not have the channel banner,
    		-- so they won't have a start and end. This will also bypass messages sent from the player.
    		-- The latter works because s apce ("To Kinship") isn't included in the pattern. If Turbine
    		-- ever changes this, I hope they give us a method to retrieve a channel's name or I can't
    		-- do user channels easily.
    		--
    		if (channelHeaderStart == nil ) then
    			if (debug) then
    				ltprint("skipping extraneous in-channel message")
    			end
    			return;
    		end
    
    		-- Chop the header out
    		_ = string.sub( _, channelHeaderEnd )
    
    		-- Strip XML and color formatting
    		_ = string.gsub(_, "<[^>]+>",'')
    
    		-- Strip linefeeds
    		_ = string.gsub(_, "\n",'')
    
    		-- get the sender and the chat text
    		local sender,message = string.match(_,"(%a+):%s(.+)")
    
    		-- Save the sender's message but only if they don't currently have one stored
    		--
    		if (storedAnswers[sender] == nil) then
    			storedAnswers[sender] = message
    			haveStoredAnswers = true
    			-- push the answer to the answers listbox, but only if there's an active question
    			--
    			if (questionActive) then
    				addToGuesses(sender,message);
    			end
    		end
    
    	end -- end of function parseChat()
    Regards, Athrod
    Last edited by Athrod; Jul 29 2014 at 07:35 PM.
    [url=http://www.overwolf.com/?utm_source=forums&utm_medium=signatures&utm_campaign=signature%2Bin%2Bforums][img]http://api.overwolf.com/users/Signature/athrood_gameplay.png[/img][/url]

  4. #4
    Quote Originally Posted by Athrod View Post
    Plugin is super great! Only thing that would make it amazing at this point is if you'd put in the option for /world channel.

    I managed to tweak it a bit myself and questions are appearing in /world. Just can't see any guesses that people post back. Any ideas what should I change?
    Hiya Athrod!

    Sorry for the long delay in posting this reply, this thread fell off of my radar, alas.

    Yes, the issue would be the channel IDs, and while I thought about adding this in I am hesitant to do so. On more populated servers, World can be rather busy, and I am rather cautious about the issue of spamming. When you have 20+ people guessing at an answer, it is easy to see how that would be a flood issue so I'd intended to err on the side of caution and left out default channels.

    The practice I and the people I play with is to announce an upcoming game in a user channel, and tell people to /join that channel to play. That way, the people who absolutely don't want to see trivia answers flooding their chat buffer don't have to. It was left this way intentionally, in order to be more polite about it.

    This being said, it's sort of apparent that Turbine is cautious about plugin developers spamming universal channels, because while the "World" channel does have a chattype ID in the game (it's 38, IIRC) it's *not* included in the Turbine API. The only other two channels intentionally left out are PlayerLoot and FellowshipPlayerLoot, which would be used by botting plugins if they were made easily parseable, so I am guessing it's a wall that probably shouldn't be pushed.

    Hope this clarifies things a bit, and glad you're enjoying the plugin!
    -Carentil

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload