Reformat and clean up npc scripts

This commit is contained in:
P0nk
2021-09-09 23:35:02 +02:00
parent 0c1545f81d
commit d893309b4f
665 changed files with 19932 additions and 19046 deletions

View File

@@ -20,48 +20,51 @@
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Jeff - El Nath : El Nath : Ice Valley II (211040200)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Jeff - El Nath : El Nath : Ice Valley II (211040200)
-- By ---------------------------------------------------------------------------------------------
Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Xterminator
---------------------------------------------------------------------------------------------------
**/
var status = 0;
function start() {
if(cm.haveItem(4031450, 1)) {
if (cm.haveItem(4031450, 1)) {
cm.warp(921100100, 1);
cm.dispose();
return;
}
cm.sendNext("Hey, you look like you want to go farther and deeper past this place. Over there, though, you'll find yourself surrounded by aggressive, dangerous monsters, so even if you feel that you're ready to go, please be careful. Long ago, a few brave men from our town went in wanting to eliminate anyone threatening the town, but never came back out...");
}
function action(mode, type, selection) {
if (mode == -1)
if (mode == -1) {
cm.dispose();
else {
} else {
if (status == 1 && mode == 0 && cm.getLevel() > 49) {
cm.sendNext("Even if your level's high it's hard to actually go in there, but if you ever change your mind, please find me. After all, my job is to protect this place.");
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
if (cm.getLevel() > 49)
if (cm.getLevel() > 49) {
cm.sendYesNo("If you are thinking of going in, I suggest you change your mind. But if you really want to go in... I'm only letting in the ones that are strong enough to stay alive in there. I do not wish to see anyone else die. Let's see... Hmmm...! You look pretty strong. All right, do you want to go in?");
else
} else {
cm.sendPrev("If you are thinking of going in, I suggest you change your mind. But if you really want to go in... I'm only letting in the ones that are strong enough to stay alive in there. I do not wish to see anyone else die. Let's see... Hmmm... You haven't reached Level 50 yet. I can't let you in, then, so forget it.");
}
} else if (status == 2) {
if (cm.getLevel() >= 50)
if (cm.getLevel() >= 50) {
cm.warp(211040300, 5);
}
cm.dispose();
}
}