Properly developed the Marriage feature in the source. Added TRAVEL_RATE server flag, a modifier for the travel frequency rate. Corrected stance for players in 3rd party view when entering a map to work similarly as GMS. Fixed mobs spamming skills incoherently. Added code support for old GMS-like PQ NPCs, where party leaders just need to click once to start a new PQ. Implemented podium system for the Hall of Fame PlayerNPCs. Improved character load-out system, now using way less queries to the DB in the process. Fixed birthday field for accounts not being read correctly. Further implemented the incomplete yet-existing Scissors of Karma mechanic. Fixed Duey not propagating item flags when packaging an item. Added a custom buyback system. Refactored the character creation system, now offering support for Maple Life. Fixed some issues with the PlayerNPC positioning system. Added server flag allowing AP assignment for novices (beginners under level 11). Fixed Strategy Time (GPQ) announcement being sent twice to guilds in certain cases. Tweaked mount EXP system now awarding it accordingly with the amount of tiredness healed. Removed the randomness aspect of closeness gain when feeding the pet, now acting accordingly with amount of fullness gained. Fixed an exploit with Arwen script. Fixed travel-back from Florina forcefully sending players to Lith Harbor in certain situations. Thoroughly reviewed job skill questlines for Explorers and Aran. Localhost edit: removed MTS block in certain maps (useful for the buyback system). Localhost edit: removed party blocks for novices. Localhost edit: removed AP assigning block for novices. Localhost edit: removed speed cap. Localhost edit: removed Maker block popping up when inputting ATK gems on non-weapons.
119 lines
2.6 KiB
JavaScript
119 lines
2.6 KiB
JavaScript
/*
|
|
* 4th Job Snipe / Concentration
|
|
*/
|
|
|
|
var minPlayers = 1;
|
|
|
|
function init() {
|
|
em.setProperty("started", "false");
|
|
}
|
|
|
|
function monsterValue(eim, mobId) {
|
|
return 1;
|
|
}
|
|
|
|
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() == 105090200 && ch.getLevel() >= 120) {
|
|
if(ch.isLeader()) hasLeader = true;
|
|
eligible.push(ch);
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!(hasLeader && eligible.length >= minPlayers)) eligible = [];
|
|
return eligible;
|
|
}
|
|
|
|
function setup() {
|
|
var eim = em.newInstance("s4aWorld");
|
|
|
|
eim.getInstanceMap(910500000).resetPQ(1);
|
|
respawnStages(eim);
|
|
eim.getMapInstance(910500000).instanceMapForceRespawn();
|
|
eim.startEventTimer(1200000);
|
|
|
|
em.setProperty("started", "true");
|
|
|
|
return eim;
|
|
}
|
|
|
|
function afterSetup(eim) {}
|
|
|
|
function respawnStages(eim) {
|
|
eim.getMapInstance(910500000).instanceMapRespawn();
|
|
eim.schedule("respawnStages", 15 * 1000);
|
|
}
|
|
|
|
function playerEntry(eim, player) {
|
|
var map = eim.getMapFactory().getMap(910500000);
|
|
player.changeMap(map, map.getPortal(0));
|
|
}
|
|
|
|
function playerDead(eim, player) {
|
|
}
|
|
|
|
function playerRevive(eim, player) {
|
|
}
|
|
|
|
function scheduledTimeout(eim) {
|
|
eim.disposeIfPlayerBelow(100, 105090200);
|
|
|
|
em.setProperty("started", "false");
|
|
}
|
|
|
|
function changedMap(eim, player, mapid) {
|
|
if (mapid != 910500000) {
|
|
eim.unregisterPlayer(player);
|
|
|
|
if (eim.disposeIfPlayerBelow(minPlayers, 105090200)) {
|
|
em.setProperty("started", "false");
|
|
}
|
|
}
|
|
}
|
|
|
|
function playerDisconnected(eim, player) {
|
|
return 0;
|
|
}
|
|
|
|
function leftParty(eim, player) {
|
|
// If only 2 players are left, uncompletable:
|
|
playerExit(eim, player);
|
|
}
|
|
|
|
function disbandParty(eim) {
|
|
//boot whole party and end
|
|
eim.disposeIfPlayerBelow(100, 105090200);
|
|
|
|
em.setProperty("started", "false");
|
|
}
|
|
|
|
function playerUnregistered(eim, player) {}
|
|
|
|
function playerExit(eim, player) {
|
|
eim.unregisterPlayer(player);
|
|
var map = eim.getMapFactory().getMap(105090200);
|
|
player.changeMap(map, map.getPortal(0));
|
|
}
|
|
|
|
function clearPQ(eim) {
|
|
eim.disposeIfPlayerBelow(100, 105090200);
|
|
|
|
em.setProperty("started", "false");
|
|
}
|
|
|
|
function monsterKilled(mob, eim) {}
|
|
|
|
function allMonstersDead(eim) {}
|
|
|
|
function cancelSchedule() {}
|
|
|
|
function dispose() {} |