Source for my MapleSolaxiaV2 (v83 MapleStory).
This commit is contained in:
ronancpl
2015-11-02 23:17:21 -02:00
parent 324982e94f
commit 972517e7b2
1675 changed files with 261831 additions and 0 deletions

45
scripts/NPC Base.js Normal file
View File

@@ -0,0 +1,45 @@
/*
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/>.
*/
/* NPC Base
Map Name (Map ID)
Extra NPC info.
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode < 0)
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0 && mode == 1) {
}
}
}

70
scripts/event/2xEvent.js Normal file
View File

@@ -0,0 +1,70 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
2x EXP Event Script
-- Author --------------------------------------------------------------------------------------
Twdtwd
**/
var timer1;
var timer2;
var timer3;
var timer4;
importPackage(Packages.client);
function init() {
/*
if(em.getChannelServer().getId() == 1) { // Only run on channel 1.
// AEST
timer1 = em.scheduleAtTimestamp("start", 1428220800000);
timer2 = em.scheduleAtTimestamp("stop", 1428228000000);
// EDT
timer1 = em.scheduleAtTimestamp("start", 1428271200000);
timer2 = em.scheduleAtTimestamp("stop", 1428278400000);
}
*/
}
function cancelSchedule() {
if (timer1 != null)
timer1.cancel(true);
if (timer2 != null)
timer2.cancel(true);
if (timer3 != null)
timer3.cancel(true);
if (timer4 != null)
timer4.cancel(true);
}
function start() {
var world = Packages.net.server.Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(8);
world.broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(6, "The Bunny Onslaught Survival Scanner (BOSS) has detected an Easter Bunny onslaught soon! The GM team has activated the Emergency XP Pool (EXP) that doubles experience gained for the next two hours!"));
}
function stop() {
var world = Packages.net.server.Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(4);
world.broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(6, "Unfortunately the Emergency XP Pool (EXP) has run out of juice for now and needs to recharge causing the EXP rate to go back to normal."));
}

143
scripts/event/3rdjob.js Normal file
View File

@@ -0,0 +1,143 @@
importPackage(Packages.client);
importPackage(Packages.server.life);
importPackage(Packages.tools);
importPackage(Packages.client.inventory);
function init() {
}
function monsterValue(eim, mobId) {
return 1;
}
function setClassVars(player) {
var returnMapId;
var monsterId;
var mapId;
if (player.getJob().equals(MapleJob.FP_WIZARD) ||
player.getJob().equals(MapleJob.IL_WIZARD) ||
player.getJob().equals(MapleJob.CLERIC)) {
mapId = 108010201;
returnMapId = 100040106;
monsterId = 9001001;
} else if (player.getJob().equals(MapleJob.FIGHTER) ||
player.getJob().equals(MapleJob.PAGE) ||
player.getJob().equals(MapleJob.SPEARMAN)) {
mapId = 108010301;
returnMapId = 105070001;
monsterId = 9001000;
} else if (player.getJob().equals(MapleJob.ASSASSIN) ||
player.getJob().equals(MapleJob.BANDIT)) {
mapId = 108010401;
returnMapId = 107000402;
monsterId = 9001003;
} else if (player.getJob().equals(MapleJob.HUNTER) ||
player.getJob().equals(MapleJob.CROSSBOWMAN)) {
mapId = 108010101;
returnMapId = 105040305;
monsterId = 9001002;
} else if (player.getJob().equals(MapleJob.BRAWLER) ||
player.getJob().equals(MapleJob.GUNSLINGER)) {
mapId = 108010501;
returnMapId = 105040305;
monsterId = 9001008;
}
return new Array(mapId, returnMapId, monsterId);
}
function playerEntry(eim, player) {
var info = setClassVars(player);
var mapId = info[0];
var returnMapId = info[1];
var monsterId = info[2];
var map = eim.getMapInstance(mapId);
map.toggleDrops();
player.changeMap(map, map.getPortal(0));
var mob = map.getMonsterById(monsterId);
eim.registerMonster(mob);
eim.schedule("warpOut", 20 * 60 * 1000);
map.addMapTimer(20 * 60);
}
function playerDead(eim, player) {
var info = setClassVars(player);
var mapId = info[0];
var returnMapId = info[1];
var monsterId = info[2];
player.setHp(1);
var returnMap = em.getChannelServer().getMapFactory().getMap(returnMapId);
player.changeMap(returnMap, returnMap.getPortal(0));
eim.unregisterPlayer(player);
eim.dispose();
}
function playerDisconnected(eim, player) {
var info = setClassVars(player);
var mapId = info[0];
var returnMapId = info[1];
var monsterId = info[2];
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
var returnMap = em.getChannelServer().getMapFactory().getMap(returnMapId);
player.setMap(returnMap);
eim.dispose();
}
function allMonstersDead(eim) {
var winner = eim.getPlayers().get(0);
var info = setClassVars(winner);
var mapId = info[0];
var returnMapId = info[1];
var monsterId = info[2];
var map = eim.getMapFactory().getMap(mapId);
map.spawnItemDrop(winner, winner, new Item(4031059, 0, 1), winner.getPosition(), true, false);
eim.schedule("warpOut", 12 * 60 * 1000);
map.addMapTimer(12 * 60);
}
function cancelSchedule(eim) {
}
function warpOut(eim) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
var info = setClassVars(player);
var mapId = info[0];
var returnMapId = info[1];
var monsterId = info[2];
var returnMap = em.getChannelServer().getMapFactory().getMap(returnMapId);
player.changeMap(returnMap, returnMap.getPortal(0));
eim.unregisterPlayer(player);
}
eim.dispose();
}
function leftParty(eim, player) {
}
function disbandParty(eim, player) {
}
function dispose() {
}
function cancelSchedule(eim) {
}

175
scripts/event/4jberserk.js Normal file
View File

@@ -0,0 +1,175 @@
/*
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/>.
*/
var exitMap;
var instanceId;
var minPlayers = 3;
function init() {
instanceId = 1;
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
exitMap = em.getChannelServer().getMapFactory().getMap(105090800); // <exit>
var instanceName = "4jberserk" + instanceId;
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
instanceId++;
var map = mf.getMap(910500200);
map.addMapTimer(3*60);
em.schedule("timeOut", 20 * 60000);
//you can't warp up to the rocks until all rogs are dead, I think?
eim.setProperty("canWarp","false");
return eim;
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(910500200);
player.changeMap(map, map.getPortal(0));
//TODO: hold time across map changes
//player.getClient().getSession().write(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 2 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
//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 { //boot d/ced player
// If only 2 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 2 players are left, uncompletable:
var party = eim.getPlayers();
if (true) {
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.changeMap(exitMap, exitMap.getPortal(0));
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function allMonstersDead(eim) {
eim.setProperty("canWarp","true");
}
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();
}
}

144
scripts/event/4jrush.js Normal file
View File

@@ -0,0 +1,144 @@
/*
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 AngelSL
*
* 4th Job Rush Quest.
* Based on Kerning City PQ script by Stereo
*/
var exitMap;
var instanceId;
var minPlayers = 3;
function init() {
instanceId = 1;
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
exitMap = em.getChannelServer().getMapFactory().getMap(105090700); // <exit>
var instanceName = "4jrush" + instanceId;
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
instanceId++;
var map = mf.getMap(910500100);
map.addMapTimer(20*60);
em.schedule("timeOut", 20 * 60000);
return eim;
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(910500100);
player.changeMap(map, map.getPortal(0));
}
function playerDead(eim, player) {
}
function playerRevive(eim, player) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function playerDisconnected(eim, player) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
if (party.get(i).equals(player)) {
removePlayer(eim, player);
}
else {
playerExit(eim, party.get(i));
}
}
eim.dispose();
}
function leftParty(eim, player) {
// If only 2 players are left, uncompletable:
var party = eim.getPlayers();
if (true) {
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.changeMap(exitMap, exitMap.getPortal(0));
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
//KPQ does nothing special with winners
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function allMonstersDead(eim) {
//do nothing; KPQ has nothing to do with monster killing
}
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();
}
}

47
scripts/event/AirPlane.js Normal file
View File

@@ -0,0 +1,47 @@
importPackage(Packages.tools);
//Time Setting is in millisecond
var closeTime = 24 * 1000; //The time to close the gate
var beginTime = 30 * 1000; //The time to begin the ride
var rideTime = 15 * 1000; //The time that require move to destination
var KC_bfd;
var Plane_to_CBD;
var CBD_docked;
var CBD_bfd;
var Plane_to_KC;
var KC_docked;
function init() {
KC_bfd = em.getChannelServer().getMapFactory().getMap(540010100);
CBD_bfd = em.getChannelServer().getMapFactory().getMap(540010001);
Plane_to_CBD = em.getChannelServer().getMapFactory().getMap(540010101);
Plane_to_KC = em.getChannelServer().getMapFactory().getMap(540010002);
CBD_docked = em.getChannelServer().getMapFactory().getMap(540010000);
KC_docked = em.getChannelServer().getMapFactory().getMap(103000000);
scheduleNew();
}
function scheduleNew() {
em.schedule("stopEntry", closeTime);
em.schedule("takeoff", beginTime);
}
function stopEntry() {
em.setProperty("entry","false");
}
function takeoff() {
em.setProperty("entry", "true");
KC_bfd.warpEveryone(Plane_to_CBD.getId());
CBD_bfd.warpEveryone(Plane_to_KC.getId());
em.schedule("arrived", rideTime);
scheduleNew();
}
function arrived() {
Plane_to_CBD.warpEveryone(CBD_docked.getId());
Plane_to_KC.warpEveryone(KC_docked.getId());
}
function cancelSchedule() {
}

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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Deo Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var royalCatthusDesert = em.getChannelServer().getMapFactory().getMap(260010201);
var deo = Packages.server.life.MapleLifeFactory.getMonster(3220001);
if(royalCatthusDesert.getMonsterById(3220001) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Packages.java.awt.Point(645, 275));
royalCatthusDesert.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust."));
em.schedule("start", 3 * 60 *60 * 1000);
}

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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Dyle Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.server.life);
importPackage(Packages.tools);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var dangeroudCroko1 = em.getChannelServer().getMapFactory().getMap(107000300);
if(dangeroudCroko1.getMonsterById(6220000) != null) {
setupTask = em.schedule("start", 3 * 60 *60 * 1000);
return;
}
dangeroudCroko1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(6220000), new Packages.java.awt.Point(90, 119));
dangeroudCroko1.broadcastMessage(MaplePacketCreator.serverNotice(6, "The huge crocodile Dyle has come out from the swamp."));
setupTask = em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,59 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Eliza1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
var setupTask;
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var stairwayToTheSky2 = em.getChannelServer().getMapFactory().getMap(200010300);
var eliza = Packages.server.life.MapleLifeFactory.getMonster(8220000);
if(stairwayToTheSky2.getMonsterById(8220000) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
stairwayToTheSky2.spawnMonsterOnGroundBelow(eliza, new Packages.java.awt.Point(208, 83));
stairwayToTheSky2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Eliza has appeared with a black whirlwind."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,57 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Faust1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var theForestOfEvil1 = em.getChannelServer().getMapFactory().getMap(100040105);
var faust1 = Packages.server.life.MapleLifeFactory.getMonster(5220002);
if(theForestOfEvil1.getMonsterById(5220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
theForestOfEvil1.spawnMonsterOnGroundBelow(faust1, new Packages.java.awt.Point(456, 278));
theForestOfEvil1.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,57 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Faust2 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var theForestOfEvil2 = em.getChannelServer().getMapFactory().getMap(100040106);
var faust2 = Packages.server.life.MapleLifeFactory.getMonster(5220002);
if(theForestOfEvil2.getMonsterById(5220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
theForestOfEvil2.spawnMonsterOnGroundBelow(faust2, new Packages.java.awt.Point(474, 278));
theForestOfEvil2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,60 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Chimera/Kimera Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var labSecretBasementPath = em.getChannelServer().getMapFactory().getMap(261030000);
var chimera = Packages.server.life.MapleLifeFactory.getMonster(8220002);
if(labSecretBasementPath.getMonsterById(8220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var posX;
var posY = 180;
posX = (Math.floor(Math.random() * 900) - 900);
labSecretBasementPath.spawnMonsterOnGroundBelow(chimera, new Packages.java.awt.Point(posX, posY));
labSecretBasementPath.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Kimera has appeared out of the darkness of the underground with a glitter in her eyes."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,60 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
King Clang Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
var hotSand;
function init() {
hotSand = em.getChannelServer().getMapFactory().getMap(110040000);
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
if(hotSand.getMonsterById(5220001) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var kingClang = Packages.server.life.MapleLifeFactory.getMonster(5220001);
var posX;
var posY = 140;
posX = Math.floor((Math.random() * 2400) - 1600);
hotSand.spawnMonsterOnGroundBelow(kingClang, new Packages.java.awt.Point(posX, posY));
hotSand.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "A strange turban shell has appeared on the beach."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,59 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
King Sage Cat Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var goblinForest2 = em.getChannelServer().getMapFactory().getMap(250010504);
var kingSageCat = Packages.server.life.MapleLifeFactory.getMonster(7220002);
if(goblinForest2.getMonsterById(7220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var posX;
var posY = 540;
posX = Math.floor((Math.random() * 1300) - 500);
goblinForest2.spawnMonsterOnGroundBelow(kingSageCat, new Packages.java.awt.Point(posX, posY));
goblinForest2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "The ghostly air around here has become stronger. The unpleasant sound of a cat crying can be heard."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,59 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Leviathan Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var leviathansCanyon = em.getChannelServer().getMapFactory().getMap(240040401);
var leviathan = Packages.server.life.MapleLifeFactory.getMonster(8220003);
if(leviathansCanyon.getMonsterById(8220003) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var posX;
var posY = 1125;
posX = Math.floor((Math.random() * 600) - 300);
leviathansCanyon.spawnMonsterOnGroundBelow(leviathan, new Packages.java.awt.Point(posX, posY));
leviathansCanyon.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Leviathan emerges from the canyon and the cold icy wind blows."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,58 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Mano Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var thicketAroundTheBeach3 = em.getChannelServer().getMapFactory().getMap(104000400);
var mano = Packages.server.life.MapleLifeFactory.getMonster(2220000);
if(thicketAroundTheBeach3.getMonsterById(2220000) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var posX;
var posY = 455;
posX = Math.floor((Math.random() * 605) + 110);
thicketAroundTheBeach3.spawnMonsterOnGroundBelow(mano, new Packages.java.awt.Point(posX, posY));
thicketAroundTheBeach3.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "A cool breeze was felt when Mano appeared."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,58 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Nine Tailed Fox (Old Fox) Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var moonRidge = em.getChannelServer().getMapFactory().getMap(222010310);
var nineTailedFox = Packages.server.life.MapleLifeFactory.getMonster(7220001);
if(moonRidge.getMonsterById(7220001) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var posX;
var posY = 33;
posX = Math.floor((Math.random() * 1300) - 800);
moonRidge.spawnMonsterOnGroundBelow(nineTailedFox, new Packages.java.awt.Point(posX, posY));
moonRidge.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "As the moon light dims, a long fox cry can be heard and the presence of the old fox can be felt"));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -0,0 +1,61 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Seruf Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var theSeaweedTower = em.getChannelServer().getMapFactory().getMap(230020100);
var seruf = Packages.server.life.MapleLifeFactory.getMonster(4220001);
if(theSeaweedTower.getMonsterById(4220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 520;
posX = Math.floor((Math.random() * 2300) - 1500);
theSeaweedTower.spawnMonsterOnGroundBelow(seruf, new Packages.java.awt.Point(posX, posY));
theSeaweedTower.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "A strange shell has appeared from a grove of seaweed"));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,60 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Stumpy Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var eastRockyMountain5 = em.getChannelServer().getMapFactory().getMap(101030404);
var stumpy = Packages.server.life.MapleLifeFactory.getMonster(3220000);
if(eastRockyMountain5.getMonsterById(3220000) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1280;
posX = Math.floor((Math.random() * 800) + 400);
eastRockyMountain5.spawnMonsterOnGroundBelow(stumpy, new Packages.java.awt.Point(posX, posY));
eastRockyMountain5.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Stumpy has appeared with a stumping sound that rings the Stone Mountain."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,60 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Tae Roon Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var territoryOfWanderingBear = em.getChannelServer().getMapFactory().getMap(250010304);
var taeRoon = Packages.server.life.MapleLifeFactory.getMonster(7220000);
if(territoryOfWanderingBear.getMonsterById(7220000) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 390;
posX = Math.floor((Math.random() * 700) - 800);
territoryOfWanderingBear.spawnMonsterOnGroundBelow(taeRoon, new Packages.java.awt.Point(posX, posY));
territoryOfWanderingBear.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tae Roon has appeared with a soft whistling sound."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,59 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Timer1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var whirlpoolOfTime = em.getChannelServer().getMapFactory().getMap(220050100);
var timer1 = Packages.server.life.MapleLifeFactory.getMonster(5220003);
if(whirlpoolOfTime.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1030;
posX = Math.floor((Math.random() * 770) - 770);
whirlpoolOfTime.spawnMonsterOnGroundBelow(timer1, new Packages.java.awt.Point(posX, posY));
whirlpoolOfTime.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,60 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Timer2 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var lostTime1 = em.getChannelServer().getMapFactory().getMap(220050000);
var timer2 = Packages.server.life.MapleLifeFactory.getMonster(5220003);
if(lostTime1.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1030;
posX = Math.floor((Math.random() * 1400) - 1000);
lostTime1.spawnMonsterOnGroundBelow(timer2, new Packages.java.awt.Point(posX, posY));
lostTime1.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -0,0 +1,61 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Timer3 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
importPackage(Packages.client);
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var lostTime2 = em.getChannelServer().getMapFactory().getMap(220050200);
var timer3 = Packages.server.life.MapleLifeFactory.getMonster(5220003);
if(lostTime2.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1030;
posX = Math.floor((Math.random() * 1400) - 700);
lostTime2.spawnMonsterOnGroundBelow(timer3, new Packages.java.awt.Point(posX, posY));
lostTime2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Zeno Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
}
function scheduleNew() {
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
}
function cancelSchedule() {
if (setupTask != null)
setupTask.cancel(true);
}
function start() {
var graysPrairie = em.getChannelServer().getMapFactory().getMap(221040301);
var zeno = Packages.server.life.MapleLifeFactory.getMonster(6220001);
if(graysPrairie.getMonsterById(6220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
graysPrairie.spawnMonsterOnGroundBelow(zeno, new Packages.java.awt.Point(-4224, 776));
graysPrairie.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

103
scripts/event/Boats.js Normal file
View File

@@ -0,0 +1,103 @@
importPackage(Packages.client);
importPackage(Packages.tools);
importPackage(Packages.server.life);
//Time Setting is in millisecond
var closeTime = 50 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 120 * 1000; //The time that require move to destination
var invasionTime = 30 * 1000; //The time that spawn balrog
var Orbis_btf;
var Boat_to_Orbis;
var Orbis_Boat_Cabin;
var Orbis_docked;
var Ellinia_btf;
var Ellinia_Boat_Cabin;
var Ellinia_docked;
function init() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000112);
Ellinia_btf = em.getChannelServer().getMapFactory().getMap(101000301);
Boat_to_Orbis = em.getChannelServer().getMapFactory().getMap(200090010);
Boat_to_Ellinia = em.getChannelServer().getMapFactory().getMap(200090000);
Orbis_Boat_Cabin = em.getChannelServer().getMapFactory().getMap(200090011);
Ellinia_Boat_Cabin = em.getChannelServer().getMapFactory().getMap(200090001);
Ellinia_docked = em.getChannelServer().getMapFactory().getMap(101000300);
Orbis_Station = em.getChannelServer().getMapFactory().getMap(200000100);
Orbis_docked = em.getChannelServer().getMapFactory().getMap(200000111);
OBoatsetup();
EBoatsetup();
scheduleNew();
}
function scheduleNew() {
Ellinia_docked.setDocked(true);
Orbis_docked.setDocked(true);
Ellinia_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
em.setProperty("docked", "true");
em.setProperty("entry", "true");
em.setProperty("haveBalrog","false");
em.schedule("stopentry", closeTime);
em.schedule("takeoff", beginTime);
}
function stopentry() {
em.setProperty("entry","false");
Orbis_Boat_Cabin.resetReactors();
Ellinia_Boat_Cabin.resetReactors();
}
function takeoff() {
em.setProperty("docked","false");
Orbis_btf.warpEveryone(Boat_to_Ellinia.getId());
Ellinia_btf.warpEveryone(Boat_to_Orbis.getId());
Ellinia_docked.setDocked(false);
Orbis_docked.setDocked(false);
Ellinia_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
em.schedule("invasion", invasionTime);
em.schedule("arrived", rideTime);
}
function arrived() {
Boat_to_Orbis.warpEveryone(Orbis_Station.getId());
Orbis_Boat_Cabin.warpEveryone(Orbis_Station.getId());
Boat_to_Ellinia.warpEveryone(Ellinia_docked.getId());
Ellinia_Boat_Cabin.warpEveryone(Ellinia_docked.getId());
Boat_to_Orbis.killAllMonsters();
Boat_to_Ellinia.killAllMonsters();
scheduleNew();
}
function invasion() {
var numspawn = 2;
if(numspawn > 0) {
for(var i=0; i < numspawn; i++) {
Boat_to_Orbis.spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8150000), new java.awt.Point(485, -221));
Boat_to_Ellinia.spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8150000), new java.awt.Point(-590, -221));
}
Boat_to_Orbis.setDocked(true);
Boat_to_Ellinia.setDocked(true);
Boat_to_Orbis.broadcastMessage(MaplePacketCreator.boatPacket(true));
Boat_to_Ellinia.broadcastMessage(MaplePacketCreator.boatPacket(true));
Boat_to_Orbis.broadcastMessage(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
Boat_to_Ellinia.broadcastMessage(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
em.setProperty("haveBalrog","true");
}
}
function OBoatsetup() {
em.getChannelServer().getMapFactory().getMap(200090011).getPortal("out00").setScriptName("OBoat1");
em.getChannelServer().getMapFactory().getMap(200090011).getPortal("out01").setScriptName("OBoat2");
}
function EBoatsetup() {
em.getChannelServer().getMapFactory().getMap(200090001).getPortal("out00").setScriptName("EBoat1");
em.getChannelServer().getMapFactory().getMap(200090001).getPortal("out01").setScriptName("EBoat2");
}
function cancelSchedule() {
}

191
scripts/event/CWKPQ.js Normal file
View File

@@ -0,0 +1,191 @@
var mapz = Array(100, 200, 300, 400, 500, 510, 520, 521, 522, 530, 540, 550, 600, 700, 800);
var a = Array("a", "b", "c", "d", "e", "f", "g", "h", "i");
/*
a1,3,6
b1-7
c1,3,6
d1-7
e1-7
f1,3,6
g1-7
h1,3,6
i1-7
*/
var pos_x = Array(944,401,28,-332,-855);
var pos_y = Array(-204,-384,-504,-384,-204);
var pos_y2 = Array(-144, -444, -744, -1044, -1344, -1644);
function init() {
em.setProperty("state", "0");
em.setProperty("leader", "true");
}
function setup(eim, leaderid) {
em.setProperty("state", "1");
em.setProperty("leader", "true");
em.setProperty("current_instance", "0");
em.setProperty("glpq1", "0");
em.setProperty("glpq2", "0");
em.setProperty("glpq3", "0");
em.setProperty("glpq4", "0");
em.setProperty("glpq5", "0");
em.setProperty("glpq6", "0");
var eim = em.newInstance("CWKPQ" + leaderid);
for (var i = 0; i < mapz.length; i++) {
var map = eim.setInstanceMap(610030000 + mapz[i]);
if (map != null) {
map.resetFully();
if (map.getId() == 610030400) {
map.setReactorState(); //because everything is at 0 =[
map.limitReactor(6109016, 1);
map.limitReactor(6109017, 1);
map.limitReactor(6109018, 1);
map.limitReactor(6109019, 1);
map.limitReactor(6109020, 1);
map.shuffleReactors(6109016, 6109020);
map.destroyReactors(6108000, 6108005); //destroy the fake ones, non-GMS like or is this necessary
//add environments
for (var x = 0; x < a.length; x++) {
for (var y = 1; y <= 7; y++) {
if (x == 1 || x == 3 || x == 4 || x == 6 || x == 8) {
if (y != 2 && y != 4 && y != 5 && y != 7) {
map.moveEnvironment(a[x] + "" + y, 1);
}
} else {
map.moveEnvironment(a[x] + "" + y, 1);
}
}
}
} else if (map.getId() == 610030510) { //warrior room, crimson guardians
for (var z = 0; z < pos_y2.length; z++) {
var mob = em.getMonster(9400582);
eim.registerMonster(mob);
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(0, pos_y2[z]));
}
//skipping mage room, ehh
} else if (map.getId() == 610030540) { //bowman room, spawn master guardians
for (var z = 0; z < pos_x.length; z++) {
var mob = em.getMonster(9400594);
eim.registerMonster(mob);
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(pos_x[z], pos_y[z]));
}
} else if (map.getId() == 610030550) {
map.shuffleReactors(); //pirate room
}
}
}
eim.startEventTimer(120000); //2 MIN for first stg
eim.schedule("spawnGuardians", 60000);
return eim;
}
function playerEntry(eim, player) {
eim.broadcastPlayerMsg(5, "[Expedition] " + player.getName() + " has entered the map.");
var map = eim.getMapInstance(610030100 + (parseInt(em.getProperty("current_instance")) * 100));
player.changeMap(map, map.getPortal(0));
}
function spawnGuardians(eim) {
var map = eim.getMapInstance(0);
if (map.getCharactersSize() <= 0) {
return;
}
eim.broadcastPlayerMsg(5, "The Master Guardians have detected you.");
for (var i = 0; i < 20; i++) { //spawn 20 guardians
var mob = em.getMonster(9400594);
eim.registerMonster(mob);
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(1000, 336));
}
}
function playerRevive(eim, player) {
}
function scheduledTimeout(eim) {
end(eim);
}
function changedMap(eim, player, mapid) {
if (mapid < 610030100 || mapid > 610030800) {
playerExit(eim,player);
} else {
switch(mapid) {
case 610030200:
if (em.getProperty("current_instance").equals("0")) {
eim.restartEventTimer(600000); //10 mins
em.setProperty("current_instance", "1");
}
break;
case 610030300:
if (em.getProperty("current_instance").equals("1")) {
eim.restartEventTimer(600000); //10 mins
em.setProperty("current_instance", "2");
}
break;
case 610030400:
if (em.getProperty("current_instance").equals("2")) {
eim.restartEventTimer(600000); //10 mins
em.setProperty("current_instance", "3");
}
break;
case 610030500:
if (em.getProperty("current_instance").equals("3")) {
eim.restartEventTimer(1200000); //20 mins
em.setProperty("current_instance", "4");
}
break;
case 610030600:
if (em.getProperty("current_instance").equals("4")) {
eim.restartEventTimer(3600000); //1 hr
em.setProperty("current_instance", "5");
}
break;
case 610030800:
if (em.getProperty("current_instance").equals("5")) {
eim.restartEventTimer(60000); //1 min
em.setProperty("current_instance", "6");
}
break;
}
}
}
function playerDisconnected(eim, player) {
return 0;
}
function monsterValue(eim, mobId) {
return 1;
}
function playerExit(eim, player) {
eim.broadcastPlayerMsg(5, "[Expedition] " + player.getName() + " has left the map.");
eim.unregisterPlayer(player);
if (eim.disposeIfPlayerBelow(0, 0)) {
em.setProperty("state", "0");
em.setProperty("leader", "true");
}
}
function end(eim) {
eim.disposeIfPlayerBelow(100, 610030010);
em.setProperty("state", "0");
em.setProperty("leader", "true");
}
function clearPQ(eim) {
end(eim);
}
function allMonstersDead(eim) {
}
function leftParty (eim, player) {
}
function disbandParty (eim) {
}
function playerDead(eim, player) {}
function cancelSchedule() {}

102
scripts/event/Cabin.js Normal file
View File

@@ -0,0 +1,102 @@
/*
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/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Cabin between Orbis and Leafre
-- By ---------------------------------------------------------------------------------------------
Information
-- Version Info -----------------------------------------------------------------------------------
1.5 - Fix for infinity looping [Information]
1.4 - Ship/boat is now showed
- Removed temp message[Information]
- Credit to Snow/superraz777 for old source
- Credit to Titan/Kool for the ship/boat packet
1.3 - Removing some function since is not needed [Information]
- Remove register player menthod [Information]
1.2 - It should be 2 ships not 1 [Information]
1.1 - Add timer variable for easy edit [Information]
1.0 - First Version by Information
---------------------------------------------------------------------------------------------------
**/
importPackage(Packages.tools);
//Time Setting is in millisecond
var closeTime = 60 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 60 * 1000; //The time that require move to destination
var Orbis_btf;
var Leafre_btf;
var Cabin_to_Orbis;
var Cabin_to_Leafre;
var Orbis_docked;
var Leafre_docked;
function init() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000132);
Leafre_btf = em.getChannelServer().getMapFactory().getMap(240000111);
Cabin_to_Orbis = em.getChannelServer().getMapFactory().getMap(200090210);
Cabin_to_Leafre = em.getChannelServer().getMapFactory().getMap(200090200);
Orbis_docked = em.getChannelServer().getMapFactory().getMap(200000131);
Leafre_docked = em.getChannelServer().getMapFactory().getMap(240000110);
Orbis_Station = em.getChannelServer().getMapFactory().getMap(200000100);
Leafre_Station = em.getChannelServer().getMapFactory().getMap(240000100);
scheduleNew();
}
function scheduleNew() {
Leafre_docked.setDocked(true);
Orbis_docked.setDocked(true);
Leafre_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
em.setProperty("docked", "true");
em.setProperty("entry", "true");
em.schedule("stopEntry", closeTime);
em.schedule("takeoff", beginTime);
}
function stopEntry() {
em.setProperty("entry","false");
}
function takeoff() {
Leafre_docked.setDocked(false);
Orbis_docked.setDocked(false);
Leafre_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
em.setProperty("docked","false");
Orbis_btf.warpEveryone(Cabin_to_Leafre.getId());
Leafre_btf.warpEveryone(Cabin_to_Orbis.getId());
em.schedule("arrived", rideTime);
}
function arrived() {
Cabin_to_Orbis.warpEveryone(Orbis_Station.getId());
Cabin_to_Leafre.warpEveryone(Leafre_Station.getId());
scheduleNew();
}
function cancelSchedule() {
}

View File

@@ -0,0 +1,190 @@
/*
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 Jvlaple
*
* Wedding for odinMS
*/
importPackage(java.lang);
importPackage(Packages.world);
importPackage(Packages.client);
importPackage(Packages.server.maps);
var exitMap;
var altarMap;
var cakeMap;
var instanceId;
var minPlayers = 1;
function init() {
exitMap = em.getChannelServer().getMapFactory().getMap(680000500); //Teh exit map :) <---------t
altarMap = em.getChannelServer().getMapFactory().getMap(680000210); //Teh altar map
cakeMap = em.getChannelServer().getMapFactory().getMap(680000300); //Teh cake
instanceId = 1;
}
function monsterValue(eim, mobId) {
return 1;
}
function setup(eim) {
var instanceName = "CathedralWedding" + instanceId;
var eim = em.newInstance(instanceName);
instanceId++;
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
var map = mf.getMap(680000200);//wutt
//Lets make the clock continue through all maps xD
em.schedule("playerAltar", 3 * 60000);
eim.setProperty("hclicked", 0);
eim.setProperty("wclicked", 0);
eim.setProperty("entryTimestamp",System.currentTimeMillis() + (3 * 60000));
return eim;
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(680000200);
player.changeMap(map, map.getPortal(0));
//1st - 20 min 2nd - 5 min 3rd 5 min xD
//player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(1200));
//player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(180));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock((Long.parseLong(eim.getProperty("entryTimestamp")) - System.currentTimeMillis()) / 1000));
}
//lets forget this bullshit...
function playerDead(eim, player) {
}
function playerRevive(eim, player) {
//how the fuck can this happen? o.O
}
function playerDisconnected(eim, player) {
playerExit(eim, player);//kick him/her
}
function leftParty(eim, player) { //this doesnt fucking matter...
}
function disbandParty(eim) {
}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
function playerWarpAltar(eim, player) {
if ((player.getName() != eim.getProperty("husband")) && (player.getName() != eim.getProperty("wife"))){
player.changeMap(altarMap, altarMap.getPortal(0));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(300));
}else{
player.changeMap(altarMap, altarMap.getPortal(2));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(300));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.serverNotice(6, "Please talk to High Priest John now!"));
}
}
function playerWarpCake(eim, player) {
player.changeMap(cakeMap, cakeMap.getPortal(0));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(300));
}
function playerAltar(eim, player) {
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerWarpAltar(eim, pIter.next());
}
}
em.schedule("playerCake", 5 * 60000);
//eim.dispose();
}
}
function playerCake(eim, player) {
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerWarpCake(eim, pIter.next());
}
}
em.schedule("timeOut", 5 * 60000);
//eim.dispose();
}
}
//Those offline cuntts
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
//Wedding? IDK about gifts o.O
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function allMonstersDead(eim) {
}
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() {
}

View File

@@ -0,0 +1,91 @@
/*
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/>.
*/
/**
*Dollhouse Event
**/
importPackage(Packages.tools);
var returnMap;
var map;
var eim;
function init() {
em.setProperty("noEntry","false");
}
function playerEntry(eim, player) {
returnMap = em.getChannelServer().getMapFactory().getMap(221024400);
eim = em.getInstance("DollHouse");
map = eim.getMapFactory().getMap(922000010);
player.changeMap(map, map.getPortal(0));
map.shuffleReactors();
em.setProperty("noEntry","true");
em.schedule("timeOut", 600000);
player.getClient().getSession().write(MaplePacketCreator.getClock(600));
}
function playerExit(eim, player) {
em.setProperty("noEntry","false");
player.changeMap(returnMap, returnMap.getPortal(4));
eim.unregisterPlayer(player);
em.cancel();
em.disposeInstance("DollHouse");
eim.dispose();
}
function timeOut() {
em.setProperty("noEntry","false");
var player = eim.getPlayers().get(0);
player.changeMap(returnMap, returnMap.getPortal(4));
eim.unregisterPlayer(player);
em.cancel();
em.disposeInstance("DollHouse");
eim.dispose();
}
function playerDisconnected(eim, player) {
em.setProperty("noEntry","false");
player.getMap().removePlayer(player);
player.setMap(returnMap);
eim.unregisterPlayer(player);
em.cancel();
em.disposeInstance("DollHouse");
eim.dispose();
}
function clear(eim) {
em.setProperty("noEntry","false");
var player = eim.getPlayers().get(0);
player.changeMap(returnMap, returnMap.getPortal(4));
eim.unregisterPlayer(player);
em.cancel();
em.disposeInstance("DollHouse");
eim.dispose();
}
function cancelSchedule() {
}
function dispose() {
}

79
scripts/event/Genie.js Normal file
View File

@@ -0,0 +1,79 @@
/*
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/>.
*/
importPackage(Packages.tools);
//Time Setting is in millisecond
var closeTime = 60 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 60 * 1000; //The time that require move to destination
var Orbis_btf;
var Genie_to_Orbis;
var Orbis_docked;
var Ariant_btf;
var Genie_to_Ariant;
var Ariant_docked;
function init() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000152);
Ariant_btf = em.getChannelServer().getMapFactory().getMap(260000110);
Genie_to_Orbis = em.getChannelServer().getMapFactory().getMap(200090410);
Genie_to_Ariant = em.getChannelServer().getMapFactory().getMap(200090400);
Orbis_docked = em.getChannelServer().getMapFactory().getMap(200000151);
Ariant_docked = em.getChannelServer().getMapFactory().getMap(260000100);
Orbis_Station = em.getChannelServer().getMapFactory().getMap(200000100);
scheduleNew();
}
function scheduleNew() {
Ariant_docked.setDocked(true);
Orbis_docked.setDocked(true);
Ariant_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
em.setProperty("docked", "true");
em.setProperty("entry", "true");
em.schedule("stopEntry", closeTime);
em.schedule("takeoff", beginTime);
}
function stopEntry() {
em.setProperty("entry","false");
}
function takeoff() {
em.setProperty("docked","false");
Orbis_btf.warpEveryone(Genie_to_Ariant.getId());
Ariant_btf.warpEveryone(Genie_to_Orbis.getId());
Ariant_docked.setDocked(false);
Orbis_docked.setDocked(false);
Ariant_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
em.schedule("arrived", rideTime);
}
function arrived() {
Genie_to_Orbis.warpEveryone(Orbis_Station.getId());
Genie_to_Ariant.warpEveryone(Ariant_docked.getId());
scheduleNew();
}
function cancelSchedule() {
}

211
scripts/event/GuildQuest.js Normal file
View File

@@ -0,0 +1,211 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author Lerk
*
* Guild Quest
*/
var exitMap;
var waitingListCurrent = 0;
importPackage(Packages.world);
importPackage(Packages.client);
importPackage(Packages.server.maps);
importPackage(java.lang);
function init() {
em.setProperty("shuffleReactors","false");
em.setProperty("canEnter", "true");
em.setProperty("gpqOpen", "true");
}
function monsterValue(eim, mobId) { //should only trigger on ergoth
if (mobId == 9300028) { //but, just to be safe...
var rubian = new Packages.client.inventory.Item(4001024, 0, 1);
var map = eim.getMapInstance(990000900);
var reactor = map.getReactorByName("boss");
map.spawnItemDrop(reactor, eim.getPlayers().get(0), rubian, reactor.getPosition(), true, false);
}
return -1;
}
function setup(eim) {
exitMap = em.getChannelServer().getMapFactory().getMap(990001100); //returning path
//shuffle reactors in two maps for stage 3
eim.getMapInstance(990000501).shuffleReactors();
eim.getMapInstance(990000502).shuffleReactors();
//force no-respawn on certain map reactors
eim.getMapInstance(990000611).getReactorByName("").setDelay(-1);
eim.getMapInstance(990000620).getReactorByName("").setDelay(-1);
eim.getMapInstance(990000631).getReactorByName("").setDelay(-1);
eim.getMapInstance(990000641).getReactorByName("").setDelay(-1);
//activate three minutes after start
eim.setProperty("entryTimestamp", Packages.java.lang.System.currentTimeMillis());
eim.setProperty("canEnter","true");
eim.schedule("begin", 60000);
eim.startEventTimer(60000);
}
function begin(eim) {
eim.setProperty("canEnter","false");
var party = eim.getPlayers();
//if (party.size() < 6) { //not enough to start
// end(eim,"There are no longer enough players to continue, and those remaining shall be warped out.");
//} else {
var iter = party.iterator();
while (iter.hasNext()) {
iter.next().dropMessage(6,"The quest has begun.");
}
eim.startEventTimer(1000 * 60 * 90);
eim.schedule("timeOut", 1000 * 60 * 90);
//}
}
function timeOut(eim) {
end(eim, "Your allotted time to finish the quest has passed.");
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(990000000);
player.changeMap(map, map.getPortal(0));
}
function playerRevive(eim, player) {
var returnMap = 990000200;
if (eim.getProperty("canEnter").equals("true")) {
returnMap = 990000000;
}
player.setHp(50);
player.setStance(0);
player.changeMap(eim.getMapInstance(returnMap), eim.getMapInstance(returnMap).getPortal(0));
return false;
}
function playerDead(eim, player) {
}
function playerDisconnected(eim, player) {
var party = eim.getPlayers();
if (player.getName().equals(eim.getProperty("leader"))) { //check for party leader
//boot all players and end
var iter = party.iterator();
while (iter.hasNext()) {
var pl = iter.next();
pl.dropMessage(6,"The leader of the instance has disconnected, and the remaining players shall be warped out.");
if (pl.equals(player)) {
removePlayer(eim, pl);
}
else {
eim.unregisterPlayer(pl);
pl.changeMap(exitMap, exitMap.getPortal(0));
}
}
eim.dispose();
}
else { //boot d/ced player and check if enough players left
removePlayer(eim, player);
if (party.size() < 6) { //five after player booted
end(eim,"There are no longer enough players to continue, and those remaining shall be warped out.");
}
}
}
function leftParty(eim, player) { //ignore for GQ
}
function disbandParty(eim) { //ignore for GQ
}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
var party = eim.getPlayers();
if (party.size() < 6) { //five after player booted
end(eim,"There are no longer enough players to continue, and those remaining shall be warped out.");
}
}
function end(eim, msg) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
player.dropMessage(6,msg);
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
eim.dispose();
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
var iter = eim.getPlayers().iterator();
var bonusMap = eim.getMapInstance(990001000);
eim.startEventTimer(40000);
while (iter.hasNext()) {
var player = iter.next();
player.changeMap(bonusMap, bonusMap.getPortal(0));
}
eim.schedule("finish", 40000)
}
function finish(eim) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
eim.dispose();
}
function allMonstersDead(eim) {
//do nothing; GQ has nothing to do with monster killing
}
function cancelSchedule() {
}
function dispose(eim) {
em.schedule("openGPQ", 5000);
}
function openGPQ() {
em.setProperty("gpqOpen", "true");
}
function timeOut() {
}

50
scripts/event/Hak.js Normal file
View File

@@ -0,0 +1,50 @@
importPackage(Packages.tools);
var returnTo = new Array(200000141, 250000100);
var rideTo = new Array(250000100, 200000141);
var birdRide = new Array(200090300, 200090310);
var myRide;
var returnMap;
var map;
var docked;
var timeOnRide = 60; //Seconds
var onRide;
function init() {
}
function setup() {
var eim = em.newInstance("Hak_" + + em.getProperty("player"));
return eim;
}
function playerEntry(eim, player) {
if (player.getMapId() == returnTo[0]) {
myRide = 0;
} else {
myRide = 1;
}
docked = eim.getEm().getChannelServer().getMapFactory().getMap(rideTo[myRide]);
returnMap = eim.getMapFactory().getMap(returnTo[myRide]);
onRide = eim.getMapFactory().getMap(birdRide[myRide]);
player.changeMap(onRide, onRide.getPortal(0));
player.getClient().getSession().write(MaplePacketCreator.getClock(timeOnRide));
eim.schedule("timeOut", timeOnRide * 1000);
}
function timeOut() {
onRide.warpEveryone(docked.getId());
}
function playerDisconnected(eim, player) {
return 0;
}
function cancelSchedule() {}
function dispose() {
em.cancelSchedule();
}

193
scripts/event/HenesysPQ.js Normal file
View File

@@ -0,0 +1,193 @@
/*
*
*Henesys PQ : FightDesign ->RaGEZONE / FXP
*
*/
// Significant maps (this was already here, helpful though)
// 100000200 - Pig Park
// 910010000 - 1st Stage
// 910010100 - Shortcut
// 910010200 - Bonus
// 910010300 - Exit
// Significant items
// 4001101 - Rice Cake
// Significant monsters
// 9300061 - Bunny
// 9300062 - Flyeye
// 9300063 - Stirge
// 9300064 - Goblin Fires
// Significant NPCs
// 1012112 - Troy
// 1012113 - Tommy
// 1012114 - Growlie
// map effects
// Map/Obj/Effect/quest/gate/3 - warp activation glow
// quest/party/clear - CLEAR text
// Party1/Clear - clear sound
/* INSERT monsterdrops (monsterid,itemid,chance) VALUES (9300061,4001101,1);
*/
importPackage(Packages.net.world);
importPackage(Packages.tools);
var exitMap;
var mainMap;
var minPlayers = 3;
var pqTime = 10;//10 Minutes
function init() {
exitMap = em.getChannelServer().getMapFactory().getMap(910010400); // <exit>
exitClearMap = em.getChannelServer().getMapFactory().getMap(910010100); // <clear>
mainMap = em.getChannelServer().getMapFactory().getMap(910010000); // <main>
em.setProperty("HPQOpen", "true"); // allows entrance.
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
em.setProperty("HPQOpen", "false")
var eim = em.newInstance("HenesysPQ_" + em.getProperty("latestLeader"));
eim.setProperty("stage", "0");
eim.setProperty("clear", "false");
eim.getMapInstance(910010000).allowSummonState(false);
eim.getMapInstance(910010000).killAllMonsters();
respawn(eim);
var timer = 1000 * 60 * pqTime; // 10 minutes
em.schedule("timeOut", eim, timer);
eim.startEventTimer(timer);
return eim;
}
function respawn(eim) {
var map = eim.getMapInstance(910010000);
if (map.getSummonState()) {
map.instanceMapRespawn();
}
eim.schedule("respawn", 10000);
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(mainMap.getId());
player.changeMap(map, map.getPortal(0));
}
function playerDead(eim, player) {
if (player.isAlive()) {
if (eim.isLeader(player)) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
} else {
var partyz = eim.getPlayers();
if (partyz.size() < minPlayers) {
for (var j = 0; j < partyz.size(); j++)
playerExit(eim,partyz.get(j));
eim.dispose();
} else
playerExit(eim, player);
}
}
}
function playerDisconnected(eim, player) {
if (eim.isLeader(player)) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
if (party.get(i).equals(player)) {
removePlayer(eim, player);
} else {
playerExit(eim, party.get(i));
}
}
eim.dispose();
} else {
var partyz = eim.getPlayers();
if (partyz.size() < minPlayers) {
for (var j = 0; j < partyz.size(); j++) {
playerExit(eim,partyz.get(j));
}
eim.dispose();
} else {
playerExit(eim, player);
}
}
}
function leftParty(eim, player) {
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) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function playerExitClear(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitClearMap, exitClearMap.getPortal(0));
}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerExitClear(eim, party.get(i));
eim.dispose();
}
function allMonstersDead(eim) {}
function dispose() {
em.cancelSchedule();
em.schedule("OpenHPQ", 5000);
}
function cancelSchedule(eim) {
//This needed? It causes problem on reloadevents
//eim.startEventTimer(0);
}
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 OpenHPQ() {
em.setProperty("HPQOpen", "true");
}

View File

@@ -0,0 +1,153 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author SharpAceX(Alan)
* Horntail fight
*/
importPackage(Packages.server.expeditions);
var exitMap;
var minPlayers = 1;
var fightTime = 60;
var trial1; //Cave of Life - The Cave of Trial I
var trial2; // Cave of Life - The Cave of Trial II
var fightMap; // Cave of Life - Horntail's Cave
var exitMap;
function init() {
em.setProperty("shuffleReactors","false");
trial1 = em.getChannelServer().getMapFactory().getMap(240060000); //Cave of Life - The Cave of Trial I
trial2 = em.getChannelServer().getMapFactory().getMap(240060100); // Cave of Life - The Cave of Trial II
fightMap = em.getChannelServer().getMapFactory().getMap(240060200); // Cave of Life - Horntail's Cave
exitMap = em.getChannelServer().getMapFactory().getMap(211042300);
}
function setup() {
var eim = em.newInstance("HorntailFight_" + em.getProperty("channel"));
var timer = 1000 * 60 * fightTime;
em.schedule("timeOut", eim, timer);
eim.startEventTimer(timer);
return eim;
}
function playerEntry(eim,player) {
var map = eim.getMapInstance(trial1.getId());
player.changeMap(map,map.getPortal(0));
if (exitMap == null)
debug(eim,"The exit map was not properly linked.");
}
function playerRevive(eim,player) {
player.setHp(500);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
var party = eim.getPlayers();
if (party.size() < minPlayers)
end(eim,"There are not enough players remaining, the Battle is over.");
return false;
}
function playerDead(eim,player) {
}
function playerDisconnected(eim,player) {
var party = eim.getPlayers();
if (player.getName().equals(eim.getProperty("leader"))) {
// tell members
var iter = party.iterator();
while (iter.hasNext())
iter.next().getPlayer().dropMessage(6,"The leader of the instance has disconnected.");
}
// and, if the party is too small
if (party.size() < minPlayers) {
end(eim,"There are not enough players remaining. The Battle is over.");
}
}
function monsterValue(eim, mobId) {
return 1;
}
function leftParty(eim,player) {
}
function disbandParty(eim) {
}
function playerExit(eim,player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap,exitMap.getPortal(0));
if (eim.getPlayers().size() < minPlayers)//not enough after someone left
end(eim,"There are no longer enough players to continue, and those remaining shall be warped out.");
}
function end(eim,msg) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
player.getPlayer().dropMessage(6,msg);
eim.unregisterPlayer(player);
if (player != null)
player.changeMap(exitMap, exitMap.getPortal(0));
}
eim.dispose();
}
// for offline folk
function removePlayer(eim,player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {}
function finish(eim) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
eim.dispose();
}
function allMonstersDead(eim) {
}
function cancelSchedule() {
}
function timeOut() {
}
function debug(eim,msg) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
iter.next().getClient().getSession().write(Packages.tools.MaplePacketCreator.serverNotice(6,msg));
}
}

164
scripts/event/KerningPQ.js Normal file
View File

@@ -0,0 +1,164 @@
/*
* 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/>.
*/
/*
INSERT monsterdrops (monsterid,itemid,chance) VALUES (9300001,4001007,5);
INSERT monsterdrops (monsterid,itemid,chance) VALUES (9300000,4001008,1);
INSERT monsterdrops (monsterid,itemid,chance) VALUES (9300002,4001008,1);
INSERT monsterdrops (monsterid,itemid,chance) VALUES (9300003,4001008,1);
*/
importPackage(Packages.world);
var exitMap;
var minPlayers = 3;
function init() { // Initial loading.
exitMap = em.getChannelServer().getMapFactory().getMap(103000890);
em.setProperty("KPQOpen", "true"); // allows entrance.
em.setProperty("shuffleReactors", "true");
instanceId = 1;
}
function monsterValue(eim, mobId) { // Killed monster.
return 1; // returns an amount to add onto kill count.
}
function setup() { // Invoked from "EventManager.startInstance()"
var eim = em.newInstance("KerningPQ"); // adds a new instance and returns EventInstanceManager.
var eventTime = 30 * (1000 * 60); // 30 mins.
var firstPortal = eim.getMapInstance(103000800).getPortal("next00");
respawn(eim);
firstPortal.setScriptName("kpq0");
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.
return eim; // returns the new instance.
}
function playerEntry(eim, player) { // this gets looped for every player in the party.
var map = eim.getMapInstance(103000800);
player.changeMap(map, map.getPortal(0)); // We're now in KPQ :D
}
function playerDead(eim, player) {
}
function playerRevive(eim, player) { // player presses ok on the death pop up.
if (eim.isLeader(player) || party.size() <= minPlayers) { // Check for party leader
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
} else
playerExit(eim, player);
}
function respawn(eim) {
var map = eim.getMapInstance(103000800);
var map2 = eim.getMapInstance(103000805);
if (map.getSummonState()) { //Map spawns are set to true by default
map.instanceMapRespawn();
}
if(map2.getSummonState()) {
map2.instanceMapRespawn();
}
eim.schedule("respawn", 10000);
}
function playerDisconnected(eim, player) {
var party = eim.getPlayers();
if (eim.isLeader(player) || party.size() < minPlayers) {
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) {
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) {
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.changeMap(exitMap, exitMap.getPortal(0));
}
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function allMonstersDead(eim) {
}
function cancelSchedule() {
}
function dispose(eim) {
em.cancelSchedule();
em.schedule("OpenKPQ", 10000); // 10 seconds ?
}
function OpenKPQ() {
em.setProperty("KPQOpen", "true");
}
function timeOut(eim) {
if (eim != null) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext())
playerExit(eim, pIter.next());
}
eim.dispose();
}
}

View File

@@ -0,0 +1,49 @@
importPackage(Packages.tools);
var returnTo = new Array(103000100, 103000310);
var rideTo = new Array(103000310, 103000100);
var trainRide = new Array(103000301, 103000302);
var myRide;
var returnMap;
var map;
var docked;
var timeOnRide = 10; //Seconds
var onRide;
function init() {
}
function setup() {
var eim = em.newInstance("KerningTrain_" + em.getProperty("player"));
return eim;
}
function playerEntry(eim, player) {
if (player.getMapId() == returnTo[0]) {
myRide = 0;
} else {
myRide = 1;
}
docked = eim.getEm().getChannelServer().getMapFactory().getMap(rideTo[myRide]);
returnMap = eim.getMapFactory().getMap(returnTo[myRide]);
onRide = eim.getMapFactory().getMap(trainRide[myRide]);
player.changeMap(onRide, onRide.getPortal(0));
player.getClient().getSession().write(MaplePacketCreator.getClock(timeOnRide));
eim.schedule("timeOut", timeOnRide * 1000);
}
function timeOut() {
onRide.warpEveryone(docked.getId());
}
function playerDisconnected(eim, player) {
return 0;
}
function cancelSchedule() {}
function dispose() {
em.cancelSchedule();
}

152
scripts/event/LudiMazePQ.js Normal file
View File

@@ -0,0 +1,152 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author Raz
*
* Ludi Maze PQ
*/
var exitMap;
var instanceId;
var finishMap;
function init() {
instanceId = 1;
em.setProperty("shuffleReactors", "true");
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
exitMap = em.getChannelServer().getMapFactory().getMap(809050017);
finishMap = em.getChannelServer().getMapFactory().getMap(809050016);
var instanceName = "LudiMazePQ" + instanceId;
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
instanceId++;
var eventTime = 15 * (1000 * 60);
em.schedule("timeOut", eim, eventTime);
eim.startEventTimer(eventTime);
return eim;
}
function playerEntry(eim, player) {
var random = Math.floor((Math.random() * 16));
var map = eim.getMapInstance(809050000 + random);
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)) { //check for party leader
var party = eim.getPlayers();
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
//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 playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
function playerFinish(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(finishMap, finishMap.getPortal(0));
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerFinish(eim, party.get(i));
}
eim.dispose();
}
function allMonstersDead(eim) {
//do nothing; LMPQ has nothing to do with monster killing
}
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 playerRevive(eim, player) {
}

190
scripts/event/LudiPQ.js Normal file
View File

@@ -0,0 +1,190 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author Raz
*
* Ludi Maze PQ
*/
var exitMap;
var instanceId;
var finishMap;
var bonusMap;
var bonusTime = 60;//1 Minute
var pqTime = 3600;//60 Minutes
function init() {
instanceId = 1;
exitMap = em.getChannelServer().getMapFactory().getMap(922010000);//Exit
}
function monsterValue(eim, mobId) {
return 1;
}
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 playerEntry(eim, player) {
var map0 = eim.getMapInstance(922010100);
player.changeMap(map0, map0.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();
}
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));
}
function playerFinish(eim, player) {
eim.unregisterPlayer(player);
var map = eim.getMapInstance(922011100);
player.changeMap(map, map.getPortal(0));
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++)
playerFinish(eim, party.get(i));
eim.dispose();
}
function allMonstersDead(eim) {
}
function dispose() {
em.schedule("OpenLPQ", 10000); // 10 seconds ?
}
function cancelSchedule() {
}
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));
}
}
}

294
scripts/event/OrbisPQ.js Normal file
View File

@@ -0,0 +1,294 @@
/*
* 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 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 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() {
}

136
scripts/event/RockSpirit.js Normal file
View File

@@ -0,0 +1,136 @@
/*
* 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/>.
*/
var exitMap;
var startMap;
var otherMap;
var minPlayers = 1;
var fightTime = 60;
var timer = 1000 * 60 * fightTime;
function init() {
exitMap = em.getChannelServer().getMapFactory().getMap(103040400);
startMap = em.getChannelServer().getMapFactory().getMap(103040410);
otherMap = em.getChannelServer().getMapFactory().getMap(103040420);
}
function setup() {
var eim = em.newInstance("RockSpirit_" + em.getProperty("player"));
respawn(eim);
eim.startEventTimer(timer);
return eim;
}
function respawn(eim) {
var map = eim.getMapInstance(startMap.getId());
var map2 = eim.getMapInstance(otherMap.getId());
map.allowSummonState(true);
map2.allowSummonState(true);
map.instanceMapRespawn();
map2.instanceMapRespawn();
eim.schedule("respawn", 10000);
}
function playerEntry(eim, player) {
var amplifierMap = eim.getMapInstance(startMap.getId());
player.changeMap(amplifierMap);
eim.schedule("timeOut", timer);
}
function playerRevive(eim, player) {
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
return false;
}
function playerDead(eim, player) {}
function playerDisconnected(eim, player) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
if (party.get(i).equals(player)) {
removePlayer(eim, player);
} else {
playerExit(eim, party.get(i));
}
}
eim.dispose();
}
function monsterValue(eim,mobId) {
return -1;
}
function leftParty(eim, player) {
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) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
function moveMap(eim, player) {
if (player.getMap().getId() == exitMap.getId()) {
removePlayer(eim, player);
player.getClient().getSession().write(MaplePacketCreator.removeClock());
eim.dispose();
}
}
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function cancelSchedule() {}
function dispose() {}
function clearPQ(eim) {}
function allMonstersDead(eim) {}
function timeOut(eim) {
if (eim != null) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
var player = pIter.next();
playerExit(eim, player);
}
}
eim.dispose();
}
}

View File

@@ -0,0 +1,161 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author SharpAceX(Alan)
* Scarga Battle
*/
var exitMap;
var battleMap;
var minPlayers = 1;
var fightTime = 60;
function init() {
em.setProperty("shuffleReactors","false");
exitMap = em.getChannelServer().getMapFactory().getMap(551030100);
battleMap = em.getChannelServer().getMapFactory().getMap(551030200);
}
function setup() {
var eim = em.newInstance("ScargaBattle_" + em.getProperty("channel"));
var timer = 1000 * 60 * fightTime;
eim.setProperty("summoned", "false");
em.schedule("timeOut", eim, timer);
eim.startEventTimer(timer);
return eim;
}
function playerEntry(eim,player) {
var battle = eim.getMapInstance(battleMap.getId());
player.changeMap(battle, battle.getPortal(0));
if (battle == null)
debug(eim, "The battle map was not properly linked.");
}
function playerRevive(eim,player) {
player.setHp(500);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
var exped = eim.getPlayers();
if (exped.size() < minPlayers)
end(eim,"There are not enough players remaining, the battle is over.");
return false;
}
function playerDead(eim,player) {
}
function playerDisconnected(eim,player) {
var exped = eim.getPlayers();
if (player.getName().equals(eim.getProperty("leader"))) {
var iter = exped.iterator();
while (iter.hasNext()) {
iter.next().getPlayer().dropMessage(6, "The leader of the expedition has disconnected.");
}
}
//If the expedition is too small.
if (exped.size() < minPlayers) {
end(eim,"There are not enough players remaining. The Battle is over.");
}
}
function monsterValue(eim,mobId) { // potentially display time of death? does not seem to work
return -1;
}
function leftParty(eim,player) {
}
function disbandParty(eim) {
}
function playerExit(eim,player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
if (eim.getPlayers().size() < minPlayers) {//not enough after someone left
end(eim, "There are no longer enough players to continue, and those remaining shall be warped out.");
}
}
function end(eim,msg) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
player.getPlayer().dropMessage(6,msg);
eim.unregisterPlayer(player);
if (player != null){
player.changeMap(exitMap, exitMap.getPortal(0));
}
}
eim.dispose();
}
function removePlayer(eim,player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) { //When the hell does this get executed?
end(eim,"As the sound of battle fades away, you feel strangely unsatisfied.");
}
function finish(eim) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
eim.dispose();
}
function allMonstersDead(eim) {
}
function cancelSchedule() {
}
function timeOut(eim) {
if (eim != null) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
var player = pIter.next();
player.dropMessage(6, "You have run out of time to defeat Scarlion and Targa!");
playerExit(eim, player);
}
}
eim.dispose();
}
}
function debug(eim,msg) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
iter.next().getClient().getSession().write(Packages.tools.MaplePacketCreator.serverNotice(6,msg));
}
}

47
scripts/event/Subway.js Normal file
View File

@@ -0,0 +1,47 @@
//Time Setting is in millisecond
var closeTime = 30 * 1000; //[30 seconds] The time to close the gate
var beginTime = 30 * 1000; //[30 seconds] The time to begin the ride
var rideTime = 30 * 1000; //[30 seconds] The time that require move to destination
var KC_Waiting;
var Subway_to_KC;
var KC_docked;
var NLC_Waiting;
var Subway_to_NLC;
var NLC_docked;
function init() {
KC_Waiting = em.getChannelServer().getMapFactory().getMap(600010004);
NLC_Waiting = em.getChannelServer().getMapFactory().getMap(600010002);
Subway_to_KC = em.getChannelServer().getMapFactory().getMap(600010003);
Subway_to_NLC = em.getChannelServer().getMapFactory().getMap(600010005);
KC_docked = em.getChannelServer().getMapFactory().getMap(103000100);
NLC_docked = em.getChannelServer().getMapFactory().getMap(600010001);
scheduleNew();
}
function scheduleNew() {
em.setProperty("docked", "true");
em.setProperty("entry", "true");
em.schedule("stopEntry", closeTime);
em.schedule("takeoff", beginTime);
}
function stopEntry() {
em.setProperty("entry","false");
}
function takeoff() {
em.setProperty("docked","false");
KC_Waiting.warpEveryone(Subway_to_NLC.getId());
NLC_Waiting.warpEveryone(Subway_to_KC.getId());
em.schedule("arrived", rideTime);
}
function arrived() {
Subway_to_KC.warpEveryone(KC_docked.getId());
Subway_to_NLC.warpEveryone(NLC_docked.getId());
scheduleNew();
}
function cancelSchedule() {
}

64
scripts/event/Trains.js Normal file
View File

@@ -0,0 +1,64 @@
importPackage(Packages.tools);
var Orbis_btf;
var Train_to_Orbis;
var Orbis_docked;
var Ludibrium_btf;
var Train_to_Ludibrium;
var Ludibrium_docked;
var Orbis_Station;
var Ludibrium_Station;
//Time Setting is in millisecond
var closeTime = 60 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 60 * 1000; //The time that require move to destination
function init() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000122);
Ludibrium_btf = em.getChannelServer().getMapFactory().getMap(220000111);
Train_to_Orbis = em.getChannelServer().getMapFactory().getMap(200090110);
Train_to_Ludibrium = em.getChannelServer().getMapFactory().getMap(200090100);
Orbis_docked = em.getChannelServer().getMapFactory().getMap(200000121);
Ludibrium_docked = em.getChannelServer().getMapFactory().getMap(220000110);
Orbis_Station = em.getChannelServer().getMapFactory().getMap(200000100);
Ludibrium_Station = em.getChannelServer().getMapFactory().getMap(220000100);
scheduleNew();
}
function scheduleNew() {
Ludibrium_docked.setDocked(true);
Orbis_docked.setDocked(true);
Ludibrium_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(true));
em.setProperty("docked", "true");
em.setProperty("entry", "true");
em.schedule("stopEntry", closeTime);
em.schedule("takeoff", beginTime);
}
function stopEntry() {
em.setProperty("entry","false");
}
function takeoff() {
Ludibrium_docked.setDocked(false);
Orbis_docked.setDocked(false);
Ludibrium_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
Orbis_docked.broadcastMessage(MaplePacketCreator.boatPacket(false));
em.setProperty("docked","false");
Orbis_btf.warpEveryone(Train_to_Ludibrium.getId());
Ludibrium_btf.warpEveryone(Train_to_Orbis.getId());
em.schedule("arrived", rideTime);
}
function arrived() {
Train_to_Orbis.warpEveryone(Orbis_Station.getId());
Train_to_Ludibrium.warpEveryone(Ludibrium_Station.getId());
scheduleNew();
}
function cancelSchedule() {
}

View File

@@ -0,0 +1,136 @@
/*
* 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/>.
*/
var exitMap;
var startMap;
var otherMap;
var minPlayers = 1;
var fightTime = 30;
var timer = 1000 * 60 * fightTime;
function init() {
exitMap = em.getChannelServer().getMapFactory().getMap(103040400);
startMap = em.getChannelServer().getMapFactory().getMap(103040440);
otherMap = em.getChannelServer().getMapFactory().getMap(103040450);
}
function setup() {
var eim = em.newInstance("VIPRockSpirit_" + em.getProperty("player"));
respawn(eim);
eim.startEventTimer(timer);
return eim;
}
function respawn(eim) {
var map = eim.getMapInstance(startMap.getId());
var map2 = eim.getMapInstance(otherMap.getId());
map.allowSummonState(true);
map2.allowSummonState(true);
map.instanceMapRespawn();
map2.instanceMapRespawn();
eim.schedule("respawn", 10000);
}
function playerEntry(eim, player) {
var amplifierMap = eim.getMapInstance(startMap.getId());
player.changeMap(amplifierMap);
eim.schedule("timeOut", timer);
}
function playerRevive(eim, player) {
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
return false;
}
function playerDead(eim, player) {}
function playerDisconnected(eim, player) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
if (party.get(i).equals(player)) {
removePlayer(eim, player);
} else {
playerExit(eim, party.get(i));
}
}
eim.dispose();
}
function monsterValue(eim,mobId) {
return -1;
}
function leftParty(eim, player) {
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) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
function moveMap(eim, player) {
if (player.getMap().getId() == exitMap.getId()) {
removePlayer(eim, player);
player.getClient().getSession().write(MaplePacketCreator.removeClock());
eim.dispose();
}
}
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function cancelSchedule() {}
function dispose() {}
function clearPQ(eim) {}
function allMonstersDead(eim) {}
function timeOut(eim) {
if (eim != null) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
var player = pIter.next();
playerExit(eim, player);
}
}
eim.dispose();
}
}

View File

@@ -0,0 +1,193 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author Stereo
* @Modified By XkelvinchiaX(Kelvin)
* @Modified By Moogra
* @Modified By SharpAceX(Alan)
* Zakum Battle
*/
var exitMap;
var altarMap;
var minPlayers = 1;
var fightTime = 75;
var altarTime = 15;
var gate;
function init() {
em.setProperty("shuffleReactors","false");
exitMap = em.getChannelServer().getMapFactory().getMap(211042300);
altarMap = em.getChannelServer().getMapFactory().getMap(280030000);// Last Mission: Zakum's Altar
gate = exitMap.getReactorByName("gate");
gate.setState(0);//Open gate
}
function setup() {
var eim = em.newInstance("ZakumBattle_" + em.getProperty("channel"));
var timer = 1000 * 60 * fightTime;
eim.setProperty("summoned", "false");
em.schedule("timeOut", eim, timer);
em.schedule("altarTimeOut", eim, 1000 * 60 * altarTime);
eim.startEventTimer(timer);
gate.setState(1);//Close gate
return eim;
}
function playerEntry(eim,player) {
var altar = eim.getMapInstance(altarMap.getId());
player.changeMap(altar, altar.getPortal(0));
player.dropMessage(5, "The Zakum Shrine will close if you do not summon Zakum in " + altarTime + " minutes.");
if (altarMap == null)
debug(eim, "The altar map was not properly linked.");
}
function playerRevive(eim,player) {
player.setHp(500);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
var exped = eim.getPlayers();
if (exped.size() < minPlayers)
end(eim,"There are not enough players remaining, the Zakum battle is over.");
return false;
}
function playerDead(eim,player) {
}
function playerDisconnected(eim,player) {
var exped = eim.getPlayers();
if (player.getName().equals(eim.getProperty("leader"))) {
var iter = exped.iterator();
while (iter.hasNext()) {
iter.next().getPlayer().dropMessage(6, "The leader of the expedition has disconnected.");
}
}
//If the expedition is too small.
if (exped.size() < minPlayers) {
end(eim,"There are not enough players remaining. The Battle is over.");
}
}
function monsterValue(eim,mobId) { // potentially display time of death? does not seem to work
if (mobId == 8800002) { // 3rd body
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
iter.next().dropMessage(6, "Congratulations on defeating Zakum!");
}
}
return -1;
}
function leftParty(eim,player) { // do nothing in Zakum
}
function disbandParty(eim) { // do nothing in Zakum
}
function playerExit(eim,player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
if (eim.getPlayers().size() < minPlayers) {//not enough after someone left
end(eim, "There are no longer enough players to continue, and those remaining shall be warped out.");
}
}
function end(eim,msg) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
player.getPlayer().dropMessage(6,msg);
eim.unregisterPlayer(player);
if (player != null){
player.changeMap(exitMap, exitMap.getPortal(0));
}
}
gate.setState(0);//Open gate
eim.dispose();
}
function removePlayer(eim,player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) { //When the hell does this get executed?
end(eim,"As the sound of battle fades away, you feel strangely unsatisfied.");
}
function finish(eim) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
eim.dispose();
}
function allMonstersDead(eim) {
}
function cancelSchedule() {
}
function altarTimeOut(eim) {
if (eim != null && eim.getProperty("summoned").equals("false")) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
var player = pIter.next();
player.dropMessage(6, "The Shrine has closed since you did not summon Zakum within " + altarTime + " minutes.");
playerExit(eim, player);
}
}
eim.dispose();
}
}
function timeOut(eim) {
if (eim != null) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
var player = pIter.next();
player.dropMessage(6, "You have run out of time to defeat Zakum!");
playerExit(eim, player);
}
}
eim.dispose();
}
}
function debug(eim,msg) {
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
iter.next().getClient().getSession().write(Packages.tools.MaplePacketCreator.serverNotice(6,msg));
}
}

161
scripts/event/ZakumPQ.js Normal file
View File

@@ -0,0 +1,161 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author Lerk
*
* Zakum Party Quest
*/
var exitMap;
var instanceId;
function init() {
instanceId = 1;
em.setProperty("shuffleReactors","true");
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
exitMap = em.getChannelServer().getMapFactory().getMap(280090000); //room of tragedy
var instanceName = "ZakumPQ" + instanceId;
//ZPQ maps, center area then 1-1 through 16-6 increasing gradually
//var instanceMaps = new Array(280010000, 280010010, 280010011, 280010020, 280010030, 280010031, 280010040, 280010041, 280010050, 280010060,
// 280010070, 280010071, 280010080, 280010081, 280010090, 280010091, 280010100, 280010101, 280010110, 280010120, 280010130, 280010140,
// 280010150, 280011000, 280011001, 280011002, 280011003, 280011004, 280011005, 280011006);
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
instanceId++;
var map = mf.getMap(280010000);
map.shuffleReactors();
//no time limit yet until clock can be visible in all maps
//em.schedule("timeOut", 30 * 60000);
return eim;
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(280010000);
player.changeMap(map, map.getPortal(0));
//TODO: hold time across map changes
//player.getClient().getSession().write(tools.MaplePacketCreator.getClock(1800));
}
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
playerExit(eim, player);
}
return false; // don't execute the standard reviving code
}
function playerDead(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 { //boot d/ced player
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 playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
//ZPQ does nothing special with winners
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function allMonstersDead(eim) {
//do nothing; ZPQ has nothing to do with monster killing
}
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();
}
}

77
scripts/event/elevator.js Normal file
View File

@@ -0,0 +1,77 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function init() {
scheduleNew();
}
function scheduleNew() {
em.setProperty("goingUp", "false");
em.setProperty("goingDown", "true");
em.getChannelServer().getMapFactory().getMap(222020100).resetReactors();
em.getChannelServer().getMapFactory().getMap(222020200).setReactorState();
em.schedule("goingUpNow", 50000);
}
function goUp() {
em.schedule("goingUpNow", 50000); // might be 60
}
function goDown() {
em.schedule("goingDownNow", 50000); // might be 60
}
function goingUpNow() {
em.getChannelServer().getMapFactory().getMap(222020110).warpEveryone(222020111);
em.setProperty("goingUp", "true");
em.schedule("isUpNow", 55000);
em.getChannelServer().getMapFactory().getMap(222020100).setReactorState();
}
function goingDownNow() {
em.getChannelServer().getMapFactory().getMap(222020210).warpEveryone(222020211);
em.setProperty("goingDown", "true");
em.schedule("isDownNow", 55000);
em.getChannelServer().getMapFactory().getMap(222020200).setReactorState();
}
function isUpNow() {
em.setProperty("goingDown", "false"); // clear
em.getChannelServer().getMapFactory().getMap(222020200).resetReactors();
em.getChannelServer().getMapFactory().getMap(222020111).warpEveryone(222020200);
goDown();
}
function isDownNow() {
em.setProperty("goingUp", "false"); // clear
em.getChannelServer().getMapFactory().getMap(222020100).resetReactors();
em.getChannelServer().getMapFactory().getMap(222020211).warpEveryone(222020100);
goUp();
}
function cancelSchedule() {
}

View File

View File

@@ -0,0 +1,48 @@
/*
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: Moogra, Traitor
*@Map(s): All Dojo fighting maps
*@Function: Spawns dojo monsters and handles time
*/
function start(ms) {
ms.getPlayer().resetEnteredScript();
var stage = (ms.getPlayer().getMap().getId() / 100) % 100;
if (stage % 6 == 1)
ms.getPlayer().setDojoStart();
if (ms.getPlayer().getMap().getCharacters().size() == 1)
ms.getPlayer().showDojoClock();
if (stage % 6 > 0) {
var realstage = stage - ((stage / 6) | 0);
ms.dojoEnergy();
var mob = ms.getMonsterLifeFactory(9300183 + realstage);
if (mob != null && ms.getPlayer().getMap().getMonsterById(9300183 + realstage) == null && ms.getPlayer().getMap().getMonsterById(9300216) == null) {
mob.setBoss(false);
ms.getPlayer().getMap().spawnDojoMonster(mob);
ms.playSound("Dojang/start");
ms.showEffect("dojang/start/stage");
ms.showEffect("dojang/start/number/" + realstage);
}
}
}

View File

@@ -0,0 +1,12 @@
//importPackage(Packages.tools);
function start(ms) {
//var pq = ms.getPyramid();
//ms.getPlayer().resetEnteredScript();
//ms.getClient().getSession().write(MaplePacketCreator.getClock(pq.timer()));
}
/*
killing/first/stage
killing/first/number/
killing/first/start
*/

View File

@@ -0,0 +1,5 @@
function start(ms) {
ms.getPlayer().resetEnteredScript();
ms.getPlayer().getMap().addMapTimer(180);
ms.spawnMonster(9300331, -28, 0);
}

View File

@@ -0,0 +1,41 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License 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: kevintjuh93
*/
importPackage(Packages.tools);
var player;
function start(ms) {
player = ms.getPlayer();
player.resetEnteredScript();
ms.getClient().getSession().write(MaplePacketCreator.showEffect("event/space/start"));
player.startMapEffect("Please rescue Gaga within the time limit.", 5120027);
var map = player.getMap();
if (map.getTimeLeft() > 0) {
ms.getClient().getSession().write(MaplePacketCreator.getClock(map.getTimeLeft()));
} else {
map.addMapTimer(180);
}
ms.useItem(2360002);//HOORAY <3
}

View File

@@ -0,0 +1,23 @@
importPackage(Packages.server.life);
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
var mob = MapleLifeFactory.getMonster(id);
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
}

View File

@@ -0,0 +1,23 @@
importPackage(Packages.server.life);
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
var mob = MapleLifeFactory.getMonster(id);
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
}

View File

@@ -0,0 +1,23 @@
importPackage(Packages.server.life);
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
var mob = MapleLifeFactory.getMonster(id);
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
}

View File

@@ -0,0 +1,23 @@
importPackage(Packages.server.life);
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
var mob = MapleLifeFactory.getMonster(id);
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
}

View File

@@ -0,0 +1,23 @@
importPackage(Packages.server.life);
function start(ms) {
if(ms.getMapId() == 108010101) { // Archer
spawnMob(188, 20, 9001002, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010301) { // Warrior
spawnMob(188, 20, 9001000, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010201) { // Mage
spawnMob(188, 20, 9001001, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010401) { // Thief
spawnMob(188, 20, 9001003, ms.getPlayer().getMap());
} else if(ms.getMapId() == 108010501) { // Pirate
spawnMob(188, 20, 9001008, ms.getPlayer().getMap());
}
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
var mob = MapleLifeFactory.getMonster(id);
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.getPlayer().updateQuestInfo(20010, "1");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.getPlayer().updateQuestInfo(20010, "1");
}

View File

@@ -0,0 +1,13 @@
importPackage(Packages.server.life);
function start(ms) {
spawnMob(251, -841, 9400613, ms.getPlayer().getMap());
}
function spawnMob(x, y, id, map) {
if(map.getMonsterById(id) != null)
return;
var mob = MapleLifeFactory.getMonster(id);
map.spawnMonsterOnGroudBelow(mob, new java.awt.Point(x, y));
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.getPlayer().updateQuestInfo(21000, "1");
}

View File

@@ -0,0 +1,7 @@
function start(pi) {
var map = pi.getClient().getChannelServer().getMapFactory().getMap(922000000);
map.resetReactors();
map.shuffleReactors();
return(true);
}

View File

@@ -0,0 +1,6 @@
function start(ms) {
var py = ms.getPyramid();
if (py != null) {
py.sendScore(ms.getPlayer());
}
}

View File

@@ -0,0 +1,26 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/PromiseDragon/Scene" + ms.getPlayer().getGender());
}

View File

@@ -0,0 +1,3 @@
function start(ms) {
ms.setStandAloneMode(true);
}

View File

@@ -0,0 +1,3 @@
function start(ms) {
ms.mapEffect("resistance/tutorialGuide");
}

View File

@@ -0,0 +1,4 @@
function start(ms) {
ms.updateAreaInfo(23007, "exp1=1;exp2=1;exp3=1;exp4=1");//force
ms.showInfo("Effect/OnUserEff.img/guideEffect/resistanceTutorial/userTalk");
}

View File

@@ -0,0 +1,3 @@
function start(ms) {
ms.openNpc(2159012);
}

View File

@@ -0,0 +1,4 @@
function start(ms) {
ms.setDirectionMode(false);
ms.openNpc(2159006);
}

View File

@@ -0,0 +1,3 @@
function start(ms) {
ms.openNpc(2159007);
}

View File

@@ -0,0 +1,4 @@
function start(ms) {
ms.setDirectionMode(true);
ms.showIntro("Effect/Direction4.img/Resistance/TalkJ");
}

View File

@@ -0,0 +1,3 @@
function start(ms) {
ms.setDirectionMode(false);
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.displayAranIntro();
}

View File

@@ -0,0 +1,26 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.unlockUI();
ms.forceStartQuest(22015);
}

View File

@@ -0,0 +1,6 @@
function start(ms) {
ms.setDirection(0);
ms.setDirectionStatus(true);
ms.lockUI2();
ms.startDirection("cannon_tuto_02");
}

View File

@@ -0,0 +1,5 @@
function start(ms) {
ms.setDirectionStatus(true);
ms.showIntro("Effect/Direction4.img/cannonshooter/Scene00");
ms.showIntro("Effect/Direction4.img/cannonshooter/out00");
}

View File

@@ -0,0 +1,6 @@
function start(ms) {
ms.playSound("cannonshooter/flying");
ms.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/0", 9000, 0, 0, 0, -1);
ms.sendDirectionInfo(1, 1500);
ms.setDirectionStatus(true);
}

View File

@@ -0,0 +1,6 @@
function start(ms) {
ms.playSound("cannonshooter/bang");
ms.setDirectionStatus(true);
ms.showIntro("Effect/Direction4.img/cannonshooter/Scene01");
ms.showIntro("Effect/Direction4.img/cannonshooter/out02");
}

View File

@@ -0,0 +1,4 @@
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/crash/Scene" + ms.getPlayer().getGender());
}

View File

@@ -0,0 +1,27 @@
/*
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 Traitor
*/
function start(ms) {
}

View File

@@ -0,0 +1,36 @@
/*
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: Traitor
Map(s): Mu Lung Dojo Entrance
Desc: Sends the entrance message or the taunt message from that dojo guy
*/
var messages = Array("Your courage for challenging the Mu Lung Dojo is commendable!", "If you want to taste the bitterness of defeat, come on in!", "I will make you thoroughly regret challenging the Mu Lung Dojo! Hurry up!");
function start(ms) {
if (ms.getPlayer().getMap().getId() == 925020000) {
ms.getPlayer().startMapEffect(messages[(Math.random() * messages.length) | 0], 5120024);
} else {
ms.getPlayer().resetEnteredScript(); //in case the person dcs in here we set it at dojang_tuto portal
ms.getPlayer().startMapEffect("Ha! Let's see what you got! I won't let you leave unless you defeat me first!", 5120024);
}
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.unlockUI();
}

View File

@@ -0,0 +1,48 @@
/*
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: kevintjuh93
*
*/
function start(ms) {
if (ms.getPlayer().getMapId() == 110000000 || (ms.getPlayer().getMapId() >= 100000000 && ms.getPlayer().getMapId() < 105040300)) {
ms.explorerQuest(29005, "Beginner Explorer");//Beginner Explorer
} else if (ms.getPlayer().getMapId() >= 105040300 && ms.getPlayer().getMapId() <= 105090900) {
ms.explorerQuest(29014, "Sleepywood Explorer");//Sleepywood Explorer
} else if (ms.getPlayer().getMapId() >= 200000000 && ms.getPlayer().getMapId() <= 211041800) {
ms.explorerQuest(29006, "El Nath Mts. Explorer");//El Nath Mts. Explorer
} else if (ms.getPlayer().getMapId() >= 220000000 && ms.getPlayer().getMapId() <= 222010400) {
ms.explorerQuest(29007, "Ludus Lake Explorer");//Ludus Lake Explorer
} else if (ms.getPlayer().getMapId() >= 230000000 && ms.getPlayer().getMapId() <= 230040401) {
ms.explorerQuest(29008, "Undersea Explorer");//Undersea Explorer
} else if (ms.getPlayer().getMapId() >= 250000000 && ms.getPlayer().getMapId() <= 251010500) {
ms.explorerQuest(29009, "Mu Lung Explorer");//Mu Lung Explorer
} else if (ms.getPlayer().getMapId() >= 260000000 && ms.getPlayer().getMapId() <= 261030000) {
ms.explorerQuest(29010, "Nihal Desert Explorer");//Nihal Desert Explorer
} else if (ms.getPlayer().getMapId() >= 240000000 && ms.getPlayer().getMapId() <= 240050000) {
ms.explorerQuest(29011, "Minar Forest Explorer");//Minar Forest Explorer
}
if (ms.getPlayer().getMapId() == 104000000) {
ms.mapEffect("maplemap/enter/104000000");
}
}

View File

@@ -0,0 +1,4 @@
function start(ms) {
ms.lockUI();
ms.showIntro("Effect/Direction4.img/getDragonEgg/Scene" + ms.getPlayer().getGender());
}

View File

@@ -0,0 +1,26 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.unlockUI();
ms.mapEffect("maplemap/enter/10000");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1000000");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010000");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010100");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010200");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/1010300");
}

View File

@@ -0,0 +1,4 @@
function start(ms) {
ms.unlockUI();
ms.mapEffect("maplemap/enter/1020000");
}

View File

@@ -0,0 +1,26 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.unlockUI();
ms.mapEffect("maplemap/enter/20000");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/30000");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/40000");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.mapEffect("maplemap/enter/50000");
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.goAdventure();
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.startExplorerExperience();
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.goLith();
}

View File

@@ -0,0 +1,25 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function start(ms) {
ms.startExplorerExperience();
}

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