New PQ: Boss Rush PQ + Ellin/PiratePQ bug fixes
Introducing Boss Rush PQ. Corrected a few issues regarding rewardings in PiratePQ and EllinPQ and implemented a standardized way to script PQs.
This commit is contained in:
153
scripts/event/BossRushPQ.js
Normal file
153
scripts/event/BossRushPQ.js
Normal file
@@ -0,0 +1,153 @@
|
||||
var isPq = true;
|
||||
var minPlayers = 1, maxPlayers = 6;
|
||||
var minLevel = 1, maxLevel = 200;
|
||||
var entryMap = 970030100;
|
||||
var exitMap = 970030000;
|
||||
var recruitMap = 970030000;
|
||||
var clearMap = 970030000;
|
||||
|
||||
function init() {
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
|
||||
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
|
||||
var eligible = [];
|
||||
var hasLeader = false;
|
||||
|
||||
if(party.size() > 0) {
|
||||
var partyList = party.toArray();
|
||||
|
||||
for(var i = 0; i < party.size(); i++) {
|
||||
var ch = partyList[i];
|
||||
|
||||
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
|
||||
if(ch.isLeader()) hasLeader = true;
|
||||
eligible.push(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
|
||||
return eligible;
|
||||
}
|
||||
|
||||
function setup(level, leaderid) {
|
||||
em.setProperty("state", "1");
|
||||
em.setProperty("leader", "true");
|
||||
var eim = em.newInstance("BossRush" + leaderid);
|
||||
|
||||
em.setProperty("level", level);
|
||||
eim.startEventTimer(45 * 60000); //45 mins
|
||||
return eim;
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function removePlayer(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
}
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < 970030001 || mapid > 970042711) {
|
||||
var party = eim.getPlayers();
|
||||
if (eim.isLeader(player) || party.size() <= minPlayers) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
function playerDead(eim, player) {}
|
||||
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
var party = eim.getPlayers();
|
||||
if (eim.isLeader(player) || party.size() <= minPlayers) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
var party = eim.getPlayers();
|
||||
if (eim.isLeader(player) || party.size() <= minPlayers) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
removePlayer(eim, player);
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
var party = eim.getPlayers();
|
||||
if (party.size() <= minPlayers)
|
||||
end(eim);
|
||||
else
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
function disbandParty(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
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 playerClear(eim, player, toMap) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if(toMap != null) player.changeMap(toMap);
|
||||
else player.changeMap(clearMap, 0);
|
||||
}
|
||||
|
||||
function complete(eim, toMap) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerClear(eim, party.get(i), toMap);
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function clearPQ(eim, toMap) {
|
||||
complete(eim, toMap);
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {
|
||||
em.cancelSchedule();
|
||||
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
@@ -164,7 +164,7 @@ function playerExit(eim, player) {
|
||||
eim.broadcastPlayerMsg(5, "[Expedition] " + player.getName() + " has left the map.");
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if (eim.disposeIfPlayerBelow(0, 0)) {
|
||||
if (eim.disposeIfPlayerBelow(minPlayers, 610030010)) {
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
|
||||
@@ -1,15 +1,37 @@
|
||||
importPackage(Packages.client.inventory);
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var minPlayers = 2;
|
||||
var isPq = true;
|
||||
var minPlayers = 4, maxPlayers = 6;
|
||||
var minLevel = 44, maxLevel = 55;
|
||||
var entryMap = 930000000;
|
||||
var exitMap = 930000800;
|
||||
var recruitMap = 300030100;
|
||||
var clearMap = 930000800;
|
||||
|
||||
function init() {
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
|
||||
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
|
||||
var eligible = [];
|
||||
var hasLeader = false;
|
||||
|
||||
if(party.size() > 0) {
|
||||
var partyList = party.toArray();
|
||||
|
||||
for(var i = 0; i < party.size(); i++) {
|
||||
var ch = partyList[i];
|
||||
|
||||
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel && ch.getJob().getId() / 1000 == 0) { //only adventurers
|
||||
if(ch.isLeader()) hasLeader = true;
|
||||
eligible.push(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
|
||||
return eligible;
|
||||
}
|
||||
|
||||
function setup(level, leaderid) {
|
||||
em.setProperty("state", "1");
|
||||
em.setProperty("leader", "true");
|
||||
@@ -119,8 +141,23 @@ function end(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
end(eim);
|
||||
function playerClear(eim, player, toMap) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if(toMap != null) player.changeMap(toMap);
|
||||
else player.changeMap(clearMap, 0);
|
||||
}
|
||||
|
||||
function complete(eim, toMap) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerClear(eim, party.get(i), toMap);
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function clearPQ(eim, toMap) {
|
||||
complete(eim, toMap);
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
@@ -1,13 +1,37 @@
|
||||
var isPq = true;
|
||||
var minPlayers = 1;
|
||||
var minPlayers = 3, maxPlayers = 6;
|
||||
var minLevel = 55, maxLevel = 100;
|
||||
var entryMap = 925100000;
|
||||
var exitMap = 925100700;
|
||||
var recruitMap = 251010404;
|
||||
var clearMap = 925100600;
|
||||
|
||||
function init() {
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
|
||||
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
|
||||
var eligible = [];
|
||||
var hasLeader = false;
|
||||
|
||||
if(party.size() > 0) {
|
||||
var partyList = party.toArray();
|
||||
|
||||
for(var i = 0; i < party.size(); i++) {
|
||||
var ch = partyList[i];
|
||||
|
||||
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
|
||||
if(ch.isLeader()) hasLeader = true;
|
||||
eligible.push(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
|
||||
return eligible;
|
||||
}
|
||||
|
||||
function setup(level, leaderid) {
|
||||
em.setProperty("state", "1");
|
||||
em.setProperty("leader", "true");
|
||||
@@ -119,7 +143,7 @@ function changedMap(eim, player, mapid) {
|
||||
if (mapid < 925100000 || mapid > 925100500) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if (eim.disposeIfPlayerBelow(0, 0)) {
|
||||
if (eim.disposeIfPlayerBelow(minPlayers, exitMap)) {
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
@@ -129,6 +153,7 @@ function changedMap(eim, player, mapid) {
|
||||
function playerDead(eim, player) {}
|
||||
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
var party = eim.getPlayers();
|
||||
if (eim.isLeader(player) || party.size() <= minPlayers) { // Check for party leader
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++)
|
||||
@@ -188,8 +213,23 @@ function end(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
end(eim);
|
||||
function playerClear(eim, player, toMap) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if(toMap != null) player.changeMap(toMap);
|
||||
else player.changeMap(clearMap, 0);
|
||||
}
|
||||
|
||||
function complete(eim, toMap) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerClear(eim, party.get(i), toMap);
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function clearPQ(eim, toMap) {
|
||||
complete(eim, toMap);
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
* 4th Job Snipe / Concentration
|
||||
*/
|
||||
|
||||
var minPlayers = 1;
|
||||
|
||||
function init() {
|
||||
em.setProperty("started", "false");
|
||||
}
|
||||
@@ -42,7 +44,7 @@ function changedMap(eim, player, mapid) {
|
||||
if (mapid != 910500000) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if (eim.disposeIfPlayerBelow(0, 0)) {
|
||||
if (eim.disposeIfPlayerBelow(minPlayers, 105090200)) {
|
||||
em.setProperty("started", "false");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,5 +19,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -19,5 +19,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -19,5 +19,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -19,5 +19,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -19,5 +19,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -9,5 +9,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -1,99 +1,74 @@
|
||||
/*
|
||||
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 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: Guon
|
||||
* @map: 251010404 - Over the Pirate Ship
|
||||
* @func: Pirate PQ
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
var minLevel = 55;
|
||||
var maxLevel = 100;
|
||||
var minPlayers = 2;
|
||||
var maxPlayers = 6;
|
||||
var minLevel = 1;
|
||||
var maxLevel = 200;
|
||||
var minPartySize = 1;
|
||||
var maxPartySize = 6;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && status == 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
if (cm.getParty() == null) {
|
||||
cm.sendOk("Please come back to me after you've formed a party.");
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (!cm.isLeader()) {
|
||||
cm.sendSimple("You are not the party leader.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
var party = cm.getParty().getMembers();
|
||||
var mapId = cm.getPlayer().getMapId();
|
||||
var next = true;
|
||||
var levelValid = 0;
|
||||
var inMap = 0;
|
||||
if (party.size() < minPlayers || party.size() > maxPlayers)
|
||||
next = false;
|
||||
else {
|
||||
for (var i = 0; i < party.size() && next; i++) {
|
||||
if ((party.get(i).getLevel() >= minLevel) && (party.get(i).getLevel() <= maxLevel)) {
|
||||
levelValid += 1;
|
||||
|
||||
if (party.get(i).getMapId() == mapId)
|
||||
inMap += 1;
|
||||
}
|
||||
}
|
||||
if (levelValid < minPlayers || inMap < minPlayers)
|
||||
next = false;
|
||||
}
|
||||
if (next) {
|
||||
var em = cm.getEventManager("PiratePQ");
|
||||
if (em == null) {
|
||||
cm.sendOk("PiratePQ does not work.");
|
||||
} else {
|
||||
if (mode == 0 && status == 0) {
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
em.startInstance(cm.getParty(),cm.getPlayer().getMap(), 1);
|
||||
party = cm.getParty().getMembers();
|
||||
}
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Your party is not a party of 2 to 6 members between level " + minLevel + " and " + maxLevel + ". Make sure all your members are present and qualified to participate in this quest.");
|
||||
cm.dispose();
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
cm.sendSimple("#b<Party Quest: Pirate PQ>#k\r\n\r\nHelp! My son has been kidnapped and is bound on the hands of the fearful #rLord Pirate#k. I need your help... Would you please assemble or join a team to save him? 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 (selection == 0) {
|
||||
if (cm.getParty() == null) {
|
||||
cm.sendOk("You can participate in the party quest only if you are in a party.");
|
||||
cm.dispose();
|
||||
} else if(!cm.isLeader()) {
|
||||
cm.sendOk("Your party leader must talk to me to start this party quest.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
var em = cm.getEventManager("PiratePQ");
|
||||
if(em == null) {
|
||||
cm.sendOk("The Pirate PQ has encountered an error.");
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
var eli = em.getEligibleParty(cm.getParty());
|
||||
if(eli.size() > 0) {
|
||||
var prop = em.getProperty("state");
|
||||
if (prop != null && prop.equals("0")) {
|
||||
em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if (selection == 1) {
|
||||
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("#b<Party Quest: Pirate PQ>#k\r\nIn this PQ, your mission is to progressively make your way through the ship, taking on all pirates and baddies in your path. Reaching the #rLord Pirate#k, depending on how many great chests you opened on the stages before, the boss will reveal himself even more powerful, so stay alert. Said chests, if opened, gives many extra rewards to your crew, it's worth a shot! Good luck.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.sendOk("PiratePQ does not exist.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -28,68 +28,78 @@ function start() {
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
cm.removeAll(4001117);
|
||||
cm.removeAll(4001120);
|
||||
cm.removeAll(4001121);
|
||||
cm.removeAll(4001122);
|
||||
cm.sendSimple("#b#L0#Get me out of here.#l\r\n#L1#Give me Pirate Hat.#l#k");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (!cm.canHold(4001129, 1)) {
|
||||
cm.sendOk("Please make room in ETC.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
cm.gainItem(4001129, 1);
|
||||
cm.warp(251010404,0);
|
||||
} else { //TODO JUMP
|
||||
if (cm.haveItem(1003267, 1)) {
|
||||
cm.sendOk("You have the best hat.");
|
||||
} else if (cm.haveItem(1002573, 1)) {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1003267,1)) {
|
||||
cm.gainItem(1002573, -1);
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1003267,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && status == 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
cm.removeAll(4001117);
|
||||
cm.removeAll(4001120);
|
||||
cm.removeAll(4001121);
|
||||
cm.removeAll(4001122);
|
||||
cm.sendSimple("Thank you for saving me! How can I help you?\r\n#b#L0#Get me out of here.\r\n#L1#Give me Pirate Hat.");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (!cm.canHold(4001129, 1)) {
|
||||
cm.sendOk("Please make room in ETC.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
cm.gainItem(4001129, 1);
|
||||
cm.warp(251010404,0);
|
||||
} else {
|
||||
if (cm.haveItem(1003267, 1)) {
|
||||
cm.sendOk("You have the best hat.");
|
||||
} else if (cm.haveItem(1002573, 1)) {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1003267,1)) {
|
||||
cm.gainItem(1002573, -1);
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1003267,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room in your EQUIP inventory before receiving the hat.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
} else if (cm.haveItem(1002572, 1)) {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1002573,1)) {
|
||||
cm.gainItem(1002572, -1);
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1002573,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room in your EQUIP inventory before receiving the hat.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("Please make room.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
} else if (cm.haveItem(1002572, 1)) {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1002573,1)) {
|
||||
cm.gainItem(1002572, -1);
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1002573,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
} else {
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1002572,1)) {
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1002572,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
}
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
if (cm.haveItem(4001129, 20)) {
|
||||
if (cm.canHold(1002572,1)) {
|
||||
cm.gainItem(4001129, -20);
|
||||
cm.gainItem(1002572,1);
|
||||
cm.sendOk("I have given you the hat.");
|
||||
} else {
|
||||
cm.sendOk("Please make room in your EQUIP inventory before receiving the hat.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("You need 20 #t4001129# to get the next hat.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,16 +35,16 @@ function action(mode, type, selection) {
|
||||
}
|
||||
switch(cm.getPlayer().getMapId()) {
|
||||
case 925100000:
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must destroy all the monsters guarding it.");
|
||||
cm.dispose();
|
||||
break;
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must destroy all the monsters guarding it.");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100100:
|
||||
var emp = em.getProperty("stage2");
|
||||
if (emp == null) {
|
||||
var emp = em.getProperty("stage2");
|
||||
if (emp == null) {
|
||||
em.setProperty("stage2", "0");
|
||||
emp = "0";
|
||||
}
|
||||
if (emp.equals("0")) {
|
||||
}
|
||||
if (emp.equals("0")) {
|
||||
if (cm.haveItem(4001120,20)) {
|
||||
cm.sendNext("Excellent! Now hunt me 20 Rising Medals.");
|
||||
cm.gainItem(4001120,-20);
|
||||
@@ -54,7 +54,7 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Rookie Medals.");
|
||||
if(cm.countMonster() < 1) cm.getPlayer().getMap().spawnAllMonsterIdFromMapSpawnList(9300114, level, true);
|
||||
}
|
||||
} else if (emp.equals("1")) {
|
||||
} else if (emp.equals("1")) {
|
||||
if (cm.haveItem(4001121,20)) {
|
||||
cm.sendNext("Excellent! Now hunt me 20 Veteran Medals.");
|
||||
cm.gainItem(4001121,-20);
|
||||
@@ -64,7 +64,7 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Rising Medals.");
|
||||
if(cm.countMonster() < 1) cm.getPlayer().getMap().spawnAllMonsterIdFromMapSpawnList(9300115, level, true);
|
||||
}
|
||||
} else if (emp.equals("2")) {
|
||||
} else if (emp.equals("2")) {
|
||||
if (cm.haveItem(4001122,20)) {
|
||||
cm.sendNext("Excellent! Now let us go.");
|
||||
cm.gainItem(4001122,-20);
|
||||
@@ -74,56 +74,56 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("We are heading into the Pirate Ship now! To get in, we must qualify ourselves as noble pirates. Hunt me 20 Veteran Medals.");
|
||||
if(cm.countMonster() < 1) cm.getPlayer().getMap().spawnAllMonsterIdFromMapSpawnList(9300116, level, true);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
cm.sendNext("The next stage has opened. GO!");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100200:
|
||||
case 925100300:
|
||||
cm.sendNext("To assault the pirate ship, we must destroy the guards first.");
|
||||
cm.dispose();
|
||||
break;
|
||||
cm.sendNext("To assault the pirate ship, we must destroy the guards first.");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100201:
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.sendNext("Excellent.");
|
||||
if (em.getProperty("stage2a") == "0") {
|
||||
cm.getMap().setReactorState();
|
||||
em.setProperty("stage2a", "1");
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
cm.sendNext("These bellflowers are in hiding. We must liberate them.");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100301:
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.sendNext("Excellent.");
|
||||
if (em.getProperty("stage3a").equals("0")) {
|
||||
cm.getMap().setReactorState();
|
||||
em.setProperty("stage3a", "1");
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
cm.sendNext("These bellflowers are in hiding. We must liberate them.");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100202:
|
||||
case 925100302:
|
||||
cm.sendNext("These are the Captains and Krus which devote their whole life to Lord Pirate. Kill them as you see fit.");
|
||||
cm.dispose();
|
||||
break;
|
||||
cm.sendNext("These are the Captains and Krus which devote their whole life to Lord Pirate. Kill them as you see fit.");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100400:
|
||||
cm.sendNext("These are the sources of the ship's power. We must seal it by using the Old Metal Keys on the doors!");
|
||||
cm.dispose();
|
||||
break;
|
||||
cm.sendNext("These are the sources of the ship's power. We must seal it by using the Old Metal Keys on the doors!");
|
||||
cm.dispose();
|
||||
break;
|
||||
case 925100500:
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.warpParty(925100600);
|
||||
} else {
|
||||
if (cm.getMap().getMonsters().size() == 0) {
|
||||
cm.clearPQ(925100600);
|
||||
} else {
|
||||
cm.sendNext("Defeat all monsters! Even Lord Pirate's minions!");
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,77 +1,108 @@
|
||||
var status = -1;
|
||||
var minPlayers = 0;
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Ellin
|
||||
* @map: 300030100 - Deep Fairy Forest
|
||||
* @func: Ellin PQ
|
||||
*/
|
||||
|
||||
var minLevel = 44, maxLevel = 170;
|
||||
var status = 0;
|
||||
var minLevel = 1;
|
||||
var maxLevel = 200;
|
||||
var minPartySize = 1;
|
||||
var maxPartySize = 6;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
if (status == 0) {
|
||||
cm.dispose();
|
||||
}
|
||||
status--;
|
||||
}
|
||||
if (status == 0) {
|
||||
cm.sendSimple("#b#L0#Give me Altaire Earrings.#l\r\n#L1#Give me Glittering Altaire Earrings.#l\r\n#L3#Give me Brilliant Altaire Earrings.#l\r\n#L2#Attempt Forest of Poison Haze.#l#k");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (!cm.haveItem(1032060) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either have Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 1){
|
||||
if (cm.haveItem(1032060) && !cm.haveItem(1032061) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,-1);
|
||||
cm.gainItem(1032061, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either don't have Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 1){
|
||||
if (cm.haveItem(1032061) && !cm.haveItem(1032101) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032061,-1);
|
||||
cm.gainItem(1032101, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either don't have Glittering Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 2) {
|
||||
if (cm.getPlayer().getParty() == null || !cm.isLeader()) {
|
||||
cm.sendOk("The leader of the party must be here.");
|
||||
} else {
|
||||
var party = cm.getPlayer().getParty().getMembers();
|
||||
var mapId = cm.getPlayer().getMapId();
|
||||
var next = true;
|
||||
var size = 0;
|
||||
var it = party.iterator();
|
||||
while (it.hasNext()) {
|
||||
var cPlayer = it.next();
|
||||
var ccPlayer = cm.getPlayer().getMap().getCharacterById(cPlayer.getId());
|
||||
if (ccPlayer == null || ccPlayer.getLevel() < minLevel || ccPlayer.getLevel() > maxLevel) {
|
||||
next = false;
|
||||
break;
|
||||
}
|
||||
size += (ccPlayer.isGM() ? 4 : 1);
|
||||
}
|
||||
if (next && size >= minPlayers) {
|
||||
var em = cm.getEventManager("Ellin");
|
||||
if (em == null) {
|
||||
cm.sendOk("Please try again later.");
|
||||
} else {
|
||||
em.startInstance(cm.getPlayer().getParty(), cm.getPlayer().getMap(), 1); //common level only
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("All 2+ members of your party must be here and between level " + minLevel + " and " + maxLevel + ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && status == 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
cm.sendSimple("#b<Party Quest: Ellin PQ>#k\r\n\r\nWould you like to assemble or join a team to solve the puzzles of the #bForest of Poison Haze#k? 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.\r\n#L3#I would like to reclaim a prize.");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (cm.getParty() == null) {
|
||||
cm.sendOk("You can participate in the party quest only if you are in a party.");
|
||||
cm.dispose();
|
||||
} else if(!cm.isLeader()) {
|
||||
cm.sendOk("Your party leader must talk to me to start this party quest.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
var em = cm.getEventManager("Ellin");
|
||||
if(em == null) {
|
||||
cm.sendOk("The Ellin PQ has encountered an error.");
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
var eli = em.getEligibleParty(cm.getParty());
|
||||
if(eli.size() > 0) {
|
||||
var prop = em.getProperty("state");
|
||||
if (prop != null && prop.equals("0")) {
|
||||
em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if (selection == 1) {
|
||||
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
|
||||
cm.dispose();
|
||||
} else if (selection == 2) {
|
||||
cm.sendOk("#b<Party Quest: Ellin PQ>#k\r\nIn this PQ, your mission is to progressively make your way through the woods, taking on all baddies in your path, solving many puzzles you encounter and rallying yourselves to take the best of teamwork to overcome time limits and powerful creatures. Clearing the final boss, your team have a chance to obtain a marble that, #bwhen dropped by the fountain at the exit map#k, will guarantee the team extra prizes. Good luck.");
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
cm.sendSimple("So, what prize do you want to obtain?\r\n#b#L0#Give me Altaire Earrings.\r\n#L1#Give me Glittering Altaire Earrings.\r\n#L2#Give me Brilliant Altaire Earrings");
|
||||
}
|
||||
} else if (status == 2) {
|
||||
if (selection == 0) {
|
||||
if (!cm.haveItem(1032060) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,1);
|
||||
cm.gainItem(4001198, -10);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("You either have Altair Earrings already or you do not have 10 Altair Fragments.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (selection == 1){
|
||||
if (cm.haveItem(1032060) && !cm.haveItem(1032061) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,-1);
|
||||
cm.gainItem(1032061, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("You either don't have Altair Earrings already or you do not have 10 Altair Fragments.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (selection == 2){
|
||||
if (cm.haveItem(1032061) && !cm.haveItem(1032101) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032061,-1);
|
||||
cm.gainItem(1032101, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("You either don't have Glittering Altair Earrings already or you do not have 10 Altair Fragments.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
87
scripts/npc/world0/9000037.js
Normal file
87
scripts/npc/world0/9000037.js
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Agent Meow
|
||||
* @map: 970030000 - Hidden Street - Exclusive Training Center
|
||||
* @func: Boss Rush PQ
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
var minLevel = 1;
|
||||
var maxLevel = 200;
|
||||
var minPartySize = 1;
|
||||
var maxPartySize = 6;
|
||||
var state;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
state = (cm.getMapId() >= 970030001 && cm.getMapId() <= 970042711) ? 1 : 0;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && status == 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
if(state) {
|
||||
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) {
|
||||
cm.warp(970030000);
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
if (selection == 0) {
|
||||
if (cm.getParty() == null) {
|
||||
cm.sendOk("You can participate in the party quest only if you are in a party.");
|
||||
cm.dispose();
|
||||
} else if(!cm.isLeader()) {
|
||||
cm.sendOk("Your party leader must talk to me to start this party quest.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
var em = cm.getEventManager("BossRushPQ");
|
||||
if(em == null) {
|
||||
cm.sendOk("The Boss Rush PQ has encountered an error.");
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
var eli = em.getEligibleParty(cm.getParty());
|
||||
if(eli.size() > 0) {
|
||||
var prop = em.getProperty("state");
|
||||
if (prop != null && prop.equals("0")) {
|
||||
em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if (selection == 1) {
|
||||
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("#b<Party Quest: Boss Rush PQ>#k\r\nBrave adventurers from all over the places travels here to test their skills and abilities in combat, as they face even more powerful bosses from MapleStory. Join forces with fellow adventurers or face all the burden by yourself and receive all the glory, it is up to you. REWARDS are given accordingly to how far the adventurers reach and extra prizes may are given to a random member of the party, all attributed at the end of an expedition.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
58
scripts/npc/world0/9010021.js
Normal file
58
scripts/npc/world0/9010021.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
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/>.
|
||||
*/
|
||||
/* 9010021 - Wolf Spirit Ryko
|
||||
BossRushPQ recruiter
|
||||
@author Ronan
|
||||
*/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode < 0)
|
||||
cm.dispose();
|
||||
else {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if (status == 0) {
|
||||
cm.sendNext("Heed me, human. I hail from a distant plane and came to this world to take a glimpse on the power level of the best of the dwellers of this world.");
|
||||
} else if(status == 1) {
|
||||
cm.sendNext("Oh, don't get me wrong, our civilization are of the type that makes researches for the sake of science, we have no regards for domination or disturbances whatsoever.");
|
||||
} else if(status == 2) {
|
||||
cm.sendNext("These contests involve #bsequential boss fights#k, with some resting spots between some sections. This will require some strategy time and enough supplies at hand, as these are not common fights.");
|
||||
} else if(status == 3) {
|
||||
cm.sendAcceptDecline("If you feel you are powerful enough, you can join others like you at where we are hosting the contests of power. ... So, what is your decision? Will you come to where the contests are being held right now?");
|
||||
} else if(status == 4) {
|
||||
cm.sendOk("Very well. Remember, there you can assemble a team or take on the fightings on your own, it's up to you. Good luck!");
|
||||
} else if(status == 5) {
|
||||
cm.warp(970030000);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,5 +258,5 @@ function randX() {
|
||||
|
||||
function spawnMob(id, x, y, map) {
|
||||
var mob = Packages.server.life.MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new Packages.java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new Packages.java.awt.Point(x, y));
|
||||
}
|
||||
@@ -15,11 +15,11 @@ function enter(pi) {
|
||||
|
||||
boss.changeDifficulty(level, true);
|
||||
|
||||
pi.getMap(925100500).spawnMonster(boss);
|
||||
pi.getMap(925100500).spawnMonsterOnGroundBelow(boss, new java.awt.Point(777, 140));
|
||||
pi.warpParty(925100500); //next
|
||||
return(true);
|
||||
} else {
|
||||
pi.playerMessage(5, "The leader must be here");
|
||||
pi.playerMessage(5, "The leader must be here.");
|
||||
return(false);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -42,5 +42,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -38,5 +38,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -44,5 +44,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -1,9 +1,17 @@
|
||||
function enter(pi) {
|
||||
if ((pi.getMap().getMonsters().size() == 0 || pi.getMap().getMonsterById(9300183) != null) && (pi.getMap().getReactorByName("") == null || pi.getMap().getReactorByName("").getState() == 1)) {
|
||||
pi.warp(930000800,0);
|
||||
return true;
|
||||
} else {
|
||||
pi.playerMessage(5, "Please eliminate the Poison Golem.");
|
||||
if ((pi.getMap().getMonsters().size() == 0 || pi.getMap().getMonsterById(9300183) != null) && (pi.getMap().getReactorByName("") == null || pi.getMap().getReactorByName("").getState() == 1)) {
|
||||
if(pi.isLeader()) {
|
||||
pi.clearPQ(930000800);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
pi.playerMessage(5, "Wait for the leader to pass through the portal.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
pi.playerMessage(5, "Please eliminate the Poison Golem.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
scripts/portal/raid_stage.js
Normal file
41
scripts/portal/raid_stage.js
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
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 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
BossRushPQ - Next Stage
|
||||
@author Ronan
|
||||
*/
|
||||
|
||||
function enter(pi) {
|
||||
if(pi.getMap().getMonsters().size() == 0) {
|
||||
var nextStage;
|
||||
|
||||
if(pi.getMapId() % 5 == 0) nextStage = pi.getMapId() + 100;
|
||||
else nextStage = 970030001 + (pi.getMapId() - 970030100 / 500);
|
||||
|
||||
pi.warp(nextStage);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
pi.getPlayer().dropMessage(6, "Defeat all monsters before proceeding to the next stage.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
4
scripts/portal/raidout.js
Normal file
4
scripts/portal/raidout.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function enter(pi) {
|
||||
pi.warp(100000000,0);
|
||||
return true;
|
||||
}
|
||||
@@ -74,5 +74,5 @@ function spawnMob(x, y, id, map) {
|
||||
return;
|
||||
|
||||
var mob = MapleLifeFactory.getMonster(id);
|
||||
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
|
||||
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(x, y));
|
||||
}
|
||||
@@ -25,9 +25,9 @@
|
||||
*/
|
||||
|
||||
function act() {
|
||||
var eim = rm.getPlayer().getEventInstance();
|
||||
var now = parseInt(eim.getProperty("openedChests"));
|
||||
var em = rm.getPlayer().getEventInstance().getEm();
|
||||
var now = parseInt(em.getProperty("openedChests"));
|
||||
var nextNum = now + 1;
|
||||
eim.setProperty("openedChests", nextNum);
|
||||
em.setProperty("openedChests", nextNum.toString());
|
||||
rm.dropItems(true, 1, 50, 100, 15);
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
function act() {
|
||||
rm.givePartyExp(52000, rm.getPlayer().getPartyMembers());
|
||||
}
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @reactor: Water Fountain
|
||||
* @map: 930000800 - Forest of Poison Haze - Outer Forest Exit
|
||||
* @func: Water Fountain
|
||||
*/
|
||||
|
||||
function hit() {
|
||||
var players = rm.getMap().getAllPlayers().toArray();
|
||||
|
||||
for(var i = 0; i < players.length; i++) {
|
||||
rm.giveCharacterExp(52000, players[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function act() {} //do nothing
|
||||
@@ -11,7 +11,7 @@ function act() {
|
||||
rm.mapMessage(6, "Protect the Moon Bunny!!!");
|
||||
var map = em.getMapInstance(rm.getReactor().getMap().getId());
|
||||
map.allowSummonState(true);
|
||||
map.spawnMonsterOnGroudBelow(9300061, -183, -433);
|
||||
map.spawnMonsterOnGroundBelow(9300061, -183, -433);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ function act() {
|
||||
rm.mapMessage(6, "Protect the Moon Bunny!!!");
|
||||
var map = em.getMapInstance(rm.getReactor().getMap().getId());
|
||||
map.allowSummonState(true);
|
||||
map.spawnMonsterOnGroudBelow(9300061, -183, -433);
|
||||
map.spawnMonsterOnGroundBelow(9300061, -183, -433);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ function act() {
|
||||
rm.mapMessage(6, "Protect the Moon Bunny!!!");
|
||||
var map = em.getMapInstance(rm.getReactor().getMap().getId());
|
||||
map.allowSummonState(true);
|
||||
map.spawnMonsterOnGroudBelow(9300061, -183, -433);
|
||||
map.spawnMonsterOnGroundBelow(9300061, -183, -433);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ function act() {
|
||||
rm.mapMessage(6, "Protect the Moon Bunny!!!");
|
||||
var map = em.getMapInstance(rm.getReactor().getMap().getId());
|
||||
map.allowSummonState(true);
|
||||
map.spawnMonsterOnGroudBelow(9300061, -183, -433);
|
||||
map.spawnMonsterOnGroundBelow(9300061, -183, -433);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ function act() {
|
||||
rm.mapMessage(6, "Protect the Moon Bunny!!!");
|
||||
var map = em.getMapInstance(rm.getReactor().getMap().getId());
|
||||
map.allowSummonState(true);
|
||||
map.spawnMonsterOnGroudBelow(9300061, -183, -433);
|
||||
map.spawnMonsterOnGroundBelow(9300061, -183, -433);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ function act() {
|
||||
rm.mapMessage(6, "Protect the Moon Bunny!!!");
|
||||
var map = em.getMapInstance(rm.getReactor().getMap().getId());
|
||||
map.allowSummonState(true);
|
||||
map.spawnMonsterOnGroudBelow(9300061, -183, -433);
|
||||
map.spawnMonsterOnGroundBelow(9300061, -183, -433);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user