Fix map spawn
Fix map failing to spawn in some cases.
This commit is contained in:
9
scripts/portal/s4common1_exit.js
Normal file
9
scripts/portal/s4common1_exit.js
Normal file
@@ -0,0 +1,9 @@
|
||||
//Author: Ronan
|
||||
|
||||
function enter(pi) {
|
||||
if(pi.hasItem(4031495)) pi.warp(921100301);
|
||||
else pi.warp(211040100);
|
||||
|
||||
pi.getWarpMap(921100300).clearMapObjects();
|
||||
return true;
|
||||
}
|
||||
@@ -25,8 +25,10 @@ function enter(pi) {
|
||||
pi.removeAll(4031508);
|
||||
}
|
||||
|
||||
if (pi.getClient().getChannelServer().getMapFactory().getMap(923010000).getCharacters().size() < 1)
|
||||
pi.getClient().getChannelServer().getMapFactory().getMap(923010000).killAllMonsters();
|
||||
pi.warp(230000003, "out00");
|
||||
if (pi.getClient().getChannelServer().getMapFactory().getMap(923010000).getCharacters().size() == 0) {
|
||||
pi.getClient().getChannelServer().getMapFactory().getMap(923010000).clearMapObjects();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user