[Plugin] xTrivia

It can automagically save all the questions with the answers if you supply the correct regular expression pattern (regex) for your trivia event.

It is working with Notice chat only and sending the answer to General chat by default.
In a few words, you’ll need to learn a little bit regex, there is no other choice :face_with_hand_over_mouth:

Direct download : [Save as Link] :ballot_box_with_check:
Lastest version on GitHub
Try xPluginUpdater to keep the track of my updates! :male_detective:

Important : Answering pattern needs to be in a group ( ), check the following examples about how it works! everything else is up to you, easy to use and modify if it’s required, feel free to do it.

  • Q: How many letters has JellyBitz?
    A: 8. The winner is JellyBitz!

Question Pattern: (?i)How many[\s\S]* - Case insensitive, whatever phrase having words “how many”
Answer Pattern: ([a-zA-Z0-9 ]*). The winner is [a-zA-Z0-9_]*! - Case sensitive, Parenthesis to catch and save the answers, we guess the answer it’s the same format everytime.

  • Q: Question: What's the best movie of all times?
    A: The Lord of the Rings. The winner is JellyBitz.

Question Pattern: (?i)(How many[\s\S]*|What's[\s\S]) - Case insensitive, whatever phrase having words “how many” and “what’s” covering above questions cases
Answer Pattern: ([a-zA-Z0-9 ]*). The winner is [a-zA-Z0-9_]*[.!] - Case sensitive, Parenthesis to catch and save the answers, covering two cases; ending with char . or !

  • Q: Captain ivy it's an evil pirate, do you know where it appears?
    A: Great! the winner is JellyBitz. The answer is Asia

Question Pattern: (?i)(How many[\s\S]*|What's[\s\S]|where[\s\S]*) - Case insensitive, explained already…
Answer Pattern: (([a-zA-Z0-9 ]*). The winner is [a-zA-Z0-9_]*[.!]|Great! the winner is [a-zA-Z0-9_]*. The answer is ([a-zA-Z0-9 ]*)) - Case sensitive, covering two answering formats…


A little preview, quick and easy! :mage::sparkles:

1 Like

Friends, can you share your experiences?

Added an option to manually add question/answer.

The question needs to be exactly as original (case sensitive for reasons…) and the Question Pattern still required to verify if the message is a trivia question.

How to Use it I’ll add questions

Start bot?

All depends on your server, that’s why I left a few examples.

You don’t need to start botting.

Does not work, is this wrong? and if me open more chars Who will go

  1. If you are not doing a right pattern for the question, it won’t work at all.
  2. Also, some servers are sending the message in a customized packet.

I’ll help you with the first only, the pattern should look like this:
Q: [0-9a-zA-Z]{3}..[\s\S]*
A: [0-9a-zA-Z]* has written ([\s\S]*) and won this round.

You can make your tests and learn about it on regexr:

1: You see the question in game and phbot
2:it systm image
3:I do not understand any thing :slightly_smiling_face: :blue_heart:
4:if you can help me make video or Explained explanation

Thats not trivia what ur asking for…

The server I am playing on sends all the messages over global. Is it possible to parse the global chat instead of notice and set a specific sender of the message?