Login Purification + Optimized currenttime calls + Standardized WZ
Repelled ultimately the game-breaking issue that was introduced recently on the revamp of the login phase. Optimized the getcurrenttime calls to the OS. Made most of the handler calls fetch directly from the Server object instead, the Server itself delegated with periodically updating the current time value. The result is an slightly delayed currenttime, backed with realtime value update within minutes. Protected concurrently inventory sort handlers. Expected no more NullPointers from the sorting feature. Added a server flag to limit cash items being sold on player shops/hired merchants. Stabilized the MapleTV mechanics, and activities properly split by world. Normalized Character.wz: equipments supposed to have the "cash" property now implements it. Normalized String.wz: every item that doesn't have a "name" property now implements it. Normalized the XMLs that lost indentation on the last source update. New tool: MapleInvalidItemWithNoNameFetcher. Fetches and reports itemids throughout the XMLs that doesn't contain the "name" property and equipments that lacks "cash" property. Frolic Omniknight references aside, if you have run into any more issues regarding the new login system, please open an issue and show the steps you've done to reach the problem.
This commit is contained in:
@@ -29,68 +29,81 @@ importPackage(Packages.client);
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
status++;
|
||||
if (mode != 1) {
|
||||
if(type == 1 && mode == 0)
|
||||
status -= 2;
|
||||
else{
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
if(mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (status == 0)
|
||||
qm.sendNext("Hey, Man~ What's up? Haha! I am Roger who can teach you adorable new Maplers lots of information.");
|
||||
else if (status == 1)
|
||||
qm.sendNextPrev("You are asking who made me do this? Ahahahaha!\r\nMyself! I wanted to do this and just be kind to you new travellers.");
|
||||
else if (status == 2)
|
||||
qm.sendAcceptDecline("So..... Let me just do this for fun! Abaracadabra~!");
|
||||
else if (status == 3) {
|
||||
if (qm.c.getPlayer().getHp() >= 50) {
|
||||
qm.c.getPlayer().setHp(25);
|
||||
qm.c.getPlayer().updateSingleStat(MapleStat.HP, 25);
|
||||
}
|
||||
if (!qm.haveItem(2010007))
|
||||
qm.gainItem(2010007, 1);
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0)
|
||||
qm.sendNext("Hey, Man~ What's up? Haha! I am Roger who can teach you adorable new Maplers lots of information.");
|
||||
else if (status == 1)
|
||||
qm.sendNextPrev("You are asking who made me do this? Ahahahaha!\r\nMyself! I wanted to do this and just be kind to you new travellers.");
|
||||
else if (status == 2)
|
||||
qm.sendAcceptDecline("So..... Let me just do this for fun! Abaracadabra~!");
|
||||
else if (status == 3) {
|
||||
if (qm.c.getPlayer().getHp() >= 50) {
|
||||
qm.c.getPlayer().setHp(25);
|
||||
qm.c.getPlayer().updateSingleStat(MapleStat.HP, 25);
|
||||
}
|
||||
|
||||
if (!qm.haveItem(2010007)) {
|
||||
qm.gainItem(2010007, 1);
|
||||
}
|
||||
|
||||
qm.forceStartQuest();
|
||||
qm.sendNext("Surprised? If HP becomes 0, then you are in trouble. Now, I will give you #rRoger's Apple#k. Please take it. You will feel stronger. Open the Item window and double click to consume. Hey, it's very simple to open the Item window. Just press #bI#k on your keyboard.");
|
||||
} else if (status == 4) {
|
||||
qm.sendNextPrev("Please take all Roger's Apples that I gave you. You will be able to see the HP bar increasing. Please talk to me again when you recover your HP 100%.");
|
||||
} else if (status == 5) {
|
||||
qm.showInfo("UI/tutorial.img/28");
|
||||
qm.dispose();
|
||||
} else if (status == 4) {
|
||||
qm.sendNextPrev("Please take all Roger's Apples that I gave you. You will be able to see the HP bar increasing. Please talk to me again when you recover your HP 100%.");
|
||||
} else if (status == 5) {
|
||||
qm.showInfo("UI/tutorial.img/28");
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function end(mode, type, selection) {
|
||||
status++;
|
||||
if (mode != 1) {
|
||||
if(type == 1 && mode == 0)
|
||||
status -= 2;
|
||||
else{
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
if(mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (status == 0)
|
||||
if (qm.c.getPlayer().getHp() < 50) {
|
||||
qm.sendNext("Hey, your HP is not fully recovered yet. Did you take all the Roger's Apple that I gave you? Are you sure?");
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0)
|
||||
if (qm.c.getPlayer().getHp() < 50) {
|
||||
qm.sendNext("Hey, your HP is not fully recovered yet. Did you take all the Roger's Apple that I gave you? Are you sure?");
|
||||
qm.dispose();
|
||||
} else
|
||||
qm.sendNext("How easy is it to consume the item? Simple, right? You can set a #bhotkey#k on the right bottom slot. Haha you didn't know that! right? Oh, and if you are a beginner, HP will automatically recover itself as time goes by. Well it takes time but this is one of the strategies for the beginners.");
|
||||
else if (status == 1)
|
||||
qm.sendNextPrev("Alright! Now that you have learned alot, I will give you a present. This is a must for your travel in Maple World, so thank me! Please use this under emergency cases!");
|
||||
else if (status == 2)
|
||||
qm.sendNextPrev("Okay, this is all I can teach you. I know it's sad but it is time to say good bye. Well take care if yourself and Good luck my friend!\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0#\r\n#v2010000# 3 #t2010000#\r\n#v2010009# 3 #t2010009#\r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 10 exp");
|
||||
else if (status == 3) {
|
||||
if(qm.isQuestCompleted(1021))
|
||||
qm.dropMessage(1,"Unknown Error");
|
||||
else if(qm.canHold(2010000) && qm.canHold(2010009)){
|
||||
qm.gainExp(10);
|
||||
qm.gainItem(2010000, 3);
|
||||
qm.gainItem(2010009, 3);
|
||||
qm.forceCompleteQuest();
|
||||
}else
|
||||
qm.dropMessage(1,"Your inventory is full");
|
||||
qm.dispose();
|
||||
} else
|
||||
qm.sendNext("How easy is it to consume the item? Simple, right? You can set a #bhotkey#k on the right bottom slot. Haha you didn't know that! right? Oh, and if you are a beginner, HP will automatically recover itself as time goes by. Well it takes time but this is one of the strategies for the beginners.");
|
||||
else if (status == 1)
|
||||
qm.sendNextPrev("Alright! Now that you have learned alot, I will give you a present. This is a must for your travel in Maple World, so thank me! Please use this under emergency cases!");
|
||||
else if (status == 2)
|
||||
qm.sendNextPrev("Okay, this is all I can teach you. I know it's sad but it is time to say good bye. Well take care if yourself and Good luck my friend!\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0#\r\n#v2010000# 3 #t2010000#\r\n#v2010009# 3 #t2010009#\r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 10 exp");
|
||||
else if (status == 3) {
|
||||
if(qm.isQuestCompleted(1021))
|
||||
qm.dropMessage(1,"Unknown Error");
|
||||
else if(qm.canHold(2010000) && qm.canHold(2010009)){
|
||||
qm.gainExp(10);
|
||||
qm.gainItem(2010000, 3);
|
||||
qm.gainItem(2010009, 3);
|
||||
qm.forceCompleteQuest();
|
||||
}else
|
||||
qm.dropMessage(1,"Your inventory is full");
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
scripts/quest/20400.js
Normal file
48
scripts/quest/20400.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
Chasing the Knight's Target
|
||||
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
if(mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
qm.sendNext("Not long ago, we received a distress signal of #bAdvanced Knight #p1103000##k, currently stationed somewhere in #rEl Nath#k. His Your job is to find him, first go talk to #b#p1101002##k and receive further instructions on your mission.");
|
||||
} else if (status == 1) {
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
scripts/quest/20401.js
Normal file
48
scripts/quest/20401.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
Chasing the Knight's Target
|
||||
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
if(mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
qm.sendNext("Last time #bAdvanced Knight #p1103000##k was seen, he was investigating the surging increase on #rzombies#k lately on the #rhigh-grounds of El Nath#k. You should get yourself there to see if you can find any clue of what could have happened.");
|
||||
} else if (status == 1) {
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
scripts/quest/20405.js
Normal file
50
scripts/quest/20405.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
Chasing the Knight's Target
|
||||
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
if(mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
qm.sendNext("There's a note on the wall: 'The source of the curse still goes missing, but a strange device, that I suppose has been used by #rthem#k was found here.'", 3);
|
||||
} else if (status == 1) {
|
||||
qm.sendNextPrev("'The machine was sent to #rEreve#k for avaliation, I'll now set out to continue my mission. Let the Empress bless me on my journey.'", 3);
|
||||
} else if (status == 2) {
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
scripts/quest/20406.js
Normal file
48
scripts/quest/20406.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
Chasing the Knight's Target
|
||||
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
function start(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
qm.dispose();
|
||||
} else {
|
||||
if(mode == 0 && type > 0) {
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
qm.sendNext("Is that so? All there was was a saying that #p1103000# set out to continue his journey? That can't be, there were further instructions for him to detail the progress of his mission until then. #rReturn to the cave#k and report again if it really has nothing more there.");
|
||||
} else if (status == 1) {
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,14 +53,18 @@ function end(mode, type, selection) {
|
||||
} else if (status == 2) {
|
||||
if(selection == 0) {
|
||||
qm.sendOk("If I had an iron hammer and a dagger... a bow and an arrow... what does that mean? Do you want me to tell you? I don't know myself. It's something you should think about. If you need a clue... it would go something like... a weapon is just an item... until someone uses it...?");
|
||||
qm.gainExp(1000 * qm.getPlayer().getExpRate());
|
||||
qm.forceCompleteQuest();
|
||||
} else if(selection == 1) {
|
||||
qm.sendOk("Man, Jiyur wrote on the wall again! Arrgh!!");
|
||||
qm.dispose();
|
||||
return;
|
||||
} else {
|
||||
qm.sendOk("What? You forgot? Do you remember where it was written?");
|
||||
qm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (status == 3) {
|
||||
qm.gainExp(1000 * qm.getPlayer().getExpRate());
|
||||
qm.forceCompleteQuest();
|
||||
qm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,7 @@ function end(mode, type, selection) {
|
||||
qm.sendSimple("Ehh... Yeah, the city is not really doing well because of the currently ruling govern, that's indeed a fact. If only the Guardians of the Deserts returned to put order on this mess...\r\n\r\n#L0##bWhat is the Guardian of the Deserts doing when we're under the Queen's tyranny?#k");
|
||||
} else if (status == 3) {
|
||||
qm.sendSimple("They have departed on an expedition to get rid of some major threats in the desert that were ravaging Ariant, for quite some time now... It's strange, they should have already returned... Thinking about it now, the last attack on the merchants was around the direction the Guardians departed... No, that can't be... Can it?\r\n\r\n#L0##bPerhaps Deo has already turned into a monster.#k");
|
||||
}
|
||||
else if (status == 4) {
|
||||
} else if (status == 4) {
|
||||
qm.gainItem(4011008, -1);
|
||||
|
||||
qm.sendNext("We're in great trouble, if it is like this. And it really seems like it. If the Royal Cactus Deo has gone insane, Ariant is done for. You, can you do something to defeat Deo? We really need your help now.");
|
||||
|
||||
Reference in New Issue
Block a user