Ludibrium Maze PQ

Implemented Ludibrium Maze PQ.
This commit is contained in:
ronancpl
2017-05-15 15:52:24 -03:00
parent b26469301d
commit a56312ddd3
35 changed files with 8081 additions and 8015 deletions

View File

@@ -20,9 +20,73 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author BubblesDev
* @author BubblesDev, Ronan
* @NPC Tory
*/
var status = 0;
var em = null;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
em = cm.getEventManager("HenesysPQ");
if(em == null) {
cm.sendOk("The Henesys PQ has encountered an error.");
cm.dispose();
return;
}
cm.sendSimple("#e#b<Party Quest: Primrose Hill>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nI'm Tory. Inside here is a beautiful hill where the primrose blooms. There's a tiger that lives in the hill, Growlie, and he seems to be looking for something to eat. Would you like to head over to the hill of primrose and join forces with your party members to help Growlie out?#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 (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("Hi there! I'm Tory. This place is covered with mysterious aura of the full moon, and no one person can enter here by him/herself.");
cm.dispose();
} else if(!cm.isLeader()) {
cm.sendOk("If you'd like to enter here, the leader of your party will have to talk to me. Talk to your party leader about this.");
cm.dispose();
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
cm.sendOk("Someone is already attempting the PQ. Please wait for them to finish, or find another channel.");
}
}
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();
}
} else if (selection == 1) {
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
cm.dispose();
} else {
cm.sendOk("#e#b<Party Quest: Primrose Hill>#k#n\r\nCollect primrose seeds from the flowers at the bottom part of the map and drop them by the platforms above the stage. Primrose seed color must match to grow the seeds, so test until you find the correct combination. When all the seeds have been planted, that is, starting second part of the mission, scout the Moon Bunny while it prepares Rice Cakes for the hungry Growlie. Once Growlie becomes satisfied, your mission is complete.");
cm.dispose();
}
}
}
}
/*
var status = 0;
var chosen = 0;
var min = 3;
@@ -142,4 +206,5 @@ function action(mode, type, selection) {
}
}
}
}
}
*/

View File

@@ -46,14 +46,9 @@ function action(mode, type, selection) {
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(0, cm.getParty(), cm.getPlayer().getMap(), 1)) {
if(!em.startInstance(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.");
}
/*
else {
cm.gainItem(4001022, 200);
}
*/
}
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.");

View File

@@ -45,7 +45,7 @@ function action(mode, type, selection) {
var eim = cm.getEventInstance();
if(!eim.giveEventReward(cm.getPlayer())) {
cm.sendNext("It seems you don't have a free slot in your #rEquip#k, #rUse#k or #rEtc#k inventories. Please make room and try again.");
cm.sendNext("It seems you don't have a free slot in either your #rEquip#k, #rUse#k or #rEtc#k inventories. Please make room and try again.");
} else {
cm.warp(221024500);
}

View File

@@ -73,7 +73,7 @@ function action(mode, type, selection) {
}
else { // check stage completion
if (cm.haveItem(4001022, 25)) {
cm.sendOk("Good job! you have collected all 25 #b#t4001022#'s.#k");
cm.sendOk("Good job! You have collected all 25 #b#t4001022#'s.#k");
cm.gainItem(4001022, -25);
eim.setProperty("statusStg" + stage, 1);

View File

@@ -73,7 +73,7 @@ function action(mode, type, selection) {
}
else { // check stage completion
if (cm.haveItem(4001022, 15)) {
cm.sendOk("Good job! you have collected all 15 #b#t4001022#'s.#k");
cm.sendOk("Good job! You have collected all 15 #b#t4001022#'s.#k");
cm.gainItem(4001022, -15);
eim.setProperty("statusStg" + stage, 1);

View File

@@ -73,7 +73,7 @@ function action(mode, type, selection) {
}
else { // check stage completion
if (cm.haveItem(4001022, 32)) {
cm.sendOk("Good job! you have collected all 32 #b#t4001022#'s.#k");
cm.sendOk("Good job! You have collected all 32 #b#t4001022#'s.#k");
cm.gainItem(4001022, -32);
eim.setProperty("statusStg" + stage, 1);

View File

@@ -73,7 +73,7 @@ function action(mode, type, selection) {
}
else { // check stage completion
if (cm.haveItem(4001022, 6)) {
cm.sendOk("Good job! you have collected all 6 #b#t4001022#'s.#k");
cm.sendOk("Good job! You have collected all 6 #b#t4001022#'s.#k");
cm.gainItem(4001022, -6);
eim.setProperty("statusStg" + stage, 1);

View File

@@ -73,7 +73,7 @@ function action(mode, type, selection) {
}
else { // check stage completion
if (cm.haveItem(4001022, 24)) {
cm.sendOk("Good job! you have collected all 24 #b#t4001022#'s.#k");
cm.sendOk("Good job! You have collected all 24 #b#t4001022#'s.#k");
cm.gainItem(4001022, -24);
eim.setProperty("statusStg" + stage, 1);

View File

@@ -76,7 +76,7 @@ function action(mode, type, selection) {
}
else if(state == 0) { // check stage completion
if (cm.haveItem(4001022, 3)) {
cm.sendOk("Good job! you have collected all 3 #b#t4001022#'s.#k");
cm.sendOk("Good job! You have collected all 3 #b#t4001022#'s.#k");
cm.gainItem(4001022, -3);
eim.setProperty("statusStg" + stage, 1);

View File

@@ -46,7 +46,7 @@ function action(mode, type, selection) {
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(0, cm.getParty(), cm.getPlayer().getMap(), 1)) {
if(!em.startInstance(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.");
}
}

View File

@@ -46,7 +46,7 @@ function action(mode, type, selection) {
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(0, cm.getParty(), cm.getPlayer().getMap(), 1)) {
if(!em.startInstance(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.");
}
}

View File

@@ -17,6 +17,28 @@ function isFinalBossDone() {
return cm.getMapId() >= 970032700 && cm.getMapId() < 970032800 && cm.getMap().getMonsters().isEmpty();
}
function detectTeamLobby(team) {
var midLevel = 0;
for(var i = 0; i < team.size(); i++) {
var player = team.get(i);
midLevel += player.getLevel();
}
midLevel = Math.floor(midLevel / team.size());
var lobby; // teams low level can be allocated at higher leveled lobbys
if(midLevel <= 20) lobby = 0;
else if(midLevel <= 40) lobby = 1;
else if(midLevel <= 60) lobby = 2;
else if(midLevel <= 80) lobby = 3;
else if(midLevel <= 90) lobby = 4;
else if(midLevel <= 100) lobby = 5;
else if(midLevel <= 110) lobby = 6;
else lobby = 7;
return lobby;
}
function start() {
status = -1;
state = (cm.getMapId() >= 970030001 && cm.getMapId() <= 970042711) ? (!onRestingSpot() ? (isFinalBossDone() ? 3 : 1) : 2) : 0;
@@ -91,7 +113,9 @@ function action(mode, type, selection) {
cm.dispose();
} else if(state == 2) {
var restSpot = ((cm.getMapId() - 1) % 5) + 1;
cm.getPlayer().getEventInstance().addEventTimer(restSpot * 4 * 60000); // adds (restspot number * 4) minutes
cm.getPlayer().getEventInstance().warpEventTeam(970030100 + cm.getEventInstance().getIntProperty("lobby") + (500 * restSpot));
cm.dispose();
} else if(state == 1) {
cm.warp(970030000);
@@ -108,7 +132,12 @@ function action(mode, type, selection) {
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(0, cm.getParty(), cm.getPlayer().getMap(), 1)) {
var lobby = detectTeamLobby(eli), i;
for(i = lobby; i < 8; i++) {
if(em.startInstance(i, cm.getParty(), cm.getPlayer().getMap(), 1)) break;
}
if(i == 8) {
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.");
}
}
@@ -122,7 +151,7 @@ function action(mode, type, selection) {
cm.sendOk("Try using a Super Megaphone or asking your buddies or guild to join!");
cm.dispose();
} else {
cm.sendOk("#e#b<Party Quest: Boss Rush>#k#n\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("#e#b<Party Quest: Boss Rush>#k#n\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.\r\n\r\nThis event also supports #bmultiple lobbies for matchmaking several ranges of team levels#k at once: team up with players with lower level if you want better chances to swiftly set up a boss rush for your team.");
cm.dispose();
}
}

View File

@@ -7,10 +7,10 @@
var status;
var itemSet_lv6 = [1122018, 1122005, 1022088, 1402013, 1032048, 1032070, 1102046, 2330004, 2041013, 2041016, 2041019, 2041022, 2049100, 2049003, 2020012, 2020013, 2020014, 2020015, 2022029, 2022045, 2022068, 2022069, 2022179, 2022180, 4004000, 4004001, 4004002, 4004003, 4004004, 4003000];
var itemSet_lv6 = [1122018, 1122005, 1022088, 1402013, 1032030, 1032070, 1102046, 2330004, 2041013, 2041016, 2041019, 2041022, 2049100, 2049003, 2020012, 2020013, 2020014, 2020015, 2022029, 2022045, 2022068, 2022069, 2022179, 2022180, 4004000, 4004001, 4004002, 4004003, 4004004, 4003000];
var itemQty_lv6 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 25, 25, 25, 25, 25, 25, 25, 4, 4, 12, 12, 12, 12, 12, 25];
var itemSet_lv5 = [1122018, 1122005, 1022088, 1402013, 1032048, 1032070, 1102046, 2330004, 2041013, 2041016, 2041019, 2041022, 2049100, 2049003, 2020012, 2020013, 2020014, 2020015, 2022029, 2022045, 2022068, 2022069, 2022179, 2022180, 4004000, 4004001, 4004002, 4004003, 4004004, 4003000];
var itemSet_lv5 = [1122018, 1122005, 1022088, 1402013, 1032030, 1032070, 1102046, 2330004, 2041013, 2041016, 2041019, 2041022, 2049100, 2049003, 2020012, 2020013, 2020014, 2020015, 2022029, 2022045, 2022068, 2022069, 2022179, 2022180, 4004000, 4004001, 4004002, 4004003, 4004004, 4003000];
var itemQty_lv5 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 15, 15, 15, 15, 15, 15, 15, 2, 2, 8, 8, 8, 8, 8, 12];
var itemSet_lv4 = [1122001, 1122006, 1022103, 1442065, 1032042, 1032021, 1102168, 2070005, 2040025, 2040029, 2040301, 2040413, 2040701, 2040817, 2002028, 2020009, 2020010, 2020011, 2022004, 2022005, 2022025, 2022027, 2022048, 2022049, 4020000, 4020001, 4020002, 4020003, 4020004, 4020005, 4020006, 4020007, 4020008, 4003000];

View File

@@ -57,7 +57,7 @@ function action(mode, type, selection) {
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(0, cm.getParty(), cm.getPlayer().getMap(), 1)) {
if(!em.startInstance(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.");
}
}

View File

@@ -20,60 +20,60 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
*@Author RMZero213
* Ludibrium Maze Party Quest
* Do not release anywhere other than RaGEZONE. Give credit if used.
*/
* Author : Raz, Ronan
*
* NPC = 9103000 - Pierre
* Map = Ludibrium - Ludibrium Maze 16
* NPC MapId = 809050015
* Function = Gives LMPQ EXP reward
*
*/
var status = 0;
var minimumCouponsNeeded = 200;
var qty = 0;
function start() {
status = -1;
action(1,0,0);
action(1, 0, 0);
}
function action(mode, type, selection){
if (mode == -1|| (mode == 0 && status == 0))
cm.dispose();
else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
if (!isLeader()) {
cm.sendOk("Give any coupons to the leader of the party and tell them to talk to me.");
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
cm.sendYesNo("Do you have all the coupons of the party and would like to get out of here?");
}
} else if (status == 1) {
if (cm.itemQuantity(4001106) < minimumCouponsNeeded){
cm.sendOk("Sorry, but you do not have at least " + minimumCouponsNeeded + " coupons! Talk to me again when you've collected more!");
cm.dispose();
return;
}
var party = cm.getPartyMembers();
for (var i = 0; i < party.size(); i++) {
if (party.get(i).getMap().getId() != 809050015) {
cm.sendOk("A member of your party is not presently in the map.");
cm.dispose();
return;
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
}
var members = cm.getPlayer().getEventInstance().getPlayers();
//cm.removeFromParty(4001106, members);
cm.gainItem(4001106, -200);
cm.givePartyExp("LudiMazePQ");
cm.warpParty(809050016);
cm.dispose();
}
}
}
function isLeader(){
if(cm.getParty() == null)
return false;
else
return cm.isLeader();
if (mode == 1)
status++;
else
status--;
if (status == 0) {
if(cm.isLeader()) {
if(!cm.getEventInstance().isEventTeamTogether()) {
cm.sendOk("One or more event team members is missing, please wait for them to reach here first.");
cm.dispose();
}
else if(cm.hasItem(4001106, 30)) {
qty = cm.getItemQuantity(4001106);
cm.sendYesNo("Splendid! You have retrieved " + qty + " #t4001106# from this run, now your team will receive the fair amount of EXP from this action. Are you ready to get transported out?");
}
else {
cm.sendOk("Your party cannot finish this PQ yet, as you have not reached the minimum of 30 #t4001106#'s in hand yet.");
cm.dispose();
}
}
else {
cm.sendOk("Let your party leader talk to me to end this quest.");
cm.dispose();
}
} else if(status == 1) {
cm.removeAll(4001106);
cm.getEventInstance().giveEventPlayersExp(50 * qty);
cm.getEventInstance().clearPQ();
cm.dispose();
}
}
}

View File

@@ -20,22 +20,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@ Author : Raz
@
@ NPC = 9103001 - Rolly
@ Map = Ludibrium - <Ludibrium>
@ NPC MapId = 220000000
@ Function = Start LMPQ
@
* Author : Raz, Ronan
*
* NPC = 9103001 - Rolly
* Map = Ludibrium - <Ludibrium>
* NPC MapId = 220000000
* Function = Start LMPQ
*
*/
var status = 0;
var minlvl = 51;
var maxlvl = 200;
var minplayers = 3;
var maxplayers = 6;
var time = 15;
var open = true;
function start() {
status = -1;
@@ -43,97 +37,55 @@ function start() {
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else if (mode == 0) {
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("This is the entrance to the Ludibrium Maze. Enjoy!\r\n#b#L0#Enter the Lubidrium Maze#l\r\n#L1#What is the Ludibrium Maze?");
} else if (status == 1) {
var em = cm.getEventManager("LudiMazePQ");
if(selection == 0) {//ENTER THE PQ
if (!hasParty()) {//NO PARTY
cm.sendOk("Try taking on the Maze Quest with your party. If you DO decide to tackle it, please have your Party Leader notify me!");
} else if (!isLeader()) {//NOT LEADER
cm.sendOk("Try taking on the Maze Quest with your party. If you DO decide to tackle it, please have your Party Leader notify me!");
} else if (!checkPartySize()) {//PARTY SIZE WRONG
cm.sendOk("Your party needs to consist of at least " + minplayers + " members in order to tackle this maze");
} else if (!checkPartyLevels()) {//WRONG LEVELS
cm.sendOk("One of your party members has not met the level requirements of " + minlvl + "~" + maxlvl + ".");
} else if (em == null) {//EVENT ERROR
cm.sendOk("ERROR IN EVENT");
} else if (!open){
cm.sendOk("The PQ is #rclosed#k for now.");
} else {
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap())) {
cm.sendOk("A party in your name is already registered in this event.");
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
var party = cm.getPlayer().getEventInstance().getPlayers();
cm.removeFromParty(4001106, party);
}
cm.dispose();
} else if(selection == 1) {
cm.sendOk("This maze is available to all parties of " + minplayers + " or more members, and all participants must be between Level " + minlvl + "~" + maxlvl + ". You will be given " + time + " minutes to escape the maze. At the center of the room, there will be a Warp Portal set up to transport you to a different room. These portals will transport you to other rooms where you'll (hopefully) find the exit. Pietri will be waiting at the exit, so all you need to do is talk to him, and he'll let you out. Break all the boxes located in the room, and a monster inside the box will drop a coupon. After escaping the maze, you will be awarded with EXP based on the coupons collected. Additionally, if the leader possesses at least 200 coupons, then a special gift will be presented to the party. If you cannot escape the maze within the allotted " + time +" minutes, you will receive 0 EXP for your time in the maze. If you decide to log off while you're in the maze, you will be automatically kicked out of the maze. Even if the members of the party leave in the middle of the quest, the remaining members will be able to continue on with the quest. If you are in critical condition and unable to hunt down the monsters, you may avoid them to save yourself. Your fighting spirit and wits will be tested! Good luck!");
cm.dispose();
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
em = cm.getEventManager("LudiMazePQ");
if(em == null) {
cm.sendOk("The Ludibrium Maze PQ has encountered an error.");
cm.dispose();
return;
}
cm.sendSimple("#e#b<Party Quest: Ludibrium Maze>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nThis is the entrance to the Ludibrium Maze. Enjoy!\r\n#b#L0#Enter the Lubidrium Maze#l\r\n#L1#I want to find party members.\r\n#L2#What is the Ludibrium Maze?");
} else if (status == 1) {
if (selection == 0) {
if (cm.getParty() == null) {
cm.sendOk("Try taking on the Maze Quest with your party.");
cm.dispose();
} else if(!cm.isLeader()) {
cm.sendOk("If you DO decide to tackle it, please have your Party Leader notify me!");
cm.dispose();
} else {
var eli = em.getEligibleParty(cm.getParty());
if(eli.size() > 0) {
if(!em.startInstance(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.");
}
}
else {
cm.sendOk("Your party needs to consist of at least 3 members in order to tackle this maze.");
}
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("#e#b<Party Quest: Ludibrium Maze>#k#n\r\nThis maze is available to all parties of 3 or more members, and all participants must be between Level 51~70. You will be given 15 minutes to escape the maze. At the center of the room, there will be a Warp Portal set up to transport you to a different room. These portals will transport you to other rooms where you'll (hopefully) find the exit. Pietri will be waiting at the exit, so all you need to do is talk to him, and he'll let you out. Break all the boxes located in the room, and a monster inside the box will drop a coupon. After escaping the maze, you will be awarded with EXP based on the coupons collected. Additionally, if the leader possesses at least 30 coupons, then a special gift will be presented to the party. If you cannot escape the maze within the allotted 15 minutes, you will receive 0 EXP for your time in the maze. If you decide to log off while you're in the maze, you will be automatically kicked out of the maze. Even if the members of the party leave in the middle of the quest, the remaining members will be able to continue on with the quest, except if they run out of the minimum amount of party members in the maze. If you are in critical condition and unable to hunt down the monsters, you may avoid them to save yourself. Your fighting spirit and wits will be tested! Good luck!");
cm.dispose();
}
}
}
}
}
function getPartySize(){
if(cm.getPlayer().getParty() == null){
return 0;
}else{
return (cm.getPlayer().getParty().getMembers().size());
}
}
function isLeader(){
return cm.isLeader();
}
function checkPartySize(){
var size = 0;
if(cm.getPlayer().getParty() == null){
size = 0;
}else{
size = (cm.getPlayer().getParty().getMembers().size());
}
if(size < minplayers || size > maxplayers){
return false;
}else{
return true;
}
}
function checkPartyLevels(){
var pass = true;
var party = cm.getPlayer().getParty().getMembers();
if(cm.getPlayer().getParty() == null){
pass = false;
}else{
for (var i = 0; i < party.size() && pass; i++) {
if ((party.get(i).getLevel() < minlvl) || (party.get(i).getLevel() > maxlvl) || (party.get(i).getPlayer().getMapId() != cm.getPlayer().getMapId())) {
pass = false;
}
}
}
return pass;
}
function hasParty(){
if(cm.getPlayer().getParty() == null){
return false;
}else{
return true;
}
}

View File

@@ -20,61 +20,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
*@Author RMZero213
* Ludibrium Maze Party Quest
* Do not release anywhere other than RaGEZONE. Give credit if used.
*@Author Ronan
* Rolly
* Ludibrium - Exit of the Maze (809050016)
* Gives Ludibrium Maze Party Quest reward
*/
var status = 0;
var rewards = new Array(
1442017, 1, //Blood Snowboard
1322025, 1, //Emergency Rescue Tube
1032013, 1, //Red-Hearted Earrings
1302016, 1, //Yellow Umbrella
1072263, 1, //Green Strap Shoes
1032043, 1, //Cecelia's Earrings
2000005, 1, //Power Elixir
2000004, 5, //Elixir
2001001, 5, //Ice Cream Pop
2001002, 5, //Red Bean Sundae
2020008, 20, //Fat Sausage
2020010, 20, //Grape Juice
2030008, 20, //Coffee Milk
2030010, 20, //Fruit Milk
2030009, 20, //Strawberry Milk
2022000, 50, //Pure Water
2001000, 50, //Watermelon
2022019, 50, //Kinoko Ramen (Pig Head)
2020007, 100, //Dried Squid
2020006, 100, //Hot Dog Supreme
2020009, 100, //Orange Juice
2000006, 100, //Mana Elixir
2040601, 1, //Scroll for Bottomwear for Def (60%)
2040605, 1, //Dark Scroll for Bottomwear for DEF 30%
2040602, 1, //Scroll for Bottomwear for DEF (10%)
2041027, 1, //Dark Scroll for Cape for Magic Def 30%
2041028, 1, //Dark Scroll for Cape for Weapon Def 70%
2041004, 1, //Scroll for Cape for Weapon Def 60%
2041029, 1, //Dark Scroll for Cape for Weapon Def 30%
2041017, 1, //Scroll for Cape for INT 10%
2041020, 1, //Scroll for Cape for DEX 10%
2040008, 1, //Dark Scroll for Helmet for DEF 70%
2040001, 1, //Scroll for Helmet for DEF 60%
2040009, 1, //Dark Scroll for Helmet for DEF 30%
2040002, 1, //Scroll for Helmet for DEF 10%
2040504, 1, //Scroll for Overall Armor for DEF 60%
2040511, 1, //Dark Scroll for Overall Armor for DEF 30%
2040505, 1, //Scroll for Overall Armor for DEF 10%
2040501, 1, //Scroll for Overall Armor for DEX 60%
2040904, 1, //Dark Scroll for Shield for DEF 70%
2040901, 1, //Scroll for Shield for DEF 60%
2040905, 1, //Dark Scroll for Shield for DEF 30%
2040902, 1, //Scroll for Shield for DEF 10%
2040404, 1, //Dark Scroll for Topwear for DEF 70%
2040401, 1, //Scroll for Topwear for DEF 60%
2040405, 1, //Dark Scroll for Topwear for DEF 30%
2040402, 1 //Scroll for Topwear for DEF 10%
);
function start() {
status = -1;
@@ -94,28 +46,17 @@ function action(mode, type, selection){
else
status--;
if (status == 0) {
var index = Math.floor(Math.random()*rewards.length);
var reward;
var quantity;
if (index % 2 == 0){ //The index was an item id
reward = rewards[index];
quantity = rewards[index + 1];
} else {
reward = rewards[index - 1];
quantity = rewards[index];
}
if(!cm.canHold(reward)){
cm.sendOk("Please make space in your inventory!");
return;
}
cm.gainItem(reward, quantity);
var eim = cm.getPlayer().getEventInstance();
if (eim != null) {
eim.unregisterPlayer(cm.getPlayer());
}
cm.warp(220000000, 0);
cm.gainItem(4001106, -cm.itemQuantity(4001106))
cm.dispose();
cm.sendYesNo("Your party gave a stellar effort and gathered up at least 30 coupons. For that, I have a present for each and every one of you. After receiving the present, you will be sent back to Ludibrium. Now, would you like to receive the present right now?");
} else if(status == 1) {
var eim = cm.getEventInstance();
if(!eim.giveEventReward(cm.getPlayer())) {
cm.sendNext("It seems you don't have a free slot in either your #rEquip#k, #rUse#k or #rEtc#k inventories. Please make room and try again.");
} else {
cm.warp(809050017);
}
cm.dispose();
}
}
}

View File

@@ -20,21 +20,34 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
*@Author SharpAceX (Alan)
*@Author Ronan
* Ludibrium Maze Party Quest
*/
var status = 0;
function start() {
status = -1;
action(1,0,0);
action(1, 0, 0);
}
function action(mode, type, selection){
var eim = cm.getPlayer().getEventInstance();
if (eim != null) {
eim.unregisterPlayer(cm.getPlayer());
}
cm.warp(220000000, 0);
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendNext("Come this way to return to Ludibrium.");
} else {
cm.warp(220000000, 0);
cm.dispose();
}
}
}