PlayerNPC patch + Wedding ring effects + Bypassable PIN/PIC + SP cap

Fixed an issue with delayed item pickups.
Fixed ClearSlot command not removing rechargeables from inventory.
Fixed Resurrection and Hyper Body animation effect not working for other players.
Implemented bypassable PIN/PIC, applied on accounts after a successful authentication, remaining active while activity is detected for that account.
Fixed anti-multiclient system not properly registering players logged in via all-chars-view.
Fixed cases where players still could gain EXP from much higher-leveled mobs if they were on an event instance.
Optimized scroll result method performance.
Added a server flag for SP cap limit on the player's current job (missing amount are reobtained after changing jobs).
PlayerNPCs now have overridable scripts.
Fixed some mapobject issues with PlayerNPCs, potencially leading to disappearing from maps in certain circumstances.
Fixed SpawnAllPnpcs command not properly spawning all PlayersNPCs.
Added extra info on Abdula, now stating whether a book can be obtained from questline or not.
Fixed marriage ring effects.
Fixed some cases where marriage rings were being able to be sent out from the character owner.
Fixed Duey allowing send untradeable items.
New tool: MapleWorldmapChecker. It reads Map.wz XMLs, fetching mapids not properly referenced on the worldmap nodes.
This commit is contained in:
ronancpl
2018-10-25 07:09:35 -03:00
parent 17d3ffe1c3
commit 8f8cd815aa
87 changed files with 2040 additions and 271 deletions

View File

@@ -1,12 +0,0 @@
//importPackage(Packages.tools);
function start(ms) {
//var pq = ms.getPyramid();
//ms.getPlayer().resetEnteredScript();
//ms.getClient().announce(MaplePacketCreator.getClock(pq.timer()));
}
/*
killing/first/stage
killing/first/number/
killing/first/start
*/

View File

@@ -17,7 +17,7 @@ function action(mode, type, selection){
cm.dispose();
}
else{
if (mode == 0 && status == 0){
if (mode == 0 && type > 0){
cm.dispose();
return;
}
@@ -31,11 +31,10 @@ function action(mode, type, selection){
if (cm.getQuestStatus(2175) == 1){
if (cm.getPlayer().canHold(2030019)){
cm.sendOk("Please take this #b#t2030019##k, it will make your life a lot easier. #i2030019#");
cm.gainItem(2030019, 1);
}
else{
cm.sendOk("No free inventory spot available. Please make room in your USE inventory first.");
cm.dipose();
cm.dispose();
}
}
else{
@@ -44,6 +43,7 @@ function action(mode, type, selection){
}
}
else if (status == 1){
cm.gainItem(2030019, 1);
cm.warp(100000006, 0);
cm.dispose();
}

View File

@@ -47,12 +47,12 @@ function action(mode, type, selection) {
if(status == 0) {
if(!cm.isQuestStarted(20407)) {
cm.sendOk("... Knight, you still #bseem unsure to face this fight#k, don't you? There's no grace in challenging someone when they are still not mentally ready for the battle. Talk your peace to that big clumsy bird of yours, maybe it'll put some guts on you.");
cm.dispose();
return;
cm.sendOk("... Knight, you still #bseem unsure to face this fight#k, don't you? There's no grace in challenging someone when they are still not mentally ready for the battle. Talk your peace to that big clumsy bird of yours, maybe it'll put some guts on you.");
cm.dispose();
return;
}
cm.sendAcceptDecline("Hahahahaha! This place's Empress is already under my domain, that's surely a great advance on the #bBlack Wings#k' overthrow towards Maple World... And you, there? Still wants to face us? Or, better yet, #rfeel fancy to join us#k since there's nothing more you can do?");
cm.sendAcceptDecline("Hahahahaha! This place's Empress is already under my domain, that's surely a great advance on the #bBlack Wings#k' overthrow towards Maple World... And you, there? Still wants to face us? Or, better yet, since you seem strong enough to be quite a supplementary reinforcement at our service, #rwill you meet our expectations and fancy joining us#k since there's nothing more you can do?");
} else if (status == 1) {
cm.sendOk("Heh, cowards have no place on the #rBlack Mage's#k army. Begone!");
cm.dispose();

View File

@@ -25,7 +25,7 @@ importPackage(Packages.tools);
var status;
var harpNote = 'C';
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
function start() {

View File

@@ -25,7 +25,7 @@ importPackage(Packages.tools);
var status;
var harpNote = 'D';
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
function start() {

View File

@@ -25,7 +25,7 @@ importPackage(Packages.tools);
var status;
var harpNote = 'E';
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
function start() {

View File

@@ -25,7 +25,7 @@ importPackage(Packages.tools);
var status;
var harpNote = 'F';
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
function start() {

View File

@@ -25,7 +25,7 @@ importPackage(Packages.tools);
var status;
var harpNote = 'G';
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
function start() {

View File

@@ -25,7 +25,7 @@ importPackage(Packages.tools);
var status;
var harpNote = 'A';
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
function start() {

View File

@@ -25,7 +25,7 @@ importPackage(Packages.tools);
var status;
var harpNote = 'B';
var harpSounds = ["do", "la", "mi", "pa", "re", "si", "sol"];
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
function start() {

View File

@@ -29,6 +29,6 @@ function start() {
cm.removeAll(4001015);
cm.removeAll(4001016);
cm.removeAll(4001018);
cm.sendSimple("See you next time.");
cm.sendOk("See you next time.");
cm.dispose();
}

View File

@@ -1,5 +1,5 @@
function start() {
cm.sendSimple("If you had wings, I'm sure you could go there. But, that alone won't be enough. If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well. I'm the only Halfling left that knows the way back... If you want to go there, I can transform you. No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
cm.sendSimple("If you had wings, I'm sure you could go there. But, that alone won't be enough. If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well. I'm the only Halfling left that knows the way back... If you want to go there, I can transform you. No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
}
function action(m, t, s) {

View File

@@ -199,7 +199,7 @@ function action(mode, type, selection) {
} else {
var placeTime = cserv.getWeddingReservationTimeLeft(wid);
cm.sendOk("Have patience. Your wedding is set to happen at the #r" + placeTime + "#k.");
cm.sendOk("Have patience. Your wedding is set to happen at the #r" + placeTime + "#k. Don't forget the wedding garment.");
cm.dispose();
}
} else {

View File

@@ -132,7 +132,7 @@ function action(mode, type, selection) {
if(weddingId > 0) {
if(cserv.isWeddingReserved(weddingId)) { // registration check
var placeTime = cserv.getWeddingReservationTimeLeft(weddingId);
cm.sendOk("Your wedding is set to start at the #r" + placeTime + "#k. Don't be late!");
cm.sendOk("Your wedding is set to start at the #r" + placeTime + "#k. Get formally dressed and don't be late!");
} else {
var partner = wserv.getPlayerStorage().getCharacterById(cm.getPlayer().getPartnerId());
if(partner == null) {
@@ -177,10 +177,10 @@ function action(mode, type, selection) {
var placeTime = cserv.getWeddingReservationTimeLeft(weddingId);
var wedType = weddingType ? "Premium" : "Regular";
cm.sendOk("You both have received 15 Wedding Tickets, to be given to your guests. #bDouble-click the ticket#k to send it to someone. Invitations can only be sent #rbefore the wedding start time#k. Your #b" + wedType + " wedding#k is set to start at the #r" + placeTime + "#k. Don't be late!");
cm.sendOk("You both have received 15 Wedding Tickets, to be given to your guests. #bDouble-click the ticket#k to send it to someone. Invitations can only be sent #rbefore the wedding start time#k. Your #b" + wedType + " wedding#k is set to start at the #r" + placeTime + "#k. Get formally dressed and don't be late!");
player.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Don't be late!");
partner.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Don't be late!");
player.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Get dressed and don't be late!");
partner.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Get dressed and don't be late!");
if(!hasSuitForWedding(player)) {
player.dropMessage(5, "Wedding Assistant: Please purchase a wedding garment before showing up for the ceremony. One can be bought at the Wedding Shop left-most Amoria.");

View File

@@ -109,14 +109,23 @@ function action(mode, type, selection) {
selection = 20; // Random.
}
} else if (status == 1) {
var cmPartner;
try {
cmPartner = cm.getMap().getCharacterById(cm.getPlayer().getPartnerId()).getClient().getAbstractPlayerInteraction();
} catch(err) {
cmPartner = null;
}
switch(selection) {
case 0:
if(eim.getIntProperty("isPremium") == 1) {
eim.warpEventTeam(680000300);
cm.sendOk("Enjoy! Cherish your Photos Forever!");
if (cmPartner != null) cmPartner.npcTalk(cm.getNpc(), "Enjoy! Cherish your Photos Forever!");
} else { // skip the party-time (premium only)
eim.warpEventTeam(680000500);
cm.sendOk("Congratulations for the newly-wed! I will escort you to the exit.");
if (cmPartner != null) cmPartner.npcTalk(cm.getNpc(), "Congratulations for the newly-wed! I will escort you to the exit.");
}
cm.dispose();

View File

@@ -132,7 +132,7 @@ function action(mode, type, selection) {
if(weddingId > 0) {
if(cserv.isWeddingReserved(weddingId)) { // registration check
var placeTime = cserv.getWeddingReservationTimeLeft(weddingId);
cm.sendOk("Your wedding is set to start at the #r" + placeTime + "#k. Don't be late!");
cm.sendOk("Your wedding is set to start at the #r" + placeTime + "#k. Get a cool attire and don't be late!");
} else {
var partner = wserv.getPlayerStorage().getCharacterById(cm.getPlayer().getPartnerId());
if(partner == null) {
@@ -177,10 +177,10 @@ function action(mode, type, selection) {
var placeTime = cserv.getWeddingReservationTimeLeft(weddingId);
var wedType = weddingType ? "Premium" : "Regular";
cm.sendOk("You both have received 15 Wedding Tickets, to be given to your guests. #bDouble-click the ticket#k to send it to someone. Invitations can only be sent #rbefore the wedding start time#k. Your #b" + wedType + " wedding#k is set to start at the #r" + placeTime + "#k. Don't be late!");
cm.sendOk("You both have received 15 Wedding Tickets, to be given to your guests. #bDouble-click the ticket#k to send it to someone. Invitations can only be sent #rbefore the wedding start time#k. Your #b" + wedType + " wedding#k is set to start at the #r" + placeTime + "#k. Get a cool attire and don't be late!");
player.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Don't be late!");
partner.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Don't be late!");
player.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Get dressed and don't be late!");
partner.dropMessage(6, "Wedding Assistant: You both have received 15 Wedding Tickets. Invitations can only be sent before the wedding start time. Your " + wedType + " wedding is set to start at the " + placeTime + ". Get dressed and don't be late!");
if(!hasSuitForWedding(player)) {
player.dropMessage(5, "Wedding Assistant: Please purchase a wedding garment before showing up for the ceremony. One can be bought at the Wedding Shop left-most Amoria.");

View File

@@ -109,14 +109,23 @@ function action(mode, type, selection) {
selection = 20; // Random.
}
} else if (status == 1) {
var cmPartner;
try {
cmPartner = cm.getMap().getCharacterById(cm.getPlayer().getPartnerId()).getClient().getAbstractPlayerInteraction();
} catch(err) {
cmPartner = null;
}
switch(selection) {
case 0:
if(eim.getIntProperty("isPremium") == 1) {
eim.warpEventTeam(680000300);
cm.sendOk("Enjoy! Cherish your Photos Forever!");
if (cmPartner != null) cmPartner.npcTalk(cm.getNpc(), "Enjoy! Cherish your Photos Forever!");
} else { // skip the party-time (premium only)
eim.warpEventTeam(680000500);
cm.sendOk("Congratulations for the newly-wed! I will escort you to the exit.");
if (cmPartner != null) cmPartner.npcTalk(cm.getNpc(), "Congratulations for the newly-wed! I will escort you to the exit.");
}
cm.dispose();

View File

@@ -133,7 +133,7 @@ function action(mode, type, selection) {
} else {
var placeTime = cserv.getWeddingReservationTimeLeft(wid);
cm.sendOk("Yo. Your wedding is set to happen at the #r" + placeTime + "#k, don't be late will you?");
cm.sendOk("Yo. Your wedding is set to happen at the #r" + placeTime + "#k, get a decent apparel don't be late will you?");
cm.dispose();
}
} else {

View File

@@ -98,20 +98,22 @@ function action(mode, type, selection) {
} else if(status == 2) {
selected = selection;
var mobList = cm.getNamesWhoDropsItem(table[selected]);
var sendStr;
if(mobList.length == 0) {
sendStr = "No mobs drop '#b#t" + table[selected] + "##k'.";
sendStr = "No mobs drop '#b#t" + table[selected] + "##k'.\r\n\r\n";
} else {
sendStr = "The following mobs drop '#b#t" + table[selected] + "##k':\r\n\r\n";
for(var i = 0; i < mobList.length; i++) {
sendStr += " #L" + i + "# " + mobList[i] + "#l\r\n";
}
sendStr += "\r\n";
}
sendStr += cm.getSkillBookInfo(table[selected]);
cm.sendSimple(sendStr);
cm.sendNext(sendStr);
cm.dispose();
}
}

View File

@@ -1,8 +1,36 @@
var status;
function playerNearby(chrpos, portalpos) {
try {
return Math.sqrt( Math.pow((portalpos.getX() - chrpos.getX()), 2) + Math.pow((portalpos.getY() - chrpos.getY()), 2) ) < 77;
} catch(err) {
return false;
}
}
function start() {
cm.sendOk("You didn't hear it from Rooney? It's a dress-up party, and you can't enter unless you've transformed into something else. I hear that Cliff has something that you may be looking for...");
action(1,0,0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.dispose();
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
if (playerNearby(cm.getPlayer().getPosition(), cm.getMap().getPortal("chimney01").getPosition())) cm.sendOk("Hey, hey~~ Please don't go sneaking into someone else's house without permission, you don't want to get a naughty remark on Santa's list this year, do you?");
else cm.sendOk("Hohoho~~ have you a Great Year full of health, realization and happiness!");
} else {
cm.dispose();
}
}
}

View File

@@ -80,7 +80,7 @@ function writeFeatureTab_PlayerSocialNetwork() {
addFeature("Improved ranking system, with daily movement.");
addFeature("Protected and improved face expression system.");
addFeature("Automated support for Player NPCs and Hall of Fame.");
addFeature("Engagement & Wedding system.");
addFeature("Engagement & Wedding system with ring effects.");
addFeature("Equipments displays to everyone it's level & EXP info.");
addFeature("Further improved the existent minigame mechanics.");
}
@@ -191,8 +191,9 @@ function writeFeatureTab_Serverpotentials() {
addFeature("Fixed and randomized HP/MP growth rate available.");
addFeature("Players' MaxHP/MaxMP method accounting equip gain.");
addFeature("Prevented 'NPC gone after some uptime' issue.");
addFeature("Implemented starters' AP assigning for under level 11.");
addFeature("AP assigning available for novices level 10 or below.");
addFeature("SP cap past tier-level, recovered after job upgrade.");
addFeature("Bypassable PIN/PIC system for authenticated users.");
addFeature("Automatic account registration - thanks shavit!");
}

View File

@@ -1,4 +1,5 @@
function enter(pi) {
pi.playPortalSound();
pi.warp(pi.getPlayer().getMap().getId() - 10,"left00");
pi.warp(pi.getPlayer().getMap().getId() - 10, "left00");
return true;
}

View File

@@ -1,5 +1,5 @@
function enter(pi) {
pi.playPortalSound();
pi.warp(pi.getPlayer().getMap().getId() -10,"left01");
pi.warp(pi.getPlayer().getMap().getId() - 10, "left01");
return true;
}

63
scripts/quest/20408.js Normal file
View File

@@ -0,0 +1,63 @@
/*
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/>.
*/
var status = -1;
function start(mode, type, selection) { // missing script for questid found thanks to Lost(tm)
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("#h0#... First of all, thank you for your great work. If it weren't you, I... I wouldn't be safe from the curse of Black Witch. Thank you so much.");
} else if (status == 1) {
qm.sendNextPrev("If nothing else, this chain of events makes one thing crystal clear, you have put in countless hours of hard work to better yourself and contribute to the Cygnus Knights.");
} else if (status == 2) {
qm.sendAcceptDecline("To celebrate your hard work and accomplishments... I would like to award you a new title and renew my blessings onto you. Will you... accept this?");
} else if (status == 3) {
if (!qm.canHold(1142069, 1)) {
qm.sendOk("Please, make a room available on your EQUIP inventory for the medal.");
qm.dispose();
return;
}
qm.gainItem(1142069, 1);
if (qm.getJobId() % 10 == 1) {
qm.changeJobById(qm.getJobId() + 1);
}
qm.forceStartQuest();
qm.forceCompleteQuest();
qm.sendOk("#h0#. For courageously battling the Black Mage, I will appoint you as the new Chief Knight of Cygnus Knights from this moment onwards. Please use your power and authority wisely to help protect the citizens of Maple World.");
} else if (status == 4) {
qm.dispose();
}
}
}