GuildPQ fix
Fixed some issues with GPQ startup crashing the leader when doing the map transition.
This commit is contained in:
@@ -60,6 +60,8 @@ function setEventRequirements() {
|
||||
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
|
||||
else reqStr += minLevel;
|
||||
|
||||
reqStr += "\r\n All members of the same guild";
|
||||
|
||||
reqStr += "\r\n Time limit: ";
|
||||
reqStr += eventTime + " minutes";
|
||||
|
||||
@@ -178,11 +180,6 @@ function afterSetup(eim) {
|
||||
if(leader != null) {
|
||||
eim.setProperty("guild", "" + leader.getGuildId());
|
||||
}
|
||||
|
||||
if(isTeamAllJobs(eim)) {
|
||||
var rnd = Math.floor(Math.random() * 4);
|
||||
eim.applyEventPlayersItemBuff(2023000 + rnd);
|
||||
}
|
||||
}
|
||||
|
||||
function respawnStages(eim) {}
|
||||
@@ -190,9 +187,6 @@ function respawnStages(eim) {}
|
||||
function playerEntry(eim, player) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
|
||||
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 move out to the next stage, 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().getSession().write(Packages.tools.MaplePacketCreator.getNPCTalk(9040000, /*(byte)*/ 0, texttt, "00 00", /*(byte)*/ 0));
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
@@ -206,6 +200,11 @@ function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
} else {
|
||||
eim.startEventTimer(eventTime * 60000);
|
||||
|
||||
//if(isTeamAllJobs(eim)) {
|
||||
var rnd = Math.floor(Math.random() * 4);
|
||||
eim.applyEventPlayersItemBuff(2023000 + rnd);
|
||||
//}
|
||||
}
|
||||
} else {
|
||||
end(eim);
|
||||
@@ -236,6 +235,13 @@ 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 to the next stage, 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().getSession().write(Packages.tools.MaplePacketCreator.getNPCTalk(9040000, /*(byte)*/ 0, texttt, "00 00", /*(byte)*/ 0));
|
||||
}
|
||||
}
|
||||
|
||||
function changedLeader(eim, leader) {}
|
||||
|
||||
function playerDead(eim, player) {
|
||||
|
||||
@@ -53,7 +53,7 @@ function action(mode, type, selection) {
|
||||
sel = selection;
|
||||
if (selection == 0) {
|
||||
if(!cm.isGuildLeader()) {
|
||||
cm.sendOk("Your guild master/jr.master must talk to me to register this guild quest.");
|
||||
cm.sendOk("Your guild master/jr.master must talk to me to register the guild for the guild quest.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
if(em.isQueueFull()) {
|
||||
@@ -98,7 +98,7 @@ function action(mode, type, selection) {
|
||||
if (sel == 0) {
|
||||
var entry = em.addGuildToQueue(cm.getPlayer().getGuildId(), cm.getPlayer().getId());
|
||||
if(entry > 0) {
|
||||
cm.sendOk("Your guild has been registered successfully. A message will pop on your chat keeping your guild aware about the registration status.\r\n\r\nNow, #rimportant#k: as the leader of this instance, #ryou must already be present on this channel#k the right moment your guild is called for the strategy time. #bThe missubmission of this action will void#k your guild registration as a whole, and the next guild will be called immediately. Must be noted also, that if you become absent from the end of the strategy time to any point on the duration of the instance, it will render the instance interrupted, and your guild will be moved out instantly, moving again the queue.");
|
||||
cm.sendOk("Your guild has been registered successfully. A message will pop on your chat keeping your guild aware about the registration status.\r\n\r\nNow, #rimportant#k: as the leader of this instance, #ryou must already be present on this channel#k the right moment your guild is called for the strategy time. #bThe missubmission of this action will void#k your guild registration as a whole, and the next guild will be called immediately. Must be noted also that if you, leader of this instance, become absent from the end of the strategy time to any point on the duration of the instance, it will render the mission interrupted, and your guild will be moved out instantly, moving again the queue.");
|
||||
} else if(entry == 0) {
|
||||
cm.sendOk("The queue on this channel is already full. Please be patient and try again after a while, or try on another channel.");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user