Reformat and clean up npc scripts
This commit is contained in:
@@ -20,57 +20,59 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Wiz the Librarian - Helios Tower <Library>(222020000)
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Information
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.0 - First Version by Information
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Wiz the Librarian - Helios Tower <Library>(222020000)
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Information
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.0 - First Version by Information
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
var status = 0;
|
||||
var questid = new Array(3615,3616,3617,3618,3630,3633,3639,3920);
|
||||
var questitem = new Array(4031235,4031236,4031237,4031238,4031270,4031280,4031298,4031591);
|
||||
var questid = [3615, 3616, 3617, 3618, 3630, 3633, 3639, 3920];
|
||||
var questitem = [4031235, 4031236, 4031237, 4031238, 4031270, 4031280, 4031298, 4031591];
|
||||
var counter = 0;
|
||||
var books;
|
||||
var i;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
if(counter == 0) {
|
||||
books = "";
|
||||
for(i=0; i < questid.length; i++) {
|
||||
if(cm.isQuestCompleted(questid[i])) {
|
||||
counter += 1;
|
||||
books += "\r\n#v"+questitem[i]+"# #b#t"+questitem[i]+"##k";
|
||||
}
|
||||
}
|
||||
if(counter == 0)
|
||||
counter = 99;
|
||||
}
|
||||
if(counter == 99) {
|
||||
cm.sendOk("#b#h ##k has not returned a single storybook yet.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendNext("Let's see.. #b#h ##k have returned a total of #b"+counter+"#k books. The list of returned books is as follows:"+books);
|
||||
}
|
||||
} else if (status == 1) {
|
||||
cm.sendNextPrev("The library is settling down now thanks chiefly to you, #b#h ##k's immense help. If the story gets mixed up once again, then I'll be counting on you to fix it once more.");
|
||||
} else if (status == 2) {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
if (status == 0) {
|
||||
if (counter == 0) {
|
||||
books = "";
|
||||
for (i = 0; i < questid.length; i++) {
|
||||
if (cm.isQuestCompleted(questid[i])) {
|
||||
counter += 1;
|
||||
books += "\r\n#v" + questitem[i] + "# #b#t" + questitem[i] + "##k";
|
||||
}
|
||||
}
|
||||
if (counter == 0) {
|
||||
counter = 99;
|
||||
}
|
||||
}
|
||||
if (counter == 99) {
|
||||
cm.sendOk("#b#h ##k has not returned a single storybook yet.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendNext("Let's see.. #b#h ##k have returned a total of #b" + counter + "#k books. The list of returned books is as follows:" + books);
|
||||
}
|
||||
} else if (status == 1) {
|
||||
cm.sendNextPrev("The library is settling down now thanks chiefly to you, #b#h ##k's immense help. If the story gets mixed up once again, then I'll be counting on you to fix it once more.");
|
||||
} else if (status == 2) {
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user