Savior Commit

Fixed some bugs regarding dojo, updated drop data, minor tweaks on
Mystic Doors, added expeditions for Showa Manor, Zakum and Pink Bean,
smart search for item slots on quest/npc rewarding system, attempt on
boss HPbar to focus on player's current target, quests with selectable
rewards now hands the item correctly, after the first PQ instance next
ones are loaded more smoothly.
This commit is contained in:
ronancpl
2017-08-04 00:04:46 -03:00
parent c09bc02c85
commit 0a2e382c3b
968 changed files with 25555 additions and 7362 deletions

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 --------------------------------------------------------------------------------
Bamboo Warrior Spawner
-- Edited by --------------------------------------------------------------------------------------
Ronan (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 mapObj = em.getChannelServer().getMapFactory().getMap(800020120);
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(6090002);
if(mapObj.getMonsterById(6090002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(560, 50));
mapObj.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
em.schedule("start", 3 * 60 *60 * 1000);
}

View File

@@ -21,9 +21,9 @@
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Deo Spawner
Centipede Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep (based on xQuasar's King Clang spawner)
Ronan (based on xQuasar's King Clang spawner)
**/
function init() {

View File

@@ -6,7 +6,7 @@
importPackage(Packages.server.life);
var isPq = true;
var minPlayers = 1, maxPlayers = 30;
var minPlayers = 6, maxPlayers = 30;
var minLevel = 100, maxLevel = 255;
var entryMap = 240060000;
var exitMap = 240050600;

View File

@@ -4,7 +4,7 @@
*/
var isPq = true;
var minPlayers = 1, maxPlayers = 6;
var minPlayers = 6, maxPlayers = 6;
var minLevel = 120, maxLevel = 255;
var entryMap = 240050100;
var exitMap = 240050500;

View File

@@ -1,298 +0,0 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
THIS FILE WAS MADE BY JVLAPLE. REMOVING THIS NOTICE MEANS YOU CAN'T USE THIS SCRIPT OR ANY OTHER SCRIPT PROVIDED BY JVLAPLE.
*/
/*
* @Author Jvlaple
*
* Orbis Party Quest
*/
importPackage(java.lang);
importPackage(Packages.world);
importPackage(Packages.client);
importPackage(Packages.server.maps);
importPackage(Packages.server.life);
importPackage(Packages.scripting.npc);
var exitMap;
var instanceId;
var minPlayers = 1;
function init() {
instanceId = 1;
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
instanceId = em.getChannelServer().getInstanceId();
exitMap = em.getChannelServer().getMapFactory().getMap(920011200); //Teh exit map :) <---------t
var instanceName = "OrbisPQ" + instanceId;
var eim = em.newInstance(instanceName);
var mf = eim.getMapFactory();
em.getChannelServer().addInstanceId();
var map = mf.getMap(920010000);//wutt
//map.shuffleReactors();
// eim.addMapInstance(920010000,map);
//var firstPortal = eim.getMapInstance(920010000).getPortal("in00");
//firstPortal.setScriptName("hontale_BtoB1");
//Fuck this timer
//eim.setProperty("bulbWay", 0);
//Define all Maps and PortalScripts
var centerMap = eim.getMapInstance(920010100);
centerMap.getPortal(13).setScriptName("orbisPQSealedRoom");
centerMap.getPortal(4).setScriptName("orbisPQWalkway");
centerMap.getPortal(12).setScriptName("orbisPQStorage");
centerMap.getPortal(5).setScriptName("orbisPQLobby");
centerMap.getPortal(14).setScriptName("orbisPQOnTheWayUp");
centerMap.getPortal(15).setScriptName("orbisPQLounge");
centerMap.getPortal(16).setScriptName("orbisPQRoomOfDarkness");
var walkwayMap = eim.getMapInstance(920010200);
var storageMap = eim.getMapInstance(920010300);
var lobbyMap = eim.getMapInstance(920010400);
var sealedRoomMap = eim.getMapInstance(920010500);
var loungeMap = eim.getMapInstance(920010600);
var onTheWayUpMap = eim.getMapInstance(920010700);
var bossMap = eim.getMapInstance(920010800);
var jailMap = eim.getMapInstance(920010900);
var roomOfDarknessMap = eim.getMapInstance(920011000);
var bonusMap = eim.getMapInstance(920011100);
var endMap = eim.getMapInstance(920011300);
walkwayMap.getPortal(13).setScriptName("orbisPQWalkwayExit");
storageMap.getPortal(1).setScriptName("orbisPQStorageExit");
lobbyMap.getPortal(8).setScriptName("orbisPQLobbyExit");
sealedRoomMap.getPortal(3).setScriptName("orbisPQSRExit");
loungeMap.getPortal(17).setScriptName("orbisPQLoungeExit");
onTheWayUpMap.getPortal(23).setScriptName("orbisPQOnTheWayUpExit");
bossMap.getPortal(1).setScriptName("orbisPQGardenExit");
roomOfDarknessMap.getPortal(1).setScriptName("orbisPQRoomOfDarknessExit");
//-->Fuck we are done with portals -.-
eim.setProperty("killedCellions", "0");
eim.setProperty("papaSpawned", "no");
em.schedule("timeOut", 60 * 60000);
em.schedule("broadcastClock", 1500);
eim.setProperty("entryTimestamp",System.currentTimeMillis() + (60 * 60000));
return eim;
}
function afterSetup(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(920010000);
player.changeMap(map, map.getPortal(0));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock((Long.parseLong(eim.getProperty("entryTimestamp")) - System.currentTimeMillis()) / 1000));
var texttt = "Hi, my name is Eak, the Chamberlain of the Goddess. Don't be alarmed; you won't be able to see me right now. Back when the Goddess turned into a block of stone, I simultaneously lost my own power. If you gather up the power of the Magic Cloud of Orbis, however, then I'll be able to recover my body and re-transform back to my original self. Please collect #b20#k Magic Clouds and bring them back to me. Right now, you'll only see me as a tiny, flickering light."
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getNPCTalk(2013001, /*(byte)*/ 0, texttt, "00 00"));
//player.getClient().getSession().write(net.sf.odinms.scripting.npc.NPCScriptManager.dispose(eim.getClient()));
//THE CLOCK IS SHIT
//player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(1800));
}
function playerDead(eim, player) {
}
function playerRevive(eim, player) {
if (eim.isLeader(player)) { //check for party leader
//boot whole party and end
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
else { //boot dead player
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() <= minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
playerExit(eim, player);
}
}
function playerDisconnected(eim, player) {
if (eim.isLeader(player)) { //check for party leader
//PWN THE PARTY (KICK OUT)
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
if (party.get(i).equals(player)) {
removePlayer(eim, player);
}
else {
playerExit(eim, party.get(i));
}
}
eim.dispose();
}
else { //KICK THE D/CED CUNT
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() < minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
playerExit(eim, player);
}
}
function leftParty(eim, player) {
// If only 5 players are left, uncompletable:
var party = eim.getPlayers();
if (party.size() <= minPlayers) {
for (var i = 0; i < party.size(); i++) {
playerExit(eim,party.get(i));
}
eim.dispose();
}
else
playerExit(eim, player);
}
function disbandParty(eim) {
//boot whole party and end
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.cancelAllBuffs(); //We don't want people going out with wonky blessing >=(
player.changeMap(exitMap, exitMap.getPortal(0));
}
//Those offline cuntts
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function clearPQ(eim) {
// W00t! Bonus!!
var iter = eim.getPlayers().iterator();
var bonusMap = eim.getMapInstance(920011100);
while (iter.hasNext()) {
var player = iter.next();
player.changeMap(bonusMap, bonusMap.getPortal(0));
eim.setProperty("entryTimestamp",System.currentTimeMillis() + (1 * 60000));
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock(60));
}
eim.schedule("finish", 60000)
}
function finish(eim) {
var dMap = eim.getMapInstance(920011300);
var iter = eim.getPlayers().iterator();
while (iter.hasNext()) {
var player = iter.next();
eim.unregisterPlayer(player);
player.changeMap(dMap, dMap.getPortal(0));
}
eim.dispose();
}
function monsterKilled(mob, eim) {}
function allMonstersDead(eim) {} //Open Portal? o.O
function cancelSchedule() {
}
function timeOut() {
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerExit(eim, pIter.next());
}
}
eim.dispose();
}
}
function playerClocks(eim, player) {
if (player.getMap().hasTimer() == false){
player.getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.getClock((Long.parseLong(eim.getProperty("entryTimestamp")) - System.currentTimeMillis()) / 1000));
//player.getMap().setTimer(true);
}
}
function playerTimer(eim, player) {
if (player.getMap().hasTimer() == false) {
player.getMap().setTimer(true);
}
}
function broadcastClock(eim, player) {
//var party = eim.getPlayers();
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerClocks(eim, pIter.next());
}
}
//em.schedule("broadcastClock", 1600);
}
// for (var kkl = 0; kkl < party.size(); kkl++) {
// party.get(kkl).getMap().setTimer(true);
// }
var iterr = em.getInstances().iterator();
while (iterr.hasNext()) {
var eim = iterr.next();
if (eim.getPlayerCount() > 0) {
var pIterr = eim.getPlayers().iterator();
while (pIterr.hasNext()) {
//playerClocks(eim, pIter.next());
playerTimer(eim, pIterr.next());
}
}
//em.schedule("broadcastClock", 1600);
}
em.schedule("broadcastClock", 1600);
}
function dispose() {
}

View File

@@ -0,0 +1,262 @@
/**
* @author: Ronan
* @event: Pink Bean Battle
*/
importPackage(Packages.server.life);
importPackage(Packages.client.inventory);
var isPq = true;
var minPlayers = 6, maxPlayers = 30;
var minLevel = 120, maxLevel = 255;
var entryMap = 270050100;
var exitMap = 270050300;
var recruitMap = 270050000;
var clearMap = 270050300;
var minMapId = 270050100;
var maxMapId = 270050300;
var eventTime = 100; // 100 minutes
var lobbyRange = [0, 0];
function init() {
setEventRequirements();
}
function setLobbyRange() {
return lobbyRange;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages, mesoStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
mesoStages = []; //bonus meso given on CLEAR stage signal
eim.setEventClearStageMeso(mesoStages);
}
function afterSetup(eim) {
eim.dropMessage(5, "The first wave will start within 15 seconds, prepare yourselves.");
eim.schedule("startWave", 15 * 1000);
}
function setup(channel) {
var eim = em.newInstance("PinkBean" + channel);
eim.setProperty("canJoin", 1);
eim.setProperty("defeatedBoss", 0);
eim.setProperty("fallenPlayers", 0);
eim.setProperty("stage", 1);
eim.setProperty("channel", channel);
var level = 1;
eim.getInstanceMap(270050100).resetPQ(level);
eim.getInstanceMap(270050200).resetPQ(level);
eim.getInstanceMap(270050300).resetPQ(level);
var mob = MapleLifeFactory.getMonster(8820000);
eim.getInstanceMap(270050100).spawnMonsterOnGroundBelow(mob, new java.awt.Point(0, -42));
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function playerEntry(eim, player) {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has entered the map.");
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function scheduledTimeout(eim) {
end(eim);
}
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
eim.unregisterPlayer(player);
end(eim);
}
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
}
}
}
function changedLeader(eim, leader) {}
function playerDead(eim, player) {
var count = eim.getIntProperty("fallenPlayers");
count = count + 1;
eim.setIntProperty("fallenPlayers", count);
if(count == 5) {
eim.dropMessage(5, "[Expedition] Too much players have fallen, Pink Bean is now deemed undefeatable, the expedition is over.");
end(eim);
} else if(count == 4) {
eim.dropMessage(5, "[Expedition] Pink Bean is glowing stronger than ever, last stand mode everyone!");
} else if(count == 3) {
eim.dropMessage(5, "[Expedition] Casualty count is starting to get out of control. Take care folks.");
}
}
function playerRevive(eim, player) {
return true;
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
eim.unregisterPlayer(player);
end(eim);
}
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
}
}
function leftParty (eim, player) {}
function disbandParty (eim) {}
function monsterValue(eim, mobId) {
return 1;
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
}
function isPinkBean(mob) {
var mobid = mob.getId();
return (mobid == 8820001);
}
function isJrBoss(mob) {
var mobid = mob.getId();
return (mobid >= 8820002 && mobid <= 8820006);
}
function noJrBossesLeft(map) {
return map.countMonster(8820002, 8820006) == 0;
}
function spawnJrBoss(mobObj, gotKilled) {
if(gotKilled) {
spawnid = mobObj.getId() + 17;
} else {
mobObj.getMap().killMonster(mobObj.getId());
spawnid = mobObj.getId() - 17;
}
var mob = MapleLifeFactory.getMonster(spawnid);
mobObj.getMap().spawnMonsterOnGroundBelow(mob, mobObj.getPosition());
}
function monsterKilled(mob, eim) {
if(isPinkBean(mob)) {
eim.setIntProperty("defeatedBoss", 1);
eim.showClearEffect(mob.getMap().getId());
mob.getMap().killAllMonstersNotFriendly();
eim.clearPQ();
var ch = eim.getIntProperty("channel");
mob.getMap().broadcastPinkBeanVictory(ch);
} else if(isJrBoss(mob)) {
if(noJrBossesLeft(mob.getMap())) {
var stage = eim.getIntProperty("stage");
if(stage == 5) {
var iid = 4001193;
var itemObj = new Item(iid, 0, 1);
var mapObj = eim.getMapFactory().getMap(270050100);
var reactObj = mapObj.getReactorById(2708000);
var dropper = eim.getPlayers().get(0);
mapObj.spawnItemDrop(dropper, dropper, itemObj, reactObj.getPosition(), true, true);
eim.dropMessage(6, "With the last of his guardians' fall, Pink Bean loses his invulnerability. The real fight starts now!");
} else {
stage++;
eim.setIntProperty("stage", stage);
eim.dropMessage(5, "The next wave will start within 15 seconds, prepare yourselves.");
eim.schedule("startWave", 15 * 1000);
}
}
}
}
function startWave(eim) {
var mapObj = eim.getMapInstance(270050100);
var stage = eim.getProperty("stage");
for(var i = 1; i <= stage; i++) {
spawnJrBoss(mapObj.getMonsterById(8820019 + (i % 5)), false);
}
}
function allMonstersDead(eim) {}
function cancelSchedule() {}
function dispose(eim) {}

View File

@@ -5,7 +5,7 @@
var isPq = true;
var minPlayers = 6, maxPlayers = 30;
var minLevel = 70, maxLevel = 255;
var minLevel = 100, maxLevel = 255;
var entryMap = 551030200;
var exitMap = 551030100;
var recruitMap = 551030100;
@@ -52,8 +52,8 @@ function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages, mesoStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
itemSet = [1102145, 1102084, 1102085, 1102086, 1102087, 1052165, 1052166, 1052167, 1402013, 1332030, 1032030, 1032070, 4003000, 4000030, 4006000, 4006001, 4005000, 4005001, 4005002, 4005003, 4005004, 2022016, 2022263, 2022264, 2022015, 2022306, 2022307, 2022306, 2022113];
itemQty = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 50, 50, 120, 120, 4, 4, 4, 4, 2, 125, 125, 125, 30, 30, 30, 30, 30];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //bonus exp given on CLEAR stage signal

View File

@@ -0,0 +1,190 @@
/**
* @author: Ronan
* @event: Showa Boss Battle
*/
var isPq = true;
var minPlayers = 3, maxPlayers = 30;
var minLevel = 100, maxLevel = 255;
var entryMap = 801040100;
var exitMap = 801040004;
var recruitMap = 801040004;
var clearMap = 801040101;
var minMapId = 801040100;
var maxMapId = 801040100;
var eventTime = 60; // 60 minutes for boss stg
var lobbyRange = [0, 0];
function init() {
setEventRequirements();
}
function setLobbyRange() {
return lobbyRange;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages, mesoStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [1102145, 1102084, 1102085, 1102086, 1102087, 1052165, 1052166, 1052167, 1402013, 1332030, 1032030, 1032070, 4003000, 4000030, 4006000, 4006001, 4005000, 4005001, 4005002, 4005003, 4005004, 2022016, 2022263, 2022264, 2022015, 2022306, 2022307, 2022306, 2022113];
itemQty = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 40, 40, 100, 100, 2, 2, 2, 2, 1, 100, 100, 100, 40, 40, 40, 40, 40];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
mesoStages = []; //bonus meso given on CLEAR stage signal
eim.setEventClearStageMeso(mesoStages);
}
function afterSetup(eim) {}
function setup(channel) {
var eim = em.newInstance("Showa" + channel);
eim.setProperty("canJoin", 1);
var level = 1;
eim.getInstanceMap(801040100).resetPQ(level);
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function respawnStages(eim) {
eim.getInstanceMap(801040100).instanceMapRespawn();
eim.schedule("respawnStages", 15 * 1000);
}
function playerEntry(eim, player) {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has entered the map.");
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function scheduledTimeout(eim) {
end(eim);
}
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
eim.unregisterPlayer(player);
end(eim);
}
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
}
}
}
function changedLeader(eim, leader) {}
function playerDead(eim, player) {}
function playerRevive(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
end(eim);
}
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
}
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
eim.unregisterPlayer(player);
end(eim);
}
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
}
}
function leftParty (eim, player) {}
function disbandParty (eim) {}
function monsterValue(eim, mobId) {
return 1;
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.getInstanceMap(801040100).killAllMonstersNotFriendly();
eim.stopEventTimer();
eim.setEventCleared();
}
function isTheBoss(mob) {
return mob.getId() == 9400300;
}
function monsterKilled(mob, eim) {
if(isTheBoss(mob)) {
eim.showClearEffect();
eim.clearPQ();
}
}
function allMonstersDead(eim) {}
function cancelSchedule() {}
function dispose(eim) {}

View File

@@ -1,195 +1,192 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
/**
* @author: Ronan
* @event: Zakum Battle
*/
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.
importPackage(Packages.server.life);
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
var isPq = true;
var minPlayers = 6, maxPlayers = 30;
var minLevel = 50, maxLevel = 255;
var entryMap = 280030000;
var exitMap = 211042400;
var recruitMap = 211042400;
var clearMap = 211042400;
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 minMapId = 280030000;
var maxMapId = 280030000;
/*
* @Author Stereo
* @Modified By XkelvinchiaX(Kelvin)
* @Modified By Moogra
* @Modified By SharpAceX(Alan)
* Zakum Battle
*/
var eventTime = 60; // 60 minutes
var exitMap;
var altarMap;
var minPlayers = 1;
var fightTime = 75;
var altarTime = 15;
var gate;
var lobbyRange = [0, 0];
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
setEventRequirements();
}
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 setLobbyRange() {
return lobbyRange;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages, mesoStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
mesoStages = []; //bonus meso given on CLEAR stage signal
eim.setEventClearStageMeso(mesoStages);
}
function afterSetup(eim) {}
function playerEntry(eim,player) {
var altar = eim.getMapInstance(altarMap.getId());
player.changeMap(altar, altar.getPortal(0));
function setup(channel) {
var eim = em.newInstance("Zakum" + channel);
eim.setProperty("canJoin", 1);
eim.setProperty("defeatedBoss", 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.");
var level = 1;
eim.getInstanceMap(280030000).resetPQ(level);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
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 playerEntry(eim, player) {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has entered the map.");
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function playerDead(eim,player) {
function scheduledTimeout(eim) {
end(eim);
}
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 changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
eim.unregisterPlayer(player);
end(eim);
}
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
}
}
}
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 changedLeader(eim, leader) {}
function leftParty(eim,player) { // do nothing in Zakum
}
function playerDead(eim, player) {}
function disbandParty(eim) { // do nothing in Zakum
}
function playerUnregistered(eim, player) {}
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);
function playerRevive(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
if (player != null){
player.changeMap(exitMap, exitMap.getPortal(0));
}
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
end(eim);
}
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();
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
}
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
eim.unregisterPlayer(player);
end(eim);
}
else {
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
eim.unregisterPlayer(player);
}
}
function leftParty (eim, player) {}
function disbandParty (eim) {}
function monsterValue(eim, mobId) {
return 1;
}
function playerUnregistered(eim, player) {
if(eim.isEventCleared()) {
em.completeQuest(player, 100200, 2030010);
}
}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function monsterKilled(mob, eim) {}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
}
function isZakum(mob) {
var mobid = mob.getId();
return (mobid == 8800002);
}
function monsterKilled(mob, eim) {
if(isZakum(mob)) {
eim.setIntProperty("defeatedBoss", 1);
eim.showClearEffect(mob.getMap().getId());
eim.clearPQ();
mob.getMap().broadcastZakumVictory();
}
}
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));
}
}
function dispose(eim) {}

View File

@@ -1,165 +1,227 @@
/*
* This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
/**
* @author: Ronan
* @event: Zakum PQ
*/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
var isPq = true;
var minPlayers = 1, maxPlayers = 6;
var minLevel = 50, maxLevel = 255;
var entryMap = 280010000;
var exitMap = 211042300;
var recruitMap = 211042300;
var clearMap = 211042300;
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
var minMapId = 280010000;
var maxMapId = 280011006;
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 eventTime = 30; // 30 minutes
/*
* @Author Lerk
*
* Zakum Party Quest
*/
var exitMap;
var instanceId;
var lobbyRange = [0, 0];
function init() {
instanceId = 1;
em.setProperty("shuffleReactors","true");
setEventRequirements();
}
function monsterValue(eim, mobId) {
return 1;
function setLobbyRange() {
return lobbyRange;
}
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 setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [4001015, 4001016, 4001018];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
}
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
var eligible = [];
var hasLeader = false;
if(party.size() > 0) {
var partyList = party.toArray();
for(var i = 0; i < party.size(); i++) {
var ch = partyList[i];
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
if(ch.isLeader()) hasLeader = true;
eligible.push(ch);
}
}
}
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
return eligible;
}
function setup(level, lobbyid) {
var eim = em.newInstance("PreZakum" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("gotDocuments", 0);
eim.getInstanceMap(280010000).resetPQ(level);
eim.getInstanceMap(280010010).resetPQ(level);
eim.getInstanceMap(280010011).resetPQ(level);
eim.getInstanceMap(280010020).resetPQ(level);
eim.getInstanceMap(280010030).resetPQ(level);
eim.getInstanceMap(280010031).resetPQ(level);
eim.getInstanceMap(280010040).resetPQ(level);
eim.getInstanceMap(280010041).resetPQ(level);
eim.getInstanceMap(280010050).resetPQ(level);
eim.getInstanceMap(280010060).resetPQ(level);
eim.getInstanceMap(280010070).resetPQ(level);
eim.getInstanceMap(280010071).resetPQ(level);
eim.getInstanceMap(280010080).resetPQ(level);
eim.getInstanceMap(280010081).resetPQ(level);
eim.getInstanceMap(280010090).resetPQ(level);
eim.getInstanceMap(280010091).resetPQ(level);
eim.getInstanceMap(280010100).resetPQ(level);
eim.getInstanceMap(280010101).resetPQ(level);
eim.getInstanceMap(280010110).resetPQ(level);
eim.getInstanceMap(280010120).resetPQ(level);
eim.getInstanceMap(280010130).resetPQ(level);
eim.getInstanceMap(280010140).resetPQ(level);
eim.getInstanceMap(280010150).resetPQ(level);
eim.getInstanceMap(280011000).resetPQ(level);
eim.getInstanceMap(280011001).resetPQ(level);
eim.getInstanceMap(280011002).resetPQ(level);
eim.getInstanceMap(280011003).resetPQ(level);
eim.getInstanceMap(280011004).resetPQ(level);
eim.getInstanceMap(280011005).resetPQ(level);
eim.getInstanceMap(280011006).resetPQ(level);
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function afterSetup(eim) {}
function respawnStages(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));
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
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 scheduledTimeout(eim) {
end(eim);
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, exitMap.getPortal(0));
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
//for offline players
function removePlayer(eim, player) {
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
}
function changedLeader(eim, leader) {
var mapid = leader.getMapId();
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
end(eim);
}
}
function playerDead(eim, player) {}
function playerRevive(eim, player) { // player presses ok on the death pop up.
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function leftParty(eim, player) {
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function disbandParty(eim) {
end(eim);
}
function monsterValue(eim, mobId) {
return 1;
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
//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();
eim.stopEventTimer();
eim.setEventCleared();
}
function monsterKilled(mob, eim) {}
function allMonstersDead(eim) {}
function cancelSchedule() {
}
function cancelSchedule() {}
function timeOut() {
var iter = em.getInstances().iterator();
while (iter.hasNext()) {
var eim = iter.next();
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()) {
playerExit(eim, pIter.next());
}
}
eim.dispose();
}
}
function dispose(eim) {}

View File

@@ -0,0 +1,50 @@
/*
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, Ronan
*@Map(s): All Dojo fighting maps
*@Function: Spawns dojo monsters and handles time
*/
function start(ms) {
ms.getPlayer().resetEnteredScript();
var stage = Math.floor(ms.getMapId() / 100) % 100;
var callBoss = false;
if (stage % 6 == 1) {
ms.getClient().getChannelServer().startDojoSchedule(ms.getMapId());
} else if(stage % 6 == 0) {
ms.getClient().getChannelServer().dismissDojoSchedule(ms.getMapId(), ms.getParty());
}
callBoss = ms.getClient().getChannelServer().setDojoProgress(ms.getMapId());
if (stage % 6 > 0) {
var realstage = stage - ((stage / 6) | 0);
var mob = ms.getMonsterLifeFactory(9300183 + realstage);
if (callBoss && mob != null && ms.getPlayer().getMap().getMonsterById(9300216) == null) {
mob.setBoss(false);
ms.getPlayer().getMap().spawnDojoMonster(mob);
}
}
}

View File

@@ -22,5 +22,5 @@
function start(ms) {
ms.unlockUI();
ms.forceStartQuest(22015);
ms.getClient().getQM().forceStartQuest(22015);
}

View File

@@ -0,0 +1,42 @@
/*
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, Ronan
*@Map(s): All Dojo fighting maps
*@Function: Displays info for the player when entering a dojo map
*/
function start(ms) {
ms.getPlayer().resetEnteredScript();
var stage = Math.floor(ms.getPlayer().getMap().getId() / 100) % 100;
ms.getPlayer().showDojoClock();
if (stage % 6 > 0) {
var realstage = stage - ((stage / 6) | 0);
ms.dojoEnergy();
ms.playSound("Dojang/start");
ms.showEffect("dojang/start/stage");
ms.showEffect("dojang/start/number/" + realstage);
}
}

View File

@@ -28,7 +28,9 @@ var messages = Array("Your courage for challenging the Mu Lung Dojo is commendab
function start(ms) {
if (ms.getPlayer().getMap().getId() == 925020000) {
ms.getPlayer().startMapEffect(messages[(Math.random() * messages.length) | 0], 5120024);
if(ms.getPlayer().getMap().findClosestPlayerSpawnpoint(ms.getPlayer().getPosition()).getId() == 0) {
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);

52
scripts/npc/1052107.js Normal file
View File

@@ -0,0 +1,52 @@
/*
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/>.
*/
/* Small Street Light
Kerning deep Subway areas
Nothing at all.
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("A small focus of light lighting in the immersive darkness.");
cm.dispose();
}
}
}

View File

@@ -65,8 +65,8 @@ function action(mode, type, selection) {
cm.sendOk("Please defeat at least 10,000 monsters in the Station and look for me again. Kills : " + mons);
} else if (cm.canHold(1142141) && !cm.haveItem(1142141)){
cm.gainItem(1142141,1);
cm.forceStartQuest(29931);
cm.forceCompleteQuest(29931);
cm.startQuest(29931);
cm.completeQuest(29931);
} else {
cm.sendOk("Please make room.");
}

View File

@@ -117,7 +117,7 @@ function action(mode, type, selection){
} else {
if (cm.getPlayer().getLevel() >= 50){
cm.sendNext("Ok, go.");
cm.getPlayer().setPartyQuestItemObtained("z");
if(!cm.isQuestStarted(100200)) cm.startQuest(100200);
}else
cm.sendNext("You're weak.");
cm.dispose();

View File

@@ -105,7 +105,7 @@ function action(mode, type, selection){
} else {
if (cm.getPlayer().getLevel() >= 50){
cm.sendNext("Ok, go.");
cm.getPlayer().setPartyQuestItemObtained("z");
if(!cm.isQuestStarted(100200)) cm.startQuest(100200);
}else
cm.sendNext("You're weak.");
cm.dispose();

View File

@@ -106,7 +106,7 @@ function action(mode, type, selection){
} else {
if (cm.getPlayer().getLevel() >= 50){
cm.sendNext("Ok, go.");
cm.getPlayer().setPartyQuestItemObtained("z");
if(!cm.isQuestStarted(100200)) cm.startQuest(100200);
}else
cm.sendNext("You're weak.");
cm.dispose();

View File

@@ -105,7 +105,7 @@ function action(mode, type, selection){
} else {
if (cm.getPlayer().getLevel() >= 50){
cm.sendNext("Ok, go.");
cm.getPlayer().setPartyQuestItemObtained("z");
if(!cm.isQuestStarted(100200)) cm.startQuest(100200);
}else
cm.sendNext("You're weak.");
cm.dispose();

View File

@@ -104,7 +104,7 @@ function action(mode, type, selection){
} else {
if (cm.getPlayer().getLevel() >= 50){
cm.sendNext("Ok, go.");
cm.getPlayer().setPartyQuestItemObtained("z");
if(!cm.isQuestStarted(100200)) cm.startQuest(100200);
}else
cm.sendNext("You're weak.");
cm.dispose();

View File

@@ -1,14 +1,15 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,56 +19,31 @@
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/>.
*/
/* Adobis
*
* El Nath: The Door to Zakum (211042300)
* El Nath - The Door to Zakum (211042300)
*
* Zakum Quest NPC
* Custom Quest 100200 = whether you can do Zakum
* Custom Quest 100201 = Collecting Gold Teeth <- indicates it's been started
* Custom Quest 100203 = Collecting Gold Teeth <- indicates it's finished
* 4031061 = Piece of Fire Ore - stage 1 reward
* 4031062 = Breath of Fire - stage 2 reward
* 4001017 = Eye of Fire - stage 3 reward
* 4000082 = Zombie's Gold Tooth (stage 3 req)
* Vs Zakum Recruiter NPC
*
* Custom Quest 100200 = Whether you can start Zakum PQ
* Custom Quest 100201 = Whether you have done the trials
*/
var status;
var mapId = 211042300;
var stage;
var teethmode;
var minLevel = 50;
var em;
var selectedType;
var gotAllDocs;
function start() {
if (cm.getPlayer().getLevel() >= minLevel) {
if (cm.isQuestCompleted(100200) && !cm.isQuestStarted(100200)) {
cm.startQuest(100200);
cm.sendOk("You want to be permitted to do the Zakum Dungeon Quest? Well, I, #bAdobis#k... judge you to be suitable. You should be safe roaming around the dungeon. Just be careful...");
cm.dispose();
return;
}
else if (cm.isQuestStarted(100201)) {
teethmode = 1;
cm.sendNext("Have you got the items I asked for? This ain't no charity.");
}
else
cm.sendSimple("Beware, for the power of olde has not been forgotten... #b\r\n#L0#Enter the Unknown Dead Mine (Stage 1)#l\r\n#L1#Face the Breath of Lava (Stage 2)#l\r\n#L2#Forging the Eyes of Fire (Stage 3)#l");
if (cm.isQuestCompleted(100201))
teethmode = 2;
}
else {
cm.sendOk("Please come back to me when you've become stronger. I've seen a few adventurers in my day, and you're far too weak to complete my tasks.");
cm.dispose();
}
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 0 && status == 0) {
if (mode == 0) {
cm.dispose();
return;
}
@@ -75,117 +51,77 @@ function action(mode, type, selection) {
status++;
else
status--;
if (status == 1) {
if (teethmode == 1) {
if (cm.haveItem(4031061,1) && cm.haveItem(4031062,1) && cm.haveItem(4000082,30)) {
cm.gainItem(4031061,-1);
cm.gainItem(4031062,-1);
cm.gainItem(4000082,-30);
cm.gainItem(4001017,5);
cm.sendNext("Thank you for the teeth! Next time you see me, I'll be blinging harder than #rJaws#k! Goodbye and good luck!");
cm.completeQuest(100201);
cm.completeQuest(100200);
if(!cm.isQuestStarted(100200)) {
cm.sendOk("Beware, for the power of olde has not been forgotten... ");
cm.dispose();
return;
}
em = cm.getEventManager("ZakumPQ");
if(em == null) {
cm.sendOk("The Zakum PQ has encountered an error.");
cm.dispose();
return;
}
if (status == 0) {
cm.sendSimple("#e#b<Party Quest: Zakum Campaign>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nBeware, for the power of olde has not been forgotten... #b\r\n#L0#Enter the Unknown Dead Mine (Stage 1)#l\r\n#L1#Face the Breath of Lava (Stage 2)#l\r\n#L2#Forging the Eyes of Fire (Stage 3)#l");
}
else if (status == 1) {
if (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("You can participate in the party quest only if you are in a party.");
cm.dispose();
}
else {
cm.sendNext("You shtill didn't get me my teef! Howsh a man shupposhed to conshentrate wifout teef?");
} else if(!cm.isLeader()) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
}
return;
}
if (selection == 0) { //ZPQ
if (cm.getParty() == null) { //no party
cm.sendNext("Please talk to me again when you have formed a party.");
cm.dispose();
}
else if (!cm.isLeader()) { //not party leader
cm.sendNext("Please have the leader of your party speak with me.");
cm.dispose();
}
else {
//TODO: add zakum variable to characters, check that instead; less hassle
var party = cm.getParty().getMembers();
mapId = cm.getPlayer().getMapId();
var next = true;
for (var i = 0; i < party.size(); i++)
if ((party.get(i).getLevel() < 50) || (party.get(i).getMapid() != mapId))
next = false;
if (next) {
//all requirements met, make an instance and start it up
//cm.startPQ("ZakumPQ");
var em = cm.getEventManager("ZakumPQ");
if (em == null) {
cm.sendOk("This trial is currently under construction.");
} else {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap())) {
cm.sendOk("A party in your name is already registered in this event.");
cm.dispose();
return;
}
party = cm.getPlayer().getEventInstance().getPlayers();
cm.removeFromParty(4001015, party);
cm.removeFromParty(4001018, party);
cm.removeFromParty(4001016, party);
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
}
cm.dispose();
}
else {
cm.sendNext("Please make sure all of your members are qualified to begin my trials...");
cm.dispose();
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
cm.dispose();
}
}
else if (selection == 1) { //Zakum Jump Quest
stage = 1;
} else if(selection == 1) {
if (cm.haveItem(4031061) && !cm.haveItem(4031062))
cm.sendYesNo("Would you like to attempt the #bBreath of Lava#k? If you fail, there is a very real chance you will die.");
else {
if (cm.haveItem(4031062))
cm.sendNext("You've already got the #bBreath of Lava#k, you don't need to do this stage.");
else
cm.sendNext("Please complete the earlier trials first.");
if (cm.haveItem(4031062)) cm.sendNext("You've already got the #bBreath of Lava#k, you don't need to do this stage.");
else cm.sendNext("Please complete the earlier trials first.");
cm.dispose();
}
}
else if (selection == 2) { //Golden Tooth Collection
stage = 2;
if (teethmode == 2 && cm.haveItem(4031061) && cm.haveItem(4031062))
cm.sendYesNo("If you want more #bEyes of Fire#k, you need to bring me the same #b30 Zombie's Lost Gold Tooth#k. Turns out gold dentures don't last long, and I need a new one.\r\nDo you have those teeth for me?");
else if (cm.haveItem(4031061) && cm.haveItem(4031062))
cm.sendYesNo("Okay, you've completed the earlier trials. Now, with a little hard work I can get you the #bseeds of Zakum#k necessary to enter combat. But first, my teeths are not as good as they used to be. You ever seen a dentist in Maple Story? Well, I heard the Miner Zombies have gold teeth. I'd like you to collect #b30 Zombie's Lost Gold Tooth#k so I can build myself some dentures. Then I'll be able to get you the items you desire.\r\nRequired:\r\n#i4000082##b x 30");
else {
cm.sendNext("Please complete the earlier trials before attempting this one.");
} else {
if(cm.haveItem(4031061) && cm.haveItem(4031062)) {
if(!cm.haveItem(4000082, 30)) {
cm.sendOk("You have completed the trials, however there still the need of #b30 #t4000082##k to forge the #t4001017#.");
} else {
cm.completeQuest(100201);
cm.gainItem(4031061, -1);
cm.gainItem(4031062, -1);
cm.gainItem(4000082, -30);
cm.gainItem(4001017, 1);
cm.sendNext("You have completed the trials, from now on having my approval to challenge Zakum.");
}
cm.dispose();
} else {
cm.sendOk("You lack some of the required items to forge the #b#t4001017##k.");
cm.dispose();
}
}
}
else if (status == 2) {
if (stage == 1) {
cm.warp(280020000); // Breath of Lava I
cm.dispose();
}
if (stage == 2) {
if (teethmode == 2) {
if (cm.haveItem(4031061,1) && cm.haveItem(4031062,1) && cm.haveItem(4000082,30)) { // take away items, give eyes of fire, complete quest
cm.gainItem(4031061,-1);
cm.gainItem(4031062,-1);
cm.gainItem(4000082,-30);
cm.gainItem(4001017,5);
cm.sendNext("Thank you for the teeth! Next time you see me, I'll be blinging harder than #rJaws#k! Goodbye and good luck!");
cm.completeQuest(100201);
cm.completeQuest(100200);
cm.dispose();
}
else {
cm.sendNext("You don't have any teeth yet! Don't try to pull a fast one on me.");
cm.dispose();
}
}
else {
cm.startQuest(100201);
cm.dispose();
}
}
cm.warp(280020000);
cm.dispose();
}
}
}

View File

@@ -31,26 +31,19 @@
importPackage(Packages.server.expeditions);
function start() {
cm.sendYesNo("If you leave now, you'll have to start over. Are you sure you want to leave?");
if(cm.getMapId() == 280030000) {
if(!cm.getEventInstance().isEventCleared()) cm.sendYesNo("If you leave now, you'll have to start over. Are you sure you want to leave?");
else cm.sendYesNo("You guys finally overthrew Zakum, what a superb feat! Congratulations! Are you sure you want to leave now?");
} else {
cm.sendYesNo("If you leave now, you'll have to start over. Are you sure you want to leave?");
}
}
function action(mode, type, selection) {
var zakum = MapleExpeditionType.ZAKUM;
var expedition = cm.getExpedition(zakum);
if (mode < 1)
cm.dispose();
else {
if (cm.getPlayer().getMap().getCharacters().size() < 2){
cm.getPlayer().getMap().killAllMonsters();
cm.getPlayer().getMap().resetReactors();
if (expedition != null){
cm.endExpedition(expedition);
}
}
if (cm.getPlayer().getEventInstance() != null)
cm.getPlayer().getEventInstance().removePlayer(cm.getPlayer());
else
cm.warp(211042300);
cm.warp(211042300);
cm.dispose();
}
}

View File

@@ -21,6 +21,7 @@
/*Adobis
*
*@author SharpAceX (Alan)
*@author Ronan
*/
importPackage(Packages.server.expeditions);
importPackage(Packages.tools);
@@ -30,7 +31,12 @@ var status = 0;
var expedition;
var player;
var em;
var zakum = MapleExpeditionType.ZAKUM;
var exped = MapleExpeditionType.ZAKUM;
var expedName = "Zakum";
var expedBoss = "Zakum";
var expedMap = "Zakum's Altar";
var expedItem = 4001017;
var list = "What would you like to do?#b\r\n\r\n#L1#View current Expedition members#l\r\n#L2#Start the fight!#l\r\n#L3#Stop the expedition.#l";
function start() {
@@ -40,114 +46,140 @@ function start() {
function action(mode, type, selection) {
player = cm.getPlayer();
expedition = cm.getExpedition(zakum);
expedition = cm.getExpedition(exped);
em = cm.getEventManager("ZakumBattle");
if (mode < 1) {
if (mode == -1) {
cm.dispose();
return;
}
if (status == 0) {
//cm.removeExpedition(expedition);
if (player.getClient().getChannel() != 1) { //Only channel 1
cm.sendOk("Sorry, Zakum may only be challenged on #bChannel 1#k.");
cm.dispose();
} else if (player.getLevel() < zakum.getMinLevel() && player.getLevel() > zakum.getMaxLevel()) { //Don't fit requirement
cm.sendOk("You do not meet the criteria to take on Zakum!");
cm.dispose();
} else if (expedition == null) { //Start an expedition
cm.sendSimple("Would you like to assemble a team to take on the mighty #rZakum#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
status = 2;
} else if (expedition.isRegistering()) { //If the expedition is registering
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
cm.sendOk("You have already registered for the expedition. Please wait for " + expedition.getLeader().getName() + " to begin the expedition.");
cm.dispose();
} else { //If you aren't in it, you're going to get added
cm.sendOk(expedition.addMember(cm.getPlayer()));
cm.dispose();
}
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
if (expedition.contains(player)) { //If you're registered, warp you in
em.getInstance("ZakumBattle_" + player.getClient().getChannel()).registerPlayer(player);
cm.dispose();
} else { //If you're not in by now, tough luck
cm.sendOk("Another expedition has taken the initiative to fight Zakum, lets pray for those brave souls.");
cm.dispose();
}
}
} else if (status == 1) {
if (selection == 1) {
cm.createExpedition(zakum);
cm.sendOk("The #rZakum Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
cm.dispose();
return;
} else if (selection == 2) {
cm.sendOk("Sure, not everyone's up to challenging the might of Zakum.");
} else {
if (mode == 0) {
cm.dispose();
return;
}
} else if (status == 2) {
if (selection == 1) {
if (expedition == null) {
cm.sendOk("The expedition could not be loaded.");
if (status == 0) {
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
cm.dispose();
} else if (expedition == null) { //Start an expedition
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
status = 2;
} else if (expedition.isRegistering()) { //If the expedition is registering
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin the expedition.");
cm.dispose();
} else { //If you aren't in it, you're going to get added
cm.sendOk(expedition.addMember(cm.getPlayer()));
cm.dispose();
}
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
if (expedition.contains(player)) { //If you're registered, warp you in
var eim = em.getInstance(expedName + player.getClient().getChannel());
if(eim.getIntProperty("canJoin") == 1) {
eim.registerPlayer(player);
} else {
cm.sendOk("Your expedition already started the battle against " + expedBoss + ". Lets pray for those brave souls.");
}
cm.dispose();
} else { //If you're not in by now, tough luck
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
cm.dispose();
}
}
} else if (status == 1) {
if (selection == 1) {
if (!cm.haveItem(expedItem)) {
cm.sendOk("As the expedition leader, you must have on your inventory a #b#t" + expedItem + "##k to battle " + expedBoss + "!");
cm.dispose();
return;
}
expedition = cm.getExpedition(exped);
if(expedition != null) {
cm.sendOk("Someone already taken the initiative to be the leader of the expedition. Try joining them!");
cm.dispose();
return;
}
cm.createExpedition(exped);
cm.sendOk("The #r" + expedBoss + " Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
cm.dispose();
return;
} else if (selection == 2) {
cm.sendOk("Sure, not everyone's up to challenging " + expedBoss + ".");
cm.dispose();
return;
}
var size = expedition.getMembers().size();
if (size == 1) {
cm.sendOk("You are the only member of the expedition.");
} else if (status == 2) {
if (selection == 1) {
if (expedition == null) {
cm.sendOk("The expedition could not be loaded.");
cm.dispose();
return;
}
var size = expedition.getMembers().size();
if (size == 1) {
cm.sendOk("You are the only member of the expedition.");
cm.dispose();
return;
}
var text = "The following members make up your expedition (Click on them to expel them):\r\n";
text += "\r\n\t\t1." + expedition.getLeader().getName();
for (var i = 1; i < size; i++) {
text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
}
cm.sendSimple(text);
status = 6;
} else if (selection == 2) {
var min = exped.getMinSize();
var size = expedition.getMembers().size();
if (size < min) {
cm.sendOk("You need at least " + min + " players registered in your expedition.");
cm.dispose();
return;
}
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
status = 4;
} else if (selection == 3) {
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
cm.endExpedition(expedition);
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
cm.dispose();
return;
}
var text = "The following members make up your expedition (Click on them to expel them):\r\n";
text += "\r\n\t\t1." + expedition.getLeader().getName();
for (var i = 1; i < size; i++) {
text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
} else if (status == 4) {
if (em == null) {
cm.sendOk("The event could not be initialized, please report this on the forum.");
cm.dispose();
return;
}
cm.sendSimple(text);
status = 6;
} else if (selection == 2) {
cm.sendOk("The expedition will begin and you will now be escorted to the #bEntrance to Zakum Altar#k.");
status = 4;
} else if (selection == 3) {
player.getMap().broadcastMessage(MaplePacketCreator.removeClock());
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
cm.endExpedition(expedition);
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
cm.dispose();
return;
}
} else if (status == 4) {
var min = 1; //zakum.getMinSize();
var size = expedition.getMembers().size();
if (size < min) {
cm.sendOk("You need at least " + min + " players registered in your expedition.");
em.setProperty("leader", player.getName());
em.setProperty("channel", player.getClient().getChannel());
if(!em.startInstance(expedition)) {
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
cm.dispose();
return;
}
cm.dispose();
return;
}
if (em == null) {
cm.sendOk("The event could not be found, please report this on the forum.");
cm.dispose();
return;
}
cm.sendOk("Good luck! Zakum is a worthy foe!");
em.setProperty("leader", player.getName());
em.setProperty("channel", player.getClient().getChannel());
em.startInstance(expedition);
cm.dispose();
return;
} else if (status == 6) {
if (selection > 0) {
var banned = expedition.getMembers().get(selection);
expedition.ban(banned);
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
status = 2;
} else if (status == 6) {
if (selection > 0) {
var banned = expedition.getMembers().get(selection - 1);
expedition.ban(banned);
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
status = 2;
}
}
}
}
}

View File

@@ -28,17 +28,18 @@
var status;
var selectedType;
var scrolls;
var gotAllDocs;
function start() {
cm.sendSimple("...#b\r\n#L0#What am I supposed to do here?#l\r\n#L1#I brought items!#l\r\n#L2#I want to get out!#l");
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 0 && status == 0) {
if (mode == 0) {
cm.dispose();
return;
}
@@ -46,50 +47,95 @@ function action(mode, type, selection) {
status++;
else
status--;
if (status == 1) {
selectedType = selection;
if (selection == 0) {
cm.sendNext("To reveal the power of Zakum, you'll have to recreate its core. Hidden somewhere in this dungeon is a \"Fire Ore\" which is one of the necessary materials for that core. Find it, and bring it to me.\r\n\r\nOh, and could you do me a favour? There's also a number of Paper Documents lying under rocks around here. If you can get 30 of them, I can reward you for your efforts.")
cm.dispose();
var eim = cm.getPlayer().getEventInstance();
if (status == 0) {
if(!eim.isEventCleared()) {
cm.sendSimple("...#b\r\n#L0#What am I supposed to do here?#l\r\n#L1#I brought items!#l\r\n#L2#I want to get out!#l");
} else {
cm.sendNext("You completed this ordeal, now receive your prize.");
}
else if (selection == 1) {
if (!cm.haveItem(4001018)) { //documents
cm.sendNext("Please bring the Fire Ore with you.")
}
else if (status == 1) {
if(!eim.isEventCleared()) {
selectedType = selection;
if (selection == 0) {
cm.sendNext("To reveal the power of Zakum, you'll have to recreate its core. Hidden somewhere in this dungeon is a #b\"Fire Ore\"#k which is one of the necessary materials for that core. Find it, and bring it to me.\r\n\r\nOh, and could you do me a favour? There's also a number of #bPaper Documents#k lying under rocks around here. If you can get 30 of them, I can reward you for your efforts.");
cm.dispose();
return;
}
else {
if (!cm.haveItem(4001015, 30)) { //documents
cm.sendYesNo("So, you brought the fire ore with you? In that case, I can give you and your party a piece of it that should be more than enough to make the core of Zakum. Make sure your whole party has room in their inventory before proceeding.");
scrolls = false;
else if (selection == 1) {
if(!cm.isEventLeader()) {
cm.sendNext("Please let your leader bring the materials to me to complete this ordeal.");
cm.dispose();
return;
}
if (!cm.haveItem(4001018)) { //fire ore
cm.sendNext("Please bring the #bFire Ore#k with you.");
cm.dispose();
}
else {
gotAllDocs = cm.haveItem(4001015, 30);
if (!gotAllDocs) { //documents
cm.sendYesNo("So, you brought the fire ore with you? In that case, I can give you and your party a piece of it that should be more than enough to make the core of Zakum. Make sure your whole party has room in their inventory before proceeding.");
} else {
cm.sendYesNo("So, you brought the fire ore and the documents with you? In that case, I can give you and your party a piece of it that should be more than enough to make the core of Zakum. As well, since you brought the documents with you, I can also give you a special item which will #bbring you to the mine's entrance at any time#k. Make sure your whole party has room in their inventory before proceeding.");
}
}
} else if (selection == 2)
cm.sendYesNo("Are you sure you want to exit? If you're the party leader, your party will also be removed from the mines.");
} else {
if(eim.getProperty("gotDocuments") == 1) {
if(eim.gridCheck(cm.getPlayer()) == -1) {
if(cm.canHoldAll([2030007, 4031061], [5, 1])) {
cm.gainItem(2030007, 5);
cm.gainItem(4031061, 1);
eim.gridInsert(cm.getPlayer(), 1);
} else {
cm.sendOk("Make sure you have room in your inventory before proceeding.");
}
} else {
cm.sendYesNo("So, you brought the fire ore and the documents with you? In that case, I can give you and your party a piece of it that should be more than enough to make the core of Zakum. As well, since you brought the documents with you, I can also give you a special item which will bring you to the mine's entrance at any time. Make sure your whole party has room in their inventory before proceeding.");
scrolls = true;
cm.sendOk("You have already received your share. You can now exit the mines through the portal over there.");
}
} else {
if(eim.gridCheck(cm.getPlayer()) == -1) {
if(cm.canHold(4031061, 1)) {
cm.gainItem(4031061, 1);
eim.gridInsert(cm.getPlayer(), 1);
} else {
cm.sendOk("Make sure you have room in your inventory before proceeding.");
}
} else {
cm.sendOk("You have already received your share. You can now exit the mines through the portal over there.");
}
}
} else if (selection == 2)
cm.sendYesNo("Are you sure you want to exit? If you're the party leader, your party will also be removed from the mines.")
cm.dispose();
}
}
else if (status == 2) {
var eim = cm.getPlayer().getEventInstance();
if (selectedType == 1) {
var party = eim.getPlayers();
cm.gainItem(4001018, -1);
if (scrolls)
if(gotAllDocs) {
cm.gainItem(4001015, -30);
cm.givePartyItems(4031061, 1, party);
if (scrolls) {
cm.givePartyItems(2030007, 5, party);
cm.givePartyExp(20000, party);
} else
cm.givePartyExp(12000, party);
eim.setProperty("gotDocuments", 1);
eim.giveEventPlayersExp(20000);
} else {
eim.giveEventPlayersExp(12000);
}
eim.clearPQ();
cm.dispose();
}
else if (selectedType == 2) {
if (cm.isLeader())
eim.disbandParty();
else
eim.leaveParty(cm.getPlayer());
cm.warp(211042300);
cm.dispose();
}
}

View File

@@ -23,13 +23,12 @@
*
* Adobis's Mission I : Breath of Lava <Level 2> (280020001)
* Zakum Quest NPC
* Custom Quest 100202 -> Done this stage once
*/
var status;
var status = -1;
function start() {
cm.sendNext("Congratulations on getting this far! Well, I suppose I'd better give you your #bBreath of Fire#k. You've certainly earned it!");
action(1, 0, 0);
}
function action(mode, type, selection) {
@@ -37,16 +36,22 @@ function action(mode, type, selection) {
cm.dispose();
else {
status++;
if (status == 1)
cm.sendNextPrev("Well, time for you to head off.");
else if (status == 2) {
cm.gainItem(4031062,1);
cm.warp(211042300);
if (cm.isQuestCompleted(100202)) {
cm.startQuest(100202);
cm.completeQuest(100202);
cm.gainExp(10000 * qm.getPlayer().getExpRate());
if (status == 0) {
cm.sendNext("Congratulations on getting this far! Well, I suppose I'd better give you your #bBreath of Fire#k. You've certainly earned it!");
} else if (status == 1) {
if(!cm.canHold(4031062)) {
cm.sendOk("Try freeing a slot to receive the #b#t4031062##k.");
cm.dispose();
return;
}
cm.sendNext("Well, time for you to head off.");
} else if (status == 2) {
cm.gainItem(4031062,1);
cm.gainExp(10000 * cm.getPlayer().getExpRate());
cm.warp(211042300);
cm.dispose();
}
}

View File

@@ -122,7 +122,7 @@ function action(mode, type, selection) {
}
}
if (playersOnCombo == 5 || cm.getPlayer().gmLevel() > 0) {
if (playersOnCombo == 5 || cm.getPlayer().gmLevel() > 1) {
var combo = eim.getProperty("stage" + stage + "combo").split(',');
var correctCombo = true;
for (i = 0; i < objset.length && correctCombo; i++)
@@ -130,7 +130,7 @@ function action(mode, type, selection) {
//cm.mapMessage(5, "Combo failed on " + (i + 1));
correctCombo = false;
}
if (correctCombo || cm.getPlayer().gmLevel() > 0) {
if (correctCombo || cm.getPlayer().gmLevel() > 1) {
eim.setProperty("statusStg" + stage, 1);
clearStage(stage, eim, curMap);
cm.dispose();

View File

@@ -33,7 +33,7 @@ function isTransformed(ch) {
function start() {
if(!(isTransformed(cm.getPlayer()) || cm.haveItem(4001086))) {
cm.sendOk("This is the cave of the mighty Horntail, supreme ruler of the Leafre Canyons, outsiders are not welcome. Get lost!");
cm.sendOk("This is the cave of the mighty Horntail, supreme ruler of the Leafre Canyons. Only those #bdeemed worthy#k to meet him can pass here, #boutsiders#k are not welcome. Get lost!");
cm.dispose();
return;
}

View File

@@ -25,62 +25,82 @@
*@Purpose: Handles 4th job.
*/
var status;
function start() {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 1) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6904)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 112) {
cm.teachSkill(1121001, 0, 10, -1);
cm.teachSkill(1120004, 0, 10, -1);
cm.teachSkill(1121008, 0, 10, -1);
} else if(cm.getJobId() == 122) {
cm.teachSkill(1221001, 0, 10, -1);
cm.teachSkill(1220005, 0, 10, -1);
cm.teachSkill(1221009, 0, 10, -1);
} else if(cm.getJobId() == 132) {
cm.teachSkill(1321001, 0, 10, -1);
cm.teachSkill(1320005, 0, 10, -1);
cm.teachSkill(1321007, 0, 10, -1);
}
} else if(mode >= 0 && cm.getJobId() % 100 % 10 == 2) {
// TEMP until I can get the quest fixed...
if(cm.getJobId() == 112) {
if(cm.getPlayer().getSkillLevel(1121010) == 0)
cm.teachSkill(1121010 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1120005) == 0)
cm.teachSkill(1120005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1121002) == 0)
cm.teachSkill(1121002 , 0, 10, -1);
} else if(cm.getJobId() == 122) {
if(cm.getPlayer().getSkillLevel(1221002) == 0)
cm.teachSkill(1221002, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1221003) == 0)
cm.teachSkill(1221003, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1221004) == 0)
cm.teachSkill(1221004, 0, 10, -1);
} else if(cm.getJobId() == 132) {
if(cm.getPlayer().getSkillLevel(1321002) == 0)
cm.teachSkill(1321002, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1320008) == 0)
cm.teachSkill(1320008, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1320009) == 0)
cm.teachSkill(1320009, 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 1) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6904)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
}
} else if(status == 1) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 112) {
cm.teachSkill(1121001, 0, 10, -1);
cm.teachSkill(1120004, 0, 10, -1);
cm.teachSkill(1121008, 0, 10, -1);
} else if(cm.getJobId() == 122) {
cm.teachSkill(1221001, 0, 10, -1);
cm.teachSkill(1220005, 0, 10, -1);
cm.teachSkill(1221009, 0, 10, -1);
} else if(cm.getJobId() == 132) {
cm.teachSkill(1321001, 0, 10, -1);
cm.teachSkill(1320005, 0, 10, -1);
cm.teachSkill(1321007, 0, 10, -1);
}
} else if(mode >= 0 && cm.getJobId() % 100 % 10 == 2) {
// TEMP until I can get the quest fixed...
if(cm.getJobId() == 112) {
if(cm.getPlayer().getSkillLevel(1121010) == 0)
cm.teachSkill(1121010 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1120005) == 0)
cm.teachSkill(1120005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1121002) == 0)
cm.teachSkill(1121002 , 0, 10, -1);
} else if(cm.getJobId() == 122) {
if(cm.getPlayer().getSkillLevel(1221002) == 0)
cm.teachSkill(1221002, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1221003) == 0)
cm.teachSkill(1221003, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1221004) == 0)
cm.teachSkill(1221004, 0, 10, -1);
} else if(cm.getJobId() == 132) {
if(cm.getPlayer().getSkillLevel(1321002) == 0)
cm.teachSkill(1321002, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1320008) == 0)
cm.teachSkill(1320008, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(1320009) == 0)
cm.teachSkill(1320009, 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
}
}

View File

@@ -25,59 +25,79 @@
*@Purpose: Handles 4th job.
*/
function start() {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 2) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6914)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 212) {
cm.teachSkill(2121001, 0, 10, -1);
cm.teachSkill(2121002, 0, 10, -1);
cm.teachSkill(2121006, 0, 10, -1);
} else if(cm.getJobId() == 222) {
cm.teachSkill(2221001, 0, 10, -1);
cm.teachSkill(2221002, 0, 10, -1);
cm.teachSkill(2221006, 0, 10, -1);
} else if(cm.getJobId() == 232) {
cm.teachSkill(2321001, 0, 10, -1);
cm.teachSkill(2321002, 0, 10, -1);
cm.teachSkill(2321005, 0, 10, -1);
}
} else if( mode >= 1 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 212) {
if(cm.getPlayer().getSkillLevel(2121007) == 0)
cm.teachSkill(2121007 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2121005) == 0)
cm.teachSkill(2121005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2121005) == 0)
cm.teachSkill(2121005 , 0, 10, -1);
} else if(cm.getJobId() == 222) {
if(cm.getPlayer().getSkillLevel(2221007) == 0)
cm.teachSkill(2221007 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2221005) == 0)
cm.teachSkill(2221005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2221003) == 0)
cm.teachSkill(2221003 , 0, 10, -1);
} else if(cm.getJobId() == 232) {
if (cm.getPlayer().getSkillLevel(2321008) < 1)
cm.teachSkill(2321008, 0, 10,-1); // Genesis
if (cm.getPlayer().getSkillLevel(2321006) < 1)
cm.teachSkill(2321006, 0, 10,-1); // res
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 2) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6914)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
} else if(status == 1) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 212) {
cm.teachSkill(2121001, 0, 10, -1);
cm.teachSkill(2121002, 0, 10, -1);
cm.teachSkill(2121006, 0, 10, -1);
} else if(cm.getJobId() == 222) {
cm.teachSkill(2221001, 0, 10, -1);
cm.teachSkill(2221002, 0, 10, -1);
cm.teachSkill(2221006, 0, 10, -1);
} else if(cm.getJobId() == 232) {
cm.teachSkill(2321001, 0, 10, -1);
cm.teachSkill(2321002, 0, 10, -1);
cm.teachSkill(2321005, 0, 10, -1);
}
} else if( mode >= 1 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 212) {
if(cm.getPlayer().getSkillLevel(2121007) == 0)
cm.teachSkill(2121007 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2121005) == 0)
cm.teachSkill(2121005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2121005) == 0)
cm.teachSkill(2121005 , 0, 10, -1);
} else if(cm.getJobId() == 222) {
if(cm.getPlayer().getSkillLevel(2221007) == 0)
cm.teachSkill(2221007 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2221005) == 0)
cm.teachSkill(2221005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(2221003) == 0)
cm.teachSkill(2221003 , 0, 10, -1);
} else if(cm.getJobId() == 232) {
if (cm.getPlayer().getSkillLevel(2321008) < 1)
cm.teachSkill(2321008, 0, 10,-1); // Genesis
if (cm.getPlayer().getSkillLevel(2321006) < 1)
cm.teachSkill(2321006, 0, 10,-1); // res
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
}
}

View File

@@ -25,50 +25,71 @@
*@Purpose: Handles 4th job.
*/
var status;
function start() {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 3) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6924)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 312) {
cm.teachSkill(3121002, 0, 10, -1);
cm.teachSkill(3120005, 0, 10, -1);
cm.teachSkill(3121007, 0, 10, -1);
} else if(cm.getJobId() == 322) {
cm.teachSkill(3221002, 0, 10, -1);
cm.teachSkill(3220004, 0, 10, -1);
cm.teachSkill(3221006, 0, 10, -1);
}
} else if(mode >= 0 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 312) {
if(cm.getPlayer().getSkillLevel(3121008) == 0)
cm.teachSkill(3121008 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3121006) == 0)
cm.teachSkill(3121006 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3121004) == 0)
cm.teachSkill(3121004 , 0, 10, -1);
} else if(cm.getJobId() == 322) {
if(cm.getPlayer().getSkillLevel(3221007) == 0)
cm.teachSkill(3221007 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3221005) == 0)
cm.teachSkill(3221005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3221001) == 0)
cm.teachSkill(3221001 , 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 3) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6924)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
} else if(status == 1) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 312) {
cm.teachSkill(3121002, 0, 10, -1);
cm.teachSkill(3120005, 0, 10, -1);
cm.teachSkill(3121007, 0, 10, -1);
} else if(cm.getJobId() == 322) {
cm.teachSkill(3221002, 0, 10, -1);
cm.teachSkill(3220004, 0, 10, -1);
cm.teachSkill(3221006, 0, 10, -1);
}
} else if(mode >= 0 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 312) {
if(cm.getPlayer().getSkillLevel(3121008) == 0)
cm.teachSkill(3121008 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3121006) == 0)
cm.teachSkill(3121006 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3121004) == 0)
cm.teachSkill(3121004 , 0, 10, -1);
} else if(cm.getJobId() == 322) {
if(cm.getPlayer().getSkillLevel(3221007) == 0)
cm.teachSkill(3221007 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3221005) == 0)
cm.teachSkill(3221005 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(3221001) == 0)
cm.teachSkill(3221001 , 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
}
}

View File

@@ -25,46 +25,67 @@
*@Purpose: Handles 4th job.
*/
var status;
function start() {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 4) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6934)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 412) {
cm.teachSkill(4120002, 0, 10, -1);
cm.teachSkill(4120005, 0, 10, -1);
cm.teachSkill(4121006, 0, 10, -1);
} else if(cm.getJobId() == 422) {
cm.teachSkill(4220002, 0, 10, -1);
cm.teachSkill(4220005, 0, 10, -1);
cm.teachSkill(4221007, 0, 10, -1);
}
} else if(mode >= 1 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 412) {
if(cm.getPlayer().getSkillLevel(4121008) == 0)
cm.teachSkill(4121008 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(4121004) == 0)
cm.teachSkill(4121004 , 0, 10, -1);
} else if(cm.getJobId() == 422) {
if(cm.getPlayer().getSkillLevel(4221004) == 0)
cm.teachSkill(4221004 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(4221001) == 0)
cm.teachSkill(4221001 , 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 4) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6934)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
} else if(status == 1) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 412) {
cm.teachSkill(4120002, 0, 10, -1);
cm.teachSkill(4120005, 0, 10, -1);
cm.teachSkill(4121006, 0, 10, -1);
} else if(cm.getJobId() == 422) {
cm.teachSkill(4220002, 0, 10, -1);
cm.teachSkill(4220005, 0, 10, -1);
cm.teachSkill(4221007, 0, 10, -1);
}
} else if(mode >= 1 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 412) {
if(cm.getPlayer().getSkillLevel(4121008) == 0)
cm.teachSkill(4121008 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(4121004) == 0)
cm.teachSkill(4121004 , 0, 10, -1);
} else if(cm.getJobId() == 422) {
if(cm.getPlayer().getSkillLevel(4221004) == 0)
cm.teachSkill(4221004 , 0, 10, -1);
if(cm.getPlayer().getSkillLevel(4221001) == 0)
cm.teachSkill(4221001 , 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
}
}

View File

@@ -25,58 +25,79 @@
*@Purpose: Handles 4th job.
*/
var status;
function start() {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 5) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6944)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 512) {
cm.teachSkill(5121001, 0, 10, -1);
cm.teachSkill(5121002, 0, 10, -1);
cm.teachSkill(5121007, 0, 10, -1);
cm.teachSkill(5121009, 0, 10, -1);
} else if(cm.getJobId() == 522) {
cm.teachSkill(5220001, 0, 10, -1);
cm.teachSkill(5220002, 0, 10, -1);
cm.teachSkill(5221004, 0, 10, -1);
cm.teachSkill(5220011, 0, 10, -1);
}
} else if(mode >= 1 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 512) {
if(cm.getPlayer().getSkillLevel(5121003) == 0)
cm.teachSkill(5121003, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5121004) == 0)
cm.teachSkill(5121004, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5121005) == 0)
cm.teachSkill(5121005, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5121010) == 0)
cm.teachSkill(5121010, 0, 10, -1);
} else if(cm.getJobId() == 522) {
if(cm.getPlayer().getSkillLevel(5221006) == 0)
cm.teachSkill(5221006, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221007) == 0)
cm.teachSkill(5221007, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221008) == 0)
cm.teachSkill(5221008, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221009) == 0)
cm.teachSkill(5221009, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221003) == 0)
cm.teachSkill(5221003, 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.getLevel() < 120 || Math.round(cm.getJobId() / 100) != 5) {
cm.sendOk("Please don't bother me right now, I am trying to concentrate.");
cm.dispose();
} else if (!cm.isQuestCompleted(6944)) {
cm.sendOk("You have not yet passed my trials. I can not advance you until you do so.");
cm.dispose();
} else if ( cm.getJobId() % 100 % 10 != 2) {
cm.sendYesNo("You did a marvellous job passing my test. Are you ready to advance to your 4th job?");
} else {
cm.sendSimple("If I must, I can teach you the art of your class.\r\n#b#L0#Teach me the skills of my class.#l");
//cm.dispose();
}
} else if(status == 1) {
if (mode >= 1 && cm.getJobId() % 100 % 10 != 2) {
cm.changeJobById(cm.getJobId() + 1);
if(cm.getJobId() == 512) {
cm.teachSkill(5121001, 0, 10, -1);
cm.teachSkill(5121002, 0, 10, -1);
cm.teachSkill(5121007, 0, 10, -1);
cm.teachSkill(5121009, 0, 10, -1);
} else if(cm.getJobId() == 522) {
cm.teachSkill(5220001, 0, 10, -1);
cm.teachSkill(5220002, 0, 10, -1);
cm.teachSkill(5221004, 0, 10, -1);
cm.teachSkill(5220011, 0, 10, -1);
}
} else if(mode >= 1 && cm.getJobId() % 100 % 10 == 2) {
if(cm.getJobId() == 512) {
if(cm.getPlayer().getSkillLevel(5121003) == 0)
cm.teachSkill(5121003, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5121004) == 0)
cm.teachSkill(5121004, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5121005) == 0)
cm.teachSkill(5121005, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5121010) == 0)
cm.teachSkill(5121010, 0, 10, -1);
} else if(cm.getJobId() == 522) {
if(cm.getPlayer().getSkillLevel(5221006) == 0)
cm.teachSkill(5221006, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221007) == 0)
cm.teachSkill(5221007, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221008) == 0)
cm.teachSkill(5221008, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221009) == 0)
cm.teachSkill(5221009, 0, 10, -1);
if(cm.getPlayer().getSkillLevel(5221003) == 0)
cm.teachSkill(5221003, 0, 10, -1);
}
cm.sendOk("It is done. Leave me now.");
}
cm.dispose();
}
}
}

View File

@@ -45,7 +45,7 @@ function action(mode, type, selection) {
player = cm.getPlayer();
expedition = cm.getExpedition(exped);
em = cm.getEventManager("HorntailFight");
em = cm.getEventManager("HorntailBattle");
if (mode == -1) {
cm.dispose();
@@ -127,8 +127,8 @@ function action(mode, type, selection) {
cm.sendSimple(text);
status = 6;
} else if (selection == 2) {
//var min = exped.getMinSize();
var min = 1;
var min = exped.getMinSize();
var size = expedition.getMembers().size();
if (size < min) {
cm.sendOk("You need at least " + min + " players registered in your expedition.");

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author: Moogra, XxOsirisxX
* @Author: Moogra, XxOsirisxX, Ronan
* @NPC: 2091005
* @Name: So Gong
* @Map(s): Dojo Hall
@@ -36,261 +36,342 @@ var belt_points = Array(10, 90, 200, 460, 850); /* Watered down version */
var status = -1;
var selectedMenu = -1;
var dojoWarp = 0;
function start() {
if(disabled) {
cm.sendOk("My master has requested that the dojo be #rclosed#k at this time so I can't let you in.");
cm.dispose();
return;
}
if (isRestingSpot(cm.getPlayer().getMap().getId())) {
var text = "I'm surprised you made it this far! But it won't be easy from here on out. You still want the challenge?\r\n\r\n#b#L0#I want to continue#l\r\n#L1#I want to leave#l\r\n";
if (!cm.getPlayer().getDojoParty()) {
text += "#L2#I want to record my score up to this point#l";
}
cm.sendSimple(text);
} else if (cm.getPlayer().getLevel() >= 25) {
if (cm.getPlayer().getMap().getId() == 925020001) {
cm.sendSimple("My master is the strongest person in Mu Lung, and you want to challenge him? Fine, but you'll regret it later.\r\n\r\n#b#L0#I want to challenge him alone.#l\r\n#L1#I want to challenge him with a party.#l\r\n\r\n#L2#I want to receive a belt.#l\r\n#L3#I want to reset my training points.#l\r\n#L4#I want to receive a medal.#l\r\n#L5#What is a Mu Lung Dojo?#l");
} else {
cm.sendYesNo("What, you're giving up? You just need to get to the next level! Do you really want to quit and leave?");
}
} else {
cm.sendOk("Hey! Are you mocking my master? Who do you think you are to challenge him? This is a joke! You should at least be level #b25#k.");
if(disabled) {
cm.sendOk("My master has requested that the dojo be #rclosed#k at this time so I can't let you in.");
cm.dispose();
return;
return;
}
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.getPlayer().setDojoStage(dojoWarp);
cm.dispose();
} else if (cm.getPlayer().getMap().getId() == 925020001) {
if (mode >= 0) {
if (status == -1)
selectedMenu = selection;
status++; //there is no prev.
if (selectedMenu == 0) { //I want to challenge him alone.
if (!cm.getPlayer().hasEntered("dojang_Msg") && !cm.getPlayer().getFinishedDojoTutorial()) { //kind of hackish...
if (status == 0) {
cm.sendYesNo("Hey there! You! This is your first time, huh? Well, my master doesn't just meet with anyone. He's a busy man. And judging by your looks, I don't think he'd bother. Ha! But, today's your lucky day... I tell you what, if you can defeat me, I'll allow you to see my Master. So what do you say?");
} else if (status == 1) {
if (mode == 0) {
cm.sendNext("Haha! Who are you trying to impress with a heart like that?\r\nGo back home where you belong!");
cm.dispose();
return;
} else {
if(cm.getClient().getChannelServer().getMapFactory().getMap(925020010).getCharacters().size() > 0) {
cm.sendOk("Someone is already in Dojo");
}
else {
cm.warp(925020010, 0);
cm.getPlayer().setFinishedDojoTutorial();
}
cm.dispose();
return;
}
}
} else if (cm.getPlayer().getDojoStage() > 0) {
if (status == 0) {
cm.sendYesNo("The last time you took the challenge by yourself, you went up to level " + cm.getPlayer().getDojoStage() + ". I can take you there right now. Do you want to go there?");
} else {
cm.warp(mode == 1 ? 925020000 + cm.getPlayer().getDojoStage() * 100 : 925020100, 0);
cm.dispose();
}
} else {
if (mode == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
if(status == 0) {
if (isRestingSpot(cm.getPlayer().getMap().getId())) {
var text = "I'm surprised you made it this far! But it won't be easy from here on out. You still want the challenge?\r\n\r\n#b#L0#I want to continue#l\r\n#L1#I want to leave#l\r\n";
if (!cm.getPlayer().getDojoParty()) {
text += "#L2#I want to record my score up to this point#l";
}
cm.sendSimple(text);
} else if (cm.getPlayer().getLevel() >= 25) {
if (cm.getPlayer().getMap().getId() == 925020001) {
cm.sendSimple("My master is the strongest person in Mu Lung, and you want to challenge him? Fine, but you'll regret it later.\r\n\r\n#b#L0#I want to challenge him alone.#l\r\n#L1#I want to challenge him with a party.#l\r\n\r\n#L2#I want to receive a belt.#l\r\n#L3#I want to reset my training points.#l\r\n#L4#I want to receive a medal.#l\r\n#L5#What is a Mu Lung Dojo?#l");
} else {
for (var i = 1 ; i < 39; i++) { //only 32 stages, but 38 maps
if(cm.getClient().getChannelServer().getMapFactory().getMap(925020000 + 100 * i).getCharacters().size() > 0) {
cm.sendOk("Someone is already in the Dojo." + i);
cm.dispose();
return;
}
}
cm.getClient().getChannelServer().getMapFactory().getMap(925020100).resetReactors();
cm.getClient().getChannelServer().getMapFactory().getMap(925020100).killAllMonsters();
cm.warp(925020100, 0);
cm.dispose();
return;
cm.sendYesNo("What, you're giving up? You just need to get to the next level! Do you really want to quit and leave?");
}
} else if (selectedMenu == 1) { //I want to challenge him with a party.
var party = cm.getPlayer().getParty();
if (party == null) {
cm.sendNext("Where do you think you're going? You're not even the party leader! Go tell your party leader to talk to me.");
cm.dispose();
return;
}
var lowest = cm.getPlayer().getLevel();
var highest = lowest;
for (var x = 0; x < party.getMembers().size(); x++) {
var lvl = party.getMembers().get(x).getLevel();
if (lvl > highest)
highest = lvl;
else if (lvl < lowest)
lowest = lvl;
}
var isBetween30 = highest - lowest < 30;
if (party.getLeader().getId() != cm.getPlayer().getId()) {
cm.sendNext("Where do you think you're going? You're not even the party leader! Go tell your party leader to talk to me.");
cm.dispose();
return;
}
//else if (party.getMembers().size() == 1) {
// cm.sendNext("You're going to take on the challenge as a one-man party?");
//}
else if (!isBetween30) {
cm.sendNext("Your partys level ranges are too broad to enter. Please make sure all of your party members are within #r30 levels#k of each other.");
cm.dispose();
return;
} else {
for (var i = 1 ; i < 39; i++) { //only 32 stages, but 38 maps
if(cm.getClient().getChannelServer().getMapFactory().getMap(925020000 + 100 * i).getCharacters().size() > 0) {
cm.sendOk("Someone is already in the Dojo.");
cm.dispose();
return;
}
}
cm.getClient().getChannelServer().getMapFactory().getMap(925020100).resetReactors();
cm.getClient().getChannelServer().getMapFactory().getMap(925020100).killAllMonsters();
cm.warpParty(925020100);
cm.dispose();
return;
}
} else if (selectedMenu == 2) { //I want to receive a belt.
if (!cm.canHold(belts[0])) {
cm.sendNext("Make room in your EQUIP inventory before trying to claim a belt!");
cm.dispose();
return;
}
if (mode < 1) {
cm.dispose();
return;
}
if (status == 0) {
var selStr = "You have #b" + cm.getPlayer().getDojoPoints() + "#k training points. Master prefers those with great talent. If you obtain more points than the average, you can receive a belt depending on your score.\r\n";
for (var i = 0; i < belts.length; i++) {
if (cm.getPlayer().getItemQuantity(belts[i], true) > 0) {
selStr += "\r\n#L" + i + "##i" + belts[i] + "# #t" + belts[i] + "# (Obtained)";
} else
selStr += "\r\n#L" + i + "##i" + belts[i] + "# #t" + belts[i] + "#";
}
cm.sendSimple(selStr);
} else if (status == 1) {
var belt = belts[selection];
var level = belt_level[selection];
var points = belt_points[selection];
if (cm.getPlayer().getDojoPoints() > points) {
if (cm.getPlayer().getLevel() > level) {
cm.gainItem(belt, 1);
cm.sendNext("There is the #i" + belt + "# #b#t" + belt + "##k. You have proven your valor to ascend on the Dojo ranks. Well done!");
}
else
cm.sendNext("In order to receive #i" + belt + "# #b#t" + belt + "##k, you have to be at least over level #b" + level + "#k and you need to have earned at least #b" + points + " training points#k.\r\n\r\nIf you want to obtain this belt, you need #r" + (points - cm.getPlayer().getDojoPoints()) + "#k more training points.");
} else
cm.sendNext("In order to receive #i" + belt + "# #b#t" + belt + "##k, you have to be at least over level #b" + level + "#k and you need to have earned at least #b" + points + " training points#k.\r\n\r\nIf you want to obtain this belt, you need #r" + (points - cm.getPlayer().getDojoPoints()) + "#k more training points.");
cm.dispose();
return;
}
} else if (selectedMenu == 3) { //I want to reset my training points.
if (status == 0) {
cm.sendYesNo("You do know that if you reset your training points, it returns to 0, right? Although, that's not always a bad thing. If you can start earning training points again after you reset, you can receive the belts once more. Do you want to reset your training points now?");
} else if (status == 1) {
if (mode == 0) {
cm.sendNext("Do you need to gather yourself or something? Come back after you take a deep breath.");
} else {
cm.getPlayer().setDojoPoints(0);
cm.sendNext("There! All your training points have been reset. Think of it as a new beginning and train hard!");
}
cm.dispose();
return;
}
} else if (selectedMenu == 4) { //I want to receive a medal.
if (status == 0 && cm.getPlayer().getVanquisherStage() <= 0) {
cm.sendYesNo("You haven't attempted the medal yet? If you defeat one type of monster in Mu Lung Dojo #b100 times#k you can receive a title called #b#t" + (1142033 + cm.getPlayer().getVanquisherStage()) + "##k. It looks like you haven't even earned the #b#t" + (1142033 + cm.getPlayer().getVanquisherStage()) + "##k... Do you want to try out for the #b#t" + (1142033 + cm.getPlayer().getVanquisherStage()) + "##k?");
} else if (status == 1 || cm.getPlayer().getVanquisherStage() > 0) {
if (mode == 0) {
cm.sendNext("If you don't want to, that's fine.");
} else {
if (cm.getPlayer().getDojoStage() > 37) {
cm.sendNext("You have completed all medals challenges.");
} else if (cm.getPlayer().getVanquisherKills() < 100 && cm.getPlayer().getVanquisherStage() > 0)
cm.sendNext("You still need #b" + (100 - cm.getPlayer().getVanquisherKills()) + "#k in order to obtain the #b#t" + (1142032 + cm.getPlayer().getVanquisherStage()) + "##k. Please try a little harder. As a reminder, only the mosnters that have been summoned by our Master in Mu Lung Dojo are considered. Oh, and make sure you're not hunting the monsters and exiting!#r If you don't go to the next level after defeating the monster, it doesn't count as a win#k.");
else if (cm.getPlayer().getVanquisherStage() <= 0) {
cm.getPlayer().setVanquisherStage(1);
} else {
cm.sendNext("You have obtained #b#t" + (1142032 + cm.getPlayer().getVanquisherStage()) + "##k.");
cm.gainItem(1142033 + cm.getPlayer().getVanquisherStage(), 1);
cm.getPlayer().setVanquisherStage(cm.c.getPlayer().getVanquisherStage() + 1);
cm.getPlayer().setVanquisherKills(0);
}
}
cm.dispose();
return;
}
else {
cm.dispose();
return;
}
} else if (selectedMenu == 5) { //What is a Mu Lung Dojo?
cm.sendNext("Our master is the strongest person in Mu Lung. The place he built is called the Mu Lung Dojo, a building that is 38 stories tall! You can train yourself as you go up each level. Of course, it'll be hard for someone at your level to reach the top.");
} else {
cm.sendOk("Hey! Are you mocking my master? Who do you think you are to challenge him? This is a joke! You should at least be level #b25#k.");
cm.dispose();
return;
}
} else {
cm.dispose();
return;
}
} else if (isRestingSpot(cm.getPlayer().getMap().getId())) {
if (selectedMenu == -1)
selectedMenu = selection;
status++;
if (selectedMenu == 0) {
cm.warp(cm.getPlayer().getMap().getId() + 100, 0);
cm.dispose();
return;
} else if (selectedMenu == 1) { //I want to leave
if (status == 0) {
cm.sendAcceptDecline("So, you're giving up? You're really going to leave?");
} else {
if (mode == 1) {
cm.warp(925020002);
if (cm.getPlayer().getMap().getId() == 925020001) {
if (mode >= 0) {
if (status == 1)
selectedMenu = selection;
if (selectedMenu == 0) { //I want to challenge him alone.
if (!cm.getPlayer().hasEntered("dojang_Msg") && !cm.getPlayer().getFinishedDojoTutorial()) { //kind of hackish...
if (status == 1) {
cm.sendYesNo("Hey there! You! This is your first time, huh? Well, my master doesn't just meet with anyone. He's a busy man. And judging by your looks, I don't think he'd bother. Ha! But, today's your lucky day... I tell you what, if you can defeat me, I'll allow you to see my Master. So what do you say?");
} else if (status == 2) {
if (mode == 0) {
cm.sendNext("Haha! Who are you trying to impress with a heart like that?\r\nGo back home where you belong!");
cm.dispose();
return;
} else {
var avDojo = cm.getClient().getChannelServer().getAvailableDojo(true);
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
}
else {
cm.getClient().getChannelServer().getMapFactory().getMap(925020010 + avDojo).resetMapObjects();
cm.getClient().getChannelServer().resetDojo(925020010 + avDojo);
cm.warp(925020010 + avDojo, 0);
}
cm.dispose();
return;
}
}
} else if (cm.getPlayer().getDojoStage() > 0) {
if (status == 1) {
dojoWarp = cm.getPlayer().getDojoStage();
cm.getPlayer().setDojoStage(0);
cm.sendYesNo("The last time you took the challenge by yourself, you went up to level " + dojoWarp + ". I can take you there right now. Do you want to go there?");
} else {
var avDojo = cm.getClient().getChannelServer().getAvailableDojo(false);
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
cm.getPlayer().setDojoStage(dojoWarp);
}
else {
var warpDojoMap = ((mode == 1) ? 925020000 + (dojoWarp + 1) * 100 + avDojo : 925020100 + avDojo);
cm.getClient().getChannelServer().resetDojoMap(warpDojoMap);
cm.getClient().getChannelServer().resetDojo(warpDojoMap);
cm.warp(warpDojoMap, 0);
}
cm.dispose();
}
} else {
var avDojo = cm.getClient().getChannelServer().getAvailableDojo(false);
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
}
else {
cm.getClient().getChannelServer().resetDojoMap(925020100 + avDojo);
cm.getClient().getChannelServer().resetDojo(925020100 + avDojo);
cm.warp(925020100 + avDojo, 0);
}
cm.dispose();
return;
}
} else if (selectedMenu == 1) { //I want to challenge him with a party.
var party = cm.getPlayer().getParty();
if (party == null) {
cm.sendNext("Where do you think you're going? You're not even the party leader! Go tell your party leader to talk to me.");
cm.dispose();
return;
}
if (party.getLeader().getId() != cm.getPlayer().getId()) {
cm.sendNext("Where do you think you're going? You're not even the party leader! Go tell your party leader to talk to me.");
cm.dispose();
return;
}
//else if (party.getMembers().size() == 1) {
// cm.sendNext("You're going to take on the challenge as a one-man party?");
//}
else if (!isBetween(party, 30)) {
cm.sendNext("Your partys level ranges are too broad to enter. Please make sure all of your party members are within #r30 levels#k of each other.");
cm.dispose();
return;
} else {
var avDojo = cm.getClient().getChannelServer().getAvailableDojo(true, cm.getParty());
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
}
else {
cm.getClient().getChannelServer().resetDojoMap(925030100 + avDojo);
cm.getClient().getChannelServer().resetDojo(925030100 + avDojo);
cm.warpParty(925030100 + avDojo);
}
cm.dispose();
return;
}
} else if (selectedMenu == 2) { //I want to receive a belt.
if (!cm.canHold(belts[0])) {
cm.sendNext("Make room in your EQUIP inventory before trying to claim a belt!");
cm.dispose();
return;
}
if (mode < 1) {
cm.dispose();
return;
}
if (status == 1) {
var selStr = "You have #b" + cm.getPlayer().getDojoPoints() + "#k training points. Master prefers those with great talent. If you obtain more points than the average, you can receive a belt depending on your score.\r\n";
for (var i = 0; i < belts.length; i++) {
if (cm.getPlayer().getItemQuantity(belts[i], true) > 0) {
selStr += "\r\n#L" + i + "##i" + belts[i] + "# #t" + belts[i] + "# (Obtained)";
} else
selStr += "\r\n#L" + i + "##i" + belts[i] + "# #t" + belts[i] + "#";
}
cm.sendSimple(selStr);
} else if (status == 2) {
var belt = belts[selection];
var level = belt_level[selection];
var points = belt_points[selection];
if (cm.getPlayer().getDojoPoints() > points) {
if (cm.getPlayer().getLevel() > level) {
cm.gainItem(belt, 1);
cm.sendNext("There is the #i" + belt + "# #b#t" + belt + "##k. You have proven your valor to ascend on the Dojo ranks. Well done!");
}
else
cm.sendNext("In order to receive #i" + belt + "# #b#t" + belt + "##k, you have to be at least over level #b" + level + "#k and you need to have earned at least #b" + points + " training points#k.\r\n\r\nIf you want to obtain this belt, you need #r" + (points - cm.getPlayer().getDojoPoints()) + "#k more training points.");
} else
cm.sendNext("In order to receive #i" + belt + "# #b#t" + belt + "##k, you have to be at least over level #b" + level + "#k and you need to have earned at least #b" + points + " training points#k.\r\n\r\nIf you want to obtain this belt, you need #r" + (points - cm.getPlayer().getDojoPoints()) + "#k more training points.");
cm.dispose();
return;
}
} else if (selectedMenu == 3) { //I want to reset my training points.
if (status == 1) {
cm.sendYesNo("You do know that if you reset your training points, it returns to 0, right? Although, that's not always a bad thing. If you can start earning training points again after you reset, you can receive the belts once more. Do you want to reset your training points now?");
} else if (status == 2) {
if (mode == 0) {
cm.sendNext("Do you need to gather yourself or something? Come back after you take a deep breath.");
} else {
cm.getPlayer().setDojoPoints(0);
cm.sendNext("There! All your training points have been reset. Think of it as a new beginning and train hard!");
}
cm.dispose();
return;
}
} else if (selectedMenu == 4) { //I want to receive a medal.
if (status == 1 && cm.getPlayer().getVanquisherStage() <= 0) {
cm.sendYesNo("You haven't attempted the medal yet? If you defeat one type of monster in Mu Lung Dojo #b100 times#k you can receive a title called #b#t" + (1142033 + cm.getPlayer().getVanquisherStage()) + "##k. It looks like you haven't even earned the #b#t" + (1142033 + cm.getPlayer().getVanquisherStage()) + "##k... Do you want to try out for the #b#t" + (1142033 + cm.getPlayer().getVanquisherStage()) + "##k?");
} else if (status == 2 || cm.getPlayer().getVanquisherStage() > 0) {
if (mode == 0) {
cm.sendNext("If you don't want to, that's fine.");
} else {
if (cm.getPlayer().getDojoStage() > 37) {
cm.sendNext("You have completed all medals challenges.");
} else if (cm.getPlayer().getVanquisherKills() < 100 && cm.getPlayer().getVanquisherStage() > 0)
cm.sendNext("You still need #b" + (100 - cm.getPlayer().getVanquisherKills()) + "#k in order to obtain the #b#t" + (1142032 + cm.getPlayer().getVanquisherStage()) + "##k. Please try a little harder. As a reminder, only the mosnters that have been summoned by our Master in Mu Lung Dojo are considered. Oh, and make sure you're not hunting the monsters and exiting!#r If you don't go to the next level after defeating the monster, it doesn't count as a win#k.");
else if (cm.getPlayer().getVanquisherStage() <= 0) {
cm.getPlayer().setVanquisherStage(1);
} else {
cm.sendNext("You have obtained #b#t" + (1142032 + cm.getPlayer().getVanquisherStage()) + "##k.");
cm.gainItem(1142033 + cm.getPlayer().getVanquisherStage(), 1);
cm.getPlayer().setVanquisherStage(cm.c.getPlayer().getVanquisherStage() + 1);
cm.getPlayer().setVanquisherKills(0);
}
}
cm.dispose();
return;
}
else {
cm.dispose();
return;
}
} else if (selectedMenu == 5) { //What is a Mu Lung Dojo?
cm.sendNext("Our master is the strongest person in Mu Lung. The place he built is called the Mu Lung Dojo, a building that is #r38 stories#k tall! You can train yourself as you go up each level. Of course, it'll be hard for someone at your level to reach the top.");
cm.dispose();
return;
}
} else {
cm.dispose();
return;
}
} else if (isRestingSpot(cm.getPlayer().getMap().getId())) {
if (selectedMenu == -1)
selectedMenu = selection;
if (selectedMenu == 0) {
var hasParty = (cm.getParty() != null);
var firstEnter = false;
var avDojo = cm.getClient().getChannelServer().lookupPartyDojo(cm.getParty());
if(avDojo < 0) {
if(hasParty) {
if(!cm.isPartyLeader()) {
cm.sendOk("You are not the leader! Call your party leader to talk to me if you wish to continue.");
cm.dispose();
return;
}
if(!isBetween(cm.getParty(), 35)) {
cm.sendOk("Your partys level ranges are too broad to enter. Please make sure all of your party members are within #r35 levels#k of each other.");
cm.dispose();
return;
}
}
avDojo = cm.getClient().getChannelServer().getAvailableDojo(hasParty, cm.getParty());
firstEnter = true;
}
if(avDojo < 0) {
if(avDojo == -1) cm.sendOk("All Dojo's are being used already. Wait for awhile before trying again.");
else cm.sendOk("Your party already is using the dojo. Wait for them to finish to enter.");
}
else {
var baseStg = hasParty ? 925030000 : 925020000;
var nextStg = Math.floor((cm.getPlayer().getMap().getId() + 100) / 100) % 100;
var dojoWarpMap = baseStg + (nextStg * 100) + avDojo;
if(firstEnter) {
cm.getClient().getChannelServer().resetDojoMap(dojoWarpMap);
cm.getClient().getChannelServer().resetDojo(dojoWarpMap, nextStg - 1);
}
if(!hasParty || !cm.isLeader()) cm.warp(dojoWarpMap, 0);
else cm.warpParty(dojoWarpMap, 0);
}
cm.dispose();
return;
} else if (selectedMenu == 1) { //I want to leave
if (status == 1) {
cm.sendYesNo("So, you're giving up? You're really going to leave?");
} else {
if (mode == 1) {
cm.warp(925020002);
}
cm.dispose();
return;
}
} else if (selectedMenu == 2) { //I want to record my score up to this point
if (status == 1) {
cm.sendYesNo("If you record your score, you can start where you left off the next time. Isn't that convenient? Do you want to record your current score?");
} else {
if (mode == 0) {
cm.sendNext("You think you can go even higher? Good luck!");
} else if (cm.getPlayer().getDojoStage() == Math.floor(cm.getMapId() / 100) % 100) {
cm.sendOk("Looks like you came all the way up here without recording your score. Sorry, but you can't record now.");
} else {
cm.sendNext("I recorded your score. If you tell me the next time you go up, you'll be able to start where you left off.");
cm.getPlayer().setDojoStage(Math.floor(cm.getMapId() / 100) % 100);
}
cm.dispose();
return;
}
}
cm.dispose();
return;
}
} else if (selectedMenu == 2) { //I want to record my score up to this point
if (status == 0) {
cm.sendYesNo("If you record your score, you can start where you left off the next time. Isn't that convenient? Do you want to record your current score?");
} else {
if (mode == 0) {
cm.sendNext("You think you can go even higher? Good luck!");
} else if (925020000 + cm.getPlayer().getDojoStage() * 100 == cm.getMapId()) {
cm.sendOk("Looks like you came all the way up here without recording your score. Sorry, but you can't record now.");
} else {
cm.sendNext("I recorded your score. If you tell me the next time you go up, you'll be able to start where you left off.");
cm.getPlayer().setDojoStage((cm.getMapId() - 925020000) / 100);
cm.sendNext("Stop changing your mind! Soon, you'll be crying, begging me to go back.");
} else if (mode == 1) {
cm.warp(925020002, 0);
cm.getPlayer().message("Can you make up your mind please?");
}
cm.dispose();
return;
}
}
} else {
if (mode == 0) {
cm.sendNext("Stop changing your mind! Soon, you'll be crying, begging me to go back.");
} else if (mode == 1) {
cm.warp(925020002, 0);
cm.getPlayer().message("Can you make up your mind please?");
}
cm.dispose();
}
}
function isRestingSpot(id) {
return (id / 100 - 9250200) % 6 == 0;
return (Math.floor(id / 100) % 100) % 6 == 0 && id != 925020001;
}
function isBetween(party, range) {
var lowest = cm.getPlayer().getLevel();
var highest = lowest;
for (var x = 0; x < party.getMembers().size(); x++) {
var lvl = party.getMembers().get(x).getLevel();
if (lvl > highest)
highest = lvl;
else if (lvl < lowest)
lowest = lvl;
}
return (highest - lowest) <= range;
}

52
scripts/npc/2096000.js Normal file
View File

@@ -0,0 +1,52 @@
/*
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/>.
*/
/* Practice Chart
Practice Field : Beginner (250020000)
Nothing at all.
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Amateurs train on this map. Adepts train on the next. Professionals train on the last, where the boss will be awaiting.");
cm.dispose();
}
}
}

View File

@@ -1,216 +1,180 @@
/*
NPC Name: The Forgotten Temple Manager
Map(s): Deep in the Shrine - Forgotten Twilight
Description: Pink Bean battle starter
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 status = -1;
/* The Forgotten Temple Manager
*
* Deep Place of Temple - Forgotten Twilight (270050000)
* Vs Pink Bean Recruiter NPC
*
* @author Ronan
*/
importPackage(Packages.server.expeditions);
importPackage(Packages.tools);
importPackage(Packages.scripting.event);
var status = 0;
var expedition;
var player;
var em;
var exped = MapleExpeditionType.PINKBEAN;
var expedName = "Twilight of the Gods";
var expedBoss = "Pink Bean";
var expedMap = "Twilight of Gods";
var list = "What would you like to do?#b\r\n\r\n#L1#View current Expedition members#l\r\n#L2#Start the fight!#l\r\n#L3#Stop the expedition.#l";
function start() {
if (cm.getPlayer().getLevel() < 120) {
cm.sendOk("There is a level requirement of 120 to attempt Pink Bean.");
cm.dispose();
return;
}
if (cm.getPlayer().getClient().getChannel() != 5) {
cm.sendOk("Pink Bean may only be attempted on channel 5.");
cm.dispose();
return;
}
var em = cm.getEventManager("PinkBeanBattle");
if (em == null) {
cm.sendOk("The event isn't started, please contact a GM.");
cm.dispose();
return;
}
var eim_status = em.getProperty("state");
var marr = cm.getQuestRecord(160104);
var data = marr.getCustomData();
if (data == null) {
marr.setCustomData("0");
data = "0";
}
var time = parseInt(data);
if (eim_status == null || eim_status.equals("0")) {
var squadAvailability = cm.getSquadAvailability("PinkBean");
if (squadAvailability == -1) {
status = 0;
if (time + (12 * 3600000) >= cm.getCurrentTime() && !cm.getPlayer().isGM()) {
cm.sendOk("You have already went to PinkBean in the past 12 hours. Time left: " + cm.getReadableMillis(cm.getCurrentTime(), time + (12 * 3600000)));
cm.dispose();
return;
}
cm.sendYesNo("Are you interested in becoming the leader of the expedition Squad?");
} else if (squadAvailability == 1) {
if (time + (12 * 3600000) >= cm.getCurrentTime() && !cm.getPlayer().isGM()) {
cm.sendOk("You have already went to PinkBean in the past 12 hours. Time left: " + cm.getReadableMillis(cm.getCurrentTime(), time + (12 * 3600000)));
cm.dispose();
return;
}
// -1 = Cancelled, 0 = not, 1 = true
var type = cm.isSquadLeader("PinkBean");
if (type == -1) {
cm.sendOk("The squad has ended, please re-register.");
cm.dispose();
} else if (type == 0) {
var memberType = cm.isSquadMember("PinkBean");
if (memberType == 2) {
cm.sendOk("You been banned from the squad.");
cm.dispose();
} else if (memberType == 1) {
status = 5;
cm.sendSimple("What would you like to do? \r\n#b#L0#Join the squad to Twilight of the Gods#l \r\n#b#L1#Leave the squad to Twilight of the Gods#l \r\n#b#L2#See the list of members on the squad#l");
} else if (memberType == -1) {
cm.sendOk("The squad has ended, please re-register.");
cm.dispose();
} else {
status = 5;
cm.sendSimple("What would you like to do? \r\n#b#L0#Join the squad to Twilight of the Gods#l \r\n#b#L1#Leave the squad to Twilight of the Gods#l \r\n#b#L2#See the list of members on the squad#l");
}
} else { // Is leader
status = 10;
cm.sendSimple("What do you want to do, expedition leader? \r\n#b#L0#View expedition list#l \r\n#b#L1#Kick from expedition#l \r\n#b#L2#Remove user from ban list#l \r\n#r#L3#Select expedition team and enter#l");
// TODO viewing!
}
} else {
var eim = cm.getDisconnected("PinkBeanBattle");
if (eim == null) {
var squd = cm.getSquad("PinkBean");
if (squd != null) {
if (time + (12 * 3600000) >= cm.getCurrentTime() && !cm.getPlayer().isGM()) {
cm.sendOk("You have already went to PinkBean in the past 12 hours. Time left: " + cm.getReadableMillis(cm.getCurrentTime(), time + (12 * 3600000)));
cm.dispose();
return;
}
cm.sendYesNo("The squad's battle against the boss has already begun.\r\n" + squd.getNextPlayer());
status = 3;
} else {
cm.sendOk("The squad's battle against the boss has already begun.");
cm.safeDispose();
}
} else {
cm.sendYesNo("Ah, you have returned. Would you like to join your squad in the fight again?");
status = 2;
}
}
} else {
var eim = cm.getDisconnected("PinkBeanBattle");
if (eim == null) {
var squd = cm.getSquad("PinkBean");
if (squd != null) {
if (time + (12 * 3600000) >= cm.getCurrentTime() && !cm.getPlayer().isGM()) {
cm.sendOk("You have already went to PinkBean in the past 12 hours. Time left: " + cm.getReadableMillis(cm.getCurrentTime(), time + (12 * 3600000)));
cm.dispose();
return;
}
cm.sendYesNo("The squad's battle against the boss has already begun.\r\n" + squd.getNextPlayer());
status = 3;
} else {
cm.sendOk("The squad's battle against the boss has already begun.");
cm.safeDispose();
}
} else {
cm.sendYesNo("Ah, you have returned. Would you like to join your squad in the fight again?");
status = 2;
}
}
action(1, 0, 0);
}
function action(mode, type, selection) {
switch (status) {
case 0:
if (mode == 1) {
if (cm.registerSquad("PinkBean", 5, " has been named the Leader of the squad. If you would you like to join please register for the Expedition Squad within the time period.")) {
cm.sendOk("You have been named the Leader of the Squad. For the next 5 minutes, you can add the members of the Expedition Squad.");
} else {
cm.sendOk("An error has occurred adding your squad.");
}
}
cm.dispose();
break;
case 2:
if (!cm.reAdd("PinkBeanBattle", "PinkBean")) {
cm.sendOk("Error... please try again.");
}
cm.safeDispose();
break;
case 3:
if (mode == 1) {
var squd = cm.getSquad("PinkBean");
if (squd != null && !squd.getAllNextPlayer().contains(cm.getPlayer().getName())) {
squd.setNextPlayer(cm.getPlayer().getName());
cm.sendOk("You have reserved the spot.");
}
}
cm.dispose();
break;
case 5:
if (selection == 0) { // join
var ba = cm.addMember("PinkBean", true);
if (ba == 2) {
cm.sendOk("The squad is currently full, please try again later.");
} else if (ba == 1) {
cm.sendOk("You have joined the squad successfully");
} else {
cm.sendOk("You are already part of the squad.");
}
} else if (selection == 1) {// withdraw
var baa = cm.addMember("PinkBean", false);
if (baa == 1) {
cm.sendOk("You have withdrawed from the squad successfully");
} else {
cm.sendOk("You are not part of the squad.");
}
} else if (selection == 2) {
if (!cm.getSquadList("PinkBean", 0)) {
cm.sendOk("Due to an unknown error, the request for squad has been denied.");
}
}
cm.dispose();
break;
case 10:
if (mode == 1) {
if (selection == 0) {
if (!cm.getSquadList("PinkBean", 0)) {
cm.sendOk("Due to an unknown error, the request for squad has been denied.");
}
cm.dispose();
} else if (selection == 1) {
status = 11;
if (!cm.getSquadList("PinkBean", 1)) {
cm.sendOk("Due to an unknown error, the request for squad has been denied.");
cm.dispose();
}
} else if (selection == 2) {
status = 12;
if (!cm.getSquadList("PinkBean", 2)) {
cm.sendOk("Due to an unknown error, the request for squad has been denied.");
cm.dispose();
}
} else if (selection == 3) { // get inside
if (cm.getSquad("PinkBean") != null) {
var dd = cm.getEventManager("PinkBeanBattle");
dd.startInstance(cm.getSquad("PinkBean"), cm.getMap(), 160104);
} else {
cm.sendOk("Due to an unknown error, the request for squad has been denied.");
}
cm.dispose();
}
} else {
cm.dispose();
}
break;
case 11:
cm.banMember("PinkBean", selection);
cm.dispose();
break;
case 12:
if (selection != -1) {
cm.acceptMember("PinkBean", selection);
}
cm.dispose();
break;
player = cm.getPlayer();
expedition = cm.getExpedition(exped);
em = cm.getEventManager("PinkBeanBattle");
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.dispose();
return;
}
if (status == 0) {
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
cm.dispose();
} else if (expedition == null) { //Start an expedition
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
status = 2;
} else if (expedition.isRegistering()) { //If the expedition is registering
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin the expedition.");
cm.dispose();
} else { //If you aren't in it, you're going to get added
cm.sendOk(expedition.addMember(cm.getPlayer()));
cm.dispose();
}
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
if (expedition.contains(player)) { //If you're registered, warp you in
var eim = em.getInstance(expedName + player.getClient().getChannel());
if(eim.getIntProperty("canJoin") == 1) {
eim.registerPlayer(player);
} else {
cm.sendOk("Your expedition already started the battle against " + expedBoss + ". Lets pray for those brave souls.");
}
cm.dispose();
} else { //If you're not in by now, tough luck
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
cm.dispose();
}
}
} else if (status == 1) {
if (selection == 1) {
expedition = cm.getExpedition(exped);
if(expedition != null) {
cm.sendOk("Someone already taken the initiative to be the leader of the expedition. Try joining them!");
cm.dispose();
return;
}
cm.createExpedition(exped);
cm.sendOk("The #r" + expedBoss + " Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
cm.dispose();
return;
} else if (selection == 2) {
cm.sendOk("Sure, not everyone's up to challenging " + expedBoss + ".");
cm.dispose();
return;
}
} else if (status == 2) {
if (selection == 1) {
if (expedition == null) {
cm.sendOk("The expedition could not be loaded.");
cm.dispose();
return;
}
var size = expedition.getMembers().size();
if (size == 1) {
cm.sendOk("You are the only member of the expedition.");
cm.dispose();
return;
}
var text = "The following members make up your expedition (Click on them to expel them):\r\n";
text += "\r\n\t\t1." + expedition.getLeader().getName();
for (var i = 1; i < size; i++) {
text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
}
cm.sendSimple(text);
status = 6;
} else if (selection == 2) {
var min = exped.getMinSize();
var size = expedition.getMembers().size();
if (size < min) {
cm.sendOk("You need at least " + min + " players registered in your expedition.");
cm.dispose();
return;
}
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
status = 4;
} else if (selection == 3) {
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
cm.endExpedition(expedition);
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
cm.dispose();
return;
}
} else if (status == 4) {
if (em == null) {
cm.sendOk("The event could not be initialized, please report this on the forum.");
cm.dispose();
return;
}
em.setProperty("leader", player.getName());
em.setProperty("channel", player.getClient().getChannel());
if(!em.startInstance(expedition)) {
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
cm.dispose();
return;
}
cm.dispose();
return;
} else if (status == 6) {
if (selection > 0) {
var banned = expedition.getMembers().get(selection - 1);
expedition.ban(banned);
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
status = 2;
}
}
}
}

View File

@@ -4,13 +4,50 @@
Description: Pink Bean
*/
var status;
function start() {
cm.sendYesNo("Do you want to get out now?");
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
cm.warp(270050000, 0);
if (mode == -1)
cm.dispose();
else {
if (mode == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
var eim = cm.getEventInstance();
if(!eim.isEventCleared()) {
if (status == 0) {
cm.sendYesNo("Do you want to get out now?");
}
else if (status == 1) {
cm.warp(270050000, 0);
cm.dispose();
}
} else {
if (status == 0) {
cm.sendYesNo("Pink Bean has been defeated! You guys sure are true heroes of this land! In no time, Temple of Time will shine again as bright as ever, all thanks to your efforts! Hooray to our heroes!! Are you ready to go now?");
}
else if (status == 1) {
if(eim.giveEventReward(cm.getPlayer(), 1)) {
cm.warp(270050000);
}
else {
cm.sendOk("You cannot receive an event prize without having an empty room in your EQUIP, USE, SET-UP or ETC inventory.");
}
cm.dispose();
}
}
}
cm.dispose();
}

View File

@@ -126,7 +126,7 @@ function action(mode, type, selection) {
if (cm.getParty() == null) {
cm.sendOk("You can participate in the party quest only if you are in a party.");
cm.dispose();
} else if(!cm.isEventLeader()) {
} else if(!cm.isLeader()) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
} else {

View File

@@ -59,7 +59,7 @@ function action(mode, type, selection) {
cm.warp(980010000, 3);
break;
case 1:
cm.warp(925020000);
cm.warp(925020000, 0);
break;
case 2:
cm.warp(980000000, 3);

View File

@@ -51,7 +51,7 @@ function action(mode, type, selection) {
if (cm.getParty() == null) {
cm.sendOk("You can participate in the party quest only if you are in a party.");
cm.dispose();
} else if(!cm.isEventLeader()) {
} else if(!cm.isLeader()) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
} else {

63
scripts/npc/9110002.js Normal file
View File

@@ -0,0 +1,63 @@
/*
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 --------------------------------------------------------------------------------
Kino Konoko - Zipangu - Mushroom Shrine(800000000)
-- By ---------------------------------------------------------------------------------------------
Ronan
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Ronan
---------------------------------------------------------------------------------------------------
**/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.isQuestCompleted(8074)) {
cm.openNpc(9110002);
} else {
cm.sendOk("Musssshhhhroooom Shrine~~~");
}
cm.dispose();
}
}
}

View File

@@ -1,15 +1,14 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,13 +18,167 @@
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/>.
*/
/* Konpei (9120201)
* Bain Armory Version
*/
/*Konpei
*
*@author Ronan
*/
importPackage(Packages.server.expeditions);
importPackage(Packages.tools);
importPackage(Packages.scripting.event);
var status = 0;
var expedition;
var player;
var em;
var exped = MapleExpeditionType.SHOWA;
var expedName = "Showa Gang";
var expedBoss = "The Boss";
var expedMap = "Nightmarish Last Days";
var expedItem = 4000138;
var list = "What would you like to do?#b\r\n\r\n#L1#View current Expedition members#l\r\n#L2#Start the fight!#l\r\n#L3#Stop the expedition.#l";
function start() {
if (cm.getPlayerCount(801040100) == 0)
cm.resetMap(801040100);
cm.warp(801040100);
cm.dispose();
}
action(1, 0, 0);
}
function action(mode, type, selection) {
player = cm.getPlayer();
expedition = cm.getExpedition(exped);
em = cm.getEventManager("ShowaBattle");
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.dispose();
return;
}
if (status == 0) {
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
cm.dispose();
} else if (expedition == null) { //Start an expedition
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
status = 2;
} else if (expedition.isRegistering()) { //If the expedition is registering
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin the expedition.");
cm.dispose();
} else { //If you aren't in it, you're going to get added
cm.sendOk(expedition.addMember(cm.getPlayer()));
cm.dispose();
}
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
if (expedition.contains(player)) { //If you're registered, warp you in
var eim = em.getInstance(expedName + player.getClient().getChannel());
if(eim.getIntProperty("canJoin") == 1) {
eim.registerPlayer(player);
} else {
cm.sendOk("Your expedition already started the battle against " + expedBoss + ". Lets pray for those brave souls.");
}
cm.dispose();
} else { //If you're not in by now, tough luck
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
cm.dispose();
}
}
} else if (status == 1) {
if (selection == 1) {
if (!cm.haveItem(expedItem)) {
cm.sendOk("As the expedition leader, you must have on your inventory a #b#t" + expedItem + "##k to battle " + expedBoss + "!");
cm.dispose();
return;
}
expedition = cm.getExpedition(exped);
if(expedition != null) {
cm.sendOk("Someone already taken the initiative to be the leader of the expedition. Try joining them!");
cm.dispose();
return;
}
cm.createExpedition(exped);
cm.sendOk("The #r" + expedBoss + " Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
cm.dispose();
return;
} else if (selection == 2) {
cm.sendOk("Sure, not everyone's up to challenging " + expedBoss + ".");
cm.dispose();
return;
}
} else if (status == 2) {
if (selection == 1) {
if (expedition == null) {
cm.sendOk("The expedition could not be loaded.");
cm.dispose();
return;
}
var size = expedition.getMembers().size();
if (size == 1) {
cm.sendOk("You are the only member of the expedition.");
cm.dispose();
return;
}
var text = "The following members make up your expedition (Click on them to expel them):\r\n";
text += "\r\n\t\t1." + expedition.getLeader().getName();
for (var i = 1; i < size; i++) {
text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
}
cm.sendSimple(text);
status = 6;
} else if (selection == 2) {
var min = exped.getMinSize();
var size = expedition.getMembers().size();
if (size < min) {
cm.sendOk("You need at least " + min + " players registered in your expedition.");
cm.dispose();
return;
}
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
status = 4;
} else if (selection == 3) {
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
cm.endExpedition(expedition);
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
cm.dispose();
return;
}
} else if (status == 4) {
if (em == null) {
cm.sendOk("The event could not be initialized, please report this on the forum.");
cm.dispose();
return;
}
em.setProperty("leader", player.getName());
em.setProperty("channel", player.getClient().getChannel());
if(!em.startInstance(expedition)) {
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
cm.dispose();
return;
}
cm.dispose();
return;
} else if (status == 6) {
if (selection > 0) {
var banned = expedition.getMembers().get(selection - 1);
expedition.ban(banned);
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
cm.dispose();
} else {
cm.sendSimple(list);
status = 2;
}
}
}
}

View File

@@ -19,7 +19,54 @@
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/>.
*/
/* Konpei
*
* @Author Ronan
*/
var status;
function start() {
cm.warp(801040004, 0);
cm.dispose();
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
var eim = cm.getEventInstance();
if(!eim.isEventCleared()) {
if (status == 0) {
cm.sendYesNo("If you leave now, you won't be able to return. Are you sure you want to leave?");
} else if (status == 1) {
cm.warp(801040004, 1);
cm.dispose();
}
} else {
if(status == 0) {
cm.sendNext("You guys did it, great job! Now our city is free from the tyranny of their mobs! As representative of the city, please accept this as a prize for your efforts, as I get you back to town.");
}
if(status == 1) {
var eim = cm.getEventInstance();
if(!eim.giveEventReward(cm.getPlayer())) {
cm.sendNext("Please make room on your inventory first...");
} else {
cm.warp(801040101);
}
cm.dispose();
}
}
}
}

60
scripts/npc/9120203.js Normal file
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 --------------------------------------------------------------------------------
Konpei - Near the Hideout (Beautiful Sky)(801040101)
-- By ---------------------------------------------------------------------------------------------
Ronan
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Ronan
---------------------------------------------------------------------------------------------------
**/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendNext("Ah, The Boss has been defeated. What a happy day this turns out to be! Congratulations, everyone. Follow this way back to town.");
} else if (status == 1) {
cm.warp(801000000);
cm.dispose();
}
}
}

View File

@@ -21,6 +21,7 @@ eQuestPrizes[0] = new Array ([1002801,1], // Raven Ninja Bandana
[1472031,1], // Black Mamba
[2044701,1], // Claw for ATT 60%
[2044501,1], // Bow for ATT 60%
[3010041,1], // Skull Throne
[0, 750000]); // Mesos
eQuestPrizes[1] = new Array ([1332077,1], // Raven's Beak
@@ -31,6 +32,7 @@ eQuestPrizes[1] = new Array ([1332077,1], // Raven's Beak
[2043201,1], // One Handed BW for Att 60%
[2044401,1], // Polearm for Att 60%
[2044301,1], // Spear for Att 60%
[3010041,1], // Skull Throne
[0,1250000]); // Mesos
eQuestPrizes[2] = new Array ([1472072,1], //Raven's Claw
@@ -42,6 +44,7 @@ eQuestPrizes[2] = new Array ([1472072,1], //Raven's Claw
[2043023,1], // One-Handed Sword for Att 100%[2]
[2043101,1], // One-Handed Axe for Att 60%
[2043301,1], // Dagger for Att 60%
[3010040,1], // The Stirge Seat
[0,2500000]); // Mesos
eQuestPrizes[3] = new Array ([1002801,1], //Raven Ninja Bandana
@@ -51,6 +54,7 @@ eQuestPrizes[3] = new Array ([1002801,1], //Raven Ninja Bandana
[4032015,1], // Tao of Shadows
[2043701,1], // Wand for Magic Att 60%
[2043801,1], // Staff for Magic Att 60%
[3010040,1], // The Stirge Seat
[0,1750000]); // Mesos
eQuestPrizes[4] = new Array ([0,3500000]); // Mesos
@@ -96,7 +100,7 @@ function action(mode, type, selection) {
requiredItem = eQuestChoices[selection];
if(selection < 4) qnt = 50;
else qnt=25;
else qnt = 25;
cm.sendYesNo("Let's see, you want to trade your #b" + qnt + " #t" + requiredItem + "##k with my stuff, right? Before trading make sure you have an empty slot available on your use or etc. inventory. Now, do you want to trade with me?");
}else if (status == 4){

View File

@@ -44,11 +44,26 @@ function action(mode, type, selection) {
else
status--;
if (status == 0) {
cm.sendYesNo("If you leave now, you won't be able to return. Are you sure you want to leave?");
} else if (status == 1) {
cm.warp(551030100, 2);
cm.dispose();
var eim = cm.getEventInstance();
if(!eim.isEventCleared()) {
if (status == 0) {
cm.sendYesNo("If you leave now, you won't be able to return. Are you sure you want to leave?");
} else if (status == 1) {
cm.warp(551030100, 2);
cm.dispose();
}
} else {
if (status == 0) {
cm.sendNext("You guys defeated both Scarlion and Targa! Wonderful! Take this memento as a prize for your bravery.");
} else if (status == 1) {
if(!eim.giveEventReward(cm.getPlayer())) {
cm.sendNext("Please make room on your inventory first!");
} else {
cm.warp(551030100, 2);
}
cm.dispose();
}
}
}
}

View File

@@ -1,11 +1,249 @@
/* @Author SharpAceX
Name: Steward
Map(s): Foyer
Info: Steward
NPC ID: 9201143.js
*/
/* @Author SharpAceX / Ronan
Name: Steward
Map(s): Foyer
Info: Steward / Commands
NPC ID: 9201143.js
*/
function start() {
cm.sendNext("At your service, my friend.");
cm.dispose();
}
var status;
var comm_lv6 = [];
var desc_lv6 = [];
var comm_lv5 = [];
var desc_lv5 = [];
var comm_lv4 = [];
var desc_lv4 = [];
var comm_lv3 = [];
var desc_lv3 = [];
var comm_lv2 = [];
var desc_lv2 = [];
var comm_lv1 = [];
var desc_lv1 = [];
var levels = ["Common", "Donator", "JrGM", "GM", "SuperGM", "Developer", "Admin"];
var comm_cursor, desc_cursor;
function addCommand(comm, desc) {
comm_cursor.add(comm);
desc_cursor.add(desc);
}
function writeSolaxiaCommandsLv6() { //Admin
comm_cursor = comm_lv6;
desc_cursor = desc_lv6;
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
}
function writeSolaxiaCommandsLv5() { //Developer
comm_cursor = comm_lv5;
desc_cursor = desc_lv5;
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
}
function writeSolaxiaCommandsLv4() { //SuperGM
comm_cursor = comm_lv4;
desc_cursor = desc_lv4;
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
}
function writeSolaxiaCommandsLv3() { //GM
comm_cursor = comm_lv3;
desc_cursor = desc_lv3;
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
addCommand("", "");
}
function writeSolaxiaCommandsLv2() { //JrGM
comm_cursor = comm_lv2;
desc_cursor = desc_lv2;
addCommand("hide", "");
addCommand("unhide", "");
addCommand("sp", "");
addCommand("ap", "");
addCommand("empowerme", "");
addCommand("buffmap", "");
addCommand("buff", "");
addCommand("bomb", "");
addCommand("dc", "");
addCommand("cleardrops", "");
addCommand("clearslot", "");
addCommand("warp", "");
addCommand("warpto", "");
addCommand("summon", "");
addCommand("gmshop", "");
addCommand("heal", "");
addCommand("item", "");
addCommand("level", "");
addCommand("levelpro", "");
addCommand("setstat", "");
addCommand("maxstat", "");
addCommand("maxskill", "");
addCommand("mesos", "");
addCommand("search", "");
addCommand("jail", "");
addCommand("unjail", "");
addCommand("unbug", "");
}
function writeSolaxiaCommandsLv1() { //Donator
comm_cursor = comm_lv1;
desc_cursor = desc_lv1;
addCommand("buffme", "");
addCommand("goto", "");
addCommand("recharge", "");
addCommand("whereami", "");
}
function writeSolaxiaCommandsLv0() { //Common
comm_cursor = comm_lv0;
desc_cursor = desc_lv0;
addCommand("commands", "");
addCommand("time", "");
addCommand("staff", "");
addCommand("uptime", "");
addCommand("gacha", "");
addCommand("whatdropsfrom", "");
addCommand("whodrops", "");
addCommand("dispose", "");
addCommand("equiplv", "");
addCommand("rates", "");
addCommand("online", "");
addCommand("gm", "");
addCommand("bug", "");
addCommand("joinevent", "");
addCommand("leaveevent", "");
addCommand("bosshp", "");
addCommand("ranks", "");
}
function writeSolaxiaCommands() {
writeSolaxiaCommandsLv0(); //Common
writeSolaxiaCommandsLv1(); //Donator
writeSolaxiaCommandsLv2(); //JrGM
writeSolaxiaCommandsLv3(); //GM
writeSolaxiaCommandsLv4(); //Developer
writeSolaxiaCommandsLv5(); //SuperGM
writeSolaxiaCommandsLv6(); //Admin
}
function start() {
if(cm.getPlayer.getCS()) {
writeSolaxiaCommands();
action(1, 0, 0);
} else {
cm.sendNext("At your service, my friend.");
cm.dispose();
}
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
var sendStr = "There are all available commands for you:\r\n\r\n#b";
for(var i = 0; i < cm.getGmLevel(); i++) {
sendStr += "#L" + i + "#" + levels[i] + "#l\r\n";
}
cm.sendSimple(sendStr);
} else if(status == 1) {
var lvComm, lvDesc;
if(selection == 0) {
lvComm = comm_lv1;
lvDesc = desc_lv1;
} else if(selection == 1) {
lvComm = comm_lv2;
lvDesc = desc_lv2;
} else if(selection == 2) {
lvComm = comm_lv3;
lvDesc = desc_lv3;
} else if(selection == 3) {
lvComm = comm_lv4;
lvDesc = desc_lv4;
} else if(selection == 4) {
lvComm = comm_lv5;
lvDesc = desc_lv5;
} else {
lvComm = comm_lv6;
lvDesc = desc_lv6;
}
var sendStr = "The following commands are available for #b" + levels[selection] + "#k:\r\n\r\n";
for(var i = 0; i < lvComm.length; i++) {
sendStr += " #L" + i + "# " + lvComm[i] + " - " + lvDesc[i];
sendStr += "#l\r\n";
}
cm.sendPrev(sendStr);
}
}
}

View File

@@ -4,13 +4,7 @@ By Ronan
**/
var status = -1;
function start() {
if(cm.getMap().getMonsters().size() > 1) { //reactor as a monster? wtf
cm.sendOk("Defeat all monsters before talking to me.");
cm.dispose();
return;
}
action(1, 0, 0);
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
@@ -26,11 +20,23 @@ function action(mode, type, selection) {
status--;
if (status == 0) {
cm.sendSimple("#b<Raid Quest: Happyville>#k\r\nA raid is nothing but joining many people in an attempt to defeat extremely powerful creatures. Here is no different. Here, everyone can take part in defeating the spawned creature. At the moment the are none, what will you do?\r\n#b\r\n#L0#Spawn Kid Snowman.\r\n#L1#Spawn Lost Rudolph.\r\n#L2#Nothing, just chilling.#k");
cm.sendSimple("#b<Raid Quest: Happyville>#k\r\nA raid is nothing but many people joining up in an attempt to defeat extremely powerful creatures. Here is no different. Here, everyone can take part in defeating the spawned creature. What will you do?\r\n#b\r\n#L0#Spawn Kid Snowman.\r\n#L1#Spawn Lost Rudolph.\r\n#L2#Nothing, just chilling.#k");
} else if(status == 1) {
if(selection == 0) {
if(cm.getMap().getMonsters().size() > 1) { //reactor as a monster? wtf
cm.sendOk("Eliminate all mobs in the area to call Kid Snowman.");
cm.dispose();
return;
}
cm.getMap().spawnMonsterOnGroundBelow(9500317, 1700, 80);
} else if(selection == 1) {
if(cm.getMap().getMonsters().size() > 6) { //reactor as a monster? wtf
cm.sendOk("The place is too crowded right now. Eliminate some mobs before trying again.");
cm.dispose();
return;
}
cm.getMap().spawnMonsterOnGroundBelow(9500320, 1700, 80);
} else {
cm.sendOk("Fine then.");

View File

@@ -0,0 +1,30 @@
/*
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/>.
*/
/*
Vs Pink Bean - Clear stage portal
@author Ronan
*/
function enter(pi) {
pi.warp(270050000);
return true;
}

30
scripts/portal/Pinkin.js Normal file
View File

@@ -0,0 +1,30 @@
/*
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/>.
*/
/*
Vs Pink Bean - Ressurection stage portal
@author Ronan
*/
function enter(pi) {
pi.warp(270050100);
return true;
}

39
scripts/portal/Zakum03.js Normal file
View File

@@ -0,0 +1,39 @@
/*
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/>.
*/
/*
Zakum PQ portal
*/
function enter(pi) {
if (!pi.getEventInstance().isEventCleared()) {
pi.getPlayer().dropMessage(5,"Your team has not yet completed the trials. Fetch the Fire Ore and give it to Aura first.");
return false;
}
if (pi.getEventInstance().gridCheck(pi.getPlayer()) == -1) {
pi.getPlayer().dropMessage(5,"Your have yet to claim your prize. Talk to Aura.");
return false;
}
pi.warp(211042300);
return true;
}

View File

@@ -24,15 +24,16 @@
*/
function enter(pi) {
if (!pi.haveItem(4001017)) {
pi.getPlayer().dropMessage(6,"You do not have the Eye of Fire. You may not face the boss.");
if (!pi.isQuestStarted(100200)) {
pi.getPlayer().dropMessage(5,"You need approval from the masters to battle. You may not attempt the boss right now.");
return false;
}
//var exped = pi.getEventManager("ZakumBattle").getInstance("ZakumBattle_" + pi.getPlayer().getClient().getChannel());
//if (exped != null) {
// pi.getPlayer().dropMessage(6,"The battle at Zakum's Altar is currently underway.");
// return false;
//}
}
if (!pi.isQuestCompleted(100201)) {
pi.getPlayer().dropMessage(5,"You do not have completed all the trials yet. You may not attempt the boss right now.");
return false;
}
pi.warp(211042400,"west00");
return true;
}

View File

@@ -20,15 +20,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @author: kevintjuh93/moogra
* @author: kevintjuh93, moogra
* @portal: dojang_exit
* @purpose: warps user out
*/
function enter(pi) {
var map = pi.getPlayer().getSavedLocation("MIRROR");
if(map == -1)
map = 100000000;
var map = pi.getPlayer().getSavedLocation("MIRROR");
if(map == -1) map = 100000000;
pi.warp(map);
return true;
}

View File

@@ -20,16 +20,24 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @Author Moogra
* @Author Moogra, Ronan
*/
function enter(pi) {
if (pi.getPlayer().getMap().getReactorByName("door").getState() == 1) {
if ((pi.getPlayer().getMapId() / 100) % 100 != 38) {
if (pi.getPlayer().getMap().getCharacters().size() == 1) {
pi.resetMap(pi.getPlayer().getMapId());
}
var gate = pi.getPlayer().getMap().getReactorByName("door");
if ((gate != null && gate.getState() == 1) || pi.getMap().countMonsters() == 0) {
if (Math.floor(pi.getPlayer().getMapId() / 100) % 100 < 38) {
pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap() + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + ".");
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
if(((Math.floor((pi.getPlayer().getMap().getId() + 100) / 100)) % 100) % 6 == 0) {
if(Math.floor(pi.getPlayer().getMapId() / 10000) == 92503) {
pi.warpParty(pi.getPlayer().getMap().getId() + 100, 925030100, 925033804);
} else {
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
}
} else {
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
}
} else {
pi.warp(925020003, 0);
pi.getPlayer().gainExp(2000 * pi.getPlayer().getDojoPoints(), true, true, true);

View File

@@ -28,9 +28,11 @@
function enter(pi) {
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
pi.getPlayer().enteredScript("dojang_Msg", pi.getPlayer().getMap().getId());
pi.getPlayer().setFinishedDojoTutorial();
pi.warp(925020001, 0);
return true;
} else {
pi.getPlayer().message("So Gong: Haha! You're going to run away like a coward? I won't let you get away that easily!");
return false;
}
return true;
}

View File

@@ -28,17 +28,17 @@
function enter(pi) {
try {
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
pi.goDojoUp();
pi.getPlayer().getMap().setReactorState();
var stage = (pi.getPlayer().getMapId() / 100) % 100;
if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !pi.getPlayer().getDojoParty()) // we can also try 5 * stage / 6 | 0 + 1
pi.getPlayer().setVanquisherKills(pi.getPlayer().getVanquisherKills() + 1);
} else {
pi.getPlayer().message("There are still some monsters remaining.");
}
pi.enableActions();
return true;
if (pi.getPlayer().getMap().getMonsterById(9300216) != null) {
pi.goDojoUp();
pi.getPlayer().getMap().setReactorState();
var stage = Math.floor(pi.getPlayer().getMapId() / 100) % 100;
if ((stage - (stage / 6) | 0) == pi.getPlayer().getVanquisherStage() && !pi.getPlayer().getDojoParty()) // we can also try 5 * stage / 6 | 0 + 1
pi.getPlayer().setVanquisherKills(pi.getPlayer().getVanquisherKills() + 1);
} else {
pi.getPlayer().message("There are still some monsters remaining.");
}
pi.enableActions();
return true;
} catch(err) {
pi.getPlayer().dropMessage(err);
}

View File

@@ -24,6 +24,6 @@ Leave the Cave of Life - Entrance Map and go back to the Peak of the Big Nest (2
*/
function enter(pi) {
pi.warp(240040600, "st00");
pi.warp(240040600, 4);
return true;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6153)) {
pi.warp(910500200, 0);
return true;
if(pi.getWarpMap(910500200).countPlayers() == 0) {
pi.resetMapObjects(910500200);
pi.warp(910500200, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function enter(pi) {
if (pi.getPlayer().getEventInstance().getProperty("canWarp")) {
if (pi.getPlayer().getMap().countMonsters() == 0) {
pi.warp(910500200, "out01");
return true;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6240)) {
pi.warp(921100200, 0);
return true;
if(pi.getWarpMap(921100200).countPlayers() == 0) {
pi.resetMapObjects(921100200);
pi.warp(921100200, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -25,9 +25,17 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6202)) {
pi.getPlayer().getClient().getChannelServer().getMapFactory().getMap(910200000).resetReactors(); // Make sure they actually can do what they need...
pi.warp(910200000, 0);
return true;
if(pi.getWarpMap(910200000).countPlayers() == 0) {
pi.resetMapObjects(910200000);
pi.warp(910200000, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6242)) {
pi.warp(921100210, 0);
return true;
if(pi.getWarpMap(921100210).countPlayers() == 0) {
pi.resetMapObjects(921100210);
pi.warp(921100210, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -24,6 +24,18 @@
* @purpose Warps to the Junior Balrog map for the Rush Skill.
*/
function enter(pi) {
pi.warp(924000100, 0);
return true;
if(pi.isQuestStarted(6241) || pi.isQuestStarted(6243)) {
if(pi.getWarpMap(924000100).countPlayers() == 0) {
pi.resetMapObjects(924000100);
pi.warp(924000100, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -27,8 +27,8 @@ function enter(pi) {
if(pi.isQuestStarted(6134)) {
pi.warp(922020000, 0);
return true;
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -21,13 +21,19 @@
*/
/**
* @author DiscoveryMS (Twdtwd)
* @purpose Warps to the Forgotten Passage and gives you the needed item for the resurection.
* @purpose Warps to the Forgotten Passage and gives you the needed item for the resurrection.
*/
function enter(pi) {
if(pi.isQuestStarted(6134)) {
pi.warp(220070400, 3);
pi.gainItem(4031448, 1);
return true;
if(pi.canHold(4031448)) {
pi.gainItem(4031448, 1);
pi.warp(220070400, 3);
return true;
} else {
pi.getPlayer().message("Make room on your ETC to receive the quest item.");
return false;
}
} else {
pi.warp(220070400, 3);
return true;

View File

@@ -20,10 +20,22 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author DiscoveryMS (Twdtwd)
* @author DiscoveryMS (Twdtwd), Ronan
* @purpose Warps to the Cold Cave for Resurection.
*/
function enter(pi) {
pi.warp(923000100, 0);
return true;
if(pi.haveItem(4001108)) {
if(pi.getWarpMap(923000100).countPlayers() == 0) {
pi.resetMapObjects(923000100);
pi.warp(923000100, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -25,8 +25,15 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6110)) {
pi.warp(910500100, 0);
return true;
if(pi.getWarpMap(910500100).countPlayers() == 0) {
pi.resetMapObjects(910500100);
pi.warp(910500100, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
} else {
pi.getPlayer().message("A mysterious force won't let you in.");
return false;

View File

@@ -25,8 +25,17 @@
*/
function enter(pi) {
if(pi.isQuestStarted(6230) || pi.haveItem(4001110)) {
pi.warp(922020200, 1);
return true;
if(pi.getWarpMap(922020200).countPlayers() == 0) {
pi.resetMapObjects(922020200);
pi.warp(922020200, 0);
return true;
} else {
pi.getPlayer().message("Some other player is currently inside.");
return false;
}
}
pi.getPlayer().message("A mysterious force won't let you in.");
return false;
}

View File

@@ -0,0 +1,3 @@
function act() {
rm.dropItems();
}

View File

@@ -0,0 +1,3 @@
function act() {
rm.dropItems();
}

View File

@@ -19,6 +19,8 @@
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 act() {
rm.spawnMonster(9400711, 1);
}
function hit() {
rm.hitMonsterWithReactor(6090000, 14);
}
function act() {}

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 hit() {
rm.hitMonsterWithReactor(6090000, 14);
}
function act() {}

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 hit() {
rm.hitMonsterWithReactor(6090000, 14);
}
function act() {}

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 hit() {
rm.hitMonsterWithReactor(6090000, 14);
}
function act() {}

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 hit() {
rm.hitMonsterWithReactor(6090001, 4);
rm.getReactor().setEventState(Math.floor(Math.random() * 3));
}

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 hit() {
rm.hitMonsterWithReactor(6090001, 4);
rm.getReactor().setEventState(Math.floor(Math.random() * 3));
}

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 hit() {
rm.hitMonsterWithReactor(6090001, 4);
rm.getReactor().setEventState(Math.floor(Math.random() * 3));
}

View File

@@ -0,0 +1,24 @@
/*
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 hit() {
rm.hitMonsterWithReactor(6090003, 1);
}

View File

@@ -0,0 +1,43 @@
/*
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.server.life);
function spawnJrBoss(mobObj) {
mobObj.getMap().killMonster(mobObj.getId());
var spawnid = mobObj.getId() - 17;
var mob = MapleLifeFactory.getMonster(spawnid);
mobObj.getMap().spawnMonsterOnGroundBelow(mob, mobObj.getPosition());
}
function hit() {
var mapObj = rm.getMap();
//spawnJrBoss(mapObj.getMonsterById(8820019));
//spawnJrBoss(mapObj.getMonsterById(8820020));
//spawnJrBoss(mapObj.getMonsterById(8820021));
//spawnJrBoss(mapObj.getMonsterById(8820022));
//spawnJrBoss(mapObj.getMonsterById(8820023));
mapObj.killMonster(8820000);
}

View File

@@ -0,0 +1,24 @@
/*
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 act(){
rm.spawnMonster(9400112);
}