Reworked Singapore/Malaysia + warp fix
Reworked many aspects of the Malaysia/Singapore region (added DB data, enabled Latanica & Scarga expedition, fixed maps). Fixed some issues related with player warping.
This commit is contained in:
@@ -36,7 +36,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -38,7 +38,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
63
scripts/portal/MD_high.js
Normal file
63
scripts/portal/MD_high.js
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
MiniDungeon - Longest Ride on ByeBye Station
|
||||
*/
|
||||
|
||||
var baseid = 551030000;
|
||||
var dungeonid = 551030001;
|
||||
var dungeons = 19;
|
||||
|
||||
function enter(pi) {
|
||||
if (pi.getMapId() == baseid) {
|
||||
if (pi.getPlayer().getFame() < 10) {
|
||||
pi.playerMessage(5, "You need 10 Fame to enter.");
|
||||
return;
|
||||
}
|
||||
if (pi.getParty() != null) {
|
||||
if (pi.isLeader()) {
|
||||
for (var i = 0; i < dungeons; i++) {
|
||||
if (pi.getPlayerCount(dungeonid + i) == 0) {
|
||||
pi.warpParty(dungeonid + i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < dungeons; i++) {
|
||||
if (pi.getPlayerCount(dungeonid + i) == 0) {
|
||||
pi.warp(dungeonid + i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
pi.playerMessage(5, "All of the Mini-Dungeons are in use right now, please try again later.");
|
||||
return false;
|
||||
} else {
|
||||
pi.playPortalSound();
|
||||
pi.warp(baseid, "MD00");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -38,7 +38,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.playerMessage(5, "You are not the leader of the party.");
|
||||
pi.playerMessage(5, "Only solo or party leaders are supposed to enter the Mini-Dungeon.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,36 +1,32 @@
|
||||
//importPackage(server.maps);
|
||||
//importPackage(net.channel);
|
||||
//importPackage(tools);
|
||||
//
|
||||
//function enter(pi) {
|
||||
// var mapid = 541010100;
|
||||
// var map = ChannelServer.getInstance(pi.getPlayer().getClient().getChannel()).getMapFactory().getMap(mapid);
|
||||
// var mapchars = map.getCharacters();
|
||||
// if (mapchars.isEmpty()) {
|
||||
// var mapobjects = map.getMapObjects();
|
||||
// var iter = mapobjects.iterator();
|
||||
// while (iter.hasNext()) {
|
||||
// o = iter.next();
|
||||
// if (o.getType() == MapleMapObjectType.MONSTER){
|
||||
// map.removeMapObject(o);
|
||||
// }
|
||||
// }
|
||||
// map.resetReactors();
|
||||
// } else {
|
||||
// var mapobjects = map.getMapObjects();
|
||||
// var boss = null;
|
||||
// var iter = mapobjects.iterator();
|
||||
// while (iter.hasNext()) {
|
||||
// o = iter.next();
|
||||
// if (o.getType() == MapleMapObjectType.MONSTER){
|
||||
// boss = o;
|
||||
// }
|
||||
// }
|
||||
// if (boss != null) {
|
||||
// pi.getPlayer().dropMessage(5, "The battle against the boss has already begun, so you may not enter this place.");
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// pi.warp(541010100, "sp");
|
||||
// return true;
|
||||
//}
|
||||
/* By RonanLana */
|
||||
|
||||
function enter(pi) {
|
||||
if (!pi.haveItem(4000381)) {
|
||||
pi.playerMessage(5, "You do not have White Essence.");
|
||||
return false;
|
||||
} else {
|
||||
var em = pi.getEventManager("LatanicaBattle");
|
||||
|
||||
if (pi.getParty() == null) {
|
||||
pi.playerMessage(5, "You are currently not in a party, create one to attempt the boss.");
|
||||
return false;
|
||||
} else if(!pi.isLeader()) {
|
||||
pi.playerMessage(5, "Your party leader must enter the portal to start the battle.");
|
||||
return false;
|
||||
} else {
|
||||
var eli = em.getEligibleParty(pi.getParty());
|
||||
if(eli.size() > 0) {
|
||||
if(!em.startInstance(pi.getParty(), pi.getPlayer().getMap(), 1)) {
|
||||
pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else { //this should never appear
|
||||
pi.playerMessage(5, "You cannot start this battle yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,6 @@
|
||||
*/
|
||||
|
||||
function enter(pi) {
|
||||
pi.warp(300000012,0);
|
||||
pi.warp(300000012,"portal");
|
||||
return(true);
|
||||
}
|
||||
@@ -7,7 +7,7 @@ function enter(pi) {
|
||||
var jailedTime = pi.getJailTimeLeft();
|
||||
|
||||
if(jailedTime <= 0) {
|
||||
pi.warp(300000010,0);
|
||||
pi.warp(300000010,"in01");
|
||||
return(true);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -20,8 +20,9 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
function enter(pi) {
|
||||
try {
|
||||
pi.warp(pi.getPlayer().getSavedLocation("FREE_MARKET"));
|
||||
try {
|
||||
var toMap = pi.getPlayer().getSavedLocation("FREE_MARKET");
|
||||
pi.warp(toMap, pi.getMarketPortalId(toMap));
|
||||
} catch(err) {
|
||||
pi.warp(100000000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user