Merge branch 'master' of https://github.com/ronancpl/HeavenMS into credits_update
This commit is contained in:
@@ -31,7 +31,7 @@ var maxMapId = 108010101;
|
||||
|
||||
var eventTime = 20; //20 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -31,7 +31,7 @@ var maxMapId = 108010201;
|
||||
|
||||
var eventTime = 20; //20 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -33,7 +33,7 @@ var eventMaps = [923010000];
|
||||
|
||||
var eventTime = 5; //5 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -31,7 +31,7 @@ var maxMapId = 108010501;
|
||||
|
||||
var eventTime = 20; //20 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -31,7 +31,7 @@ var maxMapId = 108010401;
|
||||
|
||||
var eventTime = 20; //20 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -31,7 +31,7 @@ var maxMapId = 108010301;
|
||||
|
||||
var eventTime = 20; //20 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -30,7 +30,7 @@ var maxMapId = 912020000;
|
||||
|
||||
var eventTime = 2; //2 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -1,185 +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 as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var exitMap;
|
||||
var minPlayers = 3;
|
||||
|
||||
function init() {}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function setup(level, lobbyid) {
|
||||
exitMap = em.getChannelServer().getMapFactory().getMap(105090800); // <exit>
|
||||
|
||||
var eim = em.newInstance("4jberserk_" + lobbyid);
|
||||
eim.setProperty("level", level);
|
||||
|
||||
var mf = eim.getMapFactory();
|
||||
|
||||
var map = mf.getMap(910500200);
|
||||
map.addMapTimer(3*60);
|
||||
em.schedule("timeOut", 20 * 60000);
|
||||
|
||||
//you can't warp up to the rocks until all rogs are dead, I think?
|
||||
eim.setProperty("canWarp","false");
|
||||
|
||||
return eim;
|
||||
}
|
||||
|
||||
function afterSetup(eim) {}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(910500200);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
|
||||
//TODO: hold time across map changes
|
||||
//player.getClient().announce(tools.MaplePacketCreator.getClock(1800));
|
||||
}
|
||||
|
||||
function playerDead(eim, player) {
|
||||
}
|
||||
|
||||
function playerRevive(eim, player) {
|
||||
//if (eim.isLeader(player)) { //check for party leader
|
||||
//boot whole party and end
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
/*/}
|
||||
else { //boot dead player
|
||||
// If only 2 players are left, uncompletable:
|
||||
var party = eim.getPlayers();
|
||||
if (party.size() <= minPlayers) {
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim,party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
else
|
||||
playerExit(eim, player);
|
||||
}*/
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
//if (eim.isLeader(player)) { //check for party leader
|
||||
//boot whole party and end
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
if (party.get(i).equals(player)) {
|
||||
removePlayer(eim, player);
|
||||
}
|
||||
else {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
}
|
||||
eim.dispose();
|
||||
/*/}
|
||||
else { //boot d/ced player
|
||||
// If only 2 players are left, uncompletable:
|
||||
var party = eim.getPlayers();
|
||||
if (party.size() < minPlayers) {
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim,party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
else
|
||||
playerExit(eim, player);
|
||||
}*/
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
// If only 2 players are left, uncompletable:
|
||||
var party = eim.getPlayers();
|
||||
if (true) {
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim,party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
else
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
function disbandParty(eim) {
|
||||
//boot whole party and end
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
}
|
||||
|
||||
//for offline players
|
||||
function removePlayer(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.getMap().removePlayer(player);
|
||||
player.setMap(exitMap);
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++)
|
||||
playerExit(eim, party.get(i));
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {
|
||||
eim.setProperty("canWarp","true");
|
||||
}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function timeOut() {
|
||||
var iter = em.getInstances().iterator();
|
||||
while (iter.hasNext()) {
|
||||
var eim = iter.next();
|
||||
if (eim.getPlayerCount() > 0) {
|
||||
var pIter = eim.getPlayers().iterator();
|
||||
while (pIter.hasNext())
|
||||
playerExit(eim, pIter.next());
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ---------- FILLER FUNCTIONS ----------
|
||||
|
||||
function dispose() {}
|
||||
|
||||
function scheduledTimeout(eim) {}
|
||||
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
@@ -1,155 +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 as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
* @author AngelSL
|
||||
*
|
||||
* 4th Job Rush Quest.
|
||||
* Based on Kerning City PQ script by Stereo
|
||||
*/
|
||||
|
||||
var exitMap;
|
||||
var minPlayers = 3;
|
||||
|
||||
function init() {}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function setup(level, lobbyid) {
|
||||
exitMap = em.getChannelServer().getMapFactory().getMap(105090700); // <exit>
|
||||
|
||||
var eim = em.newInstance("4jrush_" + lobbyid);
|
||||
eim.setProperty("level", level);
|
||||
|
||||
var mf = eim.getMapFactory();
|
||||
var map = mf.getMap(910500100);
|
||||
map.addMapTimer(20*60);
|
||||
em.schedule("timeOut", 20 * 60000);
|
||||
return eim;
|
||||
}
|
||||
|
||||
function afterSetup(eim) {}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(910500100);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
}
|
||||
|
||||
function playerDead(eim, player) {
|
||||
}
|
||||
|
||||
function playerRevive(eim, player) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
if (party.get(i).equals(player)) {
|
||||
removePlayer(eim, player);
|
||||
}
|
||||
else {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
// If only 2 players are left, uncompletable:
|
||||
var party = eim.getPlayers();
|
||||
if (true) {
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim,party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
else
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
function disbandParty(eim) {
|
||||
//boot whole party and end
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
}
|
||||
|
||||
//for offline players
|
||||
function removePlayer(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.getMap().removePlayer(player);
|
||||
player.setMap(exitMap);
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
//KPQ does nothing special with winners
|
||||
var party = eim.getPlayers();
|
||||
for (var i = 0; i < party.size(); i++) {
|
||||
playerExit(eim, party.get(i));
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function timeOut() {
|
||||
var iter = em.getInstances().iterator();
|
||||
while (iter.hasNext()) {
|
||||
var eim = iter.next();
|
||||
if (eim.getPlayerCount() > 0) {
|
||||
var pIter = eim.getPlayers().iterator();
|
||||
while (pIter.hasNext()) {
|
||||
playerExit(eim, pIter.next());
|
||||
}
|
||||
}
|
||||
eim.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ---------- FILLER FUNCTIONS ----------
|
||||
|
||||
function dispose() {}
|
||||
|
||||
function scheduledTimeout(eim) {}
|
||||
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
@@ -30,7 +30,7 @@ var maxMapId = 912010200;
|
||||
|
||||
var eventTime = 4; //4 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -30,7 +30,7 @@ var maxMapId = 912010200;
|
||||
|
||||
var eventTime = 4; //4 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -31,7 +31,7 @@ var maxMapId = 921110000;
|
||||
|
||||
var eventTime = 3; //3 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -31,7 +31,7 @@ var maxMapId = 914030000;
|
||||
|
||||
var eventTime = 3; //3 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -170,7 +170,7 @@ function playerLeft(eim, player) {
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < minMapId || mapid > maxMapId) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -179,17 +179,12 @@ function changedMap(eim, player, mapid) {
|
||||
}
|
||||
}
|
||||
|
||||
function changedLeader(eim, leader) {
|
||||
var mapid = leader.getMapId();
|
||||
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
|
||||
end(eim);
|
||||
}
|
||||
}
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
function playerDead(eim, player) {}
|
||||
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -198,7 +193,7 @@ function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -206,19 +201,9 @@ function playerDisconnected(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
playerLeft(eim, player);
|
||||
}
|
||||
function leftParty(eim, player) {}
|
||||
|
||||
function disbandParty(eim) {
|
||||
if (!eim.isEventCleared()) {
|
||||
end(eim);
|
||||
}
|
||||
}
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
@@ -259,7 +244,8 @@ function monsterKilled(mob, eim) {
|
||||
eim.showClearEffect();
|
||||
eim.clearPQ();
|
||||
|
||||
eim.dispatchUpdateQuestMobCount(bossMobId, entryMap);
|
||||
eim.dispatchRaiseQuestMobCount(bossMobId, entryMap);
|
||||
eim.dispatchRaiseQuestMobCount(9101003, entryMap); // thanks Atoot for noticing quest not getting updated after boss kill
|
||||
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
|
||||
} else {
|
||||
if(count == 1) {
|
||||
|
||||
@@ -170,7 +170,7 @@ function playerLeft(eim, player) {
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < minMapId || mapid > maxMapId) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -179,17 +179,12 @@ function changedMap(eim, player, mapid) {
|
||||
}
|
||||
}
|
||||
|
||||
function changedLeader(eim, leader) {
|
||||
var mapid = leader.getMapId();
|
||||
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
|
||||
end(eim);
|
||||
}
|
||||
}
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
function playerDead(eim, player) {}
|
||||
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -198,7 +193,7 @@ function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -206,19 +201,9 @@ function playerDisconnected(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
playerLeft(eim, player);
|
||||
}
|
||||
function leftParty(eim, player) {}
|
||||
|
||||
function disbandParty(eim) {
|
||||
if (!eim.isEventCleared()) {
|
||||
end(eim);
|
||||
}
|
||||
}
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
@@ -259,7 +244,7 @@ function monsterKilled(mob, eim) {
|
||||
eim.showClearEffect();
|
||||
eim.clearPQ();
|
||||
|
||||
eim.dispatchUpdateQuestMobCount(bossMobId, entryMap);
|
||||
eim.dispatchRaiseQuestMobCount(bossMobId, entryMap);
|
||||
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
|
||||
} else {
|
||||
if(count == 1) {
|
||||
|
||||
@@ -31,7 +31,7 @@ var maxMapId = 910520000;
|
||||
|
||||
var eventTime = 10; //10 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
|
||||
@@ -241,7 +241,7 @@ function scheduledTimeout(eim) {
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < minMapId || mapid > maxMapId) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
@@ -297,7 +297,7 @@ function changedLeader(eim, leader) {}
|
||||
function playerDead(eim, player) {}
|
||||
|
||||
function playerRevive(eim, player) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
|
||||
end(eim);
|
||||
@@ -309,7 +309,7 @@ function playerRevive(eim, player) {
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.dropMessage(5, "[Expedition] Either the leader has quit the expedition or there is no longer the minimum number of members required to continue it.");
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
|
||||
@@ -35,7 +35,7 @@ var maxMapId = 925010300;
|
||||
|
||||
var eventTime = 6; // 6 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function init() {
|
||||
setEventRequirements();
|
||||
|
||||
@@ -36,7 +36,7 @@ var maxMapId = 922020100;
|
||||
|
||||
var eventTime = 20; // 20 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function init() {
|
||||
setEventRequirements();
|
||||
|
||||
@@ -24,7 +24,7 @@ function respawn(eim){}
|
||||
|
||||
function playerEntry(eim, player){
|
||||
var cave = eim.getMapInstance(eventMap + 10 * eim.getIntProperty("nex"));
|
||||
player.changeMap(cave);
|
||||
player.changeMap(cave, 1);
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim){
|
||||
|
||||
@@ -105,6 +105,8 @@ function setup(level, lobbyid) {
|
||||
var eim = em.newInstance("Henesys" + lobbyid);
|
||||
eim.setProperty("level", level);
|
||||
eim.setProperty("stage", "0");
|
||||
eim.setProperty("bunnyCake", "0");
|
||||
eim.setProperty("bunnyDamaged", "0");
|
||||
|
||||
eim.getInstanceMap(910010000).resetPQ(level);
|
||||
eim.getInstanceMap(910010000).allowSummonState(false);
|
||||
@@ -243,6 +245,25 @@ function friendlyKilled(mob, eim) {
|
||||
}
|
||||
}
|
||||
|
||||
function friendlyItemDrop(eim, mob) {
|
||||
if (mob.getId() == 9300061) {
|
||||
var cakes = eim.getIntProperty("bunnyCake") + 1;
|
||||
eim.setIntProperty("bunnyCake", cakes);
|
||||
|
||||
mob.getMap().broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "The Moon Bunny made rice cake number " + cakes + "."));
|
||||
}
|
||||
}
|
||||
|
||||
function friendlyDamaged(eim, mob) {
|
||||
if (mob.getId() == 9300061) {
|
||||
var bunnyDamage = eim.getIntProperty("bunnyDamaged") + 1;
|
||||
if (bunnyDamage > 5) {
|
||||
broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "The Moon Bunny is feeling sick. Please protect it so it can make delicious rice cakes."));
|
||||
eim.setIntProperty("bunnyDamaged", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
@@ -214,7 +214,7 @@ function monsterKilled(mob, eim) {
|
||||
eim.showClearEffect(mob.getMap().getId());
|
||||
eim.clearPQ();
|
||||
|
||||
eim.dispatchUpdateQuestMobCount(8810018, 240060200);
|
||||
eim.dispatchRaiseQuestMobCount(8810018, 240060200);
|
||||
mob.getMap().broadcastHorntailVictory();
|
||||
} else if(isHorntailHead(mob)) {
|
||||
var killed = eim.getIntProperty("defeatedHead");
|
||||
|
||||
@@ -52,7 +52,7 @@ function primeMinisterCheck(eim) {
|
||||
var pIter = map.getAllPlayers().iterator();
|
||||
while (pIter.hasNext()) {
|
||||
var player = pIter.next();
|
||||
if (player.getQuestStatus(2333) == 1 && player.getAbstractPlayerInteraction().getQuestProgress(2333, mobId) == 0) {
|
||||
if (player.getQuestStatus(2333) == 1 && player.getAbstractPlayerInteraction().getQuestProgressInt(2333, mobId) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ var maxMapId = 914020000;
|
||||
|
||||
var eventTime = 10; // 10 minutes
|
||||
|
||||
var lobbyRange = [0, 0];
|
||||
var lobbyRange = [0, 7];
|
||||
|
||||
function init() {}
|
||||
|
||||
|
||||
@@ -115,7 +115,9 @@ function setup(level, lobbyid) {
|
||||
return eim;
|
||||
}
|
||||
|
||||
function afterSetup(eim) {}
|
||||
function afterSetup(eim) {
|
||||
updateGateState(1);
|
||||
}
|
||||
|
||||
function respawnStages(eim) {}
|
||||
|
||||
@@ -143,7 +145,7 @@ function playerLeft(eim, player) {
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < minMapId || mapid > maxMapId) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -152,17 +154,12 @@ function changedMap(eim, player, mapid) {
|
||||
}
|
||||
}
|
||||
|
||||
function changedLeader(eim, leader) {
|
||||
var mapid = leader.getMapId();
|
||||
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
|
||||
end(eim);
|
||||
}
|
||||
}
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
function playerDead(eim, player) {}
|
||||
|
||||
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -171,7 +168,7 @@ function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
end(eim);
|
||||
}
|
||||
@@ -179,19 +176,9 @@ function playerDisconnected(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
|
||||
end(eim);
|
||||
}
|
||||
else
|
||||
playerLeft(eim, player);
|
||||
}
|
||||
function leftParty(eim, player) {}
|
||||
|
||||
function disbandParty(eim) {
|
||||
if (!eim.isEventCleared()) {
|
||||
end(eim);
|
||||
}
|
||||
}
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
@@ -213,6 +200,7 @@ function giveRandomEventReward(eim, player) {
|
||||
function clearPQ(eim) {
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
updateGateState(0);
|
||||
}
|
||||
|
||||
function isPapulatus(mob) {
|
||||
@@ -231,5 +219,14 @@ function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {}
|
||||
function updateGateState(newState) { // thanks Conrad for noticing missing gate update
|
||||
em.getChannelServer().getMapFactory().getMap(220080000).getReactorById(2208001).forceHitReactor(newState);
|
||||
em.getChannelServer().getMapFactory().getMap(220080000).getReactorById(2208002).forceHitReactor(newState);
|
||||
em.getChannelServer().getMapFactory().getMap(220080000).getReactorById(2208003).forceHitReactor(newState);
|
||||
}
|
||||
|
||||
function dispose(eim) {
|
||||
if (!eim.isEventCleared()) {
|
||||
updateGateState(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ function respawn(eim){}
|
||||
|
||||
function playerEntry(eim, player){
|
||||
var cave = eim.getMapInstance(eventMap);
|
||||
player.changeMap(cave);
|
||||
player.changeMap(cave, 1);
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim){
|
||||
|
||||
211
scripts/event/RescueGaga.js
Normal file
211
scripts/event/RescueGaga.js
Normal file
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* @author: kevintjuh93
|
||||
* @author: Ronan
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var isPq = true;
|
||||
var minPlayers = 1, maxPlayers = 1;
|
||||
var minLevel = 12, maxLevel = 255;
|
||||
var entryMap = 922240000;
|
||||
var exitMap = 922240200;
|
||||
var recruitMap = 922240200;
|
||||
|
||||
var minMapId = 922240000;
|
||||
var maxMapId = 922240100;
|
||||
|
||||
var eventTime = 3; // 3 minutes
|
||||
|
||||
var lobbyRange = [0, 19];
|
||||
|
||||
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;
|
||||
|
||||
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("RescueGaga_" + lobbyid);
|
||||
eim.setProperty("level", level);
|
||||
eim.setProperty("stage", "0");
|
||||
eim.setProperty("falls", "0");
|
||||
|
||||
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(entryMap);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
|
||||
player.announce(MaplePacketCreator.showEffect("event/space/start"));
|
||||
player.startMapEffect("Please rescue Gaga within the time limit.", 5120027);
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
}
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
if (mapid < minMapId || mapid > maxMapId) {
|
||||
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
player.changeMap(mapid, 0);
|
||||
player.cancelEffect(2360002);
|
||||
|
||||
end(eim);
|
||||
} else {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
player.changeMap(mapid, 0);
|
||||
player.cancelEffect(2360002);
|
||||
}
|
||||
} else if (mapid == maxMapId) {
|
||||
eim.clearPQ();
|
||||
|
||||
var rgaga = player.getEvents().get("rescueGaga");
|
||||
rgaga.complete();
|
||||
}
|
||||
}
|
||||
|
||||
function afterChangedMap(eim, player, mapid) {
|
||||
if (mapid == minMapId) {
|
||||
player.getAbstractPlayerInteraction().useItem(2360002);//HOORAY <3
|
||||
} else {
|
||||
player.cancelEffect(2360002);
|
||||
}
|
||||
}
|
||||
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
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) {}
|
||||
|
||||
function disbandParty(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) {
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
|
||||
eim.schedule("spawnGrandpaBunny", 10 * 1000);
|
||||
}
|
||||
|
||||
function spawnGrandpaBunny(eim) {
|
||||
eim.spawnNpc(9001105, new java.awt.Point(175, -20), eim.getInstanceMap(maxMapId));
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim) {}
|
||||
|
||||
function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {}
|
||||
@@ -63,7 +63,7 @@ function respawn(eim) {
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var amplifierMap = eim.getMapInstance(entryMap.getId());
|
||||
player.changeMap(amplifierMap);
|
||||
player.changeMap(amplifierMap, 1);
|
||||
eim.schedule("timeOut", timer);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ function respawn(eim) {
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
var amplifierMap = eim.getMapInstance(entryMap.getId());
|
||||
player.changeMap(amplifierMap);
|
||||
player.changeMap(amplifierMap, 1);
|
||||
eim.schedule("timeOut", timer);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,9 @@ function setEventRewards(eim) {
|
||||
eim.setEventClearStageMeso(mesoStages);
|
||||
}
|
||||
|
||||
function afterSetup(eim) {}
|
||||
function afterSetup(eim) {
|
||||
updateGateState(1);
|
||||
}
|
||||
|
||||
function setup(channel) {
|
||||
var eim = em.newInstance("Zakum" + channel);
|
||||
@@ -188,6 +190,7 @@ function giveRandomEventReward(eim, player) {
|
||||
function clearPQ(eim) {
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
updateGateState(0);
|
||||
}
|
||||
|
||||
function isZakum(mob) {
|
||||
@@ -209,4 +212,12 @@ function allMonstersDead(eim) {}
|
||||
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {}
|
||||
function updateGateState(newState) { // thanks Conrad for noticing missing gate update
|
||||
em.getChannelServer().getMapFactory().getMap(211042300).getReactorById(2118002).forceHitReactor(newState);
|
||||
}
|
||||
|
||||
function dispose(eim) {
|
||||
if (!eim.isEventCleared()) {
|
||||
updateGateState(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
function start(ms) {
|
||||
ms.getPlayer().resetEnteredScript();
|
||||
ms.getPlayer().getMap().addMapTimer(180);
|
||||
ms.getPlayer().resetEnteredScript();
|
||||
ms.spawnMonster(9300331, -28, 0);
|
||||
}
|
||||
@@ -21,5 +21,5 @@
|
||||
*/
|
||||
|
||||
function start(ms) {
|
||||
ms.getPlayer().updateQuestInfo(20010, "1");
|
||||
ms.setQuestProgress(20010, 20022, 1);
|
||||
}
|
||||
@@ -21,5 +21,5 @@
|
||||
*/
|
||||
|
||||
function start(ms) {
|
||||
ms.getPlayer().updateQuestInfo(20010, "1");
|
||||
ms.setQuestProgress(20010, 20022, 1);
|
||||
}
|
||||
@@ -5,11 +5,11 @@ function start(ms){
|
||||
var map = player.getMap();
|
||||
|
||||
if(player.isCygnus()) {
|
||||
if(ms.isQuestStarted(20730) && ms.getQuestProgress(20730, 9300285) == 0) {
|
||||
if(ms.isQuestStarted(20730) && ms.getQuestProgressInt(20730, 9300285) == 0) {
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300285), new java.awt.Point(680, 258));
|
||||
}
|
||||
} else {
|
||||
if(ms.isQuestStarted(21731) && ms.getQuestProgress(21731, 9300344) == 0) {
|
||||
if(ms.isQuestStarted(21731) && ms.getQuestProgressInt(21731, 9300344) == 0) {
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300344), new java.awt.Point(680, 258));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@
|
||||
*/
|
||||
|
||||
function start(ms) {
|
||||
ms.getPlayer().updateQuestInfo(21000, "1");
|
||||
ms.setQuestProgress(21000, 21002, 1);
|
||||
}
|
||||
@@ -4,7 +4,7 @@ function start(ms){
|
||||
var player = ms.getPlayer();
|
||||
var map = player.getMap();
|
||||
|
||||
if(ms.isQuestStarted(21747) && ms.getQuestProgress(21747, 9300351) == 0) {
|
||||
if(ms.isQuestStarted(21747) && ms.getQuestProgressInt(21747, 9300351) == 0) {
|
||||
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300351), new java.awt.Point(897, 51));
|
||||
}
|
||||
}
|
||||
25
scripts/map/onUserEnter/cygnusJobTutorial.js
Normal file
25
scripts/map/onUserEnter/cygnusJobTutorial.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
function start(ms) {
|
||||
ms.displayCygnusIntro();
|
||||
}
|
||||
@@ -19,23 +19,11 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
*@Author: kevintjuh93
|
||||
* Author: kevintjuh93
|
||||
*
|
||||
*/
|
||||
|
||||
importPackage(Packages.tools);
|
||||
var player;
|
||||
|
||||
function start(ms) {
|
||||
player = ms.getPlayer();
|
||||
player.resetEnteredScript();
|
||||
ms.getClient().announce(MaplePacketCreator.showEffect("event/space/start"));
|
||||
player.startMapEffect("Please rescue Gaga within the time limit.", 5120027);
|
||||
var map = player.getMap();
|
||||
if (map.getTimeLeft() > 0) {
|
||||
ms.getClient().announce(MaplePacketCreator.getClock(map.getTimeLeft()));
|
||||
} else {
|
||||
map.addMapTimer(180);
|
||||
}
|
||||
ms.useItem(2360002);//HOORAY <3
|
||||
}
|
||||
function start(ms) {
|
||||
ms.touchTheSky();
|
||||
}
|
||||
5
scripts/map/onUserEnter/startEreb.js
Normal file
5
scripts/map/onUserEnter/startEreb.js
Normal file
@@ -0,0 +1,5 @@
|
||||
function start(ms) {
|
||||
if (ms.getJobId() == 1000 && ms.getLevel() >= 10) {
|
||||
ms.unlockUI();
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 3;
|
||||
|
||||
function start() {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
@@ -93,7 +93,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -72,7 +72,10 @@ function action(mode, type, selection) {
|
||||
} else if (status == 2){
|
||||
cm.dispose();
|
||||
if (beauty == 1){
|
||||
if (cm.haveItem(5150001)){
|
||||
if (cm.haveItem(5420002)){ // thanks MedicOP for noticing uncoded functionality for Hair Membership coupons
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
} else if (cm.haveItem(5150001)){
|
||||
cm.gainItem(5150001, -1);
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
|
||||
@@ -35,7 +35,7 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 1;
|
||||
|
||||
function start() {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
@@ -94,7 +94,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -35,7 +35,7 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 2;
|
||||
|
||||
function start() {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
@@ -94,7 +94,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -9,6 +9,11 @@ var status;
|
||||
var mobId = 2220100; //Blue Mushroom
|
||||
|
||||
function start(){
|
||||
if (!cm.isQuestStarted(20718)) { // thanks Stray, Ari
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ spawnPnpcFee = 7000000;
|
||||
jobType = 4;
|
||||
|
||||
function start() {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
@@ -95,7 +95,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -66,7 +66,7 @@ function action(mode, type, selection) {
|
||||
ticketSelection = selection;
|
||||
if (ticketSelection > -1) {
|
||||
cm.gainItem(4031035 + ticketSelection, -1);
|
||||
cm.warp(103000897 + (ticketSelection * 3));
|
||||
cm.warp(103000897 + (ticketSelection * 3), "st00"); // thanks IxianMace for noticing a few scripts having misplaced warp SP's
|
||||
hasTicket = false;
|
||||
cm.dispose();
|
||||
return;
|
||||
|
||||
@@ -28,6 +28,6 @@ function start() {
|
||||
cm.gainItem(4031039,1);
|
||||
else
|
||||
cm.gainItem(4020000 + ((Math.random()*5)|0), 1);
|
||||
cm.warp(103000100);
|
||||
cm.warp(103000100, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -28,6 +28,6 @@ function start() {
|
||||
cm.gainItem(4031040,1);
|
||||
else
|
||||
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)],1);
|
||||
cm.warp(103000100);
|
||||
cm.warp(103000100, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -28,6 +28,6 @@ function start() {
|
||||
cm.gainItem(4031041,1);
|
||||
else
|
||||
cm.gainItem(prizes[parseInt(Math.random() * prizes.length)],1);
|
||||
cm.warp(103000100);
|
||||
cm.warp(103000100, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -53,7 +53,7 @@ function action(mode, type, selection) {
|
||||
cm.sendOk("Oh, you don't have the money, right? Sorry, I can't let you in.");
|
||||
} else {
|
||||
cm.gainMeso(-5000);
|
||||
cm.warp(193000000);
|
||||
cm.warp(193000000, "out00");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
|
||||
@@ -78,7 +78,10 @@ function action(mode, type, selection) {
|
||||
else if (status == 2){
|
||||
cm.dispose();
|
||||
if (beauty == 1){
|
||||
if (cm.haveItem(5150003)){
|
||||
if (cm.haveItem(5420003)){
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
} else if (cm.haveItem(5150003)){
|
||||
cm.gainItem(5150003, -1);
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
|
||||
@@ -65,8 +65,13 @@ function action(mode, type, selection) {
|
||||
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\r\n\#L3#I would like to see info about this expedition...#l");
|
||||
status = 1;
|
||||
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
|
||||
cm.sendSimple(list);
|
||||
status = 2;
|
||||
if (expedition.isInProgress()) {
|
||||
cm.sendOk("Your expedition is already in progress, for those who remain battling lets pray for those brave souls.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
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 it.");
|
||||
@@ -99,8 +104,11 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cm.createExpedition(exped)) {
|
||||
var res = cm.createExpedition(exped);
|
||||
if (res == 0) {
|
||||
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!");
|
||||
} else if (res > 0) {
|
||||
cm.sendOk("Sorry, you've already reached the quota of attempts for this expedition! Try again another day...");
|
||||
} else {
|
||||
cm.sendOk("An unexpected error has occurred when starting the expedition, please try again later.");
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else if(status == 1){
|
||||
if(cm.getEventInstance().isEventCleared()) {
|
||||
cm.warp(cm.getMapId() == 105100300 ? 105100301 : 105100401);
|
||||
cm.warp(cm.getMapId() == 105100300 ? 105100301 : 105100401, 0);
|
||||
} else {
|
||||
cm.warp(105100100);
|
||||
}
|
||||
|
||||
@@ -21,12 +21,15 @@
|
||||
*/
|
||||
var status = -1;
|
||||
|
||||
/*
|
||||
Custom Quest 100300
|
||||
*/
|
||||
function activateShamanRock(slot,progress) {
|
||||
var active = (progress >> slot) % 2;
|
||||
if(!active) {
|
||||
progress |= (1 << slot);
|
||||
var ch = progress[slot];
|
||||
if(ch == '0') {
|
||||
var nextProgress = progress.substr(0, slot) + '1' + progress.substr(slot + 1);
|
||||
|
||||
cm.updateQuest(2236, progress);
|
||||
cm.setQuestProgress(2236, nextProgress);
|
||||
cm.gainItem(4032263, -1);
|
||||
cm.sendOk("The seal took it's place, repelling the evil in the area.");
|
||||
return 1;
|
||||
@@ -45,7 +48,11 @@ function start() {
|
||||
else if(map == 105070000) activateShamanRock(2,progress);
|
||||
|
||||
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
|
||||
if(!activateShamanRock(3,progress)) {
|
||||
var npcOid = cm.getQuestProgressInt(100300, 1);
|
||||
if (npcOid == 0) {
|
||||
activateShamanRock(3,progress);
|
||||
cm.setQuestProgress(100300, 1, cm.getNpcObjectId());
|
||||
} else if (cm.getNpcObjectId() != npcOid) {
|
||||
activateShamanRock(4,progress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,15 @@
|
||||
*/
|
||||
var status = -1;
|
||||
|
||||
/*
|
||||
Custom Quest 100300
|
||||
*/
|
||||
function activateShamanRock(slot,progress) {
|
||||
var active = (progress >> slot) % 2;
|
||||
if(!active) {
|
||||
progress |= (1 << slot);
|
||||
var ch = progress[slot];
|
||||
if(ch == '0') {
|
||||
var nextProgress = progress.substr(0, slot) + '1' + progress.substr(slot + 1);
|
||||
|
||||
cm.updateQuest(2236, progress);
|
||||
cm.setQuestProgress(2236, nextProgress);
|
||||
cm.gainItem(4032263, -1);
|
||||
cm.sendOk("The seal took it's place, repelling the evil in the area.");
|
||||
return 1;
|
||||
@@ -45,7 +48,11 @@ function start() {
|
||||
else if(map == 105070000) activateShamanRock(2,progress);
|
||||
|
||||
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
|
||||
if(!activateShamanRock(3,progress)) {
|
||||
var npcOid = cm.getQuestProgressInt(100300, 1);
|
||||
if (npcOid == 0) {
|
||||
activateShamanRock(3,progress);
|
||||
cm.setQuestProgress(100300, 1, cm.getNpcObjectId());
|
||||
} else if (cm.getNpcObjectId() != npcOid) {
|
||||
activateShamanRock(4,progress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ function action(mode, type, selection) {
|
||||
cm.gainItem(4031010, -1);
|
||||
cm.sendOk("You will have to collect me #b30 #t4031013##k. Good luck.")
|
||||
} else if (status == 4) {
|
||||
cm.warp(108000100);
|
||||
cm.warp(108000100, 0);
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -5,36 +5,52 @@
|
||||
**/
|
||||
|
||||
var status;
|
||||
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1,0,0);
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode,type,selection) {
|
||||
if (status == -1) {
|
||||
if (cm.getMapId() == 108000502) {
|
||||
if (!(cm.haveItem(4031856,15))) {
|
||||
cm.sendNext("Go, and get me 15 #b#t4031856##k.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
status = 2;
|
||||
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 #b#t4031857##k.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
status = 2;
|
||||
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.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (status == 2) {
|
||||
cm.warp(120000101,0);
|
||||
cm.dispose();
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && type > 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if (cm.getMapId() == 108000502) {
|
||||
if (!(cm.haveItem(4031856,15))) {
|
||||
cm.sendSimple("You haven't brought me all the crystals yet. I'm looking forward for your progress, mate! \r\n#b#L1#I would like to leave#l");
|
||||
} else {
|
||||
status++;
|
||||
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.sendSimple("You haven't brought me all the crystals yet. I'm looking forward for your progress, mate! \r\n#b#L1#I would like to leave#l");
|
||||
} else {
|
||||
status++;
|
||||
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.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (status == 1) { // thanks Lame for noticing players getting stuck in area in certain scenarios
|
||||
cm.removeAll(4031856);
|
||||
cm.removeAll(4031857);
|
||||
cm.warp(120000101,0);
|
||||
cm.dispose();
|
||||
} else if (status == 2) {
|
||||
cm.warp(120000101,0);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,7 @@ function start() {
|
||||
if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Jade™
|
||||
advQuest = 5; // string visibility thanks to iPunchEm & Glvelturall
|
||||
cm.sendNext("Not bad at all. Let's discuss this outside!");
|
||||
cm.setQuestProgress(6330, 0, 1);
|
||||
} else if (cm.getQuestProgress(6330, 0) == 0) {
|
||||
} else if (cm.getQuestProgressInt(6330, 6331) == 0) {
|
||||
advQuest = 1;
|
||||
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
|
||||
} else {
|
||||
@@ -54,8 +53,7 @@ function start() {
|
||||
if (cm.getEventInstance() != null) {
|
||||
advQuest = 6;
|
||||
cm.sendNext("Not bad at all. Let's discuss this outside!");
|
||||
cm.setQuestProgress(6370, 0, 1);
|
||||
} else if (cm.getQuestProgress(6370, 0) == 0) {
|
||||
} else if (cm.getQuestProgressInt(6370, 6371) == 0) {
|
||||
advQuest = 2;
|
||||
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
|
||||
} else {
|
||||
@@ -65,7 +63,7 @@ function start() {
|
||||
|
||||
cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Battleship\".\r\n\r\n #s5221006# #b#q5221006##k");
|
||||
}
|
||||
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
@@ -126,6 +124,12 @@ function action(mode, type, selection) {
|
||||
cm.sendOk("Unlike most of the other skills you used as a Pirate, this one definitely is different. You can actually ride the 'Battleship' and attack enemies with it. Your DEF level will increase for the time you're on board, so that'll help you tremendously in combat situations. May you become the best Gunslinger out there...");
|
||||
}
|
||||
} else {
|
||||
if (advQuest < 6) {
|
||||
cm.setQuestProgress(6330, 6331, 2);
|
||||
} else {
|
||||
cm.setQuestProgress(6370, 6371, 2);
|
||||
}
|
||||
|
||||
cm.warp(120000101);
|
||||
}
|
||||
|
||||
@@ -138,7 +142,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
@@ -222,7 +226,7 @@ function action(mode, type, selection) {
|
||||
cm.sendOk("All the training maps are currently in use. Please try again later.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.warp(map);
|
||||
cm.warp(map, 0);
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ function action(mode, type, selection) {
|
||||
cm.sendOk("Who are you talking to me? If you're just bored, go bother somebody else.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
seagullProgress = cm.getQuestProgress(6400, 0);
|
||||
seagullProgress = cm.getQuestProgressInt(6400, 1);
|
||||
|
||||
if (seagullProgress == 0) {
|
||||
seagullIdx = Math.floor(Math.random() * seagullQuestion.length);
|
||||
@@ -90,7 +90,7 @@ function action(mode, type, selection) {
|
||||
var answer = cm.getText();
|
||||
if (answer == seagullAnswer[seagullIdx]) {
|
||||
cm.sendNext("What! I can't believe how incredibly smart you are! Incredible! In the seagull world, that kind of intellingence would give you a Ph.D. and then some. You're really amazing... I can't believe it... I simply can't believe it!");
|
||||
cm.setQuestProgress(6400, 0, 1);
|
||||
cm.setQuestProgress(6400, 1, 1);
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendOk("Hmm, that's not quite how I recall it. Try again!");
|
||||
@@ -99,9 +99,11 @@ function action(mode, type, selection) {
|
||||
} else if (seagullProgress != 2) {
|
||||
cm.sendNextPrev("Anyway, only one of 9 Barts is the real Bart. You know that Pirates are known for the strength of their friendships and camaraderie with their fellow pirates. If you're a true pirate, you should be able to find your own mate with ease. Alright then, I'll send you to the room where Bart is.");
|
||||
} else {
|
||||
cm.gainExp(1000000);
|
||||
cm.teachSkill(5221003, 0, 10, -1);
|
||||
cm.forceCompleteQuest(6400);
|
||||
//cm.gainExp(1000000);
|
||||
//cm.teachSkill(5221003, 0, 10, -1);
|
||||
//cm.forceCompleteQuest(6400);
|
||||
|
||||
cm.sendNextPrev("You have met all my challenges, and passed! Good job!");
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (status == 3) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
function start() {
|
||||
if(cm.getQuestProgress(2180, 0) == 1) {
|
||||
if(cm.getQuestProgressInt(2180, 1) == 1) {
|
||||
cm.sendNext("You have taken milk from this cow recently, check another cow.");
|
||||
cm.dispose();
|
||||
return;
|
||||
@@ -32,19 +32,19 @@ function start() {
|
||||
cm.gainItem(4031847, -1);
|
||||
cm.gainItem(4031848, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 1);
|
||||
cm.setQuestProgress(2180, 1, 1);
|
||||
} else if (cm.canHold(4031849, 1) && cm.haveItem(4031848)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
|
||||
cm.gainItem(4031848, -1);
|
||||
cm.gainItem(4031849, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 1);
|
||||
cm.setQuestProgress(2180, 1, 1);
|
||||
} else if (cm.canHold(4031850) && cm.haveItem(4031849)) {
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
|
||||
cm.gainItem(4031849, -1);
|
||||
cm.gainItem(4031850, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 1);
|
||||
cm.setQuestProgress(2180, 1, 1);
|
||||
} else {
|
||||
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
function start() {
|
||||
if(cm.getQuestProgress(2180, 0) == 2) {
|
||||
if(cm.getQuestProgressInt(2180, 1) == 2) {
|
||||
cm.sendNext("You have taken milk from this cow recently, check another cow.");
|
||||
cm.dispose();
|
||||
return;
|
||||
@@ -32,19 +32,19 @@ function start() {
|
||||
cm.gainItem(4031847, -1);
|
||||
cm.gainItem(4031848, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 2);
|
||||
cm.setQuestProgress(2180, 1, 2);
|
||||
} else if(cm.canHold(4031849) && cm.haveItem(4031848)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
|
||||
cm.gainItem(4031848, -1);
|
||||
cm.gainItem(4031849, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 2);
|
||||
cm.setQuestProgress(2180, 1, 2);
|
||||
} else if(cm.canHold(4031850) && cm.haveItem(4031849)){
|
||||
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
|
||||
cm.gainItem(4031849, -1);
|
||||
cm.gainItem(4031850, 1);
|
||||
|
||||
cm.setQuestProgress(2180, 0, 2);
|
||||
cm.setQuestProgress(2180, 1, 2);
|
||||
} else {
|
||||
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("All right! Let's go!");
|
||||
} else if (status == 1) {
|
||||
cm.removeNPC(579711);
|
||||
cm.removeNPC2(579711);
|
||||
cm.updateInfo("fire", "0");
|
||||
cm.playSound("cannonshooter/fire");
|
||||
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying/0", 7000, 0, 0, -1, -1);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Map(s): Erev
|
||||
Description: 3rd job KoC Buff
|
||||
*/
|
||||
importPackage(Packages.constants);
|
||||
importPackage(Packages.constants.game);
|
||||
|
||||
function start() {
|
||||
if (cm.getPlayer().isCygnus() && GameConstants.getJobBranch(cm.getJob()) > 2) {
|
||||
|
||||
@@ -33,7 +33,7 @@ var maxJobType = 15;
|
||||
|
||||
function start() {
|
||||
var jobType = parseInt(cm.getJobId() / 100);
|
||||
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
@@ -64,7 +64,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -39,7 +39,7 @@ function action(mode, type, selection) {
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
if (!(cm.isQuestCompleted(20407) || cm.isQuestStarted(20407) && cm.getQuestProgress(20407, 9001010) != 0) && cm.getMap().countMonster(9001010) == 0 && cm.getMap().getNPCById(1104002) == null) {
|
||||
if (!(cm.isQuestCompleted(20407) || cm.isQuestStarted(20407) && cm.getQuestProgressInt(20407, 9001010) != 0) && cm.getMap().countMonster(9001010) == 0 && cm.getMap().getNPCById(1104002) == null) {
|
||||
cm.sendOk("... Hnngh... #b#h0##k, is that you...? #r#p1104002##k... She's already here... #b#h0##k, I'm truly sorry I can't help you right now in this state, just when a bigger threat appeared I could do nothing for my people.... Please I beg you, please defeat her, #b#h0##k!! ....");
|
||||
cm.spawnNpc(1104002, new java.awt.Point(850, 0), cm.getMap());
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,7 @@ var spawnPnpcFee = 7000000;
|
||||
var jobType = 21;
|
||||
|
||||
function start() {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
|
||||
spawnPnpc = true;
|
||||
|
||||
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
|
||||
@@ -36,7 +36,7 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
|
||||
cm.sendOk("There you go! Hope you will like it.");
|
||||
cm.gainMeso(-spawnPnpcFee);
|
||||
} else {
|
||||
|
||||
@@ -46,7 +46,7 @@ function action(mode, type, selection) {
|
||||
} else if (status == 2) {
|
||||
cm.sendNext("The other heroes? They've left to fight the Black Mage. They're buying us time to escape. What? You want to fight with them? No! You can't! You're hurt. You must leave with us!");
|
||||
} else if (status == 3) {
|
||||
cm.updateQuest(21002, "1");
|
||||
//cm.setQuestProgress(21002, 1);
|
||||
cm.showIntro("Effect/Direction1.img/aranTutorial/Trio");
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ function action(mode, type, selection){
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var questProgress = cm.getQuestProgress(2330, 3300005) + cm.getQuestProgress(2330, 3300006) + cm.getQuestProgress(2330, 3300007); //3 Yetis
|
||||
var questProgress = cm.getQuestProgressInt(2330, 3300005) + cm.getQuestProgressInt(2330, 3300006) + cm.getQuestProgressInt(2330, 3300007); //3 Yetis
|
||||
if (!(cm.isQuestStarted(2330) && questProgress < 3)) { // thanks Vcoc for finding an exploit with boss entry through NPC
|
||||
cm.dispose();
|
||||
return;
|
||||
|
||||
@@ -83,7 +83,10 @@ function action(mode, type, selection) {
|
||||
else if (status == 2){
|
||||
cm.dispose();
|
||||
if (beauty == 1){
|
||||
if (cm.haveItem(5150005) == true){
|
||||
if (cm.haveItem(5420004)){
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
} else if (cm.haveItem(5150005) == true){
|
||||
cm.gainItem(5150005, -1);
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
|
||||
@@ -57,8 +57,10 @@ function action(mode, type, selection) {
|
||||
if (cm.getPlayer().getGuildId() < 1 || cm.getPlayer().getGuildRank() != 1) {
|
||||
cm.sendOk("You can only increase your Guild's capacity if you are the leader.");
|
||||
cm.dispose();
|
||||
} else
|
||||
cm.sendYesNo("Increasing your Guild capacity by #b5#k costs #b " + cm.getPlayer().getGuild().getIncreaseGuildCost(cm.getPlayer().getGuild().getCapacity()) +" mesos#k, are you sure you want to continue?");
|
||||
} else {
|
||||
var MapleGuild = Java.type("net.server.guild.MapleGuild"); // thanks Conrad for noticing an issue due to call on a static method here
|
||||
cm.sendYesNo("Increasing your Guild capacity by #b5#k costs #b " + MapleGuild.getIncreaseGuildCost(cm.getPlayer().getGuild().getCapacity()) +" mesos#k, are you sure you want to continue?");
|
||||
}
|
||||
}
|
||||
} else if (status == 2) {
|
||||
if (sel == 0 && cm.getPlayer().getGuildId() <= 0) {
|
||||
|
||||
@@ -22,14 +22,12 @@
|
||||
var status;
|
||||
var choice;
|
||||
var guildName;
|
||||
var partymembers;
|
||||
|
||||
var allianceCost = 2000000;
|
||||
var increaseCost = 1000000;
|
||||
var allianceLimit = 5;
|
||||
|
||||
function start() {
|
||||
partymembers = cm.getPartyMembers();
|
||||
status = -1;
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ function action(mode, type, selection) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
var idx = -1 * cm.getQuestProgressInt(3114); // infoEx without infoNumber, must use one progress only, critical hit!
|
||||
|
||||
if(idx != -1) {
|
||||
if(idx > -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
cm.setQuestProgress(3114, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
cm.setQuestProgress(3114, 42);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
cm.setQuestProgress(3114, -1 * (idx + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ function action(mode, type, selection) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||
|
||||
if(idx != -1) {
|
||||
if(idx > -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
cm.setQuestProgress(3114, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
cm.setQuestProgress(3114, 42);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
cm.setQuestProgress(3114, -1 * (idx + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ function action(mode, type, selection) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||
|
||||
if(idx != -1) {
|
||||
if(idx > -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
cm.setQuestProgress(3114, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
cm.setQuestProgress(3114, 42);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
cm.setQuestProgress(3114, -1 * (idx + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ function action(mode, type, selection) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||
|
||||
if(idx != -1) {
|
||||
if(idx > -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
cm.setQuestProgress(3114, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
cm.setQuestProgress(3114, 42);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
cm.setQuestProgress(3114, -1 * (idx + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ function action(mode, type, selection) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||
|
||||
if(idx != -1) {
|
||||
if(idx > -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
cm.setQuestProgress(3114, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
cm.setQuestProgress(3114, 42);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
cm.setQuestProgress(3114, -1 * (idx + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ function action(mode, type, selection) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||
|
||||
if(idx != -1) {
|
||||
if(idx > -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
cm.setQuestProgress(3114, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
cm.setQuestProgress(3114, 42);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
cm.setQuestProgress(3114, -1 * (idx + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ function action(mode, type, selection) {
|
||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||
|
||||
if(cm.isQuestStarted(3114)) {
|
||||
var idx = cm.getQuestProgress(3114, 7777);
|
||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||
|
||||
if(idx != -1) {
|
||||
if(idx > -1) {
|
||||
var nextNote = harpSong[idx];
|
||||
|
||||
if(harpNote != nextNote) {
|
||||
cm.setQuestProgress(3114, 7777, 0);
|
||||
cm.setQuestProgress(3114, 0);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||||
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
|
||||
|
||||
if(idx == 45) { // finished lullaby
|
||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||
cm.setQuestProgress(3114, 7777, -1);
|
||||
cm.setQuestProgress(3114, 42);
|
||||
|
||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||||
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
|
||||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||||
cm.setQuestProgress(3114, -1 * (idx + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ function action(mode, type, selection) {
|
||||
if(cm.getMap().countMonsters() > 0) {
|
||||
cm.sendNext("This is the hidden room of the tower. After eliminating all monsters on this room, talk to me to gain access to the treasure room, leaving the center tower access behind.");
|
||||
} else {
|
||||
cm.warp(920011100);
|
||||
cm.warp(920011100, "st00");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ function action(mode, type, selection){
|
||||
if (cm.getPlayer().getLevel() >= 50){
|
||||
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
|
||||
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
|
||||
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
}else
|
||||
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
|
||||
cm.dispose();
|
||||
|
||||
@@ -114,7 +114,7 @@ function action(mode, type, selection){
|
||||
if (cm.getPlayer().getLevel() >= 50){
|
||||
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
|
||||
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
|
||||
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
}else
|
||||
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
|
||||
cm.dispose();
|
||||
|
||||
@@ -115,7 +115,7 @@ function action(mode, type, selection){
|
||||
if (cm.getPlayer().getLevel() >= 50){
|
||||
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
|
||||
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
|
||||
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
}else
|
||||
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
|
||||
cm.dispose();
|
||||
|
||||
@@ -114,7 +114,7 @@ function action(mode, type, selection){
|
||||
if (cm.getPlayer().getLevel() >= 50){
|
||||
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
|
||||
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
|
||||
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
}else
|
||||
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
|
||||
cm.dispose();
|
||||
|
||||
@@ -113,7 +113,7 @@ function action(mode, type, selection){
|
||||
if (cm.getPlayer().getLevel() >= 50){
|
||||
cm.sendOk("The Chief's Residence Council grants you #bconcession#k to make part of the #rcounteroffensive team against Zakum#k. Good luck on your journey ahead.");
|
||||
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) cm.startQuest(100200);
|
||||
if(Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
if(Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS && !cm.isQuestCompleted(100201)) cm.completeQuest(100201);
|
||||
}else
|
||||
cm.sendOk("You're way too weak to make part of the #rcounteroffensive team against Zakum#k. Reach at least #blevel 50#k, then talk to me.");
|
||||
cm.dispose();
|
||||
|
||||
@@ -33,7 +33,7 @@ var status = 0;
|
||||
|
||||
function start() {
|
||||
if(cm.haveItem(4031450, 1)) {
|
||||
cm.warp(921100100);
|
||||
cm.warp(921100100, 1);
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,8 +66,13 @@ function action(mode, type, selection) {
|
||||
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;
|
||||
if (expedition.isInProgress()) { // thanks Conrad for noticing exped leaders being able to still manage in-progress expeds
|
||||
cm.sendOk("Your expedition is already in progress, for those who remain battling lets pray for those brave souls.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
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 it.");
|
||||
@@ -106,8 +111,11 @@ function action(mode, type, selection) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cm.createExpedition(exped)) {
|
||||
var res = cm.createExpedition(exped);
|
||||
if (res == 0) {
|
||||
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!");
|
||||
} else if (res > 0) {
|
||||
cm.sendOk("Sorry, you've already reached the quota of attempts for this expedition! Try again another day...");
|
||||
} else {
|
||||
cm.sendOk("An unexpected error has occurred when starting the expedition, please try again later.");
|
||||
}
|
||||
|
||||
@@ -172,19 +172,7 @@ function action(mode, type, selection) {
|
||||
matQty = matQtySet[selectedItem];
|
||||
cost = costSet[selectedItem];
|
||||
}
|
||||
|
||||
if (selectedType == 5){ //arrow refine
|
||||
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
|
||||
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
|
||||
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
|
||||
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
|
||||
var costSet = new Array (0,0,0,0,0,0);
|
||||
item = itemSet[selectedItem];
|
||||
mats = matSet[selectedItem];
|
||||
matQty = matQtySet[selectedItem];
|
||||
cost = costSet[selectedItem];
|
||||
}
|
||||
|
||||
|
||||
var prompt = "So, you want me to make some #t" + item + "#s? In that case, how many do you want me to make?";
|
||||
|
||||
cm.sendGetNumber(prompt,1,1,100)
|
||||
@@ -197,6 +185,19 @@ function action(mode, type, selection) {
|
||||
}
|
||||
else
|
||||
qty = (selection > 0) ? selection : (selection < 0 ? -selection : 1);
|
||||
|
||||
// thanks kvmba for noticing arrow selection crashing players
|
||||
if (selectedType == 5){ //arrow refine
|
||||
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
|
||||
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
|
||||
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
|
||||
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
|
||||
var costSet = new Array (0,0,0,0,0,0);
|
||||
item = itemSet[selectedItem];
|
||||
mats = matSet[selectedItem];
|
||||
matQty = matQtySet[selectedItem];
|
||||
cost = costSet[selectedItem];
|
||||
}
|
||||
|
||||
var prompt = "You want me to make ";
|
||||
if (qty == 1)
|
||||
|
||||
@@ -54,7 +54,7 @@ function action(mode, type, selection) {
|
||||
cm.sendYesNo("Would you like to leave the bonus stage?");
|
||||
}
|
||||
else {
|
||||
cm.warp(922011100);
|
||||
cm.warp(922011100, "st00");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,10 @@ function action(mode, type, selection) {
|
||||
else if (status == 2){
|
||||
cm.dispose();
|
||||
if (beauty == 1){
|
||||
if (cm.haveItem(5150007) == true){
|
||||
if (cm.haveItem(5420005)){
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
} else if (cm.haveItem(5150007) == true){
|
||||
cm.gainItem(5150007, -1);
|
||||
cm.setHair(hairnew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved hairstyle!");
|
||||
|
||||
@@ -30,8 +30,8 @@ var feeMultiplier = 7.0;
|
||||
function start() {
|
||||
status = -1;
|
||||
|
||||
if (!Packages.constants.ServerConstants.USE_CPQ) {
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
status = 0;
|
||||
action(1, 0, 4);
|
||||
} else {
|
||||
@@ -221,9 +221,9 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else {
|
||||
var party = cm.getParty().getMembers();
|
||||
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
|
||||
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
|
||||
cm.sendOk("You need at least 2 players to participate in the battle!");
|
||||
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
|
||||
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
|
||||
cm.sendOk("You need at least 3 players to participate in the battle!");
|
||||
} else {
|
||||
cm.cpqLobby(selection);
|
||||
@@ -236,7 +236,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
if (status == 0) {
|
||||
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
talk += "\r\n#L4# ... Can I just refine my ores?#l";
|
||||
}
|
||||
cm.sendSimple(talk);
|
||||
@@ -437,7 +437,7 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("Oh, and do not worry about turning into a ghost. In the Monster Carnival, #byou will not lose EXP after death#k. So it's really an experience like no other!");
|
||||
cm.dispose();
|
||||
} else if (select == 2) {
|
||||
cm.sendNext("#bProtetor#k basically an invoked item that drastically increases the abilities of the monsters invoked by your group. Protector works until it is demolished by the opposing group, so I'm hoping you'll summon several monsters first, and then bring the Protector.");
|
||||
cm.sendNext("#bProtector#k is basically an invoked item that drastically increases the abilities of the monsters invoked by your group. Protector works until it is demolished by the opposing group, so I'm hoping you'll summon several monsters first, and then bring the Protector.");
|
||||
}
|
||||
} else if (status == 66) {
|
||||
cm.sendNext("Lastly, while in the Monster Carnival, #byou can not use items / recovery potions that you carry around with you. #kMeanwhile, the monsters let these items fall for good. when, and when you #bget them, the item will immediately activate#k. That's why it's important to know when to get these items.");
|
||||
|
||||
@@ -29,8 +29,8 @@ var feeMultiplier = 7.0;
|
||||
function start() {
|
||||
status = -1;
|
||||
|
||||
if (!Packages.constants.ServerConstants.USE_CPQ) {
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
status = 0;
|
||||
action(1, 0, 4);
|
||||
} else {
|
||||
@@ -220,9 +220,9 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else {
|
||||
var party = cm.getParty().getMembers();
|
||||
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
|
||||
if ((selection >= 0 && selection <= 3) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
|
||||
cm.sendOk("You need at least 2 players to participate in the battle!");
|
||||
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
|
||||
} else if ((selection >= 4 && selection <= 5) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
|
||||
cm.sendOk("You need at least 3 players to participate in the battle!");
|
||||
} else {
|
||||
cm.cpqLobby(selection);
|
||||
@@ -235,7 +235,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
if (status == 0) {
|
||||
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
talk += "\r\n#L4# ... Can I just refine my ores?#l";
|
||||
}
|
||||
cm.sendSimple(talk);
|
||||
|
||||
@@ -29,8 +29,8 @@ var feeMultiplier = 7.0;
|
||||
function start() {
|
||||
status = -1;
|
||||
|
||||
if (!Packages.constants.ServerConstants.USE_CPQ) {
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
if (!Packages.config.YamlConfig.config.server.USE_CPQ) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
status = 0;
|
||||
action(1, 0, 4);
|
||||
} else {
|
||||
@@ -235,7 +235,7 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
if (status == 0) {
|
||||
var talk = "What would you like to do? If you have never participate in the Monster Carnival, you will need to know a few things before participating! \r\n#b#L0# Go to the Monster Carnival 1.#l \r\n#L3# Go to the Monster Carnival 2.#l \r\n#L1# Learn about the Monster Carnival.#l\r\n#L2# Trade #t4001129#.#l";
|
||||
if (Packages.constants.ServerConstants.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
if (Packages.config.YamlConfig.config.server.USE_ENABLE_CUSTOM_NPC_SCRIPT) {
|
||||
talk += "\r\n#L4# ... Can I just refine my ores?#l";
|
||||
}
|
||||
cm.sendSimple(talk);
|
||||
|
||||
@@ -77,9 +77,9 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else {
|
||||
var party = cm.getParty().getMembers();
|
||||
if ((selection === 0 || selection === 1 ) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
|
||||
if ((selection === 0 || selection === 1 ) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
|
||||
cm.sendOk("You need at least 2 players to participate in the battle!");
|
||||
} else if ((selection === 2 ) && party.size() < (Packages.constants.ServerConstants.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
|
||||
} else if ((selection === 2 ) && party.size() < (Packages.config.YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
|
||||
cm.sendOk("You need at least 3 players to participate in the battle!");
|
||||
} else {
|
||||
cm.cpqLobby2(selection);
|
||||
|
||||
@@ -45,13 +45,13 @@ function action(mode, type, selection) {
|
||||
if(cm.isQuestStarted(3421)) {
|
||||
var meteoriteId = cm.getNpc() - 2050014;
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
var progress = cm.getQuestProgressInt(3421, 1);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
cm.setQuestProgress(3421, 1, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ function action(mode, type, selection) {
|
||||
if(cm.isQuestStarted(3421)) {
|
||||
var meteoriteId = cm.getNpc() - 2050014;
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
var progress = cm.getQuestProgressInt(3421, 1);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
cm.setQuestProgress(3421, 1, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ function action(mode, type, selection) {
|
||||
if(cm.isQuestStarted(3421)) {
|
||||
var meteoriteId = cm.getNpc() - 2050014;
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
var progress = cm.getQuestProgressInt(3421, 1);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
cm.setQuestProgress(3421, 1, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ function action(mode, type, selection) {
|
||||
if(cm.isQuestStarted(3421)) {
|
||||
var meteoriteId = cm.getNpc() - 2050014;
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
var progress = cm.getQuestProgressInt(3421, 1);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
cm.setQuestProgress(3421, 1, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ function action(mode, type, selection) {
|
||||
if(cm.isQuestStarted(3421)) {
|
||||
var meteoriteId = cm.getNpc() - 2050014;
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
var progress = cm.getQuestProgressInt(3421, 1);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
cm.setQuestProgress(3421, 1, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ function action(mode, type, selection) {
|
||||
if(cm.isQuestStarted(3421)) {
|
||||
var meteoriteId = cm.getNpc() - 2050014;
|
||||
|
||||
var progress = cm.getQuestProgress(3421, 0);
|
||||
var progress = cm.getQuestProgressInt(3421, 1);
|
||||
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
|
||||
if (cm.canHold(4031117, 1)) {
|
||||
progress |= (1 << meteoriteId);
|
||||
|
||||
cm.gainItem(4031117, 1);
|
||||
cm.setQuestProgress(3421, 0, progress);
|
||||
cm.setQuestProgress(3421, 1, progress);
|
||||
} else {
|
||||
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
|
||||
}
|
||||
|
||||
@@ -32,12 +32,19 @@ function start() {
|
||||
cm.sendOk("Thanks for saving the pork.");
|
||||
}
|
||||
else if(cm.isQuestStarted(6002)) {
|
||||
var em = cm.getEventManager("3rdJob_mount");
|
||||
if (em == null)
|
||||
cm.sendOk("Sorry, but 3rd job advancement (mount) is closed.");
|
||||
else {
|
||||
if (!em.startInstance(cm.getPlayer())) {
|
||||
cm.sendOk("There is currently someone in this map, come back later.");
|
||||
if (cm.haveItem(4031507, 5) && cm.haveItem(4031508,5)) {
|
||||
cm.sendOk("Thanks for saving the pork.");
|
||||
} else {
|
||||
var em = cm.getEventManager("3rdJob_mount");
|
||||
if (em == null)
|
||||
cm.sendOk("Sorry, but 3rd job advancement (mount) is closed.");
|
||||
else {
|
||||
if (em.startInstance(cm.getPlayer())) {
|
||||
cm.removeAll(4031507);
|
||||
cm.removeAll(4031508);
|
||||
} else {
|
||||
cm.sendOk("There is currently someone in this map, come back later.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user