Reformat and clean up quest scripts

This commit is contained in:
P0nk
2021-09-09 23:36:54 +02:00
parent a78ca88a02
commit 3f43fe82d0
249 changed files with 4361 additions and 4247 deletions

View File

@@ -26,21 +26,21 @@
var status = -1;
function start(mode, type, selection) {
if(qm.getPlayer().getMeso() >= 1000000) {
if(qm.canHold(2022337, 1)) {
qm.gainItem(2022337, 1);
qm.gainMeso(-1000000);
//qm.sendOk("Nice doing business with you~~.");
qm.startQuest(3514);
} else {
qm.sendOk("Check out for a slot on your USE inventory first.");
}
if (qm.getPlayer().getMeso() >= 1000000) {
if (qm.canHold(2022337, 1)) {
qm.gainItem(2022337, 1);
qm.gainMeso(-1000000);
//qm.sendOk("Nice doing business with you~~.");
qm.startQuest(3514);
} else {
qm.sendOk("Oy, you don't have the money. I charge #r1,000,000 mesos#k for the emotion potion. No money, no deal.");
qm.sendOk("Check out for a slot on your USE inventory first.");
}
qm.dispose();
} else {
qm.sendOk("Oy, you don't have the money. I charge #r1,000,000 mesos#k for the emotion potion. No money, no deal.");
}
qm.dispose();
}
function usedPotion(ch) {
@@ -49,36 +49,36 @@ function usedPotion(ch) {
}
function end(mode, type, selection) {
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
qm.dispose();
return;
} else {
status++;
}
if(status == 0) {
if(!usedPotion(qm.getPlayer())) {
if(qm.haveItem(2022337)) {
qm.sendOk("Are you scared to drink the potion? I can assure you it has only a minor #rside effect#k.");
} else {
if(qm.canHold(2022337)) {
qm.gainItem(2022337, 1);
qm.sendOk("Lost it? Luckily for you I managed to recover it back. Take it.");
} else {
qm.sendOk("Lost it? Luckily for you I managed to recover it back. Make a room to get it.");
}
}
qm.dispose();
return;
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
qm.dispose();
return;
} else {
status++;
}
if (status == 0) {
if (!usedPotion(qm.getPlayer())) {
if (qm.haveItem(2022337)) {
qm.sendOk("Are you scared to drink the potion? I can assure you it has only a minor #rside effect#k.");
} else {
if (qm.canHold(2022337)) {
qm.gainItem(2022337, 1);
qm.sendOk("Lost it? Luckily for you I managed to recover it back. Take it.");
} else {
qm.sendOk("It seems the potion worked and your emotions are no longer frozen. And, oh, my... You're ailing bad, #bpurge#k that out quickly.");
qm.sendOk("Lost it? Luckily for you I managed to recover it back. Make a room to get it.");
}
} else if(status == 1) {
qm.gainExp(891500);
qm.completeQuest(3514);
qm.dispose();
}
qm.dispose();
} else {
qm.sendOk("It seems the potion worked and your emotions are no longer frozen. And, oh, my... You're ailing bad, #bpurge#k that out quickly.");
}
} else if (status == 1) {
qm.gainExp(891500);
qm.completeQuest(3514);
qm.dispose();
}
}