Fixed chair exploit & beholder issue + Mini-dungeon revamp
Fixed an (quite amusing) exploit with map chairs stacking "extra healing" schedules on certain conditions. Fixed mini-dungeon not disposing players properly in some cases. Refactored the mini-dungeon structure. Fixed an issue on CASH inventory merging same items when trying to swap them. Fixed Beholder crash issue when trying to enter Cash Shop.
This commit is contained in:
@@ -29,35 +29,31 @@ 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.");
|
||||
if (pi.getParty() != null) {
|
||||
if (pi.isLeader()) {
|
||||
for (var i = 0; i < dungeons; i++) {
|
||||
if(pi.startDungeonInstance(dungeonid + i)) {
|
||||
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.");
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < dungeons; i++) {
|
||||
if(pi.startDungeonInstance(dungeonid + i)) {
|
||||
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;
|
||||
pi.playPortalSound();
|
||||
pi.warp(baseid, "MD00");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user