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

@@ -31,21 +31,21 @@ function isTransformed(ch) {
}
function start() {
if(!(isTransformed(cm.getPlayer()) || cm.haveItem(4001086))) {
if (!(isTransformed(cm.getPlayer()) || cm.haveItem(4001086))) {
cm.sendOk("This is the cave of the mighty Horntail, supreme ruler of the Leafre Canyons. Only those #bdeemed worthy#k to meet him can pass here, #boutsiders#k are not welcome. Get lost!");
cm.dispose();
return;
}
cm.sendSimple("Welcome to Cave of Life - Entrance ! Would you like to go inside and fight #rHorntail#k ? If you want to fight him, you may might need some #b#v2000005##k, so you can recover some HP if you have been hit by #rHorntail#k.\r\n#L1#I would like to buy 10 for 100,000 Mesos!#l\r\n\#L2#No thanks, let me in now!#l");
}
function action(mode, type, selection) {
if (mode < 1)
if (mode < 1) {
cm.dispose();
else if (selection == 1) {
if(cm.getMeso() >= price) {
if(!cm.canHold(2000005)) {
} else if (selection == 1) {
if (cm.getMeso() >= price) {
if (!cm.canHold(2000005)) {
cm.sendOk("Sorry, you don't have a slot on your inventory for the item!");
} else {
cm.gainMeso(-price);
@@ -57,10 +57,11 @@ function action(mode, type, selection) {
}
cm.dispose();
} else if (selection == 2) {
if (cm.getLevel() > 99)
if (cm.getLevel() > 99) {
cm.warp(240050000, 0);
else
} else {
cm.sendOk("I'm sorry. You need to be atleast level 100 or above to enter.");
}
cm.dispose();
}
}