Implemented CWKPQ
Made CWKPQ fully-functional, using the Expedition system (won't work with the lobby system).
This commit is contained in:
@@ -6,16 +6,16 @@
|
||||
var status = -1;
|
||||
|
||||
function start() {
|
||||
if (cm.getPlayer().getLevel() < 120) {
|
||||
cm.sendOk("There is a level requirement of 120 to attempt Pink Bean.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (cm.getPlayer().getClient().getChannel() != 5) {
|
||||
cm.sendOk("Pink Bean may only be attempted on channel 5.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (cm.getPlayer().getLevel() < 120) {
|
||||
cm.sendOk("There is a level requirement of 120 to attempt Pink Bean.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (cm.getPlayer().getClient().getChannel() != 5) {
|
||||
cm.sendOk("Pink Bean may only be attempted on channel 5.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
var em = cm.getEventManager("PinkBeanBattle");
|
||||
|
||||
if (em == null) {
|
||||
|
||||
@@ -24,6 +24,8 @@ function start() {
|
||||
} else {
|
||||
cm.sendOk("Make room on your ETC inventory first.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("The weapon inside this room has already been retrieved.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("Eliminate all Crimson Guardians.");
|
||||
|
||||
@@ -24,6 +24,8 @@ function start() {
|
||||
} else {
|
||||
cm.sendOk("Make room on your ETC inventory first.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("The weapon inside this room has already been retrieved.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("Eliminate all Master Guardians.");
|
||||
|
||||
@@ -9,13 +9,6 @@ function start() {
|
||||
cm.sendOk("A name forever remembered, Rafael was an exceptionally skilled sorcerer, and the foremost master of mental magic powers, telekinesis and telepathy. In addition to that, he was one of the 'Elite Mages' who mastered all the elements. He was last seen looking for the 'Temple of the Elementals' to turn the tide against the invading Krakian Army...");
|
||||
cm.dispose();
|
||||
} else if (cm.getPlayer().getMapId() == 610030521) {
|
||||
if (cm.getPlayer().getMap().countMonsters() == 0) {
|
||||
cm.warp(610030522,0);
|
||||
} else {
|
||||
cm.sendOk("Eliminate all monsters.");
|
||||
}
|
||||
cm.dispose();
|
||||
} else if (cm.getPlayer().getMapId() == 610030522) {
|
||||
if (cm.getPlayer().getMap().countMonsters() == 0) {
|
||||
var eim = cm.getEventInstance();
|
||||
var stgStatus = eim.getIntProperty("glpq5_room");
|
||||
@@ -31,10 +24,20 @@ function start() {
|
||||
} else {
|
||||
cm.sendOk("Make room on your ETC inventory first.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("The weapon inside this room has already been retrieved.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("Eliminate all monsters.");
|
||||
}
|
||||
cm.dispose();
|
||||
} /* else if (cm.getPlayer().getMapId() == 610030522) {
|
||||
if (cm.getPlayer().getMap().countMonsters() == 0) {
|
||||
cm.warp(610030522,0);
|
||||
} else {
|
||||
cm.sendOk("Eliminate all monsters.");
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -7,10 +7,10 @@ function start() {
|
||||
cm.sendOk("As every Thief knows, the best attack is the one you never see coming. So, to best illustrate this, you'll be in a chamber with platforms and ledges that you can only get to with Haste, as well as All-Seeing Eyes that your dagger or claw must close--permanently. After all the All-Seeing Eyes have been eliminated, get ti the Thief Statue and lay claim to the Primal Claw! Good luck!");
|
||||
break;
|
||||
case 610030000:
|
||||
cm.sendOk("Once known as the 'Prince of Shadows', Grandmaster Ryo possessed supreme speed and power with short-ranged daggers and longer chain-like Claw. A part-time memeber of the Bosshunters, he was reowned for unparalleled ability to blend into the very nigth itself. His legend grew during a battle with Crimson Balrog, where he moved so swiftly that Balrog's attacks only caught air. Ryo also performed occasional 'retrievals' for those less fortunate than himself.");
|
||||
cm.sendOk("Once known as the 'Prince of Shadows', Grandmaster Ryo possessed supreme speed and power with short-ranged daggers and longer chain-like Claw. A part-time member of the Bosshunters, he was reowned for unparalleled ability to blend into the very nigth itself. His legend grew during a battle with Crimson Balrog, where he moved so swiftly that Balrog's attacks only caught air. Ryo also performed occasional 'retrievals' for those less fortunate than himself.");
|
||||
break;
|
||||
case 610030530:
|
||||
if (cm.isAllReactorState(6108004, 1) && !cm.haveItem(4001256, 1)) {
|
||||
if (cm.isAllReactorState(6108004, 1)) {
|
||||
var eim = cm.getEventInstance();
|
||||
var stgStatus = eim.getIntProperty("glpq5_room");
|
||||
var jobNiche = cm.getPlayer().getJob().getJobNiche();
|
||||
@@ -25,6 +25,8 @@ function start() {
|
||||
} else {
|
||||
cm.sendOk("Make room on your ETC inventory first.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("The weapon inside this room has already been retrieved.");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("Go now, destroy all of the watchful eyes with your mobility skills, fellow Thief. Report back to me when you are done.");
|
||||
|
||||
@@ -24,11 +24,6 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (!cm.isEventLeader()) {
|
||||
cm.sendNext("I wish for your leader to talk to me.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
switch(cm.getPlayer().getMapId()) {
|
||||
case 610030100:
|
||||
if (status == 0) {
|
||||
@@ -38,7 +33,6 @@ function action(mode, type, selection) {
|
||||
} else if (status == 2) {
|
||||
cm.sendNext("You can find the portal somewhere around here... you'd better find it, quick. I'll catch up.");
|
||||
cm.dispose();
|
||||
eim.setProperty("glpq1", "1");
|
||||
}
|
||||
break;
|
||||
case 610030200:
|
||||
@@ -51,9 +45,9 @@ function action(mode, type, selection) {
|
||||
break;
|
||||
case 610030300:
|
||||
if (status == 0) {
|
||||
cm.sendNext("Now what we have here are more Sigils. All five Adventurers have to climb to the very top and go through the portal.");
|
||||
cm.sendNext("Now what we have here are more Sigils. At least five Adventurers have to climb to the very top and go through the portal. Stay aware though: not every wall or ground on this map is what it seems to be, so tread lightly!");
|
||||
} else if (status == 1) {
|
||||
cm.sendNext("Beware of these death traps: Menhirs. They really pack a punch.");
|
||||
cm.sendNext("Oh, and beware of these death traps: Menhirs. They really pack a punch. Good luck.");
|
||||
cm.dispose();
|
||||
}
|
||||
break;
|
||||
@@ -61,7 +55,7 @@ function action(mode, type, selection) {
|
||||
if (status == 0) {
|
||||
cm.sendNext("Now what we have here are more Sigils. However, some of them don't work. Here all jobs must fill their roles, as at least one of these Sigils are activated by their job skills, however there can be more than one per job, so be sure to test them all.");
|
||||
} else if (status == 1) {
|
||||
cm.sendNext("These Stirges will get in your way, but they're merely a distraction. Try every one of these Sigils until they work.");
|
||||
cm.sendNext("These Stirges will get in your way, but they're merely a distraction. To get rid of them, get five adventurers to stand on the middle-left platform simultaneously. To pass, try every one of these Sigils until they work.");
|
||||
cm.dispose();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*Adobis
|
||||
/*Jack
|
||||
*
|
||||
*@author SharpAceX (Alan)
|
||||
*/
|
||||
@@ -43,107 +43,124 @@ function action(mode, type, selection) {
|
||||
expedition = cm.getExpedition(cwkpq);
|
||||
em = cm.getEventManager("CWKPQ");
|
||||
|
||||
if (mode < 1) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < cwkpq.getMinLevel() && player.getLevel() > cwkpq.getMaxLevel()) { //Don't fit requirement
|
||||
cm.sendOk("You do not meet the criteria to take attempt Crimsonwood Keep Party Quest!");
|
||||
} else {
|
||||
if (mode == 0) {
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
cm.sendSimple("Would you like to assemble a team to attempt a #rCrimsonwood Keep Party Quest#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
|
||||
status = 1;
|
||||
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
|
||||
cm.sendSimple(list);
|
||||
status = 2;
|
||||
} else if (expedition.isRegistering()) { //If the expedition is registering
|
||||
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
|
||||
cm.sendOk("You have already registered for the expedition. Please wait for " + expedition.getLeader().getName() + " to begin the expedition.");
|
||||
cm.dispose();
|
||||
} else { //If you aren't in it, you're going to get added
|
||||
cm.sendOk(expedition.addMember(cm.getPlayer()));
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < cwkpq.getMinLevel() && player.getLevel() > cwkpq.getMaxLevel()) { //Don't fit requirement
|
||||
cm.sendOk("You do not meet the criteria to take attempt Crimsonwood Keep Party Quest!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
cm.sendSimple("#e#b<Party Quest: Crimsonwood Keep>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to attempt a #rCrimsonwood Keep Party Quest#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
|
||||
status = 1;
|
||||
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
|
||||
cm.sendSimple(list);
|
||||
status = 2;
|
||||
} else if (expedition.isRegistering()) { //If the expedition is registering
|
||||
if (expedition.contains(player)) { //If you're in it but it hasn't started, be patient
|
||||
cm.sendOk("You have already registered for the expedition. Please wait for #r" + expedition.getLeader().getName() + "#k to begin the expedition.");
|
||||
cm.dispose();
|
||||
} else { //If you aren't in it, you're going to get added
|
||||
cm.sendOk(expedition.addMember(cm.getPlayer()));
|
||||
cm.dispose();
|
||||
}
|
||||
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
|
||||
if (expedition.contains(player)) { //If you're registered, warp you in
|
||||
em.getInstance("CWKPQ" + player.getClient().getChannel()).registerPlayer(player);
|
||||
cm.dispose();
|
||||
} else { //If you're not in by now, tough luck
|
||||
cm.sendOk("Another expedition has taken the initiative to complete the Crimsonwood Keep Party Quest, lets pray for those brave souls.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
|
||||
if (expedition.contains(player)) { //If you're registered, warp you in
|
||||
em.getInstance("CWKPQ_" + player.getClient().getChannel()).registerPlayer(player);
|
||||
} else if (status == 1) {
|
||||
if (selection == 1) {
|
||||
expedition = cm.getExpedition(cwkpq);
|
||||
if(expedition != null) {
|
||||
cm.sendOk("Someone already taken the initiative to be the leader of the expedition. Try joining them!");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.createExpedition(cwkpq);
|
||||
cm.sendOk("The #rCrimsonwood Keep Party Quest Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
|
||||
cm.dispose();
|
||||
} else { //If you're not in by now, tough luck
|
||||
return;
|
||||
} else if (selection == 2) {
|
||||
cm.sendOk("Sure, not everyone's up to attempting Crimsonwood Keep Party Quest.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 2) {
|
||||
if (selection == 1) {
|
||||
if (expedition == null) {
|
||||
cm.sendOk("The expedition could not be loaded.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
var size = expedition.getMembers().size();
|
||||
if (size == 1) {
|
||||
cm.sendOk("You are the only member of the expedition.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
var text = "The following members make up your expedition (Click on them to expel them):\r\n";
|
||||
text += "\r\n\t\t1." + expedition.getLeader().getName();
|
||||
for (var i = 1; i < size; i++) {
|
||||
text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
|
||||
}
|
||||
cm.sendSimple(text);
|
||||
status = 6;
|
||||
} else if (selection == 2) {
|
||||
var min = cwkpq.getMinSize();
|
||||
var size = expedition.getMembers().size();
|
||||
if (size < min) {
|
||||
cm.sendOk("You need at least " + min + " players registered in your expedition.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.sendOk("The expedition will begin and you will now be escorted to the #bEntrance to CWKPQ Altar#k.");
|
||||
status = 4;
|
||||
} else if (selection == 3) {
|
||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||
cm.endExpedition(expedition);
|
||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 4) {
|
||||
if (em == null) {
|
||||
cm.sendOk("The event could not be initialized, please report this on the forum.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
em.setProperty("leader", player.getName());
|
||||
em.setProperty("channel", player.getClient().getChannel());
|
||||
if(!em.startInstance(expedition)) {
|
||||
cm.sendOk("Another expedition has taken the initiative to complete the Crimsonwood Keep Party Quest, lets pray for those brave souls.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if (status == 1) {
|
||||
if (selection == 1) {
|
||||
cm.createExpedition(cwkpq);
|
||||
cm.sendOk("The #rCrimsonwood Keep Party Quest Expedition#k has been created.\r\n\r\nTalk to me again to view the current team, or start the fight!");
|
||||
cm.dispose();
|
||||
return;
|
||||
} else if (selection == 2) {
|
||||
cm.sendOk("Sure, not everyone's up to attempting Crimsonwood Keep Party Quest.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 2) {
|
||||
if (selection == 1) {
|
||||
if (expedition == null) {
|
||||
cm.sendOk("The expedition could not be loaded.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
var size = expedition.getMembers().size();
|
||||
if (size == 1) {
|
||||
cm.sendOk("You are the only member of the expedition.");
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
} else if (status == 6) {
|
||||
if (selection > 0) {
|
||||
var banned = expedition.getMembers().get(selection - 1);
|
||||
expedition.ban(banned);
|
||||
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
|
||||
cm.dispose();
|
||||
return;
|
||||
} else {
|
||||
cm.sendSimple(list);
|
||||
status = 2;
|
||||
}
|
||||
var text = "The following members make up your expedition (Click on them to expel them):\r\n";
|
||||
text += "\r\n\t\t1." + expedition.getLeader().getName();
|
||||
for (var i = 1; i < size; i++) {
|
||||
text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
|
||||
}
|
||||
cm.sendSimple(text);
|
||||
status = 6;
|
||||
} else if (selection == 2) {
|
||||
cm.sendOk("The expedition will begin and you will now be escorted to the #bEntrance to CWKPQ Altar#k.");
|
||||
status = 4;
|
||||
} else if (selection == 3) {
|
||||
player.getMap().broadcastMessage(MaplePacketCreator.removeClock());
|
||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||
cm.endExpedition(expedition);
|
||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 4) {
|
||||
var min = 1; //cwkpq.getMinSize();
|
||||
var size = expedition.getMembers().size();
|
||||
if (size < min) {
|
||||
cm.sendOk("You need at least " + min + " players registered in your expedition.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (em == null) {
|
||||
cm.sendOk("The event could not be found, please report this on the forum.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
em.setProperty("leader", player.getName());
|
||||
em.setProperty("channel", player.getClient().getChannel());
|
||||
em.startInstance(expedition);
|
||||
cm.dispose();
|
||||
return;
|
||||
} else if (status == 6) {
|
||||
if (selection > 0) {
|
||||
var banned = expedition.getMembers().get(selection - 1);
|
||||
expedition.ban(banned);
|
||||
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendSimple(list);
|
||||
status = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,18 +5,25 @@ function start() {
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
status--;
|
||||
var eim = cm.getEventInstance();
|
||||
if (eim != null && eim.getIntProperty("glpq6") == 3) {
|
||||
cm.sendOk("... Well played. You overtook the Twisted Masters. Pass through that gate to receive your prizes.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cm.isEventLeader()) {
|
||||
cm.sendNext("I wish for your leader to talk to me.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
if (eim != null) {
|
||||
if (eim.getIntProperty("glpq6") == 0) {
|
||||
if (status == 0) {
|
||||
@@ -45,10 +52,6 @@ function action(mode, type, selection) {
|
||||
cm.sendNext("Well, no matter! The Twisted Masters will be glad to welcome you.");
|
||||
cm.mapMessage(6, "Twisted Masters approach!");
|
||||
|
||||
//MV or Heron
|
||||
var mob = eim.getMonster(9400589);
|
||||
cm.getMap().spawnMonsterOnGroundBelow(mob, new java.awt.Point(-1000, 276));
|
||||
|
||||
//Margana
|
||||
var mob = eim.getMonster(9400590);
|
||||
cm.getMap().spawnMonsterOnGroundBelow(mob, new java.awt.Point(-22, 1));
|
||||
@@ -79,6 +82,8 @@ function action(mode, type, selection) {
|
||||
eim.setIntProperty("glpq6", 3);
|
||||
|
||||
eim.showClearEffect(true);
|
||||
eim.giveEventPlayersStageReward(6);
|
||||
|
||||
eim.clearPQ();
|
||||
cm.dispose();
|
||||
} else {
|
||||
@@ -86,6 +91,7 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("... Well played. You overtook the Twisted Masters. Pass through that gate to receive your prizes.");
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user