Files
sweetgum-server/scripts/npc/2040003.js
ronancpl ba6b5bc191 Crafters & keybinding & commands fix + updated MobBook info
Fixed player receiving DOT even if protected on Orbis Tower <B2>, added
HPbar on Rombot, fixed keybinding issue with clashing skill-item id's,
fixed some mischeckings on NPC crafters, fixed "travelling events"
sending players to random spawnpoints when arriving, fixed hair&face
commands, fixed dispel effect not showing to others, updated drop data
on mobbook.
2017-08-18 19:35:23 -03:00

50 lines
1.2 KiB
JavaScript

var status = 0;
var entry;
function start() {
if(cm.getPlayer().getMapId() == 922000000) {
entry = 0;
cm.sendYesNo("Do you wish to quit this stage?");
status++;
}
else if(cm.isQuestStarted(3239)) {
entry = 1;
cm.sendYesNo("Do you want to enter #bToy Factory<Sector 4>#k?");
status++;
}
else {
cm.sendOk("Access to #bToy Factory<Sector 4>#k is restricted to the public.");
}
}
function action(mode, type, selection) {
if(status == 1) {
if(entry == 0) {
if(mode <= 0) {
cm.sendOk("Ok. Call me if you urge to exit, then.");
cm.dispose();
return;
}
cm.warp(922000009, 0);
if(!(cm.isQuestStarted(3239) && cm.haveItem(4031092, 10))) cm.removeAll(4031092);
cm.dispose();
}
else {
if(mode <= 0) {
cm.dispose();
return;
}
if(cm.getWarpMap(922000000).countPlayers() == 0) {
cm.warp(922000000, 0);
if(!(cm.isQuestStarted(3239) && cm.haveItem(4031092, 10))) cm.removeAll(4031092);
} else {
cm.sendOk("Someone else is already attempting the parts. Wait for them to finish before you enter.");
}
cm.dispose();
}
}
}