Files
sweetgum-server/scripts/event/NineSpirit.js
ronancpl a39a210c1f Conditional Buffs & M. Magnet & Loot Patch + Exp Split + Duey Rework
Fixed Monster Magnet skill when used on bosses disconnecting the caster.
Improved conditional buff system, no longer updating buffs that are not supposed to toggle.
Added party hunting in the conditional buffs system.
Refactored usage of DB by Duey. Registered Duey items now make use of the same table as the other inventory items.
Fixed non-encapsulated unlocking in reactor class.
Fixed stylish NPCs disconnecting players when trying to display empty styles list.
Fixed a deadlock case within recently implemented update buff effects (conditional buffs mechanic).
Fixed AOE mobskills not behaving well for fixed mobs (those shouldn't take into account attribute "facingLeft").
Fixed non-flipping mobs having attribute "facingLeft" updated according to controller position.
Revised aggro system no longer having bosses expire player chase.
Fixed chalkboard being depleted upon use.
Refactored MapleMapFactory, looking for normalization of the Factory design pattern the class was intended to make use at its conception.
Added MP replenishing system for mobs, gains based on its level.
Fixed indisponibility of one-of-a-kind loots due to the killer's team already having one sample each.
Reworked the EXP split system within the source. New behavior is expected to be GMS-like.
Adjusted interaction within the NPC Nein Spirit's Baby Dragon area. Only players who interacts with quests within can access the area now. One player at a time, with a timeout timer.
Fixed check of level requisites for expeditions.
2019-06-15 15:10:56 -03:00

106 lines
2.0 KiB
JavaScript

var minPlayers = 1;
var timeLimit = 5; //5 minutes
var eventTimer = 1000 * 60 * timeLimit;
var exitMap = 240040610;
var eventMap = 240040611;
var minMapId = 240040611;
var maxMapId = 240040611;
function init(){}
function setup(difficulty, lobbyId){
var eim = em.newInstance("NineSpirit_" +lobbyId);
eim.getInstanceMap(eventMap).resetFully();
eim.getInstanceMap(eventMap).allowSummonState(false);
respawn(eim);
eim.startEventTimer(eventTimer);
return eim;
}
function afterSetup(eim){}
function respawn(eim){}
function playerEntry(eim, player){
var nest = eim.getMapInstance(eventMap);
if (!player.haveItem(4001094)) {
eim.spawnNpc(2081008, nest.getReactorById(2406000).getPosition(), nest);
}
player.changeMap(nest, 1);
}
function scheduledTimeout(eim){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function playerRevive(eim, player){
player.respawn(eim, exitMap);
return false;
}
function playerDead(eim, player){}
function playerDisconnected(eim, player){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++){
if(party.get(i).equals(player))
removePlayer(eim, player);
else
playerExit(eim, party.get(i));
}
eim.dispose();
}
function monsterValue(eim, mobId){
return -1;
}
function leftParty(eim, player){}
function disbandParty(eim){}
function playerUnregistered(eim, player){}
function playerExit(eim, player){
eim.unregisterPlayer(player);
player.changeMap(exitMap);
}
function changedMap(eim, chr, mapid){
if(mapid < minMapId || mapid > maxMapId){
removePlayer(eim, chr);
eim.stopEventTimer();
eim.setEventCleared();
eim.dispose();
}
}
function removePlayer(eim, player){
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function cancelSchedule(){}
function dispose(){}
function clearPQ(eim){}
function monsterKilled(mob, eim){}
function allMonstersDead(eim){}
// ---------- FILLER FUNCTIONS ----------
function changedLeader(eim, leader) {}