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.
This commit is contained in:
45
scripts/npc/2040003.js
Normal file
45
scripts/npc/2040003.js
Normal file
@@ -0,0 +1,45 @@
|
||||
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);
|
||||
if(!(cm.isQuestStarted(3239) && cm.haveItem(4031092, 10))) cm.removeAll(4031092);
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
else {
|
||||
if(mode <= 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.warp(922000000);
|
||||
if(!(cm.isQuestStarted(3239) && cm.haveItem(4031092, 10))) cm.removeAll(4031092);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user