Boss Rush PQ Rewarding System + minor patches
Introducing BRPQ rewarding system (KPQ/LPQ clear-like) and patched issues regarding "no apparent party leader" after party leader disconnects and reconnects.
This commit is contained in:
26
scripts/npc/world0/9000008.js
Normal file
26
scripts/npc/world0/9000008.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
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/>.
|
||||
*/
|
||||
|
||||
function start() {
|
||||
cm.sendOk("Should you have a locked box you want to open, bring it to me.");
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -12,9 +12,17 @@ var minPartySize = 1;
|
||||
var maxPartySize = 6;
|
||||
var state;
|
||||
|
||||
function onRestingSpot() {
|
||||
return cm.getMapId() >= 970030001 && cm.getMapId() <= 970030010;
|
||||
}
|
||||
|
||||
function isFinalBossDone() {
|
||||
return cm.getMapId() >= 970032700 && cm.getMapId() < 970032800 && cm.getMap().getMonsters().isEmpty();
|
||||
}
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
state = (cm.getMapId() >= 970030001 && cm.getMapId() <= 970042711) ? 1 : 0;
|
||||
state = (cm.getMapId() >= 970030001 && cm.getMapId() <= 970042711) ? (!onRestingSpot() ? (isFinalBossDone() ? 3 : 1) : 2) : 0;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -32,14 +40,62 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
if(state) {
|
||||
if(state == 3) {
|
||||
if(cm.getPlayer().getEventInstance() != null) {
|
||||
if(!cm.isLeader()) {
|
||||
cm.sendOk("Your party leader has not spoken to me yet, please wait him/her talk to me.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
cm.getPlayer().getEventInstance().finishPQ();
|
||||
}
|
||||
}
|
||||
|
||||
if(cm.isLeader()) {
|
||||
cm.sendOk("Your party completed such an astounding feat coming this far, #byou have defeated all the bosses#k, congratulations! Now, tell your party I will be warping everyone out and rewarding them as they talk to me.");
|
||||
}
|
||||
else {
|
||||
cm.sendOk("For completing all stages in this event, congratulations! Now you will receive a prize that matches your performance here as I warp you out.");
|
||||
}
|
||||
}
|
||||
else if(state == 2) {
|
||||
if(cm.isLeader()) {
|
||||
if(cm.getPlayer().getEventInstance().isEventTeamTogether()) {
|
||||
cm.sendYesNo("Is your party ready to proceed to the next stages? Walk through the portal if you think you're done, the time is now.. Now, do you guys REALLY want to proceed?");
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Please wait for your party to reassemble before proceeding.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Wait for your party leader to give me the signal to proceed. If you're not feeling too well and want to quit, walk through the portal and you will be transported out, you will receive a prize for coming this far.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if(state == 1) {
|
||||
cm.sendYesNo("Do you wish to abandon this event?");
|
||||
}
|
||||
else {
|
||||
cm.sendSimple("#b<Party Quest: Boss Rush>#k\r\n\r\nWould you like to collaborate with party members to complete the expedition, or are you brave enough to take it on all by yourself? Have your #bparty leader#k talk to me or make yourself a party.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I want to find party members.\r\n#L2#I would like to hear more details.");
|
||||
}
|
||||
} else if (status == 1) {
|
||||
if(state) {
|
||||
if(state == 3) {
|
||||
if(!cm.getPlayer().getEventInstance().giveEventReward(cm.getPlayer(), 6)) {
|
||||
cm.sendOk("Please arrange a slot in all tabs of your inventory beforehand.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.warp(970030000);
|
||||
cm.dispose();
|
||||
} else if(state == 2) {
|
||||
var restSpot = ((cm.getMapId() - 1) % 5) + 1;
|
||||
cm.getPlayer().getEventInstance().warpEventTeam(970030100 + (500 * restSpot)); //oh well, other maps won't be used anyway
|
||||
cm.dispose();
|
||||
} else if(state == 1) {
|
||||
cm.warp(970030000);
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user