Handle reactor scheduling outside of script

No longer need to make all invocations synchronized
This commit is contained in:
P0nk
2021-05-21 08:14:07 +02:00
parent f9aec05779
commit bcefd42093
4 changed files with 21 additions and 45 deletions

View File

@@ -2,14 +2,9 @@
* 5511000.js: Summons Targa.
*/
function summonBoss() {
rm.spawnMonster(9420542,-527,637);
rm.changeMusic("Bgm09/TimeAttack");
rm.mapMessage(6, "Beware! The furious Targa has shown himself!");
}
function act() {
if (rm.getReactor().getMap().getMonsterById(9420542) == null) {
rm.schedule("summonBoss", 3200);
const targaMobId = 9420542;
if (rm.getReactor().getMap().getMonsterById(targaMobId) == null) {
rm.summonBossDelayed(targaMobId, 3200, -527, 637, "Bgm09/TimeAttack", "Beware! The furious Targa has shown himself!");
}
}

View File

@@ -2,14 +2,9 @@
* 5511001.js: Summons Scarlion.
*/
function summonBoss() {
rm.spawnMonster(9420547,-238,636);
rm.changeMusic("Bgm09/TimeAttack");
rm.mapMessage(6, "Beware! The furious Scarlion has shown himself!");
}
function act() {
if (rm.getReactor().getMap().getMonsterById(9420547) == null) {
rm.schedule("summonBoss", 3200);
}
const scarlionMobId = 9420547;
if (rm.getReactor().getMap().getMonsterById(scarlionMobId) == null) {
rm.summonBossDelayed(scarlionMobId, 3200, -238, 636, "Bgm09/TimeAttack", "Beware! The furious Scarlion has shown himself!");
}
}