Code Coupons + Worldmap update + Mini-games + Player Interaction wrap
Fixed several cases on the Cash Shop that would freeze some player actions when triggered, requiring exit Cash Shop to unstuck. Implemented Code Coupons, supporting several items bundled on the same code, and also devised a way to automate code generation. Added a current status on-demand option on the Buyback command. Info such as "current fee" or "time remaining" are available now. Reviewed several cases where non-owned items would get stacked with owner-tagged items. Added Door support for Happyville, Crimsonwood Keep. Added worldmap tooltip support for some maps in Masteria's C. Keep and H. House. Added Masteria region to the world map. C. Keep interiors no longer relocates players to entrance after actions such as logout. Overhauled minigame mechanics: from player boxes tooltip and in-match improvements to deploy different minigame types, accordingly with item description or player choice. Fixed Amoria outskirts not relocating players to city after getting KO'ed. Fixed issues with pets, rings and cash items being assigned the same cash unique ids leading to some quirks on the cash shop inventory. Fixed an issue with the recently added HP/MP ratio update, arbitrarily taking off 1 point in certain cases. Answer positions on the explorer's 3rd job quiz are now randomed. Fixed several issues that showed up when the bcrypt system is disabled. DOT from maps such as El Nath and Aqua Road now procs at a 5sec interval, GMS-like. Improved performance of Whodrops and Search commands. Concurrently protected player interaction handlers, thus mitigating several exploits on these lines. Adjusted several expedition timers, such as Horntail, now having a more sane deadline. Concurrently protected chair modules. Fixed "seduce" debuff not working on chairs.
This commit is contained in:
@@ -39,7 +39,7 @@ var questionTree = [
|
||||
//Questions Related to MONSTERS
|
||||
["Green Mushroom, Tree Stump, Bubbling, Axe Stump, Octopus, which is highest level of all?", ["Tree Stump", "Bubbling", "Axe Stump", "Octopus", "Green Mushroom"], 2],
|
||||
["Which monster will be seen during the ship trip to Orbis/Ellinia?", ["Werewolf", "Slime", "Crimson Balrog", "Zakum", "Star Pixie"], 2],
|
||||
["Maple Island doesn't have which following monsters?", ["Shroom", "Blue Snail", "Orange Mushroom", "Red Snail", "Pig"], 4],
|
||||
["Maple Island doesn't have which following monsters?", ["Green Mushroom", "Blue Snail", "Orange Mushroom", "Red Snail", "Pig"], 0],
|
||||
["Which monster is not at Victoria Island and Sleepywood?", ["Evil Eye", "Sentinel", "Jr. Balrog", "Ghost Stump", "Snail"], 1],
|
||||
["El Nath doesn't have which following monsters?", ["Dark Yeti", "Dark Ligator", "Yeti & Pepe", "Bain", "Coolie Zombie"], 1],
|
||||
["Which of following monsters can fly?", ["Malady", "Ligator", "Cold Eye", "Meerkat", "Alishar"], 0],
|
||||
@@ -80,6 +80,8 @@ var question;
|
||||
var questionPool;
|
||||
var questionPoolCursor;
|
||||
|
||||
var questionAnswer;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
@@ -121,7 +123,10 @@ function action(mode, type, selection) {
|
||||
question = fetchNextQuestion();
|
||||
var questionHead = generateQuestionHeading();
|
||||
var questionEntry = questionTree[question][0];
|
||||
var questionOptions = generateSelectionMenu(questionTree[question][1]);
|
||||
|
||||
var questionData = generateSelectionMenu(questionTree[question][1], questionTree[question][2]);
|
||||
var questionOptions = questionData[0];
|
||||
questionAnswer = questionData[1];
|
||||
|
||||
cm.sendSimple(questionHead + questionEntry + "\r\n\r\n#b" + questionOptions + "#k");
|
||||
} else if(status >= 2 && status <= 5) {
|
||||
@@ -134,7 +139,10 @@ function action(mode, type, selection) {
|
||||
question = fetchNextQuestion();
|
||||
var questionHead = generateQuestionHeading();
|
||||
var questionEntry = questionTree[question][0];
|
||||
var questionOptions = generateSelectionMenu(questionTree[question][1]);
|
||||
|
||||
var questionData = generateSelectionMenu(questionTree[question][1], questionTree[question][2]);
|
||||
var questionOptions = questionData[0];
|
||||
questionAnswer = questionData[1];
|
||||
|
||||
cm.sendSimple(questionHead + questionEntry + "\r\n\r\n#b" + questionOptions + "#k");
|
||||
} else if(status == 6) {
|
||||
@@ -155,7 +163,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
function evaluateAnswer(selection) {
|
||||
return selection == questionTree[question][2];
|
||||
return selection == questionAnswer;
|
||||
}
|
||||
|
||||
function generateQuestionHeading() {
|
||||
@@ -189,10 +197,36 @@ function fetchNextQuestion() {
|
||||
return next;
|
||||
}
|
||||
|
||||
function generateSelectionMenu(array) {
|
||||
function shuffle(array) {
|
||||
var currentIndex = array.length, temporaryValue, randomIndex;
|
||||
|
||||
// While there remain elements to shuffle...
|
||||
while (0 !== currentIndex) {
|
||||
|
||||
// Pick a remaining element...
|
||||
randomIndex = Math.floor(Math.random() * currentIndex);
|
||||
currentIndex -= 1;
|
||||
|
||||
// And swap it with the current element.
|
||||
temporaryValue = array[currentIndex];
|
||||
array[currentIndex] = array[randomIndex];
|
||||
array[randomIndex] = temporaryValue;
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
function generateSelectionMenu(array, answer) {
|
||||
var answerStr = array[answer], answerPos = -1;
|
||||
|
||||
shuffle(array);
|
||||
|
||||
var menu = "";
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
menu += "#L" + i + "#" + array[i] + "#l\r\n";
|
||||
if (answerStr == array[i]) {
|
||||
answerPos = i;
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
return [menu, answerPos];
|
||||
}
|
||||
Reference in New Issue
Block a user