Implemented Kites, PlayerNPCs and C. Shop Surprise & Tweaked login

Added code support for Kites.
Reviewed concurrent access issues with pet autopot.
Addressed PlayerStorage issue where characters would not be properly deregistered from channel PlayerStorage in certain situations.
Implemented harp quest (questid 3314) because of reasons.
Added SFX to signalize KC/NLC subway departing/approaching.
Changed traveling time values to work similarly to GMS.
Properly developed the PlayerNPC feature in the source.
Added autodeployable PlayerNPC system and Hall of Fame.
Solved a glitch with NLC mayor's quiz questline that would allow a player to restart the quiz as many times one would see fit.
Added a custom server flag that allows overwriting the ToT 999 mobs to a new value (technically it doesn't overwrite, rather sets the player at quest start with 999 - n credited mobs).
Fixed permanent pets expiring after a while.
Added code support for Cash Shop Surprise item.
Reviewed login handler system as a whole, protecting many exposed flaws.
Solved a bug with ULTRA_THREE_SNAILS sometimes taking wrong etc shell from inventory.
This commit is contained in:
ronancpl
2018-05-19 14:28:06 -03:00
parent 80b1776ad3
commit fca7b2adaa
5747 changed files with 225411 additions and 12868 deletions

View File

@@ -1,9 +1,5 @@
importPackage(Packages.tools);
//Time Setting is in millisecond
var closeTime = 24 * 1000; //The time to close the gate
var beginTime = 30 * 1000; //The time to begin the ride
var rideTime = 15 * 1000; //The time that require move to destination
var KC_bfd;
var Plane_to_CBD;
var CBD_docked;
@@ -11,6 +7,11 @@ var CBD_bfd;
var Plane_to_KC;
var KC_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 = 1 * 60 * 1000; //The time that require move to destination
function init() {
KC_bfd = em.getChannelServer().getMapFactory().getMap(540010100);
CBD_bfd = em.getChannelServer().getMapFactory().getMap(540010001);

View File

@@ -2,13 +2,6 @@ importPackage(Packages.client);
importPackage(Packages.tools);
importPackage(Packages.server.life);
//Time Setting is in millisecond
var closeTime = 50 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 120 * 1000; //The time that require move to destination
var invasionStartTime = 30 * 1000; //The time to balrog ship approach
var invasionDelayTime = 15 * 1000; //The time to balrog ship approach
var invasionDelay = 5 * 1000; //The time that spawn balrog
var Orbis_btf;
var Boat_to_Orbis;
var Orbis_Boat_Cabin;
@@ -17,6 +10,14 @@ 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() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000112);
Ellinia_btf = em.getChannelServer().getMapFactory().getMap(101000301);

View File

@@ -41,10 +41,6 @@
importPackage(Packages.tools);
//Time Setting is in millisecond
var closeTime = 50 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 60 * 1000; //The time that require move to destination
var Orbis_btf;
var Leafre_btf;
var Cabin_to_Orbis;
@@ -52,6 +48,11 @@ var Cabin_to_Leafre;
var Orbis_docked;
var Leafre_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 = 5 * 60 * 1000; //The time that require move to destination
function init() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000132);
Leafre_btf = em.getChannelServer().getMapFactory().getMap(240000111);

View File

@@ -21,10 +21,6 @@
*/
importPackage(Packages.tools);
//Time Setting is in millisecond
var closeTime = 50 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 60 * 1000; //The time that require move to destination
var Orbis_btf;
var Genie_to_Orbis;
var Orbis_docked;
@@ -32,6 +28,11 @@ var Ariant_btf;
var Genie_to_Ariant;
var Ariant_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 = 5 * 60 * 1000; //The time that require move to destination
function init() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000152);
Ariant_btf = em.getChannelServer().getMapFactory().getMap(260000110);

View File

@@ -7,9 +7,11 @@ var myRide;
var returnMap;
var exitMap;
var map;
var timeOnRide = 60; //Seconds
var onRide;
//Time Setting is in millisecond
var rideTime = 60 * 1000;
function init() {}
function setup() {
@@ -29,8 +31,9 @@ function playerEntry(eim, player) {
returnMap = eim.getMapFactory().getMap(returnTo[myRide]);
onRide = eim.getMapFactory().getMap(birdRide[myRide]);
player.changeMap(onRide, onRide.getPortal(0));
player.getClient().getSession().write(MaplePacketCreator.getClock(timeOnRide));
eim.schedule("timeOut", timeOnRide * 1000);
player.getClient().getSession().write(MaplePacketCreator.getClock(rideTime / 1000));
eim.schedule("timeOut", rideTime);
}
function timeOut(eim) {

View File

@@ -7,9 +7,11 @@ var myRide;
var returnMap;
var exitMap;
var map;
var timeOnRide = 10; //Seconds
var onRide;
//Time Setting is in millisecond
var rideTime = 10 * 1000;
function init() {}
function setup() {
@@ -30,8 +32,10 @@ function playerEntry(eim, player) {
returnMap = eim.getMapFactory().getMap(returnTo[myRide]);
onRide = eim.getMapFactory().getMap(trainRide[myRide]);
player.changeMap(onRide, onRide.getPortal(0));
player.getClient().getSession().write(MaplePacketCreator.getClock(timeOnRide));
eim.schedule("timeOut", timeOnRide * 1000);
player.getClient().getSession().write(MaplePacketCreator.getClock(rideTime / 1000));
player.getClient().getSession().write(MaplePacketCreator.earnTitleMessage("The next stop is at Kerning " + (myRide == 0 ? "Square" : "Subway") + " Station. The exit is to your left."));
eim.schedule("timeOut", rideTime);
}
function timeOut(eim) {

View File

@@ -1,7 +1,5 @@
//Time Setting is in millisecond
var closeTime = 24 * 1000; //[24 seconds] The time to close the gate
var beginTime = 30 * 1000; //[30 seconds] The time to begin the ride
var rideTime = 30 * 1000; //[30 seconds] The time that require move to destination
importPackage(Packages.tools);
var KC_Waiting;
var Subway_to_KC;
var KC_docked;
@@ -9,6 +7,11 @@ var NLC_Waiting;
var Subway_to_NLC;
var NLC_docked;
//Time Setting is in millisecond
var closeTime = 50 * 1000; //The time to close the gate
var beginTime = 1 * 60 * 1000; //The time to begin the ride
var rideTime = 4 * 60 * 1000; //The time that require move to destination
function init() {
KC_Waiting = em.getChannelServer().getMapFactory().getMap(600010004);
NLC_Waiting = em.getChannelServer().getMapFactory().getMap(600010002);
@@ -31,6 +34,9 @@ function stopEntry() {
}
function takeoff() {
KC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
NLC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
em.setProperty("docked","false");
KC_Waiting.warpEveryone(Subway_to_NLC.getId());
NLC_Waiting.warpEveryone(Subway_to_KC.getId());
@@ -41,6 +47,9 @@ function arrived() {
Subway_to_KC.warpEveryone(KC_docked.getId(), 0);
Subway_to_NLC.warpEveryone(NLC_docked.getId(), 0);
scheduleNew();
KC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
NLC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
}
function cancelSchedule() {

View File

@@ -10,9 +10,9 @@ var Orbis_Station;
var Ludibrium_Station;
//Time Setting is in millisecond
var closeTime = 50 * 1000; //The time to close the gate
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 60 * 1000; //The time that require move to destination
var closeTime = 4 * 60 * 1000; //The time to close the gate
var beginTime = 5 * 60 * 1000; //The time to begin the ride
var rideTime = 5 * 60 * 1000; //The time that require move to destination
function init() {
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000122);

View File

@@ -19,6 +19,11 @@ 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/>.
*/
//Time Setting is in millisecond
var beginTime = 60 * 1000; //The time to begin the ride
var rideTime = 60 * 1000; //The time that require move to destination
function init() {
em.getChannelServer().getMapFactory().getMap(222020100).resetReactors();
em.getChannelServer().getMapFactory().getMap(222020200).resetReactors();
@@ -32,21 +37,21 @@ function scheduleNew() {
em.getChannelServer().getMapFactory().getMap(222020100).resetReactors();
em.getChannelServer().getMapFactory().getMap(222020200).setReactorState();
em.schedule("goingUpNow", 50000);
em.schedule("goingUpNow", beginTime);
}
function goUp() {
em.schedule("goingUpNow", 50000); // might be 60
em.schedule("goingUpNow", beginTime);
}
function goDown() {
em.schedule("goingDownNow", 50000); // might be 60
em.schedule("goingDownNow", beginTime);
}
function goingUpNow() {
em.getChannelServer().getMapFactory().getMap(222020110).warpEveryone(222020111);
em.setProperty("goingUp", "true");
em.schedule("isUpNow", 55000);
em.schedule("isUpNow", rideTime);
em.getChannelServer().getMapFactory().getMap(222020100).setReactorState();
}
@@ -54,7 +59,7 @@ function goingUpNow() {
function goingDownNow() {
em.getChannelServer().getMapFactory().getMap(222020210).warpEveryone(222020211);
em.setProperty("goingDown", "true");
em.schedule("isDownNow", 55000);
em.schedule("isDownNow", rideTime);
em.getChannelServer().getMapFactory().getMap(222020200).setReactorState();
}