Reformat and clean up portal scripts

This commit is contained in:
P0nk
2021-09-09 23:35:59 +02:00
parent d893309b4f
commit a78ca88a02
435 changed files with 2712 additions and 2287 deletions

View File

@@ -25,19 +25,19 @@ BossRushPQ - Rest Spot portal
*/
function enter(pi) {
var evLevel = ((pi.getMapId() - 1) % 5) + 1;
if(pi.getPlayer().getEventInstance().isEventLeader(pi.getPlayer()) && pi.getPlayer().getEventInstance().getPlayerCount() > 1) {
pi.message("Being the party leader, you cannot leave before your teammates leave first or you pass leadership.");
return false;
}
if(pi.getPlayer().getEventInstance().giveEventReward(pi.getPlayer(), evLevel)) {
pi.playPortalSound(); pi.warp(970030000);
return true;
}
else {
pi.message("Make a room available on all EQUIP, USE, SET-UP and ETC inventory to claim an instance prize.");
return false;
}
var evLevel = ((pi.getMapId() - 1) % 5) + 1;
if (pi.getPlayer().getEventInstance().isEventLeader(pi.getPlayer()) && pi.getPlayer().getEventInstance().getPlayerCount() > 1) {
pi.message("Being the party leader, you cannot leave before your teammates leave first or you pass leadership.");
return false;
}
if (pi.getPlayer().getEventInstance().giveEventReward(pi.getPlayer(), evLevel)) {
pi.playPortalSound();
pi.warp(970030000);
return true;
} else {
pi.message("Make a room available on all EQUIP, USE, SET-UP and ETC inventory to claim an instance prize.");
return false;
}
}