Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
### Eclipse Workspace Patch 1.0 #P gameserver Index: java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- java/net/sf/l2j/gameserver/GameServer.java (revision 36) +++ java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -101,6 +101,7 @@ import net.sf.l2j.gameserver.model.PartyMatchWaitingList; import net.sf.l2j.gameserver.model.entity.Castle; import net.sf.l2j.gameserver.model.entity.Hero; +import net.sf.l2j.gameserver.model.entity.TriviaEventManager; import net.sf.l2j.gameserver.model.olympiad.Olympiad; import net.sf.l2j.gameserver.model.olympiad.OlympiadGameManager; import net.sf.l2j.gameserver.model.votereward.VoteMain; @@ -271,6 +272,8 @@ OlympiadGameManager.getInstance(); Olympiad.getInstance(); Hero.getInstance(); + + TriviaEventManager.getInstance(); Util.printSection("Four Sepulchers"); FourSepulchersManager.getInstance().init(); Index: java/net/sf/l2j/gameserver/model/entity/Trivia.java =================================================================== --- java/net/sf/l2j/gameserver/model/entity/Trivia.java (revision 0) +++ java/net/sf/l2j/gameserver/model/entity/Trivia.java (revision 0) @@ -0,0 +1,216 @@ +package net.sf.l2j.gameserver.model.entity; + + +import java.io.File; +import java.util.logging.Logger; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import javolution.util.FastMap; +import net.sf.l2j.gameserver.Announcements; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.network.clientpackets.Say2; +import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; +import net.sf.l2j.util.Rnd; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + + +public class Trivia +{ + enum EventState + { + INACTIVE, + ASKING, + ANSWERING, + CORRECT, + REWARDING, + ENDING + } + protected static final Logger _log = Logger.getLogger(Trivia.class.getName()); + private static EventState _state = EventState.INACTIVE; + //ID of the reward + private static int _rewardID = 9142; + //Ammount of the reward + private static int _rewardCount = 1; + private static long questionTime=0; + private static FastMap<String,String> q_a = new FastMap<String,String>(); + public static int asked=0; + private static String question,answer; + + private Trivia() + { + + } + public static void init() + { + setState(EventState.INACTIVE); + getQuestions(); + } + private static void getQuestions() + { + File file = new File("config/Trivia.xml"); + String ask, answer; + try + { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db = dbf.newDocumentBuilder(); + Document doc = db.parse(file); + doc.getDocumentElement().normalize(); + NodeList trvLst = doc.getElementsByTagName("trivia"); + for (int s = 0; s < trvLst.getLength(); s++) + { + Node trvNode = trvLst.item(s); + if (trvNode.getNodeType() == Node.ELEMENT_NODE) + { + Element triviaElement = (Element)trvNode; + NodeList trvList = triviaElement.getElementsByTagName("question"); + Element questionElement = (Element)trvList.item(0); + + NodeList textQsList = questionElement.getChildNodes(); + ask = ((Node)textQsList.item(0)).getNodeValue().trim(); + + NodeList answerList = triviaElement.getElementsByTagName("answer"); + Element answerElement = (Element)answerList.item(0); + + NodeList textAnList = answerElement.getChildNodes(); + answer = ((Node)textAnList.item(0)).getNodeValue().trim(); + q_a.put(ask, answer); + } + + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + public static void handleAnswer(String s,L2PcInstance pi) + { + if(s.equalsIgnoreCase(answer)) + { + pi.sendPacket(new CreatureSay(12345, Say2.TELL, "Trivia", "Correct!")); + setState(EventState.REWARDING); + Announcements.announceToAll("Winner is "+pi.getName()+"! He answered in "+(System.currentTimeMillis()-questionTime)/1000+" seconds!"); + announceCorrect(); + pi.addItem("Trivia", _rewardID, _rewardCount, pi, true); + } + else + pi.sendPacket(new CreatureSay(1234, 2, "Trivia", "Wrong answer.")); + + } + public static void startTrivia() + { + Announcements.announceToAll("Trivia Event begins! You have to PM Trivia with your answer, get ready!"); + setState(EventState.ASKING); + } + public static void askQuestion() + { + pickQuestion(); + Announcements.announceToAll("Question: "+question); + questionTime=System.currentTimeMillis(); + setState(EventState.ANSWERING); + } + public static void announceCorrect() + { + setState(EventState.CORRECT); + Announcements.announceToAll("The correct answer was: "+answer); + asked++; + setState(EventState.ASKING); + } + public static void endEvent() + { + setState(EventState.INACTIVE); + asked = 0; + } + private static void pickQuestion() + { + int roll=Rnd.get(q_a.size())+1; + int i=0; + for(String q:q_a.keySet()) + { + ++i; + if(i==roll) + { + answer=q_a.get(q); + question=q; + return; + } + } + } + public static boolean isInactive() + { + boolean isInactive; + synchronized (_state) + { + isInactive = _state == EventState.INACTIVE; + } + return isInactive; + } + public static boolean isAnswering() + { + boolean isAnswering; + synchronized (_state) + { + isAnswering = _state == EventState.ANSWERING; + } + return isAnswering; + } + public static boolean isEnding() + { + boolean isEnding; + synchronized (_state) + { + isEnding = _state == EventState.ENDING; + } + return isEnding; + } + public static boolean isCorrect() + { + boolean isCorrect; + synchronized (_state) + { + isCorrect = _state == EventState.CORRECT; + } + return isCorrect; + } + public static boolean isRewarding() + { + boolean isRewarding; + synchronized (_state) + { + isRewarding = _state == EventState.REWARDING; + } + return isRewarding; + } + public static boolean isAsking() + { + boolean isAsking; + synchronized (_state) + { + isAsking = _state == EventState.ASKING; + } + return isAsking; + } + private static void setState(EventState state) + { + synchronized (_state) + { + _state = state; + } + } + public static Trivia getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final Trivia _instance = new Trivia(); + } + +} \ No newline at end of file Index: java/net/sf/l2j/gameserver/model/entity/TriviaEventManager.java =================================================================== --- java/net/sf/l2j/gameserver/model/entity/TriviaEventManager.java (revision 0) +++ java/net/sf/l2j/gameserver/model/entity/TriviaEventManager.java (revision 0) @@ -0,0 +1,189 @@ +package net.sf.l2j.gameserver.model.entity; + + +import java.util.Calendar; +import java.util.concurrent.ScheduledFuture; +import java.util.logging.Logger; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.ThreadPoolManager; + + +public class TriviaEventManager +{ + protected static final Logger _log = Logger.getLogger(TriviaEventManager.class.getName()); + + /** Task for event cycles<br> */ + private TriviaStartTask _task; + + /** + * New instance only by getInstance()<br> + */ + private TriviaEventManager() + { + if (Config.TRIVIA_ENABLED) + { + Trivia.init(); + this.scheduleEventStart(); + _log.warning("TriviaEventEngine[TriviaManager.TriviaManager()]: Started."); + } + else + { + _log.warning("TriviaEventEngine[TriviaManager.TriviaManager()]: Engine is disabled."); + } + } + public static TriviaEventManager getInstance() + { + return SingletonHolder._instance; + } + + /** + * Starts the event + */ + public void scheduleEventStart() + { + try + { + Calendar currentTime = Calendar.getInstance(); + Calendar nextStartTime = null; + Calendar testStartTime = null; + for (String timeOfDay : Config.TRIVIA_INTERVAL) + { + // Creating a Calendar object from the specified interval value + testStartTime = Calendar.getInstance(); + testStartTime.setLenient(true); + String[] splitTimeOfDay = timeOfDay.split(":"); + testStartTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(splitTimeOfDay[0])); + testStartTime.set(Calendar.MINUTE, Integer.parseInt(splitTimeOfDay[1])); + // If the date is in the past, make it the next day (Example: Checking for "1:00", when the time is 23:57.) + if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis()) + { + testStartTime.add(Calendar.DAY_OF_MONTH, 1); + } + // Check for the test date to be the minimum (smallest in the specified list) + if (nextStartTime == null || testStartTime.getTimeInMillis() < nextStartTime.getTimeInMillis()) + { + nextStartTime = testStartTime; + } + } + _task = new TriviaStartTask(nextStartTime.getTimeInMillis()); + ThreadPoolManager.getInstance().executeTask(_task); + } + catch (Exception e) + { + _log.warning("TriviaEventEngine[TriviaManager.scheduleEventStart()]: Error figuring out a start time. Check TriviaEventInterval in config file."); + } + } + + class TriviaStartTask implements Runnable + { + private long _startTime; + public ScheduledFuture<?> nextRun; + + public TriviaStartTask(long startTime) + { + _startTime = startTime; + } + + public void setStartTime(long startTime) + { + _startTime = startTime; + } + + /** + * @see java.lang.Runnable#run() + */ + public void run() + { + int delay = (int) Math.round((_startTime - System.currentTimeMillis()) / 1000.0); + int nextMsg = 0; + if (delay > 3600) + { + nextMsg = delay - 3600; + } + else if (delay > 1800) + { + nextMsg = delay - 1800; + } + else if (delay > 900) + { + nextMsg = delay - 900; + } + else if (delay > 600) + { + nextMsg = delay - 600; + } + else if (delay > 300) + { + nextMsg = delay - 300; + } + else if (delay > 60) + { + nextMsg = delay - 60; + } + else if (delay > 5) + { + nextMsg = delay - 5; + } + else if (delay > 0) + { + nextMsg = delay; + } + else + { + if (Trivia.isInactive()) + { + startTrivia(); + } + else if(Trivia.isAsking()) + { + if(Trivia.asked<Config.TRIVIA_TO_ASK) + { + startQuestion(); + } + else + { + endTrivia(); + } + } + else if(Trivia.isAnswering()) + { + announceAnswer(); + } + } + + if (delay > 0) + { + nextRun = ThreadPoolManager.getInstance().scheduleGeneral(this, nextMsg * 1000); + } + } + } + public void startTrivia() + { + Trivia.startTrivia(); + _task.setStartTime(System.currentTimeMillis() + 1000L *10); + ThreadPoolManager.getInstance().executeTask(_task); + } + public void startQuestion() + { + Trivia.askQuestion(); + _task.setStartTime(System.currentTimeMillis() + 1000L *Config.TRIVIA_ANSWER_TIME); + ThreadPoolManager.getInstance().executeTask(_task); + } + public void endTrivia() + { + Trivia.endEvent(); + this.scheduleEventStart(); + } + public void announceAnswer() + { + Trivia.announceCorrect(); + _task.setStartTime(System.currentTimeMillis() +1000L *10); + ThreadPoolManager.getInstance().executeTask(_task); + } + @SuppressWarnings("synthetic-access") + private static class SingletonHolder + { + protected static final TriviaEventManager _instance = new TriviaEventManager(); + } +} \ No newline at end of file Index: config/Trivia.xml =================================================================== --- config/Trivia.xml (revision 0) +++ config/Trivia.xml (revision 0) @@ -0,0 +1,334 @@ +<?xml version="1.0" encoding="UTF-8"?> +<event> + <trivia> + <question>What current branch of the U.S. military was a corps of only 50 soldiers when World War I broke out</question> + <answer>The U.S. Air Force</answer> + </trivia> + + <trivia> + <question>What game was created by French mathematician Blaise Pascal, which he discovered when doing experiments into perpetual motion?</question> + <answer>The Game of Roulette</answer> + </trivia> + + <trivia> + <question>Who said: " I'm the president of the United States and I'm not going to eat any more broccoli "?</question> + <answer>George Bush</answer> + </trivia> + + <trivia> + <question>What future Soviet dictator was training to be a priest when he got turned on to Marxism?</question> + <answer>Joseph Stalin</answer> + </trivia> + + <trivia> + <question>What election year saw bumper stickers reading "Wallace, Wallace, Uber Alles"</question> + <answer>1968</answer> + </trivia> + + <trivia> + <question>Which is the last NPC you have to talk to, to obtain a Portal Stone?</question> + <answer>Theodoric</answer> + </trivia> + + <trivia> + <question>What color Soul Crystal do you need to have for Acumen SA on Arcana mace?</question> + <answer>Red</answer> + </trivia> + + <trivia> + <question>How many rooms do the 4 Sepulchers have in total?</question> + <answer>4</answer> + </trivia> + + <trivia> + <question>When does the Merchant of Mammon appear in Catacombs?</question> + <answer>Never</answer> + </trivia> + + <trivia> + <question>How many A-grade grandboss jewels exists?</question> + <answer>3</answer> + </trivia> + + <trivia> + <question>What is the name of the only B-grade grandboss jewel?</question> + <answer>Ring of queen ant</answer> + </trivia> + + <trivia> + <question>How many Olympiad points does a Noblesse character have at the end of each month, if he does not compete?</question> + <answer>18</answer> + </trivia> + + <trivia> + <question>When creating a character, you can choose to be a mage or fighter. There is one race that doesn't offer this choice. Which race is that?</question> + <answer>Dwarf</answer> + </trivia> + + <trivia> + <question>What TV show lost Jim Carrey when he stepped into the movies?</question> + <answer>In Living Color</answer> + </trivia> + + <trivia> + <question>At which level can you make the Hatchling quest?</question> + <answer>35</answer> + </trivia> + + <trivia> + <question>What's the name of the item you need to get your clan to level 4?</question> + <answer>Alliance Manifesto</answer> + </trivia> + + <trivia> + <question>What level does your clan have to be in order to start an Alliance?</question> + <answer>5</answer> + </trivia> + + <trivia> + <question>Baium is the father of...</question> + <answer>Frintezza</answer> + </trivia> + + <trivia> + <question>What are the names of the two "teams" on the Seven Signs Quest?</question> + <answer>Dawn and Dusk</answer> + </trivia> + + <trivia> + <question>How many servers are there on the offical lineage II?</question> + <answer>8</answer> + </trivia> + + <trivia> + <question>as a fighter, what is the first level when you can learn your first skills?</question> + <answer>5</answer> + </trivia> + + <trivia> + <question>In what level can you create a clan?</question> + <answer>10</answer> + </trivia> + + <trivia> + <question>What so-called "war" spawned the dueling slogans "Better Dead Than RED" and "Better Red Than Dead" in the 1950's?</question> + <answer>The Cold War</answer> + </trivia> + + <trivia> + <question>What president was shot while walking to California Governor Jerry Brown' office?</question> + <answer>Gerald Ford</answer> + </trivia> + + <trivia> + <question>What modern vehicle was invented to circumvent trench warfare?</question> + <answer>Tank</answer> + </trivia> + + <trivia> + <question>What congressional award was Dr. Mary Edwards Walker the first woman to receive?</question> + <answer>Medal of Honor</answer> + </trivia> + + <trivia> + <question>What congressional award was Dr. Mary Edwards Walker the first woman to receive?</question> + <answer>Medal of Honor</answer> + </trivia> + + <trivia> + <question>In which television series did Roger Moore star from 1962 to 1970?</question> + <answer>The Saint</answer> + </trivia> + + <trivia> + <question>Who introduced the Betamax video cassette system?</question> + <answer>Sony</answer> + </trivia> + + <trivia> + <question>What is Bugs Bunny's catchphrase?</question> + <answer>Eh, whats up Doc?</answer> + </trivia> + + <trivia> + <question>Which Hollywood film maker produced a string of films in the 1950s and 1960s using animals as actors in a drama?</question> + <answer>Walt Disney</answer> + </trivia> + + <trivia> + <question>Which character made his debut in the silent film Plane Crazy in 1928?</question> + <answer>Mickey Mouse</answer> + </trivia> + + <trivia> + <question>How did James Dean die?</question> + <answer>In a car accident</answer> + </trivia> + + <trivia> + <question>Which world-famous cartoon cat was created in 1920 by Pat Sullivan?</question> + <answer>Felix the Cat</answer> + </trivia> + + <trivia> + <question>Which group flew into the Hotel California?</question> + <answer>The Eagles</answer> + </trivia> + + <trivia> + <question>Which all time great band featured Harrison and Starkey?</question> + <answer>The Beatles</answer> + </trivia> + + <trivia> + <question>Arnold Schwarzenegger married the niece of which US president?</question> + <answer>John F. Kennedy</answer> + </trivia> + + <trivia> + <question>In which city did Steve McQueen take part in the car chase in Bullitt?</question> + <answer>San Francisco</answer> + </trivia> + + <trivia> + <question>In which movie did Alex Guinness first appear as Ben Obi Wan Kenobi?</question> + <answer>Star Wars</answer> + </trivia> + + <trivia> + <question>Marlon and Tito were two members of which famous family group?</question> + <answer>Jackson Five</answer> + </trivia> + + <trivia> + <question>Where did Crazy For You lose half a million dollars before finding success on Broadway?</question> + <answer>Washington</answer> + </trivia> + + <trivia> + <question>Leslie Rogge was the first person to be arrested due to what?</question> + <answer>The Internet</answer> + </trivia> + + <trivia> + <question>In 1908 Wilbur Wright traveled what record-breaking number of miles in 2 hours 20 minutes?</question> + <answer>77</answer> + </trivia> + + <trivia> + <question>How long did Bleriot's first flight across the English Channel last?</question> + <answer>43 minutes</answer> + </trivia> + + <trivia> + <question>What nationality of plane first broke the 100mph sound barrier?</question> + <answer>French</answer> + </trivia> + + <trivia> + <question>The first air collision took place over which country?</question> + <answer>Austria</answer> + </trivia> + + <trivia> + <question>How long did the record-breaking space walk from space shuttle Endeavor last in 1993?</question> + <answer>Five hours</answer> + </trivia> + + <trivia> + <question>Where did the European space probe Ulysses set off for in 1991?</question> + <answer>The Sun</answer> + </trivia> + + <trivia> + <question>What was the name of the first probe to send back pictures from Mars?</question> + <answer>Viking</answer> + </trivia> + + <trivia> + <question>Who was the second Soviet cosmonaut?</question> + <answer>Titov</answer> + </trivia> + + <trivia> + <question>Who said, "All I need to make a comedy is a park, a policeman and a pretty girl?"</question> + <answer>Charlie Chaplin</answer> + </trivia> + + <trivia> + <question>In which country did Steve McQueen die?</question> + <answer>Mexico</answer> + </trivia> + + <trivia> + <question>In 1998 who did Vanity Fair describe as "simply the world's biggest heart throb?"</question> + <answer>Leonardo DiCaprio</answer> + </trivia> + + <trivia> + <question>In 1998 who did Vanity Fair describe as "simply the world's biggest heart throb?"</question> + <answer>Leonardo DiCaprio</answer> + </trivia> + + <trivia> + <question>How many friends are there in Friends?</question> + <answer>Six</answer> + </trivia> + + <trivia> + <question>In which magazine did The Addams Family first appear?</question> + <answer>New Yorker</answer> + </trivia> + + <trivia> + <question>What is Alpha World?</question> + <answer>Multi user game</answer> + </trivia> + + <trivia> + <question>What is a MUD?</question> + <answer>Multi User Computer Game</answer> + </trivia> + + <trivia> + <question>In which European country is the theme park De Efteling?</question> + <answer>The Netherlands</answer> + </trivia> + + <trivia> + <question>Which ethnic group popularized salsa dancing in New York in the 1980s?</question> + <answer>Puerto Ricans</answer> + </trivia> + + <trivia> + <question>Which Russian city was famous for its State Circus?</question> + <answer>Moscow</answer> + </trivia> + + <trivia> + <question>Pokemon is an abbreviation of what?</question> + <answer>Pocket Monster</answer> + </trivia> + + <trivia> + <question>Who is the Princess in the Super Mario Gang?</question> + <answer>Daisy</answer> + </trivia> + + <trivia> + <question>What is russian's favourite gambling game?</question> + <answer>Russian Roulette</answer> + </trivia> + + + <trivia> + <question>What is russian's favourite drink?</question> + <answer>Vodka</answer> + </trivia> + + <trivia> + <question>What is the quest item used to make a level 5 clan</question> + <answer>Seal of aspiration</answer> + </trivia> + +</event> \ No newline at end of file Index: build.xml =================================================================== --- build.xml (revision 5) +++ build.xml (working copy) @@ -99,6 +99,7 @@ <copy todir="${build.dist.game}/config"> <fileset dir="config"> <include name="*.properties" /> + <include name="*.xml" /> <exclude name="loginserver.properties" /> </fileset> <fileset dir="config"> Index: config/events.properties =================================================================== --- config/events.properties (revision 5) +++ config/events.properties (working copy) @@ -256,3 +256,19 @@ AltFishChampionshipReward3 = 300000 AltFishChampionshipReward4 = 200000 AltFishChampionshipReward5 = 100000 + +#Trivia event will occur those times +#Default = 22:00,22:15,22:30 +TriviaInterval = 21:40,22:40,22:45,22:50,23:40 + +#Time allowed to answer a question in seconds +#Default = 30 +TriviaAnswerTime = 60 + +#Trivia event enabled? +#Default = True +TriviaEnabled = True + +#Each event will have a number of questions.Decide how many to ask +#Default = 1 +TriviaAsk = 1 Index: java/net/sf/l2j/gameserver/handler/chathandlers/ChatTell.java =================================================================== --- java/net/sf/l2j/gameserver/handler/chathandlers/ChatTell.java (revision 5) +++ java/net/sf/l2j/gameserver/handler/chathandlers/ChatTell.java (working copy) @@ -18,6 +18,7 @@ import net.sf.l2j.gameserver.model.BlockList; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.entity.Trivia; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; @@ -39,10 +40,30 @@ @Override public void handleChat(int type, L2PcInstance activeChar, String target, String text) { + // Return if no target is set. if (target == null) return; + if(target.equalsIgnoreCase("trivia")) + { + if(Trivia.isInactive()) + { + activeChar.sendMessage("Trivia event is not currently running."); + return; + } + else if(!Trivia.isAnswering() || Trivia.isCorrect() || Trivia.isRewarding()) + { + activeChar.sendMessage("You cannot answer now."); + return; + } + else + { + Trivia.handleAnswer(text,activeChar); + return; + } + } + final L2PcInstance receiver = L2World.getInstance().getPlayer(target); if (receiver != null) { Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 35) +++ java/net/sf/l2j/Config.java (working copy) @@ -18,8 +18,10 @@ import gnu.trove.map.hash.TIntObjectHashMap; import java.io.File; +import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.math.BigInteger; import java.util.ArrayList; @@ -57,6 +59,8 @@ public static final String SIEGE_FILE = "./config/siege.properties"; public static final String ELFOCRASH_FILE = "./config/elfocrash.properties"; + + // -------------------------------------------------- // Clans settings // -------------------------------------------------- @@ -139,6 +143,13 @@ // Events settings // -------------------------------------------------- + + + public static ArrayList<String>TRIVIA_INTERVAL = new ArrayList<String>(); + public static int TRIVIA_ANSWER_TIME; + public static boolean TRIVIA_ENABLED; + public static int TRIVIA_TO_ASK; + /** Olympiad */ public static int ALT_OLY_START_TIME; public static int ALT_OLY_MIN; @@ -839,6 +850,13 @@ // Events config ExProperties events = load(EVENTS_FILE); + String [] times=events.getProperty("TriviaInterval", "22:00,22:15,:22:30").split(","); + TRIVIA_INTERVAL = new ArrayList<String>(); + for(String t:times) + TRIVIA_INTERVAL.add(t); + TRIVIA_ANSWER_TIME = Integer.parseInt(events.getProperty("TriviaAnswerTime", "30")); + TRIVIA_ENABLED = Boolean.parseBoolean(events.getProperty("TriviaEnabled", "true")); + TRIVIA_TO_ASK = Integer.parseInt(events.getProperty("TriviaAsk", "1")); ALT_OLY_START_TIME = events.getProperty("AltOlyStartTime", 18); ALT_OLY_MIN = events.getProperty("AltOlyMin", 0); ALT_OLY_CPERIOD = events.getProperty("AltOlyCPeriod", 21600000);
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
Bitcoin is Amazing
43 min ago | 0.12 KB
Roblox Scripts
5 hours ago | 0.02 KB
December smells like money
5 hours ago | 0.06 KB
Decentralized Moneys
7 hours ago | 0.42 KB
Bitcoin
7 hours ago | 0.23 KB
Untitled
8 hours ago | 13.75 KB
Untitled
8 hours ago | 0.06 KB
Untitled
12 hours ago | 3.86 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!