Channel Services + Mob Movement patch + Portal map scripts

Refactored several schedulers within the channel class, now running within their own service modules.
Fixed a case where mob movements would get mistakably processed for other than the target mob during a map transition, leading to weird movements on the mob in the entered area.
Added usage of foreign key for petid's.
Implemented functionality for "Hair Membership" coupons.
Fixed skill Body Pressure not applying the chance to neutralise on touch.
Fixed quest related to NPC Shaman Rock not completing due to unmatched progress.
Fixed an issue with updating title progress "Touch the Sky".
This commit is contained in:
ronancpl
2019-10-12 17:13:03 -03:00
parent b93c9ce1d6
commit 80cd240ab8
65 changed files with 1195 additions and 779 deletions

View File

@@ -0,0 +1,29 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
/*
* Author: kevintjuh93
*
*/
function start(ms) {
ms.touchTheSky();
}

View File

@@ -72,7 +72,10 @@ function action(mode, type, selection) {
} else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150001)){
if (cm.haveItem(5420002)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150001)){
cm.gainItem(5150001, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -78,7 +78,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150003)){
if (cm.haveItem(5420003)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150003)){
cm.gainItem(5150003, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -21,6 +21,9 @@
*/
var status = -1;
/*
Custom Quest 100300
*/
function activateShamanRock(slot,progress) {
var ch = progress[slot];
if(ch == '0') {
@@ -45,10 +48,10 @@ function start() {
else if(map == 105070000) activateShamanRock(2,progress);
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
var npcOid = cm.getQuestProgressInt(2236, 1);
var npcOid = cm.getQuestProgressInt(100300, 1);
if (npcOid == 0) {
activateShamanRock(3,progress);
cm.setQuestProgress(2236, 1, cm.getNpcObjectId());
cm.setQuestProgress(100300, 1, cm.getNpcObjectId());
} else if (cm.getNpcObjectId() != npcOid) {
activateShamanRock(4,progress);
}

View File

@@ -21,6 +21,9 @@
*/
var status = -1;
/*
Custom Quest 100300
*/
function activateShamanRock(slot,progress) {
var ch = progress[slot];
if(ch == '0') {
@@ -45,10 +48,10 @@ function start() {
else if(map == 105070000) activateShamanRock(2,progress);
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
var npcOid = cm.getQuestProgressInt(2236, 1);
var npcOid = cm.getQuestProgressInt(100300, 1);
if (npcOid == 0) {
activateShamanRock(3,progress);
cm.setQuestProgress(2236, 1, cm.getNpcObjectId());
cm.setQuestProgress(100300, 1, cm.getNpcObjectId());
} else if (cm.getNpcObjectId() != npcOid) {
activateShamanRock(4,progress);
}

View File

@@ -83,7 +83,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150005) == true){
if (cm.haveItem(5420004)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150005) == true){
cm.gainItem(5150005, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -81,7 +81,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150007) == true){
if (cm.haveItem(5420005)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150007) == true){
cm.gainItem(5150007, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -81,7 +81,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150025)){
if (cm.haveItem(5420006)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150025)){
cm.gainItem(5150025, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -40,7 +40,6 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3311)) {
var slot = 2;
var progress = cm.getQuestProgressInt(3311);
if (progress == 4) {

View File

@@ -40,7 +40,6 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3311)) {
var slot = 0;
var progress = cm.getQuestProgressInt(3311);
if (progress == 4) {

View File

@@ -84,7 +84,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150020) == true){
if (cm.haveItem(5420000)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150020) == true){
cm.gainItem(5150020, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

View File

@@ -73,7 +73,10 @@ function action(mode, type, selection) {
else if (status == 2){
cm.dispose();
if (beauty == 1){
if (cm.haveItem(5150031)){
if (cm.haveItem(5420001)){
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else if (cm.haveItem(5150031)){
cm.gainItem(5150031, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");

49
scripts/npc/mapleTV.js Normal file
View File

@@ -0,0 +1,49 @@
/*
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/>.
*/
/*
Default Maple TV
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
// do nothing
cm.dispose();
}
}
}

View File

@@ -20,10 +20,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Author: kevintjuh93
*
*/
function start(ms) {
ms.touchTheSky();
// Author: Ronan
function enter(ms) {
ms.runMapScript();
return false;
}

25
scripts/quest/2232.js Normal file
View File

@@ -0,0 +1,25 @@
var status = -1;
function start(mode, type, selection) {
var familyEntry = qm.getPlayer().getFamilyEntry();
if (familyEntry != null && familyEntry.getJuniorCount() > 0) {
qm.forceCompleteQuest();
qm.gainExp(3000);
qm.sendNext("Good job!");
} else {
qm.sendNext("I see that you have not successfully find a Junior, ok?");
}
qm.dispose();
}
function end(mode, type, selection) {
var familyEntry = qm.getPlayer().getFamilyEntry();
if (familyEntry != null && familyEntry.getJuniorCount() > 0) { // script found thanks to kvmba
qm.forceCompleteQuest();
qm.gainExp(3000);
qm.sendNext("Good job!");
} else {
qm.sendNext("I see that you have not successfully find a Junior, ok?");
}
qm.dispose();
}

38
scripts/quest/2251.js Normal file
View File

@@ -0,0 +1,38 @@
-/*
Author: Kevin
Quest: Zombie Mushroom Signal 3 (2251)
NPC: The Rememberer (1061011)
Item: Recording Charm (4032399)
*/
var status = -1; // script restored thanks to kvmba
function end(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) {
if(!qm.haveItem(4032399, 20)) {
qm.sendOk("Please bring me 20 #b#t4032399##k... #i4032399#");
}
else {
qm.gainItem(4032399, -20);
qm.sendOk("Oh, you brought 20 #b#t4032399##k! Thank you.");
qm.gainExp(8000);
qm.forceCompleteQuest();
}
} else if (status == 1) {
qm.dispose();
}
}
}