Scrolls for spike/cold protection + quest completion with equipped items

Added mechanic for the scrolls for spikes on shoes and cold protection
on capes. Fixed an issue where equipped items were being counted towards
materials for quests, therefore showing odds behaviours when completing
it. Fixed some minor issues on the dollhouse quest/event.
This commit is contained in:
ronancpl
2017-05-22 01:49:35 -03:00
parent 514656d238
commit 53927576e7
14 changed files with 152 additions and 115 deletions

View File

@@ -24,24 +24,39 @@
*/
var greeting;
var status;
function start() {
var greeting = "Thank you for finding the pendulum. Are you ready to return to Eos Tower?";
if (cm.isQuestStarted(3230)) {
if (cm.haveItem(4031094)) {
cm.completeQuest(3230);
cm.gainItem(4031094, -1);
} else
greeting = "You haven't found the pendulum yet. Do you want to go back to Eos Tower?";
}
cm.sendYesNo(greeting);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode > 0) {
var em = cm.getEventManager("DollHouse");
var eim = em.getInstance("DollHouse");
eim.exitPlayer(cm.getPlayer());
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
var greeting = "Thank you for finding the pendulum. Are you ready to return to Eos Tower?";
if (cm.isQuestStarted(3230)) {
if (cm.haveItem(4031094)) {
cm.completeQuest(3230);
cm.gainItem(4031094, -1);
} else
greeting = "You haven't found the pendulum yet. Do you want to go back to Eos Tower?";
}
cm.sendYesNo(greeting);
} else if(status == 1) {
cm.warp(221024400, 4);
cm.dispose();
}
}
cm.dispose();
}