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:
@@ -1,4 +1,4 @@
|
|||||||
#Fri, 14 Jul 2017 20:30:46 -0300
|
#Mon, 17 Jul 2017 14:21:39 -0300
|
||||||
|
|
||||||
|
|
||||||
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=
|
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dist/MapleSolaxia.jar
vendored
BIN
dist/MapleSolaxia.jar
vendored
Binary file not shown.
@@ -8,9 +8,9 @@ Feature list:
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
PQs:
|
PQs:
|
||||||
* HPQ/KPQ/LPQ/LMPQ/OPQ/EllinPQ/PiratePQ 100%.
|
* HPQ/KPQ/LPQ/LMPQ/OPQ/EllinPQ/PiratePQ/HorntailPQ 100%.
|
||||||
* CWKPQ as Expedition-based event 100%.
|
* CWKPQ as Expedition-based event 100%.
|
||||||
* Expeditions: Scarga 100%.
|
* Expeditions: Scarga/Horntail 100%.
|
||||||
* GuildPQ 100% + Guild queue with multi-lobby systems available.
|
* GuildPQ 100% + Guild queue with multi-lobby systems available.
|
||||||
* Brand-new PQ: Boss Rush PQ 100%.
|
* Brand-new PQ: Boss Rush PQ 100%.
|
||||||
* BalrogPQ semi-functional.
|
* BalrogPQ semi-functional.
|
||||||
|
|||||||
@@ -373,4 +373,12 @@ Corrigido mapas em CBD/Singapore fazendo jogador "cair" do mapa.
|
|||||||
Adicionado no sql lojas de NPCs de Malaysia.
|
Adicionado no sql lojas de NPCs de Malaysia.
|
||||||
Adicionado minidungeon "ByeBye station" (Malaysia).
|
Adicionado minidungeon "ByeBye station" (Malaysia).
|
||||||
Codificada expedição Scarlion/Targa.
|
Codificada expedição Scarlion/Targa.
|
||||||
Corrigido exploit com mini-dungeons (toda party, independente de localização atual, movida para dentro da MD).
|
Corrigido exploit com mini-dungeons (toda party, independente de localização atual, movida para dentro da MD).
|
||||||
|
|
||||||
|
15 Julho 2017,
|
||||||
|
Adicionado area boss Snack Bar.
|
||||||
|
Corrigido bugs com "buffmap" desconectando players em certos casos.
|
||||||
|
|
||||||
|
16 - 17 Julho 2017,
|
||||||
|
Adicionados HTPQ e expedição Horntail.
|
||||||
|
Corrigido bugs com levelup de equipamentos provocando Integer overflow (stats negativos) nos clientes.
|
||||||
@@ -3,43 +3,10 @@
|
|||||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="1"/>
|
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="1"/>
|
||||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||||
<group>
|
<group>
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2091005.js</file>
|
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/Equip.java</file>
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/expeditions/MapleExpeditionType.java</file>
|
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/ItemFactory.java</file>
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleStatEffect.java</file>
|
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/command/Commands.java</file>
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/ScargaBattle.js</file>
|
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/constants/ServerConstants.java</file>
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/AbstractPlayerInteraction.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/KerningPQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/captinsg00.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/GuildQuest.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/CWKPQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9270033.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9201113.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2091005_old.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleMap.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/5511001.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/PiratePQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventManager.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/reactor/ReactorActionManager.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/Channel.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9270047.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/expeditions/MapleExpedition.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/reactor/5511000.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleReactor.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/2133004.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/MD_high.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/life/MapleMonster.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/TimerManager.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/reactor/ReactorScriptManager.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/HenesysPQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/portal/MD_drakeroom.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/BossRushPQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/npc/NPCConversationManager.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9020001.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/LatanicaBattle.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleClient.java</file>
|
|
||||||
</group>
|
</group>
|
||||||
</open-files>
|
</open-files>
|
||||||
</project-private>
|
</project-private>
|
||||||
|
|||||||
57
scripts/event/AreaBossSnackBar.js
Normal file
57
scripts/event/AreaBossSnackBar.js
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
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 as
|
||||||
|
published by the Free Software Foundation 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/>.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||||
|
Snack Bar Spawner
|
||||||
|
-- Edited by --------------------------------------------------------------------------------------
|
||||||
|
Ronan (based on xQuasar's King Clang spawner)
|
||||||
|
|
||||||
|
**/
|
||||||
|
function init() {
|
||||||
|
scheduleNew();
|
||||||
|
}
|
||||||
|
|
||||||
|
function scheduleNew() {
|
||||||
|
setupTask = em.schedule("start", 0); //spawns upon server start. Each 3 hours an server event checks if boss exists, if not spawns it instantly.
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancelSchedule() {
|
||||||
|
if (setupTask != null)
|
||||||
|
setupTask.cancel(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function start() {
|
||||||
|
var snackBarMap = em.getChannelServer().getMapFactory().getMap(105090310);
|
||||||
|
var snackBar = Packages.server.life.MapleLifeFactory.getMonster(8220008);
|
||||||
|
|
||||||
|
if(snackBarMap.getMonsterById(8220008) != null || snackBarMap.getMonsterById(8220009) != null) {
|
||||||
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var setPos = [[-626, -604], [735, -600]];
|
||||||
|
var rndPos = setPos[Math.floor(Math.random() * setPos.length)];
|
||||||
|
|
||||||
|
snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Packages.java.awt.Point(rndPos[0], rndPos[1]));
|
||||||
|
snackBarMap.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place."));
|
||||||
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
|
}
|
||||||
@@ -1,155 +1,209 @@
|
|||||||
/*
|
/**
|
||||||
* This file is part of the OdinMS Maple Story Server
|
* @author: Ronan
|
||||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
* @event: Horntail Battle
|
||||||
Matthias Butz <matze@odinms.de>
|
*/
|
||||||
Jan Christian Meyer <vimes@odinms.de>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
importPackage(Packages.server.life);
|
||||||
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,
|
var isPq = true;
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
var minPlayers = 1, maxPlayers = 30;
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
var minLevel = 100, maxLevel = 255;
|
||||||
GNU Affero General Public License for more details.
|
var entryMap = 240060000;
|
||||||
|
var exitMap = 240050600;
|
||||||
|
var recruitMap = 240050400;
|
||||||
|
var clearMap = 240050600;
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
var minMapId = 240060000;
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
var maxMapId = 240060200;
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
var eventTime = 15; // 15 minutes
|
||||||
* @Author SharpAceX(Alan)
|
|
||||||
* Horntail fight
|
|
||||||
*/
|
|
||||||
|
|
||||||
importPackage(Packages.server.expeditions);
|
var lobbyRange = [0, 0];
|
||||||
|
|
||||||
var exitMap;
|
|
||||||
var minPlayers = 1;
|
|
||||||
var fightTime = 60;
|
|
||||||
|
|
||||||
var trial1; //Cave of Life - The Cave of Trial I
|
|
||||||
var trial2; // Cave of Life - The Cave of Trial II
|
|
||||||
var fightMap; // Cave of Life - Horntail's Cave
|
|
||||||
var exitMap;
|
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
em.setProperty("shuffleReactors","false");
|
setEventRequirements();
|
||||||
trial1 = em.getChannelServer().getMapFactory().getMap(240060000); //Cave of Life - The Cave of Trial I
|
|
||||||
trial2 = em.getChannelServer().getMapFactory().getMap(240060100); // Cave of Life - The Cave of Trial II
|
|
||||||
fightMap = em.getChannelServer().getMapFactory().getMap(240060200); // Cave of Life - Horntail's Cave
|
|
||||||
exitMap = em.getChannelServer().getMapFactory().getMap(211042300);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setLobbyRange() {
|
||||||
|
return lobbyRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setEventRequirements() {
|
||||||
|
var reqStr = "";
|
||||||
|
|
||||||
|
reqStr += "\r\n Number of players: ";
|
||||||
|
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
|
||||||
|
else reqStr += minPlayers;
|
||||||
|
|
||||||
|
reqStr += "\r\n Level range: ";
|
||||||
|
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
|
||||||
|
else reqStr += minLevel;
|
||||||
|
|
||||||
|
reqStr += "\r\n Time limit: ";
|
||||||
|
reqStr += eventTime + " minutes";
|
||||||
|
|
||||||
|
em.setProperty("party", reqStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setEventExclusives(eim) {
|
||||||
|
var itemSet = [];
|
||||||
|
eim.setExclusiveItems(itemSet);
|
||||||
|
}
|
||||||
|
|
||||||
function setup() {
|
function setEventRewards(eim) {
|
||||||
var eim = em.newInstance("HorntailFight_" + em.getProperty("channel"));
|
var itemSet, itemQty, evLevel, expStages, mesoStages;
|
||||||
var timer = 1000 * 60 * fightTime;
|
|
||||||
em.schedule("timeOut", eim, timer);
|
evLevel = 1; //Rewards at clear PQ
|
||||||
eim.startEventTimer(timer);
|
itemSet = [];
|
||||||
return eim;
|
itemQty = [];
|
||||||
|
eim.setEventRewards(evLevel, itemSet, itemQty);
|
||||||
|
|
||||||
|
expStages = []; //bonus exp given on CLEAR stage signal
|
||||||
|
eim.setEventClearStageExp(expStages);
|
||||||
|
|
||||||
|
mesoStages = []; //bonus meso given on CLEAR stage signal
|
||||||
|
eim.setEventClearStageMeso(mesoStages);
|
||||||
}
|
}
|
||||||
|
|
||||||
function afterSetup(eim) {}
|
function afterSetup(eim) {}
|
||||||
|
|
||||||
function playerEntry(eim,player) {
|
function setup(channel) {
|
||||||
var map = eim.getMapInstance(trial1.getId());
|
var eim = em.newInstance("Scarga" + channel);
|
||||||
player.changeMap(map,map.getPortal(0));
|
eim.setProperty("canJoin", 1);
|
||||||
if (exitMap == null)
|
eim.setProperty("defeatedBoss", 0);
|
||||||
debug(eim,"The exit map was not properly linked.");
|
eim.setProperty("defeatedHead", 0);
|
||||||
|
|
||||||
|
var level = 1;
|
||||||
|
eim.getInstanceMap(240060000).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240060100).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240060200).resetPQ(level);
|
||||||
|
|
||||||
|
var map, mob;
|
||||||
|
map = eim.getInstanceMap(240060000);
|
||||||
|
mob = MapleLifeFactory.getMonster(8810000);
|
||||||
|
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(960, 120));
|
||||||
|
|
||||||
|
map = eim.getInstanceMap(240060100);
|
||||||
|
mob = MapleLifeFactory.getMonster(8810001);
|
||||||
|
map.spawnMonsterOnGroundBelow(mob, new java.awt.Point(-420, 120));
|
||||||
|
|
||||||
|
eim.startEventTimer(eventTime * 60000);
|
||||||
|
setEventRewards(eim);
|
||||||
|
setEventExclusives(eim);
|
||||||
|
|
||||||
|
return eim;
|
||||||
}
|
}
|
||||||
|
|
||||||
function playerRevive(eim,player) {
|
function playerEntry(eim, player) {
|
||||||
player.setHp(500);
|
eim.dropMessage(5, "[Expedition] " + player.getName() + " has entered the map.");
|
||||||
player.setStance(0);
|
var map = eim.getMapInstance(entryMap);
|
||||||
eim.unregisterPlayer(player);
|
player.changeMap(map, map.getPortal(0));
|
||||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
|
||||||
var party = eim.getPlayers();
|
|
||||||
if (party.size() < minPlayers)
|
|
||||||
end(eim,"There are not enough players remaining, the Battle is over.");
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function playerDead(eim,player) {
|
function scheduledTimeout(eim) {
|
||||||
|
end(eim);
|
||||||
}
|
}
|
||||||
|
|
||||||
function playerDisconnected(eim,player) {
|
function changedMap(eim, player, mapid) {
|
||||||
var party = eim.getPlayers();
|
if (mapid < minMapId || mapid > maxMapId) {
|
||||||
if (player.getName().equals(eim.getProperty("leader"))) {
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||||
// tell members
|
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
|
||||||
var iter = party.iterator();
|
eim.unregisterPlayer(player);
|
||||||
while (iter.hasNext())
|
end(eim);
|
||||||
iter.next().getPlayer().dropMessage(6,"The leader of the instance has disconnected.");
|
}
|
||||||
}
|
else {
|
||||||
// and, if the party is too small
|
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
|
||||||
if (party.size() < minPlayers) {
|
eim.unregisterPlayer(player);
|
||||||
end(eim,"There are not enough players remaining. The Battle is over.");
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changedLeader(eim, leader) {}
|
||||||
|
|
||||||
|
function playerDead(eim, player) {}
|
||||||
|
|
||||||
|
function playerRevive(eim, player) {
|
||||||
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function playerDisconnected(eim, player) {
|
||||||
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||||
|
eim.dropMessage(5, "[Expedition] Either the leader has quitted the event or there is no longer the minimum number of members required to continue this event.");
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eim.dropMessage(5, "[Expedition] " + player.getName() + " has left the event.");
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function leftParty (eim, player) {}
|
||||||
|
|
||||||
|
function disbandParty (eim) {}
|
||||||
|
|
||||||
function monsterValue(eim, mobId) {
|
function monsterValue(eim, mobId) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function leftParty(eim,player) {}
|
|
||||||
|
|
||||||
function disbandParty(eim) {}
|
|
||||||
|
|
||||||
function playerUnregistered(eim, player) {}
|
function playerUnregistered(eim, player) {}
|
||||||
|
|
||||||
function playerExit(eim,player) {
|
function playerExit(eim, player) {
|
||||||
eim.unregisterPlayer(player);
|
eim.unregisterPlayer(player);
|
||||||
player.changeMap(exitMap,exitMap.getPortal(0));
|
player.changeMap(exitMap, 0);
|
||||||
if (eim.getPlayers().size() < minPlayers)//not enough after someone left
|
|
||||||
end(eim,"There are no longer enough players to continue, and those remaining shall be warped out.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function end(eim,msg) {
|
function end(eim) {
|
||||||
var iter = eim.getPlayers().iterator();
|
var party = eim.getPlayers();
|
||||||
while (iter.hasNext()) {
|
for (var i = 0; i < party.size(); i++) {
|
||||||
var player = iter.next();
|
playerExit(eim, party.get(i));
|
||||||
player.getPlayer().dropMessage(6,msg);
|
|
||||||
eim.unregisterPlayer(player);
|
|
||||||
if (player != null)
|
|
||||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
|
||||||
}
|
}
|
||||||
eim.dispose();
|
eim.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// for offline folk
|
function giveRandomEventReward(eim, player) {
|
||||||
function removePlayer(eim,player) {
|
eim.giveEventReward(player);
|
||||||
eim.unregisterPlayer(player);
|
|
||||||
player.getMap().removePlayer(player);
|
|
||||||
player.setMap(exitMap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearPQ(eim) {}
|
function clearPQ(eim) {
|
||||||
|
eim.stopEventTimer();
|
||||||
|
eim.setEventCleared();
|
||||||
|
}
|
||||||
|
|
||||||
function finish(eim) {
|
function isHorntailHead(mob) {
|
||||||
var iter = eim.getPlayers().iterator();
|
var mobid = mob.getId();
|
||||||
while (iter.hasNext()) {
|
return (mobid == 8810000 || mobid == 8810001);
|
||||||
var player = iter.next();
|
}
|
||||||
eim.unregisterPlayer(player);
|
|
||||||
player.changeMap(exitMap, exitMap.getPortal(0));
|
function isHorntail(mob) {
|
||||||
|
var mobid = mob.getId();
|
||||||
|
return (mobid == 8810018);
|
||||||
|
}
|
||||||
|
|
||||||
|
function monsterKilled(mob, eim) {
|
||||||
|
if(isHorntail(mob)) {
|
||||||
|
eim.setIntProperty("defeatedBoss", 1);
|
||||||
|
eim.showClearEffect(mob.getMap().getId());
|
||||||
|
eim.clearPQ();
|
||||||
|
|
||||||
|
mob.getMap().broadcastHorntailVictory();
|
||||||
|
} else if(isHorntailHead(mob)) {
|
||||||
|
var killed = eim.getIntProperty("defeatedHead");
|
||||||
|
eim.setIntProperty("defeatedHead", killed + 1);
|
||||||
|
eim.showClearEffect(mob.getMap().getId());
|
||||||
}
|
}
|
||||||
eim.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function monsterKilled(mob, eim) {}
|
|
||||||
|
|
||||||
function allMonstersDead(eim) {}
|
function allMonstersDead(eim) {}
|
||||||
|
|
||||||
function cancelSchedule() {}
|
function cancelSchedule() {}
|
||||||
|
|
||||||
function timeOut() {}
|
function dispose(eim) {}
|
||||||
|
|
||||||
function debug(eim,msg) {
|
|
||||||
var iter = eim.getPlayers().iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
iter.next().getClient().getSession().write(Packages.tools.MaplePacketCreator.serverNotice(6,msg));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
213
scripts/event/HorntailPQ.js
Normal file
213
scripts/event/HorntailPQ.js
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
/**
|
||||||
|
* @author: Ronan
|
||||||
|
* @event: Horntail PQ
|
||||||
|
*/
|
||||||
|
|
||||||
|
var isPq = true;
|
||||||
|
var minPlayers = 1, maxPlayers = 6;
|
||||||
|
var minLevel = 120, maxLevel = 255;
|
||||||
|
var entryMap = 240050100;
|
||||||
|
var exitMap = 240050500;
|
||||||
|
var recruitMap = 240050000;
|
||||||
|
var clearMap = 240050400;
|
||||||
|
|
||||||
|
var minMapId = 240050100;
|
||||||
|
var maxMapId = 240050310;
|
||||||
|
|
||||||
|
var eventTime = 25; // 25 minutes
|
||||||
|
|
||||||
|
var lobbyRange = [0, 0];
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
setEventRequirements();
|
||||||
|
}
|
||||||
|
|
||||||
|
function setLobbyRange() {
|
||||||
|
return lobbyRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setEventRequirements() {
|
||||||
|
var reqStr = "";
|
||||||
|
|
||||||
|
reqStr += "\r\n Number of players: ";
|
||||||
|
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
|
||||||
|
else reqStr += minPlayers;
|
||||||
|
|
||||||
|
reqStr += "\r\n Level range: ";
|
||||||
|
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
|
||||||
|
else reqStr += minLevel;
|
||||||
|
|
||||||
|
reqStr += "\r\n Time limit: ";
|
||||||
|
reqStr += eventTime + " minutes";
|
||||||
|
|
||||||
|
em.setProperty("party", reqStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setEventExclusives(eim) {
|
||||||
|
var itemSet = [4001087, 4001088, 4001089, 4001090, 4001091, 4001092, 4001093];
|
||||||
|
eim.setExclusiveItems(itemSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setEventRewards(eim) {
|
||||||
|
var itemSet, itemQty, evLevel, expStages;
|
||||||
|
|
||||||
|
evLevel = 1; //Rewards at clear PQ
|
||||||
|
itemSet = [];
|
||||||
|
itemQty = [];
|
||||||
|
eim.setEventRewards(evLevel, itemSet, itemQty);
|
||||||
|
|
||||||
|
expStages = []; //bonus exp given on CLEAR stage signal
|
||||||
|
eim.setEventClearStageExp(expStages);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
|
||||||
|
var eligible = [];
|
||||||
|
var hasLeader = false;
|
||||||
|
|
||||||
|
if(party.size() > 0) {
|
||||||
|
var partyList = party.toArray();
|
||||||
|
|
||||||
|
for(var i = 0; i < party.size(); i++) {
|
||||||
|
var ch = partyList[i];
|
||||||
|
|
||||||
|
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
|
||||||
|
if(ch.isLeader()) hasLeader = true;
|
||||||
|
eligible.push(ch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
|
||||||
|
return eligible;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup(level, lobbyid) {
|
||||||
|
var eim = em.newInstance("PreHorntail" + lobbyid);
|
||||||
|
eim.setProperty("level", level);
|
||||||
|
|
||||||
|
eim.getInstanceMap(240050000).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050100).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050101).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050102).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050103).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050104).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050105).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050200).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050300).resetPQ(level);
|
||||||
|
eim.getInstanceMap(240050310).resetPQ(level);
|
||||||
|
|
||||||
|
eim.getInstanceMap(240050101).getReactorByName("passKey1").setEventState(0);
|
||||||
|
eim.getInstanceMap(240050102).getReactorByName("passKey2").setEventState(1);
|
||||||
|
eim.getInstanceMap(240050103).getReactorByName("passKey3").setEventState(2);
|
||||||
|
eim.getInstanceMap(240050104).getReactorByName("passKey4").setEventState(3);
|
||||||
|
|
||||||
|
respawnStages(eim);
|
||||||
|
|
||||||
|
eim.startEventTimer(eventTime * 60000);
|
||||||
|
setEventRewards(eim);
|
||||||
|
setEventExclusives(eim);
|
||||||
|
|
||||||
|
return eim;
|
||||||
|
}
|
||||||
|
|
||||||
|
function afterSetup(eim) {}
|
||||||
|
|
||||||
|
function respawnStages(eim) {}
|
||||||
|
|
||||||
|
function playerEntry(eim, player) {
|
||||||
|
var map = eim.getMapInstance(entryMap);
|
||||||
|
player.changeMap(map, map.getPortal(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
function scheduledTimeout(eim) {
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
|
||||||
|
function playerUnregistered(eim, player) {}
|
||||||
|
|
||||||
|
function playerExit(eim, player) {
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
player.changeMap(exitMap, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
function changedMap(eim, player, mapid) {
|
||||||
|
if (mapid < minMapId || mapid > maxMapId) {
|
||||||
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function changedLeader(eim, leader) {
|
||||||
|
var mapid = leader.getMapId();
|
||||||
|
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function playerDead(eim, player) {}
|
||||||
|
|
||||||
|
function playerRevive(eim, player) { // player presses ok on the death pop up.
|
||||||
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
function playerDisconnected(eim, player) {
|
||||||
|
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
function leftParty(eim, player) {
|
||||||
|
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eim.unregisterPlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
function disbandParty(eim) {
|
||||||
|
end(eim);
|
||||||
|
}
|
||||||
|
|
||||||
|
function monsterValue(eim, mobId) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function end(eim) {
|
||||||
|
var party = eim.getPlayers();
|
||||||
|
for (var i = 0; i < party.size(); i++) {
|
||||||
|
playerExit(eim, party.get(i));
|
||||||
|
}
|
||||||
|
eim.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
function giveRandomEventReward(eim, player) {
|
||||||
|
eim.giveEventReward(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearPQ(eim) {
|
||||||
|
eim.stopEventTimer();
|
||||||
|
eim.setEventCleared();
|
||||||
|
|
||||||
|
eim.warpEventTeam(clearMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
function monsterKilled(mob, eim) {}
|
||||||
|
|
||||||
|
function allMonstersDead(eim) {}
|
||||||
|
|
||||||
|
function cancelSchedule() {}
|
||||||
|
|
||||||
|
function dispose(eim) {}
|
||||||
@@ -68,7 +68,7 @@ function afterSetup(eim) {}
|
|||||||
function setup(channel) {
|
function setup(channel) {
|
||||||
var eim = em.newInstance("Scarga" + channel);
|
var eim = em.newInstance("Scarga" + channel);
|
||||||
eim.setProperty("canJoin", 1);
|
eim.setProperty("canJoin", 1);
|
||||||
eim.setProperty("defeatedBoss", 1);
|
eim.setProperty("defeatedBoss", 0);
|
||||||
|
|
||||||
var level = 1;
|
var level = 1;
|
||||||
eim.getInstanceMap(551030200).resetPQ(level);
|
eim.getInstanceMap(551030200).resetPQ(level);
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @author BubblesDev, Ronan
|
* @author BubblesDev
|
||||||
|
* @author Ronan
|
||||||
* @NPC Tory
|
* @NPC Tory
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @author BubblesDev, Ronan
|
* @author BubblesDev
|
||||||
|
* @author Ronan
|
||||||
* @npc Tommy (HPQ)
|
* @npc Tommy (HPQ)
|
||||||
*/
|
*/
|
||||||
var status = 0;
|
var status = 0;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Growlie (that fatass uhh.. hungry lion or whatever)
|
Growlie (that fatass uhh.. hungry lion or whatever)
|
||||||
FightDesign @RageZONE
|
FightDesign @RageZONE
|
||||||
|
|
||||||
Ronan
|
@author Ronan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var status = 0;
|
var status = 0;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @author: Eric, Ronan
|
* @author: Eric
|
||||||
|
* @author: Ronan
|
||||||
* @npc: Red Sign
|
* @npc: Red Sign
|
||||||
* @map: 101st Floor Eos Tower (221024500)
|
* @map: 101st Floor Eos Tower (221024500)
|
||||||
* @func: Ludi PQ
|
* @func: Ludi PQ
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Red Balloon
|
@ NPC = Red Balloon
|
||||||
@ Map = Hidden-Street <Stage 1>
|
@ Map = Hidden-Street <Stage 1>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Orange Balloon
|
@ NPC = Orange Balloon
|
||||||
@ Map = Hidden-Street <Stage 2>
|
@ Map = Hidden-Street <Stage 2>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Yellow Balloon
|
@ NPC = Yellow Balloon
|
||||||
@ Map = Hidden-Street <Stage 3>
|
@ Map = Hidden-Street <Stage 3>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Lime Balloon
|
@ NPC = Lime Balloon
|
||||||
@ Map = Hidden-Street <Stage 4>
|
@ Map = Hidden-Street <Stage 4>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Green Balloon
|
@ NPC = Green Balloon
|
||||||
@ Map = Hidden-Street <Stage 5>
|
@ Map = Hidden-Street <Stage 5>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Sky-Blue Balloon
|
@ NPC = Sky-Blue Balloon
|
||||||
@ Map = Hidden-Street <Stage 7>
|
@ Map = Hidden-Street <Stage 7>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Twdtwd, Ronan
|
@ Author : Twdtwd
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Blue Balloon
|
@ NPC = Blue Balloon
|
||||||
@ Map = Hidden-Street <Stage 8>
|
@ Map = Hidden-Street <Stage 8>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Twdtwd, Ronan
|
@ Author : Twdtwd
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Violet Balloon
|
@ NPC = Violet Balloon
|
||||||
@ Map = Hidden-Street <Crack on the Wall>
|
@ Map = Hidden-Street <Crack on the Wall>
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Pink Balloon
|
@ NPC = Pink Balloon
|
||||||
@ Map = Hidden-Street <Stage B>
|
@ Map = Hidden-Street <Stage B>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
@ Author : Raz, Ronan
|
@ Author : Raz
|
||||||
|
@ Author : Ronan
|
||||||
@
|
@
|
||||||
@ NPC = Sgt.Anderson
|
@ NPC = Sgt.Anderson
|
||||||
@ Map = Abandoned Tower <Stage 1>
|
@ Map = Abandoned Tower <Stage 1>
|
||||||
|
|||||||
@@ -19,12 +19,25 @@
|
|||||||
You should have received a copy of the GNU Affero General Public License
|
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/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
//Fixed by Moogra
|
//Fixed by Moogra, Ronan
|
||||||
//Fixed grammar, javascript syntax
|
//Fixed grammar, javascript syntax
|
||||||
|
|
||||||
|
importPackage(Packages.client);
|
||||||
|
|
||||||
var status = 0;
|
var status = 0;
|
||||||
var price = 100000;
|
var price = 100000;
|
||||||
|
|
||||||
|
function isTransformed(ch) {
|
||||||
|
return ch.getBuffSource(MapleBuffStat.MORPH) == 2210003;
|
||||||
|
}
|
||||||
|
|
||||||
function start() {
|
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");
|
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)
|
if (mode < 1)
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
else if (selection == 1) {
|
else if (selection == 1) {
|
||||||
if(cm.getMeso() >= price && cm.canHold(2000005)) {
|
if(cm.getMeso() >= price) {
|
||||||
cm.gainMeso(-price);
|
if(!cm.canHold(2000005)) {
|
||||||
cm.gainItem(2000005, 10);
|
cm.sendOk("Sorry, you don't have a slot on your inventory for the item!");
|
||||||
cm.sendOk("Thank you for buying the potion. Use it as well!");
|
} else {
|
||||||
} 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.sendOk("Sorry, you don't have enough mesos to buy them!");
|
||||||
|
}
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
} else if (selection == 2) {
|
} else if (selection == 2) {
|
||||||
if (cm.getLevel() > 99)
|
if (cm.getLevel() > 99)
|
||||||
|
|||||||
@@ -47,68 +47,15 @@ function action(mode, type, selection) {
|
|||||||
else
|
else
|
||||||
status--;
|
status--;
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
// Slate has no preamble, directly checks if you're in a party
|
if(cm.haveItem(4001086)) {
|
||||||
if (cm.getParty() == null) { // no party
|
cm.sendYesNo("Do you want to access #b#m240050400##k right now?");
|
||||||
cm.sendOk("If you want to attempt the quest, try making a party and getting 6 People...");
|
} else {
|
||||||
|
cm.sendOk("Those who don't have the #r#t4001086##k must prove their valor before challenging #bHorntail#k.");
|
||||||
cm.dispose();
|
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 {
|
else {
|
||||||
cm.sendOk("RAWR!?!?!?");
|
cm.warp(240050400);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,107 @@
|
|||||||
/*
|
/**
|
||||||
This file is part of the OdinMS Maple Story Server
|
* @author: Ronan
|
||||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
* @npc: Mark of the Squad
|
||||||
Matthias Butz <matze@odinms.de>
|
* @map: Cave of Life - Cave Entrance (240050000)
|
||||||
Jan Christian Meyer <vimes@odinms.de>
|
* @func: Horntail PQ
|
||||||
|
|
||||||
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/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var status = 0;
|
||||||
|
var price = 100000;
|
||||||
|
var em = null;
|
||||||
|
var hasPass;
|
||||||
|
|
||||||
|
function isRecruitingMap(mapid) {
|
||||||
|
return mapid == 240050000;
|
||||||
|
}
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
cm.warp(240050400);
|
status = -1;
|
||||||
cm.dispose();
|
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
|
*Crystal of Roots
|
||||||
*@Author: Moogra
|
*@Author: Ronan
|
||||||
*@NPC: Crystal of Roots
|
*@NPC: Crystal of Roots
|
||||||
*/
|
*/
|
||||||
function start() {
|
function start() {
|
||||||
@@ -33,11 +33,9 @@ function action(mode, type, selection) {
|
|||||||
if (mode < 1)
|
if (mode < 1)
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
else {
|
else {
|
||||||
cm.warp(240040700);
|
if(cm.getMapId() > 240050400) cm.warp(240050600);
|
||||||
if (cm.getPlayer().getMap().getCharacters().size() < 2){
|
else cm.warp(240040700);
|
||||||
cm.getPlayer().getMap().killAllMonsters();
|
|
||||||
cm.getPlayer().getMap().resetReactors();
|
|
||||||
}
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,11 +19,9 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*Mark of the Squad
|
/*Mark of the Squad
|
||||||
*@author Even
|
*
|
||||||
*@author SharpAceX (Alan)
|
*@author SharpAceX (Alan)
|
||||||
*/
|
*@author Ronan
|
||||||
/*TODO
|
|
||||||
* ADD A CHECK TO SEE IF PLAYERS HAVE BADGE
|
|
||||||
*/
|
*/
|
||||||
importPackage(Packages.server.expeditions);
|
importPackage(Packages.server.expeditions);
|
||||||
importPackage(Packages.tools);
|
importPackage(Packages.tools);
|
||||||
@@ -33,7 +31,10 @@ var status = 0;
|
|||||||
var expedition;
|
var expedition;
|
||||||
var player;
|
var player;
|
||||||
var em;
|
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";
|
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() {
|
function start() {
|
||||||
@@ -43,113 +44,134 @@ function start() {
|
|||||||
function action(mode, type, selection) {
|
function action(mode, type, selection) {
|
||||||
|
|
||||||
player = cm.getPlayer();
|
player = cm.getPlayer();
|
||||||
expedition = cm.getExpedition(horntail);
|
expedition = cm.getExpedition(exped);
|
||||||
em = cm.getEventManager("HorntailFight");
|
em = cm.getEventManager("HorntailFight");
|
||||||
|
|
||||||
if (mode < 1) {
|
if (mode == -1) {
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
} else {
|
||||||
}
|
if (mode == 0) {
|
||||||
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.");
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (status == 2) {
|
|
||||||
if (selection == 1) {
|
if (status == 0) {
|
||||||
if (expedition == null) {
|
if (player.getLevel() < exped.getMinLevel() && player.getLevel() > exped.getMaxLevel()) { //Don't fit requirement
|
||||||
cm.sendOk("The expedition could not be loaded.");
|
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();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var size = expedition.getMembers().size();
|
} else if (status == 2) {
|
||||||
if (size == 1) {
|
if (selection == 1) {
|
||||||
cm.sendOk("You are the only member of the expedition.");
|
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();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var text = "The following members make up your expedition (Click on them to expel them):\r\n";
|
} else if (status == 4) {
|
||||||
text += "\r\n\t\t1." + expedition.getLeader().getName();
|
if (em == null) {
|
||||||
for (var i = 1; i < size; i++) {
|
cm.sendOk("The event could not be initialized, please report this on the forum.");
|
||||||
text += "\r\n#b#L" + (i + 1) + "#" + (i + 1) + ". " + expedition.getMembers().get(i).getName() + "#l\n";
|
cm.dispose();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
cm.sendSimple(text);
|
|
||||||
status = 6;
|
em.setProperty("leader", player.getName());
|
||||||
} else if (selection == 2) {
|
em.setProperty("channel", player.getClient().getChannel());
|
||||||
cm.sendOk("The expedition will begin and you will be escorted to the #bCave of Trial I#k.");
|
if(!em.startInstance(expedition)) {
|
||||||
status = 4;
|
cm.sendOk("Another expedition has taken the initiative to challenge " + expedBoss + ", lets pray for those brave souls.");
|
||||||
} else if (selection == 3) {
|
cm.dispose();
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
return;
|
||||||
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.");
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
} else if (status == 6) {
|
||||||
if (em == null) {
|
if (selection > 0) {
|
||||||
cm.sendOk("The event could not be found, please report this on the forum.");
|
var banned = expedition.getMembers().get(selection - 1);
|
||||||
cm.dispose();
|
expedition.ban(banned);
|
||||||
return;
|
cm.sendOk("You have banned " + banned.getName() + " from the expedition.");
|
||||||
}
|
cm.dispose();
|
||||||
cm.sendOk("Good luck! All of Leafre is counting on you.");
|
} else {
|
||||||
em.setProperty("channel", player.getClient().getChannel());
|
cm.sendSimple(list);
|
||||||
em.startInstance(expedition);
|
status = 2;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
/* Author: aaroncsn(MapleSea Like), Ronan Lana
|
/* @author aaroncsn(MapleSea Like)
|
||||||
|
* @author Ronan
|
||||||
NPC Name: Mr. Do
|
NPC Name: Mr. Do
|
||||||
Map(s): Mu Lung: Mu Lung(2500000000)
|
Map(s): Mu Lung: Mu Lung(2500000000)
|
||||||
Description: Potion Creator
|
Description: Potion Creator
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ function action(mode, type, selection) {
|
|||||||
else
|
else
|
||||||
status--;
|
status--;
|
||||||
if(status == 0){
|
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){
|
} 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){
|
} else if(status == 2){
|
||||||
cm.sendNext("Okay, ready to takeoff~");
|
cm.sendNext("Okay, ready to takeoff~");
|
||||||
} else if(status == 3){
|
} else if(status == 3){
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Refining NPC:
|
Refining NPC:
|
||||||
* Chaos scroll SYNTHETIZER (rofl)
|
* Chaos scroll SYNTHETIZER (rofl)
|
||||||
*
|
*
|
||||||
* By RonanLana
|
* @author RonanLana
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var status = 0;
|
var status = 0;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
Refining NPC:
|
Refining NPC:
|
||||||
* Accessories refiner
|
* Accessories refiner
|
||||||
*
|
*
|
||||||
* By Ronan Lana
|
* @author Ronan Lana
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var status = -1;
|
var status = -1;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
Victoria Road : Henesys
|
Victoria Road : Henesys
|
||||||
|
|
||||||
NPC Bazaar:
|
NPC Bazaar:
|
||||||
* By Ronan Lana
|
* @author Ronan Lana
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var options = ["EQUIP","USE","SET-UP","ETC"];
|
var options = ["EQUIP","USE","SET-UP","ETC"];
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
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)
|
* 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)
|
* Guardian Statue - Sharenian: Fountain of the Wiseman (990000500)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Author : Raz, Ronan
|
* Author : Raz
|
||||||
|
* Author : Ronan
|
||||||
*
|
*
|
||||||
* NPC = 9103000 - Pierre
|
* NPC = 9103000 - Pierre
|
||||||
* Map = Ludibrium - Ludibrium Maze 16
|
* Map = Ludibrium - Ludibrium Maze 16
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Author : Raz, Ronan
|
* Author : Raz
|
||||||
|
* Author : Ronan
|
||||||
*
|
*
|
||||||
* NPC = 9103001 - Rolly
|
* NPC = 9103001 - Rolly
|
||||||
* Map = Ludibrium - <Ludibrium>
|
* Map = Ludibrium - <Ludibrium>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
/*Jack
|
/*Jack
|
||||||
*
|
*
|
||||||
*@author SharpAceX (Alan), Ronan
|
*@author SharpAceX (Alan)
|
||||||
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
importPackage(Packages.server.expeditions);
|
importPackage(Packages.server.expeditions);
|
||||||
importPackage(Packages.tools);
|
importPackage(Packages.tools);
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
/*Aldol
|
/*Aldol
|
||||||
*
|
*
|
||||||
*@author SharpAceX (Alan), Ronan
|
*@author SharpAceX (Alan)
|
||||||
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
importPackage(Packages.server.expeditions);
|
importPackage(Packages.server.expeditions);
|
||||||
importPackage(Packages.tools);
|
importPackage(Packages.tools);
|
||||||
@@ -31,6 +32,7 @@ var expedition;
|
|||||||
var player;
|
var player;
|
||||||
var em;
|
var em;
|
||||||
var exped = MapleExpeditionType.SCARGA;
|
var exped = MapleExpeditionType.SCARGA;
|
||||||
|
var expedName = "Scarga";
|
||||||
var expedBoss = "Scarlion and Targa";
|
var expedBoss = "Scarlion and Targa";
|
||||||
var expedMap = "Spooky World";
|
var expedMap = "Spooky World";
|
||||||
var expedItem = 4032246;
|
var expedItem = 4032246;
|
||||||
@@ -60,7 +62,7 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
cm.sendOk("You do not meet the criteria to battle " + expedBoss + "!");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
} else if (expedition == null) { //Start an expedition
|
} 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;
|
status = 1;
|
||||||
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
|
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
|
||||||
cm.sendSimple(list);
|
cm.sendSimple(list);
|
||||||
@@ -75,7 +77,7 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
|
} else if (expedition.isInProgress()) { //Only if the expedition is in progress
|
||||||
if (expedition.contains(player)) { //If you're registered, warp you in
|
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) {
|
if(eim.getIntProperty("canJoin") == 1) {
|
||||||
eim.registerPlayer(player);
|
eim.registerPlayer(player);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
3
scripts/portal/ariant_queens.js
Normal file
3
scripts/portal/ariant_queens.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
//some quest where you must use hidden portals
|
||||||
|
function enter(pi) {
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* By RonanLana */
|
/* @author RonanLana */
|
||||||
|
|
||||||
function enter(pi) {
|
function enter(pi) {
|
||||||
if (!pi.haveItem(4000381)) {
|
if (!pi.haveItem(4000381)) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user