CPQ tidyup patch + Guild Creation matcher + Solution to Login Accid=0
Adjusted AP gains, to get it to work following the AP Reset check method. Fixed usage of inexistent itemids on CPQ and fishing. Fixed one-of-a-kind items being lost in player trades due to missing inventory checks. Implemented matching system for the guild creation phase. All players intending to join the new guild must be on the Guild Headquartes and accept the creation of the guild. Fixed changing jobs not properly updating info on the party tab. Fixed double tooltip information on CPQ actions UI. Fixed CPQ not disbanding after a player leaves the party/instance. Fixed checks for "in-progress" CPQ instances. Fixed changing maps on CPQ not leading players back to the starting battlefield. Reviewed login system, now preventing non-local IP connecting on local server and local IP on non-local server. Reviewed login system, now cherrypicking sessions in transition state when trying to disconnect them due to a failed login (avoiding possible mishaps due to duplicate sessions of a same account). Adjusted PiratePQ stage 2, now mobs respawn rather than making party leader request for new waves. Adjusted Prime Minister, its spawn is no longer related to starting the quest. It should also allow party fights. Fixed "forcevac" command not properly applying, rather sending to inventory, "consume-on-pickup" items. Fixed (probably) accId = 0 issue on login, that was occurring due to client accountid's being set to 0 a while before being checked once again on finishLogin(). Fixed an issue with extended time on CPQ not properly showing the end-match's visual effect.
This commit is contained in:
@@ -1,31 +1,79 @@
|
||||
var minPlayers = 1;
|
||||
var entryMap = 106021402;
|
||||
var exitMap = 106021600;
|
||||
importPackage(Packages.tools);
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
var minMapId = 106021601;
|
||||
var maxMapId = 106021601;
|
||||
var eventTime = 10 * 60 * 1000; // 10 minutes
|
||||
var entryMap = 106021600;
|
||||
var exitMap = 106021402;
|
||||
var recruitMap = 106021402;
|
||||
|
||||
var minPlayers = 1, maxPlayers = 3;
|
||||
var minLevel = 30, maxLevel = 255;
|
||||
|
||||
var minMapId = 106021600;
|
||||
var maxMapId = 106021600;
|
||||
|
||||
var mobId = 3300008; //Prime Minister
|
||||
|
||||
function init(){}
|
||||
|
||||
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
|
||||
var eligible = [];
|
||||
var hasLeader = false;
|
||||
|
||||
if(party.size() > 0) {
|
||||
var partyList = party.toArray();
|
||||
|
||||
for(var i = 0; i < party.size(); i++) {
|
||||
var ch = partyList[i];
|
||||
|
||||
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
|
||||
if(ch.isLeader()) hasLeader = true;
|
||||
eligible.push(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
|
||||
return eligible;
|
||||
}
|
||||
|
||||
function setup(difficulty, lobbyId){
|
||||
var eim = em.newInstance("MK_PrimeMinister_" +lobbyId);
|
||||
eim.getInstanceMap(106021601).resetFully();
|
||||
eim.getInstanceMap(106021601).allowSummonState(false);
|
||||
respawn(eim);
|
||||
|
||||
return eim;
|
||||
}
|
||||
|
||||
function afterSetup(eim){}
|
||||
|
||||
function primeMinisterCheck(eim) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
|
||||
var pIter = map.getAllPlayers().iterator();
|
||||
while (pIter.hasNext()) {
|
||||
var player = pIter.next();
|
||||
if (player.getQuestStatus(2333) == 1 && player.getClient().getAbstractPlayerInteraction().getQuestProgress(2333, mobId) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function respawn(eim){
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
map.allowSummonState(true);
|
||||
map.instanceMapRespawn();
|
||||
eim.schedule("respawn", 10000);
|
||||
if (primeMinisterCheck(eim)) {
|
||||
eim.startEventTimer(eventTime);
|
||||
|
||||
var weddinghall = eim.getMapInstance(entryMap);
|
||||
weddinghall.getPortal(1).setPortalState(false);
|
||||
weddinghall.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(292, 143));
|
||||
} else {
|
||||
eim.schedule("respawn", 10000);
|
||||
}
|
||||
}
|
||||
|
||||
function playerEntry(eim, player){
|
||||
var weddinghall = eim.getMapInstance(106021601);
|
||||
var weddinghall = eim.getMapInstance(entryMap);
|
||||
player.changeMap(weddinghall, weddinghall.getPortal(1));
|
||||
}
|
||||
|
||||
@@ -69,7 +117,7 @@ function playerUnregistered(eim, player){}
|
||||
|
||||
function playerExit(eim, player){
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(entryMap, 2);
|
||||
player.changeMap(exitMap, 2);
|
||||
}
|
||||
|
||||
function changedMap(eim, chr, mapid) {
|
||||
@@ -86,9 +134,19 @@ function cancelSchedule(){}
|
||||
|
||||
function dispose(){}
|
||||
|
||||
function clearPQ(eim){}
|
||||
function clearPQ(eim){
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim){}
|
||||
function monsterKilled(mob, eim){
|
||||
if (mob.getId() == mobId) {
|
||||
eim.getMapInstance(entryMap).getPortal(1).setPortalState(true);
|
||||
|
||||
eim.showClearEffect();
|
||||
eim.clearPQ();
|
||||
}
|
||||
}
|
||||
|
||||
function allMonstersDead(eim){}
|
||||
|
||||
|
||||
@@ -1,20 +1,44 @@
|
||||
importPackage(Packages.tools);
|
||||
importPackage(Packages.server.life);
|
||||
|
||||
var minPlayers = 1;
|
||||
var eventTime = 10; // 10 minutes
|
||||
var entryMap = 106021402;
|
||||
var exitMap = 106021600;
|
||||
var eventTime = 10 * 60 * 1000; // 10 minutes
|
||||
var entryMap = 106021601;
|
||||
var exitMap = 106021402;
|
||||
var recruitMap = 106021402;
|
||||
|
||||
var minPlayers = 1, maxPlayers = 3;
|
||||
var minLevel = 30, maxLevel = 255;
|
||||
|
||||
var minMapId = 106021601;
|
||||
var maxMapId = 106021601;
|
||||
|
||||
var mobId = 3300008; //Prime Minister
|
||||
|
||||
function init(){}
|
||||
|
||||
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
|
||||
var eligible = [];
|
||||
var hasLeader = false;
|
||||
|
||||
if(party.size() > 0) {
|
||||
var partyList = party.toArray();
|
||||
|
||||
for(var i = 0; i < party.size(); i++) {
|
||||
var ch = partyList[i];
|
||||
|
||||
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
|
||||
if(ch.isLeader()) hasLeader = true;
|
||||
eligible.push(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
|
||||
return eligible;
|
||||
}
|
||||
|
||||
function setup(difficulty, lobbyId){
|
||||
var eim = em.newInstance("MK_PrimeMinister2_" +lobbyId);
|
||||
eim.getInstanceMap(106021601).resetFully();
|
||||
eim.getInstanceMap(106021601).allowSummonState(false);
|
||||
respawn(eim);
|
||||
|
||||
return eim;
|
||||
@@ -22,22 +46,26 @@ function setup(difficulty, lobbyId){
|
||||
|
||||
function afterSetup(eim){}
|
||||
|
||||
function primeMinisterCheck(eim) {
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
return !map.getAllPlayers().isEmpty();
|
||||
}
|
||||
|
||||
function respawn(eim){
|
||||
var map = eim.getMapInstance(entryMap);
|
||||
map.allowSummonState(true);
|
||||
map.instanceMapRespawn();
|
||||
eim.schedule("respawn", 10000);
|
||||
if (primeMinisterCheck(eim)) {
|
||||
eim.startEventTimer(eventTime);
|
||||
|
||||
var weddinghall = eim.getMapInstance(entryMap);
|
||||
weddinghall.getPortal(1).setPortalState(false);
|
||||
weddinghall.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(292, 143));
|
||||
} else {
|
||||
eim.schedule("respawn", 10000);
|
||||
}
|
||||
}
|
||||
|
||||
function playerEntry(eim, player){
|
||||
var weddinghall = eim.getMapInstance(106021601);
|
||||
var weddinghall = eim.getMapInstance(entryMap);
|
||||
player.changeMap(weddinghall, weddinghall.getPortal(1));
|
||||
|
||||
var pm = MapleLifeFactory.getMonster(3300008);
|
||||
weddinghall.spawnMonsterOnGroundBelow(pm, new Packages.java.awt.Point(472, 27));
|
||||
|
||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
||||
eim.startEventTimer(eventTime * 60000);
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim){
|
||||
@@ -80,7 +108,7 @@ function playerUnregistered(eim, player){}
|
||||
|
||||
function playerExit(eim, player){
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(entryMap, 2);
|
||||
player.changeMap(exitMap, 2);
|
||||
}
|
||||
|
||||
function changedMap(eim, chr, mapid) {
|
||||
@@ -97,9 +125,19 @@ function cancelSchedule(){}
|
||||
|
||||
function dispose(){}
|
||||
|
||||
function clearPQ(eim){}
|
||||
function clearPQ(eim){
|
||||
eim.stopEventTimer();
|
||||
eim.setEventCleared();
|
||||
}
|
||||
|
||||
function monsterKilled(mob, eim){}
|
||||
function monsterKilled(mob, eim){
|
||||
if (mob.getId() == mobId) {
|
||||
eim.getMapInstance(entryMap).getPortal(1).setPortalState(true);
|
||||
|
||||
eim.showClearEffect();
|
||||
eim.clearPQ();
|
||||
}
|
||||
}
|
||||
|
||||
function allMonstersDead(eim){}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
var isPq = true;
|
||||
var isGrindMode = true; // stages done after breaking all boxes on maps
|
||||
var isGrindMode = false; // stages done after breaking all boxes on maps
|
||||
|
||||
var minPlayers = 3, maxPlayers = 6;
|
||||
var minLevel = 55, maxLevel = 100;
|
||||
@@ -185,7 +185,7 @@ function setup(level, lobbyid) {
|
||||
eim.getInstanceMap(925100400).resetPQ(level);
|
||||
eim.getInstanceMap(925100500).resetPQ(level);
|
||||
|
||||
respawnStg4(eim);
|
||||
respawnStages(eim);
|
||||
|
||||
eim.startEventTimer(eventTime * 60000);
|
||||
setEventRewards(eim);
|
||||
@@ -195,9 +195,14 @@ function setup(level, lobbyid) {
|
||||
|
||||
function afterSetup(eim) {}
|
||||
|
||||
function respawnStg4(eim) {
|
||||
function respawnStages(eim) {
|
||||
var stg = eim.getIntProperty("stage2");
|
||||
if (stg < 3) { // thanks Chloek3, seth1, BHB for suggesting map respawn rather than waves on stg2
|
||||
eim.getMapInstance(925100100).spawnAllMonsterIdFromMapSpawnList(9300114 + stg, eim.getIntProperty("level"), true);
|
||||
}
|
||||
|
||||
eim.getMapInstance(925100400).instanceMapRespawn();
|
||||
eim.schedule("respawnStg4", 10 * 1000);
|
||||
eim.schedule("respawnStages", 10 * 1000);
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
|
||||
Reference in New Issue
Block a user