Horntail PQ & Exped + Equip levelup fix
Added Horntail PQ and boss fight. Fixed short integer overflow of equipment stats on client messing up player stats.
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* @author BubblesDev, Ronan
|
||||
* @author BubblesDev
|
||||
* @author Ronan
|
||||
* @NPC Tory
|
||||
*/
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* @author BubblesDev, Ronan
|
||||
* @author BubblesDev
|
||||
* @author Ronan
|
||||
* @npc Tommy (HPQ)
|
||||
*/
|
||||
var status = 0;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Growlie (that fatass uhh.. hungry lion or whatever)
|
||||
FightDesign @RageZONE
|
||||
|
||||
Ronan
|
||||
@author Ronan
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/**
|
||||
* @author: Eric, Ronan
|
||||
* @author: Eric
|
||||
* @author: Ronan
|
||||
* @npc: Red Sign
|
||||
* @map: 101st Floor Eos Tower (221024500)
|
||||
* @func: Ludi PQ
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Red Balloon
|
||||
@ Map = Hidden-Street <Stage 1>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Orange Balloon
|
||||
@ Map = Hidden-Street <Stage 2>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Yellow Balloon
|
||||
@ Map = Hidden-Street <Stage 3>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Lime Balloon
|
||||
@ Map = Hidden-Street <Stage 4>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Green Balloon
|
||||
@ Map = Hidden-Street <Stage 5>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Sky-Blue Balloon
|
||||
@ Map = Hidden-Street <Stage 7>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Twdtwd, Ronan
|
||||
@ Author : Twdtwd
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Blue Balloon
|
||||
@ Map = Hidden-Street <Stage 8>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Twdtwd, Ronan
|
||||
@ Author : Twdtwd
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Violet Balloon
|
||||
@ Map = Hidden-Street <Crack on the Wall>
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Pink Balloon
|
||||
@ Map = Hidden-Street <Stage B>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Raz, Ronan
|
||||
@ Author : Raz
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Sgt.Anderson
|
||||
@ Map = Abandoned Tower <Stage 1>
|
||||
|
||||
@@ -19,12 +19,25 @@
|
||||
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/>.
|
||||
*/
|
||||
//Fixed by Moogra
|
||||
//Fixed by Moogra, Ronan
|
||||
//Fixed grammar, javascript syntax
|
||||
|
||||
importPackage(Packages.client);
|
||||
|
||||
var status = 0;
|
||||
var price = 100000;
|
||||
|
||||
function isTransformed(ch) {
|
||||
return ch.getBuffSource(MapleBuffStat.MORPH) == 2210003;
|
||||
}
|
||||
|
||||
function start() {
|
||||
if(!(isTransformed(cm.getPlayer()) || cm.haveItem(4001086))) {
|
||||
cm.sendOk("This is the cave of the mighty Horntail, supreme ruler of the Leafre Canyons, outsiders are not welcome. Get lost!");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.sendSimple("Welcome to Cave of Life - Entrance ! Would you like to go inside and fight #rHorntail#k ? If you want to fight him, you may might need some #b#v2000005##k, so you can recover some HP if you have been hit by #rHorntail#k.\r\n#L1#I would like to buy 10 for 100,000 Mesos!#l\r\n\#L2#No thanks, let me in now!#l");
|
||||
}
|
||||
|
||||
@@ -32,12 +45,17 @@ function action(mode, type, selection) {
|
||||
if (mode < 1)
|
||||
cm.dispose();
|
||||
else if (selection == 1) {
|
||||
if(cm.getMeso() >= price && cm.canHold(2000005)) {
|
||||
cm.gainMeso(-price);
|
||||
cm.gainItem(2000005, 10);
|
||||
cm.sendOk("Thank you for buying the potion. Use it as well!");
|
||||
} else
|
||||
if(cm.getMeso() >= price) {
|
||||
if(!cm.canHold(2000005)) {
|
||||
cm.sendOk("Sorry, you don't have a slot on your inventory for the item!");
|
||||
} else {
|
||||
cm.gainMeso(-price);
|
||||
cm.gainItem(2000005, 10);
|
||||
cm.sendOk("Thank you for buying the potion. Use it as well!");
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("Sorry, you don't have enough mesos to buy them!");
|
||||
}
|
||||
cm.dispose();
|
||||
} else if (selection == 2) {
|
||||
if (cm.getLevel() > 99)
|
||||
|
||||
@@ -47,68 +47,15 @@ function action(mode, type, selection) {
|
||||
else
|
||||
status--;
|
||||
if (status == 0) {
|
||||
// Slate has no preamble, directly checks if you're in a party
|
||||
if (cm.getParty() == null) { // no party
|
||||
cm.sendOk("If you want to attempt the quest, try making a party and getting 6 People...");
|
||||
if(cm.haveItem(4001086)) {
|
||||
cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
|
||||
} else {
|
||||
cm.sendOk("Those who don't have the #r#t4001086##k must prove their valor before challenging #bHorntail#k.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (!cm.isLeader()) { // not party leader
|
||||
cm.sendSimple("You are not the party leader.");
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
// Check teh partyy
|
||||
var party = cm.getParty().getMembers();
|
||||
var mapId = cm.getPlayer().getMapId();
|
||||
var next = true;
|
||||
var levelValid = 0;
|
||||
var inMap = 0;
|
||||
// Temp removal for testing
|
||||
if (party.size() < minPlayers || party.size() > maxPlayers)
|
||||
next = false;
|
||||
else {
|
||||
for (var i = 0; i < party.size() && next; i++) {
|
||||
if ((party.get(i).getLevel() >= minLevel) && (party.get(i).getLevel() <= maxLevel))
|
||||
levelValid += 1;
|
||||
if (party.get(i).getMapId() == mapId)
|
||||
inMap += 1;
|
||||
}
|
||||
if (levelValid < party.size() || inMap < party.size())
|
||||
next = false;
|
||||
}
|
||||
if (next) {
|
||||
// Kick it into action. Slate says nothing here, just warps you in.
|
||||
var em = cm.getEventManager("HontalePQ");
|
||||
if (em == null) {
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
// Begin the PQ.
|
||||
if(!em.startInstance(cm.getParty(),cm.getPlayer().getMap())) {
|
||||
cm.sendOk("A party in your name is already registered in this event.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
//force the two scripts on portals in the map
|
||||
//eim = cm.getPlayer().getEventInstance();
|
||||
var map = eim.getMapInstance(240050100);
|
||||
var bulbMap = eim.getMapInstance(240050200);
|
||||
//map.getPortal(7).setScriptName("hontale_BtoB1");
|
||||
//map.getPortal(2).setScriptName("hontale_C");
|
||||
// Remove pass/coupons
|
||||
party = cm.getPlayer().getEventInstance().getPlayers();
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
else {
|
||||
cm.sendOk("Your party is not a party of six. Make sure all your members are present and qualified to participate in this quest. I see #b" + levelValid.toString() + " #kmembers are in the right level range, and #b" + inMap.toString() + "#k are in my map. If this seems wrong, #blog out and log back in,#k or reform the party.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
cm.sendOk("RAWR!?!?!?");
|
||||
cm.warp(240050400);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,107 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License version 3
|
||||
as published by the Free Software Foundation. You may not use, modify
|
||||
or distribute this program under any other version of the
|
||||
GNU Affero General Public License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
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/>.
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @npc: Mark of the Squad
|
||||
* @map: Cave of Life - Cave Entrance (240050000)
|
||||
* @func: Horntail PQ
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
var price = 100000;
|
||||
var em = null;
|
||||
var hasPass;
|
||||
|
||||
function isRecruitingMap(mapid) {
|
||||
return mapid == 240050000;
|
||||
}
|
||||
|
||||
function start() {
|
||||
cm.warp(240050400);
|
||||
cm.dispose();
|
||||
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(isRecruitingMap(cm.getMapId())) {
|
||||
if (status == 0) {
|
||||
em = cm.getEventManager("HorntailPQ");
|
||||
if(em == null) {
|
||||
cm.sendOk("The Horntail PQ has encountered an error.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.sendSimple("#e#b<Party Quest: Horntail Trial Grounds>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nThis is the path to Horntail's lair. If you want to face him, you and your team shall be tested on the trial grounds ahead.#b\r\n#L0#Let us pass to the trial grounds.\r\n#L1#I would like to hear more details.");
|
||||
} else if (status == 1) {
|
||||
if (selection == 0) {
|
||||
if (cm.getParty() == null) {
|
||||
cm.sendOk("You can participate in the party quest only if you are in a party.");
|
||||
cm.dispose();
|
||||
} else if(!cm.isLeader()) {
|
||||
cm.sendOk("Your party leader must talk to me to start this party quest.");
|
||||
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("Either I cannot accept some members of your party inside the cave or you team is lacking. Solve this problem then talk to me!");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
} else {
|
||||
cm.sendOk("#e#b<Party Quest: Horntail Trial Grounds>#k#n\r\nAs the gatekeeper of Horntail's lair, I will grant access #bjust to those worthy#k of his presence. Even for those people, the path inside is that of a maze, full of branches and trials. However, those #radept at fighting squad bosses#k have a better chance to stand to our leader, although those #rof our kind#k have a shabby chance as well.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(!cm.isEventLeader()) {
|
||||
cm.sendOk("Only your event leader is allowed to interact with the Schedule.");
|
||||
} else if(cm.getMapId() == 240050100) {
|
||||
if(cm.haveItem(4001087) && cm.haveItem(4001088) && cm.haveItem(4001089) && cm.haveItem(4001090) && cm.haveItem(4001091)) {
|
||||
cm.gainItem(4001087, -1);
|
||||
cm.gainItem(4001088, -1);
|
||||
cm.gainItem(4001089, -1);
|
||||
cm.gainItem(4001090, -1);
|
||||
cm.gainItem(4001091, -1);
|
||||
|
||||
cm.getEventInstance().warpEventTeam(240050200);
|
||||
} else {
|
||||
cm.sendOk("You don't have all the keys needed to proceed.");
|
||||
}
|
||||
} else if(cm.getMapId() == 240050300) {
|
||||
if(cm.haveItem(4001092, 1) && cm.haveItem(4001093, 6)) {
|
||||
cm.gainItem(4001092, -1);
|
||||
cm.gainItem(4001093, -6);
|
||||
cm.getEventInstance().clearPQ();
|
||||
} else {
|
||||
cm.sendOk("Check if you have got all 6 Red keys and 1 Blue key with you.");
|
||||
}
|
||||
} else if(cm.getMapId() == 240050310) {
|
||||
if(cm.haveItem(4001092, 1) && cm.haveItem(4001093, 6)) {
|
||||
cm.gainItem(4001092, -1);
|
||||
cm.gainItem(4001093, -6);
|
||||
cm.getEventInstance().clearPQ();
|
||||
} else {
|
||||
cm.sendOk("Check if you have got all 6 Red keys and 1 Blue key with you.");
|
||||
}
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
*Crystal of Roots
|
||||
*@Author: Moogra
|
||||
*@Author: Ronan
|
||||
*@NPC: Crystal of Roots
|
||||
*/
|
||||
function start() {
|
||||
@@ -33,11 +33,9 @@ function action(mode, type, selection) {
|
||||
if (mode < 1)
|
||||
cm.dispose();
|
||||
else {
|
||||
cm.warp(240040700);
|
||||
if (cm.getPlayer().getMap().getCharacters().size() < 2){
|
||||
cm.getPlayer().getMap().killAllMonsters();
|
||||
cm.getPlayer().getMap().resetReactors();
|
||||
}
|
||||
if(cm.getMapId() > 240050400) cm.warp(240050600);
|
||||
else cm.warp(240040700);
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
@@ -19,11 +19,9 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*Mark of the Squad
|
||||
*@author Even
|
||||
*
|
||||
*@author SharpAceX (Alan)
|
||||
*/
|
||||
/*TODO
|
||||
* ADD A CHECK TO SEE IF PLAYERS HAVE BADGE
|
||||
*@author Ronan
|
||||
*/
|
||||
importPackage(Packages.server.expeditions);
|
||||
importPackage(Packages.tools);
|
||||
@@ -33,7 +31,10 @@ var status = 0;
|
||||
var expedition;
|
||||
var player;
|
||||
var em;
|
||||
var horntail = MapleExpeditionType.HORNTAIL;
|
||||
var exped = MapleExpeditionType.HORNTAIL;
|
||||
var expedName = "Horntail";
|
||||
var expedBoss = "mighty Horntail";
|
||||
|
||||
var list = "What would you like to do?#b\r\n\r\n#L1#View current Expedition members#l\r\n#L2#Start the fight!#l\r\n#L3#Stop the expedition.#l";
|
||||
|
||||
function start() {
|
||||
@@ -43,113 +44,134 @@ function start() {
|
||||
function action(mode, type, selection) {
|
||||
|
||||
player = cm.getPlayer();
|
||||
expedition = cm.getExpedition(horntail);
|
||||
expedition = cm.getExpedition(exped);
|
||||
em = cm.getEventManager("HorntailFight");
|
||||
|
||||
if (mode < 1) {
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (status == 0) {
|
||||
//cm.removeExpedition(expedition);
|
||||
if (player.getClient().getChannel() != 1) { //Only channel 1
|
||||
cm.sendOk("Sorry, Horntail may only be challenged on #bChannel 1#k.");
|
||||
cm.dispose();
|
||||
} else if (player.getLevel() < horntail.getMinLevel() && player.getLevel() > horntail.getMaxLevel()) { //Don't fit requirement
|
||||
cm.sendOk("You do not meet the criteria to take on Horntail!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
cm.sendSimple("Would you like to assemble a team to take on the mighty #rHorntail#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()));
|
||||
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("HorntailFight_" + 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 fight Horntail, lets pray for those brave souls.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if (status == 1) {
|
||||
if (selection == 1) {
|
||||
cm.createExpedition(horntail);
|
||||
cm.sendOk("The #rHorntail 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 challenging the might of Horntail.");
|
||||
} else {
|
||||
if (mode == 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 2) {
|
||||
if (selection == 1) {
|
||||
if (expedition == null) {
|
||||
cm.sendOk("The expedition could not be loaded.");
|
||||
|
||||
if (status == 0) {
|
||||
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#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
|
||||
var eim = em.getInstance(expedName + player.getClient().getChannel());
|
||||
if(eim.getIntProperty("canJoin") == 1) {
|
||||
eim.registerPlayer(player);
|
||||
} else {
|
||||
cm.sendOk("Your expedition already started the battle against " + expedBoss + ". Lets pray for those brave souls.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
} else { //If you're not in by now, tough luck
|
||||
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
} else if (status == 1) {
|
||||
if (selection == 1) {
|
||||
expedition = cm.getExpedition(exped);
|
||||
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(exped);
|
||||
cm.sendOk("The #r" + expedBoss + " 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 challenging " + expedBoss + ".");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
var size = expedition.getMembers().size();
|
||||
if (size == 1) {
|
||||
cm.sendOk("You are the only member of the expedition.");
|
||||
} 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 = exped.getMinSize();
|
||||
var min = 1;
|
||||
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("Good luck! All of Leafre is counting on you.");
|
||||
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;
|
||||
}
|
||||
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";
|
||||
} else if (status == 4) {
|
||||
if (em == null) {
|
||||
cm.sendOk("The event could not be initialized, please report this on the forum.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
cm.sendSimple(text);
|
||||
status = 6;
|
||||
} else if (selection == 2) {
|
||||
cm.sendOk("The expedition will begin and you will be escorted to the #bCave of Trial I#k.");
|
||||
status = 4;
|
||||
} else if (selection == 3) {
|
||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||
player.getMap().broadcastMessage(MaplePacketCreator.removeClock());
|
||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||
cm.endExpedition(expedition);
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
} else if (status == 4) {
|
||||
var min = 1; //horntail.getMinSize();
|
||||
var size = expedition.getMembers().size();
|
||||
if (size < min) {
|
||||
cm.sendOk("You need at least " + min + " players registered in your expedition.");
|
||||
|
||||
em.setProperty("leader", player.getName());
|
||||
em.setProperty("channel", player.getClient().getChannel());
|
||||
if(!em.startInstance(expedition)) {
|
||||
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (em == null) {
|
||||
cm.sendOk("The event could not be found, please report this on the forum.");
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
cm.sendOk("Good luck! All of Leafre is counting on you.");
|
||||
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);
|
||||
expedition.ban(banned);
|
||||
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.sendSimple(list);
|
||||
status = 2;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Author: aaroncsn(MapleSea Like), Ronan Lana
|
||||
/* @author aaroncsn(MapleSea Like)
|
||||
* @author Ronan
|
||||
NPC Name: Mr. Do
|
||||
Map(s): Mu Lung: Mu Lung(2500000000)
|
||||
Description: Potion Creator
|
||||
|
||||
@@ -24,9 +24,9 @@ function action(mode, type, selection) {
|
||||
else
|
||||
status--;
|
||||
if(status == 0){
|
||||
cm.sendAcceptDecline("I don't know how you found out about this, but you came to the right place! For those that wandered around Nihal Desert and are getting homesick, I am offering a flight straight to Victorial Island, non-stop! Don't worry about the flying ship--it's only fallen once or twice! Don't you feel claustrophobic being in a long flight on that small ship? What do you think? Are you willing to take the offer on this direct flight?");
|
||||
cm.sendNext("I don't know how you found out about this, but you came to the right place! For those that wandered around Nihal Desert and are getting homesick, I am offering a flight straight to Victorial Island, non-stop! Don't worry about the flying ship--it's only fallen once or twice! Don't you feel claustrophobic being in a long flight on that small ship?");
|
||||
} else if(status == 1){
|
||||
cm.sendAcceptDecline("Please remember two things. One, this line is actually for overseas shipping, so #rI cannot gurantee exactly which town you'll land#k. Two, since I am putting you in this special flight, it'll be a bit expensive. The service charge is #e#b10,000 mesos#n#k. There's a flight thats about to take off. Are you interested?");
|
||||
cm.sendAcceptDecline("Please remember two things. One, this line is actually for overseas shipping, so #rI cannot gurantee exactly which town you'll land#k. Two, since I am putting you in this special flight, it'll be a bit expensive. The service charge is #e#b10,000 mesos#n#k. There's a flight thats about to take off. Are you interested in this direct flight?");
|
||||
} else if(status == 2){
|
||||
cm.sendNext("Okay, ready to takeoff~");
|
||||
} else if(status == 3){
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Refining NPC:
|
||||
* Chaos scroll SYNTHETIZER (rofl)
|
||||
*
|
||||
* By RonanLana
|
||||
* @author RonanLana
|
||||
*/
|
||||
|
||||
var status = 0;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
Refining NPC:
|
||||
* Accessories refiner
|
||||
*
|
||||
* By Ronan Lana
|
||||
* @author Ronan Lana
|
||||
*/
|
||||
|
||||
var status = -1;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
Victoria Road : Henesys
|
||||
|
||||
NPC Bazaar:
|
||||
* By Ronan Lana
|
||||
* @author Ronan Lana
|
||||
*/
|
||||
|
||||
var options = ["EQUIP","USE","SET-UP","ETC"];
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
* @Author TheRamon, Ronan
|
||||
* @Author TheRamon
|
||||
* @Author Ronan
|
||||
*
|
||||
* Sharen III's Soul, Sharenian: Sharen III's Grave (990000700)
|
||||
*
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* @Author Lerk, Ronan
|
||||
/* @Author Lerk
|
||||
* @Author Ronan
|
||||
*
|
||||
* Guardian Statue - Sharenian: Fountain of the Wiseman (990000500)
|
||||
*
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
* Author : Raz, Ronan
|
||||
* Author : Raz
|
||||
* Author : Ronan
|
||||
*
|
||||
* NPC = 9103000 - Pierre
|
||||
* Map = Ludibrium - Ludibrium Maze 16
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
* Author : Raz, Ronan
|
||||
* Author : Raz
|
||||
* Author : Ronan
|
||||
*
|
||||
* NPC = 9103001 - Rolly
|
||||
* Map = Ludibrium - <Ludibrium>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
*/
|
||||
/*Jack
|
||||
*
|
||||
*@author SharpAceX (Alan), Ronan
|
||||
*@author SharpAceX (Alan)
|
||||
*@author Ronan
|
||||
*/
|
||||
importPackage(Packages.server.expeditions);
|
||||
importPackage(Packages.tools);
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
*/
|
||||
/*Aldol
|
||||
*
|
||||
*@author SharpAceX (Alan), Ronan
|
||||
*@author SharpAceX (Alan)
|
||||
*@author Ronan
|
||||
*/
|
||||
importPackage(Packages.server.expeditions);
|
||||
importPackage(Packages.tools);
|
||||
@@ -31,6 +32,7 @@ var expedition;
|
||||
var player;
|
||||
var em;
|
||||
var exped = MapleExpeditionType.SCARGA;
|
||||
var expedName = "Scarga";
|
||||
var expedBoss = "Scarlion and Targa";
|
||||
var expedMap = "Spooky World";
|
||||
var expedItem = 4032246;
|
||||
@@ -60,7 +62,7 @@ function action(mode, type, selection) {
|
||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||
cm.dispose();
|
||||
} else if (expedition == null) { //Start an expedition
|
||||
cm.sendSimple("#e#b<Expedition: Scarlion & Targa>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
|
||||
cm.sendSimple("#e#b<Expedition: " + expedName + ">\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to take on #r" + expedBoss + "#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);
|
||||
@@ -75,7 +77,7 @@ function action(mode, type, selection) {
|
||||
}
|
||||
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
|
||||
if (expedition.contains(player)) { //If you're registered, warp you in
|
||||
var eim = em.getInstance("Scarga" + player.getClient().getChannel());
|
||||
var eim = em.getInstance(expedName + player.getClient().getChannel());
|
||||
if(eim.getIntProperty("canJoin") == 1) {
|
||||
eim.registerPlayer(player);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user