Ludibrium PQ + MapleIdRetriever

Implemented LPQ. New application tool that realizes fetches by names and
returns respective ids, over all items depicted in the GM handbook.
This commit is contained in:
ronancpl
2017-05-13 15:24:02 -03:00
parent ed6121dd5f
commit b26469301d
94 changed files with 36729 additions and 1186 deletions

View File

@@ -1,6 +1,6 @@
var isPq = true;
var minPlayers = 4, maxPlayers = 6;
var minLevel = 21, maxLevel = 30;
var minPlayers = 1, maxPlayers = 6;
var minLevel = 21, maxLevel = 200;
var entryMap = 103000800;
var exitMap = 103000890;
var recruitMap = 103000000;

View File

@@ -1,191 +1,224 @@
/*
* 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>
var isPq = true;
var minPlayers = 1, maxPlayers = 6;
var minLevel = 1, maxLevel = 200;
var entryMap = 922010100;
var exitMap = 922010000;
var recruitMap = 221024500;
var clearMap = 922011000;
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.
var minMapId = 922010100;
var maxMapId = 922011100;
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 Raz
*
* Ludi Maze PQ
*/
var exitMap;
var instanceId;
var finishMap;
var bonusMap;
var bonusTime = 60;//1 Minute
var pqTime = 3600;//60 Minutes
var lobbyRange = [0, 0];
function init() {
instanceId = 1;
exitMap = em.getChannelServer().getMapFactory().getMap(922010000);//Exit
setEventRequirements();
}
function monsterValue(eim, mobId) {
return 1;
function setLobbyRange() {
return lobbyRange;
}
function setup() {
var instanceName = "LudiPQ" + instanceId;
var eim = em.newInstance(instanceName);
var eventTime = 60 * (1000 * 60); // 60 mins.
instanceId++;
em.schedule("timeOut", eim, eventTime); // invokes "timeOut" in how ever many seconds.
eim.startEventTimer(eventTime); // Sends a clock packet and tags a timer to the players.
//eim.schedule("respawn", 5000);
var stage1Portal = eim.getMapInstance(922010100).getPortal("next00");
stage1Portal.setScriptName("lpq1");
var stage2Portal = eim.getMapInstance(922010200).getPortal("next00");
stage2Portal.setScriptName("lpq2");
var stage3Portal = eim.getMapInstance(922010300).getPortal("next00");
stage3Portal.setScriptName("lpq3");
var stage4Portal = eim.getMapInstance(922010400).getPortal("next00");
stage4Portal.setScriptName("lpq4");
var stage5Portal = eim.getMapInstance(922010500).getPortal("next00");
stage5Portal.setScriptName("lpq5");
var stage6Portal = eim.getMapInstance(922010600).getPortal("next00");
stage6Portal.setScriptName("lpq6");
var stage7Portal = eim.getMapInstance(922010700).getPortal("next00");
stage7Portal.setScriptName("lpq7");
var stage8Portal = eim.getMapInstance(922010800).getPortal("next00");
stage8Portal.setScriptName("lpq8");
return eim;
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [4001022, 4001023];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [2040602, 2040802, 2040002, 2040402, 2040505, 2040502, 2040601, 2044501, 2044701, 2044601, 2041019, 2041016, 2041022, 2041013, 2041007, 2043301, 2040301, 2040801, 2040001, 2040004, 2040504, 2040501, 2040513, 2043101, 2044201, 2044401, 2040701, 2044301, 2043801, 2040401, 2043701, 2040803, 2000003, 2000002, 2000004, 2000006, 2000005, 2022000, 2001001, 2001002, 2022003, 2001000, 2020014, 2020015, 4003000, 1102003, 1102004, 1102000, 1102002, 1102001, 1102011, 1102012, 1102013, 1102014, 1032011, 1032012, 1032013, 1032002, 1032008, 1032011, 2070011, 4010003, 4010000, 4010006, 4010002, 4010005, 4010004, 4010001, 4020001, 4020002, 4020008, 4020007, 4020003, 4020000, 4020004, 4020005, 4020006];
itemQty = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 85, 85, 10, 60, 2, 20, 15, 15, 20, 15, 10, 5, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 6, 10, 10, 10, 10, 10, 10, 4, 4, 10, 10, 10, 10, 10];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = [210, 2520, 2940, 3360, 3770, 0, 4620, 5040, 5950]; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
}
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, lobbyid) {
var eim = em.newInstance("Ludi" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("statusStg1", -1);
eim.setProperty("statusStg2", -1);
eim.setProperty("statusStg3", -1);
eim.setProperty("statusStg4", -1);
eim.setProperty("statusStg5", -1);
eim.setProperty("statusStg6", -1);
eim.setProperty("statusStg7", -1);
eim.setProperty("statusStg8", -1);
eim.setProperty("statusStg9", -1);
eim.setInstanceMap(922010100).resetPQ(level);
eim.setInstanceMap(922010200).resetPQ(level);
eim.setInstanceMap(922010201).resetPQ(level);
eim.setInstanceMap(922010300).resetPQ(level);
eim.setInstanceMap(922010400).resetPQ(level);
eim.setInstanceMap(922010401).resetPQ(level);
eim.setInstanceMap(922010402).resetPQ(level);
eim.setInstanceMap(922010403).resetPQ(level);
eim.setInstanceMap(922010404).resetPQ(level);
eim.setInstanceMap(922010405).resetPQ(level);
eim.setInstanceMap(922010500).resetPQ(level);
eim.setInstanceMap(922010500).resetPQ(level);
eim.setInstanceMap(922010501).resetPQ(level);
eim.setInstanceMap(922010502).resetPQ(level);
eim.setInstanceMap(922010503).resetPQ(level);
eim.setInstanceMap(922010504).resetPQ(level);
eim.setInstanceMap(922010505).resetPQ(level);
eim.setInstanceMap(922010506).resetPQ(level);
eim.setInstanceMap(922010600).resetPQ(level);
eim.setInstanceMap(922010700).resetPQ(level);
eim.setInstanceMap(922010800).resetPQ(level);
eim.setInstanceMap(922010900).resetPQ(level);
eim.setInstanceMap(922011000).resetPQ(level);
eim.setInstanceMap(922011100).resetPQ(level);
respawnStages(eim);
eim.startEventTimer(45 * 60000); //45 mins
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function respawnStages(eim) {}
function playerEntry(eim, player) {
var map0 = eim.getMapInstance(922010100);
player.changeMap(map0, map0.getPortal(0));
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function playerDead(eim, player) {
if (player.isAlive()) { //don't trigger on death, trigger on manual revive
if (eim.isLeader(player)) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
function scheduledTimeout(eim) {
if(eim.getProperty("9stageclear") != null) {
var curStage = 922011000, toStage = 922011100;
eim.warpEventTeam(curStage, toStage);
}
else {
end(eim);
}
else
playerExit(eim, player);
}
}
function playerDisconnected(eim, player) {
if (eim.isLeader(player)) { //check for party leader
//boot whole party and end
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();
}
else
removePlayer(eim, player);
}
function leftParty(eim, player) {
playerExit(eim, player);
}
function disbandParty(eim) {
//boot whole party and end
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function OpenLPQ() {
em.setProperty("LPQOpen", "true");
}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function playerFinish(eim, player) {
eim.unregisterPlayer(player);
var map = eim.getMapInstance(922011100);
player.changeMap(map, map.getPortal(0));
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);
}
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
function changedLeader(eim, leader) {
var mapid = leader.getMapId();
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
end(eim);
}
}
function playerDead(eim, player) {}
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 playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function leftParty(eim, player) {
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(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 giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerFinish(eim, party.get(i));
eim.dispose();
eim.stopEventTimer();
eim.setEventCleared();
eim.startEventTimer(1 * 60000);
eim.warpEventTeam(922011000);
}
function monsterKilled(mob, eim) {}
function allMonstersDead(eim) {}
function dispose() {
em.schedule("OpenLPQ", 10000); // 10 seconds ?
}
function cancelSchedule() {}
function cancelSchedule() {
}
function dispose(eim) {}
function timeOut(eim) {
if (eim != null) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext())
playerExit(eim, pIter.next());
}
eim.dispose();
}
}
function finishBonus(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
if(party.get(i).getMap().getId() == 922011000)
playerFinish(eim, party.get(i));
}
function startBonus(eim) {
var bonusMap = eim.getMapInstance(922011000);
var party = eim.getPlayers();
em.schedule("finishBonus", eim, 60000); // invokes "timeOut" in how ever many seconds.
eim.startEventTimer(60000);
for (var i = 0; i < party.size(); i++) {
if(party.get(i).getMap().getId() == 922010900) {
party.get(i).changeMap(bonusMap, bonusMap.getPortal(0));
}
}
}

View File

@@ -1,17 +1,12 @@
/**
* @author: Eric
* @author: Eric, Ronan
* @npc: Red Sign
* @map: 101st Floor Eos Tower (221024500)
* @func: Ludi PQ
*/
var status = 0;
var minLevel = 35; // according to Nexon it's 30, but it's actually a 50 requirement.
var maxLevel = 200;
var minPartySize = 5;
var maxPartySize = 6;
var brokenGlassesCount = 0; // code custom quest data is on the todo list
var em = null;
function start() {
status = -1;
@@ -19,92 +14,60 @@ function start() {
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else if (mode == 0) {
if (status == 1) {
cm.sendNext((cm.getParty() == null ? "Remember that using the Party Search function (Hotkey O) will allow you to find a party anytime, anywhere." : "Send an invite to friends nearby. Remember that using the Party Search function (Hotkey O) will allow you to find a party anytime, anywhere."));
cm.dispose();
return;
} else {
status--;
}
}
if (status == 0) {
cm.sendSimple("#e<Party Quest: Dimensional Schism>#n\r\n\r\nYou can't go any higher because of the extremely dangerous creatures above. Would you like to collaborate with party members to complete the quest? If so, please have your #bparty leader#k talk to me.#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 want to receive the Broken Glasses.\r\n#L3#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();
return;
} else if (!cm.getPlayer().isGM() && (cm.getParty().getMembers().size() < minPartySize || !cm.isLeader())) {
cm.sendOk("You cannot participate in the quest, because you do not have at least 3 party members.");
cm.dispose();
return;
} else {
// Check if all party members are within PQ levels
var party = cm.getParty().getMembers();
var mapId = cm.getMapId();
var next = true;
var levelValid = 0;
var inMap = 0;
var it = party.iterator();
while (it.hasNext()) {
var cPlayer = it.next();
if ((cPlayer.getLevel() >= minLevel) && (cPlayer.getLevel() <= maxLevel)) {
levelValid += 1;
} else {
next = false;
}
if (cPlayer.getMapId() == mapId) {
inMap += (cPlayer.getJobId() == 910 ? 6 : 1);
}
}
if (party.size() > maxPartySize || inMap < minPartySize) {
next = false;
}
if(cm.getPlayer().isGM())
next = true;
if (next) {
var em = cm.getEventManager("LudiPQ");
if (em == null) {
cm.sendOk("The Ludibrium PQ has encountered an error. Please report this on the forums, and with a screenshot.");
} else {
var prop = em.getProperty("LPQOpen");
if (prop == null || prop.equals("true")) {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap())) {
cm.sendOk("A party in your name is already registered in this event.");
cm.dispose();
return;
}
cm.removeAll(4001022);
cm.removeAll(4001023);
cm.dispose();
return;
} 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.");
}
}
} else {
cm.sendYesNo("You cannot participate in the quest, because you do not have at least 3 party members. If you're having trouble finding party members, try Party Search.");
}
}
} 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) { // todo
cm.sendNext("I am offering 1 #i1022073:# #bBroken Glasses#k for every 20 times you help me. If you help me #b" + brokenGlassesCount + " more times, you can receive Broken Glasses.#k");
cm.dispose();
} else {
cm.sendOk("#e<Party Quest: Dimensional Schism>#n\r\nA Dimensional Schism has appeared in #b#m220000000#!#k We desperately need brave adventurers who can defeat the intruding monsters. Please, party with some dependable allies to save #m220000000#! You must pass through various stages by defeating monsters and solving quizzes, and ultimately defeat #r#o9300012##k.\r\n - #eLevel#n: 30 or above #r(Recommended Level: 60 ~ 69)#k\r\n - #eTime Limit#n: 20 min\r\n - #eNumber of Players#n: 3 to 6\r\n - #eReward#n: #i1022073:# Broken Glasses #b(obtained every 20 time(s) you participate)#k\r\n Various Use, Etc, and Equip items");
cm.dispose();
}
} else if (status == 2) {
if (mode > 0) {
//cm.findParty();
}
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) {
em = cm.getEventManager("LudiPQ");
if(em == null) {
cm.sendOk("The Ludibrium PQ has encountered an error.");
cm.dispose();
return;
}
cm.sendSimple("#e#b<Party Quest: Dimensional Schism>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nYou can't go any higher because of the extremely dangerous creatures above. Would you like to collaborate with party members to complete the quest? If so, please have your #bparty leader#k talk to me.#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 eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(0, cm.getParty(), cm.getPlayer().getMap(), 1)) {
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.");
}
/*
else {
cm.gainItem(4001022, 200);
}
*/
}
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("#e#b<Party Quest: Dimensional Schism>#k#n\r\nA Dimensional Schism has appeared in #b#m220000000#!#k We desperately need brave adventurers who can defeat the intruding monsters. Please, party with some dependable allies to save #m220000000#! You must pass through various stages by defeating monsters and solving quizzes, and ultimately defeat #r#o9300012##k.");
cm.dispose();
}
}
}
}

View File

@@ -19,43 +19,38 @@
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/>.
*/
/* NPC Base
Map Name (Map ID)
Extra NPC info.
/* @author: Ronan
*
* Arturo
Abandoned Tower <Determine to Adventure> (922011100)
Gives LudiPQ Reward.
*/
var prizes = Array(2040602, 2040602, 2040602, 2040601, 2040601, 2040601, 2040601, 2040802, 2040002, 2040402,
2040505, 2040505, 2040505, 2040505, 2040502, 2044501, 2044601, 2044701,
2041019, 2041016, 2041022, 2041013, 2041007, 2043301, 2040301, 2040801, 2040001, 2040504,
2040501, 2040513, 2043101, 2044001, 2044401, 2040701, 2044301, 2043801, 2043701, 2040401,
2040803, 2040804, 1102000, 1102001, 1102003, 1102004, 1102011, 1102012, 1102013, 1102014);
var item;
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 && mode == 1) {
cm.sendNext("Congratulations on sealing the dimensional crack!");
} else if(status == 1) {
if(cm.canHold(1102003) && cm.canHold(2040602)) {
item = prizes[Math.floor(Math.random() * prizes.length)];
cm.sendNextPrev("For all of your hard work, I have a gift for you! Here take this prize.");
} else {
cm.sendOk("It seems you don't have a free slot in your #rEquip#k and #rUse#k inventories. Please make room and try again.");
cm.dispose();
}
} else if(status == 2) {
cm.gainItem(item, 1, true);
cm.warp(221024500);
}
}
if (mode < 0)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0 && mode == 1) {
cm.sendNext("Congratulations on sealing the dimensional crack! For all of your hard work, I have a gift for you! Here take this prize.");
} else if(status == 1) {
var eim = cm.getEventInstance();
if(!eim.giveEventReward(cm.getPlayer())) {
cm.sendNext("It seems you don't have a free slot in your #rEquip#k, #rUse#k or #rEtc#k inventories. Please make room and try again.");
} else {
cm.warp(221024500);
}
cm.dispose();
}
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@ Author : Raz, Ronan
@
@ NPC = Red Balloon
@ Map = Hidden-Street <Stage 1>
@@ -29,86 +29,64 @@
@
*/
importPackage(Packages.tools);
var status = 0;
var party;
var preamble;
var gaveItems;
var curMap, stage;
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function clearStage(stage, eim, curMap) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.linkToNextStage(stage, "lpq", curMap); //opens the portal to the next map
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();//ExitChat
else if (mode == 0)
cm.dispose();//No
else{ //Regular Talk
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
var nthtext = "1st";
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendNext("Hi. Welcome to the " + nthtext + " stage.");
eim.setProperty("leader" + nthtext + "preamble","done");
cm.dispose();
}else{
if(!isLeader()){
if(gaveItems == null){
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me");
cm.dispose();
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}else{
if(gaveItems == null){
if(cm.getPlayer().getMap().getCharacters().size() != eim.getPlayers().size()) {
cm.sendOk("Please wait for all of your party members to get here.");
cm.dispose();
} else if(cm.itemQuantity(4001022) >= 25){
cm.sendOk("Good job! you have collected all 25 #b#t4001022#'s#k");
}else{
cm.sendOk("Sorry you don't have all 25 #b#t4001022#'s#k");
cm.dispose();
}
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}
}
}else if (status == 1){
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
cm.removeAll(4001022);
cm.givePartyExp("LudiPQ1st");
eim.setProperty("1stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
if (mode == -1) {
cm.dispose();
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bstage " + stage + "#k. Collect 25 #t4001022#'s scattered across the map, then talk to me.");
eim.setProperty("statusStg" + stage, 0);
}
else { // check stage completion
if (cm.haveItem(4001022, 25)) {
cm.sendOk("Good job! you have collected all 25 #b#t4001022#'s.#k");
cm.gainItem(4001022, -25);
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
} else {
cm.sendNext("Sorry you don't have all 25 #b#t4001022#'s.#k");
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}
}
}
function isLeader(){
if(cm.getParty() == null){
return false;
}else{
return cm.isLeader();
}
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@ Author : Raz, Ronan
@
@ NPC = Orange Balloon
@ Map = Hidden-Street <Stage 2>
@@ -29,83 +29,64 @@
@
*/
importPackage(Packages.tools);
var status = 0;
var party;
var preamble;
var gaveItems;
var curMap, stage;
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function clearStage(stage, eim, curMap) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.linkToNextStage(stage, "lpq", curMap); //opens the portal to the next map
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();//ExitChat
}else if (mode == 0){
cm.dispose();//No
}else{ //Regular Talk
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
var nthtext = "2nd";
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendNext("Hi. Welcome to the " + nthtext + " stage.");
eim.setProperty("leader" + nthtext + "preamble","done");
cm.dispose();
}else{
if(!isLeader()){
if(gaveItems == null){
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me");
cm.dispose();
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}else{
if(gaveItems == null){
if(cm.getPlayer().getMap().getCharacters().size() != eim.getPlayers().size()) {
cm.sendOk("Please wait for all of your party members to get here.");
cm.dispose();
} else if(cm.itemQuantity(4001022) >= 15){
cm.sendOk("Good job! you have collected all 15 #b#t4001022#'s#k");
}else{
cm.sendOk("Sorry you don't have all 15 #b#t4001022#'s#k");
cm.dispose();
}
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}
}
}else if (status == 1){
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
cm.removeAll(4001022);
cm.givePartyExp("LudiPQ2nd");
eim.setProperty("2stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
if (mode == -1) {
cm.dispose();
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bstage " + stage + "#k. Collect 15 #t4001022#'s scattered across the map, then talk to me.");
eim.setProperty("statusStg" + stage, 0);
}
else { // check stage completion
if (cm.haveItem(4001022, 15)) {
cm.sendOk("Good job! you have collected all 15 #b#t4001022#'s.#k");
cm.gainItem(4001022, -15);
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
} else {
cm.sendNext("Sorry you don't have all 15 #b#t4001022#'s.#k");
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}
}
}
function isLeader(){
if(cm.getParty() == null)
return false;
else
return cm.isLeader();
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@ Author : Raz, Ronan
@
@ NPC = Yellow Balloon
@ Map = Hidden-Street <Stage 3>
@@ -29,84 +29,64 @@
@
*/
importPackage(Packages.tools);
var status = 0;
var party;
var preamble;
var gaveItems;
var curMap, stage;
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();//ExitChat
} else if (mode == 0) {
cm.dispose();//No
} else {//Regular Talk
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
var nthtext = "3rd";
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendNext("Hi. Welcome to the " + nthtext + " stage.");
eim.setProperty("leader" + nthtext + "preamble","done");
cm.dispose();
} else {
if (!isLeader()) {
if (gaveItems == null) {
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me");
cm.dispose();
} else {
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
} else {
if (gaveItems == null) {
if(cm.getPlayer().getMap().getCharacters().size() != eim.getPlayers().size()) {
cm.sendOk("Please wait for all of your party members to get here.");
cm.dispose();
} else if (cm.itemQuantity(4001022) >= 32) {
cm.sendOk("Good job! you have collected all 32 #b#t4001022#'s#k");
} else {
cm.sendOk("Sorry you don't have all 32 #b#t4001022#'s#k");
cm.dispose();
}
} else {
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}
}
} else if (status == 1) {
cm.sendOk("You may continue to the next stage!");
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
cm.removeAll(4001022);
cm.givePartyExp("LudiPQ3rd");
eim.setProperty("3stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
cm.dispose();
}
}
function clearStage(stage, eim, curMap) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.linkToNextStage(stage, "lpq", curMap); //opens the portal to the next map
}
function isLeader(){
if (cm.getParty() == null)
return false;
else
return cm.isLeader();
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bstage " + stage + "#k. Collect 32 #t4001022#'s scattered across the map, then talk to me.");
eim.setProperty("statusStg" + stage, 0);
}
else { // check stage completion
if (cm.haveItem(4001022, 32)) {
cm.sendOk("Good job! you have collected all 32 #b#t4001022#'s.#k");
cm.gainItem(4001022, -32);
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
} else {
cm.sendNext("Sorry you don't have all 32 #b#t4001022#'s.#k");
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@ Author : Raz, Ronan
@
@ NPC = Lime Balloon
@ Map = Hidden-Street <Stage 4>
@@ -29,86 +29,64 @@
@
*/
importPackage(Packages.tools);
var status = 0;
var party;
var preamble;
var gaveItems;
var curMap, stage;
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function clearStage(stage, eim, curMap) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.linkToNextStage(stage, "lpq", curMap); //opens the portal to the next map
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();//ExitChat
}else if (mode == 0){
cm.dispose();//No
}else{ //Regular Talk
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
var nthtext = "4th";
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendNext("Hi. Welcome to the " + nthtext + " stage.");
eim.setProperty("leader" + nthtext + "preamble","done");
cm.dispose();
}else{
if(!isLeader()){
if(gaveItems == null){
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me");
cm.dispose();
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}else{
if(gaveItems == null){
if(cm.getPlayer().getMap().getCharacters().size() != eim.getPlayers().size()) {
cm.sendOk("Please wait for all of your party members to get here.");
cm.dispose();
} else if(cm.itemQuantity(4001022) >= 6){
cm.sendOk("Good job! you have collected all 6 #b#t4001022#'s#k");
}else{
cm.sendOk("Sorry you don't have all 6 #b#t4001022#'s#k");
cm.dispose();
}
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}
}
}else if (status == 1){
cm.sendOk("You may continue to the next stage!");
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
cm.removeAll(4001022);
cm.givePartyExp("LudiPQ4th");
eim.setProperty("4stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
if (mode == -1) {
cm.dispose();
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bstage " + stage + "#k. On this stage, several creatures are hiding in the shadows of the inner parts of this tower. Some of them cannot be beaten by physical means, so magical attacks are required to do the job, whereas others work the other way around. Get me 6 #t4001022#'s this time.");
eim.setProperty("statusStg" + stage, 0);
}
else { // check stage completion
if (cm.haveItem(4001022, 6)) {
cm.sendOk("Good job! you have collected all 6 #b#t4001022#'s.#k");
cm.gainItem(4001022, -6);
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
} else {
cm.sendNext("Sorry you don't have all 6 #b#t4001022#'s.#k");
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}
}
}
function isLeader(){
if(cm.getParty() == null){
return false;
}else{
return cm.isLeader();
}
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@ Author : Raz, Ronan
@
@ NPC = Green Balloon
@ Map = Hidden-Street <Stage 5>
@@ -28,89 +28,65 @@
@ Function = LPQ - 5th Stage
@
*/
importPackage(Packages.tools);
var status = 0;
var party;
var preamble;
var gaveItems;
var curMap, stage;
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();//ExitChat
}else if (mode == 0){
cm.dispose();//No
}else{ //Regular Talk
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
var nthtext = "5th";
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendNext("Hi. Welcome to the " + nthtext + " stage. This is the 2nd stage, but everyone has to cooperate. There are 6 portals here. One is guarded by undefeatable monsters, and one is very high. I'd like you and your party to go in each one and break the boxes inside. Bring back the drops -- there should be 24.");//not 24!
eim.setProperty("leader" + nthtext + "preamble","done");
cm.dispose();
}else{
if(!isLeader()){
if(gaveItems == null){
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me.");
cm.dispose();
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}else{
if(gaveItems == null){
if(cm.getPlayer().getMap().getCharacters().size() != eim.getPlayers().size()) {
cm.sendOk("Please wait for all of your party members to get here.");
cm.dispose();
} else if(cm.itemQuantity(4001022) >= 24){
cm.sendOk("Good job! you have collected all 24 #b#t4001022#'s#k");
}else{
cm.sendOk("Sorry you don't have all 24 #b#t4001022#'s#k");
cm.dispose();
}
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}}
}else if (status == 1){
cm.removeAll(4001022);
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
cm.givePartyExp("LudiPQ5th");
eim.setProperty("5stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
cm.dispose();
}
}
function clearStage(stage, eim, curMap) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.linkToNextStage(stage, "lpq", curMap); //opens the portal to the next map
}
function isLeader(){
if(cm.getParty() == null){
return false;
}else{
return cm.isLeader();
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bstage " + stage + "#k. This is the 2nd stage, but everyone has to cooperate. There are 6 portals here. One is guarded by undefeatable monsters, and one is very high. I'd like you and your party to go in each one and break the boxes inside. Bring back the drops -- there should be 24.");
eim.setProperty("statusStg" + stage, 0);
}
else { // check stage completion
if (cm.haveItem(4001022, 24)) {
cm.sendOk("Good job! you have collected all 24 #b#t4001022#'s.#k");
cm.gainItem(4001022, -24);
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
} else {
cm.sendNext("Sorry you don't have all 24 #b#t4001022#'s.#k");
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@ Author : Raz, Ronan
@
@ NPC = Sky-Blue Balloon
@ Map = Hidden-Street <Stage 7>
@@ -30,90 +30,66 @@
@ Description: You need a ranged person here. The ranged person must kill the three Ratz, and they'll trigger something. What's next is for you to find out! Get me 3 passes!
*/
importPackage(Packages.tools);
importPackage(Packages.server.life);
var status = 0;
var party;
var preamble;
var gaveItems;
var curMap, stage;
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}else if (mode == 0){
cm.dispose();
}else{
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
var nthtext = "7th";
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendOk("Hi. Welcome to the " + nthtext + " stage. You need a ranged person here. The ranged person must kill the three Ratz, and they'll trigger something. What's next is for you to find out! Get me 3 passes!");
eim.setProperty("leader" + nthtext + "preamble","done");
cm.dispose();
}else{
if(!isLeader()){
if(gaveItems == null){
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me");
cm.dispose();
}else{
cm.sendOk("Hurry, goto the next stage, the portal is open!");
cm.dispose();
}
}
if(gaveItems == null){
cm.sendSimple("What's up?\r\n#L0#I've got your passes!#l\r\n"); // #L1#There's something wrong here.#l
}
}
}else if (status == 1){
if (selection == 0) {
if(cm.getPlayer().getMap().getCharacters().size() != eim.getPlayers().size()) {
cm.sendOk("Please wait for all of your party members to get here.");
cm.dispose();
} else if(cm.itemQuantity(4001022) >= 3){
cm.sendOk("Good job! you have collected all 3 #b#t4001022#'s#k");
}else{
cm.sendOk("Sorry you don't have all 3 #b#t4001022#'s#k");
cm.dispose();
}
} else if (selection == 1) {
if (cm.mapMobCount()==0) {
cm.sendOk("Good job! You've killed all the Rombards!");
}else{
cm.sendOk("What are you talking about? Kill those Rombards!");
cm.dispose();
}
}
}else if (status == 2){
cm.removeAll(4001022);
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
cm.givePartyExp("LudiPQ7th");
eim.setProperty("7stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
cm.dispose();
}
}
function clearStage(stage, eim, curMap) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.linkToNextStage(stage, "lpq", curMap); //opens the portal to the next map
}
function isLeader(){
if(cm.getParty() == null)
return false;
else
return cm.isLeader();
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bstage " + stage + "#k. You need ranged personnel here. They must kill the three Ratz, which will trigger something. What's next is for you to find out! Get me 3 passes!");
eim.setProperty("statusStg" + stage, 0);
}
else if(state == 0) { // check stage completion
if (cm.haveItem(4001022, 3)) {
cm.sendOk("Good job! you have collected all 3 #b#t4001022#'s.#k");
cm.gainItem(4001022, -3);
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
} else {
cm.sendNext("Sorry you don't have all 3 #b#t4001022#'s.#k");
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Twdtwd
@ Author : Twdtwd, Ronan
@
@ NPC = Blue Balloon
@ Map = Hidden-Street <Stage 8>
@@ -30,19 +30,6 @@
@ Description: Used to find the combo to unlock the next door. Players stand on 5 different crates to guess the combo.
*/
importPackage(Packages.tools);
var status = 0;
var party;
var preamble;
var gaveItems;
var nthtext = "8th";
function start() {
status = -1;
action(1, 0, 0);
}
function generateCombo() {
var countPicked = 0;
var positions = Array(0,0,0,0,0,0,0,0,0);
@@ -66,102 +53,100 @@ function generateCombo() {
}
var debug = false;
var status = 0;
var curMap, stage;
function clearStage(stage, eim, curMap) {
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.linkToNextStage(stage, "lpq", curMap); //opens the portal to the next map
}
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}else if (mode == 0){
cm.dispose();
}else{
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendOk("Hi. Welcome to the " + nthtext + " stage.");
eim.setProperty("leader" + nthtext + "preamble","done");
eim.setProperty("stage" + nthtext + "combo", generateCombo());
if (mode == -1) {
cm.dispose();
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bstage " + stage + "#k. In this stage, line up 5 member of your party above those boxes in order to form the right combination to unlock the next stage. Only one player should stay above a box desired to pertain the combination.");
var st = (debug) ? 2 : 0;
eim.setProperty("statusStg" + stage, st);
}
else { // check stage completion
if(state == 2) {
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
cm.dispose();
return;
}
objset = [0,0,0,0,0,0,0,0,0];
var playersOnCombo = 0;
var map = cm.getPlayer().getMap();
var party = cm.getEventInstance().getPlayers();
for (var i = 0; i < party.size(); i++) {
for (var y = 0; y < map.getAreas().size(); y++) {
if (map.getArea(y).contains(party.get(i).getPosition())) {
playersOnCombo++;
objset[y] = 1;
//cm.mapMessage(5, "Player found on " + (y + 1));
break;
}
}
}
if (playersOnCombo == 5 || cm.getPlayer().gmLevel() > 0) {
var combo = eim.getProperty("stage" + stage + "combo").split(',');
var correctCombo = true;
for (i = 0; i < objset.length && correctCombo; i++)
if (parseInt(combo[i]) != objset[i]) {
//cm.mapMessage(5, "Combo failed on " + (i + 1));
correctCombo = false;
}
if (correctCombo || cm.getPlayer().gmLevel() > 0) {
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
cm.dispose();
} else {
eim.showWrongEffect();
cm.dispose();
}
} else {
cm.sendNext("It looks like you haven't found the 5 boxes just yet. Please think of a different combination of boxes. Only 5 are allowed to stand on boxes, and if you move it may not count as an answer, so please keep that in mind. Keep going!");
cm.dispose();
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}else{
if(!isLeader()){
if(gaveItems == null){
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me");
cm.dispose();
}else{
cm.sendOk("Hurry, go to the next stage, the portal is open!");
cm.dispose();
}
}
if(gaveItems == null){
if(cm.getPlayer().getMap().getCharacters().size() != eim.getPlayers().size()) {
cm.sendOk("Please wait for all of your party members to get here.");
cm.dispose();
return;
}
objset = [0,0,0,0,0,0,0,0,0];
var playersOnCombo = 0;
var map = cm.getPlayer().getMap();
for (var i = 0; i < party.size(); i++) {
for (var y = 0; y < map.getAreas().size(); y++) {
if (map.getArea(y).contains(party.get(i).getPosition())) {
playersOnCombo++;
objset[y] = 1;
//cm.mapMessage(5, "Player found on " + (y + 1));
break;
}
}
}
if (playersOnCombo == 5 || cm.getPlayer().gmLevel() > 0) {
var combo = eim.getProperty("stage" + nthtext + "combo").split(',');
var correctCombo = true;
for (i = 0; i < objset.length && correctCombo; i++)
if (parseInt(combo[i]) != objset[i]) {
//cm.mapMessage(5, "Combo failed on " + (i + 1));
correctCombo = false;
}
if (correctCombo || cm.getPlayer().gmLevel() > 0) {
clear(eim, cm);
cm.dispose();
} else { // Wrong
//cm.sendOk(eim.getProperty("stage" + nthtext + "combo"));
failstage(eim, cm);
cm.dispose();
}
} else {
cm.sendNext("It looks like you haven't found the 5 boxes just yet. Please think of a different combination of boxes Only 5 are allowed to stand on boxes, and if you move it may not count as an answer, so please keep that in mind. Keep going!");
cm.dispose();
}
}
}
}
}
}
function clear(eim, cm) {
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
eim.setProperty("8stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
cm.givePartyExp("LudiPQ8th");
}
function failstage(eim, cm) {
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Failed"));
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
}
function isLeader(){
if(cm.getParty() == null)
return false;
else
return cm.isLeader();
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Twdtwd
@ Author : Twdtwd, Ronan
@
@ NPC = Violet Balloon
@ Map = Hidden-Street <Crack on the Wall>
@@ -30,83 +30,63 @@
@ Description: Used after the boss is killed to trigger the bonus stage.
*/
importPackage(Packages.tools);
var status = 0;
var party;
var preamble;
var gaveItems;
var nthtext = "last";
var curMap, stage;
function start() {
curMap = cm.getMapId();
stage = Math.floor((curMap - 922010100) / 100) + 1;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}else if (mode == 0){
cm.dispose();
}else{
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if (status == 0) {
party = eim.getPlayers();
preamble = eim.getProperty("leader" + nthtext + "preamble");
gaveItems = eim.getProperty("leader" + nthtext + "gaveItems");
if (preamble == null) {
cm.sendOk("Hi. Welcome to the " + nthtext + " stage.");
eim.setProperty("leader" + nthtext + "preamble","done");
cm.dispose();
}else{
if(!isLeader()){
if(gaveItems == null){
cm.sendOk("Please tell your #bParty-Leader#k to come talk to me");
cm.dispose();
}else{
cm.sendOk("Hurry, go to the next stage, the portal is open!");
cm.dispose();
}
} else if(gaveItems == null){
cm.sendSimple("What's up?\r\n#L0#I've got your passes!#l\r\n"); // #L1#There's something wrong here.#l
} else {
cm.dispose();
}
}
}else if (status == 1){
if (selection == 0) {
if(cm.itemQuantity(4001023) >= 1) {
cm.sendOk("Good job! you have collected the #b#t4001023#!#k");
}else{
cm.sendOk("Sorry you don't have the #b#t4001023#.#k");
cm.dispose();
}
}
}else if (status == 2){
cm.removeAll(4001023);
var map = eim.getMapInstance(cm.getPlayer().getMapId());
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
//map.broadcastMessage(MaplePacketCreator.environmentChange("gate", 2));
cm.givePartyExp("LudiPQLast");
eim.setProperty("9stageclear","true");
eim.setProperty("leader" + nthtext + "gaveItems","done");
eim.schedule("startBonus", 1000);
if (mode == -1) {
cm.dispose();
}
}
}
} else if (mode == 0){
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if(eim.getProperty(stage.toString() + "stageclear") != null) {
cm.sendNext("Hurry, goto the next stage, the portal is open!");
}
else {
if (eim.isLeader(cm.getPlayer())) {
var state = eim.getIntProperty("statusStg" + stage);
function isLeader(){
if(cm.getParty() == null)
return false;
else
return cm.isLeader();
}
if(state == -1) { // preamble
cm.sendOk("Hi. Welcome to the #bBOSS stage#k. Kill the Ratz on that platform to reveal the Alishar, and defeat him!");
eim.setProperty("statusStg" + stage, 0);
}
else { // check stage completion
if (cm.haveItem(4001023, 1)) {
cm.gainItem(4001023, -1);
eim.setProperty("statusStg" + stage, 1);
var list = eim.getClearStageBonus(stage); // will give bonus exp & mesos to everyone in the event
eim.giveEventPlayersExp(list.get(0));
eim.giveEventPlayersMeso(list.get(1));
eim.setProperty(stage + "stageclear", "true");
eim.showClearEffect(true);
eim.clearPQ();
} else {
cm.sendNext("Please defeat Alishar and bring me his #b#t4001023#.#k");
}
}
} else {
cm.sendNext("Please tell your #bParty-Leader#k to come talk to me.");
}
}
cm.dispose();
}
}

View File

@@ -19,8 +19,9 @@
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 : Raz
@ Author : Raz, Ronan
@
@ NPC = Pink Balloon
@ Map = Hidden-Street <Stage B>
@@ -37,39 +38,23 @@ function start() {
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();//ExitChat
}else if (mode == 0){
cm.sendOk("Wise choice. Who wouldn't want free mesos from the #bBonus Stage#k.");
cm.dispose();//No
} else {
if (mode == 1)
status++;
else
status--;
var eim = cm.getPlayer().getEventInstance();
if (status == 0)
cm.sendYesNo("Would you like to leave the bonus?");
else if (status == 1) {
if(isLeader())
cm.sendOk("Ok, Your loss");
else{
cm.sendOk("Ask your #bParty-Leader#k to come talk to me.");
cm.dispose();
}
}else if (status == 2) {
var map = eim.getMapInstance(922011100);
var party = eim.getPlayers();
cm.warpMembers(map, "st00", party);
cm.dispose();
if (mode == -1) {
cm.dispose();//ExitChat
}else if (mode == 0){
cm.sendOk("Wise choice. Who wouldn't want free mesos from the #bBonus Stage#k?");
cm.dispose();//No
} else {
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendYesNo("Would you like to leave the bonus stage?");
}
else {
cm.warp(922011100);
cm.dispose();
}
}
}
}
function isLeader(){
if(cm.getParty() == null){
return false;
}else{
return cm.isLeader();
}
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@ Author : Raz, Ronan
@
@ NPC = Sgt.Anderson
@ Map = Abandoned Tower <Stage 1>
@@ -28,64 +28,36 @@
@ NPC Exit-MapId = 221024500
@
*/
//4001022 - PASS OF DIMENSION
var status = 0;
var status;
function start() {
cm.sendYesNo("Are you sure you want to leave?");
status = -1;
action(1,0,0);
}
function action(mode, type, selection) {
if (mode == -1) //ExitChat
function action(mode, type, selection){
if (mode == 1)
status++;
else {
cm.dispose();
else if (mode == 0) {//No
cm.sendOk("OK, Talk to me again if you want to leave here.");
cm.dispose();
} else { //Regular Talk
if (mode == 1)
status++;
else
status--;
if (cm.getPlayer().getMap().getId() == 109050001) {
if(status == 0)
cm.sendNext("See ya.");
else if (status == 1){
cm.warp(109060001);
cm.dispose();
}
return;
}
var mapId = cm.getPlayer().getMapId();
if (mapId == 922010000) {
if (status == 0) {
cm.sendNext("To return back to the recruitment map, follow this way.");
} else {
if (status == 1)
cm.sendNext("Ok, Bye!");
else if (status == 2) {
var eim = cm.getPlayer().getEventInstance();
if (eim == null)
cm.sendOk("Wait, Hey! how'd you get here?\r\nOh well you can leave anyways");
else {
if(isLeader()){
eim.disbandParty();
cm.removeFromParty(4001008, eim.getPlayers());
} else {
eim.leftParty(cm.getPlayer());
cm.removeAll(4001008);
cm.removeAll(4031059);
cm.removeAll(4001102);
cm.removeAll(4001108);
}
cm.dispose();
}
} else if (status == 3) {
cm.warp(109050001);
cm.removeAll(4001008);
cm.removeAll(4031059);
cm.removeAll(4001102);
cm.removeAll(4001108);
cm.dispose();
}
cm.warp(221024500);
cm.dispose();
}
} else {
if (status == 0) {
var outText = "Once you leave the map, you'll have to restart the whole quest if you want to try it again. Do you still want to leave this map?";
cm.sendYesNo(outText);
} else if (mode == 1) {
cm.warp(922010000); // Warp player
cm.dispose();
}
}
}
function isLeader(){
return cm.getParty() == null ? false : cm.isLeader();
}

View File

@@ -34,7 +34,7 @@ function action(mode, type, selection) {
return;
}
cm.sendSimple("#b<Party Quest: Pirate Ship>\r\n#k" + em.getProperty("party") + "\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.");
cm.sendSimple("#e#b<Party Quest: Pirate Ship>\r\n#k#n" + em.getProperty("party") + "\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) {
@@ -60,7 +60,7 @@ function action(mode, type, selection) {
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
cm.dispose();
} else {
cm.sendOk("#b<Party Quest: Pirate Ship>#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.sendOk("#e#b<Party Quest: Pirate Ship>#k#n\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();
}
}

View File

@@ -24,6 +24,11 @@ var selected = -1;
var party = 0;
function start() {
cm.sendOk("The PyramidPQ is currently unavailable.");
cm.dispose();
}
/*function start() {
status = -1;
var text = "You should NOT talk to this NPC in this map.";
if (cm.getMapId() == 926020001)
@@ -35,6 +40,7 @@ function start() {
cm.sendSimple(text);
}
*/
function action(mode, type, selection) {
if (mode == 0 && type == 0) {

View File

@@ -34,7 +34,7 @@ function action(mode, type, selection) {
return;
}
cm.sendSimple("#b<Party Quest: Forest of Poison Haze>\r\n#k" + em.getProperty("party") + "\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.");
cm.sendSimple("#e#b<Party Quest: Forest of Poison Haze>\r\n#k#n" + em.getProperty("party") + "\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) {
@@ -60,7 +60,7 @@ function action(mode, type, selection) {
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: Forest of Poison Haze>#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.sendOk("#e#b<Party Quest: Forest of Poison Haze>#k#n\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 {

View File

@@ -77,7 +77,7 @@ function action(mode, type, selection) {
return;
}
cm.sendSimple("#b<Party Quest: Boss Rush>\r\n#k" + em.getProperty("party") + "\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.");
cm.sendSimple("#e#b<Party Quest: Boss Rush>\r\n#k#n" + em.getProperty("party") + "\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 == 3) {
@@ -122,7 +122,7 @@ function action(mode, type, selection) {
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>#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.sendOk("#e#b<Party Quest: Boss Rush>#k#n\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();
}
}

View File

@@ -31,6 +31,10 @@ var name;
var status;
var selectedType = 0;
function numberWithCommas(x) { // I ain't interessed in finding a way to parse java int to something js will accept through toLocaleString, so be it!
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
function start() {
status = -1;
action(1, 0, 0);
@@ -57,11 +61,9 @@ function action(mode, type, selection) {
else if (status == 2) {
name = cm.getText();
var res = false;
var res = cm.getPlayer().sellAllItemsFromName(selectedType + 1, name);
res = cm.getPlayer().sellAllItemsFromName(selectedType + 1, name);
if(res) cm.sendOk("Transaction complete!");
if(res > -1) cm.sendOk("Transaction complete! You received #r" + numberWithCommas(res) + " mesos#k from this action.");
else cm.sendOk("There is no #b'" + name + "'#k in your #b" + options[selectedType] + "#k inventory!");
cm.dispose();

View File

@@ -39,7 +39,7 @@ function action(mode, type, selection) {
cm.dispose();
}
cm.sendSimple("#b<Party Quest: 1st Accompaniment>\r\n#k" + em.getProperty("party") + "\r\n\r\nHow about you and your party members collectively beating a quest? Here you'll find obstacles and problems where you won't be able to beat it without great teamwork. If you want to try it, please tell the #bleader of your party#k to talk to me.#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.");
cm.sendSimple("#e#b<Party Quest: 1st Accompaniment>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nHow about you and your party members collectively beating a quest? Here you'll find obstacles and problems where you won't be able to beat it without great teamwork. If you want to try it, please tell the #bleader of your party#k to talk to me.#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 == 1) {
@@ -71,7 +71,7 @@ function action(mode, type, selection) {
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
cm.dispose();
} else {
cm.sendOk("#b<Party Quest: 1st Accompaniment>#k\r\nYour party must pass through many obstacles and puzzles while traversing the sub-objectives of this Party Quest. Coordinate with your team in order to further advance and defeat the final boss and collect the dropped item in order to access the rewards and bonus stage.");
cm.sendOk("#e#b<Party Quest: 1st Accompaniment>#k#n\r\nYour party must pass through many obstacles and puzzles while traversing the sub-objectives of this Party Quest. Coordinate with your team in order to further advance and defeat the final boss and collect the dropped item in order to access the rewards and bonus stage.");
cm.dispose();
}
}

View File

@@ -31,5 +31,8 @@ function enter(pi) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true;
}
return false;
else {
pi.getPlayer().dropMessage(5, "The portal is not opened yet.");
return false;
}
}

View File

@@ -31,5 +31,8 @@ function enter(pi) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true;
}
return false;
else {
pi.getPlayer().dropMessage(5, "The portal is not opened yet.");
return false;
}
}

View File

@@ -30,5 +30,8 @@ function enter(pi) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true;
}
return false;
else {
pi.getPlayer().dropMessage(5, "The portal is not opened yet.");
return false;
}
}

View File

@@ -21,7 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Kerning PQ: 3rd stage to 4th stage portal
Kerning PQ: 4th stage to last stage portal
*/
function enter(pi) {
@@ -31,5 +31,8 @@ function enter(pi) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true;
}
return false;
else {
pi.getPlayer().dropMessage(5, "The portal is not opened yet.");
return false;
}
}

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Kerning PQ: 4th stage to final stage portal
Kerning PQ: last stage to bonus stage portal
*/
function enter(pi) {
@@ -30,5 +30,8 @@ function enter(pi) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true;
}
return false;
else {
pi.getPlayer().dropMessage(5, "The portal is not opened yet.");
return false;
}
}

View File

@@ -25,18 +25,17 @@ LudiPQ - 1 - 2 Portal
*/
function enter(pi) {
var nextMap = 922010900;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
// only let people through if the eim is ready
var avail = eim.getProperty("8stageclear");
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false; }
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
var nextMap = 922010200;
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
var avail = eim.getProperty("1stageclear");
if (avail == null) {
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
}

View File

@@ -1,14 +1,15 @@
/*
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>
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.
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
@@ -18,17 +19,23 @@
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/>.
*/
/*
Ludi PQ: 1st stage to 2nd stage portal
LudiPQ - 1 - 2 Portal
@author Jvlaple
*/
function enter(pi) {
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(922010200);
if (eim.getProperty("1stageclear") != null) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true
} else
return false;
}
var nextMap = 922010300;
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
var avail = eim.getProperty("2stageclear");
if (avail == null) {
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
}

View File

@@ -1,15 +1,14 @@
/*
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>
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.
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
@@ -25,17 +24,19 @@ LudiPQ - 1 - 2 Portal
*/
function enter(pi) {
var nextMap = 922010300;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
var avail = eim.getProperty("2stageclear");
if (avail == null) {
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
var nextMap = 922010400;
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
// only let people through if the eim is ready
var avail = eim.getProperty("3stageclear");
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
}

View File

@@ -24,16 +24,17 @@ LudiPQ - 1 - 2 Portal
*/
function enter(pi) {
var nextMap = 922010400;
var eim = pi.getPlayer().getEventInstance()
var nextMap = 922010500;
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
// only let people through if the eim is ready
var avail = eim.getProperty("3stageclear");
var avail = eim.getProperty("4stageclear");
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false; }
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;

View File

@@ -24,16 +24,17 @@ LudiPQ - 1 - 2 Portal
*/
function enter(pi) {
var nextMap = 922010500;
var eim = pi.getPlayer().getEventInstance()
var nextMap = 922010600;
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
// only let people through if the eim is ready
var avail = eim.getProperty("4stageclear");
var avail = eim.getProperty("5stageclear");
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false; }
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;

View File

@@ -18,13 +18,14 @@
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/>.
*/
/*
LudiPQ - 1 - 2 Portal
@author Jvlaple
*/
function enter(pi) {
var nextMap = 922010600;
var nextMap = 922010700;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
@@ -33,8 +34,12 @@ function enter(pi) {
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false; }
return false;
}
else {
if(eim.getProperty("6stageclear") == null) {
eim.setProperty("6stageclear", "true");
}
pi.getPlayer().changeMap(target, targetPortal);
return true;
}

View File

@@ -20,27 +20,15 @@
*/
/*
LudiPQ - 1 - 2 Portal
@author Jvlaple
Ludi PQ: 5th stage to 6th stage portal
*/
function enter(pi) {
var nextMap = 922010700;
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
// only let people through if the eim is ready
var avail = eim.getProperty("5stageclear");
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false; }
else {
if(eim.getProperty("6stageclear") == null) {
eim.setProperty("6stageclear", "done");
pi.givePartyExp("LudiPQ6th");
}
pi.getPlayer().changeMap(target, targetPortal);
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(922010800);
if (eim.getProperty("7stageclear") != null) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true;
}
} else
return false;
}

View File

@@ -20,15 +20,24 @@
*/
/*
Ludi PQ: 5th stage to 6th stage portal
LudiPQ - 1 - 2 Portal
@author Jvlaple
*/
function enter(pi) {
var eim = pi.getPlayer().getEventInstance()
var target = eim.getMapInstance(922010800);
if (eim.getProperty("7stageclear") != null) {
pi.getPlayer().changeMap(target, target.getPortal("st00"));
return true;
} else
var nextMap = 922010900;
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
// only let people through if the eim is ready
var avail = eim.getProperty("8stageclear");
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
}

View File

@@ -1,42 +0,0 @@
/*
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/>.
*/
/*
LudiPQ - 1 - 2 Portal
@author Jvlaple
*/
function enter(pi) {
var nextMap = 922010900;
var eim = pi.getPlayer().getEventInstance();
var target = eim.getMapInstance(nextMap);
var targetPortal = target.getPortal("st00");
// only let people through if the eim is ready
var avail = eim.getProperty("8stageclear");
if (avail == null) {
// can't go thru eh?
pi.getPlayer().dropMessage(5, "Some seal is blocking this door.");
return false;
}
else {
pi.getPlayer().changeMap(target, targetPortal);
return true;
}
}

View File

@@ -25,10 +25,5 @@
*/
function act() {
rand = Math.floor(Math.random() * 3);
if (rand < 1) rand = 1;
//We'll make it drop a lot of crap :D
for (var i = 0; i<rand; i++) {
rm.dropItems(true, 1, 30, 60, 15);
}
rm.dropItems(true, 1, 30, 60, 15);
}