Merge branch 'master' into credits_update
This commit is contained in:
@@ -86,29 +86,38 @@ function scheduledTimeout(eim){
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerRevive(eim, player){
|
||||
player.respawn(eim, entryMap);
|
||||
return false;
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
function playerDead(eim, player){}
|
||||
|
||||
function playerDisconnected(eim, player){
|
||||
var party = eim.getPlayers();
|
||||
|
||||
for(var i = 0; i < party.size(); i++){
|
||||
if(party.get(i).equals(player))
|
||||
removePlayer(eim, player);
|
||||
else
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
function monsterValue(eim, mobId){
|
||||
return -1;
|
||||
}
|
||||
|
||||
function end(eim) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function leftParty(eim, player){}
|
||||
|
||||
function disbandParty(eim){}
|
||||
@@ -120,8 +129,15 @@ function playerExit(eim, player){
|
||||
player.changeMap(exitMap, 2);
|
||||
}
|
||||
|
||||
function changedMap(eim, chr, mapid) {
|
||||
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < minMapId || mapid > maxMapId) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
function removePlayer(eim, player){
|
||||
|
||||
@@ -77,29 +77,38 @@ function scheduledTimeout(eim){
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerRevive(eim, player){
|
||||
player.respawn(eim, entryMap);
|
||||
return false;
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
function playerDead(eim, player){}
|
||||
|
||||
function playerDisconnected(eim, player){
|
||||
var party = eim.getPlayers();
|
||||
|
||||
for(var i = 0; i < party.size(); i++){
|
||||
if(party.get(i).equals(player))
|
||||
removePlayer(eim, player);
|
||||
else
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
function monsterValue(eim, mobId){
|
||||
return -1;
|
||||
}
|
||||
|
||||
function end(eim) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function leftParty(eim, player){}
|
||||
|
||||
function disbandParty(eim){}
|
||||
@@ -112,7 +121,14 @@ function playerExit(eim, player){
|
||||
}
|
||||
|
||||
function changedMap(eim, chr, mapid) {
|
||||
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
|
||||
if (mapid < minMapId || mapid > maxMapId) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
function removePlayer(eim, player){
|
||||
|
||||
105
scripts/event/NineSpirit.js
Normal file
105
scripts/event/NineSpirit.js
Normal file
@@ -0,0 +1,105 @@
|
||||
var minPlayers = 1;
|
||||
var timeLimit = 5; //5 minutes
|
||||
var eventTimer = 1000 * 60 * timeLimit;
|
||||
var exitMap = 240040610;
|
||||
var eventMap = 240040611;
|
||||
|
||||
var minMapId = 240040611;
|
||||
var maxMapId = 240040611;
|
||||
|
||||
function init(){}
|
||||
|
||||
function setup(difficulty, lobbyId){
|
||||
var eim = em.newInstance("NineSpirit_" +lobbyId);
|
||||
eim.getInstanceMap(eventMap).resetFully();
|
||||
eim.getInstanceMap(eventMap).allowSummonState(false);
|
||||
respawn(eim);
|
||||
eim.startEventTimer(eventTimer);
|
||||
return eim;
|
||||
}
|
||||
|
||||
function afterSetup(eim){}
|
||||
|
||||
function respawn(eim){}
|
||||
|
||||
function playerEntry(eim, player){
|
||||
var nest = eim.getMapInstance(eventMap);
|
||||
if (!player.haveItem(4001094)) {
|
||||
eim.spawnNpc(2081008, nest.getReactorById(2406000).getPosition(), nest);
|
||||
}
|
||||
|
||||
player.changeMap(nest, 1);
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim){
|
||||
var party = eim.getPlayers();
|
||||
|
||||
for(var i = 0; i < party.size(); i++)
|
||||
playerExit(eim, party.get(i));
|
||||
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerRevive(eim, player){
|
||||
player.respawn(eim, exitMap);
|
||||
return false;
|
||||
}
|
||||
|
||||
function playerDead(eim, player){}
|
||||
|
||||
function playerDisconnected(eim, player){
|
||||
var party = eim.getPlayers();
|
||||
|
||||
for(var i = 0; i < party.size(); i++){
|
||||
if(party.get(i).equals(player))
|
||||
removePlayer(eim, player);
|
||||
else
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function monsterValue(eim, mobId){
|
||||
return -1;
|
||||
}
|
||||
|
||||
function leftParty(eim, player){}
|
||||
|
||||
function disbandParty(eim){}
|
||||
|
||||
function playerUnregistered(eim, player){}
|
||||
|
||||
function playerExit(eim, player){
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap);
|
||||
}
|
||||
|
||||
function changedMap(eim, chr, mapid){
|
||||
if(mapid < minMapId || mapid > maxMapId){
|
||||
removePlayer(eim, chr);
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
eim.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
function removePlayer(eim, player){
|
||||
eim.unregisterPlayer(player);
|
||||
player.getMap().removePlayer(player);
|
||||
player.setMap(exitMap);
|
||||
}
|
||||
|
||||
function cancelSchedule(){}
|
||||
|
||||
function dispose(){}
|
||||
|
||||
function clearPQ(eim){}
|
||||
|
||||
function monsterKilled(mob, eim){}
|
||||
|
||||
function allMonstersDead(eim){}
|
||||
|
||||
// ---------- FILLER FUNCTIONS ----------
|
||||
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
@@ -4,6 +4,9 @@ var eventTimer = 1000 * 60 * timeLimit;
|
||||
var exitMap = 105070300;
|
||||
var eventMap = 910510000;
|
||||
|
||||
var minMapId = 910510000;
|
||||
var maxMapId = 910510000;
|
||||
|
||||
function init(){}
|
||||
|
||||
function setup(difficulty, lobbyId){
|
||||
@@ -67,9 +70,9 @@ function playerExit(eim, player){
|
||||
player.changeMap(exitMap);
|
||||
}
|
||||
|
||||
function changedMap(eim, player){
|
||||
if(player.getMap().getId() < eventMap || player.getMap().getId() > next){
|
||||
removePlayer(eim, player);
|
||||
function changedMap(eim, chr, mapid){
|
||||
if(mapid < minMapId || mapid > maxMapId){
|
||||
removePlayer(eim, chr);
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
eim.dispose();
|
||||
|
||||
55
scripts/item/killarmush.js
Normal file
55
scripts/item/killarmush.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
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;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
im.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
im.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if (im.getMapId() == 106020300) {
|
||||
var portal = im.getMap().getPortal("obstacle");
|
||||
if (portal != null && portal.getPosition().distance(im.getPlayer().getPosition()) < 210) {
|
||||
if(!(im.isQuestStarted(100202) || im.isQuestCompleted(100202))) im.startQuest(100202);
|
||||
im.removeAll(2430014);
|
||||
|
||||
im.message("You have used the Killer Mushroom Spore to open the way.");
|
||||
}
|
||||
}
|
||||
|
||||
im.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
58
scripts/item/removethorns.js
Normal file
58
scripts/item/removethorns.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
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;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
im.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
im.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if (im.getMapId() == 106020400 && im.isQuestActive(2324)) {
|
||||
var player = im.getPlayer();
|
||||
|
||||
var portal = im.getMap().getPortal("right00");
|
||||
if (portal != null && portal.getPosition().distance(player.getPosition()) < 210) {
|
||||
player.gainExp(3300 * player.getExpRate());
|
||||
|
||||
im.forceCompleteQuest(2324);
|
||||
im.removeAll(2430015);
|
||||
im.playerMessage(5, "You have used the Thorn Remover to clear the path.");
|
||||
}
|
||||
}
|
||||
|
||||
im.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||
if (player.getLevel() < exped.getMinLevel() || player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement, thanks Conrad
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
|
||||
@@ -48,7 +48,7 @@ function action(mode, type, selection){
|
||||
|
||||
var party = cm.getPlayer().getParty();
|
||||
if (party != null) {
|
||||
if (!em.startInstance(party, cm.getMap())) {
|
||||
if (!em.startInstance(party, cm.getMap(), 1)) {
|
||||
cm.sendOk("Another party is already challenging the boss in this channel.");
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -59,7 +59,12 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) { // thanks Vcoc for finding out a need of reapproval from the masters for Zakum expeditions
|
||||
cm.sendOk("Beware, for the power of olde has not been forgotten... ");
|
||||
if (cm.getPlayer().getLevel() >= 50) { // thanks Z1peR for noticing not-so-clear unmet requirements message here.
|
||||
cm.sendOk("Beware, for the power of olde has not been forgotten... If you seek to defeat #rZakum#k someday, earn the #bChief's Residence Council#k approval foremost and then #bface the trials#k, only then you will become eligible to fight.");
|
||||
} else {
|
||||
cm.sendOk("Beware, for the power of olde has not been forgotten...");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||
if (player.getLevel() < exped.getMinLevel() || player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement, thanks Conrad
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
|
||||
@@ -39,7 +39,14 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
cm.sendOk("We've already located the enemy's ultimate weapon! Follow along the ship's bow area ahead and you will find my sister #b#p2082013##k. Report to her for futher instructions on the mission.");
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
cm.openShopNPC(2082014);
|
||||
} else if (cm.isQuestStarted(3749)) {
|
||||
cm.sendOk("We've already located the enemy's ultimate weapon! Follow along the ship's bow area ahead and you will find my sister #b#p2082013##k. Report to her for futher instructions on the mission.");
|
||||
} else {
|
||||
cm.sendDefault();
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||
if (player.getLevel() < exped.getMinLevel() || player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement, thanks Conrad
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
|
||||
@@ -60,7 +60,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||
if (player.getLevel() < exped.getMinLevel() || player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement, thanks Conrad
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
|
||||
@@ -58,7 +58,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||
if (player.getLevel() < exped.getMinLevel() || player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement, thanks Conrad
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
*/
|
||||
|
||||
function start() {
|
||||
if(Packages.server.MapleShopFactory.getInstance().getShop(9201101) != null) {
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
cm.openShopNPC(9201101);
|
||||
} else {
|
||||
cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
|
||||
//cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
|
||||
cm.sendDefault();
|
||||
}
|
||||
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < cwkpq.getMinLevel() && player.getLevel() > cwkpq.getMaxLevel()) { //Don't fit requirement
|
||||
if (player.getLevel() < cwkpq.getMinLevel() || player.getLevel() > cwkpq.getMaxLevel()) { //Don't fit requirement, thanks Conrad
|
||||
cm.sendOk("You do not meet the criteria to take attempt Crimsonwood Keep Party Quest!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
|
||||
@@ -59,7 +59,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||
if (player.getLevel() < exped.getMinLevel() || player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement, thanks Conrad
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
|
||||
@@ -60,6 +60,7 @@ function writeFeatureTab_Skills() {
|
||||
addFeature("Maker skill features properly developed.");
|
||||
addFeature("Chair Mastery - map chair boosts HP/MP rec.");
|
||||
addFeature("Mu Lung Dojo skills functional.");
|
||||
addFeature("Monster Magnet skill no longer crashes players.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_Quests() {
|
||||
@@ -72,6 +73,7 @@ function writeFeatureTab_Quests() {
|
||||
addFeature("Reviewed several 4th job skill questlines.");
|
||||
addFeature("Rewarding system now looks up for item stacking.");
|
||||
addFeature("3rd job quiz with all 40-question pool available.");
|
||||
addFeature("Item raising functional.");
|
||||
}
|
||||
|
||||
function writeFeatureTab_PlayerSocialNetwork() {
|
||||
@@ -113,6 +115,7 @@ function writeFeatureTab_CashItems() {
|
||||
addFeature("Reviewed an pet position issue within CASH inventory.");
|
||||
addFeature("Reviewed fashion-related contents, almost GMS-like.");
|
||||
addFeature("Plastic surgeons/stylists no longer stuck characters.");
|
||||
addFeature("Reworked gachapon loots, website-lists lookalike.");
|
||||
addFeature("Scroll for Spikes on Shoes.");
|
||||
addFeature("Scroll for Cold Protection.");
|
||||
addFeature("Vega's spell.");
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
|
||||
var status;
|
||||
var ticketId = 5220000;
|
||||
var mapName = ["Henesys", "Ellinia", "Perion", "Kerning City", "Sleepywood", "Mushroom Shrine", "Showa Spa (M)", "Showa Spa (F)", "New Leaf City", "Nautilus"];
|
||||
var mapName = ["Henesys", "Ellinia", "Perion", "Kerning City", "Sleepywood", "Mushroom Shrine", "Showa Spa (M)", "Showa Spa (F)", "Ludibrium", "New Leaf City", "El Nath", "Nautilus"];
|
||||
var curMapName = "";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
curMapName = mapName[(cm.getNpc() != 9100117 && cm.getNpc() != 9100109) ? (cm.getNpc() - 9100100) : cm.getNpc() == 9100109 ? 8 : 9];
|
||||
curMapName = mapName[(cm.getNpc() != 9100117 && cm.getNpc() != 9100109) ? (cm.getNpc() - 9100100) : cm.getNpc() == 9100109 ? 9 : 11];
|
||||
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
60
scripts/npc/gachaponInfo.js
Normal file
60
scripts/npc/gachaponInfo.js
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
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/>.
|
||||
*/
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Pio
|
||||
* @func: Gachapon Loot Announcer
|
||||
*/
|
||||
|
||||
var status;
|
||||
var gachaMessages;
|
||||
|
||||
function start() {
|
||||
gachaMessages = Packages.server.gachapon.MapleGachapon.Gachapon.getLootInfo();
|
||||
gachas = Packages.server.gachapon.MapleGachapon.Gachapon.values();
|
||||
|
||||
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) {
|
||||
var sendStr = "Hi, #r#p" + cm.getNpc() + "##k here! I'm announcing all obtainable loots from the Gachapons. Which Gachapon machine would you like to look?\r\n\r\n#b" + gachaMessages[0] + "#k";
|
||||
cm.sendSimple(sendStr);
|
||||
} else if(status == 1) {
|
||||
var sendStr = "Loots from #b" + gachas[selection].name() + "#k:\r\n\r\n" + gachaMessages[selection + 1];
|
||||
cm.sendPrev(sendStr);
|
||||
} else if(status == 2) {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,17 +22,20 @@ function enter(pi) {
|
||||
else if(pi.isQuestStarted(2332) && pi.hasItem(4032388)){
|
||||
pi.forceCompleteQuest(2332, 1300002);
|
||||
pi.getPlayer().message("You've found the princess!");
|
||||
pi.giveCharacterExp(4400 * 1.5, pi.getPlayer());
|
||||
pi.giveCharacterExp(4400, pi.getPlayer());
|
||||
|
||||
var em = pi.getEventManager("MK_PrimeMinister");
|
||||
var party = pi.getPlayer().getParty();
|
||||
if (party != null) {
|
||||
if (em.startInstance(party, pi.getMap())) {
|
||||
pi.playPortalSound();
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Another party is already challenging the boss in this channel.");
|
||||
return false;
|
||||
var eli = em.getEligibleParty(pi.getParty()); // thanks Conrad for pointing out missing eligible party declaration here
|
||||
if(eli.size() > 0) {
|
||||
if (em.startInstance(party, pi.getMap(), 1)) {
|
||||
pi.playPortalSound();
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Another party is already challenging the boss in this channel.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (em.startInstance(pi.getPlayer())) { // thanks RedHat for noticing an issue here
|
||||
@@ -49,12 +52,15 @@ function enter(pi) {
|
||||
|
||||
var party = pi.getPlayer().getParty();
|
||||
if (party != null) {
|
||||
if (em.startInstance(1, party, pi.getMap())) {
|
||||
pi.playPortalSound();
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Another party is already challenging the boss in this channel.");
|
||||
return false;
|
||||
var eli = em.getEligibleParty(pi.getParty());
|
||||
if(eli.size() > 0) {
|
||||
if (em.startInstance(party, pi.getMap(), 1)) {
|
||||
pi.playPortalSound();
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Another party is already challenging the boss in this channel.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (em.startInstance(pi.getPlayer())) {
|
||||
|
||||
@@ -20,11 +20,20 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
function enter(pi) {
|
||||
if(!pi.isQuestCompleted(3706)) {
|
||||
pi.playPortalSound(); pi.warp(240040611, "out00");
|
||||
if (pi.isQuestCompleted(3706)) {
|
||||
pi.playPortalSound(); pi.warp(240040612, "out00");
|
||||
return true;
|
||||
} else if (pi.isQuestStarted(100203) || pi.getPlayer().haveItem(4001094)) {
|
||||
var em = pi.getEventManager("NineSpirit");
|
||||
if (!em.startInstance(pi.getPlayer())) {
|
||||
pi.message("There is currently someone in this map, come back later.");
|
||||
return false;
|
||||
} else {
|
||||
pi.playPortalSound(); pi.warp(240040612, "out00");
|
||||
pi.playPortalSound();
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
pi.message("A strange force is blocking you from entering.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
function enter(pi) {
|
||||
|
||||
if(!pi.isQuestStarted(2335) || (pi.isQuestStarted(2335) && !pi.hasItem(4032405))){
|
||||
if(!pi.isQuestCompleted(2335) && !(pi.isQuestStarted(2335) && pi.hasItem(4032405))){
|
||||
pi.getPlayer().message("The door is locked securely. I will need a key if I want to go in there.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(pi.isQuestStarted(2335) && pi.hasItem(4032405)){
|
||||
if(pi.isQuestStarted(2335)){
|
||||
pi.forceCompleteQuest(2335, 1300002);
|
||||
pi.giveCharacterExp(5000 * 1.5, pi.getPlayer());
|
||||
pi.giveCharacterExp(5000, pi.getPlayer());
|
||||
pi.gainItem(4032405, -1);
|
||||
}
|
||||
pi.playPortalSound();
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (pi.isQuestActive(2324)) {
|
||||
var player = pi.getPlayer();
|
||||
player.gainExp(3300 * player.getExpRate());
|
||||
|
||||
pi.forceCompleteQuest(2324);
|
||||
pi.removeAll(2430015);
|
||||
pi.playerMessage(5, "You have used the Thorn Remover to clear the path.");
|
||||
}
|
||||
pi.playPortalSound(); pi.warp(106020501,0);
|
||||
return true;
|
||||
if (pi.isQuestCompleted(2324)) {
|
||||
pi.playPortalSound(); pi.warp(106020501,0);
|
||||
return true;
|
||||
} else {
|
||||
pi.playerMessage(5, "The path ahead is covered with sprawling vine thorns, only a Thorn Remover to clear this out...");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,12 @@
|
||||
*/
|
||||
|
||||
function enter(pi){
|
||||
if (pi.isQuestCompleted(2316)) {
|
||||
if (pi.hasItem(2430014)) {
|
||||
pi.gainItem(2430014, -1 * pi.getPlayer().getItemQuantity(2430014, false));
|
||||
pi.message("You have used the Killer Mushroom Spore to open the way.");
|
||||
}
|
||||
|
||||
if (pi.isQuestStarted(100202)) {
|
||||
pi.playPortalSound(); pi.warp(106020400, 2);
|
||||
return true;
|
||||
} else if (pi.hasItem(2430015)) {
|
||||
pi.gainItem(2430015, -1 * pi.getPlayer().getItemQuantity(2430015, false));
|
||||
pi.message("You have used the Thorn Remover to clean the way.");
|
||||
} else if (pi.hasItem(4000507)) {
|
||||
pi.gainItem(4000507, -1);
|
||||
pi.message("You have used a Poison Spore to pass through the barrier.");
|
||||
|
||||
pi.playPortalSound(); pi.warp(106020400, 2);
|
||||
return true;
|
||||
|
||||
@@ -8,7 +8,7 @@ var status = -1;
|
||||
function start(mode, type, selection){
|
||||
if(qm.hasItem(4032388) && !qm.isQuestStarted(2332)){
|
||||
qm.forceStartQuest();
|
||||
qm.getPlayer().showHint("I must find Violetta. (quest started)");
|
||||
qm.getPlayer().showHint("I must find Violetta!! (#bquest started#k)");
|
||||
}
|
||||
qm.dispose();
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ Dragon nest
|
||||
*/
|
||||
|
||||
function sendToHeaven() {
|
||||
rm.destroyNpc(2081008);
|
||||
rm.mapMessage(6, "In a flicker of light, Nine Spirit's Little Dragon returns to the place it belongs, high above the skies.");
|
||||
rm.getReactor().getMap().resetReactors();
|
||||
rm.spawnNpc(2081008);
|
||||
rm.startQuest(100203);
|
||||
rm.mapMessage(6, "In a flicker of light the egg has matured and cracked, thus born a radiant baby dragon.");
|
||||
}
|
||||
|
||||
function touch() {
|
||||
@@ -18,6 +18,5 @@ function touch() {
|
||||
function untouch() {}
|
||||
|
||||
function act() {
|
||||
rm.spawnNpc(2081008);
|
||||
rm.schedule("sendToHeaven", 12 * 1000);
|
||||
sendToHeaven(); // thanks Conrad for pointing out the GMS-like way of Nine Spirit's Nest
|
||||
}
|
||||
Reference in New Issue
Block a user