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

@@ -22,24 +22,24 @@
* @author: Ronan
* @npc: Hidden Documents
* @func: Yulete lab 2 quest
*/
*/
function start() {
if(cm.isQuestStarted(3367)) {
if (cm.isQuestStarted(3367)) {
var c = cm.getQuestProgressInt(3367, 30);
if(c >= 30) {
if (c >= 30) {
cm.sendNext("(All files have been organized. Report the found files to Yulete.)", 2);
cm.dispose();
return;
}
var book = (cm.getNpcObjectId() % 30);
var prog = cm.getQuestProgressInt(3367, book);
if(prog == 0) {
if (prog == 0) {
c++;
if(book < 20) {
if(!cm.canHold(4031797, 1)) {
if (book < 20) {
if (!cm.canHold(4031797, 1)) {
cm.sendNext("(You found a report file, but since your ETC is full you choose to put the file in the place you've found.)");
cm.dispose();
return;
@@ -48,13 +48,13 @@ function start() {
cm.setQuestProgress(3367, 31, cm.getQuestProgressInt(3367, 31) + 1);
}
}
cm.sendNext("(Organized file. #r" + (30 - c) + "#k left.)", 2);
cm.setQuestProgress(3367, book, 1);
cm.setQuestProgress(3367, 30, c);
}
}
cm.dispose();
}