More PQ-esque script modules + HP Bar on some bosses

Completed (hopefully, now!) implementation of automated modules for PQ
scripting. Added HP bar for some bosses that wouldn't display it before
(like King Slime, Alishar and CRog).
This commit is contained in:
ronancpl
2017-05-09 20:02:10 -03:00
parent da00345aec
commit 73557f0d61
59 changed files with 943 additions and 608 deletions

View File

@@ -6,11 +6,8 @@
*/
var status = 0;
var minLevel = 1;
var maxLevel = 200;
var minPartySize = 1;
var maxPartySize = 6;
var state;
var em = null;
function onRestingSpot() {
return cm.getMapId() >= 970030001 && cm.getMapId() <= 970030010;
@@ -73,7 +70,14 @@ function action(mode, type, selection) {
cm.sendYesNo("Do you wish to abandon this event?");
}
else {
cm.sendSimple("#b<Party Quest: Boss Rush>#k\r\n\r\nWould you like to collaborate with party members to complete the expedition, or are you brave enough to take it on all by yourself? Have your #bparty leader#k talk to me or make yourself a party.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I want to find party members.\r\n#L2#I would like to hear more details.");
em = cm.getEventManager("BossRushPQ");
if(em == null) {
cm.sendOk("The Boss Rush PQ has encountered an error.");
cm.dispose();
return;
}
cm.sendSimple("#b<Party Quest: Boss Rush>\r\n#k" + em.getProperty("party") + "\r\n\r\nWould you like to collaborate with party members to complete the expedition, or are you brave enough to take it on all by yourself? Have your #bparty leader#k talk to me or make yourself a party.#b\r\n#L0#I want to participate in the party quest.\r\n#L1#I want to find party members.\r\n#L2#I would like to hear more details.");
}
} else if (status == 1) {
if(state == 3) {
@@ -87,7 +91,7 @@ function action(mode, type, selection) {
cm.dispose();
} else if(state == 2) {
var restSpot = ((cm.getMapId() - 1) % 5) + 1;
cm.getPlayer().getEventInstance().warpEventTeam(970030100 + (500 * restSpot)); //oh well, other maps won't be used anyway
cm.getPlayer().getEventInstance().warpEventTeam(970030100 + cm.getEventInstance().getIntProperty("lobby") + (500 * restSpot));
cm.dispose();
} else if(state == 1) {
cm.warp(970030000);
@@ -102,37 +106,23 @@ function action(mode, type, selection) {
cm.sendOk("Your party leader must talk to me to start this party quest.");
cm.dispose();
} else {
var em = cm.getEventManager("BossRushPQ");
if(em == null) {
cm.sendOk("The Boss Rush PQ has encountered an error.");
cm.dispose();
}
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
var prop = em.getProperty("state");
if (prop != null && prop.equals("0")) {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("A party in your name is already registered in this event.");
cm.dispose();
return;
}
cm.dispose();
} else {
if(!em.startInstance(0, cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
cm.dispose();
}
}
else {
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
cm.dispose();
}
cm.dispose();
}
} else if (selection == 1) {
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
cm.dispose();
} else {
cm.sendOk("#b<Party Quest: Boss Rush PQ>#k\r\nBrave adventurers from all over the places travels here to test their skills and abilities in combat, as they face even more powerful bosses from MapleStory. Join forces with fellow adventurers or face all the burden by yourself and receive all the glory, it is up to you. REWARDS are given accordingly to how far the adventurers reach and extra prizes may are given to a random member of the party, all attributed at the end of an expedition.");
cm.sendOk("#b<Party Quest: Boss Rush>#k\r\nBrave adventurers from all over the places travels here to test their skills and abilities in combat, as they face even more powerful bosses from MapleStory. Join forces with fellow adventurers or face all the burden by yourself and receive all the glory, it is up to you. REWARDS are given accordingly to how far the adventurers reach and extra prizes may are given to a random member of the party, all attributed at the end of an expedition.");
cm.dispose();
}
}