Enhanced map bounds + HolidayPQ + Battleship

Fixed Abdula not showing book info for Arans.
Fixed map bounds, now it hopefully doesn't let items pass through the walkable area anymore.
Implemented HolidayPQ.
Added a custom item sandbox system, to be used with items generated by the "drop" command.
Added the whole-map buff when using the Happy Birthday item.
Fixed several battleship issues:
 - Battleship now shows HP properly at the buff icon.
 - Cleared some inconsistencies on battleship when interacting with the enhanced buff system.
 - Battleship now hands out defensive buffs properly.
This commit is contained in:
ronancpl
2018-06-13 00:03:46 -03:00
parent 0b8d3a0b2b
commit dddfdcf315
46 changed files with 5494 additions and 3796 deletions

View File

@@ -0,0 +1,356 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author: Ronan
* @event: Holiday PQ
*/
// GMS-like event string data thanks to iHealForLove
importPackage(Packages.client.inventory);
importPackage(Packages.server.life);
var isPq = true;
var minPlayers = 3, maxPlayers = 6;
var minLevel = 21, maxLevel = 30;
var entryMap = 889100001;
var exitMap = 889100002;
var recruitMap = 889100000;
var clearMap = 889100002;
var minMapId = 889100001;
var maxMapId = 889100001;
var eventTime = 15; // 15 minutes
var lobbyRange = [0, 0];
function init() {
setEventRequirements();
}
function setLobbyRange() {
return lobbyRange;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [4032094, 4032095];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
evLevel = 3; //Rewards at Hard difficulty
itemSet = [1302080, 1002033, 2022153, 2022042, 2020006, 2020009, 2020016, 2020024, 4010006, 4010007, 4020004, 4020005, 4003002];
itemQty = [1, 1, 1, 5, 20, 15, 10, 10, 2, 4, 4, 4, 1];
eim.setEventRewards(evLevel, itemSet, itemQty);
evLevel = 2; //Rewards at Normal difficulty
itemSet = [1302080, 1002033, 2012005, 2012006, 2020002, 2020025, 2020026, 4010003, 4010004, 4010005, 4020002, 4020003, 4020007];
itemQty = [1, 1, 15, 15, 15, 10, 10, 3, 3, 3, 3, 3, 3];
eim.setEventRewards(evLevel, itemSet, itemQty);
evLevel = 1; //Rewards at Easy difficulty
itemSet = [1002033, 2012005, 2012006, 2020002, 2022006, 2022002, 4010000, 4010001, 4010002, 4020000, 4020001, 4020006];
itemQty = [1, 15, 15, 10, 5, 5, 2, 2, 2, 2, 2, 2];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = [210, 620, 500, 1400, 950, 2200]; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
}
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(level, lobbyid) {
var eim = em.newInstance("Holiday1_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("stage", "0");
eim.setProperty("statusStg1", "-1");
eim.setProperty("missingDrops", "0");
eim.setProperty("snowmanLevel", "0");
eim.setProperty("snowmanStep", "0");
eim.setProperty("spawnedBoss", "0");
var mapobj = eim.getInstanceMap(entryMap);
mapobj.resetPQ(level);
mapobj.allowSummonState(false);
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function afterSetup(eim) {}
function respawnStages(eim) {
eim.getInstanceMap(entryMap).instanceMapRespawn();
eim.schedule("respawnStages", 10 * 1000);
}
function snowmanHeal(eim) {
var difficulty = eim.getIntProperty("level");
var snowman = eim.getInstanceMap(entryMap).getMonsterById(9400316 + (5 * difficulty) + 5);
snowman.heal(200 + 200 * difficulty, 0);
eim.schedule("snowmanHeal", 10 * 1000);
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function scheduledTimeout(eim) {
end(eim);
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function playerLeft(eim, player) {
if(!eim.isEventCleared()) {
playerExit(eim, player);
}
}
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
}
function changedLeader(eim, leader) {
var mapid = leader.getMapId();
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
end(eim);
}
}
function playerDead(eim, player) {}
function playerRevive(eim, player) { // player presses ok on the death pop up.
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function leftParty(eim, player) {
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
end(eim);
}
else
playerLeft(eim, player);
}
function disbandParty(eim) {
if (!eim.isEventCleared()) {
end(eim);
}
}
function monsterValue(eim, mobId) {
return 1;
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
}
function isScrooge(mob) {
var mobid = mob.getId();
return mobid >= 9400319 && mobid <= 9400321;
}
function monsterKilled(mob, eim) {
try {
if(eim.isEventCleared()) return;
else if(isScrooge(mob)) {
eim.giveEventPlayersStageReward(2 * eim.getIntProperty("level"));
eim.showClearEffect();
eim.clearPQ();
return;
}
var rnd = Math.random();
var forceDrop = false;
if(rnd >= 0.42) { // 42% chance of dropping token
var miss = eim.getIntProperty("missingDrops");
if(miss < 5) {
eim.setIntProperty("missingDrops", miss + 1);
return;
}
forceDrop = true;
}
var mapObj = mob.getMap();
var itemObj = new Item((forceDrop || Math.random() < 0.77) ? 4032094 : 4032095, 0, 1); // 77% chance of not fake
var dropper = eim.getPlayers().get(0);
mapObj.spawnItemDrop(mob, dropper, itemObj, mob.getPosition(), true, false);
eim.setIntProperty("missingDrops", 0);
} catch(err) {} // PQ not started yet
}
function allMonstersDead(eim) {}
function friendlyKilled(mob, eim) {
eim.setIntProperty("snowmanStep", 0);
var snowmanLevel = eim.getIntProperty("snowmanLevel");
if(snowmanLevel <= 1) {
end(eim);
} else {
eim.setIntProperty("snowmanLevel", snowmanLevel - 1);
}
}
function snowmanEvolve(eim, curLevel) {
var mapobj = eim.getInstanceMap(entryMap);
var difficulty = eim.getIntProperty("level");
var snowman = mapobj.getMonsterById(9400317 + (5 * difficulty) + (curLevel - 1));
eim.setIntProperty("snowmanLevel", curLevel + 2); // increment by 2 to decrement by 1 on friendlyKilled
mapobj.killMonster(snowman, null, false, 2);
var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel);
mapobj.spawnMonsterOnGroundBelow(snowman, new java.awt.Point(-180, 15));
if(curLevel >= 4) {
mapobj.allowSummonState(false);
mapobj.killAllMonstersNotFriendly();
mapobj.setReactorState();
eim.giveEventPlayersStageReward(2 * difficulty - 1);
eim.showClearEffect();
}
}
function snowmanSnack(eim) {
if(eim.getIntProperty("snowmanLevel") >= 5) return;
var step = eim.getIntProperty("snowmanStep");
var snowmanLevel = eim.getIntProperty("snowmanLevel");
if(step >= 2 + (eim.getIntProperty("level") * snowmanLevel)) {
step = 0;
snowmanEvolve(eim, snowmanLevel);
} else {
var mapobj = eim.getInstanceMap(entryMap);
var difficulty = eim.getIntProperty("level");
var snowman = mapobj.getMonsterById(9400316 + (5 * difficulty) + snowmanLevel);
snowman.heal(200 + (200 * snowmanLevel), 0);
step += 1;
}
eim.setIntProperty("snowmanStep", step);
}
function snowmanSnackFake(eim) {
if(eim.getIntProperty("snowmanLevel") >= 5) return;
var step = eim.getIntProperty("snowmanStep");
if(step > 0) {
eim.setIntProperty("snowmanStep", step - 1);
}
eim.dropMessage(5, "The snowman absorbed a Fake Snow Vigor!");
}
function cancelSchedule() {}
function dispose(eim) {}

View File

@@ -0,0 +1,356 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author: Ronan
* @event: Holiday PQ
*/
// GMS-like event string data thanks to iHealForLove
importPackage(Packages.client.inventory);
importPackage(Packages.server.life);
var isPq = true;
var minPlayers = 3, maxPlayers = 6;
var minLevel = 31, maxLevel = 40;
var entryMap = 889100011;
var exitMap = 889100012;
var recruitMap = 889100010;
var clearMap = 889100012;
var minMapId = 889100011;
var maxMapId = 889100011;
var eventTime = 20; // 20 minutes
var lobbyRange = [0, 0];
function init() {
setEventRequirements();
}
function setLobbyRange() {
return lobbyRange;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [4032094, 4032095];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
evLevel = 3; //Rewards at Hard difficulty
itemSet = [1302080, 1002033, 2022153, 2022042, 2020006, 2020009, 2020016, 2020024, 4010006, 4010007, 4020004, 4020005, 4003002];
itemQty = [1, 1, 1, 5, 20, 15, 10, 10, 2, 4, 4, 4, 1];
eim.setEventRewards(evLevel, itemSet, itemQty);
evLevel = 2; //Rewards at Normal difficulty
itemSet = [1302080, 1002033, 2012005, 2012006, 2020002, 2020025, 2020026, 4010003, 4010004, 4010005, 4020002, 4020003, 4020007];
itemQty = [1, 1, 15, 15, 15, 10, 10, 3, 3, 3, 3, 3, 3];
eim.setEventRewards(evLevel, itemSet, itemQty);
evLevel = 1; //Rewards at Easy difficulty
itemSet = [1002033, 2012005, 2012006, 2020002, 2022006, 2022002, 4010000, 4010001, 4010002, 4020000, 4020001, 4020006];
itemQty = [1, 15, 15, 10, 5, 5, 2, 2, 2, 2, 2, 2];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = [210, 620, 500, 1400, 950, 2200]; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
}
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(level, lobbyid) {
var eim = em.newInstance("Holiday2_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("stage", "0");
eim.setProperty("statusStg1", "-1");
eim.setProperty("missingDrops", "0");
eim.setProperty("snowmanLevel", "0");
eim.setProperty("snowmanStep", "0");
eim.setProperty("spawnedBoss", "0");
var mapobj = eim.getInstanceMap(entryMap);
mapobj.resetPQ(level);
mapobj.allowSummonState(false);
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function afterSetup(eim) {}
function respawnStages(eim) {
eim.getInstanceMap(entryMap).instanceMapRespawn();
eim.schedule("respawnStages", 10 * 1000);
}
function snowmanHeal(eim) {
var difficulty = eim.getIntProperty("level");
var snowman = eim.getInstanceMap(entryMap).getMonsterById(9400316 + (5 * difficulty) + 5);
snowman.heal(200 + 200 * difficulty, 0);
eim.schedule("snowmanHeal", 10 * 1000);
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function scheduledTimeout(eim) {
end(eim);
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function playerLeft(eim, player) {
if(!eim.isEventCleared()) {
playerExit(eim, player);
}
}
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
}
function changedLeader(eim, leader) {
var mapid = leader.getMapId();
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
end(eim);
}
}
function playerDead(eim, player) {}
function playerRevive(eim, player) { // player presses ok on the death pop up.
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function leftParty(eim, player) {
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
end(eim);
}
else
playerLeft(eim, player);
}
function disbandParty(eim) {
if (!eim.isEventCleared()) {
end(eim);
}
}
function monsterValue(eim, mobId) {
return 1;
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
}
function isScrooge(mob) {
var mobid = mob.getId();
return mobid >= 9400319 && mobid <= 9400321;
}
function monsterKilled(mob, eim) {
try {
if(eim.isEventCleared()) return;
else if(isScrooge(mob)) {
eim.giveEventPlayersStageReward(2 * eim.getIntProperty("level"));
eim.showClearEffect();
eim.clearPQ();
return;
}
var rnd = Math.random();
var forceDrop = false;
if(rnd >= 0.42) { // 42% chance of dropping token
var miss = eim.getIntProperty("missingDrops");
if(miss < 5) {
eim.setIntProperty("missingDrops", miss + 1);
return;
}
forceDrop = true;
}
var mapObj = mob.getMap();
var itemObj = new Item((forceDrop || Math.random() < 0.77) ? 4032094 : 4032095, 0, 1); // 77% chance of not fake
var dropper = eim.getPlayers().get(0);
mapObj.spawnItemDrop(mob, dropper, itemObj, mob.getPosition(), true, false);
eim.setIntProperty("missingDrops", 0);
} catch(err) {} // PQ not started yet
}
function allMonstersDead(eim) {}
function friendlyKilled(mob, eim) {
eim.setIntProperty("snowmanStep", 0);
var snowmanLevel = eim.getIntProperty("snowmanLevel");
if(snowmanLevel <= 1) {
end(eim);
} else {
eim.setIntProperty("snowmanLevel", snowmanLevel - 1);
}
}
function snowmanEvolve(eim, curLevel) {
var mapobj = eim.getInstanceMap(entryMap);
var difficulty = eim.getIntProperty("level");
var snowman = mapobj.getMonsterById(9400317 + (5 * difficulty) + (curLevel - 1));
eim.setIntProperty("snowmanLevel", curLevel + 2); // increment by 2 to decrement by 1 on friendlyKilled
mapobj.killMonster(snowman, null, false, 2);
var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel);
mapobj.spawnMonsterOnGroundBelow(snowman, new java.awt.Point(-180, 15));
if(curLevel >= 4) {
mapobj.allowSummonState(false);
mapobj.killAllMonstersNotFriendly();
mapobj.setReactorState();
eim.giveEventPlayersStageReward(2 * difficulty - 1);
eim.showClearEffect();
}
}
function snowmanSnack(eim) {
if(eim.getIntProperty("snowmanLevel") >= 5) return;
var step = eim.getIntProperty("snowmanStep");
var snowmanLevel = eim.getIntProperty("snowmanLevel");
if(step >= 2 + (eim.getIntProperty("level") * snowmanLevel)) {
step = 0;
snowmanEvolve(eim, snowmanLevel);
} else {
var mapobj = eim.getInstanceMap(entryMap);
var difficulty = eim.getIntProperty("level");
var snowman = mapobj.getMonsterById(9400316 + (5 * difficulty) + snowmanLevel);
snowman.heal(200 + (200 * snowmanLevel), 0);
step += 1;
}
eim.setIntProperty("snowmanStep", step);
}
function snowmanSnackFake(eim) {
if(eim.getIntProperty("snowmanLevel") >= 5) return;
var step = eim.getIntProperty("snowmanStep");
if(step > 0) {
eim.setIntProperty("snowmanStep", step - 1);
}
eim.dropMessage(5, "The snowman absorbed a Fake Snow Vigor!");
}
function cancelSchedule() {}
function dispose(eim) {}

View File

@@ -0,0 +1,356 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author: Ronan
* @event: Holiday PQ
*/
// GMS-like event string data thanks to iHealForLove
importPackage(Packages.client.inventory);
importPackage(Packages.server.life);
var isPq = true;
var minPlayers = 3, maxPlayers = 6;
var minLevel = 41, maxLevel = 50;
var entryMap = 889100021;
var exitMap = 889100022;
var recruitMap = 889100020;
var clearMap = 889100022;
var minMapId = 889100021;
var maxMapId = 889100021;
var eventTime = 25; // 25 minutes
var lobbyRange = [0, 0];
function init() {
setEventRequirements();
}
function setLobbyRange() {
return lobbyRange;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [4032094, 4032095];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
evLevel = 3; //Rewards at Hard difficulty
itemSet = [1302080, 1002033, 2022153, 2022042, 2020006, 2020009, 2020016, 2020024, 4010006, 4010007, 4020004, 4020005, 4003002];
itemQty = [1, 1, 1, 5, 20, 15, 10, 10, 2, 4, 4, 4, 1];
eim.setEventRewards(evLevel, itemSet, itemQty);
evLevel = 2; //Rewards at Normal difficulty
itemSet = [1302080, 1002033, 2012005, 2012006, 2020002, 2020025, 2020026, 4010003, 4010004, 4010005, 4020002, 4020003, 4020007];
itemQty = [1, 1, 15, 15, 15, 10, 10, 3, 3, 3, 3, 3, 3];
eim.setEventRewards(evLevel, itemSet, itemQty);
evLevel = 1; //Rewards at Easy difficulty
itemSet = [1002033, 2012005, 2012006, 2020002, 2022006, 2022002, 4010000, 4010001, 4010002, 4020000, 4020001, 4020006];
itemQty = [1, 15, 15, 10, 5, 5, 2, 2, 2, 2, 2, 2];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = [210, 620, 500, 1400, 950, 2200]; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
}
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(level, lobbyid) {
var eim = em.newInstance("Holiday3_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("stage", "0");
eim.setProperty("statusStg1", "-1");
eim.setProperty("missingDrops", "0");
eim.setProperty("snowmanLevel", "0");
eim.setProperty("snowmanStep", "0");
eim.setProperty("spawnedBoss", "0");
var mapobj = eim.getInstanceMap(entryMap);
mapobj.resetPQ(level);
mapobj.allowSummonState(false);
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function afterSetup(eim) {}
function respawnStages(eim) {
eim.getInstanceMap(entryMap).instanceMapRespawn();
eim.schedule("respawnStages", 10 * 1000);
}
function snowmanHeal(eim) {
var difficulty = eim.getIntProperty("level");
var snowman = eim.getInstanceMap(entryMap).getMonsterById(9400316 + (5 * difficulty) + 5);
snowman.heal(200 + 200 * difficulty, 0);
eim.schedule("snowmanHeal", 10 * 1000);
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function scheduledTimeout(eim) {
end(eim);
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function playerLeft(eim, player) {
if(!eim.isEventCleared()) {
playerExit(eim, player);
}
}
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
}
function changedLeader(eim, leader) {
var mapid = leader.getMapId();
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
end(eim);
}
}
function playerDead(eim, player) {}
function playerRevive(eim, player) { // player presses ok on the death pop up.
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
}
function leftParty(eim, player) {
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
end(eim);
}
else
playerLeft(eim, player);
}
function disbandParty(eim) {
if (!eim.isEventCleared()) {
end(eim);
}
}
function monsterValue(eim, mobId) {
return 1;
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
}
function isScrooge(mob) {
var mobid = mob.getId();
return mobid >= 9400319 && mobid <= 9400321;
}
function monsterKilled(mob, eim) {
try {
if(eim.isEventCleared()) return;
else if(isScrooge(mob)) {
eim.giveEventPlayersStageReward(2 * eim.getIntProperty("level"));
eim.showClearEffect();
eim.clearPQ();
return;
}
var rnd = Math.random();
var forceDrop = false;
if(rnd >= 0.42) { // 42% chance of dropping token
var miss = eim.getIntProperty("missingDrops");
if(miss < 5) {
eim.setIntProperty("missingDrops", miss + 1);
return;
}
forceDrop = true;
}
var mapObj = mob.getMap();
var itemObj = new Item((forceDrop || Math.random() < 0.77) ? 4032094 : 4032095, 0, 1); // 77% chance of not fake
var dropper = eim.getPlayers().get(0);
mapObj.spawnItemDrop(mob, dropper, itemObj, mob.getPosition(), true, false);
eim.setIntProperty("missingDrops", 0);
} catch(err) {} // PQ not started yet
}
function allMonstersDead(eim) {}
function friendlyKilled(mob, eim) {
eim.setIntProperty("snowmanStep", 0);
var snowmanLevel = eim.getIntProperty("snowmanLevel");
if(snowmanLevel <= 1) {
end(eim);
} else {
eim.setIntProperty("snowmanLevel", snowmanLevel - 1);
}
}
function snowmanEvolve(eim, curLevel) {
var mapobj = eim.getInstanceMap(entryMap);
var difficulty = eim.getIntProperty("level");
var snowman = mapobj.getMonsterById(9400317 + (5 * difficulty) + (curLevel - 1));
eim.setIntProperty("snowmanLevel", curLevel + 2); // increment by 2 to decrement by 1 on friendlyKilled
mapobj.killMonster(snowman, null, false, 2);
var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty) + curLevel);
mapobj.spawnMonsterOnGroundBelow(snowman, new java.awt.Point(-180, 15));
if(curLevel >= 4) {
mapobj.allowSummonState(false);
mapobj.killAllMonstersNotFriendly();
mapobj.setReactorState();
eim.giveEventPlayersStageReward(2 * difficulty - 1);
eim.showClearEffect();
}
}
function snowmanSnack(eim) {
if(eim.getIntProperty("snowmanLevel") >= 5) return;
var step = eim.getIntProperty("snowmanStep");
var snowmanLevel = eim.getIntProperty("snowmanLevel");
if(step >= 2 + (eim.getIntProperty("level") * snowmanLevel)) {
step = 0;
snowmanEvolve(eim, snowmanLevel);
} else {
var mapobj = eim.getInstanceMap(entryMap);
var difficulty = eim.getIntProperty("level");
var snowman = mapobj.getMonsterById(9400316 + (5 * difficulty) + snowmanLevel);
snowman.heal(200 + (200 * snowmanLevel), 0);
step += 1;
}
eim.setIntProperty("snowmanStep", step);
}
function snowmanSnackFake(eim) {
if(eim.getIntProperty("snowmanLevel") >= 5) return;
var step = eim.getIntProperty("snowmanStep");
if(step > 0) {
eim.setIntProperty("snowmanStep", step - 1);
}
eim.dropMessage(5, "The snowman absorbed a Fake Snow Vigor!");
}
function cancelSchedule() {}
function dispose(eim) {}

View File

@@ -39,7 +39,7 @@ function action(mode, type, selection) {
} else if (selection == 1) {
cm.sendSimple("There are many games for this event. It will help you a lot to know how to play the game before you play it. Choose the one you want to know more of! #b\r\n#L0# Ola Ola#l\r\n#L1# MapleStory Maple Physical Fitness Test#l\r\n#L2# Snow Ball#l\r\n#L3# Coconut Harvest#l\r\n#L4# OX Quiz#l\r\n#L5# Treasure Hunt#l#k");
} else if (selection == 2) {
var marr = cm.getQuestRecord(160200);
var marr = cm.getQuestRecord(100295);
if (marr.getCustomData() == null) {
marr.setCustomData("0");
}

230
scripts/npc/9105004.js Normal file
View File

@@ -0,0 +1,230 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @Author Ronan
* Snow Spirit
Maplemas PQ coordinator
*/
importPackage(Packages.server.life);
var prizeTree = [[[2000002, 1002850], [20, 1]], [[2000006, 1012011], [20, 1]]];
var state;
var status;
var gift;
var pqType;
function start() {
pqType = ((cm.getMapId() / 10) % 10) + 1;
state = (cm.getMapId() % 10 > 0) ? 1 : 0;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(state > 0) {
insidePqAction(mode, type, selection);
} else {
recruitPqAction(mode, type, selection);
}
}
}
function recruitPqAction(mode, type, selection) {
if (status == 0) {
em = cm.getEventManager("HolidayPQ_" + pqType);
if(em == null) {
cm.sendOk("The Holiday PQ " + pqType + " has encountered an error.");
cm.dispose();
} else if(cm.isUsingOldPqNpcStyle()) {
action(1, 0, 0);
return;
}
cm.sendSimple("#e#b<Party Quest: Holiday>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nHow about you and your party members collectively beating a quest? Here you'll find obstacles and problems where you won't be able to beat it without great teamwork. If you want to try it, please tell the #bleader of your party#k to talk to me.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I want to find party members.\r\n#L2#I would like to hear more details.");
} else if (status == 1) {
if (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("You can participate in the party quest only if you are in a party.");
cm.dispose();
} else if(!cm.isLeader()) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), pqType)) {
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
}
}
else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
}
cm.dispose();
}
} else if (selection == 1) {
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
cm.dispose();
} else {
cm.sendOk("#e#b<Party Quest: Holiday>#k#n\r\n\r\nJoin in with your team to build up the Snowman that will protect Happyville from the misdoings of Scrooge. While inside, work out with your team to protect it at any means necessary while collecting Snow Vigor that will help on the build up of the Snowman.");
cm.dispose();
}
}
}
function insidePqAction(mode, type, selection) {
var eim = cm.getEventInstance();
var difficulty = eim.getIntProperty("level");
var stg = eim.getIntProperty("statusStg1");
var mapobj = eim.getInstanceMap(889100001 + 10 * (difficulty - 1));
if(status == 0) {
if(stg == -1) {
cm.sendNext("#b#h0##k... you're finally here. This is the place where the residents of Happyville build the giant snowman. But Scrooge's subordinates are attacking it right now. Now Hurry! Our mission is for you and your party to protect the snowman from Scrooge's men within the time limit. If you eliminate them, then they'll drop an item called Snow Vigor. Gather them up and drop them on the snowman, and you'll literally see it grow. Once it returns to its original size, then your task is complete. Just beware of one thing. Some of the subordinates may drop a fake Snow Vigor. A fake Snow Vigor will actually cause the snowman to melt even faster than usual. Best of luck to you.");
} else if(stg == 0) {
if(cm.getMap().getMonsterById(9400321 + 5 * difficulty) == null) {
cm.sendNext("Please, defeat Scrooge's underlings and make the snowman grow, so that Scrooge has no other way to avoid showing himself up.");
cm.dispose();
} else {
cm.sendNext("Awesome! Just as I expected, you managed to defeat Scrooge's subordinates. Thank you so much! (Stands silent for a while...) Unfortunately, Scrooge doesn't seem like he's going to stop right here. One of his men have already told him what happened, which means... he'll show up soon. Please keep fighting, and again, best of luck to you.");
}
} else {
if(!eim.isEventCleared()) {
cm.sendNext("Please defeat the Scrooge, so our Maplemas keeps safe from harm!");
cm.dispose();
} else {
cm.sendNext("Wow!! You defeated Scrooge! Thank you so much! You have managed to make this Maplemas safe and sound! Thanks!!");
}
}
} else if(status == 1) {
if(stg == -1) {
if(!cm.isEventLeader()) {
cm.sendOk("Please let your party leader talk to me for further details on the mission.");
cm.dispose();
return;
}
mapobj.allowSummonState(true);
var snowman = MapleLifeFactory.getMonster(9400317 + (5 * difficulty));
mapobj.spawnMonsterOnGroundBelow(snowman, new java.awt.Point(-180, 15));
eim.setIntProperty("snowmanLevel", 1);
eim.dropMessage(5, "The snowman appeared on the field! Protect it using all means necessary!");
eim.setIntProperty("statusStg1", 0);
cm.dispose();
return;
} else if(stg == 0) {
if(!cm.isEventLeader()) {
cm.sendOk("Please let your party leader talk to me for further details on the mission.");
cm.dispose();
return;
}
mapobj.broadcastStringMessage(5, "As the snowman grows to it's prime, the Scrooge appears!");
eim.getEm().getIv().invokeFunction("snowmanHeal", eim);
var boss = MapleLifeFactory.getMonster(9400318 + difficulty);
mapobj.spawnMonsterOnGroundBelow(boss, new java.awt.Point(-180, 15));
eim.setProperty("spawnedBoss", "true");
eim.setIntProperty("statusStg1", 1);
cm.dispose();
} else {
gift = cm.haveItem(4032092, 1);
if(gift) {
var optStr = generateSelectionMenu(generatePrizeString());
cm.sendSimple("Oh, you brought a #b#t4032092##k with you? That's nice, hold on a bit... Here's your Maplemas gift. Please select the one you'd like to receive:\r\n\r\n" + optStr);
} else if(eim.gridCheck(cm.getPlayer()) == -1) {
cm.sendNext("Here's your Maplemas gift. Enjoy~");
} else {
cm.sendOk("Happy Maplemas!!");
cm.dispose();
}
}
} else if(status == 2) {
if(gift) {
var selItems = prizeTree[selection];
if(cm.canHoldAll(selItems[0], selItems[1])) {
cm.gainItem(4032092, -1);
cm.gainItem(selItems[0][0], selItems[1][0]);
if(selection == 1) {
var rnd = (Math.random() * 9) | 0;
cm.gainItem(selItems[0][1] + rnd, selItems[1][1]);
} else {
cm.gainItem(selItems[0][1], selItems[1][1]);
}
} else {
cm.sendOk("Please make sure you have room in your EQUIP and USE inventories before proceeding.");
}
} else {
if(eim.giveEventReward(cm.getPlayer(), difficulty)) {
eim.gridInsert(cm.getPlayer(), 1);
} else {
cm.sendOk("Please make sure you have room in your EQUIP, USE and ETC inventories before proceeding.");
}
}
cm.dispose();
}
}
function generatePrizeString() {
var strTree = [];
for(var i = 0; i < prizeTree.length; i++) {
var items = prizeTree[i][0];
var qtys = prizeTree[i][1];
var strSel = "";
for(var j = 0; j < items.length; j++) {
strSel += ("#i" + items[j] + "# #t" + items[j] + "#" + (qtys[j] > 1 ? (" : " + qtys[j]) : ""));
}
strTree.push(strSel);
}
return strTree;
}
function generateSelectionMenu(array) {
var menu = "";
for (var i = 0; i < array.length; i++) {
menu += "#L" + i + "#" + array[i] + "#l\r\n";
}
return menu;
}

59
scripts/npc/9105005.js Normal file
View File

@@ -0,0 +1,59 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var status;
var area;
function start() {
area = cm.getMapId() % 10;
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(area > 0) {
cm.sendYesNo("Do you wish to leave this place?");
} else {
cm.sendYesNo("Do you wish to return to #bHappyville#k?");
}
} else {
if(area > 0) {
cm.warp(cm.getMapId() + 1, 0);
} else {
cm.warp(209000000);
}
cm.dispose();
}
}
}

View File

@@ -260,12 +260,6 @@ function action(mode, type, selection) {
var eim = getMarriageInstance(wid);
if(eim != null) {
if(!cm.canHold(4000313)) {
cm.sendOk("Please have a free ETC slot available to get the #b#t4000313##k.");
cm.dispose();
return;
}
cm.gainItem(weddingGuestTicket, -1);
eim.registerPlayer(cm.getPlayer()); //cm.warp(680000210, 0);
} else {

View File

@@ -260,12 +260,6 @@ function action(mode, type, selection) {
var eim = getMarriageInstance(wid);
if(eim != null) {
if(!cm.canHold(4000313)) {
cm.sendOk("Please have a free ETC slot available to get the #b#t4000313##k.");
cm.dispose();
return;
}
cm.gainItem(weddingGuestTicket, -1);
eim.registerPlayer(cm.getPlayer()); //cm.warp(680000210, 0);
} else {

View File

@@ -1,3 +1,22 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author: Ronan
* @npc: Abdula

View File

@@ -32,7 +32,7 @@ var ambientSong = "Bgm04/Shinin'Harbor";
var feature_tree = [];
var feature_cursor;
var tabs = ["PQs", "Skills", "Quests", "Player Social Network", "Cash & Items", "Monsters, Maps & Reactors", "PQ potentials", "Player potentials", "Server potentials", "Admin/GM commands", "Localhost edits", "Project"];
var tabs = ["PQs", "Skills", "Quests", "Player Social Network", "Cash & Items", "Monsters, Maps & Reactors", "PQ potentials", "Player potentials", "Server potentials", "Admin/GM commands", "Custom NPCs", "Localhost edits", "Project"];
function addFeature(feature) {
feature_cursor.push(feature);
@@ -40,7 +40,7 @@ function addFeature(feature) {
function writeFeatureTab_PQs() {
addFeature("HPQ/KPQ/LPQ/LMPQ/OPQ/APQ/EllinPQ/PiratePQ.");
addFeature("MagatiaPQ/HorntailPQ/TreasurePQ/ElnathPQ.");
addFeature("RnJPQ/HorntailPQ/TreasurePQ/ElnathPQ/HolidayPQ.");
addFeature("CWKPQ as Expedition-based event.");
addFeature("Scarga/Horntail/Showa/Balrog/Zakum/Pinkbean.");
addFeature("GuildPQ & queue with multi-lobby systems available.");
@@ -51,8 +51,10 @@ function writeFeatureTab_PQs() {
function writeFeatureTab_Skills() {
addFeature("Reviewed many skills, such as Steal and M. Door.");
addFeature("Improved battleship: HP visible and map-persistent.");
addFeature("Maker skill features properly developed.");
addFeature("Chair Mastery - map chair boosts HP/MP rec.");
addFeature("Mu Lung Dojo skills functional.");
}
function writeFeatureTab_Quests() {
@@ -85,6 +87,7 @@ function writeFeatureTab_CashItems() {
addFeature("New town scroll: antibanish. Counters boss banishes.");
addFeature("Inventory system checks for free slot & stack space.");
addFeature("Storage with 'Arrange Items' feature functional.");
addFeature("Close-quarters evaluation mode for items.");
addFeature("Further improved Karma scissors.");
addFeature("Scroll for Spikes on Shoes.");
addFeature("Scroll for Cold Protection.");
@@ -103,12 +106,14 @@ function writeFeatureTab_MonstersMapsReactors() {
addFeature("Monsterbook displays updated drop data info.");
addFeature("Every skill/mastery book is now obtainable.");
addFeature("Mobs now can drop more than one of the same equip.");
addFeature("Redesigned HT mechanics: assemble & dmg taken.");
addFeature("Implemented Zombify disease status.");
addFeature("Added Boss HP Bar for dozens of bosses.");
addFeature("Game will favor showing the targeted boss HPbar.");
addFeature("Dmg overtime on maps and neutralizers functional.");
addFeature("Boats, elevator and other travel mechanics functional.");
addFeature("C. Balrog's boat approaching visual effect functional.");
addFeature("Maps having everlasting items no longer expires them.");
addFeature("PQs, Taxis and events warps players to random SPs.");
addFeature("PQ boxes sprays items when opened, GMS-like.");
addFeature("Reactors pick items up smartly from the field.");
@@ -129,6 +134,7 @@ function writeFeatureTab_Playerpotentials() {
addFeature("Player level rates.");
addFeature("Gain fame by quests.");
addFeature("Pet evolutions functional (not GMS-like).");
addFeature("Reviewed keybinding system.");
}
function writeFeatureTab_Serverpotentials() {
@@ -160,6 +166,14 @@ function writeFeatureTab_AdminGMcommands() {
addFeature("Several new commands.");
}
function writeFeatureTab_CustomNPCs() {
addFeature("Spiegelmann: automatized rock-refiner.");
addFeature("Abdula: lists droppers of needed skill/mastery books.");
addFeature("Agent E: accessory crafter.");
addFeature("Donation Box: automatized item-buyer.");
addFeature("Coco & Ace of Hearts: C. scroll crafters.");
}
function writeFeatureTab_Localhostedits() {
addFeature("Removed the 'n' NPC dialog issue.");
addFeature("Removed caps for MATK, WMDEF, ACC and AVOID.");
@@ -180,6 +194,7 @@ function writeFeatureTab_Project() {
addFeature("Fixed/added many missing packet opcodes.");
addFeature("Uncovered many opcodes throughout the source.");
addFeature("Reviewed many Java aspects that needed attention.");
addFeature("Reviewed SQL data, eliminating duplicated entries.");
addFeature("Protected many flaws with login management system.");
addFeature("ThreadTracker: runtime tool for deadlock detection.");
addFeature("Heavily reviewed future task management, spawning much less threads and relieving task overload on the TimerManager.");

View File

@@ -0,0 +1,25 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function enter(pi) {
pi.playPortalSound();
pi.warp(pi.getMapId() - 2, 0);
return true;
}

54
scripts/quest/28004.js Normal file
View File

@@ -0,0 +1,54 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var status = -1;
function start(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
if(qm.getPlayer().getLevel() > 50) {
qm.forceCompleteQuest();
qm.dispose();
return;
}
qm.sendNext("Okay... so here's our plan to defeat Scrooge and his dastardly plans. The Force of the Spirit I gave you is an item packed with mana. It's an item you'll definitely use at the map I am about to send you. In order to do that, you'll have to bring your party members with you as well. You should bring your party members here or form one right now!");
} else if (status == 1) {
qm.sendAcceptDecline("Would you like to move forward?");
} else {
var level = qm.getPlayer().getLevel();
qm.warp(level <= 30 ? 889100000 : (level <= 40 ? 889100010 : 889100020));
qm.dispose();
}
}
}

View File

@@ -0,0 +1,29 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* @Author Ronan
*
* 9400300.js: assimilate Snow Vigor
*/
function act() {
var eim = rm.getEventInstance();
eim.getEm().getIv().invokeFunction("snowmanSnack", eim);
}

View File

@@ -0,0 +1,29 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* @Author Ronan
*
* 9400301.js: assimilate Fake Snow Vigor
*/
function act() {
var eim = rm.getEventInstance();
eim.getEm().getIv().invokeFunction("snowmanSnackFake", eim);
}