Several PQ platform patches + Quest complete count + Fast meso drop

Implemented CPQ challenges using the matching system.
Fixed LanguageConstants statically acting for all players.
Fixed OPQ's <On the Way Up> stage sometimes leading players to unexpected platforms.
Fixed EllinPQ fountain not giving Altaire Fragment to players.
Fixed "Lab - Unit" stage on RnJPQ, now using correlated sequences between the units.
Fixed Fredrick handing out negative values of mesos to players.
Improved "goto" command info.
Implemented quest complete count.
Fixed mobs still being "controlled" by players even though it's already dead.
Concurrently protected adding items into inventory.
Concurrently protected EXP gain through Writs of Solomon.
Adjusted smoothly respawn rate of mobs in map (solo players in a map now experiences 75% of mobs spawned).
Fixed mesos not being able to drop so frequently (prior 200ms threshold between drops).
Tweaked matchchecking so that match checking doesn't outright dispose matching members on dismissal (match still sticks to the player until they answer or timeout).
Fixed a dupe case within storage's item store.
Added any-NPC scriptable to the source.
This commit is contained in:
ronancpl
2019-05-02 11:02:07 -03:00
parent b6a91c523f
commit c2fa7883fe
90 changed files with 1454 additions and 611 deletions

View File

@@ -92,7 +92,7 @@ function playerEntry(eim, player) {
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
var api = player.getClient().getAbstractPlayerInteraction();
var api = player.getAbstractPlayerInteraction();
api.removeAll(4031507);
api.removeAll(4031508);

View File

@@ -237,7 +237,7 @@ function changedMap(eim, player, mapid) {
function afterChangedMap(eim, player, mapid) {
if (mapid == 990000100) {
var texttt = "So, here is the brief. You guys should be warned that, once out on the fortress outskirts, anyone that would not be equipping the #b#t1032033##k will die instantly due to the deteriorated state of the air around there. That being said, once your team moves out, make sure to #bhit the glowing rocks#k in that region and #bequip the dropped item#k before advancing stages. That will protect you thoroughly from the air sickness. Good luck!";
player.getClient().getAbstractPlayerInteraction().npcTalk(9040000, texttt);
player.getAbstractPlayerInteraction().npcTalk(9040000, texttt);
}
}

View File

@@ -52,7 +52,7 @@ function primeMinisterCheck(eim) {
var pIter = map.getAllPlayers().iterator();
while (pIter.hasNext()) {
var player = pIter.next();
if (player.getQuestStatus(2333) == 1 && player.getClient().getAbstractPlayerInteraction().getQuestProgress(2333, mobId) == 0) {
if (player.getQuestStatus(2333) == 1 && player.getAbstractPlayerInteraction().getQuestProgress(2333, mobId) == 0) {
return true;
}
}

View File

@@ -176,6 +176,33 @@ function shuffle(array) {
return array;
}
function generateStg6Combo(eim) { // thanks Chloek3, seth1 for stating generated sequences are supposed to be linked
var matrix = [];
for (var i = 0; i < 4; i++) {
matrix.push([]);
}
for (var j = 0; j < 10; j++) {
var array = [0, 1, 2, 3];
array = shuffle(array);
for (var i = 0; i < 4; i++) {
matrix[i].push(array[i]);
}
}
for (var i = 0; i < 4; i++) {
var comb = "";
for(var j = 0; j < 10; j++) {
var r = matrix[i][j];
comb += r.toString();
}
eim.setProperty("stage6_comb" + (i + 1), comb);
}
}
function afterSetup(eim) {
eim.setIntProperty("escortFail", 0); // refresh friendly status
@@ -390,6 +417,7 @@ function monsterKilled(mob, eim) {
eim.showClearEffect();
eim.giveEventPlayersStageReward(5);
generateStg6Combo(eim);
map.getReactorByName("jnr6_out").forceHitReactor(1);
}
} else if(mob.getId() == 9300151 || mob.getId() == 9300152) {

View File

@@ -176,6 +176,33 @@ function shuffle(array) {
return array;
}
function generateStg6Combo(eim) {
var matrix = [];
for (var i = 0; i < 4; i++) {
matrix.push([]);
}
for (var j = 0; j < 10; j++) {
var array = [0, 1, 2, 3];
array = shuffle(array);
for (var i = 0; i < 4; i++) {
matrix[i].push(array[i]);
}
}
for (var i = 0; i < 4; i++) {
var comb = "";
for(var j = 0; j < 10; j++) {
var r = matrix[i][j];
comb += r.toString();
}
eim.setProperty("stage6_comb" + (i + 1), comb);
}
}
function afterSetup(eim) {
eim.setIntProperty("escortFail", 0); // refresh friendly status
@@ -390,6 +417,7 @@ function monsterKilled(mob, eim) {
eim.showClearEffect();
eim.giveEventPlayersStageReward(5);
generateStg6Combo(eim);
map.getReactorByName("rnj6_out").forceHitReactor(1);
}
} else if(mob.getId() == 9300139 || mob.getId() == 9300140) {

View File

@@ -180,7 +180,7 @@ function playerEntry(eim, player) {
player.changeMap(map, map.getPortal(0));
var texttt = "Hi, my name is Eak, the Chamberlain of the Goddess. Don't be alarmed; you won't be able to see me right now. Back when the Goddess turned into a block of stone, I simultaneously lost my own power. If you gather up the power of the Magic Cloud of Orbis, however, then I'll be able to recover my body and re-transform back to my original self. Please collect #b20#k Magic Clouds and bring them back to me. Right now, you'll only see me as a tiny, flickering light.";
player.getClient().getAbstractPlayerInteraction().npcTalk(2013001, texttt);
player.getAbstractPlayerInteraction().npcTalk(2013001, texttt);
}
function scheduledTimeout(eim) {

View File

@@ -21,9 +21,13 @@
importPackage(Packages.tools);
var exitMap;
var entryMap;
var exitMap;
var otherMap;
var minMapId = 103040410;
var maxMapId = 103040460;
var minPlayers = 1;
var fightTime = 60;
var timer = 1000 * 60 * fightTime;
@@ -80,7 +84,7 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, player, mapid) {
if(mapid == exitMap.getId()) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);

View File

@@ -21,9 +21,13 @@
importPackage(Packages.tools);
var exitMap;
var entryMap;
var exitMap;
var otherMap;
var minMapId = 103040410;
var maxMapId = 103040460;
var minPlayers = 1;
var fightTime = 30;
var timer = 1000 * 60 * fightTime;
@@ -80,7 +84,7 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, player, mapid) {
if(mapid == exitMap.getId()) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);

View File

@@ -110,7 +110,7 @@ function respawnStages(eim) {
function playerEntry(eim, player) {
eim.setProperty("giftedItemG" + player.getId(), "0");
eim.setProperty("giftedItemB" + player.getId(), "0");
player.getClient().getAbstractPlayerInteraction().gainItem(4000313, 1);
player.getAbstractPlayerInteraction().gainItem(4000313, 1);
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));

View File

@@ -110,7 +110,7 @@ function respawnStages(eim) {
function playerEntry(eim, player) {
eim.setProperty("giftedItemG" + player.getId(), "0");
eim.setProperty("giftedItemB" + player.getId(), "0");
player.getClient().getAbstractPlayerInteraction().gainItem(4000313, 1);
player.getAbstractPlayerInteraction().gainItem(4000313, 1);
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));