Reformat and clean up event scripts
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Door boss Spawner (based on xQuasar's King Clang spawner)
|
||||
**/
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Door boss Spawner (based on xQuasar's King Clang spawner)
|
||||
**/
|
||||
|
||||
function init() {
|
||||
scheduleNew();
|
||||
@@ -33,15 +33,16 @@ function scheduleNew() {
|
||||
}
|
||||
|
||||
function cancelSchedule() {
|
||||
if (setupTask != null)
|
||||
if (setupTask != null) {
|
||||
setupTask.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
var bossMobid = 9400611;
|
||||
var bossMapid = 677000007;
|
||||
var bossMsg = "Crocell has appeared!";
|
||||
|
||||
|
||||
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
|
||||
if (map.getMonsterById(bossMobid) != null) {
|
||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||
@@ -56,7 +57,7 @@ function start() {
|
||||
var bossPos = new Point(171, 50);
|
||||
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
|
||||
|
||||
|
||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user