Reformat and clean up event scripts
This commit is contained in:
@@ -21,23 +21,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Cabin between Orbis and Leafre
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Information
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.5 - Fix for infinity looping [Information]
|
||||
1.4 - Ship/boat is now showed
|
||||
- Removed temp message[Information]
|
||||
- Credits to Snow, superraz777 for old source
|
||||
- Credits to Titan, Kool for the ship/boat packet
|
||||
1.3 - Removing some function since is not needed [Information]
|
||||
- Remove register player menthod [Information]
|
||||
1.2 - It should be 2 ships not 1 [Information]
|
||||
1.1 - Add timer variable for easy edit [Information]
|
||||
1.0 - First Version by Information
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Cabin between Orbis and Leafre
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Information
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.5 - Fix for infinity looping [Information]
|
||||
1.4 - Ship/boat is now showed
|
||||
- Removed temp message[Information]
|
||||
- Credits to Snow, superraz777 for old source
|
||||
- Credits to Titan, Kool for the ship/boat packet
|
||||
1.3 - Removing some function since is not needed [Information]
|
||||
- Remove register player menthod [Information]
|
||||
1.2 - It should be 2 ships not 1 [Information]
|
||||
1.1 - Add timer variable for easy edit [Information]
|
||||
1.0 - First Version by Information
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
var Orbis_btf;
|
||||
var Leafre_btf;
|
||||
@@ -49,13 +49,13 @@ 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
|
||||
var rideTime = 5 * 60 * 1000; //The time that require move to destination
|
||||
|
||||
function init() {
|
||||
closeTime = em.getTransportationTime(closeTime);
|
||||
beginTime = em.getTransportationTime(beginTime);
|
||||
rideTime = em.getTransportationTime(rideTime);
|
||||
|
||||
rideTime = em.getTransportationTime(rideTime);
|
||||
|
||||
Orbis_btf = em.getChannelServer().getMapFactory().getMap(200000132);
|
||||
Leafre_btf = em.getChannelServer().getMapFactory().getMap(240000111);
|
||||
Cabin_to_Orbis = em.getChannelServer().getMapFactory().getMap(200090210);
|
||||
@@ -64,7 +64,7 @@ function init() {
|
||||
Leafre_docked = em.getChannelServer().getMapFactory().getMap(240000110);
|
||||
Orbis_Station = em.getChannelServer().getMapFactory().getMap(200000100);
|
||||
Leafre_Station = em.getChannelServer().getMapFactory().getMap(240000100);
|
||||
|
||||
|
||||
scheduleNew();
|
||||
}
|
||||
|
||||
@@ -72,37 +72,37 @@ function scheduleNew() {
|
||||
em.setProperty("docked", "true");
|
||||
Orbis_docked.setDocked(true);
|
||||
Leafre_docked.setDocked(true);
|
||||
|
||||
|
||||
em.setProperty("entry", "true");
|
||||
em.schedule("stopEntry", closeTime); //The time to close the gate
|
||||
em.schedule("takeoff", beginTime); //The time to begin the ride
|
||||
}
|
||||
|
||||
function stopEntry() {
|
||||
em.setProperty("entry","false");
|
||||
em.setProperty("entry", "false");
|
||||
}
|
||||
|
||||
function takeoff() {
|
||||
Orbis_btf.warpEveryone(Cabin_to_Leafre.getId());
|
||||
Leafre_btf.warpEveryone(Cabin_to_Orbis.getId());
|
||||
|
||||
|
||||
Orbis_docked.broadcastShip(false);
|
||||
Leafre_docked.broadcastShip(false);
|
||||
|
||||
em.setProperty("docked","false");
|
||||
|
||||
em.setProperty("docked", "false");
|
||||
Orbis_docked.setDocked(false);
|
||||
Leafre_docked.setDocked(false);
|
||||
|
||||
|
||||
em.schedule("arrived", rideTime); //The time that require move to destination
|
||||
}
|
||||
|
||||
function arrived() {
|
||||
Cabin_to_Orbis.warpEveryone(Orbis_Station.getId(), 0);
|
||||
Cabin_to_Leafre.warpEveryone(Leafre_Station.getId(), 0);
|
||||
|
||||
|
||||
Orbis_docked.broadcastShip(true);
|
||||
Leafre_docked.broadcastShip(true);
|
||||
|
||||
|
||||
scheduleNew();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user