Quick patch for the last commit
Fixed some bugs that appeared with the last commit. Added more info on the event functions documentation.
This commit is contained in:
@@ -1,17 +1,73 @@
|
||||
// Event-instantiation variables
|
||||
var isPq = true;
|
||||
var minPlayers, maxPlayers; // Range of party members for this event instance.
|
||||
var minLevel, maxLevel; // Level range of eligible team members for this event instance.
|
||||
var entryMap; // Initial map, where players all moved into at the event startup.
|
||||
var exitMap; // Upon failing to complete the event, players may be moved to this map.
|
||||
var recruitMap; // Map where players must be before staring this event.
|
||||
var clearMap; // Upon event clearing, players may be moved to this map.
|
||||
|
||||
var minMapId; // Event takes place inside these map id interval. Players found out is instantly dropped from the event.
|
||||
var maxMapId;
|
||||
|
||||
var eventTime; // Max time alloted for the event, in minutes.
|
||||
|
||||
var lobbyRange = [0, 0]; // Range of concurrent lobbies (min range is 0, max range is 7).
|
||||
|
||||
function init() {
|
||||
// After loading, ChannelServer
|
||||
}
|
||||
|
||||
function setLobbyRange() {
|
||||
return lobbyRange;
|
||||
}
|
||||
|
||||
function setEventRequirements() {
|
||||
// sets requirement info about the event to be displayed at the recruitment area.
|
||||
}
|
||||
|
||||
function setEventExclusives(eim) {
|
||||
// sets all items that should exist only for the event instance, and that should be removed from inventory at the end of the run.
|
||||
}
|
||||
|
||||
function setEventRewards(eim) {
|
||||
// sets all possible treasures that can be given, randomly, to a player at the end of the event.
|
||||
}
|
||||
|
||||
function getEligibleParty(party) {
|
||||
// selects, from the given party, the team that is allowed to attempt this event
|
||||
}
|
||||
|
||||
function setup(eim, leaderid) {
|
||||
// Setup the instance when invoked, EG : start PQ
|
||||
}
|
||||
|
||||
function afterSetup(eim) {
|
||||
// Happens after the event instance is initialized and all players have been assigned for the event instance, but before entrying players.
|
||||
}
|
||||
|
||||
function respawnStages(eim) {
|
||||
// Defines which maps inside the event are allowed to respawn. This function should create a new task at the end of it's body calling itself at a given respawn rate.
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
// Warp player in etc..
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {
|
||||
// Do something with the player that is about to unregister right before unregistering he/she.
|
||||
}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
// Do something with the player right before disbanding the event instance.
|
||||
}
|
||||
|
||||
function changedMap(eim, player, mapid) {
|
||||
// What to do when player've changed map, based on the mapid
|
||||
// What to do when player've changed map, based on the mapid.
|
||||
}
|
||||
|
||||
function changedLeader(eim, leader) {
|
||||
// Do something if the party leader has been changed.
|
||||
}
|
||||
|
||||
function scheduledTimeout(eim) {
|
||||
@@ -57,6 +113,18 @@ function monsterValue(eim, mobid) {
|
||||
// return x amount for this player - "Saved Points"
|
||||
}
|
||||
|
||||
function end(eim) {
|
||||
// Happens when the party fails to complete the event instance.
|
||||
}
|
||||
|
||||
function giveRandomEventReward(eim, player) {
|
||||
// Selects randomly a reward to give from the reward pool.
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
// Happens when the party succeeds on completing the event instance.
|
||||
}
|
||||
|
||||
function leftParty(eim, player) {
|
||||
// Happens when a player left the party
|
||||
}
|
||||
@@ -65,10 +133,6 @@ function disbandParty(eim, player) {
|
||||
// Happens when the party is disbanded by the leader.
|
||||
}
|
||||
|
||||
function clearPQ(eim) {
|
||||
// Happens when the function EventInstanceManager.clearPQ() is invoked by NPC/Reactor script
|
||||
}
|
||||
|
||||
function removePlayer(eim, player) {
|
||||
// Happens when the funtion NPCConversationalManager.removePlayerFromInstance() is invoked
|
||||
}
|
||||
@@ -82,4 +146,9 @@ function onMapLoad(eim, player) {
|
||||
}
|
||||
|
||||
function cancelSchedule() {
|
||||
// Finishes ongoing schedules.
|
||||
}
|
||||
|
||||
function dispose() {
|
||||
// Finishes the event instance.
|
||||
}
|
||||
@@ -137,6 +137,8 @@ function disbandParty(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -103,6 +103,8 @@ function disbandParty(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -122,6 +122,8 @@ function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
|
||||
@@ -162,6 +162,8 @@ function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.broadcastPlayerMsg(5, "[Expedition] " + player.getName() + " has left the map.");
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
@@ -99,6 +99,8 @@ function leftParty(eim, player) { //this doesnt fucking matter...
|
||||
function disbandParty(eim) {
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -44,6 +44,8 @@ function playerEntry(eim, player) {
|
||||
eim.startEventTimer(eventTime * 60000);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
eim.dispose();
|
||||
|
||||
@@ -127,6 +127,8 @@ function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
|
||||
@@ -144,6 +144,8 @@ function leftParty(eim, player) { //ignore for GQ
|
||||
function disbandParty(eim) { //ignore for GQ
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -39,6 +39,8 @@ function timeOut(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player, success) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(success ? exitMap.getId() : returnMap.getId(), 0);
|
||||
|
||||
@@ -122,6 +122,8 @@ function scheduledTimeout(eim) {
|
||||
}
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
|
||||
@@ -95,10 +95,11 @@ function monsterValue(eim, mobId) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function leftParty(eim,player) {
|
||||
}
|
||||
function disbandParty(eim) {
|
||||
}
|
||||
function leftParty(eim,player) {}
|
||||
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim,player) {
|
||||
eim.unregisterPlayer(player);
|
||||
|
||||
@@ -109,6 +109,8 @@ function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
|
||||
@@ -110,6 +110,8 @@ function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
|
||||
@@ -146,6 +146,8 @@ function scheduledTimeout(eim) {
|
||||
}
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
@@ -233,4 +235,3 @@ function allMonstersDead(eim) {}
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {}
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ function setup(level, lobbyid) {
|
||||
eim.setProperty("statusStg6", -1);
|
||||
eim.setProperty("statusStg7", -1);
|
||||
eim.setProperty("statusStg8", -1);
|
||||
eim.setProperty("statusStg2_c", 0);
|
||||
eim.setProperty("statusStg7_c", 0);
|
||||
eim.setProperty("statusStgBonus", 0);
|
||||
|
||||
@@ -161,6 +162,13 @@ function scheduledTimeout(eim) {
|
||||
}
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {
|
||||
player.cancelEffect(2022090);
|
||||
player.cancelEffect(2022091);
|
||||
player.cancelEffect(2022092);
|
||||
player.cancelEffect(2022093);
|
||||
}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
@@ -245,4 +253,3 @@ function allMonstersDead(eim) {}
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose(eim) {}
|
||||
|
||||
|
||||
@@ -189,6 +189,8 @@ function disbandParty(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.cancelAllBuffs(); //We don't want people going out with wonky blessing >=(
|
||||
|
||||
@@ -183,6 +183,8 @@ function scheduledTimeout(eim) {
|
||||
end(eim);
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 0);
|
||||
|
||||
@@ -96,6 +96,8 @@ function leftParty(eim, player) {
|
||||
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -92,6 +92,8 @@ function leftParty(eim,player) {
|
||||
function disbandParty(eim) {
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim,player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -96,6 +96,8 @@ function leftParty(eim, player) {
|
||||
|
||||
function disbandParty(eim) {}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -108,6 +108,8 @@ function leftParty(eim,player) { // do nothing in Zakum
|
||||
function disbandParty(eim) { // do nothing in Zakum
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim,player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -120,6 +120,8 @@ function disbandParty(eim) {
|
||||
eim.dispose();
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
||||
|
||||
@@ -68,6 +68,8 @@ function disbandParty(eim) {
|
||||
em.setProperty("started", "false");
|
||||
}
|
||||
|
||||
function playerUnregistered(eim, player) {}
|
||||
|
||||
function playerExit(eim, player) {
|
||||
eim.unregisterPlayer(player);
|
||||
var map = eim.getMapFactory().getMap(105090200);
|
||||
|
||||
@@ -269,7 +269,11 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("Please, find a way to defeat Papa Pixie! Once you've found the Dark Nependeath by placing seeds, you've found Papa Pixie! Defeat it, and get the Root of Life to save Minerva!!!");
|
||||
break;
|
||||
case 920010900:
|
||||
cm.sendNext("This is the jail of the tower. You may find some goodies here, just be sure to clear the puzzles ahead as fast as possible.");
|
||||
if(eim.getProperty("statusStg8") == "1") {
|
||||
cm.sendNext("This is the jail of the tower. You may find some goodies here, just be sure to clear the puzzles ahead as fast as possible.");
|
||||
} else {
|
||||
cm.sendNext("Down there you will not find any statue pieces. Go up the ladder to return to the center tower and search elsewhere. You can come back here to get the goodies that lies down there once you have saved Minerva.");
|
||||
}
|
||||
break;
|
||||
case 920011000:
|
||||
if(cm.getMap().countMonsters() > 0) {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
*2013002.js - Minevra the Goddess
|
||||
*@author Jvlaple
|
||||
*2013002.js - Minerva the Goddess
|
||||
*@author Ronan
|
||||
*/
|
||||
var status = 0;
|
||||
|
||||
|
||||
@@ -27,7 +27,5 @@ function act() {
|
||||
rm.dropItems();
|
||||
|
||||
var eim = rm.getEventInstance();
|
||||
eim.giveEventPlayersExp(3500);
|
||||
eim.setProperty("statusStg7", "1");
|
||||
eim.showClearEffect(true);
|
||||
}
|
||||
@@ -21,13 +21,16 @@
|
||||
*/
|
||||
/**
|
||||
*2006001.js - Spawns Minerva
|
||||
*@author Jvlaple
|
||||
*@author Ronan
|
||||
*/
|
||||
|
||||
function act() {
|
||||
rm.spawnNpc(2013002);
|
||||
|
||||
rm.getEventInstance().clearPQ();
|
||||
|
||||
rm.getEventInstance().setProperty("statusStg8", "1");
|
||||
rm.getEventInstance().startEventTimer(10 * 60000); //bonus time
|
||||
eim.giveEventPlayersExp(3500);
|
||||
eim.showClearEffect(true);
|
||||
|
||||
rm.getEventInstance().startEventTimer(5 * 60000); //bonus time
|
||||
}
|
||||
Reference in New Issue
Block a user