Files
sweetgum-server/scripts/npc/1052007.js
ronancpl e169971384 Knights' Seal & I. MaxHP + Adherent mob status + Script point-warps
Fixed Seal skill not working for Blaze Wizard.
Added a check against Seal skill on bosses.
Reviewed improper usage of "random spawn point arrival" at several warps on scripts.
Refactored CPQ modules fetching players from the channel storage, this should be unneeded after a recent update on the player object from MPC.
Added door objects as a visible map object for the player server-side view component.
Fixed a few scenarios where mobs would unexpectedly show up impervious to mob status.
Fixed scenario where a player wouldn't receive disease informations from other players after changing maps.
Fixed some magic-type skills (such as Magic Claw or Freeze) not displaying damage value for other players when the player is within melee-range from the mob.
Added check for whether a given quest is scripted before trying to find the script.
Fixed registering items onto MTS leading to loss of a few of its properties (expiration, item level, etc).
Fixed "Improved MaxHP" skill gains not working for Thunderbreakers.
Refactored pet autopot to also apply on HP/MP consumption by items/skills.
Added portal sound effect on Mystic Doors.
2019-09-13 03:04:44 -03:00

89 lines
3.4 KiB
JavaScript

var status = 0;
var ticketSelection = -1;
var text = "Here's the ticket reader.";
var hasTicket = false;
var NLC = false;
var em;
function start() {
cm.sendSimple("Pick your destination.\n\r\n#L0##bKerning Square Shopping Center#l\n\n\r\n#L1#Enter Contruction Site#l\r\n#L2#New Leaf City#l");
}
function action(mode, type, selection) {
em = cm.getEventManager("Subway");
if (mode == -1) {
cm.dispose();
return;
} else if (mode == 0) {
cm.dispose();
return;
} else {
status++;
}
if (status == 1) {
if (selection == 0) {
var em = cm.getEventManager("KerningTrain");
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("The passenger wagon is already full. Try again a bit later.");
}
cm.dispose();
return;
} else if (selection == 1) {
if (cm.haveItem(4031036) || cm.haveItem(4031037) || cm.haveItem(4031038)) {
text += " You will be brought in immediately. Which ticket you would like to use?#b";
for (var i = 0; i < 3; i++) {
if (cm.haveItem(4031036 + i)) {
text += "\r\n#b#L" + (i + 1) + "##t" + (4031036 + i) +"#";
}
}
cm.sendSimple(text);
hasTicket = true;
} else {
cm.sendOk("It seems as though you don't have a ticket!");
cm.dispose();
return;
}
} else if (selection == 2) {
if (!cm.haveItem(4031711) && cm.getPlayer().getMapId() == 103000100) {
cm.sendOk("It seems you don't have a ticket! You can buy one from Bell.");
cm.dispose();
return;
}
if (em.getProperty("entry") == "true") {
cm.sendYesNo("It looks like there's plenty of room for this ride. Please have your ticket ready so I can let you in. The ride will be long, but you'll get to your destination just fine. What do you think? Do you want to get on this ride?");
} else {
cm.sendNext("We will begin boarding 1 minute before the takeoff. Please be patient and wait for a few minutes. Be aware that the subway will take off right on time, and we stop receiving tickets 1 minute before that, so please make sure to be here on time.");
cm.dispose();
return;
}
}
} else if (status == 2) {
if (hasTicket) {
ticketSelection = selection;
if (ticketSelection > -1) {
cm.gainItem(4031035 + ticketSelection, -1);
cm.warp(103000897 + (ticketSelection * 3), "st00"); // thanks IxianMace for noticing a few scripts having misplaced warp SP's
hasTicket = false;
cm.dispose();
return;
}
}
if (cm.haveItem(4031711)) {
if(em.getProperty("entry") == "false") {
cm.sendNext("We will begin boarding 1 minute before the takeoff. Please be patient and wait for a few minutes. Be aware that the subway will take off right on time, and we stop receiving tickets 1 minute before that, so please make sure to be here on time.");
}
else {
cm.gainItem(4031711, -1);
cm.warp(600010004);
}
cm.dispose();
return;
}
}
}