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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user