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.
111 lines
4.1 KiB
JavaScript
111 lines
4.1 KiB
JavaScript
importPackage(Packages.client);
|
|
importPackage(Packages.tools);
|
|
importPackage(Packages.server.life);
|
|
|
|
var Orbis_btf;
|
|
var Boat_to_Orbis;
|
|
var Orbis_Boat_Cabin;
|
|
var Orbis_docked;
|
|
var Ellinia_btf;
|
|
var Ellinia_Boat_Cabin;
|
|
var Ellinia_docked;
|
|
|
|
//Time Setting is in millisecond
|
|
var closeTime = 4 * 60 * 1000; //The time to close the gate
|
|
var beginTime = 5 * 60 * 1000; //The time to begin the ride
|
|
var rideTime = 10 * 60 * 1000; //The time that require move to destination
|
|
var invasionStartTime = 3 * 60 * 1000; //The time to balrog ship approach
|
|
var invasionDelayTime = 1 * 60 * 1000; //The time to balrog ship approach
|
|
var invasionDelay = 5 * 1000; //The time that spawn balrog
|
|
|
|
function init() {
|
|
closeTime = em.getTransportationTime(closeTime);
|
|
beginTime = em.getTransportationTime(beginTime);
|
|
rideTime = em.getTransportationTime(rideTime);
|
|
invasionStartTime = em.getTransportationTime(invasionStartTime);
|
|
invasionDelayTime = em.getTransportationTime(invasionDelayTime);
|
|
|
|
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000112);
|
|
Ellinia_btf = em.getChannelServer().getMapFactory().getMap(101000301);
|
|
Boat_to_Orbis = em.getChannelServer().getMapFactory().getMap(200090010);
|
|
Boat_to_Ellinia = em.getChannelServer().getMapFactory().getMap(200090000);
|
|
Orbis_Boat_Cabin = em.getChannelServer().getMapFactory().getMap(200090011);
|
|
Ellinia_Boat_Cabin = em.getChannelServer().getMapFactory().getMap(200090001);
|
|
Ellinia_docked = em.getChannelServer().getMapFactory().getMap(101000300);
|
|
Orbis_Station = em.getChannelServer().getMapFactory().getMap(200000100);
|
|
Orbis_docked = em.getChannelServer().getMapFactory().getMap(200000111);
|
|
|
|
Ellinia_docked.setDocked(true);
|
|
Orbis_docked.setDocked(true);
|
|
|
|
scheduleNew();
|
|
}
|
|
|
|
function scheduleNew() {
|
|
em.setProperty("docked", "true");
|
|
|
|
em.setProperty("entry", "true");
|
|
em.setProperty("haveBalrog", "false");
|
|
em.schedule("stopentry", closeTime);
|
|
em.schedule("takeoff", beginTime);
|
|
}
|
|
|
|
function stopentry() {
|
|
em.setProperty("entry","false");
|
|
Orbis_Boat_Cabin.clearMapObjects(); //boxes
|
|
Ellinia_Boat_Cabin.clearMapObjects();
|
|
}
|
|
|
|
function takeoff() {
|
|
Orbis_btf.warpEveryone(Boat_to_Ellinia.getId());
|
|
Ellinia_btf.warpEveryone(Boat_to_Orbis.getId());
|
|
Ellinia_docked.broadcastShip(false);
|
|
Orbis_docked.broadcastShip(false);
|
|
|
|
em.setProperty("docked","false");
|
|
|
|
if(Math.random() < 0.42) em.schedule("approach", (invasionStartTime + (Math.random() * invasionDelayTime)));
|
|
em.schedule("arrived", rideTime);
|
|
}
|
|
|
|
function arrived() {
|
|
Boat_to_Orbis.warpEveryone(Orbis_Station.getId(), 0);
|
|
Orbis_Boat_Cabin.warpEveryone(Orbis_Station.getId(), 0);
|
|
Boat_to_Ellinia.warpEveryone(Ellinia_docked.getId(), 1);
|
|
Ellinia_Boat_Cabin.warpEveryone(Ellinia_docked.getId(), 1);
|
|
Orbis_docked.broadcastShip(true);
|
|
Ellinia_docked.broadcastShip(true);
|
|
Boat_to_Orbis.broadcastEnemyShip(false);
|
|
Boat_to_Ellinia.broadcastEnemyShip(false);
|
|
Boat_to_Orbis.killAllMonsters();
|
|
Boat_to_Ellinia.killAllMonsters();
|
|
em.setProperty("haveBalrog", "false");
|
|
scheduleNew();
|
|
}
|
|
|
|
function approach() {
|
|
if (Math.floor(Math.random() * 10) < 10) {
|
|
em.setProperty("haveBalrog","true");
|
|
Boat_to_Orbis.broadcastEnemyShip(true);
|
|
Boat_to_Ellinia.broadcastEnemyShip(true);
|
|
Boat_to_Orbis.broadcastMessage(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
|
|
Boat_to_Ellinia.broadcastMessage(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
|
|
|
|
em.schedule("invasion", invasionDelay);
|
|
}
|
|
}
|
|
|
|
function invasion() {
|
|
var map1 = Boat_to_Ellinia;
|
|
var pos1 = new java.awt.Point(-538, 143);
|
|
map1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos1);
|
|
map1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos1);
|
|
|
|
var map2 = Boat_to_Orbis;
|
|
var pos2 = new java.awt.Point(339, 148);
|
|
map2.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos2);
|
|
map2.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8150000), pos2);
|
|
}
|
|
|
|
function cancelSchedule() {
|
|
} |