//=====From eAthena to rAthena to Hercules================================================== //==========Without this original author, this script will never exist====================== //========Original author Credits=========================================================== //=====================================================DONT================================= // ToastOfDoom ================================================REMOVE======================= // RxChris =========================================================THIS================ // Hellflaem ================================================================CREDIT======= //========================================================================================== //========================================================================================== prontera,155,185,5 script Trivia 4_F_JOB_ASSASSIN,{ mes "["+ F_MesColor(C_BLUE) +"::: Trivia :::"+ F_MesColor(C_BLACK) +"]"; if ( !.start ) { mes "event not running."; close; } mes "\rVery simple event!"; mes "\rI will be asking random questions."; mes "\rAll you have to do is shout the answer in the main chat!"; mes "\rDo not worry about the capital letters, I can recognize the right answer, when I see one ;)"; mes "Worry about the spelling though."; close; OnMinute33: announce "The Trivia Event has begun!", bc_all | bc_blue; .start = true; sleep 60000; npctalk "Please answer all my questions:"; sleep 2000; npctalk "If your answer is correct, you will obtain prizes!"; sleep 2000; callfunc "F_ShuffleNumbers", 0, .total_question -1, .random, .ask_no_of_question; do { .answered = false; npctalk "["+( .round +1 )+"/"+ .ask_no_of_question +"] "+ .question$[.random[.round]]; defpattern 1, "([^:]+):.*\\s" + .answer$[.random[.round]] + "(.*)", "L_RightAnswer"; // defpattern 1, "[^:]+: "+ .answer$[.random[.round]] +"$", "L_RightAnswer"; // not allow space and no random stupid gibberish at the end string activatepset 1; sleep 15000; // 15 seconds to get a hint if ( !.answered ) { npctalk "[Hint] : "+ .hint$[.random[.round]]; sleep 15000; // another 15 seconds before the npc announce its too late if ( !.answered ) npctalk "Sorry, You took too long to answer."; } deactivatepset 1; deletepset 1; sleep 3000; } while ( ++.round < .ask_no_of_question ); npctalk "That's all for now. Thanks for participating in this event ^^"; emotion e_thx; .start = .round = false; end; L_RightAnswer: npctalk "Correct, " + strcharinfo(PC_NAME) + "! The answer is " + .answer$[.random[.round]] + "."; .answered = true; awake strnpcinfo(NPC_NAME); getitem Poring_Coin, 1; // configure prize here end; OnInit: .ask_no_of_question = 10; // ask how many question // bindatcmd "test", strnpcinfo(NPC_NAME) +"::OnMinute33", 99, 100; // use to debug the script only function DefineQuestion { .question$[.total_question] = getarg(0); .answer$[.total_question] = getarg(1); .hint$[.total_question] = getarg(2); ++.total_question; return; } DefineQuestion("When you create a character in this game, how many primary stats are there?","6", "STR, AGI, VIT, INT, DEX, LUK"); DefineQuestion("Wizard skill Water Ball can only be cast over deluge or ____?", "water", "It is liquid."); DefineQuestion("Which item is required to create a guild?", "emperium", "An Emperial item"); DefineQuestion("which skill is beneficial to the living and damaging to the undead?", "heal", "It restores health."); DefineQuestion("In which town Thieves guild is located?", "morocc", "A town in the sorgat desert."); DefineQuestion("In which town Merchants guild is located?", "alberta", "It's a portuary town."); DefineQuestion("In which town Archers guild is located?", "payon", ""); DefineQuestion("What property do Izlude dungeon monsters possess?", "water", "It is liquid."); DefineQuestion("What status can be inflicted with the Hammer Fall skill?", "stun", "Did I see the stars around your head?"); DefineQuestion("How much Zeny one Jellopy is worth?", "3", "Just get it from a Poring."); DefineQuestion("Which town has the most Dancers?", "comodo", "An island in the warm waters."); DefineQuestion("How many different poring-like monsters you can meet near prontera, including mini bosses?", "9", "poring, drops, poporing, marin, santa poring, mastering, angeling, arcangeling, ghostring"); DefineQuestion("What property counters best the water property?", "wind", "It's Blowing"); DefineQuestion("What property counters best the undead property?", "holy", "Perhaps an acolyte or a priest can tell you?"); DefineQuestion("What kind of food both Vanilmirth and Christmas Goblin like?", "cell", "Yellow jeloppy"); DefineQuestion("How many cities are in Rune-Midgrad kingdom?", "11", "Prontera, Izlude, Jawaii, Geffen, Payon, Morocc, Alberta, Comodo, Umbala, Al De Baran, Lutie"); DefineQuestion("What city is the capital of Rune-Midgrad kingdom?", "prontera", "The most central town of all."); DefineQuestion("Which food is able to fully restore health and mana? _________ _____", "yggdrasil berry", "A berry growing on the most majestic tree!"); DefineQuestion("Which one of those is the fastest weapon type? Sword, Dagger, Staff, Mace", "dagger", "Something that has to do with the length of the blade."); DefineQuestion("Which one of those id the cheapest? Jellopy Large Jellopy Royal Jelly Honey", "jellopy", "Dropped by Porings."); DefineQuestion("Which monster drops a pet taming item to tame Deviruchi?", "joker", "Why so serious?"); end; }