Implemented Orbis PQ.
This commit is contained in:
ronancpl
2017-06-11 00:12:11 -03:00
parent dbac58e871
commit 1afbac2429
142 changed files with 2600 additions and 539 deletions

View File

@@ -1,4 +1,4 @@
#Tue, 30 May 2017 01:29:33 -0300
#Wed, 07 Jun 2017 16:23:20 -0300
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2\\MapleIdRetriever=

Binary file not shown.

View File

@@ -1,50 +1,26 @@
Heaven's Hammer
Dark Crystal Ore
DEX Crystal Ore
LUK Crystal Ore
Power Crystal Ore
Wisdom Crystal Ore
Dark Crystal
DEX Crystal
LUK Crystal
Power Crystal
Wisdom Crystal
Blue Potion
White Potion
Elixir
Mana Elixir
Elixir
Power Elixir
Pure Water
Ice Cream Pop
Red Bean Sundae
Unagi
Watermelon
Reindeer Milk
Sunrise Dew
Sunset Dew
Screw
White Napoleon
Black Napoleon
Green Napoleon
Red Napoleon
Blue Napoleon
Blue Justice Cape
Red Justice Cape
White Justice Cape
Black Justice Cape
Blue Moon
Skull Earrings
Red-Hearted Earrings
Sapphire Earrings
Cat's Eye
Blue Moon
Maple Throwing-Stars
Adamantium Ore
Bronze Ore
Gold Ore
Mithril Ore
Orihalcon Ore
Silver Ore
Steel Ore
Amethyst Ore
Aquamarine Ore
Black Crystal Ore
Diamond Ore
Emerald Ore
Garnet Ore
Opal Ore
Sapphire Ore
Topaz Ore
Silver Rover
Mithril Husk
Gold Eyes
Blue Lorin
Brown Lorin
Steel Pow
Black Bisk

View File

@@ -1,50 +1,26 @@
1221011
4004004
4004002
4004003
4004000
4004001
4005004
4005002
4005003
4005000
4005001
2000003 2000017
2000002 2000016 2022174
2000004 2000012 2002012 2022175 2022456
2000006 2000018 2022177
2000004 2000012 2002012 2022175 2022456
2000005 2000019 2002013 2022176 2022457
2022000
2001001
2001002
2022003 3994092
2001000
2020013
2020014
2020015
4003000
1082096
1082104
1082107
1082099
1082098
1102003
1102004
1102000
1102002
1102001
1102011
1102012
1102013
1102014
1032011 1041078
1032012
1032013
1032002
1032008 4031568
1032011 1041078
2070011
4010003
4010000
4010006
4010002
4010005
4010004
4010001
4020001
4020002
4020008
4020007
4020003
4020000
4020004
4020005
4020006
1082204

View File

@@ -1,4 +1,4 @@
#Tue, 06 Jun 2017 11:24:55 -0300
#Sat, 10 Jun 2017 23:52:41 -0300
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=

BIN
dist/MapleSolaxia.jar vendored

Binary file not shown.

View File

@@ -299,4 +299,7 @@ Consertada a fun
06 Junho 2016,
Corrigido command empowerme.
Corrigidos exploits relacionados a algumas das skills do empowerme.
Corrigido possivel loop infinito no sistema de EXP.
Corrigido possivel loop infinito no sistema de EXP.
07 - 10 Junho 2016,
Implementação da OPQ.

View File

@@ -12,17 +12,31 @@
</editor-bookmarks>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/party3_room8.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/party3_jailin.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2013001.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/command/Commands.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleStatEffect.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/constants/GameConstants.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/Server.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/Skill.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/constants/ServerConstants.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/handlers/login/CharlistRequestHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/AbstractDealDamageHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/CloseRangeDamageHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2001002.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2002017.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/AreaBossDyle.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/AbstractPlayerInteraction.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2006001.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2002014.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2040044.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2013002.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/1012005.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2040045.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/party3_gardenin.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/OrbisPQ.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/2001016.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/LudiPQ.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/BossRushPQ.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2013000.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleMap.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/PiratePQ.js</file>
</group>
</open-files>
</project-private>

View File

@@ -51,6 +51,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(910500200);
player.changeMap(map, map.getPortal(0));

View File

@@ -50,6 +50,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(910500100);
player.changeMap(map, map.getPortal(0));

View File

@@ -111,6 +111,8 @@ function setup(level, lobbyid) {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(entryMap + eim.getIntProperty("lobby"));
player.changeMap(map, map.getPortal(0));

View File

@@ -21,6 +21,8 @@ em.setProperty("state", "0");
em.setProperty("leader", "true");
}
function afterSetup(eim) {}
function setup(eim, leaderid) {
em.setProperty("state", "1");
em.setProperty("leader", "true");

View File

@@ -69,6 +69,8 @@ function setup(eim) {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(680000200);
player.changeMap(map, map.getPortal(0));

View File

@@ -93,6 +93,8 @@ function setup(level, lobbyid) {
return eim;
}
function afterSetup(eim) {}
function respawnStg2(eim) {
if(!eim.getMapInstance(930000200).getAllPlayer().isEmpty()) eim.getMapInstance(930000200).instanceMapRespawn();
eim.schedule("respawnStg2", 4 * 1000);

View File

@@ -87,6 +87,8 @@ function begin(eim) {
//}
}
function afterSetup(eim) {}
function timeOut(eim) {
end(eim, "Your allotted time to finish the quest has passed.");
}

View File

@@ -19,6 +19,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
if (player.getMapId() == returnTo[0]) {
myRide = 0;

View File

@@ -52,7 +52,7 @@ function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [4001129];
itemSet = [4001158];
itemQty = [1];
eim.setEventRewards(evLevel, itemSet, itemQty);
@@ -98,6 +98,8 @@ function setup(level, lobbyid) {
return eim;
}
function afterSetup(eim) {}
function respawnStages(eim) {
eim.getInstanceMap(910010000).instanceMapRespawn();
eim.getInstanceMap(910010200).instanceMapRespawn();

View File

@@ -54,6 +54,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim,player) {
var map = eim.getMapInstance(trial1.getId());
player.changeMap(map,map.getPortal(0));

View File

@@ -92,6 +92,8 @@ function setup(level, lobbyid) {
return eim;
}
function afterSetup(eim) {}
function respawnStages(eim) {
eim.getMapInstance(103000800).instanceMapRespawn();
eim.getMapInstance(103000805).instanceMapRespawn();

View File

@@ -18,6 +18,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
if (player.getMapId() == returnTo[0]) {
myRide = 0;

View File

@@ -97,6 +97,8 @@ function setup(level, lobbyid) {
return eim;
}
function afterSetup(eim) {}
function respawnStages(eim) {}
function playerEntry(eim, player) {

View File

@@ -127,6 +127,8 @@ function setup(level, lobbyid) {
return eim;
}
function afterSetup(eim) {}
function respawnStages(eim) {}
function playerEntry(eim, player) {
@@ -136,11 +138,11 @@ function playerEntry(eim, player) {
function scheduledTimeout(eim) {
if(eim.getProperty("9stageclear") != null) {
var curStage = 922011000, toStage = 922011100;
eim.warpEventTeam(curStage, toStage);
var curStage = 922011000, toStage = 922011100;
eim.warpEventTeam(curStage, toStage);
}
else {
end(eim);
end(eim);
}
}

View File

@@ -1,294 +1,248 @@
/*
* 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>
/**
* @author: Ronan
* @event: Orbis PQ
*/
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 isPq = true;
var minPlayers = 5, maxPlayers = 6;
var minLevel = 51, maxLevel = 70;
var entryMap = 920010000;
var exitMap = 920011200;
var recruitMap = 200080101;
var clearMap = 920011300;
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.
var minMapId = 920010000;
var maxMapId = 920011300;
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/>.
THIS FILE WAS MADE BY JVLAPLE. REMOVING THIS NOTICE MEANS YOU CAN'T USE THIS SCRIPT OR ANY OTHER SCRIPT PROVIDED BY JVLAPLE.
*/
var eventTime = 45; // 45 minutes
/*
* @Author Jvlaple
*
* Orbis Party Quest
*/
importPackage(java.lang);
importPackage(Packages.world);
importPackage(Packages.client);
importPackage(Packages.server.maps);
importPackage(Packages.server.life);
importPackage(Packages.scripting.npc);
var exitMap;
var instanceId;
var minPlayers = 1;
var lobbyRange = [0, 0];
function init() {
instanceId = 1;
setEventRequirements();
}
function monsterValue(eim, mobId) {
return 1;
function setLobbyRange() {
return lobbyRange;
}
function setup() {
instanceId = em.getChannelServer().getInstanceId();
exitMap = em.getChannelServer().getMapFactory().getMap(920011200); //Teh exit map :) <---------t
var instanceName = "OrbisPQ" + instanceId;
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
em.getChannelServer().addInstanceId();
var map = mf.getMap(920010000);//wutt
//map.shuffleReactors();
// eim.addMapInstance(920010000,map);
//var firstPortal = eim.getMapInstance(920010000).getPortal("in00");
//firstPortal.setScriptName("hontale_BtoB1");
//Fuck this timer
//eim.setProperty("bulbWay", 0);
//Define all Maps and PortalScripts
var centerMap = eim.getMapInstance(920010100);
centerMap.getPortal(13).setScriptName("orbisPQSealedRoom");
centerMap.getPortal(4).setScriptName("orbisPQWalkway");
centerMap.getPortal(12).setScriptName("orbisPQStorage");
centerMap.getPortal(5).setScriptName("orbisPQLobby");
centerMap.getPortal(14).setScriptName("orbisPQOnTheWayUp");
centerMap.getPortal(15).setScriptName("orbisPQLounge");
centerMap.getPortal(16).setScriptName("orbisPQRoomOfDarkness");
var walkwayMap = eim.getMapInstance(920010200);
var storageMap = eim.getMapInstance(920010300);
var lobbyMap = eim.getMapInstance(920010400);
var sealedRoomMap = eim.getMapInstance(920010500);
var loungeMap = eim.getMapInstance(920010600);
var onTheWayUpMap = eim.getMapInstance(920010700);
var bossMap = eim.getMapInstance(920010800);
var jailMap = eim.getMapInstance(920010900);
var roomOfDarknessMap = eim.getMapInstance(920011000);
var bonusMap = eim.getMapInstance(920011100);
var endMap = eim.getMapInstance(920011300);
walkwayMap.getPortal(13).setScriptName("orbisPQWalkwayExit");
storageMap.getPortal(1).setScriptName("orbisPQStorageExit");
lobbyMap.getPortal(8).setScriptName("orbisPQLobbyExit");
sealedRoomMap.getPortal(3).setScriptName("orbisPQSRExit");
loungeMap.getPortal(17).setScriptName("orbisPQLoungeExit");
onTheWayUpMap.getPortal(23).setScriptName("orbisPQOnTheWayUpExit");
bossMap.getPortal(1).setScriptName("orbisPQGardenExit");
roomOfDarknessMap.getPortal(1).setScriptName("orbisPQRoomOfDarknessExit");
//-->Fuck we are done with portals -.-
eim.setProperty("killedCellions", "0");
eim.setProperty("papaSpawned", "no");
em.schedule("timeOut", 60 * 60000);
em.schedule("broadcastClock", 1500);
eim.setProperty("entryTimestamp",System.currentTimeMillis() + (60 * 60000));
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;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [4001044, 4001045, 4001046, 4001047, 4001048, 4001049, 4001050, 4001051, 4001052, 4001053, 4001054, 4001055, 4001056, 4001057, 4001058, 4001059, 4001060, 4001061, 4001062, 4001063];
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, 1102015, 1102016, 1102017, 1102018, 1102021, 1102022, 1102023, 1102024, 1102084, 1102085, 1102086, 1032019, 1032020, 1032021, 1032014, 2070011, 4010003, 4010000, 4010006, 4010002, 4010005, 4010004, 4010001, 4020001, 4020002, 4020008, 4020007, 4020003, 4020000, 4020004, 4020005, 4020006, 2210000, 2210001, 2210002, 2070006, 2070005, 2070007, 2070004, 2061003, 2060003, 2060004, 2061004, 2100000, 2100001, 2100002, 2100003, 2100004, 2100005];
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, 100, 100, 15, 80, 5, 25, 20, 20, 25, 20, 15, 10, 45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 15, 10, 15, 15, 15, 15, 15, 15, 10, 10, 15, 15, 15, 15, 15, 5, 5, 5, 1, 1, 1, 1, 2000, 2000, 2000, 2000, 1, 1, 1, 1, 1, 1];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //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("Orbis" + 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("statusStg7_c", 0);
eim.setProperty("statusStgBonus", 0);
eim.getInstanceMap(920010000).resetPQ(level);
eim.getInstanceMap(920010100).resetPQ(level);
eim.getInstanceMap(920010200).resetPQ(level);
eim.getInstanceMap(920010300).resetPQ(level);
eim.getInstanceMap(920010400).resetPQ(level);
eim.getInstanceMap(920010500).resetPQ(level);
eim.getInstanceMap(920010600).resetPQ(level);
eim.getInstanceMap(920010601).resetPQ(level);
eim.getInstanceMap(920010602).resetPQ(level);
eim.getInstanceMap(920010603).resetPQ(level);
eim.getInstanceMap(920010604).resetPQ(level);
eim.getInstanceMap(920010700).resetPQ(level);
eim.getInstanceMap(920010800).resetPQ(level);
eim.getInstanceMap(920010900).resetPQ(level);
eim.getInstanceMap(920010910).resetPQ(level);
eim.getInstanceMap(920010911).resetPQ(level);
eim.getInstanceMap(920010912).resetPQ(level);
eim.getInstanceMap(920010920).resetPQ(level);
eim.getInstanceMap(920010921).resetPQ(level);
eim.getInstanceMap(920010922).resetPQ(level);
eim.getInstanceMap(920010930).resetPQ(level);
eim.getInstanceMap(920010931).resetPQ(level);
eim.getInstanceMap(920010932).resetPQ(level);
eim.getInstanceMap(920011000).resetPQ(level);
eim.getInstanceMap(920011100).resetPQ(level);
eim.getInstanceMap(920011200).resetPQ(level);
eim.getInstanceMap(920011300).resetPQ(level);
respawnStages(eim);
var d = new Date();
eim.getInstanceMap(920010400).getReactorByName("music").setEventState(d.getDay());
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function afterSetup(eim) {
var rnd = Math.floor(Math.random() * 4);
eim.applyEventPlayersItemBuff(2022090 + rnd);
}
function respawnStages(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(920010000);
player.changeMap(map, map.getPortal(0));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock((Long.parseLong(eim.getProperty("entryTimestamp")) - System.currentTimeMillis()) / 1000));
var texttt = "Hi, my name is Eak, the Chamberlain of the Goddess. Don't be alarmed; you won't be able to see me right now. Back when the Goddess turned into a block of stone, I simultaneously lost my own power. If you gather up the power of the Magic Cloud of Orbis, however, then I'll be able to recover my body and re-transform back to my original self. Please collect #b20#k Magic Clouds and bring them back to me. Right now, you'll only see me as a tiny, flickering light."
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getNPCTalk(2013001, /*(byte)*/ 0, texttt, "00 00"));
//player.getClient().getSession().write(net.sf.odinms.scripting.npc.NPCScriptManager.dispose(eim.getClient()));
//THE CLOCK IS SHIT
//player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(1800));
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
var texttt = "Hi, my name is Eak, the Chamberlain of the Goddess. Don't be alarmed; you won't be able to see me right now. Back when the Goddess turned into a block of stone, I simultaneously lost my own power. If you gather up the power of the Magic Cloud of Orbis, however, then I'll be able to recover my body and re-transform back to my original self. Please collect #b20#k Magic Clouds and bring them back to me. Right now, you'll only see me as a tiny, flickering light.";
player.getClient().getSession().write(Packages.tools.MaplePacketCreator.getNPCTalk(2013001, /*(byte)*/ 0, texttt, "00 00", /*(byte)*/ 0));
}
function playerDead(eim, player) {
}
function playerRevive(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++) {
playerExit(eim, party.get(i));
function scheduledTimeout(eim) {
if(eim.getIntProperty("statusStg8") == 1) {
eim.warpEventTeam(920011300);
}
eim.dispose();
}
else { //boot dead player
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() <= minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
else {
end(eim);
}
else
playerExit(eim, player);
}
}
function playerDisconnected(eim, player) {
if (eim.isLeader(player)) { //check for party leader
//PWN THE PARTY (KICK OUT)
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 { //KICK THE D/CED CUNT
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() < minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
playerExit(eim, player);
}
}
function leftParty(eim, player) {
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() <= minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
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 playerExit(eim, player) {
eim.unregisterPlayer(player);
player.cancelAllBuffs(); //We don't want people going out with wonky blessing >=(
player.changeMap(exitMap, exitMap.getPortal(0));
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
//Those offline cuntts
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
}
function 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) {
// W00t! Bonus!!
var iter = eim.getPlayers().iterator();
var bonusMap = eim.getMapInstance(920011100);
while (iter.hasNext()) {
var player = iter.next();
player.changeMap(bonusMap, bonusMap.getPortal(0));
eim.setProperty("entryTimestamp",System.currentTimeMillis() + (1 * 60000));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(60));
}
eim.schedule("finish", 60000)
}
function finish(eim) {
var dMap = eim.getMapInstance(920011300);
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
eim.unregisterPlayer(player);
player.changeMap(dMap, dMap.getPortal(0));
}
eim.dispose();
eim.stopEventTimer();
eim.setEventCleared();
}
function monsterKilled(mob, eim) {}
function allMonstersDead(eim) {} //Open Portal? o.O
function allMonstersDead(eim) {}
function cancelSchedule() {
}
function cancelSchedule() {}
function timeOut() {
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerExit(eim, pIter.next());
}
}
eim.dispose();
}
}
function dispose(eim) {}
function playerClocks(eim, player) {
if (player.getMap().hasTimer() == false){
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock((Long.parseLong(eim.getProperty("entryTimestamp")) - System.currentTimeMillis()) / 1000));
//player.getMap().setTimer(true);
}
}
function playerTimer(eim, player) {
if (player.getMap().hasTimer() == false) {
player.getMap().setTimer(true);
}
}
function broadcastClock(eim, player) {
//var party = eim.getPlayers();
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerClocks(eim, pIter.next());
}
}
//em.schedule("broadcastClock", 1600);
}
// for (var kkl = 0; kkl < party.size(); kkl++) {
// party.get(kkl).getMap().setTimer(true);
// }
var iterr = em.getInstances().iterator();
while (iterr.hasNext()) {
var eim = iterr.next();
if (eim.getPlayerCount() > 0) {
var pIterr = eim.getPlayers().iterator();
while (pIterr.hasNext()) {
//playerClocks(eim, pIter.next());
playerTimer(eim, pIterr.next());
}
}
//em.schedule("broadcastClock", 1600);
}
em.schedule("broadcastClock", 1600);
}
function dispose() {
}

View File

@@ -0,0 +1,296 @@
/*
* 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/>.
THIS FILE WAS MADE BY JVLAPLE. REMOVING THIS NOTICE MEANS YOU CAN'T USE THIS SCRIPT OR ANY OTHER SCRIPT PROVIDED BY JVLAPLE.
*/
/*
* @Author Jvlaple
*
* Orbis Party Quest
*/
importPackage(java.lang);
importPackage(Packages.world);
importPackage(Packages.client);
importPackage(Packages.server.maps);
importPackage(Packages.server.life);
importPackage(Packages.scripting.npc);
var exitMap;
var instanceId;
var minPlayers = 1;
function init() {
instanceId = 1;
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
instanceId = em.getChannelServer().getInstanceId();
exitMap = em.getChannelServer().getMapFactory().getMap(920011200); //Teh exit map :) <---------t
var instanceName = "OrbisPQ" + instanceId;
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
em.getChannelServer().addInstanceId();
var map = mf.getMap(920010000);//wutt
//map.shuffleReactors();
// eim.addMapInstance(920010000,map);
//var firstPortal = eim.getMapInstance(920010000).getPortal("in00");
//firstPortal.setScriptName("hontale_BtoB1");
//Fuck this timer
//eim.setProperty("bulbWay", 0);
//Define all Maps and PortalScripts
var centerMap = eim.getMapInstance(920010100);
centerMap.getPortal(13).setScriptName("orbisPQSealedRoom");
centerMap.getPortal(4).setScriptName("orbisPQWalkway");
centerMap.getPortal(12).setScriptName("orbisPQStorage");
centerMap.getPortal(5).setScriptName("orbisPQLobby");
centerMap.getPortal(14).setScriptName("orbisPQOnTheWayUp");
centerMap.getPortal(15).setScriptName("orbisPQLounge");
centerMap.getPortal(16).setScriptName("orbisPQRoomOfDarkness");
var walkwayMap = eim.getMapInstance(920010200);
var storageMap = eim.getMapInstance(920010300);
var lobbyMap = eim.getMapInstance(920010400);
var sealedRoomMap = eim.getMapInstance(920010500);
var loungeMap = eim.getMapInstance(920010600);
var onTheWayUpMap = eim.getMapInstance(920010700);
var bossMap = eim.getMapInstance(920010800);
var jailMap = eim.getMapInstance(920010900);
var roomOfDarknessMap = eim.getMapInstance(920011000);
var bonusMap = eim.getMapInstance(920011100);
var endMap = eim.getMapInstance(920011300);
walkwayMap.getPortal(13).setScriptName("orbisPQWalkwayExit");
storageMap.getPortal(1).setScriptName("orbisPQStorageExit");
lobbyMap.getPortal(8).setScriptName("orbisPQLobbyExit");
sealedRoomMap.getPortal(3).setScriptName("orbisPQSRExit");
loungeMap.getPortal(17).setScriptName("orbisPQLoungeExit");
onTheWayUpMap.getPortal(23).setScriptName("orbisPQOnTheWayUpExit");
bossMap.getPortal(1).setScriptName("orbisPQGardenExit");
roomOfDarknessMap.getPortal(1).setScriptName("orbisPQRoomOfDarknessExit");
//-->Fuck we are done with portals -.-
eim.setProperty("killedCellions", "0");
eim.setProperty("papaSpawned", "no");
em.schedule("timeOut", 60 * 60000);
em.schedule("broadcastClock", 1500);
eim.setProperty("entryTimestamp",System.currentTimeMillis() + (60 * 60000));
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(920010000);
player.changeMap(map, map.getPortal(0));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock((Long.parseLong(eim.getProperty("entryTimestamp")) - System.currentTimeMillis()) / 1000));
var texttt = "Hi, my name is Eak, the Chamberlain of the Goddess. Don't be alarmed; you won't be able to see me right now. Back when the Goddess turned into a block of stone, I simultaneously lost my own power. If you gather up the power of the Magic Cloud of Orbis, however, then I'll be able to recover my body and re-transform back to my original self. Please collect #b20#k Magic Clouds and bring them back to me. Right now, you'll only see me as a tiny, flickering light."
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getNPCTalk(2013001, /*(byte)*/ 0, texttt, "00 00"));
//player.getClient().getSession().write(net.sf.odinms.scripting.npc.NPCScriptManager.dispose(eim.getClient()));
//THE CLOCK IS SHIT
//player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(1800));
}
function playerDead(eim, player) {
}
function playerRevive(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++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
else { //boot dead player
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() <= minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
playerExit(eim, player);
}
}
function playerDisconnected(eim, player) {
if (eim.isLeader(player)) { //check for party leader
//PWN THE PARTY (KICK OUT)
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 { //KICK THE D/CED CUNT
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() < minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
playerExit(eim, player);
}
}
function leftParty(eim, player) {
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() <= minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
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 playerExit(eim, player) {
eim.unregisterPlayer(player);
player.cancelAllBuffs(); //We don't want people going out with wonky blessing >=(
player.changeMap(exitMap, exitMap.getPortal(0));
}
//Those offline cuntts
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
// W00t! Bonus!!
var iter = eim.getPlayers().iterator();
var bonusMap = eim.getMapInstance(920011100);
while (iter.hasNext()) {
var player = iter.next();
player.changeMap(bonusMap, bonusMap.getPortal(0));
eim.setProperty("entryTimestamp",System.currentTimeMillis() + (1 * 60000));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(60));
}
eim.schedule("finish", 60000)
}
function finish(eim) {
var dMap = eim.getMapInstance(920011300);
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
eim.unregisterPlayer(player);
player.changeMap(dMap, dMap.getPortal(0));
}
eim.dispose();
}
function monsterKilled(mob, eim) {}
function allMonstersDead(eim) {} //Open Portal? o.O
function cancelSchedule() {
}
function timeOut() {
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerExit(eim, pIter.next());
}
}
eim.dispose();
}
}
function playerClocks(eim, player) {
if (player.getMap().hasTimer() == false){
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock((Long.parseLong(eim.getProperty("entryTimestamp")) - System.currentTimeMillis()) / 1000));
//player.getMap().setTimer(true);
}
}
function playerTimer(eim, player) {
if (player.getMap().hasTimer() == false) {
player.getMap().setTimer(true);
}
}
function broadcastClock(eim, player) {
//var party = eim.getPlayers();
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerClocks(eim, pIter.next());
}
}
//em.schedule("broadcastClock", 1600);
}
// for (var kkl = 0; kkl < party.size(); kkl++) {
// party.get(kkl).getMap().setTimer(true);
// }
var iterr = em.getInstances().iterator();
while (iterr.hasNext()) {
var eim = iterr.next();
if (eim.getPlayerCount() > 0) {
var pIterr = eim.getPlayers().iterator();
while (pIterr.hasNext()) {
//playerClocks(eim, pIter.next());
playerTimer(eim, pIterr.next());
}
}
//em.schedule("broadcastClock", 1600);
}
em.schedule("broadcastClock", 1600);
}
function dispose() {
}

View File

@@ -167,6 +167,8 @@ function setup(level, lobbyid) {
return eim;
}
function afterSetup(eim) {}
function respawnStg4(eim) {
eim.getMapInstance(925100400).instanceMapRespawn();
eim.schedule("respawnStg4", 10 * 1000);

View File

@@ -38,6 +38,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function respawn(eim) {
var map = eim.getMapInstance(startMap.getId());
var map2 = eim.getMapInstance(otherMap.getId());

View File

@@ -44,7 +44,7 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim,player) {
var battle = eim.getMapInstance(battleMap.getId());

View File

@@ -38,6 +38,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function respawn(eim) {
var map = eim.getMapInstance(startMap.getId());
var map2 = eim.getMapInstance(otherMap.getId());

View File

@@ -53,7 +53,7 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim,player) {
var altar = eim.getMapInstance(altarMap.getId());

View File

@@ -60,6 +60,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(280010000);
player.changeMap(map, map.getPortal(0));

View File

@@ -23,6 +23,8 @@ function setup() {
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapFactory().getMap(910500000);
player.changeMap(map, map.getPortal(0));

View File

@@ -83,17 +83,17 @@ function action(mode, type, selection) {
cm.sendOk("#e#b<Party Quest: Primrose Hill>#k#n\r\nCollect primrose seeds from the flowers at the bottom part of the map and drop them by the platforms above the stage. Primrose seed color must match to grow the seeds, so test until you find the correct combination. When all the seeds have been planted, that is, starting second part of the mission, scout the Moon Bunny while it prepares Rice Cakes for the hungry Growlie. Once Growlie becomes satisfied, your mission is complete.");
cm.dispose();
} else {
cm.sendYesNo("So you want to exchange #b20 #b#t4001129##k for the event-designed hat?");
cm.sendYesNo("So you want to exchange #b20 #b#t4001158##k for the event-designed hat?");
}
} else {
if(cm.hasItem(4001129, 20)) {
if(cm.hasItem(4001158, 20)) {
if(cm.canHold(1002798)) {
cm.gainItem(4001129, -20);
cm.gainItem(4001158, -20);
cm.gainItem(1002798, 20);
cm.sendNext("Here it is. Enjoy!");
}
} else {
cm.sendNext("You don't have enough #t4001129# to buy it yet!");
cm.sendNext("You don't have enough #t4001158# to buy it yet!");
}
cm.dispose();

91
scripts/npc/2013000.js Normal file
View File

@@ -0,0 +1,91 @@
/**
* @author: Ronan
* @npc: Wonky
* @map: 200080101 - Orbis - The Unknown Tower
* @func: Orbis PQ
*/
var status = 0;
var em = null;
function start() {
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(cm.getMapId() == 200080101) {
if (status == 0) {
em = cm.getEventManager("OrbisPQ");
if(em == null) {
cm.sendOk("The Orbis PQ has encountered an error.");
cm.dispose();
return;
}
cm.sendSimple("#e#b<Party Quest: Tower of Goddess>\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 #bTower of Goddess#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 eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(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.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("#e#b<Party Quest: Tower of Goddess>#k#n\r\nOur goddess has been missing since some time ago, rumor has it She has been seen last time inside the Tower of Goddess. Furthermore, our sanctuary has been seized by the overwhelming forces of the pixies, those beings that are recently wandering at the outskirts of Orbis. Their leader, Papa Pixie, currently holds the throne and may know Her whereabouts, so we urge to find a composition of brave heroes to charge into and claim back our sanctuary and rescue Her. Will you join us?\r\n");
cm.dispose();
}
else {
cm.sendSimple("So, what prize do you want to obtain?\r\n#b#L0#Give me Goddess Wristband.\r\n");
}
} else if (status == 2) {
if (selection == 0) {
if (!cm.haveItem(1082232) && cm.haveItem(4001158, 10)) {
cm.gainItem(1082232, 1);
cm.gainItem(4001158, -10);
cm.dispose();
} else {
cm.sendOk("You either have Goddess Wristband already or you do not have 10 #t4001158#.");
cm.dispose();
}
}
}
} else {
if(status == 0) {
cm.sendYesNo("Are you going to drop out from this rescue mission?");
} else if(status == 1) {
cm.warp(920011200);
cm.dispose();
}
}
}
}

289
scripts/npc/2013001.js Normal file
View File

@@ -0,0 +1,289 @@
/**
* @author: Ronan
* @npc: Chamberlain Eak
* @map: Orbis - Tower of Goddess
* @func: Orbis PQ
*/
var status = 0;
var em = null;
function isStatueComplete() {
for(var i = 1; i <= 6; i++) {
if(cm.getMap().getReactorByName("scar" + i).getState() < 1) return false;
}
return true;
}
function clearStage(stage, eim) {
eim.setProperty("statusStg" + stage, "1");
eim.showClearEffect(true);
}
function start() {
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 (cm.getPlayer().getMapId() == 920011200) { //exit
cm.warp(200080101);
cm.dispose();
return;
}
if (!cm.isLeader()) {
if(cm.getPlayer().getMapId() == 920010000) {
cm.warp(920010000, 2);
cm.dispose();
return;
}
cm.sendOk("I only wish to speak to your leader!");
cm.dispose();
return;
}
var eim = cm.getEventInstance();
switch(cm.getPlayer().getMapId()) {
case 920010000:
if(eim.getIntProperty("statusStg0") != 1) {
eim.warpEventTeamToMapSpawnPoint(920010000, 2);
eim.giveEventPlayersExp(3500);
clearStage(0, eim);
cm.sendNext("Please save Minerva, She've been trapped in the seal by Papa Pixie, the terror of our tower! He misplaced all of our Minerva Statue's parts and we have to get it all back! Oh pardon me, I am the tower's Chamberlain, Eak. I am Minerva's royal servant.");
}
else {
cm.warp(920010000, 2);
}
cm.dispose();
break;
case 920010100:
if (isStatueComplete()) {
if (eim.getIntProperty("statusStg7") == -1) {
eim.warpEventTeam(920010800);
} else if(eim.getIntProperty("statusStg8") == -1) {
cm.sendOk("Oh! You brought the #t4001055#! Please, drop it at the base of the statue to bring Minerva back!");
} else {
cm.sendOk("Thank you for saving Minerva! Please, talk to her...");
}
} else {
cm.sendOk("Please, save Minerva! Gather the six pieces of her statue and then talk to me to retrieve the final piece!");
}
break;
case 920010200: //walkway
if (!cm.haveItem(4001050,30)) {
cm.sendOk("Gather the 30 Statue Pieces from the monsters in this stage, and please bring them to me so I can put them together!");
} else {
cm.sendOk("You got them all! Here, the 1st statue piece.");
cm.removeAll(4001050);
cm.gainItem(4001044,1); //first piece
eim.giveEventPlayersExp(3500);
clearStage(1, eim);
}
break;
case 920010300: //storage
if(eim.getIntProperty("statusStg2") != 1) {
if(cm.getMap().countMonsters() == 0 && cm.getMap().countItems() == 0) {
if(cm.canHold(4001045)) {
cm.sendOk("Oh, I've found the 2nd Piece of Statue. Here, take it.");
cm.gainItem(4001045, 1);
eim.giveEventPlayersExp(3500);
clearStage(2, eim);
eim.setProperty("statusStg2", "1");
} else {
cm.sendOk("I've found the 2nd Piece of Statue. Get a slot available on your inventory to take it.");
}
} else {
cm.sendOk("Find the 2nd Piece of Statue that is hidden in this room.");
}
} else {
cm.sendOk("Well done. Go find the other statue pieces.");
}
break;
case 920010400: //lobby
if (eim.getIntProperty("statusStg3") == -1) {
cm.sendOk("Please, find the LP for the current day of week and place it on the music player.\r\n#v4001056# Sunday\r\n#v4001057# Monday\r\n#v4001058# Tuesday\r\n#v4001059# Wednesday\r\n#v4001060# Thursday\r\n#v4001061# Friday\r\n#v4001062# Saturday\r\n");
} else if (eim.getIntProperty("statusStg3") == 0) {
cm.getMap().getReactorByName("stone3").forceHitReactor(1);
cm.sendOk("Ooh, the music... It sounds so fitting with the ambient. Nicely done, a box has appeared on the field. Retrieve the statue part from it!");
eim.giveEventPlayersExp(3500);
clearStage(3, eim);
eim.setProperty("statusStg3", "2");
} else {
cm.sendOk("Thank you so much!");
}
break;
case 920010500: //sealed
if (eim.getIntProperty("statusStg4") == -1) {
var total = 3;
for(var i = 0; i < 2; i++) {
var rnd = Math.round(Math.random() * total);
total -= rnd;
eim.setProperty("stage4_" + i, rnd);
}
eim.setProperty("stage4_2", "" + total);
eim.setProperty("statusStg4", "0");
}
if (eim.getIntProperty("statusStg4") == 0) {
var players = Array();
var total = 0;
for (var i = 0; i < 3; i++) {
var z = cm.getMap().getNumPlayersItemsInArea(i);
players.push(z);
total += z;
}
if (total != 3) {
cm.sendOk("There needs to be 3 players OR items on the platforms.");
} else {
var num_correct = 0;
for (var i = 0; i < 3; i++) {
if (eim.getProperty("stage4_" + i).equals("" + players[i])) {
num_correct++;
}
}
if (num_correct == 3) {
cm.sendOk("You found the right combination! A box has appeared on the top of this map, go retrieve the statue piece from it!");
cm.getMap().getReactorByName("stone4").forceHitReactor(1);
eim.giveEventPlayersExp(3500);
clearStage(4, eim);
} else {
eim.showWrongEffect();
if (num_correct > 0) {
cm.sendOk("One of the platforms has the right number of players.");
} else {
cm.sendOk("All of the platforms have the wrong amount of players.");
}
}
}
} else {
cm.sendOk("Well done! Please, go fetch the other pieces and save Minerva!");
}
cm.dispose();
break;
case 920010600: //lounge
if(eim.getIntProperty("statusStg5") == -1) {
if (!cm.haveItem(4001052,40)) {
cm.sendOk("Gather the 40 Statue Pieces from the monsters in this stage, and please bring them to me so I can put them together!");
} else {
cm.sendOk("You got them all! Here, the 5th statue piece.");
cm.removeAll(4001052);
cm.gainItem(4001048,1); //fifth piece
eim.giveEventPlayersExp(3500);
clearStage(5, eim);
eim.setIntProperty("statusStg5", 1);
}
} else {
cm.sendOk("You got them all here. Go search the others rooms of the tower.");
}
break;
case 920010700: //on the way up
if (eim.getIntProperty("statusStg6") == -1) {
var rnd1 = Math.floor(Math.random() * 5);
var rnd2 = Math.floor(Math.random() * 5);
while(rnd2 == rnd1) {
rnd2 = Math.floor(Math.random() * 5);
}
if(rnd1 > rnd2) {
rnd1 = rnd1 ^ rnd2;
rnd2 = rnd1 ^ rnd2;
rnd1 = rnd1 ^ rnd2;
}
var comb = "";
for(var i = 0; i < rnd1; i++) comb += "0";
comb += "1";
for(var i = rnd1 + 1; i < rnd2; i++) comb += "0";
comb += "1";
for(var i = rnd2 + 1; i < 5; i++) comb += "0";
eim.setProperty("stage6_c", "" + comb);
eim.setProperty("statusStg6", "0");
}
var comb = eim.getProperty("stage6_c");
if (eim.getIntProperty("statusStg6") == 0) {
var react = "";
var total = 0;
for(var i = 1; i <= 5; i++) {
if (cm.getMap().getReactorByName("" + i).getState() > 0) {
react += "1";
total += 1;
} else {
react += "0";
}
}
if (total != 2) {
cm.sendOk("There needs to be exactly 2 levers at the top of the map pushed on.");
} else {
var num_correct = 0;
var psh_correct = 0;
for (var i = 0; i < 5; i++) {
if (react.charCodeAt(i) == comb.charCodeAt(i)) {
num_correct++;
if(react.charAt(i) == '1') psh_correct++;
}
}
if (num_correct == 5) {
cm.sendOk("You found the right combination! Retrieve the statue piece from inside it!");
cm.getMap().getReactorByName("stone6").forceHitReactor(1);
eim.giveEventPlayersExp(3500);
clearStage(6, eim);
} else {
eim.showWrongEffect();
if (psh_correct >= 1) {
cm.sendOk("One of the pushed levers is correct.");
} else {
cm.sendOk("Both of the pushed levers are wrong.");
}
}
}
} else {
cm.sendOk("Nicely done!! Go check out the rest of the pieces.");
}
break;
case 920010800:
cm.sendNext("Please, find a way to defeat Papa Pixie! Once you've found the Dark Nependeath by placing seeds, you've found Papa Pixie! Defeat it, and get the Root of Life to save Minerva!!!");
break;
case 920010900:
cm.sendNext("This is the jail of the tower. You may find some goodies here, just be sure to clear the puzzles ahead as fast as possible.");
break;
case 920011000:
if(cm.getMap().countMonsters() > 0) {
cm.sendNext("This is the hidden room of the tower. After eliminating all monsters on this room, talk to me to gain access to the treasure room, leaving the center tower access behind.");
} else {
cm.warp(920011100);
}
break;
}
cm.dispose();
}
}
function clear() {
cm.showEffect(true, "quest/party/clear");
cm.playSound(true, "Party1/Clear");
}

View File

@@ -24,10 +24,6 @@
*@author Jvlaple
*/
var status = 0;
var itemArray = Array(2000004, 2000005, 2000006, 2002020, 2002021, 2002022, 2002023, 2002024, 2002025, 2002026, 2001000, 2001002, 2002015, 2050005, 2022179, 2020014, 2020015 /*End of Pots*/, 2100000, 2100001, 2100002, 2100003, 2100004, 2100005, /*End of Sacks*/
2061003, 2060003, 2060004, 2061004 /*End of Arrows*/, 2070006, 2070005, 2070007, 2070004 /*End of Stars*/, 2210000, 2210001, 2210002 /*End of Morph items*/ );
var itemQuan = Array(50, 20, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 5, 30, 2, 100, 50, 1, 1, 1, 1, 1, 1, 2000, 2000, 2000, 2000, 1, 1, 1, 1, 5, 5, 5);
var PQItems = new Array(4001022, 4001023);
function start() {
status = -1;
@@ -38,27 +34,36 @@ function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else {
status++;
status++;
if (cm.getPlayer().getMapId() == 920010100) { //Center tower
if (status == 0)
cm.sendNext("Thank you for not only restoring the statue, but rescuing me, Minerva, from the entrapment. May the blessing of the goddess be with you till the end...");
cm.sendYesNo("I have lifted the spell that was blocking the access to the tower's jail storages. You may find some goodies down there... Alternatively, you may want to be leaving now. Are you ready to exit?");
else if (status == 1) {
var eim = cm.getPlayer().getEventInstance();
eim.clearPQ();
cm.warp(920011300, 0);
cm.dispose();
}
} else if (cm.getPlayer().getMapId() == 920011100) {
if (status == 0)
cm.sendYesNo("So, are you ready to exit?");
else if (status == 1) {
cm.warp(920011300, 0);
cm.dispose();
}
} else if (cm.getPlayer().getMapId() == 920011300) {
if (status == 0)
cm.sendNext("Thank you for not only restoring the statue, but rescuing me, Minerva, from the entrapment. May the blessing of the goddess be with you till the end...");
cm.sendNext("Thank you for not only restoring the statue, but rescuing me, Minerva, from the entrapment. May the blessing of the goddess be with you till the end... As a token of gratitude, please accept this memento for your bravery.");
else if (status == 1) {
for (var i = 0; i < PQItems.length; i++)
cm.removeAll(PQItems[i]); // Remove All PQ Items :D
var randmm = (Math.random() * itemArray.length) | 0;
cm.gainItem(itemArray[randmm], itemQuan[randmm]);
cm.warp(200080101, 0);
cm.dispose();
if(cm.getEventInstance().giveEventReward(cm.getPlayer())) {
cm.warp(200080101, 0);
cm.dispose();
}
else {
cm.sendOk("Please make room on your inventory first.");
cm.dispose();
}
}
}
}
}
}

View File

@@ -61,53 +61,53 @@ function action(mode, type, selection) {
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)) {
if (!cm.canHold(4001158, 1)) {
cm.sendOk("Please make room in ETC.");
cm.dispose();
return;
}
cm.gainItem(4001129, 1);
cm.gainItem(4001158, 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.haveItem(4001158, 20)) {
if (cm.canHold(1003267,1)) {
cm.gainItem(1002573, -1);
cm.gainItem(4001129, -20);
cm.gainItem(4001158, -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.");
cm.sendOk("You need 20 #t4001158# to get the next hat.");
}
} else if (cm.haveItem(1002572, 1)) {
if (cm.haveItem(4001129, 20)) {
if (cm.haveItem(4001158, 20)) {
if (cm.canHold(1002573,1)) {
cm.gainItem(1002572, -1);
cm.gainItem(4001129, -20);
cm.gainItem(4001158, -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.");
cm.sendOk("You need 20 #t4001158# to get the next hat.");
}
} else {
if (cm.haveItem(4001129, 20)) {
if (cm.haveItem(4001158, 20)) {
if (cm.canHold(1002572,1)) {
cm.gainItem(4001129, -20);
cm.gainItem(4001158, -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.sendOk("You need 20 #t4001158# to get the next hat.");
}
}
}

View File

@@ -48,7 +48,7 @@ function action(mode, type, selection){
if (status == 0) {
cm.sendNext("To return back to the city, follow this way.");
} else {
cm.getPlayer().changeMap(103000000, cm.getClient().getChannelServer().getMapFactory().getMap(103000000).getRandomSpawnpoint());
cm.getPlayer().warp(103000000, cm.getClient().getChannelServer().getMapFactory().getMap(103000000).getRandomPlayerSpawnpoint());
cm.dispose();
}
} else {

View File

@@ -0,0 +1,9 @@
function enter(pi) {
if (pi.getPlayer().getParty() != null && pi.isLeader() && pi.haveItem(4001055,1)) {
pi.getEventInstance().warpEventTeam(920010100);
return true;
} else {
pi.playerMessage(5,"Please get the leader in this portal, make sure you have the Root of Life.");
return false;
}
}

View File

@@ -0,0 +1,10 @@
function enter(pi) {
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
pi.warp(920010910,0);
return true;
}
else {
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
return false;
}
}

View File

@@ -0,0 +1,10 @@
function enter(pi) {
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
pi.warp(920010920,0);
return true;
}
else {
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
return false;
}
}

View File

@@ -0,0 +1,10 @@
function enter(pi) {
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
pi.warp(920010930,0);
return true;
}
else {
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
return false;
}
}

View File

@@ -0,0 +1,46 @@
importPackage(Packages.tools);
function enter(pi) {
var map = pi.getMap();
var jailn = (pi.getMap().getId() / 10) % 10;
var maxToggles = (jailn == 1) ? 7 : 6;
var mapProp = pi.getEventInstance().getProperty("jail" + jailn);
if(mapProp == null) {
var seq = 0;
for(var i = 1; i <= maxToggles; i++) {
if(Math.random() < 0.5) seq += (1 << i);
}
pi.getEventInstance().setProperty("jail" + jailn, seq);
mapProp = seq;
}
mapProp = Number(mapProp);
if(mapProp != 0) {
var countMiss = 0;
for(var i = 1; i <= maxToggles; i++) {
if(!(pi.getMap().getReactorByName("lever" + i).getState() == (mapProp >> i) % 2)) {
countMiss++;
}
}
if(countMiss > 0) {
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Failed"));
pi.playerMessage(5, "The right combination of levers is needed to pass. " + countMiss + " lever(s) are misplaced.");
return false;
}
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
pi.getEventInstance().setProperty("jail" + jailn, "0");
}
pi.warp(pi.getMapId() + 2,0);
return true;
}

View File

@@ -3,28 +3,51 @@
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
*@author Jvlaple
*@author Ronan
*party3_r4pt
*/
function enter(pi) {
pi.warp(920010600, Math.random() * 3 > 1 ? 14 : 2);
return true;
var eim = pi.getEventInstance();
if(eim.getProperty("stage4_comb") == null) {
var r = Math.floor((Math.random() * 3)) + 1;
var s = Math.floor((Math.random() * 3)) + 1;
eim.setProperty("stage4_comb", "" + r + s);
}
var pname = Number(pi.getPortal().getName().substring(4, 6));
var cname = Number(eim.getProperty("stage4_comb"));
var secondPt = true;
if(pi.getPortal().getId() < 14) {
cname = Math.floor(cname / 10);
secondPt = false;
}
if ((pname % 10) == (cname % 10)) { //climb
var nextPortal;
if(secondPt) nextPortal = 1;
else nextPortal = pi.getPortal().getId() + 3;
pi.warp(pi.getMapId(), nextPortal);
} else { //fail
pi.warp(pi.getMapId(), 2);
}
return false;
}

View File

@@ -0,0 +1,54 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
*@author Ronan
*party3_r4pt
*/
function enter(pi) {
var eim = pi.getEventInstance();
if(eim.getProperty("stage6_comb") == null) {
var comb = "0";
for(var i = 0; i < 16; i++) {
var r = Math.floor((Math.random() * 4)) + 1;
comb += r.toString();
}
eim.setProperty("stage6_comb", comb);
}
var comb = eim.getProperty("stage6_comb");
var name = pi.getPortal().getName().substring(2, 5);
var portalId = parseInt(name, 10);
var pRow = Math.floor(portalId / 10);
var pCol = portalId % 10;
if (pCol == parseInt(comb.substring(pRow, pRow + 1), 10)) { //climb
pi.warp(pi.getMapId(), (pRow % 4 != 0) ? pi.getPortal().getId() + 4 : (pRow / 4));
} else { //fail
pi.warp(pi.getMapId(), 5);
}
return false;
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(920010200, 13);
return true;
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(920010300, 1);
return true;
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(920010400, 8);
return true;
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(920010500, 3);
return true;
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(920010600, 17);
return true;
}

View File

@@ -0,0 +1,4 @@
function enter(pi) {
pi.warp(920010700, 23);
return true;
}

View File

@@ -0,0 +1,10 @@
function enter(pi) {
if(pi.getEventInstance().getIntProperty("statusStg8") == 1) {
pi.warp(920011000,0);
return true;
}
else {
pi.playerMessage(5, "The storage is currently inaccessible, as the powers of the Pixies remains active within the tower.");
return false;
}
}

Some files were not shown because too many files have changed in this diff Show More