Files
sweetgum-server/scripts/npc/9270018.js
ronancpl 7f178a3d80 Multi World NPCs + patch on Player interactions
Made NPCs now work properly on multiworld system. Solved multiple issues
regarding Player Shops not giving back items properly when owner exits.
Added restriction on changing channels at FM rooms, preventing shop
owner entering Cash Shop.
2017-05-28 22:11:39 -03:00

86 lines
2.8 KiB
JavaScript

/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Kerny - Pilot
-- By ---------------------------------------------------------------------------------------------
Information
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Information
2.0 - Second Version by Jayd
---------------------------------------------------------------------------------------------------
**/
var k2s;
var airport;
var s2k;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if(mode == -1) {
cm.dispose();
return;
}
if(mode == 1) {
status++;
}
if(mode == 0) {
if (cm.getMapId() == 540010101) {
cm.sendOk("Please hold on for a sec, and we're reaching Singapore! Thanks for your patience.");
cm.dispose();
return;
} else {
cm.sendOk("Please hold on for a sec, and we're reaching Kerning City! Thanks for your patience.");
cm.dispose();
return;
}
}
if(status == 0) {
if (cm.getMapId() == 540010001) {
cm.sendYesNo("The plane is taking off soon, are you sure you want to leave now? The ticket is not refundable.");
airport = 1;
} else if (cm.getMapId() == 540010002) {
cm.sendYesNo("We're reaching Kerning City in a minute, are you sure you want to leave now? The ticket is not refundable.");
s2k = 1;
} else if (cm.getMapId() == 540010101) {
cm.sendYesNo("We're reaching Singapore in a minute, are you sure you want to leave now? The ticket is not refundable.");
k2s = 1;
}
} else if(status == 1) {
if (k2s == 1) {
cm.warp(103000000);
cm.sendOk("Hope to see you again soon!");
cm.dispose();
} else if (airport == 1) {
cm.warp(540010000);
cm.sendOk("Hope to see you again soon!");
cm.dispose();
} else if (s2k == 1) {
cm.warp(540010000);
cm.sendOk("Hope to see you again soon!");
cm.dispose();
}
}
}