Fixed quest rewarding + Lethal attacks in Dojo

Fixed quests not giving items in some cases, lethal damages rendering
dojo uncompletable and added new scripts.
This commit is contained in:
ronancpl
2017-04-07 21:42:42 -03:00
parent f6935d3d3b
commit c8f905e1a5
23 changed files with 7503 additions and 6922 deletions

View File

@@ -0,0 +1,76 @@
function init() {
// After loading, ChannelServer
}
function setup(eim, leaderid) {
// Setup the instance when invoked, EG : start PQ
}
function playerEntry(eim, player) {
// Warp player in etc..
}
function changedMap(eim, player, mapid) {
// What to do when player've changed map, based on the mapid
}
function scheduledTimeout(eim) {
// When event timeout..
// restartEventTimer(long time)
// stopEventTimer()
// startEventTimer(long time)
// isTimerStarted()
}
function allMonstersDead(eim) {
// When invoking unregisterMonster(MapleMonster mob) OR killed
// Happens only when size = 0
}
function playerDead(eim, player) {
// Happens when player dies
}
function playerRevive(eim, player) {
// Happens when player's revived.
// @Param : returns true/false
}
function playerDisconnected(eim, player) {
// return 0 - Deregister player normally + Dispose instance if there are zero player left
// return x that is > 0 - Deregister player normally + Dispose instance if there x player or below
// return x that is < 0 - Deregister player normally + Dispose instance if there x player or below, if it's leader = boot all
}
function monsterValue(eim, mobid) {
// Invoked when a monster that's registered has been killed
// return x amount for this player - "Saved Points"
}
function leftParty(eim, player) {
// Happens when a player left the party
}
function disbandParty(eim, player) {
// Happens when the party is disbanded by the leader.
}
function clearPQ(eim) {
// Happens when the function EventInstanceManager.finishPQ() is invoked by NPC/Reactor script
}
function removePlayer(eim, player) {
// Happens when the funtion NPCConversationalManager.removePlayerFromInstance() is invoked
}
function registerCarnivalParty(eim, carnivalparty) {
// Happens when carnival PQ is started. - Unused for now.
}
function onMapLoad(eim, player) {
// Happens when player change map - Unused for now.
}
function cancelSchedule() {
}

84
scripts/event/s4aWorld.js Normal file
View File

@@ -0,0 +1,84 @@
/*
* 4th Job Snipe / Concentration
*/
function init() {
em.setProperty("started", "false");
}
function monsterValue(eim, mobId) {
return 1;
}
function setup() {
var eim = em.newInstance("s4aWorld");
eim.setInstanceMap(910500000).resetFully();
eim.startEventTimer(1200000);
em.setProperty("started", "true");
return eim;
}
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(0, 0)) {
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 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 allMonstersDead(eim) {
//has nothing to do with monster killing
}
function cancelSchedule() {
}