Implemented EllinPQ + some bug fixes
Implemented EllinPQ, adjusted several drop rates and data, fixes some bugs at quests at client-side.
This commit is contained in:
@@ -15,14 +15,23 @@ function changedMap(eim, player, mapid) {
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
// When event timeout..
|
||||
|
||||
// restartEventTimer(long time)
|
||||
// stopEventTimer()
|
||||
// startEventTimer(long time)
|
||||
// isTimerStarted()
|
||||
// When event timeout without before completion..
|
||||
}
|
||||
|
||||
function timeOut(eim) {
|
||||
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 complete this event!");
|
||||
playerExit(eim, player);
|
||||
}
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
// When invoking unregisterMonster(MapleMonster mob) OR killed
|
||||
// Happens only when size = 0
|
||||
|
||||
@@ -89,6 +89,7 @@ function playerDisconnected(eim, player) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
var winner = eim.getPlayers().get(0);
|
||||
|
||||
@@ -154,6 +154,8 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
eim.setProperty("canWarp","true");
|
||||
}
|
||||
|
||||
@@ -122,9 +122,9 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
//do nothing; KPQ has nothing to do with monster killing
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
|
||||
@@ -180,6 +180,8 @@ function clearPQ(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
|
||||
|
||||
@@ -164,11 +164,11 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function timeOut() {
|
||||
var iter = em.getInstances().iterator();
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
importPackage(Packages.client.inventory);
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var minPlayers = 2;
|
||||
var entryMap = 930000000;
|
||||
var exitMap = 930000800;
|
||||
|
||||
function init() {
|
||||
em.setProperty("state", "0");
|
||||
@@ -18,73 +22,116 @@ function setup(level, leaderid) {
|
||||
eim.setInstanceMap(930000400).resetPQ(level);
|
||||
var map = eim.setInstanceMap(930000500);
|
||||
map.resetPQ(level);
|
||||
map.shuffleReactors();
|
||||
map.shuffleReactors();
|
||||
eim.setInstanceMap(930000600).resetPQ(level);
|
||||
eim.setInstanceMap(930000700).resetPQ(level);
|
||||
|
||||
eim.startEventTimer(20 * 60000); //20 mins
|
||||
respawnStg2(eim);
|
||||
eim.startEventTimer(30 * 60000); //30 mins
|
||||
return eim;
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
}
|
||||
|
||||
function playerRevive(eim, player) {
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
function respawnStg2(eim) {
|
||||
if(!eim.getMapInstance(930000200).getAllPlayer().isEmpty()) eim.getMapInstance(930000200).instanceMapRespawn();
|
||||
em.schedule("respawnStg2", eim, 4 * 1000);
|
||||
}
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < 930000000 || mapid > 930000700) {
|
||||
if (mapid < 930000000 || mapid > 930000800) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if (eim.disposeIfPlayerBelow(0, 0)) {
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
if(eim.getPlayers().isEmpty()) end(eim);
|
||||
}
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function removePlayer(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
}
|
||||
|
||||
function playerDead(eim, player) {}
|
||||
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
if (eim.isLeader(player) || party.size() <= minPlayers) { // Check for party leader
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++)
|
||||
playerExit(eim, party.get(i));
|
||||
eim.dispose();
|
||||
} else
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
return 0;
|
||||
var party = eim.getPlayers();
|
||||
if (eim.isLeader(player) || party.size() < minPlayers) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++)
|
||||
if (party.get(i).equals(player))
|
||||
removePlayer(eim, player);
|
||||
else
|
||||
playerExit(eim, party.get(i));
|
||||
eim.dispose();
|
||||
} else
|
||||
removePlayer(eim, player);
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
var party = eim.getPlayers();
|
||||
if (party.size() < minPlayers) {
|
||||
for (var i = 0; i < party.size(); i++)
|
||||
playerExit(eim,party.get(i));
|
||||
eim.dispose();
|
||||
} else
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
function disbandParty(eim) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
if (eim.disposeIfPlayerBelow(0, 0)) {
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
}
|
||||
|
||||
function end(eim) {
|
||||
eim.disposeIfPlayerBelow(100, 930000800);
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function leftParty (eim, player) {
|
||||
// If only 2 players are left, uncompletable:
|
||||
end(eim);
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {
|
||||
em.cancelSchedule();
|
||||
|
||||
em.setProperty("state", "0");
|
||||
em.setProperty("leader", "true");
|
||||
}
|
||||
function disbandParty (eim) {
|
||||
end(eim);
|
||||
}
|
||||
function playerDead(eim, player) {}
|
||||
function cancelSchedule() {}
|
||||
@@ -190,9 +190,9 @@ function finish(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
//do nothing; GQ has nothing to do with monster killing
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
|
||||
@@ -165,6 +165,8 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function dispose() {
|
||||
|
||||
@@ -136,14 +136,13 @@ function finish(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function timeOut() {
|
||||
}
|
||||
function cancelSchedule() {}
|
||||
|
||||
function timeOut() {}
|
||||
|
||||
function debug(eim,msg) {
|
||||
var iter = eim.getPlayers().iterator();
|
||||
|
||||
@@ -137,11 +137,11 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {
|
||||
em.cancelSchedule();
|
||||
|
||||
@@ -126,16 +126,14 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
//do nothing; LMPQ has nothing to do with monster killing
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function dispose(eim) {
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {}
|
||||
|
||||
}
|
||||
function timeOut(eim) {
|
||||
if (eim != null) {
|
||||
if (eim.getPlayerCount() > 0) {
|
||||
|
||||
@@ -146,8 +146,9 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function dispose() {
|
||||
em.schedule("OpenLPQ", 10000); // 10 seconds ?
|
||||
|
||||
@@ -224,9 +224,9 @@ function finish(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
//Open Portal? o.O
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {} //Open Portal? o.O
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
|
||||
@@ -22,9 +22,12 @@ function setup(level, leaderid) {
|
||||
em.setProperty("level", level);
|
||||
em.setProperty("openedChests", "0");
|
||||
eim.setInstanceMap(925100000).resetPQ(level);
|
||||
eim.setInstanceMap(925100000).shuffleReactors();
|
||||
|
||||
eim.setInstanceMap(925100100).resetPQ(level);
|
||||
var map = eim.setInstanceMap(925100200);
|
||||
map.resetPQ(level);
|
||||
map.shuffleReactors();
|
||||
for (var i = 0; i < 5; i++) {
|
||||
var mob = em.getMonster(9300124);
|
||||
var mob2 = em.getMonster(9300125);
|
||||
@@ -58,6 +61,7 @@ function setup(level, leaderid) {
|
||||
eim.setInstanceMap(925100202).resetPQ(level);
|
||||
map = eim.setInstanceMap(925100300);
|
||||
map.resetPQ(level);
|
||||
map.shuffleReactors();
|
||||
for (var i = 0; i < 5; i++) {
|
||||
var mob = em.getMonster(9300124);
|
||||
var mob2 = em.getMonster(9300125);
|
||||
@@ -93,7 +97,7 @@ function setup(level, leaderid) {
|
||||
eim.setInstanceMap(925100500).resetPQ(level);
|
||||
|
||||
respawnStg4(eim);
|
||||
eim.startEventTimer(1200000); //20 mins
|
||||
eim.startEventTimer(20 * 60000); //20 mins
|
||||
return eim;
|
||||
}
|
||||
|
||||
@@ -108,8 +112,7 @@ function scheduledTimeout(eim) {
|
||||
|
||||
function removePlayer(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.getMap().removePlayer(player);
|
||||
player.setMap(exitMap);
|
||||
player.changeMap(exitMap, 0);
|
||||
}
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
@@ -170,7 +173,7 @@ function disbandParty(eim) {
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
player.changeMap(exitMap, 0);
|
||||
}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
@@ -189,15 +192,15 @@ function clearPQ(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function respawnStg4(eim) {
|
||||
//if(em.getProperty("stage4") == "0") {
|
||||
eim.getMapInstance(925100400).instanceMapRespawn();
|
||||
em.schedule("respawnStg4", eim, 10 * 1000);
|
||||
//}
|
||||
function respawnStg4(eim) {
|
||||
eim.getMapInstance(925100400).instanceMapRespawn();
|
||||
em.schedule("respawnStg4", eim, 10 * 1000);
|
||||
}
|
||||
|
||||
function dispose(eim) {
|
||||
|
||||
@@ -120,6 +120,8 @@ function dispose() {}
|
||||
|
||||
function clearPQ(eim) {}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function timeOut(eim) {
|
||||
|
||||
@@ -36,10 +36,10 @@ function init() {
|
||||
}
|
||||
|
||||
function setup() {
|
||||
var eim = em.newInstance("ScargaBattle_" + em.getProperty("channel"));
|
||||
var eim = em.newInstance("ScargaBattle_" + em.getProperty("channel"));
|
||||
var timer = 1000 * 60 * fightTime;
|
||||
eim.setProperty("summoned", "false");
|
||||
em.schedule("timeOut", eim, timer);
|
||||
em.schedule("timeOut", eim, timer);
|
||||
eim.startEventTimer(timer);
|
||||
return eim;
|
||||
}
|
||||
@@ -133,21 +133,21 @@ function finish(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function timeOut(eim) {
|
||||
if (eim != null) {
|
||||
if (eim.getPlayerCount() > 0) {
|
||||
var pIter = eim.getPlayers().iterator();
|
||||
while (pIter.hasNext()){
|
||||
var player = pIter.next();
|
||||
player.dropMessage(6, "You have run out of time to defeat Scarlion and Targa!");
|
||||
var player = pIter.next();
|
||||
player.dropMessage(6, "You have run out of time to defeat Scarlion and Targa!");
|
||||
playerExit(eim, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
@@ -120,6 +120,8 @@ function dispose() {}
|
||||
|
||||
function clearPQ(eim) {}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function timeOut(eim) {
|
||||
|
||||
@@ -151,11 +151,11 @@ function finish(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function altarTimeOut(eim) {
|
||||
if (eim != null && eim.getProperty("summoned").equals("false")) {
|
||||
|
||||
@@ -139,9 +139,9 @@ function clearPQ(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
//do nothing; ZPQ has nothing to do with monster killing
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
|
||||
@@ -76,9 +76,8 @@ function clearPQ(eim) {
|
||||
em.setProperty("started", "false");
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
//has nothing to do with monster killing
|
||||
}
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function cancelSchedule() {
|
||||
}
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
@@ -15,19 +15,19 @@ function action(mode,type,selection) {
|
||||
if (status == -1) {
|
||||
if (cm.getMapId() == 108000502) {
|
||||
if (!(cm.haveItem(4031856,15))) {
|
||||
cm.sendNext("Go, and get me 15 #bPotent Wind Crystals#k.");
|
||||
cm.sendNext("Go, and get me 15 #b#t4031856##k.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
status = 2;
|
||||
cm.sendNext("Wow, you have brought me 15 #bPotent Wind Crystals#k! Congratulations. Let me warp you out now.");
|
||||
cm.sendNext("Wow, you have brought me 15 #b#t4031856##k! Congratulations. Let me warp you out now.");
|
||||
}
|
||||
} else if (cm.getMapId() == 108000501) {
|
||||
if (!(cm.haveItem(4031857,15))) {
|
||||
cm.sendNext("Go, and get me 15 #bPotent Power Crystals#k.");
|
||||
cm.sendNext("Go, and get me 15 #b#t4031857##k.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
status = 2;
|
||||
cm.sendNext("Wow, you have brought me 15 #bPotent Power Crystals#k! Congratulations. Let me warp you out now.");
|
||||
cm.sendNext("Wow, you have brought me 15 #b#t4031857##k! Congratulations. Let me warp you out now.");
|
||||
}
|
||||
} else {
|
||||
cm.sendNext("Error. Please report this.");
|
||||
|
||||
@@ -84,7 +84,7 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Your party is not a party of two to six members. Make sure all your members are present and qualified to participate in this quest. I see #b" + levelValid.toString() + " #kmembers are in the right level range, and #b" + inMap.toString() + "#k are in my map. If this seems wrong, #blog out and log back in,#k or reform the party.");
|
||||
cm.sendOk("Your party is not a party of 2 to 6 members between level " + minLevel + " and " + maxLevel + ". Make sure all your members are present and qualified to participate in this quest.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
var status = -1;
|
||||
var minPlayers = 0;
|
||||
|
||||
var minLevel = 44, maxLevel = 170;
|
||||
|
||||
function start() {
|
||||
action(1,0,0);
|
||||
@@ -14,9 +17,6 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
}
|
||||
if (status == 0) {
|
||||
cm.removeAll(4001163);
|
||||
cm.removeAll(4001169);
|
||||
cm.removeAll(2270004);
|
||||
cm.sendSimple("#b#L0#Give me Altaire Earrings.#l\r\n#L1#Give me Glittering Altaire Earrings.#l\r\n#L3#Give me Brilliant Altaire Earrings.#l\r\n#L2#Attempt Forest of Poison Haze.#l#k");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
@@ -54,13 +54,13 @@ function action(mode, type, selection) {
|
||||
while (it.hasNext()) {
|
||||
var cPlayer = it.next();
|
||||
var ccPlayer = cm.getPlayer().getMap().getCharacterById(cPlayer.getId());
|
||||
if (ccPlayer == null || ccPlayer.getLevel() < 44 || ccPlayer.getLevel() > 55) {
|
||||
if (ccPlayer == null || ccPlayer.getLevel() < minLevel || ccPlayer.getLevel() > maxLevel) {
|
||||
next = false;
|
||||
break;
|
||||
}
|
||||
size += (ccPlayer.isGM() ? 4 : 1);
|
||||
}
|
||||
if (next && size >= 2) {
|
||||
if (next && size >= minPlayers) {
|
||||
var em = cm.getEventManager("Ellin");
|
||||
if (em == null) {
|
||||
cm.sendOk("Please try again later.");
|
||||
@@ -68,7 +68,7 @@ function action(mode, type, selection) {
|
||||
em.startInstance(cm.getPlayer().getParty(), cm.getPlayer().getMap(), 1); //common level only
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("All 2+ members of your party must be here and between level 44 and 55.");
|
||||
cm.sendOk("All 2+ members of your party must be here and between level " + minLevel + " and " + maxLevel + ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
var status = -1;
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
if (status == 0) {
|
||||
cm.dispose();
|
||||
}
|
||||
status--;
|
||||
}
|
||||
if (status == 0) {
|
||||
cm.removeAll(4001163);
|
||||
cm.removeAll(4001169);
|
||||
cm.removeAll(2270004);
|
||||
cm.sendSimple("#b#L0#Give me Altaire Earrings.#l\r\n#L1#Give me Glittering Altaire Earrings.#l\r\n#L3#Give me Brilliant Altaire Earrings.#l\r\n#L2#Attempt Forest of Poison Haze.#l#k");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (!cm.haveItem(1032060) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either have Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 1){
|
||||
if (cm.haveItem(1032060) && !cm.haveItem(1032061) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032060,-1);
|
||||
cm.gainItem(1032061, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either don't have Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 1){
|
||||
if (cm.haveItem(1032061) && !cm.haveItem(1032101) && cm.haveItem(4001198, 10)) {
|
||||
cm.gainItem(1032061,-1);
|
||||
cm.gainItem(1032101, 1);
|
||||
cm.gainItem(4001198, -10);
|
||||
} else {
|
||||
cm.sendOk("You either don't have Glittering Altair Earrings already or you do not have 10 Altair Fragments");
|
||||
}
|
||||
} else if (selection == 2) {
|
||||
if (cm.getPlayer().getParty() == null || !cm.isLeader()) {
|
||||
cm.sendOk("The leader of the party must be here.");
|
||||
} else {
|
||||
var party = cm.getPlayer().getParty().getMembers();
|
||||
var mapId = cm.getPlayer().getMapId();
|
||||
var next = true;
|
||||
var size = 0;
|
||||
var it = party.iterator();
|
||||
while (it.hasNext()) {
|
||||
var cPlayer = it.next();
|
||||
var ccPlayer = cm.getPlayer().getMap().getCharacterById(cPlayer.getId());
|
||||
if (ccPlayer == null || ccPlayer.getLevel() < 70 || ccPlayer.getLevel() > 255) {
|
||||
next = false;
|
||||
break;
|
||||
}
|
||||
size += (ccPlayer.isGM() ? 4 : 1);
|
||||
}
|
||||
if (next && size >= 2) {
|
||||
var em = cm.getEventManager("Ellin");
|
||||
if (em == null) {
|
||||
cm.sendOk("Please try again later.");
|
||||
} else {
|
||||
em.startInstance(cm.getPlayer().getParty(), cm.getPlayer().getMap(), 120);
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("All 2+ members of your party must be here and above level 70.");
|
||||
}
|
||||
}
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -28,8 +28,13 @@ function action(mode, type, selection) {
|
||||
cm.warpParty(930000500);
|
||||
cm.gainItem(4001169,-20);
|
||||
} else if (!cm.haveItem(2270004)) {
|
||||
cm.gainItem(2270004,10);
|
||||
cm.sendOk("Good luck in purifying these monsters!");
|
||||
if(cm.canHold(2270004,10)) {
|
||||
cm.gainItem(2270004,10);
|
||||
cm.sendOk("Good luck in purifying these monsters!");
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Make space on your USE inventory before receiving the purifiers!");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("We have to purify all these contaminated monsters! Get me 20 Monster Marbles from them!");
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ function action(mode, type, selection) {
|
||||
if (status == 0) {
|
||||
cm.sendYesNo("Would you like to get out?");
|
||||
} else if (status == 1) {
|
||||
cm.removeAll(4001163);
|
||||
cm.removeAll(4001169);
|
||||
cm.removeAll(2270004);
|
||||
cm.removeAll(4001163);
|
||||
cm.removeAll(4001169);
|
||||
cm.removeAll(2270004);
|
||||
cm.warp(930000800,0);
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
4
scripts/npc/world0/9120023.js
Normal file
4
scripts/npc/world0/9120023.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function start() {
|
||||
cm.sendOk("The quality of the movies they are launching these days are impressive!");
|
||||
cm.dispose();
|
||||
}
|
||||
9
scripts/portal/party6_out.js
Normal file
9
scripts/portal/party6_out.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if ((pi.getMap().getMonsters().size() == 0 || pi.getMap().getMonsterById(9300183) != null) && (pi.getMap().getReactorByName("") == null || pi.getMap().getReactorByName("").getState() == 1)) {
|
||||
pi.warp(930000800,0);
|
||||
return true;
|
||||
} else {
|
||||
pi.playerMessage(5, "Please eliminate the Poison Golem.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
30
scripts/portal/party6_stage.js
Normal file
30
scripts/portal/party6_stage.js
Normal file
@@ -0,0 +1,30 @@
|
||||
function enter(pi) {
|
||||
switch(pi.getMapId()) {
|
||||
case 930000000:
|
||||
pi.warp(930000100,0);
|
||||
return true;
|
||||
break;
|
||||
case 930000100:
|
||||
if (pi.getMap().getMonsters().size() == 0) {
|
||||
pi.warp(930000200,0);
|
||||
return true;
|
||||
} else {
|
||||
pi.playerMessage(5, "Eliminate all the monsters.");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 930000200:
|
||||
if (pi.getMap().getReactorByName("spine") != null && pi.getMap().getReactorByName("spine").getState() < 4) {
|
||||
pi.playerMessage(5, "The spine blocks the way.");
|
||||
return false;
|
||||
} else {
|
||||
pi.warp(930000300,0); //assuming they cant get past reactor without it being gone
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
pi.playerMessage(5, "This portal leads to an unbound path.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
9
scripts/portal/party6_stage501.js
Normal file
9
scripts/portal/party6_stage501.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "02st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage502.js
Normal file
9
scripts/portal/party6_stage502.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "03st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage503.js
Normal file
9
scripts/portal/party6_stage503.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "04st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage504.js
Normal file
9
scripts/portal/party6_stage504.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "05st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage505.js
Normal file
9
scripts/portal/party6_stage505.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "06st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage506.js
Normal file
9
scripts/portal/party6_stage506.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "07st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage507.js
Normal file
9
scripts/portal/party6_stage507.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "08st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage508.js
Normal file
9
scripts/portal/party6_stage508.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "09st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage509.js
Normal file
9
scripts/portal/party6_stage509.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "10st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage510.js
Normal file
9
scripts/portal/party6_stage510.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "11st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage511.js
Normal file
9
scripts/portal/party6_stage511.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "12st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage512.js
Normal file
9
scripts/portal/party6_stage512.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "13st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage513.js
Normal file
9
scripts/portal/party6_stage513.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "14st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage514.js
Normal file
9
scripts/portal/party6_stage514.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "15st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
9
scripts/portal/party6_stage515.js
Normal file
9
scripts/portal/party6_stage515.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function enter(pi) {
|
||||
if (java.lang.Math.random() < 0.1) {
|
||||
pi.warp(930000300,"16st");
|
||||
} else {
|
||||
pi.warp(930000300, "01st");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
19
scripts/portal/party6_stage800.js
Normal file
19
scripts/portal/party6_stage800.js
Normal file
@@ -0,0 +1,19 @@
|
||||
function enter(pi) {
|
||||
pi.removeAll(4001162);
|
||||
pi.removeAll(4001163);
|
||||
pi.removeAll(4001164);
|
||||
pi.removeAll(4001169);
|
||||
pi.removeAll(2270004);
|
||||
|
||||
if(pi.getMap().getReactorByName("") != null && pi.getMap().getReactorByName("").getState() == 1) {
|
||||
if(!pi.canHold(4001198, 1)) {
|
||||
pi.playerMessage(5, "Check for a free space on your ETC inventory before entering this portal.");
|
||||
return false;
|
||||
}
|
||||
|
||||
pi.gainItem(4001198, 1);
|
||||
}
|
||||
|
||||
pi.warp(300030100,0);
|
||||
return true;
|
||||
}
|
||||
30
scripts/reactor/1202002.js
Normal file
30
scripts/reactor/1202002.js
Normal 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 as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* @Author Ronan
|
||||
*
|
||||
* 1102002.js: Nautilus bottom shells
|
||||
*/
|
||||
|
||||
function act() {
|
||||
rm.dropItems();
|
||||
}
|
||||
4
scripts/reactor/3001000.js
Normal file
4
scripts/reactor/3001000.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function act(){
|
||||
rm.playerMessage(5, "Poison Golem has been spawned.");
|
||||
rm.spawnMonster(9300180,1);
|
||||
}
|
||||
28
scripts/reactor/3002000.js
Normal file
28
scripts/reactor/3002000.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
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/>.
|
||||
*/
|
||||
/*3002000.js - Pond at Ellin PQ.
|
||||
*@author Ronan
|
||||
*/
|
||||
|
||||
function act() {
|
||||
rm.dropItems();
|
||||
}
|
||||
3
scripts/reactor/3002001.js
Normal file
3
scripts/reactor/3002001.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function act() {
|
||||
rm.dropItems();
|
||||
}
|
||||
3
scripts/reactor/3008000.js
Normal file
3
scripts/reactor/3008000.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function act() {
|
||||
rm.givePartyExp(52000, rm.getPlayer().getPartyMembers());
|
||||
}
|
||||
Reference in New Issue
Block a user