Event disposing patch + Papulatus rework + V. scroll exploit patch

Solved issues with PQs/events in progress not disposing properly party leavers (warping them out of the event maps).
Solved issues with cleared PQs/events disposing players unproperly when leaving or disbanding the party.
Reworked Papulatus battle now working as an event instance, similar to how Capt Latanica battle is dealt.
Fixed a possible PE exploit with Vega's scroll.
This commit is contained in:
ronancpl
2018-02-17 00:07:10 -02:00
parent 278b5e8140
commit 8f76e7be25
43 changed files with 910 additions and 123 deletions

View File

@@ -19,19 +19,32 @@
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 RonanLana */
function enter(pi) {
var papuMap = pi.getClient().getChannelServer().getMapFactory().getMap(220080001);
if (papuMap.getCharacters().size() == 0) {
pi.getPlayer().dropMessage("The room is empty. A perfect opportunity to challenge the boss.");
papuMap.resetReactors();
} else { // someone is inside
for (var i = 0; i < 3; i++) {
if (papuMap.getMonsterById(8500000 + i) != null) {
pi.getPlayer().dropMessage("Someone is fighting Papulatus.");
var em = pi.getEventManager("PapulatusBattle");
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 yet.");
return false;
}
}
}
pi.playPortalSound(); pi.warp(220080001, "st00");
return true;
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;
}
pi.playPortalSound();
return true;
}
}

View File

@@ -18,7 +18,7 @@ function enter(pi) {
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.");
pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place yet.");
return false;
}
}
@@ -27,6 +27,7 @@ function enter(pi) {
return false;
}
pi.playPortalSound();
return true;
}
}

View File

@@ -25,7 +25,9 @@ function enter(pi) {
pi.giveCharacterExp(4400 * 1.5, pi.getPlayer());
var pm = pi.getEventManager("MK_PrimeMinister");
pm.setProperty("player", pi.getPlayer().getName());
pm.startInstance(pi.getPlayer());
pi.playPortalSound();
return true;
}
}
@@ -37,7 +39,9 @@ function enter(pi) {
else{
var pm = pi.getEventManager("MK_PrimeMinister");
pm.setProperty("player", pi.getPlayer().getName());
pm.startInstance(pi.getPlayer());
pi.playPortalSound();
return true;
}
}

View File

@@ -19,6 +19,7 @@ function enter(pi) {
pi.message("Someone is already challenging Nex. Wait for them to finish before you enter.");
return false;
} else {
pi.playPortalSound();
return true;
}
}

View File

@@ -17,7 +17,7 @@ function enter(pi) {
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.");
pi.playerMessage(5, "The battle against the boss has already begun, so you may not enter this place yet.");
return false;
}
}
@@ -26,6 +26,7 @@ function enter(pi) {
return false;
}
pi.playPortalSound();
return true;
}
}

View File

@@ -20,10 +20,10 @@
*/
function enter(pi) {
if(pi.isQuestStarted(20718)){
pi.playPortalSound();
var cml = pi.getEventManager("Cygnus_Magic_Library");
cml.setProperty("player", pi.getPlayer().getName());
cml.startInstance(pi.getPlayer());
pi.playPortalSound();
}
else{
pi.playPortalSound();