Reformat and clean up npc scripts
This commit is contained in:
@@ -20,17 +20,17 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Hotel Receptionist - Sleepywood Hotel(105040400)
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Unknown
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.3 - More Cleanup by Moogra - 12/17/09
|
||||
1.2 - Cleanup and Statement fix by Moogra
|
||||
1.1 - Statement fix [Information]
|
||||
1.0 - First Version by Unknown
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||
Hotel Receptionist - Sleepywood Hotel(105040400)
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Unknown
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.3 - More Cleanup by Moogra - 12/17/09
|
||||
1.2 - Cleanup and Statement fix by Moogra
|
||||
1.1 - Statement fix [Information]
|
||||
1.0 - First Version by Unknown
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
var status = 0;
|
||||
var regcost = 499;
|
||||
@@ -42,9 +42,9 @@ function start() {
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1 || (mode == 0 && status == 1))
|
||||
if (mode == -1 || (mode == 0 && status == 1)) {
|
||||
cm.dispose();
|
||||
else {
|
||||
} else {
|
||||
if (mode == 0 && status == 2) {
|
||||
cm.sendNext("We offer other kinds of services, too, so please think carefully and then make your decision.");
|
||||
cm.dispose();
|
||||
@@ -55,25 +55,27 @@ function action(mode, type, selection) {
|
||||
cm.sendSimple("We offer two kinds of rooms for our service. Please choose the one of your liking.\r\n#b#L0#Regular sauna (" + regcost + " mesos per use)#l\r\n#L1#VIP sauna (" + vipcost + " mesos per use)#l");
|
||||
iwantreg = 1;
|
||||
} else if (status == 2) {
|
||||
if (selection == 0)
|
||||
if (selection == 0) {
|
||||
cm.sendYesNo("You have chosen the regular sauna. Your HP and MP will recover fast and you can even purchase some items there. Are you sure you want to go in?");
|
||||
else if (selection == 1) {
|
||||
} else if (selection == 1) {
|
||||
cm.sendYesNo("You've chosen the VIP sauna. Your HP and MP will recover even faster than that of the regular sauna and you can even find a special item in there. Are you sure you want to go in?");
|
||||
iwantreg = 0;
|
||||
iwantreg = 0;
|
||||
}
|
||||
} else if (status == 3) {
|
||||
if (iwantreg == 1) {
|
||||
if (cm.getMeso() >= regcost) {
|
||||
cm.warp(105040401);
|
||||
cm.gainMeso(-regcost);
|
||||
} else
|
||||
} else {
|
||||
cm.sendNext("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + regcost + "mesos to stay at our hotel.");
|
||||
}
|
||||
} else {
|
||||
if (cm.getMeso() >= vipcost) {
|
||||
cm.warp(105040402);
|
||||
cm.gainMeso(-vipcost);
|
||||
} else
|
||||
} else {
|
||||
cm.sendNext("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + vipcost + "mesos to stay at our hotel.");
|
||||
}
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user