Files
sweetgum-server/scripts/quest/2333.js
ronancpl 3a882c7f31 Exp gain & Chaos scroll fix + Diet's MK Overhaul
Fixed issues with negative experience being distributed to characters
when killing a mob, rendering "Exp reset". Fixed chaos scroll behaving
oddly. Refactored debuff expirations to manage one list with registered
debuffs and expire times, thus lifting some load from the TimerManager.
Added concurrency protection on how World deals with parties. Thanks to
the DietStory dev team, fixed some issues with the MK maps.
2017-10-04 02:35:52 -03:00

65 lines
1.4 KiB
JavaScript

/*
QUEST: Where's Violetta?
NPC: none
*/
importPackage(Packages.server.life);
var status = -1;
var timeLimit = 10; //10 minutes
var eventTimer = 1000 * 60 * timeLimit;
var mobId = 3300008; //Prime Minister
function start(mode, type, selection){
if(mode == -1 || (mode == 0 && status == 0)){
qm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
if(status == 0){
qm.sendAcceptDecline("Please help me!");
}
else if(status == 1){
qm.sendNext("The #bPrime Minister#k is the one who plotted all this! Oh no! Here he comes...");
}
else if (status == 2){
qm.forceStartQuest();
var eim = qm.getEventInstance();
eim.startEventTimer(eventTimer);
qm.getPlayer().getMap().getPortal(1).setPortalState(false);
qm.getPlayer().getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(292, 143));
qm.dispose();
}
}
function end(mode, type, selection){
if(mode == -1 || (mode == 0 && status == 0)){
qm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
if(status == 0){
qm.sendNext("Hurray! #b#h ##k you defeated the #bPrime Minister#k.");
}
else if(status == 1){
qm.gainExp(15000 * qm.getPlayer().getExpRate());
qm.forceCompleteQuest();
var eim = qm.getEventInstance();
qm.getPlayer().getMap().getPortal(1).setPortalState(true);
eim.stopEventTimer();
eim.warpEventTeam(106021600);
eim.dispose();
qm.dispose();
}
}