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,14 +20,14 @@
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Shuri the Tour Guide - Orbis (200000000)
-- By ---------------------------------------------------------------------------------------------
Information & Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version
---------------------------------------------------------------------------------------------------
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Shuri the Tour Guide - Orbis (200000000)
-- By ---------------------------------------------------------------------------------------------
Information & Xterminator
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version
---------------------------------------------------------------------------------------------------
**/
var pay = 2000;
var ticket = 4031134;
@@ -37,7 +37,7 @@ var check;
var status = 0;
function start() {
cm.sendSimple("Have you heard of the beach with a spectacular view of the ocean called #b#m110000000##k, located a little far from #m"+cm.getPlayer().getMapId()+"#? I can take you there right now for either #b"+pay+" mesos#k, or if you have #b#t"+ticket+"##k with you, in which case you'll be in for free.\r\n\r\n#L0##bI'll pay "+pay+" mesos.#k#l\r\n#L1##bI have #t"+ticket+"##k#l\r\n#L2##bWhat is #t"+ticket+"#?#k#l");
cm.sendSimple("Have you heard of the beach with a spectacular view of the ocean called #b#m110000000##k, located a little far from #m" + cm.getPlayer().getMapId() + "#? I can take you there right now for either #b" + pay + " mesos#k, or if you have #b#t" + ticket + "##k with you, in which case you'll be in for free.\r\n\r\n#L0##bI'll pay " + pay + " mesos.#k#l\r\n#L1##bI have #t" + ticket + "##k#l\r\n#L2##bWhat is #t" + ticket + "#?#k#l");
}
function action(mode, type, selection) {
@@ -49,20 +49,22 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 1) {
if (selection == 0 || selection == 1) {
check = selection;
if (selection == 0)
msg = "You want to pay #b"+pay+" mesos#k and leave for #m110000000#?";
else if (selection == 1)
msg = "So you have #b#t"+ticket+"##k? You can always head over to #m110000000# with that.";
cm.sendYesNo(msg+" Okay!! Please beware that you may be running into some monsters around there though, so make sure not to get caught off-guard. Okay, would you like to head over to #m110000000# right now?");
if (selection == 0) {
msg = "You want to pay #b" + pay + " mesos#k and leave for #m110000000#?";
} else if (selection == 1) {
msg = "So you have #b#t" + ticket + "##k? You can always head over to #m110000000# with that.";
}
cm.sendYesNo(msg + " Okay!! Please beware that you may be running into some monsters around there though, so make sure not to get caught off-guard. Okay, would you like to head over to #m110000000# right now?");
} else if (selection == 2) {
cm.sendNext("You must be curious about #b#t"+ticket+"##k. Yeah, I can see that. #t"+ticket+"# is an item where as long as you have in possession, you may make your way to #m110000000# for free. It's such a rare item that even we had to buy those, but unfortunately I lost mine a few weeks ago during a long weekend.");
cm.sendNext("You must be curious about #b#t" + ticket + "##k. Yeah, I can see that. #t" + ticket + "# is an item where as long as you have in possession, you may make your way to #m110000000# for free. It's such a rare item that even we had to buy those, but unfortunately I lost mine a few weeks ago during a long weekend.");
status = 3;
}
} else if (status == 2) {
@@ -76,22 +78,24 @@ function action(mode, type, selection) {
}
} else if (check == 1) {
if (!cm.haveItem(ticket)) {
cm.sendOk("Hmmm, so where exactly is #b#t"+ticket+"##k?? Are you sure you have them? Please double-check.");
cm.sendOk("Hmmm, so where exactly is #b#t" + ticket + "##k?? Are you sure you have them? Please double-check.");
cm.dispose();
} else
} else {
access = true;
}
}
if (access) {
cm.getPlayer().saveLocation("FLORINA");
cm.warp(110000000, "st00");
cm.dispose();
}
} else if (status == 3)
cm.sendNext("You must be curious about #b#t"+ticket+"##k. Yeah, I can see that. #t"+ticket+"# is an item where as long as you have in possession, you may make your way to #m110000000# for free. It's such a rare item that even we had to buy those, but unfortunately I lost mine a few weeks ago during a long weekend.");
else if (status == 4)
} else if (status == 3) {
cm.sendNext("You must be curious about #b#t" + ticket + "##k. Yeah, I can see that. #t" + ticket + "# is an item where as long as you have in possession, you may make your way to #m110000000# for free. It's such a rare item that even we had to buy those, but unfortunately I lost mine a few weeks ago during a long weekend.");
} else if (status == 4) {
cm.sendPrev("I came back without it, and it just feels awful not having it. Hopefully someone picked it up and put it somewhere safe. Anyway this is my story and who knows, you may be able to pick it up and put it to good use. If you have any questions, feel free to ask");
else if (status == 5)
} else if (status == 5) {
cm.dispose();
}
}
}