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:
ronancpl
2018-10-09 22:39:36 -03:00
parent 3a8377c283
commit 2b44b4baa2
213 changed files with 16547 additions and 11031 deletions

View File

@@ -21,13 +21,14 @@ function action(mode, type, selection) {
if(status == 0){
cm.sendYesNo("Would you like to leave?");
}else if(status == 1){
var mapid = cm.getMapId();
if(mapid == 108010101) cm.getPlayer().changeMap(105040305);
else if(mapid == 108010201) cm.getPlayer().changeMap(100040106);
else if(mapid == 108010301) cm.getPlayer().changeMap(105070001);
else if(mapid == 108010401) cm.getPlayer().changeMap(107000402);
else if(mapid == 108010501) cm.getPlayer().changeMap(105070200);
var mapid = cm.getMapId(), exitid = mapid;
if(mapid == 108010101) exitid = 105040305;
else if(mapid == 108010201) exitid = 100040106;
else if(mapid == 108010301) exitid = 105070001;
else if(mapid == 108010401) exitid = 107000402;
else if(mapid == 108010501) exitid = 105070200;
if (mapid != exitid) cm.getPlayer().changeMap(exitid);
cm.dispose();
}
}

View File

@@ -92,7 +92,7 @@ function action(mode, type, selection){
else if (status == 2) {
if (cm.getPlayer().getRemainingSp() > 0)
if (cm.getPlayer().getRemainingSp() > (cm.getLevel() - 70) * 3) {
cm.sendNext("Please, use all your SP before contining.");
cm.sendNext("Please, use all your SP before continuing.");
cm.dispose();
return;
}

View File

@@ -64,7 +64,7 @@ function action(mode, type, selection){
else if (status == 2) {
if (cm.getPlayer().getRemainingSp() > 0)
if (cm.getPlayer().getRemainingSp() > (cm.getLevel() - 70) * 3) {
cm.sendNext("Please, use all your SP before contining.");
cm.sendNext("Please, use all your SP before continuing.");
cm.dispose();
return;
}

View File

@@ -66,7 +66,7 @@ function action(mode, type, selection){
else if (status == 2) {
if (cm.getPlayer().getRemainingSp() > 0)
if (cm.getPlayer().getRemainingSp() > (cm.getLevel() - 70) * 3) {
cm.sendNext("Please, use all your SP before contining.");
cm.sendNext("Please, use all your SP before continuing.");
cm.dispose();
return;
}

View File

@@ -64,7 +64,7 @@ function action(mode, type, selection){
else if (status == 2) {
if (cm.getPlayer().getRemainingSp() > 0)
if (cm.getPlayer().getRemainingSp() > (cm.getLevel() - 70) * 3) {
cm.sendNext("Please, use all your SP before contining.");
cm.sendNext("Please, use all your SP before continuing.");
cm.dispose();
return;
}

View File

@@ -64,7 +64,7 @@ function action(mode, type, selection){
else if (status == 2) {
if (cm.getPlayer().getRemainingSp() > 0)
if (cm.getPlayer().getRemainingSp() > (cm.getLevel() - 70) * 3) {
cm.sendNext("Please, use all your SP before contining.");
cm.sendNext("Please, use all your SP before continuing.");
cm.dispose();
return;
}

View File

@@ -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];
}

View File

@@ -107,14 +107,14 @@ function action(mode, type, selection) {
} else {
if(cm.haveItem(4031061) && cm.haveItem(4031062)) {
if(!cm.haveItem(4000082, 30)) {
cm.sendOk("You have completed the trials, however there's still the need of #b30 #t4000082##k to forge the #t4001017#.");
cm.sendOk("You have completed the trials, however there's still the need of #b30 #t4000082##k to forge 5 #t4001017#.");
} else {
cm.completeQuest(100201);
cm.gainItem(4031061, -1);
cm.gainItem(4031062, -1);
cm.gainItem(4000082, -30);
cm.gainItem(4001017, 1);
cm.gainItem(4001017, 5);
cm.sendNext("You #rhave completed the trials#k, from now on having my approval to challenge Zakum.");
}

View File

@@ -21,7 +21,7 @@
*/
var status = 0;
function start() {
function start() {
if(cm.getMapId() != 680000401) cm.sendSimple("Hello, where would you like to go?\r\n#b" + ((cm.getMapId() != 680000400) ? "#L0#Untamed Hearts Hunting Ground#l\r\n" : "") + ((cm.getMapId() == 680000400) ? "#L1#I have 7 keys. Bring me to smash boxes#l\r\n" : "") + "#L2#Please warp me out.#l#k");
else cm.sendSimple("Hello, do you want to go back now? Returning here again will cost you #rother 7 keys#k.\r\n#b#L2#Please warp me back to the training grounds.#l#k");
}

View File

@@ -82,19 +82,22 @@ function writeFeatureTab_PlayerSocialNetwork() {
addFeature("Automated support for Player NPCs and Hall of Fame.");
addFeature("Engagement & Wedding system.");
addFeature("Equipments displays to everyone it's level & EXP info.");
addFeature("Further improved the existent minigame mechanics.");
}
function writeFeatureTab_CashItems() {
addFeature("EXP/DROP/Cosmetic Coupons.");
addFeature("EXP/DROP Coupon as buff effect during active time.");
addFeature("Great deal of cash items functional.");
addFeature("Code coupons functional, with multi-items support.");
addFeature("Merged unique ids for pets, rings and cash items.");
addFeature("MapleTV mechanics stabilized and split by world.");
addFeature("GMS-esque omok/match card drop chances.");
addFeature("New town scroll: antibanish. Counters boss banishes.");
addFeature("Inventory system checks for free slot & stack space.");
addFeature("Storage with 'Arrange Items' feature functional.");
addFeature("Close-quarters evaluation mode for items.");
addFeature("Further improved Karma scissors.");
addFeature("Reviewed Karma scissors & Untradeable items.");
addFeature("Scroll for Spikes on Shoes.");
addFeature("Scroll for Cold Protection.");
addFeature("Vega's spell.");
@@ -133,6 +136,8 @@ function writeFeatureTab_MonstersMapsReactors() {
addFeature("Updated scripted portals, now with proper portal SFX.");
addFeature("Reviewed Masteria, W. Tour, N. Desert and Neo City.");
addFeature("Added world maps for M. Castle, W. Tour & Ellin areas.");
addFeature("Added W. Tour & Masteria continents in the world map.");
addFeature("Reviewed several issues with W. Map tooltips & links.");
addFeature("Giant Cake boss drops s. bags and Maple items.");
}
@@ -197,6 +202,7 @@ function writeFeatureTab_Commands() {
addFeature("Rank command highlighting users by world or overall.");
addFeature("Server commands layered by GM levels.");
addFeature("Revamped command files layout - thanks Arthur L!");
addFeature("Improved 'Search' performance & added map search.");
}
function writeFeatureTab_CustomNPCs() {
@@ -274,9 +280,9 @@ function action(mode, type, selection) {
status++;
else
status--;
if (status == 0) {
var sendStr = "HeavenMS was developed on the timespan of 3 years, based on where Solaxia left. On the meantime many nice features emerged, development aimed to get back the old GMS experience. Now many of these so-long missing features are gracefully presented to you in the shape of this server. Long live MapleStory!!\r\n\r\nThese are the features from #bHeavenMS#k:\r\n\r\n";
var sendStr = "HeavenMS was developed on the timespan of 3 years, based on where Solaxia left. I'm glad to say the development itself had continuously been agraciated by dozens of contributors and cheerers (truly thanks for the trusting vow, guys & gals!).\r\n\r\nTalking about results: many nice features emerged, development aimed to get back the old GMS experience. Now many of these so-long missing features are gracefully presented to you in the shape of this server. Long live MapleStory!!\r\n\r\nThese are the features from #bHeavenMS#k:\r\n\r\n";
for(var i = 0; i < tabs.length; i++) {
sendStr += "#L" + i + "##b" + tabs[i] + "#k#l\r\n";
}

View File

@@ -37,6 +37,7 @@ function writeServerStaff_HeavenMS() {
addPerson("Ronan", "Developer");
addPerson("Vcoc", "Freelance Developer");
addPerson("Thora", "Contributor");
addPerson("GabrielSin", "Contributor");
setHistory(2015, 2018);
}