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:
34
scripts/npc/1061010.js
Normal file
34
scripts/npc/1061010.js
Normal file
@@ -0,0 +1,34 @@
|
||||
var status = 0;
|
||||
var summon;
|
||||
var nthtext = "bonus";
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1)
|
||||
cm.dispose();//ExitChat
|
||||
else if (mode == 0)
|
||||
cm.dispose();//No
|
||||
else{ //Regular Talk
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0){
|
||||
cm.sendYesNo("Would you like to leave?");
|
||||
}else if(status == 1){
|
||||
if(cm.getMapId() == 108010101)cm.getPlayer().changeMap(105040305);
|
||||
if(cm.getMapId() == 108010201)cm.getPlayer().changeMap(100040106);
|
||||
if(cm.getMapId() == 108010301)cm.getPlayer().changeMap(105070001);
|
||||
if(cm.getMapId() == 108010401)cm.getPlayer().changeMap(107000402);
|
||||
if(cm.getMapId() == 108010501)cm.getPlayer().changeMap(105040305);
|
||||
var em = cm.getEventManager("3rdjob");
|
||||
em.getInstance(cm.getPlayer().getName()).unregisterPlayer(cm.getPlayer());
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user