@@ -36,6 +36,9 @@ import client.processor.npc.FredrickProcessor;
|
||||
import config.YamlConfig;
|
||||
import constants.game.ExpTable;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.id.MobId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.skills.*;
|
||||
import net.packet.Packet;
|
||||
@@ -403,10 +406,10 @@ public class Character extends AbstractCharacterObject {
|
||||
|
||||
//to fix the map 0 lol
|
||||
for (int i = 0; i < 5; i++) {
|
||||
ret.trockmaps.add(999999999);
|
||||
ret.trockmaps.add(MapId.NONE);
|
||||
}
|
||||
for (int i = 0; i < 10; i++) {
|
||||
ret.viptrockmaps.add(999999999);
|
||||
ret.viptrockmaps.add(MapId.NONE);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -581,7 +584,8 @@ public class Character extends AbstractCharacterObject {
|
||||
String prop = eim.getProperty("groomId");
|
||||
|
||||
if (prop != null) {
|
||||
return (Integer.parseInt(prop) == id || eim.getIntProperty("brideId") == id) && (mapid == 680000110 || mapid == 680000210);
|
||||
return (Integer.parseInt(prop) == id || eim.getIntProperty("brideId") == id) &&
|
||||
(mapid == MapId.CHAPEL_WEDDING_ALTAR || mapid == MapId.CATHEDRAL_WEDDING_ALTAR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,7 +596,7 @@ public class Character extends AbstractCharacterObject {
|
||||
int pts = 0;
|
||||
if (dojoPoints < 17000) {
|
||||
pts = 1 + ((mapid - 1) / 100 % 100) / 6;
|
||||
if (!GameConstants.isDojoPartyArea(this.getMapId())) {
|
||||
if (!MapId.isPartyDojo(this.getMapId())) {
|
||||
pts++;
|
||||
}
|
||||
this.dojoPoints += pts;
|
||||
@@ -1399,7 +1403,7 @@ public class Character extends AbstractCharacterObject {
|
||||
// will actually enter the map given as parameter, regardless of being an eventmap or whatnot
|
||||
|
||||
canWarpCounter++;
|
||||
eventChangedMap(999999999);
|
||||
eventChangedMap(MapId.NONE);
|
||||
|
||||
EventInstanceManager mapEim = target.getEventInstance();
|
||||
if (mapEim != null) {
|
||||
@@ -1441,10 +1445,10 @@ public class Character extends AbstractCharacterObject {
|
||||
if (mbs.getKey() == BuffStat.MAP_PROTECTION) {
|
||||
byte value = (byte) mbs.getValue().value;
|
||||
|
||||
if (value == 1 && ((returnMapid == 211000000 && thisMapid != 200082300) || returnMapid == 193000000)) {
|
||||
if (value == 1 && ((returnMapid == MapId.EL_NATH && thisMapid != MapId.ORBIS_TOWER_BOTTOM) || returnMapid == MapId.INTERNET_CAFE)) {
|
||||
return true; //protection from cold
|
||||
} else {
|
||||
return value == 2 && (returnMapid == 230000000 || thisMapid == 200082300); //breathing underwater
|
||||
return value == 2 && (returnMapid == MapId.AQUARIUM || thisMapid == MapId.ORBIS_TOWER_BOTTOM); //breathing underwater
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1454,7 +1458,8 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
|
||||
for (Item it : this.getInventory(InventoryType.EQUIPPED).list()) {
|
||||
if ((it.getFlag() & ItemConstants.COLD) == ItemConstants.COLD && ((returnMapid == 211000000 && thisMapid != 200082300) || returnMapid == 193000000)) {
|
||||
if ((it.getFlag() & ItemConstants.COLD) == ItemConstants.COLD &&
|
||||
((returnMapid == MapId.EL_NATH && thisMapid != MapId.ORBIS_TOWER_BOTTOM) || returnMapid == MapId.INTERNET_CAFE)) {
|
||||
return true; //protection from cold
|
||||
}
|
||||
}
|
||||
@@ -1879,7 +1884,7 @@ public class Character extends AbstractCharacterObject {
|
||||
if (ItemConstants.isPartyItem(itemid)) {
|
||||
List<Character> pchr = this.getPartyMembersOnSameMap();
|
||||
|
||||
if (!ItemConstants.isPartyAllcure(itemid)) {
|
||||
if (!ItemId.isPartyAllCure(itemid)) {
|
||||
StatEffect mse = ii.getItemEffect(itemid);
|
||||
|
||||
if (!pchr.isEmpty()) {
|
||||
@@ -1946,10 +1951,10 @@ public class Character extends AbstractCharacterObject {
|
||||
|
||||
Item mItem = mapitem.getItem();
|
||||
boolean hasSpaceInventory = true;
|
||||
if (mapitem.getItemId() == 4031865 || mapitem.getItemId() == 4031866 || mapitem.getMeso() > 0 || ii.isConsumeOnPickup(mapitem.getItemId()) || (hasSpaceInventory = InventoryManipulator.checkSpace(client, mapitem.getItemId(), mItem.getQuantity(), mItem.getOwner()))) {
|
||||
if (ItemId.isNxCard(mapitem.getItemId()) || mapitem.getMeso() > 0 || ii.isConsumeOnPickup(mapitem.getItemId()) || (hasSpaceInventory = InventoryManipulator.checkSpace(client, mapitem.getItemId(), mItem.getQuantity(), mItem.getOwner()))) {
|
||||
int mapId = this.getMapId();
|
||||
|
||||
if ((mapId > 209000000 && mapId < 209000016) || (mapId >= 990000500 && mapId <= 990000502)) {//happyville trees and guild PQ
|
||||
if ((MapId.isSelfLootableOnly(mapId))) {//happyville trees and guild PQ
|
||||
if (!mapitem.isPlayerDrop() || mapitem.getDropper().getObjectId() == client.getPlayer().getObjectId()) {
|
||||
if (mapitem.getMeso() > 0) {
|
||||
if (!mpcs.isEmpty()) {
|
||||
@@ -1964,9 +1969,9 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
|
||||
this.getMap().pickItemDrop(pickupPacket, mapitem);
|
||||
} else if (mapitem.getItemId() == 4031865 || mapitem.getItemId() == 4031866) {
|
||||
} else if (ItemId.isNxCard(mapitem.getItemId())) {
|
||||
// Add NX to account, show effect and make item disappear
|
||||
int nxGain = mapitem.getItemId() == 4031865 ? 100 : 250;
|
||||
int nxGain = mapitem.getItemId() == ItemId.NX_CARD_100 ? 100 : 250;
|
||||
this.getCashShop().gainCash(1, nxGain);
|
||||
|
||||
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
|
||||
@@ -2014,15 +2019,15 @@ public class Character extends AbstractCharacterObject {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (mapitem.getItemId() == 4031865 || mapitem.getItemId() == 4031866) {
|
||||
} else if (ItemId.isNxCard(mapitem.getItemId())) {
|
||||
// Add NX to account, show effect and make item disappear
|
||||
int nxGain = mapitem.getItemId() == 4031865 ? 100 : 250;
|
||||
int nxGain = mapitem.getItemId() == ItemId.NX_CARD_100 ? 100 : 250;
|
||||
this.getCashShop().gainCash(1, nxGain);
|
||||
|
||||
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
|
||||
} else if (applyConsumeOnPickup(mItem.getItemId())) {
|
||||
} else if (InventoryManipulator.addFromDrop(client, mItem, true)) {
|
||||
if (mItem.getItemId() == 4031868) {
|
||||
if (mItem.getItemId() == ItemId.ARPQ_SPIRIT_JEWEL) {
|
||||
updateAriantScore();
|
||||
}
|
||||
} else {
|
||||
@@ -3252,7 +3257,7 @@ public class Character extends AbstractCharacterObject {
|
||||
public void updateAriantScore(int dropQty) {
|
||||
AriantColiseum arena = this.getAriantColiseum();
|
||||
if (arena != null) {
|
||||
arena.updateAriantScore(this, countItem(4031868));
|
||||
arena.updateAriantScore(this, countItem(ItemId.ARPQ_SPIRIT_JEWEL));
|
||||
|
||||
if (dropQty > 0) {
|
||||
arena.addLostShards(dropQty);
|
||||
@@ -4311,7 +4316,7 @@ public class Character extends AbstractCharacterObject {
|
||||
if (this.isRidingBattleship()) {
|
||||
List<Pair<BuffStat, Integer>> statups = new ArrayList<>(1);
|
||||
statups.add(new Pair<>(BuffStat.MONSTER_RIDING, 0));
|
||||
this.sendPacket(PacketCreator.giveBuff(1932000, 5221006, statups));
|
||||
this.sendPacket(PacketCreator.giveBuff(ItemId.BATTLESHIP, 5221006, statups));
|
||||
this.announceBattleshipHp();
|
||||
}
|
||||
}
|
||||
@@ -4358,9 +4363,9 @@ public class Character extends AbstractCharacterObject {
|
||||
|
||||
private static boolean isPriorityBuffSourceid(int sourceid) {
|
||||
switch (sourceid) {
|
||||
case -2022631:
|
||||
case -2022632:
|
||||
case -2022633:
|
||||
case -ItemId.ROSE_SCENT:
|
||||
case -ItemId.FREESIA_SCENT:
|
||||
case -ItemId.LAVENDER_SCENT:
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -5120,7 +5125,7 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
|
||||
public boolean haveWeddingRing() {
|
||||
int[] rings = {1112806, 1112803, 1112807, 1112809};
|
||||
int[] rings = {ItemId.WEDDING_RING_STAR, ItemId.WEDDING_RING_MOONSTONE, ItemId.WEDDING_RING_GOLDEN, ItemId.WEDDING_RING_SILVER};
|
||||
|
||||
for (int ringid : rings) {
|
||||
if (haveItemWithId(ringid, true)) {
|
||||
@@ -6207,7 +6212,10 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
|
||||
public boolean attemptCatchFish(int baitLevel) {
|
||||
return YamlConfig.config.server.USE_FISHING_SYSTEM && GameConstants.isFishingArea(mapid) && this.getPosition().getY() > 0 && ItemConstants.isFishingChair(chair.get()) && this.getWorldServer().registerFisherPlayer(this, baitLevel);
|
||||
return YamlConfig.config.server.USE_FISHING_SYSTEM && MapId.isFishingArea(mapid) &&
|
||||
this.getPosition().getY() > 0 &&
|
||||
ItemConstants.isFishingChair(chair.get()) &&
|
||||
this.getWorldServer().registerFisherPlayer(this, baitLevel);
|
||||
}
|
||||
|
||||
public void leaveMap() {
|
||||
@@ -6480,8 +6488,8 @@ public class Character extends AbstractCharacterObject {
|
||||
|
||||
if (YamlConfig.config.server.USE_PERFECT_PITCH && level >= 30) {
|
||||
//milestones?
|
||||
if (InventoryManipulator.checkSpace(client, 4310000, (short) 1, "")) {
|
||||
InventoryManipulator.addById(client, 4310000, (short) 1, "", -1);
|
||||
if (InventoryManipulator.checkSpace(client, ItemId.PERFECT_PITCH, (short) 1, "")) {
|
||||
InventoryManipulator.addById(client, ItemId.PERFECT_PITCH, (short) 1, "", -1);
|
||||
}
|
||||
} else if (level == 10) {
|
||||
Runnable r = new Runnable() {
|
||||
@@ -6835,7 +6843,7 @@ public class Character extends AbstractCharacterObject {
|
||||
|
||||
public void addPlayerRing(Ring ring) {
|
||||
int ringItemId = ring.getItemId();
|
||||
if (ItemConstants.isWeddingRing(ringItemId)) {
|
||||
if (ItemId.isWeddingRing(ringItemId)) {
|
||||
this.addMarriageRing(ring);
|
||||
} else if (ring.getItemId() > 1112012) {
|
||||
this.addFriendshipRing(ring);
|
||||
@@ -7122,7 +7130,7 @@ public class Character extends AbstractCharacterObject {
|
||||
ret.map = mapManager.getMap(ret.mapid);
|
||||
|
||||
if (ret.map == null) {
|
||||
ret.map = mapManager.getMap(100000000);
|
||||
ret.map = mapManager.getMap(MapId.HENESYS);
|
||||
}
|
||||
Portal portal = ret.map.getPortal(ret.initialSpawnPoint);
|
||||
if (portal == null) {
|
||||
@@ -7170,11 +7178,11 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
}
|
||||
while (vip < 10) {
|
||||
ret.viptrockmaps.add(999999999);
|
||||
ret.viptrockmaps.add(MapId.NONE);
|
||||
vip++;
|
||||
}
|
||||
while (reg < 5) {
|
||||
ret.trockmaps.add(999999999);
|
||||
ret.trockmaps.add(MapId.NONE);
|
||||
reg++;
|
||||
}
|
||||
}
|
||||
@@ -7514,12 +7522,12 @@ public class Character extends AbstractCharacterObject {
|
||||
public void raiseQuestMobCount(int id) {
|
||||
// It seems nexon uses monsters that don't exist in the WZ (except string) to merge multiple mobs together for these 3 monsters.
|
||||
// We also want to run mobKilled for both since there are some quest that don't use the updated ID...
|
||||
if (id == 1110100 || id == 1110130) {
|
||||
raiseQuestMobCount(9101000);
|
||||
} else if (id == 2230101 || id == 2230131) {
|
||||
raiseQuestMobCount(9101001);
|
||||
} else if (id == 1140100 || id == 1140130) {
|
||||
raiseQuestMobCount(9101002);
|
||||
if (id == MobId.GREEN_MUSHROOM || id == MobId.DEJECTED_GREEN_MUSHROOM) {
|
||||
raiseQuestMobCount(MobId.GREEN_MUSHROOM_QUEST);
|
||||
} else if (id == MobId.ZOMBIE_MUSHROOM || id == MobId.ANNOYED_ZOMBIE_MUSHROOM) {
|
||||
raiseQuestMobCount(MobId.ZOMBIE_MUSHROOM_QUEST);
|
||||
} else if (id == MobId.GHOST_STUMP || id == MobId.SMIRKING_GHOST_STUMP) {
|
||||
raiseQuestMobCount(MobId.GHOST_STUMP_QUEST);
|
||||
}
|
||||
|
||||
int lastQuestProcessed = 0;
|
||||
@@ -7570,7 +7578,7 @@ public class Character extends AbstractCharacterObject {
|
||||
if (eim != null) {
|
||||
eim.playerKilled(this);
|
||||
}
|
||||
int[] charmID = {5130000, 4031283, 4140903};
|
||||
int[] charmID = {ItemId.SAFETY_CHARM, ItemId.EASTER_BASKET, ItemId.EASTER_CHARM};
|
||||
int possesed = 0;
|
||||
int i;
|
||||
for (i = 0; i < charmID.length; i++) {
|
||||
@@ -7580,7 +7588,7 @@ public class Character extends AbstractCharacterObject {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (possesed > 0 && !GameConstants.isDojo(getMapId())) {
|
||||
if (possesed > 0 && !MapId.isDojo(getMapId())) {
|
||||
message("You have used a safety charm, so your EXP points have not been decreased.");
|
||||
InventoryManipulator.removeById(client, ItemConstants.getInventoryType(charmID[i]), charmID[i], 1, true, false);
|
||||
usedSafetyCharm = true;
|
||||
@@ -8405,7 +8413,7 @@ public class Character extends AbstractCharacterObject {
|
||||
if (map == null || (cashshop != null && cashshop.isOpened())) {
|
||||
ps.setInt(21, mapid);
|
||||
} else {
|
||||
if (map.getForcedReturnId() != 999999999) {
|
||||
if (map.getForcedReturnId() != MapId.NONE) {
|
||||
ps.setInt(21, map.getForcedReturnId());
|
||||
} else {
|
||||
ps.setInt(21, getHp() < 1 ? map.getReturnMapId() : map.getId());
|
||||
@@ -8413,7 +8421,7 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
ps.setInt(22, meso.get());
|
||||
ps.setInt(23, hpMpApUsed);
|
||||
if (map == null || map.getId() == 610020000 || map.getId() == 610020001) { // reset to first spawnpoint on those maps
|
||||
if (map == null || map.getId() == MapId.CRIMSONWOOD_VALLEY_1 || map.getId() == MapId.CRIMSONWOOD_VALLEY_2) { // reset to first spawnpoint on those maps
|
||||
ps.setInt(24, 0);
|
||||
} else {
|
||||
Portal closest = map.findClosestPlayerSpawnpoint(getPosition());
|
||||
@@ -8608,7 +8616,7 @@ public class Character extends AbstractCharacterObject {
|
||||
// Vip teleport rocks
|
||||
try (PreparedStatement psVip = con.prepareStatement("INSERT INTO trocklocations(characterid, mapid, vip) VALUES (?, ?, 0)")) {
|
||||
for (int i = 0; i < getTrockSize(); i++) {
|
||||
if (trockmaps.get(i) != 999999999) {
|
||||
if (trockmaps.get(i) != MapId.NONE) {
|
||||
psVip.setInt(1, getId());
|
||||
psVip.setInt(2, trockmaps.get(i));
|
||||
psVip.addBatch();
|
||||
@@ -8620,7 +8628,7 @@ public class Character extends AbstractCharacterObject {
|
||||
// Regular teleport rocks
|
||||
try (PreparedStatement psReg = con.prepareStatement("INSERT INTO trocklocations(characterid, mapid, vip) VALUES (?, ?, 1)")) {
|
||||
for (int i = 0; i < getVipTrockSize(); i++) {
|
||||
if (viptrockmaps.get(i) != 999999999) {
|
||||
if (viptrockmaps.get(i) != MapId.NONE) {
|
||||
psReg.setInt(1, getId());
|
||||
psReg.setInt(2, viptrockmaps.get(i));
|
||||
psReg.addBatch();
|
||||
@@ -9387,7 +9395,7 @@ public class Character extends AbstractCharacterObject {
|
||||
int itemid = item.getItemId();
|
||||
if (ItemConstants.isRechargeable(itemid)) {
|
||||
quantity = item.getQuantity();
|
||||
} else if (ItemConstants.isWeddingToken(itemid) || ItemConstants.isWeddingRing(itemid)) {
|
||||
} else if (ItemId.isWeddingToken(itemid) || ItemId.isWeddingRing(itemid)) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -9643,7 +9651,7 @@ public class Character extends AbstractCharacterObject {
|
||||
strLines.add("");
|
||||
strLines.add(this.getClient().getChannelServer().getServerMessage().isEmpty() ? 0 : 1, "Get off my lawn!!");
|
||||
|
||||
this.sendPacket(PacketCreator.getAvatarMega(mapOwner, medal, this.getClient().getChannel(), 5390006, strLines, true));
|
||||
this.sendPacket(PacketCreator.getAvatarMega(mapOwner, medal, this.getClient().getChannel(), ItemId.ROARING_TIGER_MESSENGER, strLines, true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10241,7 +10249,7 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
|
||||
public int getTrockSize() {
|
||||
int ret = trockmaps.indexOf(999999999);
|
||||
int ret = trockmaps.indexOf(MapId.NONE);
|
||||
if (ret == -1) {
|
||||
ret = 5;
|
||||
}
|
||||
@@ -10252,12 +10260,12 @@ public class Character extends AbstractCharacterObject {
|
||||
public void deleteFromTrocks(int map) {
|
||||
trockmaps.remove(Integer.valueOf(map));
|
||||
while (trockmaps.size() < 10) {
|
||||
trockmaps.add(999999999);
|
||||
trockmaps.add(MapId.NONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void addTrockMap() {
|
||||
int index = trockmaps.indexOf(999999999);
|
||||
int index = trockmaps.indexOf(MapId.NONE);
|
||||
if (index != -1) {
|
||||
trockmaps.set(index, getMapId());
|
||||
}
|
||||
@@ -10269,7 +10277,7 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
|
||||
public int getVipTrockSize() {
|
||||
int ret = viptrockmaps.indexOf(999999999);
|
||||
int ret = viptrockmaps.indexOf(MapId.NONE);
|
||||
|
||||
if (ret == -1) {
|
||||
ret = 10;
|
||||
@@ -10281,12 +10289,12 @@ public class Character extends AbstractCharacterObject {
|
||||
public void deleteFromVipTrocks(int map) {
|
||||
viptrockmaps.remove(Integer.valueOf(map));
|
||||
while (viptrockmaps.size() < 10) {
|
||||
viptrockmaps.add(999999999);
|
||||
viptrockmaps.add(MapId.NONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void addVipTrockMap() {
|
||||
int index = viptrockmaps.indexOf(999999999);
|
||||
int index = viptrockmaps.indexOf(MapId.NONE);
|
||||
if (index != -1) {
|
||||
viptrockmaps.set(index, getMapId());
|
||||
}
|
||||
@@ -10304,13 +10312,13 @@ public class Character extends AbstractCharacterObject {
|
||||
public void equippedItem(Equip equip) {
|
||||
int itemid = equip.getItemId();
|
||||
|
||||
if (itemid == 1122017) {
|
||||
if (itemid == ItemId.PENDANT_OF_THE_SPIRIT) {
|
||||
this.equipPendantOfSpirit();
|
||||
} else if (itemid == 1812000) { // meso magnet
|
||||
} else if (itemid == ItemId.MESO_MAGNET) {
|
||||
equippedMesoMagnet = true;
|
||||
} else if (itemid == 1812001) { // item pouch
|
||||
} else if (itemid == ItemId.ITEM_POUCH) {
|
||||
equippedItemPouch = true;
|
||||
} else if (itemid == 1812007) { // item ignore pendant
|
||||
} else if (itemid == ItemId.ITEM_IGNORE) {
|
||||
equippedPetItemIgnore = true;
|
||||
}
|
||||
}
|
||||
@@ -10318,13 +10326,13 @@ public class Character extends AbstractCharacterObject {
|
||||
public void unequippedItem(Equip equip) {
|
||||
int itemid = equip.getItemId();
|
||||
|
||||
if (itemid == 1122017) {
|
||||
if (itemid == ItemId.PENDANT_OF_THE_SPIRIT) {
|
||||
this.unequipPendantOfSpirit();
|
||||
} else if (itemid == 1812000) { // meso magnet
|
||||
} else if (itemid == ItemId.MESO_MAGNET) {
|
||||
equippedMesoMagnet = false;
|
||||
} else if (itemid == 1812001) { // item pouch
|
||||
} else if (itemid == ItemId.ITEM_POUCH) {
|
||||
equippedItemPouch = false;
|
||||
} else if (itemid == 1812007) { // item ignore pendant
|
||||
} else if (itemid == ItemId.ITEM_IGNORE) {
|
||||
equippedPetItemIgnore = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ package client;
|
||||
import client.inventory.InventoryType;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||
import io.netty.handler.timeout.IdleStateEvent;
|
||||
@@ -930,7 +931,7 @@ public class Client extends ChannelInboundHandlerAdapter {
|
||||
if (player.getMap() != null) {
|
||||
int mapId = player.getMapId();
|
||||
player.getMap().removePlayer(player);
|
||||
if (GameConstants.isDojo(mapId)) {
|
||||
if (MapId.isDojo(mapId)) {
|
||||
this.getChannelServer().freeDojoSectionIfEmpty(mapId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import client.command.commands.gm3.*;
|
||||
import client.command.commands.gm4.*;
|
||||
import client.command.commands.gm5.*;
|
||||
import client.command.commands.gm6.*;
|
||||
import constants.id.MapId;
|
||||
import tools.FilePrinter;
|
||||
import tools.Pair;
|
||||
|
||||
@@ -87,7 +88,7 @@ public class CommandsExecutor {
|
||||
}
|
||||
|
||||
private void handleInternal(Client client, String message) {
|
||||
if (client.getPlayer().getMapId() == 300000012) {
|
||||
if (client.getPlayer().getMapId() == MapId.JAIL) {
|
||||
client.getPlayer().yellowMessage("You do not have permission to use commands while in jail.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ package client.command.commands.gm0;
|
||||
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
import server.ItemInformationProvider;
|
||||
import server.gachapon.Gachapon;
|
||||
|
||||
@@ -39,7 +40,9 @@ public class GachaCommand extends Command {
|
||||
String search = c.getPlayer().getLastCommandMessage();
|
||||
String gachaName = "";
|
||||
String[] names = {"Henesys", "Ellinia", "Perion", "Kerning City", "Sleepywood", "Mushroom Shrine", "Showa Spa Male", "Showa Spa Female", "New Leaf City", "Nautilus Harbor"};
|
||||
int[] ids = {9100100, 9100101, 9100102, 9100103, 9100104, 9100105, 9100106, 9100107, 9100109, 9100117};
|
||||
int[] ids = {NpcId.GACHAPON_HENESYS, NpcId.GACHAPON_ELLINIA, NpcId.GACHAPON_PERION, NpcId.GACHAPON_KERNING,
|
||||
NpcId.GACHAPON_SLEEPYWOOD, NpcId.GACHAPON_MUSHROOM_SHRINE, NpcId.GACHAPON_SHOWA_MALE,
|
||||
NpcId.GACHAPON_SHOWA_FEMALE, NpcId.GACHAPON_NLC, NpcId.GACHAPON_NAUTILUS};
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
if (search.equalsIgnoreCase(names[i])) {
|
||||
gachaName = names[i];
|
||||
@@ -61,6 +64,6 @@ public class GachaCommand extends Command {
|
||||
}
|
||||
talkStr += "\r\nPlease keep in mind that there are items that are in all gachapons and are not listed here.";
|
||||
|
||||
c.getAbstractPlayerInteraction().npcTalk(9010000, talkStr);
|
||||
c.getAbstractPlayerInteraction().npcTalk(NpcId.MAPLE_ADMINISTRATOR, talkStr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ package client.command.commands.gm0;
|
||||
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
|
||||
public class HelpCommand extends Command {
|
||||
{
|
||||
@@ -33,6 +34,6 @@ public class HelpCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(Client client, String[] params) {
|
||||
client.getAbstractPlayerInteraction().openNpc(9201143, "commands");
|
||||
client.getAbstractPlayerInteraction().openNpc(NpcId.STEWARD, "commands");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm0;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MapId;
|
||||
import server.events.gm.Event;
|
||||
import server.maps.FieldLimit;
|
||||
|
||||
@@ -44,7 +45,7 @@ public class JoinEventCommand extends Command {
|
||||
if (event.getLimit() > 0) {
|
||||
player.saveLocation("EVENT");
|
||||
|
||||
if (event.getMapId() == 109080000 || event.getMapId() == 109060001) {
|
||||
if (event.getMapId() == MapId.EVENT_COCONUT_HARVEST || event.getMapId() == MapId.EVENT_SNOWBALL_ENTRANCE) {
|
||||
player.setTeam(event.getLimit() % 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm0;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
import net.server.Server;
|
||||
import net.server.guild.GuildPackets;
|
||||
import tools.Pair;
|
||||
@@ -42,6 +43,6 @@ public class RanksCommand extends Command {
|
||||
Character player = c.getPlayer();
|
||||
|
||||
List<Pair<String, Integer>> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld());
|
||||
player.sendPacket(GuildPackets.showPlayerRanks(9010000, worldRanking));
|
||||
player.sendPacket(GuildPackets.showPlayerRanks(NpcId.MAPLE_ADMINISTRATOR, worldRanking));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ package client.command.commands.gm0;
|
||||
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
|
||||
public class StaffCommand extends Command {
|
||||
{
|
||||
@@ -33,6 +34,6 @@ public class StaffCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(Client c, String[] params) {
|
||||
c.getAbstractPlayerInteraction().openNpc(2010007, "credits");
|
||||
c.getAbstractPlayerInteraction().openNpc(NpcId.HERACLE, "credits");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.NpcId;
|
||||
import server.maps.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -80,7 +81,7 @@ public class GotoCommand extends Command {
|
||||
sendStr += ("\r\n#rAreas:#k\r\n" + GOTO_AREAS_INFO);
|
||||
}
|
||||
|
||||
player.getAbstractPlayerInteraction().npcTalk(9000020, sendStr);
|
||||
player.getAbstractPlayerInteraction().npcTalk(NpcId.SPINEL, sendStr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -96,7 +97,7 @@ public class GotoCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
HashMap<String, Integer> gotomaps;
|
||||
Map<String, Integer> gotomaps;
|
||||
if (player.isGM()) {
|
||||
gotomaps = new HashMap<>(GameConstants.GOTO_AREAS); // distinct map registry for GM/users suggested thanks to Vcoc
|
||||
gotomaps.putAll(GameConstants.GOTO_TOWNS); // thanks Halcyon (UltimateMors) for pointing out duplicates on listed entries functionality
|
||||
@@ -118,7 +119,7 @@ public class GotoCommand extends Command {
|
||||
sendStr += ("\r\n#rAreas:#k\r\n" + GOTO_AREAS_INFO);
|
||||
}
|
||||
|
||||
player.getAbstractPlayerInteraction().npcTalk(9000020, sendStr);
|
||||
player.getAbstractPlayerInteraction().npcTalk(NpcId.SPINEL, sendStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm1;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
import server.ItemInformationProvider;
|
||||
import server.life.MonsterDropEntry;
|
||||
import server.life.MonsterInformationProvider;
|
||||
@@ -72,6 +73,6 @@ public class WhatDropsFromCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
c.getAbstractPlayerInteraction().npcTalk(9010000, output);
|
||||
c.getAbstractPlayerInteraction().npcTalk(NpcId.MAPLE_ADMINISTRATOR, output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm1;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
import server.ItemInformationProvider;
|
||||
import server.life.MonsterInformationProvider;
|
||||
import tools.DatabaseConnection;
|
||||
@@ -84,7 +85,7 @@ public class WhoDropsCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
c.getAbstractPlayerInteraction().npcTalk(9010000, output);
|
||||
c.getAbstractPlayerInteraction().npcTalk(NpcId.MAPLE_ADMINISTRATOR, output);
|
||||
} finally {
|
||||
c.releaseClient();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm2;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MobId;
|
||||
import net.server.Server;
|
||||
import server.life.LifeFactory;
|
||||
import tools.PacketCreator;
|
||||
@@ -41,13 +42,13 @@ public class BombCommand extends Command {
|
||||
if (params.length > 0) {
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300166), victim.getPosition());
|
||||
victim.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(MobId.ARPQ_BOMB), victim.getPosition());
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !bomb on " + victim.getName()));
|
||||
} else {
|
||||
player.message("Player '" + params[0] + "' could not be found on this world.");
|
||||
}
|
||||
} else {
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(9300166), player.getPosition());
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(MobId.ARPQ_BOMB), player.getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package client.command.commands.gm2;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
import server.ThreadManager;
|
||||
import tools.exceptions.IdTypeNotSupportedException;
|
||||
|
||||
@@ -55,7 +56,7 @@ public class IdCommand extends Command {
|
||||
}
|
||||
sb.append(String.format("Results found: #r%d#k | Returned: #b%d#k/100 | Refine search query to improve time.", resultList.size(), count) + "\r\n");
|
||||
|
||||
player.getAbstractPlayerInteraction().npcTalk(9010000, sb.toString());
|
||||
player.getAbstractPlayerInteraction().npcTalk(NpcId.MAPLE_ADMINISTRATOR, sb.toString());
|
||||
} else {
|
||||
player.yellowMessage(String.format("Id not found for item: %s, of type: %s.", queryItem, params[0]));
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm2;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MapId;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.Portal;
|
||||
|
||||
@@ -57,10 +58,8 @@ public class JailCommand extends Command {
|
||||
if (victim != null) {
|
||||
victim.addJailExpirationTime(MINUTES.toMillis(minutesJailed));
|
||||
|
||||
int mapid = 300000012;
|
||||
|
||||
if (victim.getMapId() != mapid) { // those gone to jail won't be changing map anyway
|
||||
MapleMap target = c.getChannelServer().getMapFactory().getMap(mapid);
|
||||
if (victim.getMapId() != MapId.JAIL) { // those gone to jail won't be changing map anyway
|
||||
MapleMap target = c.getChannelServer().getMapFactory().getMap(MapId.JAIL);
|
||||
Portal targetPortal = target.getPortal(0);
|
||||
victim.saveLocationOnWarp();
|
||||
victim.changeMap(target, targetPortal);
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm2;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
import provider.Data;
|
||||
import provider.DataProvider;
|
||||
import provider.DataProviderFactory;
|
||||
@@ -133,6 +134,6 @@ public class SearchCommand extends Command {
|
||||
}
|
||||
sb.append("\r\n#kLoaded within ").append((double) (System.currentTimeMillis() - start) / 1000).append(" seconds.");//because I can, and it's free
|
||||
|
||||
c.getAbstractPlayerInteraction().npcTalk(9010000, sb.toString());
|
||||
c.getAbstractPlayerInteraction().npcTalk(NpcId.MAPLE_ADMINISTRATOR, sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm3;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MobId;
|
||||
import server.life.Monster;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
@@ -47,7 +48,7 @@ public class KillAllCommand extends Command {
|
||||
int count = 0;
|
||||
for (MapObject monstermo : monsters) {
|
||||
Monster monster = (Monster) monstermo;
|
||||
if (!monster.getStats().isFriendly() && !(monster.getId() >= 8810010 && monster.getId() <= 8810018)) {
|
||||
if (!monster.getStats().isFriendly() && !(monster.getId() >= MobId.DEAD_HORNTAIL_MIN && monster.getId() <= MobId.HORNTAIL)) {
|
||||
map.damageMonster(player, monster, Integer.MAX_VALUE);
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.NpcId;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class MusicCommand extends Command {
|
||||
@@ -53,7 +54,7 @@ public class MusicCommand extends Command {
|
||||
sendMsg += "Syntax: #r!music <song>#k\r\n\r\n";
|
||||
sendMsg += getSongList();
|
||||
|
||||
c.sendPacket(PacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
c.sendPacket(PacketCreator.getNPCTalk(NpcId.BILLY, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -70,6 +71,6 @@ public class MusicCommand extends Command {
|
||||
sendMsg += "Song not found, please enter a song below.\r\n\r\n";
|
||||
sendMsg += getSongList();
|
||||
|
||||
c.sendPacket(PacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
c.sendPacket(PacketCreator.getNPCTalk(NpcId.BILLY, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import client.inventory.Item;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@@ -38,12 +40,13 @@ public class SeedCommand extends Command {
|
||||
@Override
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
if (player.getMapId() != 910010000) {
|
||||
if (player.getMapId() != MapId.HENESYS_PQ) {
|
||||
player.yellowMessage("This command can only be used in HPQ.");
|
||||
return;
|
||||
}
|
||||
Point[] pos = {new Point(7, -207), new Point(179, -447), new Point(-3, -687), new Point(-357, -687), new Point(-538, -447), new Point(-359, -207)};
|
||||
int[] seed = {4001097, 4001096, 4001095, 4001100, 4001099, 4001098};
|
||||
int[] seed = {ItemId.PINK_PRIMROSE_SEED, ItemId.PURPLE_PRIMROSE_SEED, ItemId.GREEN_PRIMROSE_SEED,
|
||||
ItemId.BLUE_PRIMROSE_SEED, ItemId.YELLOW_PRIMROSE_SEED, ItemId.BROWN_PRIMROSE_SEED};
|
||||
for (int i = 0; i < pos.length; i++) {
|
||||
Item item = new Item(seed[i], (byte) 0, (short) 1);
|
||||
player.getMap().spawnItemDrop(player, player, item, pos[i], false, true);
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm4;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MobId;
|
||||
import server.life.LifeFactory;
|
||||
import server.life.Monster;
|
||||
|
||||
@@ -37,7 +38,7 @@ public class CakeCommand extends Command {
|
||||
@Override
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
Monster monster = LifeFactory.getMonster(9400606);
|
||||
Monster monster = LifeFactory.getMonster(MobId.GIANT_CAKE);
|
||||
if (params.length == 1) {
|
||||
double mobHp = Double.parseDouble(params[0]);
|
||||
int newHp = (mobHp <= 0) ? Integer.MAX_VALUE : ((mobHp > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) mobHp);
|
||||
|
||||
@@ -28,6 +28,7 @@ import client.Client;
|
||||
import client.command.Command;
|
||||
import client.inventory.Pet;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.id.ItemId;
|
||||
import server.maps.MapItem;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
@@ -57,9 +58,9 @@ public class ForceVacCommand extends Command {
|
||||
if (mapItem.getMeso() > 0) {
|
||||
player.gainMeso(mapItem.getMeso(), true);
|
||||
} else if (player.applyConsumeOnPickup(mapItem.getItemId())) { // thanks Vcoc for pointing out consumables on pickup not being processed here
|
||||
} else if (mapItem.getItemId() == 4031865 || mapItem.getItemId() == 4031866) {
|
||||
} else if (ItemId.isNxCard(mapItem.getItemId())) {
|
||||
// Add NX to account, show effect and make item disappear
|
||||
player.getCashShop().gainCash(1, mapItem.getItemId() == 4031865 ? 100 : 250);
|
||||
player.getCashShop().gainCash(1, mapItem.getItemId() == ItemId.NX_CARD_100 ? 100 : 250);
|
||||
} else if (mapItem.getItem().getItemId() >= 5000000 && mapItem.getItem().getItemId() <= 5000100) {
|
||||
int petId = Pet.createPet(mapItem.getItem().getItemId());
|
||||
if (petId == -1) {
|
||||
@@ -67,7 +68,7 @@ public class ForceVacCommand extends Command {
|
||||
}
|
||||
InventoryManipulator.addById(c, mapItem.getItem().getItemId(), mapItem.getItem().getQuantity(), null, petId);
|
||||
} else if (InventoryManipulator.addFromDrop(c, mapItem.getItem(), true)) {
|
||||
if (mapItem.getItemId() == 4031868) {
|
||||
if (mapItem.getItemId() == ItemId.NX_CARD_100) {
|
||||
player.updateAriantScore();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm4;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MobId;
|
||||
import server.life.LifeFactory;
|
||||
|
||||
public class PapCommand extends Command {
|
||||
@@ -38,6 +39,6 @@ public class PapCommand extends Command {
|
||||
Character player = c.getPlayer();
|
||||
|
||||
// thanks Conrad for noticing mobid typo here
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8500001), player.getPosition());
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(MobId.PAPULATUS_CLOCK), player.getPosition());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm4;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MobId;
|
||||
import server.life.LifeFactory;
|
||||
|
||||
public class PianusCommand extends Command {
|
||||
@@ -36,6 +37,6 @@ public class PianusCommand extends Command {
|
||||
@Override
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8510000), player.getPosition());
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(MobId.PIANUS_R), player.getPosition());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm4;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MobId;
|
||||
import server.life.LifeFactory;
|
||||
|
||||
public class PinkbeanCommand extends Command {
|
||||
@@ -36,7 +37,7 @@ public class PinkbeanCommand extends Command {
|
||||
@Override
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8820001), player.getPosition());
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(MobId.PINK_BEAN), player.getPosition());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm4;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.MobId;
|
||||
import server.life.LifeFactory;
|
||||
|
||||
public class ZakumCommand extends Command {
|
||||
@@ -36,9 +37,9 @@ public class ZakumCommand extends Command {
|
||||
@Override
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
player.getMap().spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(8800000), player.getPosition());
|
||||
for (int x = 8800003; x < 8800011; x++) {
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(x), player.getPosition());
|
||||
player.getMap().spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(MobId.ZAKUM_1), player.getPosition());
|
||||
for (int mobId = MobId.ZAKUM_ARM_1; mobId <= MobId.ZAKUM_ARM_8; mobId++) {
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(mobId), player.getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ package client.command.commands.gm5;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.id.NpcId;
|
||||
import net.server.Server;
|
||||
import server.TimerManager;
|
||||
import server.life.Monster;
|
||||
@@ -63,7 +64,7 @@ public class DebugCommand extends Command {
|
||||
msgTypes += ("#L" + i + "#" + debugTypes[i] + "#l\r\n");
|
||||
}
|
||||
|
||||
c.getAbstractPlayerInteraction().npcTalk(9201143, msgTypes);
|
||||
c.getAbstractPlayerInteraction().npcTalk(NpcId.STEWARD, msgTypes);
|
||||
break;
|
||||
|
||||
case "monster":
|
||||
|
||||
@@ -24,6 +24,8 @@ import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
@@ -32,7 +34,7 @@ public class BeginnerCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161001, 1, InventoryType.ETC);
|
||||
giveItem(recipe, ItemId.BEGINNERS_GUIDE, 1, InventoryType.ETC);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@@ -41,7 +43,7 @@ public class BeginnerCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.BEGINNER, 1, 10000, top, bottom, shoes, weapon));
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.BEGINNER, 1, MapId.MUSHROOM_TOWN, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
@@ -32,7 +34,7 @@ public class LegendCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161048, 1, InventoryType.ETC);
|
||||
giveItem(recipe, ItemId.LEGENDS_GUIDE, 1, InventoryType.ETC);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@@ -41,7 +43,7 @@ public class LegendCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.LEGEND, 1, 914000000, top, bottom, shoes, weapon));
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.LEGEND, 1, MapId.ARAN_TUTORIAL_START, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ import client.Job;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
@@ -32,7 +34,7 @@ public class NoblesseCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161047, 1, InventoryType.ETC);
|
||||
giveItem(recipe, ItemId.NOBLESSE_GUIDE, 1, InventoryType.ETC);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@@ -41,7 +43,7 @@ public class NoblesseCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.NOBLESSE, 1, 130030000, top, bottom, shoes, weapon));
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.NOBLESSE, 1, MapId.STARTING_MAP_NOBLESSE, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,14 +25,17 @@ import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class BowmanCreator extends CharacterFactory {
|
||||
private static final int[] equips = {1040067, 1041054, 1060056, 1061050, 1072081};
|
||||
private static final int[] weapons = {1452005, 1462000};
|
||||
private static final int[] equips = {ItemId.GREEN_HUNTERS_ARMOR, ItemId.GREEN_HUNTRESS_ARMOR,
|
||||
ItemId.GREEN_HUNTERS_PANTS, ItemId.GREEN_HUNTRESS_PANTS, ItemId.GREEN_HUNTER_BOOTS};
|
||||
private static final int[] weapons = {ItemId.RYDEN, ItemId.MOUNTAIN_CROSSBOW};
|
||||
private static final int[] startingHpMp = {797, 404};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
@@ -52,9 +55,9 @@ public class BowmanCreator extends CharacterFactory {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2000002, 100, InventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, InventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
|
||||
giveItem(recipe, ItemId.WHITE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.BLUE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.RELAXER, 1, InventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
@@ -69,6 +72,6 @@ public class BowmanCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.BOWMAN, 30, 100000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.BOWMAN, 30, MapId.HENESYS, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.skills.Magician;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
@@ -34,8 +36,8 @@ import server.ItemInformationProvider;
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class MagicianCreator extends CharacterFactory {
|
||||
private static final int[] equips = {0, 1041041, 0, 1061034, 1072075};
|
||||
private static final int[] weapons = {1372003, 1382017};
|
||||
private static final int[] equips = {0, ItemId.PURPLE_FAIRY_TOP, 0, ItemId.PURPLE_FAIRY_SKIRT, ItemId.RED_MAGICSHOES};
|
||||
private static final int[] weapons = {ItemId.MITHRIL_WAND, ItemId.CIRCLE_WINDED_STAFF};
|
||||
private static final int[] startingHpMp = {405, 729};
|
||||
private static final int[] mpGain = {0, 40, 80, 118, 156, 194, 230, 266, 302, 336, 370};
|
||||
|
||||
@@ -53,16 +55,16 @@ public class MagicianCreator extends CharacterFactory {
|
||||
recipe.setMeso(100000);
|
||||
|
||||
if (gender == 0) {
|
||||
giveEquipment(recipe, ii, 1050003);
|
||||
giveEquipment(recipe, ii, ItemId.BLUE_WIZARD_ROBE);
|
||||
}
|
||||
|
||||
for (int i = 1; i < weapons.length; i++) {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2000001, 100, InventoryType.USE);
|
||||
giveItem(recipe, 2000006, 100, InventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
|
||||
giveItem(recipe, ItemId.ORANGE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.MANA_ELIXIR, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.RELAXER, 1, InventoryType.SETUP);
|
||||
|
||||
if (improveSp > 0) {
|
||||
improveSp += 5;
|
||||
@@ -92,6 +94,6 @@ public class MagicianCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.MAGICIAN, 30, 101000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.MAGICIAN, 30, MapId.ELLINIA, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,14 +25,16 @@ import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class PirateCreator extends CharacterFactory {
|
||||
private static final int[] equips = {0, 0, 0, 0, 1072294};
|
||||
private static final int[] weapons = {1482004, 1492004};
|
||||
private static final int[] equips = {0, 0, 0, 0, ItemId.BROWN_PAULIE_BOOTS};
|
||||
private static final int[] weapons = {ItemId.PRIME_HANDS, ItemId.COLD_MIND};
|
||||
private static final int[] startingHpMp = {846, 503};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
@@ -48,17 +50,17 @@ public class PirateCreator extends CharacterFactory {
|
||||
|
||||
recipe.setMeso(100000);
|
||||
|
||||
giveEquipment(recipe, ii, 1052107);
|
||||
giveEquipment(recipe, ii, ItemId.BROWN_POLLARD);
|
||||
|
||||
for (int i = 1; i < weapons.length; i++) {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2330000, 800, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.BULLET, 800, InventoryType.USE);
|
||||
|
||||
giveItem(recipe, 2000002, 100, InventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, InventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
|
||||
giveItem(recipe, ItemId.WHITE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.BLUE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.RELAXER, 1, InventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
@@ -73,6 +75,6 @@ public class PirateCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.PIRATE, 30, 120000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.PIRATE, 30, MapId.NAUTILUS_HARBOR, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,14 +25,17 @@ import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class ThiefCreator extends CharacterFactory {
|
||||
private static final int[] equips = {1040057, 1041047, 1060043, 1061043, 1072032};
|
||||
private static final int[] weapons = {1472008, 1332012};
|
||||
private static final int[] equips = {ItemId.DARK_BROWN_STEALER, ItemId.RED_STEAL, ItemId.DARK_BROWN_STEALER_PANTS,
|
||||
ItemId.RED_STEAL_PANTS, ItemId.BRONZE_CHAIN_BOOTS};
|
||||
private static final int[] weapons = {ItemId.STEEL_GUARDS, ItemId.REEF_CLAW};
|
||||
private static final int[] startingHpMp = {794, 407};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(Job job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
@@ -52,11 +55,11 @@ public class ThiefCreator extends CharacterFactory {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2070000, 500, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.SUBI_THROWING_STARS, 500, InventoryType.USE);
|
||||
|
||||
giveItem(recipe, 2000002, 100, InventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, InventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
|
||||
giveItem(recipe, ItemId.WHITE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.BLUE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.RELAXER, 1, InventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
@@ -71,6 +74,6 @@ public class ThiefCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.THIEF, 30, 103000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.THIEF, 30, MapId.KERNING_CITY, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.skills.Warrior;
|
||||
import server.ItemInformationProvider;
|
||||
|
||||
@@ -34,8 +36,8 @@ import server.ItemInformationProvider;
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class WarriorCreator extends CharacterFactory {
|
||||
private static final int[] equips = {1040021, 0, 1060016, 0, 1072039};
|
||||
private static final int[] weapons = {1302008, 1442001, 1422001, 1312005};
|
||||
private static final int[] equips = {ItemId.RED_HWARANG_SHIRT, 0, ItemId.BLACK_MARTIAL_ARTS_PANTS, 0, ItemId.MITHRIL_BATTLE_GRIEVES};
|
||||
private static final int[] weapons = {ItemId.GLADIUS, ItemId.MITHRIL_POLE_ARM, ItemId.MITHRIL_MAUL, ItemId.FIREMANS_AXE};
|
||||
private static final int[] startingHpMp = {905, 208};
|
||||
private static final int[] hpGain = {0, 72, 144, 212, 280, 348, 412, 476, 540, 600, 660};
|
||||
|
||||
@@ -53,7 +55,7 @@ public class WarriorCreator extends CharacterFactory {
|
||||
recipe.setMeso(100000);
|
||||
|
||||
if (gender == 1) {
|
||||
giveEquipment(recipe, ii, 1051010);
|
||||
giveEquipment(recipe, ii, ItemId.DARK_ENGRIT);
|
||||
}
|
||||
|
||||
for (int i = 1; i < weapons.length; i++) {
|
||||
@@ -75,9 +77,9 @@ public class WarriorCreator extends CharacterFactory {
|
||||
}
|
||||
}
|
||||
|
||||
giveItem(recipe, 2000002, 100, InventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, InventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, InventoryType.SETUP);
|
||||
giveItem(recipe, ItemId.WHITE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.BLUE_POTION, 100, InventoryType.USE);
|
||||
giveItem(recipe, ItemId.RELAXER, 1, InventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
@@ -92,6 +94,6 @@ public class WarriorCreator extends CharacterFactory {
|
||||
}
|
||||
|
||||
public static int createCharacter(Client c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.WARRIOR, 30, 102000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(Job.WARRIOR, 30, MapId.PERION, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import client.Client;
|
||||
import client.inventory.*;
|
||||
import client.newyear.NewYearCardRecord;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import server.ItemInformationProvider;
|
||||
import server.maps.MapleMap;
|
||||
@@ -523,7 +524,8 @@ public class InventoryManipulator {
|
||||
if (source == null || !ii.canWearEquipment(chr, source, dst)) {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
} else if ((((source.getItemId() >= 1902000 && source.getItemId() <= 1902002) || source.getItemId() == 1912000) && chr.isCygnus()) || ((source.getItemId() >= 1902005 && source.getItemId() <= 1902007) || source.getItemId() == 1912005) && !chr.isCygnus()) {// Adventurer taming equipment
|
||||
} else if ((ItemId.isExplorerMount(source.getItemId()) && chr.isCygnus()) ||
|
||||
((ItemId.isCygnusMount(source.getItemId())) && !chr.isCygnus())) {// Adventurer taming equipment
|
||||
return;
|
||||
}
|
||||
boolean itemChanged = false;
|
||||
@@ -684,7 +686,7 @@ public class InventoryManipulator {
|
||||
} else if (isDroppedItemRestricted(it)) {
|
||||
return true;
|
||||
} else {
|
||||
return ItemConstants.isWeddingRing(it.getItemId());
|
||||
return ItemId.isWeddingRing(it.getItemId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,12 +726,12 @@ public class InventoryManipulator {
|
||||
c.sendPacket(PacketCreator.modifyInventory(true, Collections.singletonList(new ModifyInventory(1, source))));
|
||||
|
||||
if (ItemConstants.isNewYearCardEtc(itemId)) {
|
||||
if (itemId == 4300000) {
|
||||
if (itemId == ItemId.NEW_YEARS_CARD_SEND) {
|
||||
NewYearCardRecord.removeAllNewYearCard(true, chr);
|
||||
c.getAbstractPlayerInteraction().removeAll(4300000);
|
||||
c.getAbstractPlayerInteraction().removeAll(ItemId.NEW_YEARS_CARD_SEND);
|
||||
} else {
|
||||
NewYearCardRecord.removeAllNewYearCard(false, chr);
|
||||
c.getAbstractPlayerInteraction().removeAll(4301000);
|
||||
c.getAbstractPlayerInteraction().removeAll(ItemId.NEW_YEARS_CARD_RECEIVED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -755,12 +757,12 @@ public class InventoryManipulator {
|
||||
if (src < 0) {
|
||||
chr.equipChanged();
|
||||
} else if (ItemConstants.isNewYearCardEtc(itemId)) {
|
||||
if (itemId == 4300000) {
|
||||
if (itemId == ItemId.NEW_YEARS_CARD_SEND) {
|
||||
NewYearCardRecord.removeAllNewYearCard(true, chr);
|
||||
c.getAbstractPlayerInteraction().removeAll(4300000);
|
||||
c.getAbstractPlayerInteraction().removeAll(ItemId.NEW_YEARS_CARD_SEND);
|
||||
} else {
|
||||
NewYearCardRecord.removeAllNewYearCard(false, chr);
|
||||
c.getAbstractPlayerInteraction().removeAll(4301000);
|
||||
c.getAbstractPlayerInteraction().removeAll(ItemId.NEW_YEARS_CARD_RECEIVED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -777,11 +779,11 @@ public class InventoryManipulator {
|
||||
chr.setItemEffect(0);
|
||||
map.broadcastMessage(PacketCreator.itemEffect(chr.getId(), 0));
|
||||
}
|
||||
} else if (itemId == 5370000 || itemId == 5370001) {
|
||||
} else if (itemId == ItemId.CHALKBOARD_1 || itemId == ItemId.CHALKBOARD_2) {
|
||||
if (source.getQuantity() <= 0) {
|
||||
chr.setChalkboard(null);
|
||||
}
|
||||
} else if (itemId == 4031868) {
|
||||
} else if (itemId == ItemId.ARPQ_SPIRIT_JEWEL) {
|
||||
chr.updateAriantScore(quantityNow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.packet.InPacket;
|
||||
import server.ItemInformationProvider;
|
||||
@@ -385,7 +386,7 @@ public class MakerProcessor {
|
||||
if (!(c.getPlayer().isGM() && YamlConfig.config.server.USE_PERFECT_GM_SCROLL)) {
|
||||
eqp.setUpgradeSlots((byte) (eqp.getUpgradeSlots() + 1));
|
||||
}
|
||||
item = ItemInformationProvider.getInstance().scrollEquipWithId(eqp, 2049100, true, 2049100, c.getPlayer().isGM());
|
||||
item = ItemInformationProvider.getInstance().scrollEquipWithId(eqp, ItemId.CHAOS_SCROll_60, true, ItemId.CHAOS_SCROll_60, c.getPlayer().isGM());
|
||||
}
|
||||
|
||||
if (!reagentids.isEmpty()) {
|
||||
|
||||
@@ -25,6 +25,7 @@ import client.SkillFactory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Pet;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.id.ItemId;
|
||||
import provider.DataProvider;
|
||||
import provider.DataProviderFactory;
|
||||
import provider.DataTool;
|
||||
@@ -49,10 +50,9 @@ public class SpawnPetProcessor {
|
||||
}
|
||||
|
||||
int petid = pet.getItemId();
|
||||
if (petid == 5000028 || petid == 5000047) //Handles Dragon AND Robos
|
||||
{
|
||||
if (petid == ItemId.DRAGON_PET || petid == ItemId.ROBO_PET) {
|
||||
if (chr.haveItem(petid + 1)) {
|
||||
chr.dropMessage(5, "You can't hatch your " + (petid == 5000028 ? "Dragon egg" : "Robo egg") + " if you already have a Baby " + (petid == 5000028 ? "Dragon." : "Robo."));
|
||||
chr.dropMessage(5, "You can't hatch your " + (petid == ItemId.DRAGON_PET ? "Dragon egg" : "Robo egg") + " if you already have a Baby " + (petid == ItemId.DRAGON_PET ? "Dragon." : "Robo."));
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
} else {
|
||||
|
||||
@@ -33,6 +33,7 @@ import client.inventory.ItemFactory;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.inventory.manipulator.KarmaManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.server.channel.Channel;
|
||||
import server.DueyPackage;
|
||||
@@ -284,7 +285,7 @@ public class DueyProcessor {
|
||||
int fee = Trade.getFee(sendMesos);
|
||||
if (!quick) {
|
||||
fee += 5000;
|
||||
} else if (!c.getPlayer().haveItem(5330000)) {
|
||||
} else if (!c.getPlayer().haveItem(ItemId.QUICK_DELIVERY_TICKET)) {
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit with Quick Delivery on duey.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to use duey with Quick Delivery, mesos " + sendMesos + " and amount " + amount);
|
||||
c.disconnect(true, false);
|
||||
@@ -324,7 +325,7 @@ public class DueyProcessor {
|
||||
}
|
||||
|
||||
if (quick) {
|
||||
InventoryManipulator.removeById(c, InventoryType.CASH, 5330000, (short) 1, false, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.CASH, ItemId.QUICK_DELIVERY_TICKET, (short) 1, false, false);
|
||||
}
|
||||
|
||||
int packageId = createPackage(sendMesos, sendMessage, c.getPlayer().getName(), recipientCid, quick);
|
||||
|
||||
@@ -30,6 +30,7 @@ import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.inventory.manipulator.KarmaManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.packet.InPacket;
|
||||
import server.ItemInformationProvider;
|
||||
@@ -132,7 +133,7 @@ public class StorageProcessor {
|
||||
try {
|
||||
item = inv.getItem(slot);
|
||||
if (item != null && item.getItemId() == itemId && (item.getQuantity() >= quantity || ItemConstants.isRechargeable(itemId))) {
|
||||
if (ItemConstants.isWeddingRing(itemId) || ItemConstants.isWeddingToken(itemId)) {
|
||||
if (ItemId.isWeddingRing(itemId) || ItemId.isWeddingToken(itemId)) {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package constants.game;
|
||||
import client.Disease;
|
||||
import client.Job;
|
||||
import config.YamlConfig;
|
||||
import constants.id.MapId;
|
||||
import constants.skills.Aran;
|
||||
import provider.*;
|
||||
import provider.wz.WZFiles;
|
||||
@@ -20,7 +21,6 @@ import java.util.*;
|
||||
*/
|
||||
public class GameConstants {
|
||||
public static String[] WORLD_NAMES = {"Scania", "Bera", "Broa", "Windia", "Khaini", "Bellocan", "Mardia", "Kradia", "Yellonde", "Demethos", "Galicia", "El Nido", "Zenith", "Arcenia", "Kastia", "Judis", "Plana", "Kalluna", "Stius", "Croa", "Medere"};
|
||||
public static final int[] OWL_DATA = new int[]{1082002, 2070005, 2070006, 1022047, 1102041, 2044705, 2340000, 2040017, 1092030, 2040804};
|
||||
public static final String[] stats = {"tuc", "reqLevel", "reqJob", "reqSTR", "reqDEX", "reqINT", "reqLUK", "reqPOP", "cash", "cursed", "success", "setItemID", "equipTradeBlock", "durability", "randOption", "randStat", "masterLevel", "reqSkillLevel", "elemDefault", "incRMAS", "incRMAF", "incRMAI", "incRMAL", "canLevel", "skill", "charmEXP"};
|
||||
public static final int[] CASH_DATA = new int[]{50200004, 50200069, 50200117, 50100008, 50000047};
|
||||
|
||||
@@ -53,69 +53,69 @@ public class GameConstants {
|
||||
}
|
||||
|
||||
// "goto" command for players
|
||||
public static final HashMap<String, Integer> GOTO_TOWNS = new HashMap<String, Integer>() {{
|
||||
put("southperry", 60000);
|
||||
put("amherst", 1000000);
|
||||
put("henesys", 100000000);
|
||||
put("ellinia", 101000000);
|
||||
put("perion", 102000000);
|
||||
put("kerning", 103000000);
|
||||
put("lith", 104000000);
|
||||
put("sleepywood", 105040300);
|
||||
put("florina", 110000000);
|
||||
put("nautilus", 120000000);
|
||||
put("ereve", 130000000);
|
||||
put("rien", 140000000);
|
||||
put("orbis", 200000000);
|
||||
put("happy", 209000000);
|
||||
put("elnath", 211000000);
|
||||
put("ludi", 220000000);
|
||||
put("aqua", 230000000);
|
||||
put("leafre", 240000000);
|
||||
put("mulung", 250000000);
|
||||
put("herb", 251000000);
|
||||
put("omega", 221000000);
|
||||
put("korean", 222000000);
|
||||
put("ellin", 300000000);
|
||||
put("nlc", 600000000);
|
||||
put("showa", 801000000);
|
||||
put("shrine", 800000000);
|
||||
put("ariant", 260000000);
|
||||
put("magatia", 261000000);
|
||||
put("singapore", 540000000);
|
||||
put("quay", 541000000);
|
||||
put("kampung", 551000000);
|
||||
put("amoria", 680000000);
|
||||
put("temple", 270000100);
|
||||
put("square", 103040000);
|
||||
put("neo", 240070000);
|
||||
put("mushking", 106020000);
|
||||
public static final Map<String, Integer> GOTO_TOWNS = new HashMap<>() {{
|
||||
put("southperry", MapId.SOUTHPERRY);
|
||||
put("amherst", MapId.AMHERST);
|
||||
put("henesys", MapId.HENESYS);
|
||||
put("ellinia", MapId.ELLINIA);
|
||||
put("perion", MapId.PERION);
|
||||
put("kerning", MapId.KERNING_CITY);
|
||||
put("lith", MapId.LITH_HARBOUR);
|
||||
put("sleepywood", MapId.SLEEPYWOOD);
|
||||
put("florina", MapId.FLORINA_BEACH);
|
||||
put("nautilus", MapId.NAUTILUS_HARBOR);
|
||||
put("ereve", MapId.EREVE);
|
||||
put("rien", MapId.RIEN);
|
||||
put("orbis", MapId.ORBIS);
|
||||
put("happy", MapId.HAPPYVILLE);
|
||||
put("elnath", MapId.EL_NATH);
|
||||
put("ludi", MapId.LUDIBRIUM);
|
||||
put("aqua", MapId.AQUARIUM);
|
||||
put("leafre", MapId.LEAFRE);
|
||||
put("mulung", MapId.MU_LUNG);
|
||||
put("herb", MapId.HERB_TOWN);
|
||||
put("omega", MapId.OMEGA_SECTOR);
|
||||
put("kft", MapId.KOREAN_FOLK_TOWN);
|
||||
put("ellin", MapId.ELLIN_FOREST);
|
||||
put("nlc", MapId.NEW_LEAF_CITY);
|
||||
put("showa", MapId.SHOWA_TOWN);
|
||||
put("shrine", MapId.MUSHROOM_SHRINE);
|
||||
put("ariant", MapId.ARIANT);
|
||||
put("magatia", MapId.MAGATIA);
|
||||
put("singapore", MapId.SINGAPORE);
|
||||
put("quay", MapId.BOAT_QUAY_TOWN);
|
||||
put("kampung", MapId.KAMPUNG_VILLAGE);
|
||||
put("amoria", MapId.AMORIA);
|
||||
put("temple", MapId.TEMPLE_OF_TIME);
|
||||
put("square", MapId.KERNING_SQUARE);
|
||||
put("neo", MapId.NEO_CITY);
|
||||
put("mushking", MapId.MUSHROOM_KINGDOM);
|
||||
}};
|
||||
|
||||
// "goto" command for only-GMs
|
||||
public static final HashMap<String, Integer> GOTO_AREAS = new HashMap<String, Integer>() {{
|
||||
put("gmmap", 180000000);
|
||||
put("excavation", 990000000);
|
||||
put("mushmom", 100000005);
|
||||
put("griffey", 240020101);
|
||||
put("manon", 240020401);
|
||||
put("horseman", 682000001);
|
||||
put("balrog", 105090900);
|
||||
put("zakum", 211042300);
|
||||
put("papu", 220080001);
|
||||
put("guild", 200000301);
|
||||
put("skelegon", 240040511);
|
||||
put("hpq", 100000200);
|
||||
put("pianus", 230040420);
|
||||
put("horntail", 240050400);
|
||||
put("pinkbean", 270050000);
|
||||
put("keep", 610020006);
|
||||
put("dojo", 925020001);
|
||||
put("bosspq", 970030000);
|
||||
put("fm", 910000000);
|
||||
public static final Map<String, Integer> GOTO_AREAS = new HashMap<>() {{
|
||||
put("gmmap", MapId.GM_MAP);
|
||||
put("excavation", MapId.EXCAVATION_SITE);
|
||||
put("mushmom", MapId.SOMEONE_ELSES_HOUSE);
|
||||
put("griffey", MapId.GRIFFEY_FOREST);
|
||||
put("manon", MapId.MANONS_FOREST);
|
||||
put("horseman", MapId.HOLLOWED_GROUND);
|
||||
put("balrog", MapId.CURSED_SANCTUARY);
|
||||
put("zakum", MapId.DOOR_TO_ZAKUM);
|
||||
put("papu", MapId.ORIGIN_OF_CLOCKTOWER);
|
||||
put("guild", MapId.GUILD_HQ);
|
||||
put("skelegon", MapId.DRAGON_NEST_LEFT_BEHIND);
|
||||
put("hpq", MapId.HENESYS_PARK);
|
||||
put("pianus", MapId.CAVE_OF_PIANUS);
|
||||
put("horntail", MapId.ENTRANCE_TO_HORNTAILS_CAVE);
|
||||
put("pinkbean", MapId.FORGOTTEN_TWILIGHT);
|
||||
put("keep", MapId.CRIMSONWOOD_KEEP);
|
||||
put("dojo", MapId.MU_LUNG_DOJO_HALL);
|
||||
put("bosspq", MapId.EXCLUSIVE_TRAINING_CENTER);
|
||||
put("fm", MapId.FM_ENTRANCE);
|
||||
}};
|
||||
|
||||
public static final List<String> GAME_SONGS = new ArrayList<String>(170) {{
|
||||
public static final List<String> GAME_SONGS = new ArrayList<>(170) {{
|
||||
add("Jukebox/Congratulation");
|
||||
add("Bgm00/SleepyWood");
|
||||
add("Bgm00/FloralLife");
|
||||
@@ -333,16 +333,16 @@ public class GameConstants {
|
||||
|
||||
public static boolean isHallOfFameMap(int mapid) {
|
||||
switch (mapid) {
|
||||
case 102000004: // warrior
|
||||
case 101000004: // magician
|
||||
case 100000204: // bowman
|
||||
case 103000008: // thief
|
||||
case 120000105: // pirate
|
||||
case 130000100: // cygnus
|
||||
case 130000101: // other cygnus
|
||||
case 130000110: // cygnus 2nd floor
|
||||
case 130000120: // cygnus 3rd floor (beginners)
|
||||
case 140010110: // aran
|
||||
case MapId.HALL_OF_WARRIORS: // warrior
|
||||
case MapId.HALL_OF_MAGICIANS: // magician
|
||||
case MapId.HALL_OF_BOWMEN: // bowman
|
||||
case MapId.HALL_OF_THIEVES: // thief
|
||||
case MapId.NAUTILUS_TRAINING_ROOM: // pirate
|
||||
case MapId.KNIGHTS_CHAMBER: // cygnus
|
||||
case MapId.KNIGHTS_CHAMBER_LARGE: // other cygnus
|
||||
case MapId.KNIGHTS_CHAMBER_2: // cygnus 2nd floor
|
||||
case MapId.KNIGHTS_CHAMBER_3: // cygnus 3rd floor (beginners)
|
||||
case MapId.PALACE_OF_THE_MASTER: // aran
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -352,11 +352,11 @@ public class GameConstants {
|
||||
|
||||
public static boolean isPodiumHallOfFameMap(int mapid) {
|
||||
switch (mapid) {
|
||||
case 102000004: // warrior
|
||||
case 101000004: // magician
|
||||
case 100000204: // bowman
|
||||
case 103000008: // thief
|
||||
case 120000105: // pirate
|
||||
case MapId.HALL_OF_WARRIORS:
|
||||
case MapId.HALL_OF_MAGICIANS: // magician
|
||||
case MapId.HALL_OF_BOWMEN: // bowman
|
||||
case MapId.HALL_OF_THIEVES: // thief
|
||||
case MapId.NAUTILUS_TRAINING_ROOM: // pirate
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -429,22 +429,22 @@ public class GameConstants {
|
||||
int jobid = job.getId();
|
||||
|
||||
if (isCygnus(jobid)) {
|
||||
return 130000100;
|
||||
return MapId.KNIGHTS_CHAMBER;
|
||||
} else if (isAran(jobid)) {
|
||||
return 140010110;
|
||||
return MapId.PALACE_OF_THE_MASTER;
|
||||
} else {
|
||||
if (job.isA(Job.WARRIOR)) {
|
||||
return 102000004;
|
||||
return MapId.HALL_OF_WARRIORS;
|
||||
} else if (job.isA(Job.MAGICIAN)) {
|
||||
return 101000004;
|
||||
return MapId.HALL_OF_MAGICIANS;
|
||||
} else if (job.isA(Job.BOWMAN)) {
|
||||
return 100000204;
|
||||
return MapId.HALL_OF_BOWMEN;
|
||||
} else if (job.isA(Job.THIEF)) {
|
||||
return 103000008;
|
||||
return MapId.HALL_OF_THIEVES;
|
||||
} else if (job.isA(Job.PIRATE)) {
|
||||
return 120000105;
|
||||
return MapId.NAUTILUS_TRAINING_ROOM;
|
||||
} else {
|
||||
return 130000110; // beginner explorers are allotted with the Cygnus, available map lul
|
||||
return MapId.KNIGHTS_CHAMBER_2; // beginner explorers are allotted with the Cygnus, available map lul
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -557,7 +557,7 @@ public class GameConstants {
|
||||
}
|
||||
|
||||
public static boolean isFreeMarketRoom(int mapid) {
|
||||
return mapid / 1000000 == 910 && mapid > 910000000; // FM rooms subset, thanks to shavitush (shavit)
|
||||
return mapid / 1000000 == 910 && mapid > MapId.FM_ENTRANCE; // FM rooms subset, thanks to shavitush (shavit)
|
||||
}
|
||||
|
||||
public static boolean isMerchantLocked(MapleMap map) {
|
||||
@@ -565,36 +565,11 @@ public class GameConstants {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (map.getId()) {
|
||||
case 910000000:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isBossRush(int mapid) {
|
||||
return mapid >= 970030100 && mapid <= 970042711;
|
||||
}
|
||||
|
||||
public static boolean isDojo(int mapid) {
|
||||
return mapid >= 925020000 && mapid < 925040000;
|
||||
}
|
||||
|
||||
public static boolean isDojoPartyArea(int mapid) {
|
||||
return mapid >= 925030100 && mapid < 925040000;
|
||||
}
|
||||
|
||||
public static boolean isDojoBoss(int mobid) {
|
||||
return mobid >= 9300184 && mobid < 9300216;
|
||||
return map.getId() == MapId.FM_ENTRANCE;
|
||||
}
|
||||
|
||||
public static boolean isDojoBossArea(int mapid) {
|
||||
return isDojo(mapid) && (((mapid / 100) % 100) % 6) > 0;
|
||||
}
|
||||
|
||||
public static boolean isPyramid(int mapid) {
|
||||
return mapid >= 926010010 & mapid <= 930010000;
|
||||
return MapId.isDojo(mapid) && (((mapid / 100) % 100) % 6) > 0;
|
||||
}
|
||||
|
||||
public static boolean isAriantColiseumLobby(int mapid) {
|
||||
@@ -608,11 +583,7 @@ public class GameConstants {
|
||||
}
|
||||
|
||||
public static boolean isPqSkillMap(int mapid) {
|
||||
return isDojo(mapid) || isPyramid(mapid);
|
||||
}
|
||||
|
||||
public static boolean isFishingArea(int mapid) {
|
||||
return mapid == 120010000 || mapid == 251000100 || mapid == 541010110;
|
||||
return MapId.isDojo(mapid) || MapId.isNettsPyramid(mapid);
|
||||
}
|
||||
|
||||
public static boolean isFinisherSkill(int skillId) {
|
||||
|
||||
442
src/main/java/constants/id/ItemId.java
Normal file
442
src/main/java/constants/id/ItemId.java
Normal file
@@ -0,0 +1,442 @@
|
||||
package constants.id;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class ItemId {
|
||||
// Misc
|
||||
public static final int PENDANT_OF_THE_SPIRIT = 1122017;
|
||||
public static final int HEART_SHAPED_CHOCOLATE = 5110000;
|
||||
public static final int HAPPY_BIRTHDAY = 2022153;
|
||||
public static final int FISHING_CHAIR = 3011000;
|
||||
public static final int MINI_GAME_BASE = 4080000;
|
||||
public static final int MATCH_CARDS = 4080100;
|
||||
public static final int MAGICAL_MITTEN = 1472063;
|
||||
public static final int RPS_CERTIFICATE_BASE = 4031332;
|
||||
public static final int GOLDEN_MAPLE_LEAF = 4000313;
|
||||
public static final int PERFECT_PITCH = 4310000;
|
||||
public static final int MAGIC_ROCK = 4006000;
|
||||
public static final int GOLDEN_CHICKEN_EFFECT = 4290000;
|
||||
public static final int BUMMER_EFFECT = 4290001;
|
||||
public static final int ARPQ_SHIELD = 2022269;
|
||||
public static final int ROARING_TIGER_MESSENGER = 5390006;
|
||||
|
||||
public static boolean isExpIncrease(int itemId) {
|
||||
return itemId >= 2022450 && itemId <= 2022452;
|
||||
}
|
||||
|
||||
public static boolean isRateCoupon(int itemId) {
|
||||
int itemType = itemId / 1000;
|
||||
return itemType == 5211 || itemType == 5360;
|
||||
}
|
||||
|
||||
public static boolean isMonsterCard(int itemId) {
|
||||
int itemType = itemId / 10000;
|
||||
return itemType == 238;
|
||||
}
|
||||
|
||||
public static boolean isPyramidBuff(int itemId) {
|
||||
return (itemId >= 2022585 && itemId <= 2022588) || (itemId >= 2022616 && itemId <= 2022617);
|
||||
}
|
||||
|
||||
public static boolean isDojoBuff(int itemId) {
|
||||
return itemId >= 2022359 && itemId <= 2022421;
|
||||
}
|
||||
|
||||
// Potion
|
||||
public static final int WHITE_POTION = 2000002;
|
||||
public static final int BLUE_POTION = 2000003;
|
||||
public static final int ORANGE_POTION = 2000001;
|
||||
public static final int MANA_ELIXIR = 2000006;
|
||||
|
||||
// HP/MP recovery
|
||||
public static final int SORCERERS_POTION = 2022337;
|
||||
public static final int RUSSELLONS_PILLS = 2022198;
|
||||
|
||||
// Environment
|
||||
public static final int RED_BEAN_PORRIDGE = 2022001;
|
||||
public static final int SOFT_WHITE_BUN = 2022186;
|
||||
public static final int AIR_BUBBLE = 2022040;
|
||||
|
||||
// Chair
|
||||
public static final int RELAXER = 3010000;
|
||||
private static final int CHAIR_MIN = RELAXER;
|
||||
private static final int CHAIR_MAX = FISHING_CHAIR;
|
||||
|
||||
public static boolean isChair(int itemId) {
|
||||
return itemId >= CHAIR_MIN && itemId <= CHAIR_MAX;
|
||||
// alt: return itemId / 10000 == 301;
|
||||
}
|
||||
|
||||
// Throwing star
|
||||
public static final int SUBI_THROWING_STARS = 2070000;
|
||||
public static final int HWABI_THROWING_STARS = 2070007;
|
||||
public static final int BALANCED_FURY = 2070018;
|
||||
public static final int CRYSTAL_ILBI_THROWING_STARS = 2070016;
|
||||
private static final int THROWING_STAR_MIN = SUBI_THROWING_STARS;
|
||||
private static final int THROWING_STAR_MAX = 2070016;
|
||||
public static final int DEVIL_RAIN_THROWING_STAR = 2070014;
|
||||
|
||||
public static int[] allThrowingStarIds() {
|
||||
return IntStream.range(THROWING_STAR_MIN, THROWING_STAR_MAX + 1).toArray();
|
||||
}
|
||||
|
||||
// Bullet
|
||||
public static final int BULLET = 2330000;
|
||||
private static final int BULLET_MIN = BULLET;
|
||||
private static final int BULLET_MAX = 2330005;
|
||||
public static final int BLAZE_CAPSULE = 2331000;
|
||||
public static final int GLAZE_CAPSULE = 2332000;
|
||||
|
||||
public static int[] allBulletIds() {
|
||||
return IntStream.range(BULLET_MIN, BULLET_MAX + 1).toArray();
|
||||
}
|
||||
|
||||
// Starter
|
||||
public static final int BEGINNERS_GUIDE = 4161001;
|
||||
public static final int LEGENDS_GUIDE = 4161048;
|
||||
public static final int NOBLESSE_GUIDE = 4161047;
|
||||
public static final int SWORD = 1302000; // Weapon
|
||||
public static final int HAND_AXE = 1312004;
|
||||
public static final int WOODEN_CLUB = 1322005;
|
||||
public static final int BASIC_POLEARM = 1442079;
|
||||
public static final int WHITE_UNDERSHIRT = 1040002; // Top
|
||||
public static final int UNDERSHIRT = 1040006;
|
||||
public static final int GREY_TSHIRT = 1040010;
|
||||
public static final int WHITE_TUBETOP = 1041002;
|
||||
public static final int YELLOW_TSHIRT = 1041006;
|
||||
public static final int GREEN_TSHIRT = 1041010;
|
||||
public static final int RED_STRIPED_TOP = 1041011;
|
||||
public static final int SIMPLE_WARRIOR_TOP = 1042167;
|
||||
public static final int BLUE_JEAN_SHORTS = 1060002; // Bottom
|
||||
public static final int BROWN_COTTON_SHORTS = 1060006;
|
||||
public static final int RED_MINISKIRT = 1061002;
|
||||
public static final int INDIGO_MINISKIRT = 1061008;
|
||||
public static final int SIMPLE_WARRIOR_PANTS = 1062115;
|
||||
public static final int RED_RUBBER_BOOTS = 1072001;
|
||||
public static final int LEATHER_SANDALS = 1072005;
|
||||
public static final int YELLOW_RUBBER_BOOTS = 1072037;
|
||||
public static final int BLUE_RUBBER_BOOTS = 1072038;
|
||||
public static final int AVERAGE_MUSASHI_SHOES = 1072383;
|
||||
public static final int BLACK_TOBEN = 30000; // Hair
|
||||
public static final int ZETA = 30010;
|
||||
public static final int BLACK_REBEL = 30020;
|
||||
public static final int BLACK_BUZZ = 30030;
|
||||
public static final int BLACK_SAMMY = 31000;
|
||||
public static final int BLACK_EDGY = 31040;
|
||||
public static final int BLACK_CONNIE = 31050;
|
||||
public static final int MOTIVATED_LOOK_M = 20000; // Face
|
||||
public static final int PERPLEXED_STARE = 20001;
|
||||
public static final int LEISURE_LOOK_M = 20002;
|
||||
public static final int MOTIVATED_LOOK_F = 21000;
|
||||
public static final int FEARFUL_STARE_M = 21001;
|
||||
public static final int LEISURE_LOOK_F = 21002;
|
||||
public static final int FEARFUL_STARE_F = 21201;
|
||||
public static final int PERPLEXED_STARE_HAZEL = 20401;
|
||||
public static final int LEISURE_LOOK_HAZEL = 20402;
|
||||
public static final int MOTIVATED_LOOK_AMETHYST = 21700;
|
||||
public static final int MOTIVATED_LOOK_BLUE = 20100;
|
||||
|
||||
// Warrior
|
||||
public static final int RED_HWARANG_SHIRT = 1040021;
|
||||
public static final int BLACK_MARTIAL_ARTS_PANTS = 1060016;
|
||||
public static final int MITHRIL_BATTLE_GRIEVES = 1072039;
|
||||
public static final int GLADIUS = 1302008;
|
||||
public static final int MITHRIL_POLE_ARM = 1442001;
|
||||
public static final int MITHRIL_MAUL = 1422001;
|
||||
public static final int FIREMANS_AXE = 1312005;
|
||||
public static final int DARK_ENGRIT = 1051010;
|
||||
|
||||
// Bowman
|
||||
public static final int GREEN_HUNTERS_ARMOR = 1040067;
|
||||
public static final int GREEN_HUNTRESS_ARMOR = 1041054;
|
||||
public static final int GREEN_HUNTERS_PANTS = 1060056;
|
||||
public static final int GREEN_HUNTRESS_PANTS = 1061050;
|
||||
public static final int GREEN_HUNTER_BOOTS = 1072081;
|
||||
public static final int RYDEN = 1452005;
|
||||
public static final int MOUNTAIN_CROSSBOW = 1462000;
|
||||
|
||||
// Magician
|
||||
public static final int BLUE_WIZARD_ROBE = 1050003;
|
||||
public static final int PURPLE_FAIRY_TOP = 1041041;
|
||||
public static final int PURPLE_FAIRY_SKIRT = 1061034;
|
||||
public static final int RED_MAGICSHOES = 1072075;
|
||||
public static final int MITHRIL_WAND = 1372003;
|
||||
public static final int CIRCLE_WINDED_STAFF = 1382017;
|
||||
|
||||
// Thief
|
||||
public static final int DARK_BROWN_STEALER = 1040057;
|
||||
public static final int RED_STEAL = 1041047;
|
||||
public static final int DARK_BROWN_STEALER_PANTS = 1060043;
|
||||
public static final int RED_STEAL_PANTS = 1061043;
|
||||
public static final int BRONZE_CHAIN_BOOTS = 1072032;
|
||||
public static final int STEEL_GUARDS = 1472008;
|
||||
public static final int REEF_CLAW = 1332012;
|
||||
|
||||
// Pirate
|
||||
public static final int BROWN_PAULIE_BOOTS = 1072294;
|
||||
public static final int PRIME_HANDS = 1482004;
|
||||
public static final int COLD_MIND = 1492004;
|
||||
public static final int BROWN_POLLARD = 1052107;
|
||||
|
||||
// Three snails
|
||||
public static final int SNAIL_SHELL = 4000019;
|
||||
public static final int BLUE_SNAIL_SHELL = 4000000;
|
||||
public static final int RED_SNAIL_SHELL = 4000016;
|
||||
|
||||
// Special scroll
|
||||
public static final int COLD_PROTECTION_SCROLl = 2041058;
|
||||
public static final int SPIKES_SCROLL = 2040727;
|
||||
public static final int VEGAS_SPELL_10 = 5610000;
|
||||
public static final int VEGAS_SPELL_60 = 5610001;
|
||||
public static final int CHAOS_SCROll_60 = 2049100;
|
||||
public static final int LIAR_TREE_SAP = 2049101;
|
||||
public static final int MAPLE_SYRUP = 2049102;
|
||||
public static final int WHITE_SCROLL = 2340000;
|
||||
public static final int CLEAN_SLATE_1 = 2049000;
|
||||
public static final int CLEAN_SLATE_3 = 2049001;
|
||||
public static final int CLEAN_SLATE_5 = 2049002;
|
||||
public static final int CLEAN_SLATE_20 = 2049003;
|
||||
public static final int RING_STR_100_SCROLL = 2041100;
|
||||
public static final int DRAGON_STONE_SCROLL = 2041200;
|
||||
public static final int BELT_STR_100_SCROLL = 2041300;
|
||||
|
||||
// Cure debuff
|
||||
public static final int ALL_CURE_POTION = 2050004;
|
||||
public static final int EYEDROP = 2050001;
|
||||
public static final int TONIC = 2050002;
|
||||
public static final int HOLY_WATER = 2050003;
|
||||
public static final int ANTI_BANISH_SCROLL = 2030100;
|
||||
private static final int DOJO_PARTY_ALL_CURE = 2022433;
|
||||
private static final int CARNIVAL_PARTY_ALL_CURE = 2022163;
|
||||
public static final int WHITE_ELIXIR = 2022544;
|
||||
|
||||
public static boolean isPartyAllCure(int itemId) {
|
||||
return itemId == DOJO_PARTY_ALL_CURE || itemId == CARNIVAL_PARTY_ALL_CURE;
|
||||
}
|
||||
|
||||
// Special effect
|
||||
public static final int PHARAOHS_BLESSING_1 = 2022585;
|
||||
public static final int PHARAOHS_BLESSING_2 = 2022586;
|
||||
public static final int PHARAOHS_BLESSING_3 = 2022587;
|
||||
public static final int PHARAOHS_BLESSING_4 = 2022588;
|
||||
|
||||
// Evolve pet
|
||||
public static final int DRAGON_PET = 5000028;
|
||||
public static final int ROBO_PET = 5000047;
|
||||
|
||||
// Pet equip
|
||||
public static final int MESO_MAGNET = 1812000;
|
||||
public static final int ITEM_POUCH = 1812001;
|
||||
public static final int ITEM_IGNORE = 1812007;
|
||||
|
||||
public static boolean isPet(int itemId) {
|
||||
return itemId / 1000 == 5000;
|
||||
}
|
||||
|
||||
// Expirable pet
|
||||
public static final int PET_SNAIL = 5000054;
|
||||
|
||||
// Permanent pet
|
||||
private static final int PERMA_PINK_BEAN = 5000060;
|
||||
private static final int PERMA_KINO = 5000100;
|
||||
private static final int PERMA_WHITE_TIGER = 5000101;
|
||||
private static final int PERMA_MINI_YETI = 5000102;
|
||||
|
||||
public static int[] getPermaPets() {
|
||||
return new int[]{PERMA_PINK_BEAN, PERMA_KINO, PERMA_WHITE_TIGER, PERMA_MINI_YETI};
|
||||
}
|
||||
|
||||
// Maker
|
||||
public static final int BASIC_MONSTER_CRYSTAL_1 = 4260000;
|
||||
public static final int BASIC_MONSTER_CRYSTAL_2 = 4260001;
|
||||
public static final int BASIC_MONSTER_CRYSTAL_3 = 4260002;
|
||||
public static final int INTERMEDIATE_MONSTER_CRYSTAL_1 = 4260003;
|
||||
public static final int INTERMEDIATE_MONSTER_CRYSTAL_2 = 4260004;
|
||||
public static final int INTERMEDIATE_MONSTER_CRYSTAL_3 = 4260005;
|
||||
public static final int ADVANCED_MONSTER_CRYSTAL_1 = 4260006;
|
||||
public static final int ADVANCED_MONSTER_CRYSTAL_2 = 4260007;
|
||||
public static final int ADVANCED_MONSTER_CRYSTAL_3 = 4260008;
|
||||
|
||||
// NPC weather (PQ)
|
||||
public static final int NPC_WEATHER_GROWLIE = 5120016; // Henesys PQ
|
||||
|
||||
// Safety charm
|
||||
public static final int SAFETY_CHARM = 5130000;
|
||||
public static final int EASTER_BASKET = 4031283;
|
||||
public static final int EASTER_CHARM = 4140903;
|
||||
|
||||
// Engagement box
|
||||
public static final int ENGAGEMENT_BOX_MOONSTONE = 2240000;
|
||||
public static final int ENGAGEMENT_BOX_STAR = 2240001;
|
||||
public static final int ENGAGEMENT_BOX_GOLDEN = 2240002;
|
||||
public static final int ENGAGEMENT_BOX_SILVER = 2240003;
|
||||
public static final int EMPTY_ENGAGEMENT_BOX_MOONSTONE = 4031357;
|
||||
public static final int ENGAGEMENT_RING_MOONSTONE = 4031358;
|
||||
public static final int EMPTY_ENGAGEMENT_BOX_STAR = 4031359;
|
||||
public static final int ENGAGEMENT_RING_STAR = 4031360;
|
||||
public static final int EMPTY_ENGAGEMENT_BOX_GOLDEN = 4031361;
|
||||
public static final int ENGAGEMENT_RING_GOLDEN = 4031362;
|
||||
public static final int EMPTY_ENGAGEMENT_BOX_SILVER = 4031363;
|
||||
public static final int ENGAGEMENT_RING_SILVER = 4031364;
|
||||
|
||||
public static boolean isWeddingToken(int itemId) {
|
||||
return itemId >= ItemId.EMPTY_ENGAGEMENT_BOX_MOONSTONE && itemId <= ItemId.ENGAGEMENT_RING_SILVER;
|
||||
}
|
||||
|
||||
// Wedding etc
|
||||
public static final int PARENTS_BLESSING = 4031373;
|
||||
public static final int OFFICIATORS_PERMISSION = 4031374;
|
||||
public static final int ONYX_CHEST_FOR_COUPLE = 4031424;
|
||||
|
||||
// Wedding ticket
|
||||
public static final int NORMAL_WEDDING_TICKET_CATHEDRAL = 5251000;
|
||||
public static final int NORMAL_WEDDING_TICKET_CHAPEL = 5251001;
|
||||
public static final int PREMIUM_WEDDING_TICKET_CHAPEL = 5251002;
|
||||
public static final int PREMIUM_WEDDING_TICKET_CATHEDRAL = 5251003;
|
||||
|
||||
// Wedding reservation
|
||||
public static final int PREMIUM_CATHEDRAL_RESERVATION_RECEIPT = 4031375;
|
||||
public static final int PREMIUM_CHAPEL_RESERVATION_RECEIPT = 4031376;
|
||||
public static final int NORMAL_CATHEDRAL_RESERVATION_RECEIPT = 4031480;
|
||||
public static final int NORMAL_CHAPEL_RESERVATION_RECEIPT = 4031481;
|
||||
|
||||
// Wedding invite
|
||||
public static final int INVITATION_CHAPEL = 4031377;
|
||||
public static final int INVITATION_CATHEDRAL = 4031395;
|
||||
public static final int RECEIVED_INVITATION_CHAPEL = 4031406;
|
||||
public static final int RECEIVED_INVITATION_CATHEDRAL = 4031407;
|
||||
|
||||
public static final int CARAT_RING_BASE = 1112300; // Unsure about math on this and the following one
|
||||
public static final int CARAT_RING_BOX_BASE = 2240004;
|
||||
private static final int CARAT_RING_BOX_MAX = 2240015;
|
||||
|
||||
public static final int ENGAGEMENT_BOX_MIN = ENGAGEMENT_BOX_MOONSTONE;
|
||||
public static final int ENGAGEMENT_BOX_MAX = CARAT_RING_BOX_MAX;
|
||||
|
||||
// Wedding ring
|
||||
public static final int WEDDING_RING_MOONSTONE = 1112803;
|
||||
public static final int WEDDING_RING_STAR = 1112806;
|
||||
public static final int WEDDING_RING_GOLDEN = 1112807;
|
||||
public static final int WEDDING_RING_SILVER = 1112809;
|
||||
|
||||
public static boolean isWeddingRing(int itemId) {
|
||||
return itemId == WEDDING_RING_MOONSTONE || itemId == WEDDING_RING_STAR ||
|
||||
itemId == WEDDING_RING_GOLDEN || itemId == WEDDING_RING_SILVER;
|
||||
}
|
||||
|
||||
// Priority buff
|
||||
public static final int ROSE_SCENT = 2022631;
|
||||
public static final int FREESIA_SCENT = 2022632;
|
||||
public static final int LAVENDER_SCENT = 2022633;
|
||||
|
||||
// Cash shop
|
||||
public static final int WHEEL_OF_FORTUNE = 5510000;
|
||||
public static final int CASH_SHOP_SURPRISE = 5222000;
|
||||
public static final int EXP_COUPON_2X_4H = 5211048;
|
||||
public static final int DROP_COUPON_2X_4H = 5360042;
|
||||
public static final int EXP_COUPON_3X_2H = 5211060;
|
||||
public static final int QUICK_DELIVERY_TICKET = 5330000;
|
||||
public static final int CHALKBOARD_1 = 5370000;
|
||||
public static final int CHALKBOARD_2 = 5370001;
|
||||
public static final int REMOTE_GACHAPON_TICKET = 5451000;
|
||||
public static final int AP_RESET = 5050000;
|
||||
public static final int NAME_CHANGE = 5400000;
|
||||
public static final int WORLD_TRANSFER = 5401000;
|
||||
public static final int MAPLE_LIFE_B = 5432000;
|
||||
public static final int VICIOUS_HAMMER = 5570000;
|
||||
|
||||
public static final int NX_CARD_100 = 4031865;
|
||||
public static final int NX_CARD_250 = 4031866;
|
||||
|
||||
public static boolean isNxCard(int itemId) {
|
||||
return itemId == NX_CARD_100 || itemId == NX_CARD_250;
|
||||
}
|
||||
|
||||
// Face expression
|
||||
private static final int FACE_EXPRESSION_MIN = 5160000;
|
||||
private static final int FACE_EXPRESSION_MAX = 5160014;
|
||||
|
||||
public static boolean isFaceExpression(int itemId) {
|
||||
return itemId >= FACE_EXPRESSION_MIN && itemId <= FACE_EXPRESSION_MAX;
|
||||
}
|
||||
|
||||
// New Year card
|
||||
public static final int NEW_YEARS_CARD = 2160101;
|
||||
public static final int NEW_YEARS_CARD_SEND = 4300000;
|
||||
public static final int NEW_YEARS_CARD_RECEIVED = 4301000;
|
||||
|
||||
// Popular owl items
|
||||
private static final int WORK_GLOVES = 1082002;
|
||||
private static final int STEELY_THROWING_KNIVES = 2070005;
|
||||
private static final int ILBI_THROWING_STARS = 2070006;
|
||||
private static final int OWL_BALL_MASK = 1022047;
|
||||
private static final int PINK_ADVENTURER_CAPE = 1102041;
|
||||
private static final int CLAW_30_SCROLL = 2044705;
|
||||
private static final int HELMET_60_ACC_SCROLL = 2040017;
|
||||
private static final int MAPLE_SHIELD = 1092030;
|
||||
private static final int GLOVES_ATT_60_SCROLL = 2040804;
|
||||
|
||||
public static int[] getOwlItems() {
|
||||
return new int[]{WORK_GLOVES, STEELY_THROWING_KNIVES, ILBI_THROWING_STARS, OWL_BALL_MASK, PINK_ADVENTURER_CAPE,
|
||||
CLAW_30_SCROLL, WHITE_SCROLL, HELMET_60_ACC_SCROLL, MAPLE_SHIELD, GLOVES_ATT_60_SCROLL};
|
||||
}
|
||||
|
||||
// Henesys PQ
|
||||
public static final int GREEN_PRIMROSE_SEED = 4001095;
|
||||
public static final int PURPLE_PRIMROSE_SEED = 4001096;
|
||||
public static final int PINK_PRIMROSE_SEED = 4001097;
|
||||
public static final int BROWN_PRIMROSE_SEED = 4001098;
|
||||
public static final int YELLOW_PRIMROSE_SEED = 4001099;
|
||||
public static final int BLUE_PRIMROSE_SEED = 4001100;
|
||||
public static final int MOON_BUNNYS_RICE_CAKE = 4001101;
|
||||
|
||||
// Catch mobs items
|
||||
public static final int PHEROMONE_PERFUME = 2270000;
|
||||
public static final int POUCH = 2270001;
|
||||
public static final int GHOST_SACK = 4031830;
|
||||
public static final int ARPQ_ELEMENT_ROCK = 2270002;
|
||||
public static final int ARPQ_SPIRIT_JEWEL = 4031868;
|
||||
public static final int MAGIC_CANE = 2270003;
|
||||
public static final int TAMED_RUDOLPH = 4031887;
|
||||
public static final int TRANSPARENT_MARBLE_1 = 2270005;
|
||||
public static final int MONSTER_MARBLE_1 = 2109001;
|
||||
public static final int TRANSPARENT_MARBLE_2 = 2270006;
|
||||
public static final int MONSTER_MARBLE_2 = 2109002;
|
||||
public static final int TRANSPARENT_MARBLE_3 = 2270007;
|
||||
public static final int MONSTER_MARBLE_3 = 2109003;
|
||||
public static final int EPQ_PURIFICATION_MARBLE = 2270004;
|
||||
public static final int EPQ_MONSTER_MARBLE = 4001169;
|
||||
public static final int FISH_NET = 2270008;
|
||||
public static final int FISH_NET_WITH_A_CATCH = 2022323;
|
||||
|
||||
// Mount
|
||||
public static final int BATTLESHIP = 1932000;
|
||||
|
||||
// Explorer mount
|
||||
public static final int HOG = 1902000;
|
||||
private static final int SILVER_MANE = 1902001;
|
||||
private static final int RED_DRACO = 1902002;
|
||||
private static final int EXPLORER_SADDLE = 1912000;
|
||||
|
||||
public static boolean isExplorerMount(int itemId) {
|
||||
return itemId >= HOG && itemId <= RED_DRACO || itemId == EXPLORER_SADDLE;
|
||||
}
|
||||
|
||||
// Cygnus mount
|
||||
private static final int MIMIANA = 1902005;
|
||||
private static final int MIMIO = 1902006;
|
||||
private static final int SHINJOU = 1902007;
|
||||
private static final int CYGNUS_SADDLE = 1912005;
|
||||
|
||||
public static boolean isCygnusMount(int itemId) {
|
||||
return itemId >= MIMIANA && itemId <= SHINJOU || itemId == CYGNUS_SADDLE;
|
||||
}
|
||||
|
||||
// Dev equips
|
||||
public static final int GREEN_HEADBAND = 1002067;
|
||||
public static final int TIMELESS_NIBLEHEIM = 1402046;
|
||||
public static final int BLUE_KORBEN = 1082140;
|
||||
public static final int MITHRIL_PLATINE_PANTS = 1060091;
|
||||
public static final int BLUE_CARZEN_BOOTS = 1072154;
|
||||
public static final int MITHRIL_PLATINE = 1040103;
|
||||
}
|
||||
281
src/main/java/constants/id/MapId.java
Normal file
281
src/main/java/constants/id/MapId.java
Normal file
@@ -0,0 +1,281 @@
|
||||
package constants.id;
|
||||
|
||||
public class MapId {
|
||||
// Special
|
||||
public static final int NONE = 999999999;
|
||||
public static final int GM_MAP = 180000000;
|
||||
public static final int JAIL = 300000012; // "Cellar: Camp Conference Room"
|
||||
public static final int DEVELOPERS_HQ = 777777777;
|
||||
|
||||
// Misc
|
||||
public static final int ORBIS_TOWER_BOTTOM = 200082300;
|
||||
public static final int INTERNET_CAFE = 193000000;
|
||||
public static final int CRIMSONWOOD_VALLEY_1 = 610020000;
|
||||
public static final int CRIMSONWOOD_VALLEY_2 = 610020001;
|
||||
public static final int HENESYS_PQ = 910010000;
|
||||
public static final int ORIGIN_OF_CLOCKTOWER = 220080001;
|
||||
public static final int CAVE_OF_PIANUS = 230040420;
|
||||
public static final int GUILD_HQ = 200000301;
|
||||
public static final int FM_ENTRANCE = 910000000;
|
||||
|
||||
// Beginner
|
||||
public static final int MUSHROOM_TOWN = 10000;
|
||||
|
||||
// Town
|
||||
public static final int SOUTHPERRY = 60000;
|
||||
public static final int AMHERST = 1000000;
|
||||
public static final int HENESYS = 100000000;
|
||||
public static final int ELLINIA = 101000000;
|
||||
public static final int PERION = 102000000;
|
||||
public static final int KERNING_CITY = 103000000;
|
||||
public static final int LITH_HARBOUR = 104000000;
|
||||
public static final int SLEEPYWOOD = 105040300;
|
||||
public static final int MUSHROOM_KINGDOM = 106020000;
|
||||
public static final int FLORINA_BEACH = 110000000;
|
||||
public static final int EREVE = 130000000;
|
||||
public static final int KERNING_SQUARE = 103040000;
|
||||
public static final int RIEN = 140000000;
|
||||
public static final int ORBIS = 200000000;
|
||||
public static final int EL_NATH = 211000000;
|
||||
public static final int LUDIBRIUM = 220000000;
|
||||
public static final int AQUARIUM = 230000000;
|
||||
public static final int LEAFRE = 240000000;
|
||||
public static final int NEO_CITY = 240070000;
|
||||
public static final int MU_LUNG = 250000000;
|
||||
public static final int HERB_TOWN = 251000000;
|
||||
public static final int OMEGA_SECTOR = 221000000;
|
||||
public static final int KOREAN_FOLK_TOWN = 222000000;
|
||||
public static final int ARIANT = 260000000;
|
||||
public static final int MAGATIA = 261000000;
|
||||
public static final int TEMPLE_OF_TIME = 270000100;
|
||||
public static final int ELLIN_FOREST = 300000000;
|
||||
public static final int SINGAPORE = 540000000;
|
||||
public static final int BOAT_QUAY_TOWN = 541000000;
|
||||
public static final int KAMPUNG_VILLAGE = 551000000;
|
||||
public static final int NEW_LEAF_CITY = 600000000;
|
||||
public static final int MUSHROOM_SHRINE = 800000000;
|
||||
public static final int SHOWA_TOWN = 801000000;
|
||||
public static final int NAUTILUS_HARBOR = 120000000;
|
||||
public static final int HAPPYVILLE = 209000000;
|
||||
|
||||
public static final int SHOWA_SPA_M = 809000101;
|
||||
public static final int SHOWA_SPA_F = 809000201;
|
||||
|
||||
private static final int MAPLE_ISLAND_MIN = 0;
|
||||
private static final int MAPLE_ISLAND_MAX = 2000001;
|
||||
|
||||
public static boolean isMapleIsland(int mapId) {
|
||||
return mapId >= MAPLE_ISLAND_MIN && mapId <= MAPLE_ISLAND_MAX;
|
||||
}
|
||||
|
||||
// Travel
|
||||
// There are 10 of each of these travel maps in the files
|
||||
public static final int FROM_LITH_TO_RIEN = 200090060;
|
||||
public static final int FROM_RIEN_TO_LITH = 200090070;
|
||||
public static final int DANGEROUS_FOREST = 140020300; // Rien docks
|
||||
public static final int FROM_ELLINIA_TO_EREVE = 200090030;
|
||||
public static final int SKY_FERRY = 130000210; // Ereve platform
|
||||
public static final int FROM_EREVE_TO_ELLINIA = 200090031;
|
||||
public static final int ELLINIA_SKY_FERRY = 101000400;
|
||||
public static final int FROM_EREVE_TO_ORBIS = 200090021;
|
||||
public static final int ORBIS_STATION = 200000161;
|
||||
public static final int FROM_ORBIS_TO_EREVE = 200090020;
|
||||
|
||||
// Aran
|
||||
public static final int ARAN_TUTORIAL_START = 914000000;
|
||||
public static final int ARAN_TUTORIAL_MAX = 914000500;
|
||||
public static final int ARAN_INTRO = 140090000;
|
||||
private static final int BURNING_FOREST_1 = 914000200;
|
||||
private static final int BURNING_FOREST_2 = 914000210;
|
||||
private static final int BURNING_FOREST_3 = 914000220;
|
||||
|
||||
// Aran tutorial
|
||||
public static boolean isGodlyStatMap(int mapId) {
|
||||
return mapId == BURNING_FOREST_1 || mapId == BURNING_FOREST_2 || mapId == BURNING_FOREST_3;
|
||||
}
|
||||
|
||||
// Aran intro
|
||||
public static final int ARAN_TUTO_1 = 914090010;
|
||||
public static final int ARAN_TUTO_2 = 914090011;
|
||||
public static final int ARAN_TUTO_3 = 914090012;
|
||||
public static final int ARAN_TUTO_4 = 914090013;
|
||||
public static final int ARAN_POLEARM = 914090100;
|
||||
public static final int ARAN_MAHA = 914090200; // Black screen when warped to
|
||||
|
||||
// Starting map
|
||||
public static final int STARTING_MAP_NOBLESSE = 130030000;
|
||||
|
||||
// Cygnus intro
|
||||
// These are the actual maps
|
||||
private static final int CYGNUS_INTRO_LOCATION_MIN = 913040000;
|
||||
private static final int CYGNUS_INTRO_LOCATION_MAX = 913040006;
|
||||
|
||||
public static boolean isCygnusIntro(int mapId) {
|
||||
return mapId >= CYGNUS_INTRO_LOCATION_MIN && mapId <= CYGNUS_INTRO_LOCATION_MAX;
|
||||
}
|
||||
|
||||
// Cygnus intro video
|
||||
public static final int CYGNUS_INTRO_LEAD = 913040100;
|
||||
public static final int CYGNUS_INTRO_WARRIOR = 913040101;
|
||||
public static final int CYGNUS_INTRO_BOWMAN = 913040102;
|
||||
public static final int CYGNUS_INTRO_MAGE = 913040103;
|
||||
public static final int CYGNUS_INTRO_PIRATE = 913040104;
|
||||
public static final int CYGNUS_INTRO_THIEF = 913040105;
|
||||
public static final int CYGNUS_INTRO_CONCLUSION = 913040106;
|
||||
|
||||
// Event
|
||||
public static final int EVENT_COCONUT_HARVEST = 109080000;
|
||||
public static final int EVENT_OX_QUIZ = 109020001;
|
||||
public static final int EVENT_PHYSICAL_FITNESS = 109040000;
|
||||
public static final int EVENT_OLA_OLA_0 = 109030001;
|
||||
public static final int EVENT_OLA_OLA_1 = 109030101;
|
||||
public static final int EVENT_OLA_OLA_2 = 109030201;
|
||||
public static final int EVENT_OLA_OLA_3 = 109030301;
|
||||
public static final int EVENT_OLA_OLA_4 = 109030401;
|
||||
public static final int EVENT_SNOWBALL = 109060000;
|
||||
public static final int EVENT_FIND_THE_JEWEL = 109010000;
|
||||
public static final int FITNESS_EVENT_LAST = 109040004;
|
||||
public static final int OLA_EVENT_LAST_1 = 109030003;
|
||||
public static final int OLA_EVENT_LAST_2 = 109030103;
|
||||
public static final int WITCH_TOWER_ENTRANCE = 980040000;
|
||||
public static final int EVENT_WINNER = 109050000;
|
||||
public static final int EVENT_EXIT = 109050001;
|
||||
public static final int EVENT_SNOWBALL_ENTRANCE = 109060001;
|
||||
|
||||
private static final int PHYSICAL_FITNESS_MIN = EVENT_PHYSICAL_FITNESS;
|
||||
private static final int PHYSICAL_FITNESS_MAX = FITNESS_EVENT_LAST;
|
||||
|
||||
public static boolean isPhysicalFitness(int mapId) {
|
||||
return mapId >= PHYSICAL_FITNESS_MIN && mapId <= PHYSICAL_FITNESS_MAX;
|
||||
}
|
||||
|
||||
private static final int OLA_OLA_MIN = EVENT_OLA_OLA_0;
|
||||
private static final int OLA_OLA_MAX = 109030403; // OLA_OLA_4 level 3
|
||||
|
||||
public static boolean isOlaOla(int mapId) {
|
||||
return mapId >= OLA_OLA_MIN && mapId <= OLA_OLA_MAX;
|
||||
}
|
||||
|
||||
// Self lootable maps
|
||||
private static final int HAPPYVILLE_TREE_MIN = 209000001;
|
||||
private static final int HAPPYVILLE_TREE_MAX = 209000015;
|
||||
private static final int GPQ_FOUNTAIN_MIN = 990000500;
|
||||
private static final int GPQ_FOUNTAIN_MAX = 990000502;
|
||||
|
||||
public static boolean isSelfLootableOnly(int mapId) {
|
||||
return (mapId >= HAPPYVILLE_TREE_MIN && mapId <= HAPPYVILLE_TREE_MAX) ||
|
||||
(mapId >= GPQ_FOUNTAIN_MIN && mapId <= GPQ_FOUNTAIN_MAX);
|
||||
}
|
||||
|
||||
// Dojo
|
||||
public static final int DOJO_SOLO_BASE = 925020000;
|
||||
public static final int DOJO_PARTY_BASE = 925030000;
|
||||
public static final int DOJO_EXIT = 925020002;
|
||||
private static final int DOJO_MIN = DOJO_SOLO_BASE;
|
||||
private static final int DOJO_MAX = 925033804;
|
||||
private static final int DOJO_PARTY_MIN = 925030100;
|
||||
public static final int DOJO_PARTY_MAX = DOJO_MAX;
|
||||
|
||||
public static boolean isDojo(int mapId) {
|
||||
return mapId >= DOJO_MIN && mapId <= DOJO_MAX;
|
||||
}
|
||||
|
||||
public static boolean isPartyDojo(int mapId) {
|
||||
return mapId >= DOJO_PARTY_MIN && mapId <= DOJO_PARTY_MAX;
|
||||
}
|
||||
|
||||
// Mini dungeon
|
||||
public static final int ANT_TUNNEL_2 = 105050100;
|
||||
public static final int CAVE_OF_MUSHROOMS_BASE = 105050101;
|
||||
public static final int SLEEPY_DUNGEON_4 = 105040304;
|
||||
public static final int GOLEMS_CASTLE_RUINS_BASE = 105040320;
|
||||
public static final int SAHEL_2 = 260020600;
|
||||
public static final int HILL_OF_SANDSTORMS_BASE = 260020630;
|
||||
public static final int RAIN_FOREST_EAST_OF_HENESYS = 100020000;
|
||||
public static final int HENESYS_PIG_FARM_BASE = 100020100;
|
||||
public static final int COLD_CRADLE = 105090311;
|
||||
public static final int DRAKES_BLUE_CAVE_BASE = 105090320;
|
||||
public static final int EOS_TOWER_76TH_TO_90TH_FLOOR = 221023400;
|
||||
public static final int DRUMMER_BUNNYS_LAIR_BASE = 221023401;
|
||||
public static final int BATTLEFIELD_OF_FIRE_AND_WATER = 240020500;
|
||||
public static final int ROUND_TABLE_OF_KENTAURUS_BASE = 240020512;
|
||||
public static final int RESTORING_MEMORY_BASE = 240040800;
|
||||
public static final int DESTROYED_DRAGON_NEST = 240040520;
|
||||
public static final int NEWT_SECURED_ZONE_BASE = 240040900;
|
||||
public static final int RED_NOSE_PIRATE_DEN_2 = 251010402;
|
||||
public static final int PILLAGE_OF_TREASURE_ISLAND_BASE = 251010410;
|
||||
public static final int LAB_AREA_C1 = 261020300;
|
||||
public static final int CRITICAL_ERROR_BASE = 261020301;
|
||||
public static final int FANTASY_THEME_PARK_3 = 551030000;
|
||||
public static final int LONGEST_RIDE_ON_BYEBYE_STATION = 551030001;
|
||||
|
||||
// Boss rush
|
||||
private static final int BOSS_RUSH_MIN = 970030100;
|
||||
private static final int BOSS_RUSH_MAX = 970042711;
|
||||
|
||||
public static boolean isBossRush(int mapId) {
|
||||
return mapId >= BOSS_RUSH_MIN && mapId <= BOSS_RUSH_MAX;
|
||||
}
|
||||
|
||||
// ARPQ
|
||||
public static final int ARPQ_LOBBY = 980010000;
|
||||
public static final int ARPQ_ARENA_1 = 980010101;
|
||||
public static final int ARPQ_ARENA_2 = 980010201;
|
||||
public static final int ARPQ_ARENA_3 = 980010301;
|
||||
public static final int ARPQ_KINGS_ROOM = 980010010;
|
||||
|
||||
// Nett's pyramid
|
||||
public static final int NETTS_PYRAMID = 926010001;
|
||||
public static final int NETTS_PYRAMID_SOLO_BASE = 926010100;
|
||||
public static final int NETTS_PYRAMID_PARTY_BASE = 926020100;
|
||||
private static final int NETTS_PYRAMID_MIN = NETTS_PYRAMID_SOLO_BASE;
|
||||
private static final int NETTS_PYRAMID_MAX = 926023500;
|
||||
|
||||
public static boolean isNettsPyramid(int mapId) {
|
||||
return mapId >= NETTS_PYRAMID_MIN && mapId <= NETTS_PYRAMID_MAX;
|
||||
}
|
||||
|
||||
// Fishing
|
||||
private static final int ON_THE_WAY_TO_THE_HARBOR = 120010000;
|
||||
private static final int PIER_ON_THE_BEACH = 251000100;
|
||||
private static final int PEACEFUL_SHIP = 541010110;
|
||||
|
||||
public static boolean isFishingArea(int mapId) {
|
||||
return mapId == ON_THE_WAY_TO_THE_HARBOR || mapId == PIER_ON_THE_BEACH || mapId == PEACEFUL_SHIP;
|
||||
}
|
||||
|
||||
// Wedding
|
||||
public static final int AMORIA = 680000000;
|
||||
public static final int CHAPEL_WEDDING_ALTAR = 680000110;
|
||||
public static final int CATHEDRAL_WEDDING_ALTAR = 680000210;
|
||||
public static final int WEDDING_PHOTO = 680000300;
|
||||
public static final int WEDDING_EXIT = 680000500;
|
||||
|
||||
// Statue
|
||||
public static final int HALL_OF_WARRIORS = 102000004; // Explorer
|
||||
public static final int HALL_OF_MAGICIANS = 101000004;
|
||||
public static final int HALL_OF_BOWMEN = 100000204;
|
||||
public static final int HALL_OF_THIEVES = 103000008;
|
||||
public static final int NAUTILUS_TRAINING_ROOM = 120000105;
|
||||
public static final int KNIGHTS_CHAMBER = 130000100; // Cygnus
|
||||
public static final int KNIGHTS_CHAMBER_2 = 130000110;
|
||||
public static final int KNIGHTS_CHAMBER_3 = 130000120;
|
||||
public static final int KNIGHTS_CHAMBER_LARGE = 130000101;
|
||||
public static final int PALACE_OF_THE_MASTER = 140010110; // Aran
|
||||
|
||||
// gm-goto
|
||||
public static final int EXCAVATION_SITE = 990000000;
|
||||
public static final int SOMEONE_ELSES_HOUSE = 100000005;
|
||||
public static final int GRIFFEY_FOREST = 240020101;
|
||||
public static final int MANONS_FOREST = 240020401;
|
||||
public static final int HOLLOWED_GROUND = 682000001;
|
||||
public static final int CURSED_SANCTUARY = 105090900;
|
||||
public static final int DOOR_TO_ZAKUM = 211042300;
|
||||
public static final int DRAGON_NEST_LEFT_BEHIND = 240040511;
|
||||
public static final int HENESYS_PARK = 100000200;
|
||||
public static final int ENTRANCE_TO_HORNTAILS_CAVE = 240050400;
|
||||
public static final int FORGOTTEN_TWILIGHT = 270050000;
|
||||
public static final int CRIMSONWOOD_KEEP = 610020006;
|
||||
public static final int MU_LUNG_DOJO_HALL = 925020001;
|
||||
public static final int EXCLUSIVE_TRAINING_CENTER = 970030000;
|
||||
}
|
||||
103
src/main/java/constants/id/MobId.java
Normal file
103
src/main/java/constants/id/MobId.java
Normal file
@@ -0,0 +1,103 @@
|
||||
package constants.id;
|
||||
|
||||
public class MobId {
|
||||
public static final int ARPQ_BOMB = 9300166;
|
||||
public static final int GIANT_CAKE = 9400606;
|
||||
public static final int TRANSPARENT_ITEM = 9300216;
|
||||
|
||||
public static final int GREEN_MUSHROOM = 1110100;
|
||||
public static final int DEJECTED_GREEN_MUSHROOM = 1110130;
|
||||
public static final int GREEN_MUSHROOM_QUEST = 9101000;
|
||||
public static final int ZOMBIE_MUSHROOM = 2230101;
|
||||
public static final int ANNOYED_ZOMBIE_MUSHROOM = 2230131;
|
||||
public static final int ZOMBIE_MUSHROOM_QUEST = 9101001;
|
||||
public static final int GHOST_STUMP = 1140100;
|
||||
public static final int SMIRKING_GHOST_STUMP = 1140130;
|
||||
public static final int GHOST_STUMP_QUEST = 9101002;
|
||||
|
||||
public static final int PAPULATUS_CLOCK = 8500001;
|
||||
public static final int HIGH_DARKSTAR = 8500003;
|
||||
public static final int LOW_DARKSTAR = 8500004;
|
||||
|
||||
public static final int PIANUS_R = 8510000;
|
||||
public static final int BLOODY_BOOM = 8510100;
|
||||
|
||||
public static final int PINK_BEAN = 8820001;
|
||||
|
||||
public static final int ZAKUM_1 = 8800000;
|
||||
public static final int ZAKUM_2 = 8800001;
|
||||
public static final int ZAKUM_3 = 8800002;
|
||||
public static final int ZAKUM_ARM_1 = 8800003;
|
||||
public static final int ZAKUM_ARM_2 = 8800004;
|
||||
public static final int ZAKUM_ARM_3 = 8800005;
|
||||
public static final int ZAKUM_ARM_4 = 8800006;
|
||||
public static final int ZAKUM_ARM_5 = 8800007;
|
||||
public static final int ZAKUM_ARM_6 = 8800008;
|
||||
public static final int ZAKUM_ARM_7 = 8800009;
|
||||
public static final int ZAKUM_ARM_8 = 8800010;
|
||||
|
||||
public static boolean isZakumArm(int mobId) {
|
||||
return mobId >= ZAKUM_ARM_1 && mobId <= ZAKUM_ARM_8;
|
||||
}
|
||||
|
||||
public static final int HORNTAIL_PREHEAD_LEFT = 8810000;
|
||||
public static final int HORNTAIL_PREHEAD_RIGHT = 8810001;
|
||||
public static final int HORNTAIL_HEAD_A = 8810002;
|
||||
public static final int HORNTAIL_HEAD_B = 8810003;
|
||||
public static final int HORNTAIL_HEAD_C = 8810004;
|
||||
public static final int HORNTAIL_HAND_LEFT = 8810005;
|
||||
public static final int HORNTAIL_HAND_RIGHT = 8810006;
|
||||
public static final int HORNTAIL_WINGS = 8810007;
|
||||
public static final int HORNTAIL_LEGS = 8810008;
|
||||
public static final int HORNTAIL_TAIL = 8810009;
|
||||
public static final int DEAD_HORNTAIL_MIN = 8810010;
|
||||
public static final int DEAD_HORNTAIL_MAX = 8810017;
|
||||
public static final int HORNTAIL = 8810018;
|
||||
public static final int SUMMON_HORNTAIL = 8810026;
|
||||
|
||||
public static boolean isDeadHorntailPart(int mobId) {
|
||||
return mobId >= DEAD_HORNTAIL_MIN && mobId <= DEAD_HORNTAIL_MAX;
|
||||
}
|
||||
|
||||
public static final int SCARLION_STATUE = 9420546;
|
||||
public static final int SCARLION = 9420547;
|
||||
public static final int ANGRY_SCARLION = 9420548;
|
||||
public static final int FURIOUS_SCARLION = 9420549;
|
||||
public static final int TARGA_STATUE = 9420541;
|
||||
public static final int TARGA = 9420542;
|
||||
public static final int ANGRY_TARGA = 9420543;
|
||||
public static final int FURIOUS_TARGA = 9420544;
|
||||
|
||||
// Catch mobs
|
||||
public static final int TAMABLE_HOG = 9300101;
|
||||
public static final int GHOST = 9500197;
|
||||
public static final int ARPQ_SCORPION = 9300157;
|
||||
public static final int LOST_RUDOLPH = 9500320;
|
||||
public static final int KING_SLIME_DOJO = 9300187;
|
||||
public static final int FAUST_DOJO = 9300189;
|
||||
public static final int MUSHMOM_DOJO = 9300191;
|
||||
public static final int POISON_FLOWER = 9300175;
|
||||
public static final int P_JUNIOR = 9500336;
|
||||
|
||||
// Friendly mobs
|
||||
public static final int WATCH_HOG = 9300102;
|
||||
public static final int MOON_BUNNY = 9300061;
|
||||
public static final int TYLUS = 9300093;
|
||||
public static final int JULIET = 9300137;
|
||||
public static final int ROMEO = 9300138;
|
||||
public static final int DELLI = 9300162;
|
||||
public static final int GIANT_SNOWMAN_LV1_EASY = 9400322;
|
||||
public static final int GIANT_SNOWMAN_LV1_MEDIUM = 9400327;
|
||||
public static final int GIANT_SNOWMAN_LV1_HARD = 9400332;
|
||||
public static final int GIANT_SNOWMAN_LV5_EASY = 9400326;
|
||||
public static final int GIANT_SNOWMAN_LV5_MEDIUM = 9400331;
|
||||
public static final int GIANT_SNOWMAN_LV5_HARD = 9400336;
|
||||
|
||||
// Dojo
|
||||
private static final int DOJO_BOSS_MIN = 9300184;
|
||||
private static final int DOJO_BOSS_MAX = 9300215;
|
||||
|
||||
public static boolean isDojoBoss(int mobId) {
|
||||
return mobId >= DOJO_BOSS_MIN && mobId <= DOJO_BOSS_MAX;
|
||||
}
|
||||
}
|
||||
40
src/main/java/constants/id/NpcId.java
Normal file
40
src/main/java/constants/id/NpcId.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package constants.id;
|
||||
|
||||
public class NpcId {
|
||||
public static final int CUSTOM_DEV = 9977777;
|
||||
|
||||
public static final int MAPLE_ADMINISTRATOR = 9010000;
|
||||
public static final int STEWARD = 9201143;
|
||||
public static final int DIMENSIONAL_MIRROR = 9010022;
|
||||
public static final int SPINEL = 9000020;
|
||||
public static final int DUEY = 9010009;
|
||||
public static final int RPS_ADMIN = 9000019;
|
||||
public static final int GRANDPA_MOON_BUNNY = 9001105;
|
||||
public static final int FREDRICK = 9030000;
|
||||
public static final int MAR_THE_FAIRY = 1032102;
|
||||
public static final int HERACLE = 2010007;
|
||||
public static final int MIMO = 1101008;
|
||||
public static final int LILIN = 1202000;
|
||||
public static final int BILLY = 1052015;
|
||||
public static final int TEMPLE_KEEPER = 2140000;
|
||||
|
||||
// Id in ascending order
|
||||
public static final int GACHAPON_HENESYS = 9100100;
|
||||
public static final int GACHAPON_ELLINIA = 9100101;
|
||||
public static final int GACHAPON_PERION = 9100102;
|
||||
public static final int GACHAPON_KERNING = 9100103;
|
||||
public static final int GACHAPON_SLEEPYWOOD = 9100104;
|
||||
public static final int GACHAPON_MUSHROOM_SHRINE = 9100105;
|
||||
public static final int GACHAPON_SHOWA_MALE = 9100106;
|
||||
public static final int GACHAPON_SHOWA_FEMALE = 9100107;
|
||||
public static final int GACHAPON_LUDIBRIUM = 9100108;
|
||||
public static final int GACHAPON_NLC = 9100109;
|
||||
public static final int GACHAPON_EL_NATH = 9100110;
|
||||
public static final int GACHAPON_NAUTILUS = 9100117;
|
||||
|
||||
public static final int GACHAPON_MIN = GACHAPON_HENESYS;
|
||||
public static final int GACHAPON_MAX = GACHAPON_NAUTILUS;
|
||||
|
||||
public static final int PLAYER_NPC_BASE = 9900000;
|
||||
|
||||
}
|
||||
@@ -23,6 +23,7 @@ package constants.inventory;
|
||||
|
||||
import client.inventory.InventoryType;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -51,9 +52,9 @@ public final class ItemConstants {
|
||||
public final static Set<Integer> permanentItemids = new HashSet<>();
|
||||
|
||||
static {
|
||||
int[] pi = {5000060, 5000100, 5000101, 5000102}; // i ain't going to open one gigantic itemid cache just for 4 perma itemids, no way!
|
||||
for (int i : pi) {
|
||||
permanentItemids.add(i);
|
||||
// i ain't going to open one gigantic itemid cache just for 4 perma itemids, no way!
|
||||
for (int petItemId : ItemId.getPermaPets()) {
|
||||
permanentItemids.add(petItemId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ public final class ItemConstants {
|
||||
}
|
||||
|
||||
public static boolean isExpirablePet(int itemId) {
|
||||
return YamlConfig.config.server.USE_ERASE_PET_ON_EXPIRATION || itemId == 5000054;
|
||||
return YamlConfig.config.server.USE_ERASE_PET_ON_EXPIRATION || itemId == ItemId.PET_SNAIL;
|
||||
}
|
||||
|
||||
public static boolean isPermanentItem(int itemId) {
|
||||
@@ -133,11 +134,11 @@ public final class ItemConstants {
|
||||
}
|
||||
|
||||
public static boolean isTownScroll(int itemId) {
|
||||
return itemId >= 2030000 && itemId < 2030100;
|
||||
return itemId >= 2030000 && itemId < ItemId.ANTI_BANISH_SCROLL;
|
||||
}
|
||||
|
||||
public static boolean isAntibanishScroll(int itemId) {
|
||||
return itemId == 2030100;
|
||||
return itemId == ItemId.ANTI_BANISH_SCROLL;
|
||||
}
|
||||
|
||||
public static boolean isCleanSlate(int scrollId) {
|
||||
@@ -145,14 +146,14 @@ public final class ItemConstants {
|
||||
}
|
||||
|
||||
public static boolean isModifierScroll(int scrollId) {
|
||||
return scrollId == 2040727 || scrollId == 2041058;
|
||||
return scrollId == ItemId.SPIKES_SCROLL || scrollId == ItemId.COLD_PROTECTION_SCROLl;
|
||||
}
|
||||
|
||||
public static boolean isFlagModifier(int scrollId, short flag) {
|
||||
if (scrollId == 2041058 && ((flag & ItemConstants.COLD) == ItemConstants.COLD)) {
|
||||
if (scrollId == ItemId.COLD_PROTECTION_SCROLl && ((flag & ItemConstants.COLD) == ItemConstants.COLD)) {
|
||||
return true;
|
||||
}
|
||||
return scrollId == 2040727 && ((flag & ItemConstants.SPIKES) == ItemConstants.SPIKES);
|
||||
return scrollId == ItemId.SPIKES_SCROLL && ((flag & ItemConstants.SPIKES) == ItemConstants.SPIKES);
|
||||
}
|
||||
|
||||
public static boolean isChaosScroll(int scrollId) {
|
||||
@@ -172,10 +173,6 @@ public final class ItemConstants {
|
||||
return itemId >= 2022430 && itemId <= 2022433 || itemId >= 2022160 && itemId <= 2022163;
|
||||
}
|
||||
|
||||
public static boolean isPartyAllcure(int itemId) {
|
||||
return itemId == 2022433 || itemId == 2022163;
|
||||
}
|
||||
|
||||
public static boolean isHiredMerchant(int itemId) {
|
||||
return itemId / 10000 == 503;
|
||||
}
|
||||
@@ -227,21 +224,13 @@ public final class ItemConstants {
|
||||
}
|
||||
|
||||
public static boolean isFishingChair(int itemId) {
|
||||
return itemId == 3011000;
|
||||
return itemId == ItemId.FISHING_CHAIR;
|
||||
}
|
||||
|
||||
public static boolean isMedal(int itemId) {
|
||||
return itemId >= 1140000 && itemId < 1143000;
|
||||
}
|
||||
|
||||
public static boolean isWeddingRing(int itemId) {
|
||||
return itemId >= 1112803 && itemId <= 1112809;
|
||||
}
|
||||
|
||||
public static boolean isWeddingToken(int itemId) {
|
||||
return itemId >= 4031357 && itemId <= 4031364;
|
||||
}
|
||||
|
||||
public static boolean isFace(int itemId) {
|
||||
return itemId >= 20000 && itemId < 22000;
|
||||
}
|
||||
@@ -249,12 +238,4 @@ public final class ItemConstants {
|
||||
public static boolean isHair(int itemId) {
|
||||
return itemId >= 30000 && itemId < 35000;
|
||||
}
|
||||
|
||||
public static boolean isFaceExpression(int itemId) {
|
||||
return itemId / 10000 == 516;
|
||||
}
|
||||
|
||||
public static boolean isChair(int itemId) {
|
||||
return itemId / 10000 == 301;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ package net.server.channel;
|
||||
|
||||
import client.Character;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import net.netty.ChannelServer;
|
||||
import net.packet.Packet;
|
||||
import net.server.PlayerStorage;
|
||||
@@ -499,7 +499,7 @@ public final class Channel {
|
||||
}
|
||||
|
||||
if (slot < range) {
|
||||
int slotMapid = (isPartyDojo ? 925030000 : 925020000) + (100 * (fromStage + 1)) + slot;
|
||||
int slotMapid = (isPartyDojo ? MapId.DOJO_PARTY_BASE : MapId.DOJO_SOLO_BASE) + (100 * (fromStage + 1)) + slot;
|
||||
int dojoSlot = getDojoSlot(slotMapid);
|
||||
|
||||
if (party != null) {
|
||||
@@ -574,7 +574,7 @@ public final class Channel {
|
||||
final int slot = getDojoSlot(dojoMapId);
|
||||
final int delta = (dojoMapId) % 100;
|
||||
final int stage = (dojoMapId / 100) % 100;
|
||||
final int dojoBaseMap = (dojoMapId >= 925030000) ? 925030000 : 925020000;
|
||||
final int dojoBaseMap = (dojoMapId >= MapId.DOJO_PARTY_BASE) ? MapId.DOJO_PARTY_BASE : MapId.DOJO_SOLO_BASE;
|
||||
|
||||
for (int i = 0; i < 5; i++) { //only 32 stages, but 38 maps
|
||||
if (stage + i > 38) {
|
||||
@@ -605,7 +605,7 @@ public final class Channel {
|
||||
}
|
||||
this.dojoTask[slot] = TimerManager.getInstance().schedule(() -> {
|
||||
final int delta = (dojoMapId) % 100;
|
||||
final int dojoBaseMap = (slot < 5) ? 925030000 : 925020000;
|
||||
final int dojoBaseMap = (slot < 5) ? MapId.DOJO_PARTY_BASE : MapId.DOJO_SOLO_BASE;
|
||||
Party party = null;
|
||||
|
||||
for (int i = 0; i < 5; i++) { //only 32 stages, but 38 maps
|
||||
@@ -613,9 +613,9 @@ public final class Channel {
|
||||
break;
|
||||
}
|
||||
|
||||
MapleMap dojoExit = getMapFactory().getMap(925020002);
|
||||
MapleMap dojoExit = getMapFactory().getMap(MapId.DOJO_EXIT);
|
||||
for (Character chr : getMapFactory().getMap(dojoBaseMap + (100 * (stage + i)) + delta).getAllPlayers()) {
|
||||
if (GameConstants.isDojo(chr.getMap().getId())) {
|
||||
if (MapId.isDojo(chr.getMap().getId())) {
|
||||
chr.changeMap(dojoExit);
|
||||
}
|
||||
party = chr.getParty();
|
||||
|
||||
@@ -28,6 +28,9 @@ import client.status.MonsterStatus;
|
||||
import client.status.MonsterStatusEffect;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.id.MobId;
|
||||
import constants.skills.*;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -236,7 +239,7 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (GameConstants.isDojoBoss(monster.getId())) {
|
||||
if (MobId.isDojoBoss(monster.getId())) {
|
||||
if (attack.skill == 1009 || attack.skill == 10001009 || attack.skill == 20001009) {
|
||||
int dmgLimit = (int) Math.ceil(0.3 * monster.getMaxHp());
|
||||
List<Integer> _onedList = new LinkedList<>();
|
||||
@@ -439,19 +442,11 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
||||
if (skillLv > 0) {
|
||||
AbstractPlayerInteraction api = player.getAbstractPlayerInteraction();
|
||||
|
||||
int shellId;
|
||||
switch (skillLv) {
|
||||
case 1:
|
||||
shellId = 4000019;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
shellId = 4000000;
|
||||
break;
|
||||
|
||||
default:
|
||||
shellId = 4000016;
|
||||
}
|
||||
int shellId = switch (skillLv) {
|
||||
case 1 -> ItemId.SNAIL_SHELL;
|
||||
case 2 -> ItemId.BLUE_SNAIL_SHELL;
|
||||
default -> ItemId.RED_SNAIL_SHELL;
|
||||
};
|
||||
|
||||
if (api.haveItem(shellId, 1)) {
|
||||
api.gainItem(shellId, (short) -1, false);
|
||||
@@ -740,7 +735,7 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
||||
calcDmgMax = (long) Math.ceil(calcDmgMax * dmgBuff);
|
||||
}
|
||||
|
||||
if (chr.getMapId() >= 914000000 && chr.getMapId() <= 914000500) {
|
||||
if (chr.getMapId() >= MapId.ARAN_TUTORIAL_START && chr.getMapId() <= MapId.ARAN_TUTORIAL_MAX) {
|
||||
calcDmgMax += 80000; // Aran Tutorial.
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -293,7 +294,7 @@ public final class CashOperationHandler extends AbstractPacketHandler {
|
||||
chr.getClient().sendPacket(PacketCreator.serverNotice(1, "You cannot put the pet you currently equip into the Cash Shop inventory."));
|
||||
c.enableCSActions();
|
||||
return;
|
||||
} else if (ItemConstants.isWeddingRing(item.getItemId()) || ItemConstants.isWeddingToken(item.getItemId())) {
|
||||
} else if (ItemId.isWeddingRing(item.getItemId()) || ItemId.isWeddingToken(item.getItemId())) {
|
||||
chr.getClient().sendPacket(PacketCreator.serverNotice(1, "You cannot put relationship items into the Cash Shop inventory."));
|
||||
c.enableCSActions();
|
||||
return;
|
||||
|
||||
@@ -25,6 +25,8 @@ import client.Character;
|
||||
import client.Client;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import server.Trade;
|
||||
@@ -91,11 +93,11 @@ public final class ChangeMapHandler extends AbstractPacketHandler {
|
||||
if (targetid != -1) {
|
||||
if (!chr.isAlive()) {
|
||||
MapleMap map = chr.getMap();
|
||||
if (wheel && chr.haveItemWithId(5510000, false)) {
|
||||
if (wheel && chr.haveItemWithId(ItemId.WHEEL_OF_FORTUNE, false)) {
|
||||
// thanks lucasziron (lziron) for showing revivePlayer() triggering by Wheel
|
||||
|
||||
InventoryManipulator.removeById(c, InventoryType.CASH, 5510000, 1, true, false);
|
||||
chr.sendPacket(PacketCreator.showWheelsLeft(chr.getItemQuantity(5510000, false)));
|
||||
InventoryManipulator.removeById(c, InventoryType.CASH, ItemId.WHEEL_OF_FORTUNE, 1, true, false);
|
||||
chr.sendPacket(PacketCreator.showWheelsLeft(chr.getItemQuantity(ItemId.WHEEL_OF_FORTUNE, false)));
|
||||
|
||||
chr.updateHp(50);
|
||||
chr.changeMap(map, map.findClosestPlayerSpawnpoint(chr.getPosition()));
|
||||
@@ -120,17 +122,17 @@ public final class ChangeMapHandler extends AbstractPacketHandler {
|
||||
warp = true;
|
||||
}
|
||||
} else if (divi == 20100) {
|
||||
if (targetid == 104000000) {
|
||||
if (targetid == MapId.LITH_HARBOUR) {
|
||||
c.sendPacket(PacketCreator.lockUI(false));
|
||||
c.sendPacket(PacketCreator.disableUI(false));
|
||||
warp = true;
|
||||
}
|
||||
} else if (divi == 9130401) { // Only allow warp if player is already in Intro map, or else = hack
|
||||
if (targetid == 130000000 || targetid / 100 == 9130401) { // Cygnus introduction
|
||||
if (targetid == MapId.EREVE || targetid / 100 == 9130401) { // Cygnus introduction
|
||||
warp = true;
|
||||
}
|
||||
} else if (divi == 9140900) { // Aran Introduction
|
||||
if (targetid == 914090011 || targetid == 914090012 || targetid == 914090013 || targetid == 140090000) {
|
||||
if (targetid == MapId.ARAN_TUTO_2 || targetid == MapId.ARAN_TUTO_3 || targetid == MapId.ARAN_TUTO_4 || targetid == MapId.ARAN_INTRO) {
|
||||
warp = true;
|
||||
}
|
||||
} else if (divi / 10 == 1020) { // Adventurer movie clip Intro
|
||||
@@ -138,7 +140,7 @@ public final class ChangeMapHandler extends AbstractPacketHandler {
|
||||
warp = true;
|
||||
}
|
||||
} else if (divi / 10 >= 980040 && divi / 10 <= 980045) {
|
||||
if (targetid == 980040000) {
|
||||
if (targetid == MapId.WITCH_TOWER_ENTRANCE) {
|
||||
warp = true;
|
||||
}
|
||||
}
|
||||
@@ -156,9 +158,9 @@ public final class ChangeMapHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (chr.getMapId() == 109040004) {
|
||||
if (chr.getMapId() == MapId.FITNESS_EVENT_LAST) {
|
||||
chr.getFitness().resetTimes();
|
||||
} else if (chr.getMapId() == 109030003 || chr.getMapId() == 109030103) {
|
||||
} else if (chr.getMapId() == MapId.OLA_EVENT_LAST_1 || chr.getMapId() == MapId.OLA_EVENT_LAST_2) {
|
||||
chr.getOla().resetTimes();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import client.Job;
|
||||
import constants.id.NpcId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import scripting.npc.NPCScriptManager;
|
||||
@@ -35,9 +36,9 @@ public class ClickGuideHandler extends AbstractPacketHandler {
|
||||
@Override
|
||||
public void handlePacket(InPacket p, Client c) {
|
||||
if (c.getPlayer().getJob().equals(Job.NOBLESSE)) {
|
||||
NPCScriptManager.getInstance().start(c, 1101008, null);
|
||||
NPCScriptManager.getInstance().start(c, NpcId.MIMO, null);
|
||||
} else {
|
||||
NPCScriptManager.getInstance().start(c, 1202000, null);
|
||||
NPCScriptManager.getInstance().start(c, NpcId.LILIN, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import client.Character;
|
||||
import client.*;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import constants.skills.*;
|
||||
import net.packet.InPacket;
|
||||
import server.StatEffect;
|
||||
@@ -62,7 +63,7 @@ public final class CloseRangeDamageHandler extends AbstractDealDamageHandler {
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (GameConstants.isDojo(chr.getMap().getId()) && attack.numAttacked > 0) {
|
||||
if (MapId.isDojo(chr.getMap().getId()) && attack.numAttacked > 0) {
|
||||
chr.setDojoEnergy(chr.getDojoEnergy() + YamlConfig.config.server.DOJO_ENERGY_ATK);
|
||||
c.sendPacket(PacketCreator.getEnergy("energy", chr.getDojoEnergy()));
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ package net.server.channel.handlers;
|
||||
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -35,7 +36,7 @@ public final class FaceExpressionHandler extends AbstractPacketHandler {
|
||||
|
||||
if (emote > 7) {
|
||||
int itemid = 5159992 + emote; // thanks RajanGrewal (Darter) for reporting unchecked emote itemid
|
||||
if (!ItemConstants.isFaceExpression(itemid) || chr.getInventory(ItemConstants.getInventoryType(itemid)).findById(itemid) == null) {
|
||||
if (!ItemId.isFaceExpression(itemid) || chr.getInventory(ItemConstants.getInventoryType(itemid)).findById(itemid) == null) {
|
||||
return;
|
||||
}
|
||||
} else if (emote < 1) {
|
||||
|
||||
@@ -26,6 +26,7 @@ import client.Client;
|
||||
import client.FamilyEntitlement;
|
||||
import client.FamilyEntry;
|
||||
import config.YamlConfig;
|
||||
import constants.id.MapId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.coordinator.world.InviteCoordinator;
|
||||
@@ -61,7 +62,7 @@ public final class FamilyUseHandler extends AbstractPacketHandler {
|
||||
if (targetMap != null) {
|
||||
if (type == FamilyEntitlement.FAMILY_REUINION) {
|
||||
if (!FieldLimit.CANNOTMIGRATE.check(ownMap.getFieldLimit()) && !FieldLimit.CANNOTVIPROCK.check(targetMap.getFieldLimit())
|
||||
&& (targetMap.getForcedReturnId() == 999999999 || targetMap.getId() < 100000000) && targetMap.getEventInstance() == null) {
|
||||
&& (targetMap.getForcedReturnId() == MapId.NONE || MapId.isMapleIsland(targetMap.getId())) && targetMap.getEventInstance() == null) {
|
||||
|
||||
c.getPlayer().changeMap(victim.getMap(), victim.getMap().getPortal(0));
|
||||
useEntitlement(entry, type);
|
||||
@@ -71,7 +72,7 @@ public final class FamilyUseHandler extends AbstractPacketHandler {
|
||||
}
|
||||
} else {
|
||||
if (!FieldLimit.CANNOTMIGRATE.check(targetMap.getFieldLimit()) && !FieldLimit.CANNOTVIPROCK.check(ownMap.getFieldLimit())
|
||||
&& (ownMap.getForcedReturnId() == 999999999 || ownMap.getId() < 100000000) && ownMap.getEventInstance() == null) {
|
||||
&& (ownMap.getForcedReturnId() == MapId.NONE || MapId.isMapleIsland(ownMap.getId())) && ownMap.getEventInstance() == null) {
|
||||
|
||||
if (InviteCoordinator.hasInvite(InviteType.FAMILY_SUMMON, victim.getId())) {
|
||||
c.sendPacket(PacketCreator.sendFamilyMessage(74, 0));
|
||||
|
||||
@@ -25,6 +25,7 @@ import client.Character;
|
||||
import client.Client;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.Server;
|
||||
@@ -216,7 +217,7 @@ public final class GuildOperationHandler extends AbstractPacketHandler {
|
||||
Server.getInstance().changeRank(mc.getGuildId(), cid, newRank);
|
||||
break;
|
||||
case 0x0f:
|
||||
if (mc.getGuildId() <= 0 || mc.getGuildRank() != 1 || mc.getMapId() != 200000301) {
|
||||
if (mc.getGuildId() <= 0 || mc.getGuildRank() != 1 || mc.getMapId() != MapId.GUILD_HQ) {
|
||||
System.out.println("[Hack] " + mc.getName() + " tried to change guild emblem without being the guild leader.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ package net.server.channel.handlers;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import constants.skills.Bishop;
|
||||
import constants.skills.Evan;
|
||||
import constants.skills.FPArchMage;
|
||||
@@ -57,7 +57,7 @@ public final class MagicDamageHandler extends AbstractDealDamageHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (GameConstants.isDojo(chr.getMap().getId()) && attack.numAttacked > 0) {
|
||||
if (MapId.isDojo(chr.getMap().getId()) && attack.numAttacked > 0) {
|
||||
chr.setDojoEnergy(chr.getDojoEnergy() + +YamlConfig.config.server.DOJO_ENERGY_ATK);
|
||||
c.sendPacket(PacketCreator.getEnergy("energy", chr.getDojoEnergy()));
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import constants.id.MobId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import scripting.event.EventInstanceManager;
|
||||
@@ -51,19 +52,19 @@ public final class MobDamageMobFriendlyHandler extends AbstractPacketHandler {
|
||||
int damage = Randomizer.nextInt(((monster.getMaxHp() / 13 + monster.getPADamage() * 10)) * 2 + 500) / 10; // Formula planned by Beng.
|
||||
|
||||
if (monster.getHp() - damage < 1) { // friendly dies
|
||||
if (monster.getId() == 9300102) {
|
||||
if (monster.getId() == MobId.WATCH_HOG) {
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "The Watch Hog has been injured by the aliens. Better luck next time..."));
|
||||
} else if (monster.getId() == 9300061) { //moon bunny
|
||||
} else if (monster.getId() == MobId.MOON_BUNNY) { //moon bunny
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "The Moon Bunny went home because he was sick."));
|
||||
} else if (monster.getId() == 9300093) { //tylus
|
||||
} else if (monster.getId() == MobId.TYLUS) { //tylus
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "Tylus has fallen by the overwhelming forces of the ambush."));
|
||||
} else if (monster.getId() == 9300137) { //juliet
|
||||
} else if (monster.getId() == MobId.JULIET) { //juliet
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "Juliet has fainted in the middle of the combat."));
|
||||
} else if (monster.getId() == 9300138) { //romeo
|
||||
} else if (monster.getId() == MobId.ROMEO) { //romeo
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "Romeo has fainted in the middle of the combat."));
|
||||
} else if (monster.getId() == 9400322 || monster.getId() == 9400327 || monster.getId() == 9400332) { //snowman
|
||||
} else if (monster.getId() == MobId.GIANT_SNOWMAN_LV1_EASY || monster.getId() == MobId.GIANT_SNOWMAN_LV1_MEDIUM || monster.getId() == MobId.GIANT_SNOWMAN_LV1_HARD) {
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "The Snowman has melted on the heat of the battle."));
|
||||
} else if (monster.getId() == 9300162) { //delli
|
||||
} else if (monster.getId() == MobId.DELLI) { //delli
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "Delli vanished after the ambush, sheets still laying on the ground..."));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import constants.id.MobId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import server.life.Monster;
|
||||
@@ -35,7 +36,7 @@ public final class MonsterBombHandler extends AbstractPacketHandler {
|
||||
if (!c.getPlayer().isAlive() || monster == null) {
|
||||
return;
|
||||
}
|
||||
if (monster.getId() == 8500003 || monster.getId() == 8500004) {
|
||||
if (monster.getId() == MobId.HIGH_DARKSTAR || monster.getId() == MobId.LOW_DARKSTAR) {
|
||||
monster.getMap().broadcastMessage(PacketCreator.killMonster(monster.getObjectId(), 4));
|
||||
c.getPlayer().getMap().removeMapObject(oid);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ package net.server.channel.handlers;
|
||||
import client.Client;
|
||||
import client.processor.npc.DueyProcessor;
|
||||
import config.YamlConfig;
|
||||
import constants.id.NpcId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import scripting.npc.NPCScriptManager;
|
||||
@@ -48,13 +49,12 @@ public final class NPCTalkHandler extends AbstractPacketHandler {
|
||||
|
||||
int oid = p.readInt();
|
||||
MapObject obj = c.getPlayer().getMap().getMapObject(oid);
|
||||
if (obj instanceof NPC) {
|
||||
NPC npc = (NPC) obj;
|
||||
if (YamlConfig.config.server.USE_DEBUG == true) {
|
||||
if (obj instanceof NPC npc) {
|
||||
if (YamlConfig.config.server.USE_DEBUG) {
|
||||
c.getPlayer().dropMessage(5, "Talking to NPC " + npc.getId());
|
||||
}
|
||||
|
||||
if (npc.getId() == 9010009) { //is duey
|
||||
if (npc.getId() == NpcId.DUEY) {
|
||||
DueyProcessor.dueySendTalk(c, false);
|
||||
} else {
|
||||
if (c.getCM() != null || c.getQM() != null) {
|
||||
@@ -63,7 +63,7 @@ public final class NPCTalkHandler extends AbstractPacketHandler {
|
||||
}
|
||||
|
||||
// Custom handling to reduce the amount of scripts needed.
|
||||
if (npc.getId() >= 9100100 && npc.getId() <= 9100200) {
|
||||
if (npc.getId() >= NpcId.GACHAPON_MIN && npc.getId() <= NpcId.GACHAPON_MAX) {
|
||||
NPCScriptManager.getInstance().start(c, npc.getId(), "gachapon", null);
|
||||
} else if (npc.getName().endsWith("Maple TV")) {
|
||||
NPCScriptManager.getInstance().start(c, npc.getId(), "mapleTV", null);
|
||||
@@ -88,7 +88,7 @@ public final class NPCTalkHandler extends AbstractPacketHandler {
|
||||
PlayerNPC pnpc = (PlayerNPC) obj;
|
||||
NPCScriptManager nsm = NPCScriptManager.getInstance();
|
||||
|
||||
if (pnpc.getScriptId() < 9977777 && !nsm.isNpcScriptAvailable(c, "" + pnpc.getScriptId())) {
|
||||
if (pnpc.getScriptId() < NpcId.CUSTOM_DEV && !nsm.isNpcScriptAvailable(c, "" + pnpc.getScriptId())) {
|
||||
nsm.start(c, pnpc.getScriptId(), "rank_user", null);
|
||||
} else {
|
||||
nsm.start(c, pnpc.getScriptId(), null);
|
||||
|
||||
@@ -23,6 +23,7 @@ import client.Character;
|
||||
import client.Client;
|
||||
import client.inventory.Item;
|
||||
import client.newyear.NewYearCardRecord;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -48,13 +49,13 @@ public final class NewYearCardHandler extends AbstractPacketHandler {
|
||||
byte reqMode = p.readByte(); //[00] -> NewYearReq (0 = Send)
|
||||
|
||||
if (reqMode == 0) { // card has been sent
|
||||
if (player.haveItem(2160101)) { // new year's card
|
||||
if (player.haveItem(ItemId.NEW_YEARS_CARD)) { // new year's card
|
||||
short slot = p.readShort(); //[00 2C] -> nPOS (Item Slot Pos)
|
||||
int itemid = p.readInt(); //[00 20 F5 E5] -> nItemID (item id)
|
||||
|
||||
int status = getValidNewYearCardStatus(itemid, player, slot);
|
||||
if (status == 0) {
|
||||
if (player.canHold(4300000, 1)) {
|
||||
if (player.canHold(ItemId.NEW_YEARS_CARD_SEND, 1)) {
|
||||
String receiver = p.readString(); //[04 00 54 65 73 74] -> sReceiverName (person to send to)
|
||||
|
||||
int receiverid = getReceiverId(receiver, c.getWorld());
|
||||
@@ -66,8 +67,8 @@ public final class NewYearCardHandler extends AbstractPacketHandler {
|
||||
NewYearCardRecord.saveNewYearCard(newyear);
|
||||
player.addNewYearRecord(newyear);
|
||||
|
||||
player.getAbstractPlayerInteraction().gainItem(2160101, (short) -1);
|
||||
player.getAbstractPlayerInteraction().gainItem(4300000, (short) 1);
|
||||
player.getAbstractPlayerInteraction().gainItem(ItemId.NEW_YEARS_CARD, (short) -1);
|
||||
player.getAbstractPlayerInteraction().gainItem(ItemId.NEW_YEARS_CARD_SEND, (short) 1);
|
||||
|
||||
Server.getInstance().setNewYearCard(newyear);
|
||||
newyear.startNewYearCardTask();
|
||||
@@ -94,11 +95,11 @@ public final class NewYearCardHandler extends AbstractPacketHandler {
|
||||
|
||||
if (newyear != null && newyear.getReceiverId() == player.getId() && !newyear.isReceiverCardReceived()) {
|
||||
if (!newyear.isSenderCardDiscarded()) {
|
||||
if (player.canHold(4301000, 1)) {
|
||||
if (player.canHold(ItemId.NEW_YEARS_CARD_RECEIVED, 1)) {
|
||||
newyear.stopNewYearCardTask();
|
||||
NewYearCardRecord.updateNewYearCard(newyear);
|
||||
|
||||
player.getAbstractPlayerInteraction().gainItem(4301000, (short) 1);
|
||||
player.getAbstractPlayerInteraction().gainItem(ItemId.NEW_YEARS_CARD_RECEIVED, (short) 1);
|
||||
if (!newyear.getMessage().isEmpty()) {
|
||||
player.dropMessage(6, "[New Year] " + newyear.getSenderName() + ": " + newyear.getMessage());
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.inventory.manipulator.KarmaManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -168,7 +169,7 @@ public final class PlayerInteractionHandler extends AbstractPacketHandler {
|
||||
} else if (type < 0) {
|
||||
type = 0;
|
||||
}
|
||||
if (!chr.haveItem(4080000 + type)) {
|
||||
if (!chr.haveItem(ItemId.MINI_GAME_BASE + type)) {
|
||||
chr.sendPacket(PacketCreator.getMiniRoomError(6));
|
||||
return;
|
||||
}
|
||||
@@ -202,7 +203,7 @@ public final class PlayerInteractionHandler extends AbstractPacketHandler {
|
||||
} else if (type < 0) {
|
||||
type = 0;
|
||||
}
|
||||
if (!chr.haveItem(4080100)) {
|
||||
if (!chr.haveItem(ItemId.MATCH_CARDS)) {
|
||||
chr.sendPacket(PacketCreator.getMiniRoomError(6));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.server.channel.handlers;
|
||||
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import constants.id.NpcId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import server.minigame.RockPaperScissor;
|
||||
@@ -21,7 +22,7 @@ public final class RPSActionHandler extends AbstractPacketHandler {
|
||||
|
||||
if (c.tryacquireClient()) {
|
||||
try {
|
||||
if (p.available() == 0 || !chr.getMap().containsNPC(9000019)) {
|
||||
if (p.available() == 0 || !chr.getMap().containsNPC(NpcId.RPS_ADMIN)) {
|
||||
if (rps != null) {
|
||||
rps.dispose(c);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ import client.inventory.Item;
|
||||
import client.inventory.WeaponType;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.skills.*;
|
||||
import net.packet.InPacket;
|
||||
@@ -64,7 +65,7 @@ public final class RangedAttackHandler extends AbstractDealDamageHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (GameConstants.isDojo(chr.getMap().getId()) && attack.numAttacked > 0) {
|
||||
if (MapId.isDojo(chr.getMap().getId()) && attack.numAttacked > 0) {
|
||||
chr.setDojoEnergy(chr.getDojoEnergy() + YamlConfig.config.server.DOJO_ENERGY_ATK);
|
||||
c.sendPacket(PacketCreator.getEnergy("energy", chr.getDojoEnergy()));
|
||||
}
|
||||
@@ -136,15 +137,15 @@ public final class RangedAttackHandler extends AbstractDealDamageHandler {
|
||||
boolean bow = ItemConstants.isArrowForBow(id);
|
||||
boolean cbow = ItemConstants.isArrowForCrossBow(id);
|
||||
if (item.getQuantity() >= bulletCount) { //Fixes the bug where you can't use your last arrow.
|
||||
if (type == WeaponType.CLAW && ItemConstants.isThrowingStar(id) && weapon.getItemId() != 1472063) {
|
||||
if (((id == 2070007 || id == 2070018) && chr.getLevel() < 70) || (id == 2070016 && chr.getLevel() < 50)) {
|
||||
if (type == WeaponType.CLAW && ItemConstants.isThrowingStar(id) && weapon.getItemId() != ItemId.MAGICAL_MITTEN) {
|
||||
if (((id == ItemId.HWABI_THROWING_STARS || id == ItemId.BALANCED_FURY) && chr.getLevel() < 70) || (id == ItemId.CRYSTAL_ILBI_THROWING_STARS && chr.getLevel() < 50)) {
|
||||
} else {
|
||||
projectile = id;
|
||||
break;
|
||||
}
|
||||
} else if ((type == WeaponType.GUN && ItemConstants.isBullet(id))) {
|
||||
if (id == 2331000 && id == 2332000) {
|
||||
if (chr.getLevel() > 69) {
|
||||
if (id == ItemId.BLAZE_CAPSULE || id == ItemId.GLAZE_CAPSULE) {
|
||||
if (chr.getLevel() >= 70) {
|
||||
projectile = id;
|
||||
break;
|
||||
}
|
||||
@@ -152,7 +153,7 @@ public final class RangedAttackHandler extends AbstractDealDamageHandler {
|
||||
projectile = id;
|
||||
break;
|
||||
}
|
||||
} else if ((type == WeaponType.BOW && bow) || (type == WeaponType.CROSSBOW && cbow) || (weapon.getItemId() == 1472063 && (bow || cbow))) {
|
||||
} else if ((type == WeaponType.BOW && bow) || (type == WeaponType.CROSSBOW && cbow) || (weapon.getItemId() == ItemId.MAGICAL_MITTEN && (bow || cbow))) {
|
||||
projectile = id;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import client.autoban.AutobanFactory;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.NpcId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -36,7 +38,7 @@ public final class RemoteGachaponHandler extends AbstractPacketHandler {
|
||||
public final void handlePacket(InPacket p, Client c) {
|
||||
int ticket = p.readInt();
|
||||
int gacha = p.readInt();
|
||||
if (ticket != 5451000) {
|
||||
if (ticket != ItemId.REMOTE_GACHAPON_TICKET) {
|
||||
AutobanFactory.GENERAL.alert(c.getPlayer(), " Tried to use RemoteGachaponHandler with item id: " + ticket);
|
||||
c.disconnect(false, false);
|
||||
return;
|
||||
@@ -49,11 +51,11 @@ public final class RemoteGachaponHandler extends AbstractPacketHandler {
|
||||
c.disconnect(false, false);
|
||||
return;
|
||||
}
|
||||
int npcId = 9100100;
|
||||
int npcId = NpcId.GACHAPON_HENESYS;
|
||||
if (gacha != 8 && gacha != 9) {
|
||||
npcId += gacha;
|
||||
} else {
|
||||
npcId = gacha == 8 ? 9100109 : 9100117;
|
||||
npcId = gacha == 8 ? NpcId.GACHAPON_NLC : NpcId.GACHAPON_NAUTILUS;
|
||||
}
|
||||
NPCScriptManager.getInstance().start(c, npcId, "gachaponRemote", null);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.processor.npc.DueyProcessor;
|
||||
import constants.id.ItemId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.channel.Channel;
|
||||
@@ -51,12 +52,19 @@ import java.sql.SQLException;
|
||||
* @author Drago (Dragohe4rt) - on Wishlist
|
||||
*/
|
||||
public final class RingActionHandler extends AbstractPacketHandler {
|
||||
private static int getBoxId(int useItemId) {
|
||||
return useItemId == 2240000 ? 4031357 : (useItemId == 2240001 ? 4031359 : (useItemId == 2240002 ? 4031361 : (useItemId == 2240003 ? 4031363 : (1112300 + (useItemId - 2240004)))));
|
||||
|
||||
private static int getEngagementBoxId(int useItemId) {
|
||||
return switch (useItemId) {
|
||||
case ItemId.ENGAGEMENT_BOX_MOONSTONE -> ItemId.EMPTY_ENGAGEMENT_BOX_MOONSTONE;
|
||||
case ItemId.ENGAGEMENT_BOX_STAR -> ItemId.EMPTY_ENGAGEMENT_BOX_STAR;
|
||||
case ItemId.ENGAGEMENT_BOX_GOLDEN -> ItemId.EMPTY_ENGAGEMENT_BOX_GOLDEN;
|
||||
case ItemId.ENGAGEMENT_BOX_SILVER -> ItemId.EMPTY_ENGAGEMENT_BOX_SILVER;
|
||||
default -> ItemId.CARAT_RING_BASE + (useItemId - ItemId.CARAT_RING_BOX_BASE);
|
||||
};
|
||||
}
|
||||
|
||||
public static void sendEngageProposal(final Client c, final String name, final int itemid) {
|
||||
final int newBoxId = getBoxId(itemid);
|
||||
final int newBoxId = getEngagementBoxId(itemid);
|
||||
final Character target = c.getChannelServer().getPlayerStorage().getCharacterByName(name);
|
||||
final Character source = c.getPlayer();
|
||||
|
||||
@@ -93,7 +101,7 @@ public final class RingActionHandler extends AbstractPacketHandler {
|
||||
source.dropMessage(1, "Make sure your partner is on the same map!");
|
||||
source.sendPacket(WeddingPackets.OnMarriageResult((byte) 0));
|
||||
return;
|
||||
} else if (!source.haveItem(itemid) || itemid < 2240000 || itemid > 2240015) {
|
||||
} else if (!source.haveItem(itemid) || itemid < ItemId.ENGAGEMENT_BOX_MIN || itemid > ItemId.ENGAGEMENT_BOX_MAX) {
|
||||
source.sendPacket(WeddingPackets.OnMarriageResult((byte) 0));
|
||||
return;
|
||||
} else if (target.isMarried()) {
|
||||
@@ -328,7 +336,7 @@ public final class RingActionHandler extends AbstractPacketHandler {
|
||||
}
|
||||
|
||||
if (accepted) {
|
||||
final int newItemId = getBoxId(itemid);
|
||||
final int newItemId = getEngagementBoxId(itemid);
|
||||
if (!InventoryManipulator.checkSpace(c, newItemId, 1, "") || !InventoryManipulator.checkSpace(source.getClient(), newItemId, 1, "")) {
|
||||
target.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
@@ -380,7 +388,7 @@ public final class RingActionHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((itemId != 4031377 && itemId != 4031395) || !c.getPlayer().haveItem(itemId)) {
|
||||
if ((itemId != ItemId.INVITATION_CHAPEL && itemId != ItemId.INVITATION_CATHEDRAL) || !c.getPlayer().haveItem(itemId)) {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
@@ -399,7 +407,7 @@ public final class RingActionHandler extends AbstractPacketHandler {
|
||||
if (registration != null) {
|
||||
if (wserv.addMarriageGuest(marriageId, guest)) {
|
||||
boolean cathedral = registration.getLeft();
|
||||
int newItemId = cathedral ? 4031407 : 4031406;
|
||||
int newItemId = cathedral ? ItemId.RECEIVED_INVITATION_CATHEDRAL : ItemId.RECEIVED_INVITATION_CHAPEL;
|
||||
|
||||
Channel cserv = c.getChannelServer();
|
||||
int resStatus = cserv.getWeddingReservationStatus(marriageId, cathedral);
|
||||
@@ -443,7 +451,7 @@ public final class RingActionHandler extends AbstractPacketHandler {
|
||||
slot = (byte) p.readInt();
|
||||
int invitationid = p.readInt();
|
||||
|
||||
if (invitationid == 4031406 || invitationid == 4031407) {
|
||||
if (invitationid == ItemId.RECEIVED_INVITATION_CHAPEL || invitationid == ItemId.RECEIVED_INVITATION_CATHEDRAL) {
|
||||
Item item = c.getPlayer().getInventory(InventoryType.ETC).getItem(slot);
|
||||
if (item == null || item.getItemId() != invitationid) {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
@@ -451,7 +459,7 @@ public final class RingActionHandler extends AbstractPacketHandler {
|
||||
}
|
||||
|
||||
// collision case: most soon-to-come wedding will show up
|
||||
Pair<Integer, Integer> coupleId = c.getWorldServer().getWeddingCoupleForGuest(c.getPlayer().getId(), invitationid == 4031407);
|
||||
Pair<Integer, Integer> coupleId = c.getWorldServer().getWeddingCoupleForGuest(c.getPlayer().getId(), invitationid == ItemId.RECEIVED_INVITATION_CATHEDRAL);
|
||||
if (coupleId != null) {
|
||||
int groomId = coupleId.getLeft(), brideId = coupleId.getRight();
|
||||
c.sendPacket(WeddingPackets.sendWeddingInvitation(Character.getNameById(groomId), Character.getNameById(brideId)));
|
||||
|
||||
@@ -28,6 +28,7 @@ import client.SkillFactory;
|
||||
import client.inventory.*;
|
||||
import client.inventory.Equip.ScrollResult;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -89,7 +90,7 @@ public final class ScrollHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
if (whiteScroll) {
|
||||
wscroll = useInventory.findById(2340000);
|
||||
wscroll = useInventory.findById(ItemId.WHITE_SCROLL);
|
||||
if (wscroll == null) {
|
||||
whiteScroll = false;
|
||||
}
|
||||
@@ -138,7 +139,7 @@ public final class ScrollHandler extends AbstractPacketHandler {
|
||||
|
||||
final List<ModifyInventory> mods = new ArrayList<>();
|
||||
if (scrollSuccess == Equip.ScrollResult.CURSE) {
|
||||
if (!ItemConstants.isWeddingRing(toScroll.getItemId())) {
|
||||
if (!ItemId.isWeddingRing(toScroll.getItemId())) {
|
||||
mods.add(new ModifyInventory(3, toScroll));
|
||||
if (dst < 0) {
|
||||
Inventory inv = chr.getInventory(InventoryType.EQUIPPED);
|
||||
@@ -195,7 +196,8 @@ public final class ScrollHandler extends AbstractPacketHandler {
|
||||
|
||||
switch (sid) {
|
||||
case 20492: //scroll for accessory (pendant, belt, ring)
|
||||
return canScroll(2041100, itemid) || canScroll(2041200, itemid) || canScroll(2041300, itemid);
|
||||
return canScroll(ItemId.RING_STR_100_SCROLL, itemid) || canScroll(ItemId.DRAGON_STONE_SCROLL, itemid) ||
|
||||
canScroll(ItemId.BELT_STR_100_SCROLL, itemid);
|
||||
|
||||
default:
|
||||
return (scrollid / 100) % 100 == (itemid / 10000) % 100;
|
||||
|
||||
@@ -30,7 +30,7 @@ import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.status.MonsterStatus;
|
||||
import client.status.MonsterStatusEffect;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.skills.Aran;
|
||||
import net.AbstractPacketHandler;
|
||||
@@ -189,7 +189,7 @@ public final class TakeDamageHandler extends AbstractPacketHandler {
|
||||
}
|
||||
|
||||
//in dojo player cannot use pot, so deadly attacks should be turned off as well
|
||||
if (is_deadly && GameConstants.isDojo(chr.getMap().getId()) && !YamlConfig.config.server.USE_DEADLY_DOJO) {
|
||||
if (is_deadly && MapId.isDojo(chr.getMap().getId()) && !YamlConfig.config.server.USE_DEADLY_DOJO) {
|
||||
damage = 0;
|
||||
mpattack = 0;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ public final class TakeDamageHandler extends AbstractPacketHandler {
|
||||
} else {
|
||||
map.broadcastGMMessage(chr, PacketCreator.damagePlayer(damagefrom, monsteridfrom, chr.getId(), damage, fake, direction, is_pgmr, pgmr, is_pg, oid, pos_x, pos_y), false);
|
||||
}
|
||||
if (GameConstants.isDojo(map.getId())) {
|
||||
if (MapId.isDojo(map.getId())) {
|
||||
chr.setDojoEnergy(chr.getDojoEnergy() + YamlConfig.config.server.DOJO_ENERGY_DMG);
|
||||
c.sendPacket(PacketCreator.getEnergy("energy", chr.getDojoEnergy()));
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@ import client.processor.stat.AssignAPProcessor;
|
||||
import client.processor.stat.AssignSPProcessor;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -105,7 +107,7 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
||||
int mapId = p.readInt();
|
||||
if (itemId / 1000 >= 5041 || mapId / 100000000 == player.getMapId() / 100000000) { //check vip or same continent
|
||||
MapleMap targetMap = c.getChannelServer().getMapFactory().getMap(mapId);
|
||||
if (!FieldLimit.CANNOTVIPROCK.check(targetMap.getFieldLimit()) && (targetMap.getForcedReturnId() == 999999999 || mapId < 100000000)) {
|
||||
if (!FieldLimit.CANNOTVIPROCK.check(targetMap.getFieldLimit()) && (targetMap.getForcedReturnId() == MapId.NONE || MapId.isMapleIsland(mapId))) {
|
||||
player.forceChangeMap(targetMap, targetMap.getRandomPlayerSpawnpoint());
|
||||
success = true;
|
||||
} else {
|
||||
@@ -120,7 +122,7 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
||||
|
||||
if (victim != null) {
|
||||
MapleMap targetMap = victim.getMap();
|
||||
if (!FieldLimit.CANNOTVIPROCK.check(targetMap.getFieldLimit()) && (targetMap.getForcedReturnId() == 999999999 || targetMap.getId() < 100000000)) {
|
||||
if (!FieldLimit.CANNOTVIPROCK.check(targetMap.getFieldLimit()) && (targetMap.getForcedReturnId() == MapId.NONE || MapId.isMapleIsland(targetMap.getId()))) {
|
||||
if (!victim.isGM() || victim.gmLevel() <= player.gmLevel()) { // thanks Yoboes for noticing non-GM's being unreachable through rocks
|
||||
player.forceChangeMap(targetMap, targetMap.findClosestPlayerSpawnpoint(victim.getPosition()));
|
||||
success = true;
|
||||
@@ -145,7 +147,7 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (itemId > 5050000) {
|
||||
if (itemId > ItemId.AP_RESET) {
|
||||
int SPTo = p.readInt();
|
||||
if (!AssignSPProcessor.canSPAssign(c, SPTo)) { // exploit found thanks to Arnah
|
||||
return;
|
||||
@@ -452,15 +454,15 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
||||
} else if (itemType == 540) {
|
||||
p.readByte();
|
||||
p.readInt();
|
||||
if (itemId == 5400000) { //name change
|
||||
if (itemId == ItemId.NAME_CHANGE) {
|
||||
c.sendPacket(PacketCreator.showNameChangeCancel(player.cancelPendingNameChange()));
|
||||
} else if (itemId == 5401000) { //world transfer
|
||||
} else if (itemId == ItemId.WORLD_TRANSFER) {
|
||||
c.sendPacket(PacketCreator.showWorldTransferCancel(player.cancelPendingWorldTranfer()));
|
||||
}
|
||||
remove(c, position, itemId);
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
} else if (itemType == 543) {
|
||||
if (itemId == 5432000 && !c.gainCharacterSlot()) {
|
||||
if (itemId == ItemId.MAPLE_LIFE_B && !c.gainCharacterSlot()) {
|
||||
player.dropMessage(1, "You have already used up all 12 extra character slots.");
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
@@ -527,7 +529,7 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
||||
int itemSlot = p.readInt();
|
||||
p.readInt();
|
||||
final Equip equip = (Equip) player.getInventory(InventoryType.EQUIP).getItem((short) itemSlot);
|
||||
if (equip.getVicious() >= 2 || player.getInventory(InventoryType.CASH).findById(5570000) == null) {
|
||||
if (equip.getVicious() >= 2 || player.getInventory(InventoryType.CASH).findById(ItemId.VICIOUS_HAMMER) == null) {
|
||||
return;
|
||||
}
|
||||
equip.setVicious(equip.getVicious() + 1);
|
||||
|
||||
@@ -26,6 +26,8 @@ import client.Client;
|
||||
import client.autoban.AutobanManager;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MobId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -56,23 +58,23 @@ public final class UseCatchItemHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
switch (itemId) {
|
||||
case 2270000:
|
||||
if (mob.getId() == 9300101) {
|
||||
case ItemId.PHEROMONE_PERFUME:
|
||||
if (mob.getId() == MobId.TAMABLE_HOG) {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 1902000, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.HOG, (short) 1, "", -1);
|
||||
}
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
break;
|
||||
case 2270001:
|
||||
if (mob.getId() == 9500197) {
|
||||
case ItemId.POUCH:
|
||||
if (mob.getId() == MobId.GHOST) {
|
||||
if ((abm.getLastSpam(10) + 1000) < currentServerTime()) {
|
||||
if (mob.getHp() < ((mob.getMaxHp() / 10) * 4)) {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 4031830, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.GHOST_SACK, (short) 1, "", -1);
|
||||
} else {
|
||||
abm.spam(10);
|
||||
c.sendPacket(PacketCreator.catchMessage(0));
|
||||
@@ -81,16 +83,16 @@ public final class UseCatchItemHandler extends AbstractPacketHandler {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
}
|
||||
break;
|
||||
case 2270002:
|
||||
if (mob.getId() == 9300157) {
|
||||
case ItemId.ARPQ_ELEMENT_ROCK:
|
||||
if (mob.getId() == MobId.ARPQ_SCORPION) {
|
||||
if ((abm.getLastSpam(10) + 800) < currentServerTime()) {
|
||||
if (mob.getHp() < ((mob.getMaxHp() / 10) * 4)) {
|
||||
if (chr.canHold(4031868, 1)) {
|
||||
if (chr.canHold(ItemId.ARPQ_SPIRIT_JEWEL, 1)) {
|
||||
if (Math.random() < 0.5) { // 50% chance
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 4031868, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.ARPQ_SPIRIT_JEWEL, (short) 1, "", -1);
|
||||
} else {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 0));
|
||||
}
|
||||
@@ -106,79 +108,79 @@ public final class UseCatchItemHandler extends AbstractPacketHandler {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
}
|
||||
break;
|
||||
case 2270003:
|
||||
if (mob.getId() == 9500320) {
|
||||
case ItemId.MAGIC_CANE:
|
||||
if (mob.getId() == MobId.LOST_RUDOLPH) {
|
||||
if (mob.getHp() < ((mob.getMaxHp() / 10) * 4)) {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 4031887, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.TAMED_RUDOLPH, (short) 1, "", -1);
|
||||
} else {
|
||||
c.sendPacket(PacketCreator.catchMessage(0));
|
||||
}
|
||||
}
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
break;
|
||||
case 2270005:
|
||||
if (mob.getId() == 9300187) {
|
||||
case ItemId.TRANSPARENT_MARBLE_1:
|
||||
if (mob.getId() == MobId.KING_SLIME_DOJO) {
|
||||
if (mob.getHp() < ((mob.getMaxHp() / 10) * 3)) {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 2109001, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.MONSTER_MARBLE_1, (short) 1, "", -1);
|
||||
} else {
|
||||
c.sendPacket(PacketCreator.catchMessage(0));
|
||||
}
|
||||
}
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
break;
|
||||
case 2270006:
|
||||
if (mob.getId() == 9300189) {
|
||||
case ItemId.TRANSPARENT_MARBLE_2:
|
||||
if (mob.getId() == MobId.FAUST_DOJO) {
|
||||
if (mob.getHp() < ((mob.getMaxHp() / 10) * 3)) {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 2109002, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.MONSTER_MARBLE_2, (short) 1, "", -1);
|
||||
} else {
|
||||
c.sendPacket(PacketCreator.catchMessage(0));
|
||||
}
|
||||
}
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
break;
|
||||
case 2270007:
|
||||
if (mob.getId() == 9300191) {
|
||||
case ItemId.TRANSPARENT_MARBLE_3:
|
||||
if (mob.getId() == MobId.MUSHMOM_DOJO) {
|
||||
if (mob.getHp() < ((mob.getMaxHp() / 10) * 3)) {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 2109003, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.MONSTER_MARBLE_3, (short) 1, "", -1);
|
||||
} else {
|
||||
c.sendPacket(PacketCreator.catchMessage(0));
|
||||
}
|
||||
}
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
break;
|
||||
case 2270004:
|
||||
if (mob.getId() == 9300175) {
|
||||
case ItemId.EPQ_PURIFICATION_MARBLE:
|
||||
if (mob.getId() == MobId.POISON_FLOWER) {
|
||||
if (mob.getHp() < ((mob.getMaxHp() / 10) * 4)) {
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 4001169, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.EPQ_MONSTER_MARBLE, (short) 1, "", -1);
|
||||
} else {
|
||||
c.sendPacket(PacketCreator.catchMessage(0));
|
||||
}
|
||||
}
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
break;
|
||||
case 2270008:
|
||||
if (mob.getId() == 9500336) {
|
||||
case ItemId.FISH_NET:
|
||||
if (mob.getId() == MobId.P_JUNIOR) {
|
||||
if ((abm.getLastSpam(10) + 3000) < currentServerTime()) {
|
||||
abm.spam(10);
|
||||
chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 1));
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, 2022323, (short) 1, "", -1);
|
||||
InventoryManipulator.addById(c, ItemId.FISH_NET_WITH_A_CATCH, (short) 1, "", -1);
|
||||
} else {
|
||||
chr.message("You cannot use the Fishing Net yet.");
|
||||
}
|
||||
@@ -202,7 +204,7 @@ public final class UseCatchItemHandler extends AbstractPacketHandler {
|
||||
mob.getMap().killMonster(mob, null, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true);
|
||||
InventoryManipulator.addById(c, itemGanho, (short) 1, "", -1);
|
||||
} else if (mob.getId() != 9500336) {
|
||||
} else if (mob.getId() != MobId.P_JUNIOR) {
|
||||
if (mobHp != 0) {
|
||||
abm.spam(10);
|
||||
c.sendPacket(PacketCreator.catchMessage(0));
|
||||
|
||||
@@ -23,7 +23,7 @@ package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import client.inventory.InventoryType;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.id.ItemId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
|
||||
@@ -33,7 +33,7 @@ public final class UseChairHandler extends AbstractPacketHandler {
|
||||
int itemId = p.readInt();
|
||||
|
||||
// thanks Darter (YungMoozi) for reporting unchecked chair item
|
||||
if (!ItemConstants.isChair(itemId) || c.getPlayer().getInventory(InventoryType.SETUP).findById(itemId) == null) {
|
||||
if (!ItemId.isChair(itemId) || c.getPlayer().getInventory(InventoryType.SETUP).findById(itemId) == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ package net.server.channel.handlers;
|
||||
import client.Client;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import constants.id.ItemId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import tools.PacketCreator;
|
||||
@@ -33,7 +34,7 @@ public final class UseItemEffectHandler extends AbstractPacketHandler {
|
||||
public final void handlePacket(InPacket p, Client c) {
|
||||
Item toUse;
|
||||
int itemId = p.readInt();
|
||||
if (itemId == 4290001 || itemId == 4290000) {
|
||||
if (itemId == ItemId.BUMMER_EFFECT || itemId == ItemId.GOLDEN_CHICKEN_EFFECT) {
|
||||
toUse = c.getPlayer().getInventory(InventoryType.ETC).findById(itemId);
|
||||
} else {
|
||||
toUse = c.getPlayer().getInventory(InventoryType.CASH).findById(itemId);
|
||||
|
||||
@@ -28,6 +28,7 @@ import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -53,20 +54,20 @@ public final class UseItemHandler extends AbstractPacketHandler {
|
||||
int itemId = p.readInt();
|
||||
Item toUse = chr.getInventory(InventoryType.USE).getItem(slot);
|
||||
if (toUse != null && toUse.getQuantity() > 0 && toUse.getItemId() == itemId) {
|
||||
if (itemId == 2050004) {
|
||||
if (itemId == ItemId.ALL_CURE_POTION) {
|
||||
chr.dispelDebuffs();
|
||||
remove(c, slot);
|
||||
return;
|
||||
} else if (itemId == 2050001) {
|
||||
} else if (itemId == ItemId.EYEDROP) {
|
||||
chr.dispelDebuff(Disease.DARKNESS);
|
||||
remove(c, slot);
|
||||
return;
|
||||
} else if (itemId == 2050002) {
|
||||
} else if (itemId == ItemId.TONIC) {
|
||||
chr.dispelDebuff(Disease.WEAKEN);
|
||||
chr.dispelDebuff(Disease.SLOW);
|
||||
remove(c, slot);
|
||||
return;
|
||||
} else if (itemId == 2050003) {
|
||||
} else if (itemId == ItemId.HOLY_WATER) {
|
||||
chr.dispelDebuff(Disease.SEAL);
|
||||
chr.dispelDebuff(Disease.CURSE);
|
||||
remove(c, slot);
|
||||
@@ -95,7 +96,7 @@ public final class UseItemHandler extends AbstractPacketHandler {
|
||||
|
||||
remove(c, slot);
|
||||
|
||||
if (toUse.getItemId() != 2022153) {
|
||||
if (toUse.getItemId() != ItemId.HAPPY_BIRTHDAY) {
|
||||
ii.getItemEffect(toUse.getItemId()).applyTo(chr);
|
||||
} else {
|
||||
StatEffect mse = ii.getItemEffect(toUse.getItemId());
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import tools.PacketCreator;
|
||||
@@ -43,8 +43,8 @@ public final class UseOwlOfMinervaHandler extends AbstractPacketHandler {
|
||||
|
||||
if (owlSearched.size() < 5) {
|
||||
owlLeaderboards = new LinkedList<>();
|
||||
for (int i : GameConstants.OWL_DATA) {
|
||||
owlLeaderboards.add(i);
|
||||
for (int itemId : ItemId.getOwlItems()) {
|
||||
owlLeaderboards.add(itemId);
|
||||
}
|
||||
} else {
|
||||
// descending order
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import constants.id.NpcId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
|
||||
@@ -29,6 +30,6 @@ public final class UseWaterOfLifeHandler extends AbstractPacketHandler {
|
||||
|
||||
@Override
|
||||
public final void handlePacket(InPacket p, Client c) {
|
||||
c.getAbstractPlayerInteraction().openNpc(1032102, "waterOfLife");
|
||||
c.getAbstractPlayerInteraction().openNpc(NpcId.MAR_THE_FAIRY, "waterOfLife");
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ package net.server.coordinator.matchchecker.listener;
|
||||
import client.Character;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import net.packet.Packet;
|
||||
import net.server.Server;
|
||||
import net.server.coordinator.matchchecker.AbstractMatchCheckerListener;
|
||||
@@ -92,7 +93,7 @@ public class MatchCheckerGuildCreation implements MatchCheckerListenerRecipe {
|
||||
broadcastGuildCreationDismiss(matchPlayers);
|
||||
return;
|
||||
}
|
||||
if (leader.getMapId() != 200000301) {
|
||||
if (leader.getMapId() != MapId.GUILD_HQ) {
|
||||
leader.dropMessage(1, "You cannot establish the creation of a new Guild outside of the Guild Headquarters.");
|
||||
broadcastGuildCreationDismiss(matchPlayers);
|
||||
return;
|
||||
|
||||
@@ -22,6 +22,7 @@ package net.server.coordinator.partysearch;
|
||||
import client.Character;
|
||||
import client.Job;
|
||||
import config.YamlConfig;
|
||||
import constants.id.MapId;
|
||||
import net.server.audit.locks.MonitoredLockType;
|
||||
import net.server.audit.locks.MonitoredReadLock;
|
||||
import net.server.audit.locks.MonitoredReentrantReadWriteLock;
|
||||
@@ -76,9 +77,9 @@ public class PartySearchCoordinator {
|
||||
mapLinks.put(mapid, neighborMaps);
|
||||
|
||||
for (Data neighbordata : mapdata.getChildren()) {
|
||||
int neighborid = DataTool.getInt(neighbordata, 999999999);
|
||||
int neighborid = DataTool.getInt(neighbordata, MapId.NONE);
|
||||
|
||||
if (neighborid != 999999999) {
|
||||
if (neighborid != MapId.NONE) {
|
||||
neighborMaps.add(neighborid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ package net.server.coordinator.session;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import config.YamlConfig;
|
||||
import constants.id.NpcId;
|
||||
import net.server.Server;
|
||||
import net.server.coordinator.login.LoginStorage;
|
||||
import org.slf4j.Logger;
|
||||
@@ -401,6 +402,6 @@ public class SessionCoordinator {
|
||||
}
|
||||
}
|
||||
|
||||
c.getAbstractPlayerInteraction().npcTalk(2140000, str);
|
||||
c.getAbstractPlayerInteraction().npcTalk(NpcId.TEMPLE_KEEPER, str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import client.Client;
|
||||
import client.creator.novice.BeginnerCreator;
|
||||
import client.creator.novice.LegendCreator;
|
||||
import client.creator.novice.NoblesseCreator;
|
||||
import constants.id.ItemId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import tools.FilePrinter;
|
||||
@@ -36,12 +37,19 @@ import java.util.Set;
|
||||
|
||||
public final class CreateCharHandler extends AbstractPacketHandler {
|
||||
|
||||
private final static Set<Integer> IDs = new HashSet<>(Arrays.asList(1302000, 1312004, 1322005, 1442079,// weapons
|
||||
1040002, 1040006, 1040010, 1041002, 1041006, 1041010, 1041011, 1042167,// bottom
|
||||
1060002, 1060006, 1061002, 1061008, 1062115, // top
|
||||
1072001, 1072005, 1072037, 1072038, 1072383,// shoes
|
||||
30000, 30010, 30020, 30030, 31000, 31040, 31050,// hair
|
||||
20000, 20001, 20002, 21000, 21001, 21002, 21201, 20401, 20402, 21700, 20100 //face
|
||||
private final static Set<Integer> IDs = new HashSet<>(Arrays.asList(
|
||||
ItemId.SWORD, ItemId.HAND_AXE, ItemId.WOODEN_CLUB, ItemId.BASIC_POLEARM,// weapons
|
||||
ItemId.WHITE_UNDERSHIRT, ItemId.UNDERSHIRT, ItemId.GREY_TSHIRT, ItemId.WHITE_TUBETOP, ItemId.YELLOW_TSHIRT,
|
||||
ItemId.GREEN_TSHIRT, ItemId.RED_STRIPED_TOP, ItemId.SIMPLE_WARRIOR_TOP,// bottom
|
||||
ItemId.BLUE_JEAN_SHORTS, ItemId.BROWN_COTTON_SHORTS, ItemId.RED_MINISKIRT, ItemId.INDIGO_MINISKIRT,
|
||||
ItemId.SIMPLE_WARRIOR_PANTS, // top
|
||||
ItemId.RED_RUBBER_BOOTS, ItemId.LEATHER_SANDALS, ItemId.YELLOW_RUBBER_BOOTS, ItemId.BLUE_RUBBER_BOOTS,
|
||||
ItemId.AVERAGE_MUSASHI_SHOES,// shoes
|
||||
ItemId.BLACK_TOBEN, ItemId.ZETA, ItemId.BLACK_REBEL, ItemId.BLACK_BUZZ, ItemId.BLACK_SAMMY,
|
||||
ItemId.BLACK_EDGY, ItemId.BLACK_CONNIE,// hair
|
||||
ItemId.MOTIVATED_LOOK_M, ItemId.PERPLEXED_STARE, ItemId.LEISURE_LOOK_M, ItemId.MOTIVATED_LOOK_F,
|
||||
ItemId.FEARFUL_STARE_M, ItemId.LEISURE_LOOK_F, ItemId.FEARFUL_STARE_F, ItemId.PERPLEXED_STARE_HAZEL,
|
||||
ItemId.LEISURE_LOOK_HAZEL, ItemId.MOTIVATED_LOOK_AMETHYST, ItemId.MOTIVATED_LOOK_BLUE //face
|
||||
//#NeverTrustStevenCode
|
||||
));
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ import client.inventory.*;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.id.NpcId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.server.Server;
|
||||
import net.server.guild.Guild;
|
||||
@@ -443,7 +446,7 @@ public class AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public boolean forceStartQuest(int id) {
|
||||
return forceStartQuest(id, 9010000);
|
||||
return forceStartQuest(id, NpcId.MAPLE_ADMINISTRATOR);
|
||||
}
|
||||
|
||||
public boolean forceStartQuest(int id, int npc) {
|
||||
@@ -451,7 +454,7 @@ public class AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public boolean forceCompleteQuest(int id) {
|
||||
return forceCompleteQuest(id, 9010000);
|
||||
return forceCompleteQuest(id, NpcId.MAPLE_ADMINISTRATOR);
|
||||
}
|
||||
|
||||
public boolean forceCompleteQuest(int id, int npc) {
|
||||
@@ -467,11 +470,11 @@ public class AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public boolean startQuest(int id) {
|
||||
return startQuest(id, 9010000);
|
||||
return startQuest(id, NpcId.MAPLE_ADMINISTRATOR);
|
||||
}
|
||||
|
||||
public boolean completeQuest(int id) {
|
||||
return completeQuest(id, 9010000);
|
||||
return completeQuest(id, NpcId.MAPLE_ADMINISTRATOR);
|
||||
}
|
||||
|
||||
public boolean startQuest(short id, int npc) {
|
||||
@@ -611,7 +614,7 @@ public class AbstractPlayerInteraction {
|
||||
if (!(c.getPlayer().isGM() && YamlConfig.config.server.USE_PERFECT_GM_SCROLL)) {
|
||||
eqp.setUpgradeSlots((byte) (eqp.getUpgradeSlots() + 1));
|
||||
}
|
||||
item = ItemInformationProvider.getInstance().scrollEquipWithId(item, 2049100, true, 2049100, c.getPlayer().isGM());
|
||||
item = ItemInformationProvider.getInstance().scrollEquipWithId(item, ItemId.CHAOS_SCROll_60, true, ItemId.CHAOS_SCROll_60, c.getPlayer().isGM());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -678,27 +681,15 @@ public class AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public void displayAranIntro() {
|
||||
String intro = "";
|
||||
switch (c.getPlayer().getMapId()) {
|
||||
case 914090010:
|
||||
intro = "Effect/Direction1.img/aranTutorial/Scene0";
|
||||
break;
|
||||
case 914090011:
|
||||
intro = "Effect/Direction1.img/aranTutorial/Scene1" + (c.getPlayer().getGender() == 0 ? "0" : "1");
|
||||
break;
|
||||
case 914090012:
|
||||
intro = "Effect/Direction1.img/aranTutorial/Scene2" + (c.getPlayer().getGender() == 0 ? "0" : "1");
|
||||
break;
|
||||
case 914090013:
|
||||
intro = "Effect/Direction1.img/aranTutorial/Scene3";
|
||||
break;
|
||||
case 914090100:
|
||||
intro = "Effect/Direction1.img/aranTutorial/HandedPoleArm" + (c.getPlayer().getGender() == 0 ? "0" : "1");
|
||||
break;
|
||||
case 914090200:
|
||||
intro = "Effect/Direction1.img/aranTutorial/Maha";
|
||||
break;
|
||||
}
|
||||
String intro = switch (c.getPlayer().getMapId()) {
|
||||
case MapId.ARAN_TUTO_1 -> "Effect/Direction1.img/aranTutorial/Scene0";
|
||||
case MapId.ARAN_TUTO_2 -> "Effect/Direction1.img/aranTutorial/Scene1" + (c.getPlayer().getGender() == 0 ? "0" : "1");
|
||||
case MapId.ARAN_TUTO_3 -> "Effect/Direction1.img/aranTutorial/Scene2" + (c.getPlayer().getGender() == 0 ? "0" : "1");
|
||||
case MapId.ARAN_TUTO_4 -> "Effect/Direction1.img/aranTutorial/Scene3";
|
||||
case MapId.ARAN_POLEARM -> "Effect/Direction1.img/aranTutorial/HandedPoleArm" + (c.getPlayer().getGender() == 0 ? "0" : "1");
|
||||
case MapId.ARAN_MAHA -> "Effect/Direction1.img/aranTutorial/Maha";
|
||||
default -> "";
|
||||
};
|
||||
showIntro(intro);
|
||||
}
|
||||
|
||||
@@ -763,7 +754,8 @@ public class AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public void removeHPQItems() {
|
||||
int[] items = {4001095, 4001096, 4001097, 4001098, 4001099, 4001100, 4001101};
|
||||
int[] items = {ItemId.GREEN_PRIMROSE_SEED, ItemId.PURPLE_PRIMROSE_SEED, ItemId.PINK_PRIMROSE_SEED,
|
||||
ItemId.BROWN_PRIMROSE_SEED, ItemId.YELLOW_PRIMROSE_SEED, ItemId.BLUE_PRIMROSE_SEED, ItemId.MOON_BUNNYS_RICE_CAKE};
|
||||
for (int item : items) {
|
||||
removePartyItems(item);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ package scripting.map;
|
||||
import client.Character.DelayedQuestUpdate;
|
||||
import client.Client;
|
||||
import client.QuestStatus;
|
||||
import constants.id.MapId;
|
||||
import scripting.AbstractPlayerInteraction;
|
||||
import server.quest.Quest;
|
||||
import tools.PacketCreator;
|
||||
@@ -38,51 +39,35 @@ public class MapScriptMethods extends AbstractPlayerInteraction {
|
||||
|
||||
public void displayCygnusIntro() {
|
||||
switch (c.getPlayer().getMapId()) {
|
||||
case 913040100:
|
||||
case MapId.CYGNUS_INTRO_LEAD -> {
|
||||
lockUI();
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene0"));
|
||||
break;
|
||||
case 913040101:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene1"));
|
||||
break;
|
||||
case 913040102:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene2"));
|
||||
break;
|
||||
case 913040103:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene3"));
|
||||
break;
|
||||
case 913040104:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene4"));
|
||||
break;
|
||||
case 913040105:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene5"));
|
||||
break;
|
||||
case 913040106:
|
||||
}
|
||||
case MapId.CYGNUS_INTRO_WARRIOR -> c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene1"));
|
||||
case MapId.CYGNUS_INTRO_BOWMAN -> c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene2"));
|
||||
case MapId.CYGNUS_INTRO_MAGE -> c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene3"));
|
||||
case MapId.CYGNUS_INTRO_PIRATE -> c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene4"));
|
||||
case MapId.CYGNUS_INTRO_THIEF -> c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene5"));
|
||||
case MapId.CYGNUS_INTRO_CONCLUSION -> {
|
||||
lockUI();
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene6"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void displayAranIntro() {
|
||||
switch (c.getPlayer().getMapId()) {
|
||||
case 914090010:
|
||||
case MapId.ARAN_TUTO_1 -> {
|
||||
lockUI();
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene0"));
|
||||
break;
|
||||
case 914090011:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene1" + c.getPlayer().getGender()));
|
||||
break;
|
||||
case 914090012:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene2" + c.getPlayer().getGender()));
|
||||
break;
|
||||
case 914090013:
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene3"));
|
||||
break;
|
||||
case 914090100:
|
||||
}
|
||||
case MapId.ARAN_TUTO_2 -> c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene1" + c.getPlayer().getGender()));
|
||||
case MapId.ARAN_TUTO_3 -> c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene2" + c.getPlayer().getGender()));
|
||||
case MapId.ARAN_TUTO_4 -> c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene3"));
|
||||
case MapId.ARAN_POLEARM -> {
|
||||
lockUI();
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/HandedPoleArm" + c.getPlayer().getGender()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ import client.inventory.ItemFactory;
|
||||
import client.inventory.Pet;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import constants.id.NpcId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.string.LanguageConstants;
|
||||
import net.server.Server;
|
||||
@@ -400,15 +402,16 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public void doGachapon() {
|
||||
int[] maps = {100000000, 101000000, 102000000, 103000000, 105040300, 800000000, 809000101, 809000201, 600000000, 120000000};
|
||||
|
||||
GachaponItem item = Gachapon.getInstance().process(npc);
|
||||
|
||||
Item itemGained = gainItem(item.getId(), (short) (item.getId() / 10000 == 200 ? 100 : 1), true, true); // For normal potions, make it give 100.
|
||||
|
||||
sendNext("You have obtained a #b#t" + item.getId() + "##k.");
|
||||
|
||||
String map = c.getChannelServer().getMapFactory().getMap(maps[(getNpc() != 9100117 && getNpc() != 9100109) ? (getNpc() - 9100100) : getNpc() == 9100109 ? 8 : 9]).getMapName();
|
||||
int[] maps = {MapId.HENESYS, MapId.ELLINIA, MapId.PERION, MapId.KERNING_CITY, MapId.SLEEPYWOOD, MapId.MUSHROOM_SHRINE,
|
||||
MapId.SHOWA_SPA_M, MapId.SHOWA_SPA_F, MapId.NEW_LEAF_CITY, MapId.NAUTILUS_HARBOR};
|
||||
final int mapId = maps[(getNpc() != NpcId.GACHAPON_NAUTILUS && getNpc() != NpcId.GACHAPON_NLC) ?
|
||||
(getNpc() - NpcId.GACHAPON_HENESYS) : getNpc() == NpcId.GACHAPON_NLC ? 8 : 9];
|
||||
String map = c.getChannelServer().getMapFactory().getMap(mapId).getMapName();
|
||||
|
||||
LogHelper.logGacha(getPlayer(), item.getId(), map);
|
||||
|
||||
@@ -499,7 +502,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
MapManager mapManager = c.getChannelServer().getMapFactory();
|
||||
|
||||
MapleMap map = null;
|
||||
int mapid = 926010100;
|
||||
int mapid = MapId.NETTS_PYRAMID_SOLO_BASE;
|
||||
if (party) {
|
||||
mapid += 10000;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ package server;
|
||||
|
||||
import client.inventory.*;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.server.Server;
|
||||
import net.server.audit.locks.MonitoredLockType;
|
||||
@@ -103,13 +104,13 @@ public class CashShop {
|
||||
|
||||
if (ItemConstants.EXPIRING_ITEMS) {
|
||||
if (period == 1) {
|
||||
if (itemId == 5211048 || itemId == 5360042) { // 4 Hour 2X coupons, the period is 1, but we don't want them to last a day.
|
||||
if (itemId == ItemId.EXP_COUPON_2X_4H || itemId == ItemId.DROP_COUPON_2X_4H) { // 4 Hour 2X coupons, the period is 1, but we don't want them to last a day.
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(4));
|
||||
/*
|
||||
} else if(itemId == 5211047 || itemId == 5360014) { // 3 Hour 2X coupons, unused as of now
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(3));
|
||||
*/
|
||||
} else if (itemId == 5211060) { // 2 Hour 3X coupons.
|
||||
} else if (itemId == ItemId.EXP_COUPON_3X_2H) { // 2 Hour 3X coupons.
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(2));
|
||||
} else {
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + DAYS.toMillis(1));
|
||||
@@ -525,7 +526,7 @@ public class CashShop {
|
||||
}
|
||||
|
||||
public synchronized Pair<Item, Item> openCashShopSurprise() {
|
||||
Item css = getCashShopItemByItemid(5222000);
|
||||
Item css = getCashShopItemByItemid(ItemId.CASH_SHOP_SURPRISE);
|
||||
|
||||
if (css != null) {
|
||||
CashItem cItem = CashItemFactory.getRandomCashItem();
|
||||
|
||||
@@ -26,6 +26,7 @@ import client.*;
|
||||
import client.autoban.AutobanFactory;
|
||||
import client.inventory.*;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.EquipSlot;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.skills.Assassin;
|
||||
@@ -1037,17 +1038,17 @@ public class ItemInformationProvider {
|
||||
double prop = (double) stats.get("success");
|
||||
|
||||
switch (vegaItemId) {
|
||||
case 5610000:
|
||||
case ItemId.VEGAS_SPELL_10:
|
||||
if (prop == 10.0f) {
|
||||
prop = 30.0f;
|
||||
}
|
||||
break;
|
||||
case 5610001:
|
||||
case ItemId.VEGAS_SPELL_60:
|
||||
if (prop == 60.0f) {
|
||||
prop = 90.0f;
|
||||
}
|
||||
break;
|
||||
case 2049100:
|
||||
case ItemId.CHAOS_SCROll_60:
|
||||
prop = 100.0f;
|
||||
break;
|
||||
}
|
||||
@@ -1055,25 +1056,25 @@ public class ItemInformationProvider {
|
||||
if (assertGM || rollSuccessChance(prop)) {
|
||||
short flag = nEquip.getFlag();
|
||||
switch (scrollId) {
|
||||
case 2040727:
|
||||
case ItemId.SPIKES_SCROLL:
|
||||
flag |= ItemConstants.SPIKES;
|
||||
nEquip.setFlag((byte) flag);
|
||||
break;
|
||||
case 2041058:
|
||||
case ItemId.COLD_PROTECTION_SCROLl:
|
||||
flag |= ItemConstants.COLD;
|
||||
nEquip.setFlag((byte) flag);
|
||||
break;
|
||||
case 2049000:
|
||||
case 2049001:
|
||||
case 2049002:
|
||||
case 2049003:
|
||||
case ItemId.CLEAN_SLATE_1:
|
||||
case ItemId.CLEAN_SLATE_3:
|
||||
case ItemId.CLEAN_SLATE_5:
|
||||
case ItemId.CLEAN_SLATE_20:
|
||||
if (canUseCleanSlate(nEquip)) {
|
||||
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() + 1));
|
||||
}
|
||||
break;
|
||||
case 2049100:
|
||||
case 2049101:
|
||||
case 2049102:
|
||||
case ItemId.CHAOS_SCROll_60:
|
||||
case ItemId.LIAR_TREE_SAP:
|
||||
case ItemId.MAPLE_SYRUP:
|
||||
scrollEquipWithChaos(nEquip, YamlConfig.config.server.CHSCROLL_STAT_RANGE);
|
||||
break;
|
||||
|
||||
@@ -1787,7 +1788,7 @@ public class ItemInformationProvider {
|
||||
public boolean canWearEquipment(Character chr, Equip equip, int dst) {
|
||||
int id = equip.getItemId();
|
||||
|
||||
if (ItemConstants.isWeddingRing(id) && chr.hasJustMarried()) {
|
||||
if (ItemId.isWeddingRing(id) && chr.hasJustMarried()) {
|
||||
chr.dropMessage(5, "The Wedding Ring cannot be equipped on this map."); // will dc everyone due to doubled couple effect
|
||||
return false;
|
||||
}
|
||||
@@ -1966,32 +1967,19 @@ public class ItemInformationProvider {
|
||||
int range = (level - 1) / 10;
|
||||
|
||||
if (range < 5) {
|
||||
return 4260000;
|
||||
return ItemId.BASIC_MONSTER_CRYSTAL_1;
|
||||
} else if (range > 11) {
|
||||
return 4260008;
|
||||
return ItemId.ADVANCED_MONSTER_CRYSTAL_3;
|
||||
} else {
|
||||
switch (range) {
|
||||
case 5:
|
||||
return 4260001;
|
||||
|
||||
case 6:
|
||||
return 4260002;
|
||||
|
||||
case 7:
|
||||
return 4260003;
|
||||
|
||||
case 8:
|
||||
return 4260004;
|
||||
|
||||
case 9:
|
||||
return 4260005;
|
||||
|
||||
case 10:
|
||||
return 4260006;
|
||||
|
||||
default:
|
||||
return 4260007;
|
||||
}
|
||||
return switch (range) {
|
||||
case 5 -> ItemId.BASIC_MONSTER_CRYSTAL_2;
|
||||
case 6 -> ItemId.BASIC_MONSTER_CRYSTAL_3;
|
||||
case 7 -> ItemId.INTERMEDIATE_MONSTER_CRYSTAL_1;
|
||||
case 8 -> ItemId.INTERMEDIATE_MONSTER_CRYSTAL_2;
|
||||
case 9 -> ItemId.INTERMEDIATE_MONSTER_CRYSTAL_3;
|
||||
case 10 -> ItemId.ADVANCED_MONSTER_CRYSTAL_1;
|
||||
default -> ItemId.ADVANCED_MONSTER_CRYSTAL_2;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.Pet;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.PacketCreator;
|
||||
@@ -48,18 +49,18 @@ public class Shop {
|
||||
private final int npcId;
|
||||
private final List<ShopItem> items;
|
||||
private final int tokenvalue = 1000000000;
|
||||
private final int token = 4000313;
|
||||
private final int token = ItemId.GOLDEN_MAPLE_LEAF;
|
||||
|
||||
static {
|
||||
for (int i = 2070000; i < 2070017; i++) {
|
||||
rechargeableItems.add(i);
|
||||
for (int throwingStarId : ItemId.allThrowingStarIds()) {
|
||||
rechargeableItems.add(throwingStarId);
|
||||
}
|
||||
rechargeableItems.add(2331000);//Blaze Capsule
|
||||
rechargeableItems.add(2332000);//Glaze Capsule
|
||||
rechargeableItems.add(2070018);
|
||||
rechargeableItems.remove(2070014); // doesn't exist
|
||||
for (int i = 2330000; i <= 2330005; i++) {
|
||||
rechargeableItems.add(i);
|
||||
rechargeableItems.add(ItemId.BLAZE_CAPSULE);
|
||||
rechargeableItems.add(ItemId.GLAZE_CAPSULE);
|
||||
rechargeableItems.add(ItemId.BALANCED_FURY);
|
||||
rechargeableItems.remove(ItemId.DEVIL_RAIN_THROWING_STAR); // doesn't exist
|
||||
for (int bulletId : ItemId.allBulletIds()) {
|
||||
rechargeableItems.add(bulletId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,16 +115,16 @@ public class Shop {
|
||||
} else if (item.getPitch() > 0) {
|
||||
int amount = (int) Math.min((float) item.getPitch() * quantity, Integer.MAX_VALUE);
|
||||
|
||||
if (c.getPlayer().getInventory(InventoryType.ETC).countById(4310000) >= amount) {
|
||||
if (c.getPlayer().getInventory(InventoryType.ETC).countById(ItemId.PERFECT_PITCH) >= amount) {
|
||||
if (InventoryManipulator.checkSpace(c, itemId, quantity, "")) {
|
||||
if (!ItemConstants.isRechargeable(itemId)) {
|
||||
InventoryManipulator.addById(c, itemId, quantity, "", -1);
|
||||
InventoryManipulator.removeById(c, InventoryType.ETC, 4310000, amount, false, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.ETC, ItemId.PERFECT_PITCH, amount, false, false);
|
||||
} else {
|
||||
short slotMax = ii.getSlotMax(c, item.getItemId());
|
||||
quantity = slotMax;
|
||||
InventoryManipulator.addById(c, itemId, quantity, "", -1);
|
||||
InventoryManipulator.removeById(c, InventoryType.ETC, 4310000, amount, false, false);
|
||||
InventoryManipulator.removeById(c, InventoryType.ETC, ItemId.PERFECT_PITCH, amount, false, false);
|
||||
}
|
||||
c.sendPacket(PacketCreator.shopTransaction((byte) 0));
|
||||
} else {
|
||||
|
||||
@@ -30,6 +30,8 @@ import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.status.MonsterStatus;
|
||||
import client.status.MonsterStatusEffect;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.skills.*;
|
||||
import net.packet.Packet;
|
||||
@@ -158,9 +160,9 @@ public class StatEffect {
|
||||
}
|
||||
|
||||
private static byte mapProtection(int sourceid) {
|
||||
if (sourceid == 2022001 || sourceid == 2022186) {
|
||||
if (sourceid == ItemId.RED_BEAN_PORRIDGE || sourceid == ItemId.SOFT_WHITE_BUN) {
|
||||
return 1; //elnath cold
|
||||
} else if (sourceid == 2022040) {
|
||||
} else if (sourceid == ItemId.AIR_BUBBLE) {
|
||||
return 2; //aqua road underwater
|
||||
} else {
|
||||
return 0;
|
||||
@@ -252,14 +254,14 @@ public class StatEffect {
|
||||
|
||||
if (ret.overTime && ret.getSummonMovementType() == null) {
|
||||
if (!skill) {
|
||||
if (isPyramidBuff(sourceid)) {
|
||||
if (ItemId.isPyramidBuff(sourceid)) {
|
||||
ret.berserk = DataTool.getInt("berserk", source, 0);
|
||||
ret.booster = DataTool.getInt("booster", source, 0);
|
||||
|
||||
addBuffStatPairToListIfNotZero(statups, BuffStat.BERSERK, ret.berserk);
|
||||
addBuffStatPairToListIfNotZero(statups, BuffStat.BOOSTER, ret.booster);
|
||||
|
||||
} else if (isDojoBuff(sourceid) || isHpMpRecovery(sourceid)) {
|
||||
} else if (ItemId.isDojoBuff(sourceid) || isHpMpRecovery(sourceid)) {
|
||||
ret.mhpR = (byte) DataTool.getInt("mhpR", source, 0);
|
||||
ret.mhpRRate = (short) (DataTool.getInt("mhpRRate", source, 0) * 100);
|
||||
ret.mmpR = (byte) DataTool.getInt("mmpR", source, 0);
|
||||
@@ -268,7 +270,7 @@ public class StatEffect {
|
||||
addBuffStatPairToListIfNotZero(statups, BuffStat.HPREC, (int) ret.mhpR);
|
||||
addBuffStatPairToListIfNotZero(statups, BuffStat.MPREC, (int) ret.mmpR);
|
||||
|
||||
} else if (isRateCoupon(sourceid)) {
|
||||
} else if (ItemId.isRateCoupon(sourceid)) {
|
||||
switch (DataTool.getInt("expR", source, 0)) {
|
||||
case 1:
|
||||
addBuffStatPairToListIfNotZero(statups, BuffStat.COUPON_EXP1, 1);
|
||||
@@ -300,7 +302,7 @@ public class StatEffect {
|
||||
addBuffStatPairToListIfNotZero(statups, BuffStat.COUPON_DRP3, 1);
|
||||
break;
|
||||
}
|
||||
} else if (isMonsterCard(sourceid)) {
|
||||
} else if (ItemId.isMonsterCard(sourceid)) {
|
||||
int prob = 0, itemupCode = Integer.MAX_VALUE;
|
||||
List<Pair<Integer, Integer>> areas = null;
|
||||
boolean inParty = false;
|
||||
@@ -370,7 +372,7 @@ public class StatEffect {
|
||||
}
|
||||
|
||||
ret.cardStats = new CardItemupStats(itemupCode, prob, areas, inParty);
|
||||
} else if (isExpIncrease(sourceid)) {
|
||||
} else if (ItemId.isExpIncrease(sourceid)) {
|
||||
addBuffStatPairToListIfNotZero(statups, BuffStat.EXP_INCREASE, DataTool.getInt("expinc", source, 0));
|
||||
}
|
||||
} else {
|
||||
@@ -907,8 +909,8 @@ public class StatEffect {
|
||||
MapleMap target;
|
||||
Portal pt;
|
||||
|
||||
if (moveTo == 999999999) {
|
||||
if (sourceid != 2030100) {
|
||||
if (moveTo == MapId.NONE) {
|
||||
if (sourceid != ItemId.ANTI_BANISH_SCROLL) {
|
||||
target = applyto.getMap().getReturnMap();
|
||||
pt = target.getRandomPlayerSpawnpoint();
|
||||
} else {
|
||||
@@ -1012,7 +1014,7 @@ public class StatEffect {
|
||||
door.getTarget().spawnDoor(door.getAreaDoor());
|
||||
door.getTown().spawnDoor(door.getTownDoor());
|
||||
} else {
|
||||
InventoryManipulator.addFromDrop(applyto.getClient(), new Item(4006000, (short) 0, (short) 1), false);
|
||||
InventoryManipulator.addFromDrop(applyto.getClient(), new Item(ItemId.MAGIC_ROCK, (short) 0, (short) 1), false);
|
||||
|
||||
if (door.getOwnerId() == -3) {
|
||||
applyto.dropMessage(5, "Mystic Door cannot be cast far from a spawn point. Nearest one is at " + door.getDoorStatus().getRight() + "pts " + door.getDoorStatus().getLeft());
|
||||
@@ -1229,7 +1231,7 @@ public class StatEffect {
|
||||
}
|
||||
|
||||
if (sourceid == Corsair.BATTLE_SHIP) {
|
||||
ridingMountId = 1932000;
|
||||
ridingMountId = ItemId.BATTLESHIP;
|
||||
} else if (sourceid == Beginner.SPACESHIP || sourceid == Noblesse.SPACESHIP) {
|
||||
ridingMountId = 1932000 + applyto.getSkillLevel(sourceid);
|
||||
} else if (sourceid == Beginner.YETI_MOUNT1 || sourceid == Noblesse.YETI_MOUNT1 || sourceid == Legend.YETI_MOUNT1) {
|
||||
@@ -1523,38 +1525,12 @@ public class StatEffect {
|
||||
return sourceid == Beginner.MAP_CHAIR || sourceid == Noblesse.MAP_CHAIR || sourceid == Legend.MAP_CHAIR;
|
||||
}
|
||||
|
||||
public boolean isDojoBuff() {
|
||||
return sourceid >= 2022359 && sourceid <= 2022421;
|
||||
}
|
||||
|
||||
public static boolean isDojoBuff(int sourceid) {
|
||||
return sourceid >= 2022359 && sourceid <= 2022421;
|
||||
}
|
||||
|
||||
public static boolean isHpMpRecovery(int sourceid) {
|
||||
return sourceid == 2022198 || sourceid == 2022337;
|
||||
}
|
||||
|
||||
public static boolean isPyramidBuff(int sourceid) {
|
||||
return sourceid >= 2022585 && sourceid <= 2022617;
|
||||
}
|
||||
|
||||
public static boolean isRateCoupon(int sourceid) {
|
||||
int itemType = sourceid / 1000;
|
||||
return itemType == 5211 || itemType == 5360;
|
||||
}
|
||||
|
||||
public static boolean isExpIncrease(int sourceid) {
|
||||
return sourceid >= 2022450 && sourceid <= 2022452;
|
||||
return sourceid == ItemId.RUSSELLONS_PILLS || sourceid == ItemId.SORCERERS_POTION;
|
||||
}
|
||||
|
||||
public static boolean isAriantShield(int sourceid) {
|
||||
return sourceid == 2022269;
|
||||
}
|
||||
|
||||
public static boolean isMonsterCard(int sourceid) {
|
||||
int itemType = sourceid / 10000;
|
||||
return itemType == 238;
|
||||
return sourceid == ItemId.ARPQ_SHIELD;
|
||||
}
|
||||
|
||||
private boolean isDs() {
|
||||
@@ -1586,7 +1562,7 @@ public class StatEffect {
|
||||
}
|
||||
|
||||
private boolean isCouponBuff() {
|
||||
return isRateCoupon(sourceid);
|
||||
return ItemId.isRateCoupon(sourceid);
|
||||
}
|
||||
|
||||
private boolean isAriantShield() {
|
||||
@@ -1649,7 +1625,7 @@ public class StatEffect {
|
||||
if (skill) {
|
||||
return isHerosWill(sourceid);
|
||||
} else {
|
||||
return sourceid == 2022544;
|
||||
return sourceid == ItemId.WHITE_ELIXIR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
package server.events.gm;
|
||||
|
||||
import client.Character;
|
||||
import constants.id.MapId;
|
||||
import server.TimerManager;
|
||||
import server.maps.MapleMap;
|
||||
import tools.PacketCreator;
|
||||
@@ -59,7 +60,7 @@ public class Coconut extends Event {
|
||||
map.broadcastMessage(PacketCreator.getClock(300));
|
||||
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (map.getId() == 109080000) {
|
||||
if (map.getId() == MapId.EVENT_COCONUT_HARVEST) {
|
||||
if (getMapleScore() == getStoryScore()) {
|
||||
bonusTime();
|
||||
} else if (getMapleScore() > getStoryScore()) {
|
||||
@@ -132,9 +133,9 @@ public class Coconut extends Event {
|
||||
|
||||
for (Character chr : chars) {
|
||||
if ((getMapleScore() > getStoryScore() && chr.getTeam() == 0) || (getStoryScore() > getMapleScore() && chr.getTeam() == 1)) {
|
||||
chr.changeMap(109050000);
|
||||
chr.changeMap(MapId.EVENT_WINNER);
|
||||
} else {
|
||||
chr.changeMap(109050001);
|
||||
chr.changeMap(MapId.EVENT_EXIT);
|
||||
}
|
||||
}
|
||||
map.setCoconut(null);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
package server.events.gm;
|
||||
|
||||
import client.Character;
|
||||
import constants.id.MapId;
|
||||
import server.TimerManager;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -41,7 +42,7 @@ public class Fitness {
|
||||
public Fitness(final Character chr) {
|
||||
this.chr = chr;
|
||||
this.schedule = TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() >= 109040000 && chr.getMapId() <= 109040004) {
|
||||
if (MapId.isPhysicalFitness(chr.getMapId())) {
|
||||
chr.changeMap(chr.getMap().getReturnMap());
|
||||
}
|
||||
}, 900000);
|
||||
@@ -82,7 +83,7 @@ public class Fitness {
|
||||
if (chr.getFitness() == null) {
|
||||
resetTimes();
|
||||
}
|
||||
if (chr.getMap().getId() >= 109040000 && chr.getMap().getId() <= 109040004) {
|
||||
if (MapId.isPhysicalFitness(chr.getMapId())) {
|
||||
if (getTimeLeft() > 9000 && getTimeLeft() < 11000) {
|
||||
chr.sendPacket(PacketCreator.serverNotice(0, "You have 10 sec left. Those of you unable to beat the game, we hope you beat it next time! Great job everyone!! See you later~"));
|
||||
} else if (getTimeLeft() > 99000 && getTimeLeft() < 101000) {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package server.events.gm;
|
||||
|
||||
import client.Character;
|
||||
import constants.id.MapId;
|
||||
import server.TimerManager;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -39,7 +40,7 @@ public class Ola {
|
||||
public Ola(final Character chr) {
|
||||
this.chr = chr;
|
||||
this.schedule = TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() >= 109030001 && chr.getMapId() <= 109030303) {
|
||||
if (MapId.isOlaOla(chr.getMapId())) {
|
||||
chr.changeMap(chr.getMap().getReturnMap());
|
||||
}
|
||||
resetTimes();
|
||||
|
||||
@@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package server.events.gm;
|
||||
|
||||
import client.Character;
|
||||
import constants.id.MapId;
|
||||
import server.TimerManager;
|
||||
import server.maps.MapleMap;
|
||||
import tools.PacketCreator;
|
||||
@@ -152,10 +153,10 @@ public class Snowball {
|
||||
|
||||
public void warpOut() {
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (winner == true) {
|
||||
map.warpOutByTeam(team, 109050000);
|
||||
if (winner) {
|
||||
map.warpOutByTeam(team, MapId.EVENT_WINNER);
|
||||
} else {
|
||||
map.warpOutByTeam(team, 109050001);
|
||||
map.warpOutByTeam(team, MapId.EVENT_EXIT);
|
||||
}
|
||||
|
||||
map.setSnowball(team, null);
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
package server.expeditions;
|
||||
|
||||
import client.Character;
|
||||
import constants.id.MapId;
|
||||
import constants.id.MobId;
|
||||
import net.packet.Packet;
|
||||
import net.server.PlayerStorage;
|
||||
import net.server.Server;
|
||||
@@ -51,35 +53,35 @@ import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
public class Expedition {
|
||||
|
||||
private static final int[] EXPEDITION_BOSSES = {
|
||||
8800000,// - Zakum's first body
|
||||
8800001,// - Zakum's second body
|
||||
8800002,// - Zakum's third body
|
||||
8800003,// - Zakum's Arm 1
|
||||
8800004,// - Zakum's Arm 2
|
||||
8800005,// - Zakum's Arm 3
|
||||
8800006,// - Zakum's Arm 4
|
||||
8800007,// - Zakum's Arm 5
|
||||
8800008,// - Zakum's Arm 6
|
||||
8800009,// - Zakum's Arm 7
|
||||
8800010,// - Zakum's Arm 8
|
||||
8810000,// - Horntail's Left Head
|
||||
8810001,// - Horntail's Right Head
|
||||
8810002,// - Horntail's Head A
|
||||
8810003,// - Horntail's Head B
|
||||
8810004,// - Horntail's Head C
|
||||
8810005,// - Horntail's Left Hand
|
||||
8810006,// - Horntail's Right Hand
|
||||
8810007,// - Horntail's Wings
|
||||
8810008,// - Horntail's Legs
|
||||
8810009,// - Horntail's Tails
|
||||
9420546,// - Scarlion Boss
|
||||
9420547,// - Scarlion Boss
|
||||
9420548,// - Angry Scarlion Boss
|
||||
9420549,// - Furious Scarlion Boss
|
||||
9420541,// - Targa
|
||||
9420542,// - Targa
|
||||
9420543,// - Angry Targa
|
||||
9420544,// - Furious Targa
|
||||
MobId.ZAKUM_1,
|
||||
MobId.ZAKUM_2,
|
||||
MobId.ZAKUM_3,
|
||||
MobId.ZAKUM_ARM_1,
|
||||
MobId.ZAKUM_ARM_2,
|
||||
MobId.ZAKUM_ARM_3,
|
||||
MobId.ZAKUM_ARM_4,
|
||||
MobId.ZAKUM_ARM_5,
|
||||
MobId.ZAKUM_ARM_6,
|
||||
MobId.ZAKUM_ARM_7,
|
||||
MobId.ZAKUM_ARM_8,
|
||||
MobId.HORNTAIL_PREHEAD_LEFT,
|
||||
MobId.HORNTAIL_PREHEAD_RIGHT,
|
||||
MobId.HORNTAIL_HEAD_A,
|
||||
MobId.HORNTAIL_HEAD_B,
|
||||
MobId.HORNTAIL_HEAD_C,
|
||||
MobId.HORNTAIL_HAND_LEFT,
|
||||
MobId.HORNTAIL_HAND_RIGHT,
|
||||
MobId.HORNTAIL_WINGS,
|
||||
MobId.HORNTAIL_LEGS,
|
||||
MobId.HORNTAIL_TAIL,
|
||||
MobId.SCARLION_STATUE,
|
||||
MobId.SCARLION,
|
||||
MobId.ANGRY_SCARLION,
|
||||
MobId.FURIOUS_SCARLION,
|
||||
MobId.TARGA_STATUE,
|
||||
MobId.TARGA,
|
||||
MobId.ANGRY_TARGA,
|
||||
MobId.FURIOUS_TARGA,
|
||||
};
|
||||
|
||||
private final Character leader;
|
||||
@@ -255,7 +257,7 @@ public class Expedition {
|
||||
player.dropMessage(6, "[Expedition] You have been banned from this expedition.");
|
||||
}
|
||||
if (ExpeditionType.ARIANT.equals(type) || ExpeditionType.ARIANT1.equals(type) || ExpeditionType.ARIANT2.equals(type)) {
|
||||
player.changeMap(980010000);
|
||||
player.changeMap(MapId.ARPQ_LOBBY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
package server.gachapon;
|
||||
|
||||
import constants.id.NpcId;
|
||||
import server.ItemInformationProvider;
|
||||
import tools.Randomizer;
|
||||
|
||||
@@ -38,18 +39,18 @@ public class Gachapon {
|
||||
public enum GachaponType {
|
||||
|
||||
GLOBAL(-1, -1, -1, -1, new Global()),
|
||||
HENESYS(9100100, 90, 8, 2, new Henesys()),
|
||||
ELLINIA(9100101, 90, 8, 2, new Ellinia()),
|
||||
PERION(9100102, 90, 8, 2, new Perion()),
|
||||
KERNING_CITY(9100103, 90, 8, 2, new KerningCity()),
|
||||
SLEEPYWOOD(9100104, 90, 8, 2, new Sleepywood()),
|
||||
MUSHROOM_SHRINE(9100105, 90, 8, 2, new MushroomShrine()),
|
||||
SHOWA_SPA_MALE(9100106, 90, 8, 2, new ShowaSpaMale()),
|
||||
SHOWA_SPA_FEMALE(9100107, 90, 8, 2, new ShowaSpaFemale()),
|
||||
LUDIBRIUM(9100108, 90, 8, 2, new Ludibrium()),
|
||||
NEW_LEAF_CITY(9100109, 90, 8, 2, new NewLeafCity()),
|
||||
EL_NATH(9100110, 90, 8, 2, new ElNath()),
|
||||
NAUTILUS_HARBOR(9100117, 90, 8, 2, new NautilusHarbor());
|
||||
HENESYS(NpcId.GACHAPON_HENESYS, 90, 8, 2, new Henesys()),
|
||||
ELLINIA(NpcId.GACHAPON_ELLINIA, 90, 8, 2, new Ellinia()),
|
||||
PERION(NpcId.GACHAPON_PERION, 90, 8, 2, new Perion()),
|
||||
KERNING_CITY(NpcId.GACHAPON_KERNING, 90, 8, 2, new KerningCity()),
|
||||
SLEEPYWOOD(NpcId.GACHAPON_SLEEPYWOOD, 90, 8, 2, new Sleepywood()),
|
||||
MUSHROOM_SHRINE(NpcId.GACHAPON_MUSHROOM_SHRINE, 90, 8, 2, new MushroomShrine()),
|
||||
SHOWA_SPA_MALE(NpcId.GACHAPON_SHOWA_MALE, 90, 8, 2, new ShowaSpaMale()),
|
||||
SHOWA_SPA_FEMALE(NpcId.GACHAPON_SHOWA_FEMALE, 90, 8, 2, new ShowaSpaFemale()),
|
||||
LUDIBRIUM(NpcId.GACHAPON_LUDIBRIUM, 90, 8, 2, new Ludibrium()),
|
||||
NEW_LEAF_CITY(NpcId.GACHAPON_NLC, 90, 8, 2, new NewLeafCity()),
|
||||
EL_NATH(NpcId.GACHAPON_EL_NATH, 90, 8, 2, new ElNath()),
|
||||
NAUTILUS_HARBOR(NpcId.GACHAPON_NAUTILUS, 90, 8, 2, new NautilusHarbor());
|
||||
|
||||
private static final GachaponType[] values = GachaponType.values();
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package server.gachapon;
|
||||
|
||||
import constants.id.ItemId;
|
||||
|
||||
/**
|
||||
* @author Alan (SharpAceX)
|
||||
* @author Ronan - added ores and reworked global loots
|
||||
@@ -15,7 +17,7 @@ public class Global extends GachaponItems {
|
||||
|
||||
/* Ores */
|
||||
4004000, 4004001, 4004002, 4004003, 4004004,
|
||||
4006000, 4006001,
|
||||
ItemId.MAGIC_ROCK, 4006001,
|
||||
4010000, 4010001, 4010002, 4010003, 4010004, 4010005, 4010006, 4010007,
|
||||
4020000, 4020001, 4020002, 4020003, 4020004, 4020005, 4020006, 4020007, 4020008
|
||||
};
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package server.gachapon;
|
||||
|
||||
import constants.id.ItemId;
|
||||
|
||||
/**
|
||||
* @author Ronan - parsed MapleSEA loots
|
||||
* <p>
|
||||
@@ -16,7 +18,7 @@ public class Ludibrium extends GachaponItems {
|
||||
2048000, 2040601, 2041019, 2041007, 2041016, 2041022, 2041001, 2041010, 2041013, 2041004, 2044701, 2043301, 2040301, 2048004, 2048001, 2040901, 2040701, 2040704, 2040707, 2040602, 2041020, 2041008, 2041017, 2041023, 2041002, 2041011, 2041014, 2041005, 2044702, 2043302, 2040302, 2040002, 2044402, 2048005, 2048002, 2040702, 2040705, 2040708, 2044302, 2043802, 2040402, 2043702, 2044811,
|
||||
|
||||
/* Useable drop */
|
||||
2000004, 2000005, 4006000, 4006001,
|
||||
2000004, 2000005, ItemId.MAGIC_ROCK, 4006001,
|
||||
|
||||
/* Common equipment */
|
||||
1032003, 1432009, 1302022, 1302029, 1102014, 1102018, 1312014, 1302026, 1102015, 1032011, 1312013, 1032008, 1032019, 1032007, 1332030, 1032020, 1032004, 1302027, 1032022, 1312012, 1032021, 1032006, 1302028, 1322003, 1032016, 1032015, 1302024, 1092008, 1032018, 1302021, 1032014, 1332021, 1322012, 1032005, 1032013, 1102012, 1302025, 1302013, 1032002, 1032001, 1032012, 1302017, 1032010, 1402014, 1102017, 1102013, 1442021, 1032009,
|
||||
|
||||
@@ -24,7 +24,8 @@ package server.life;
|
||||
import client.Character;
|
||||
import client.Disease;
|
||||
import client.status.MonsterStatus;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import constants.id.MobId;
|
||||
import net.server.services.task.channel.OverallService;
|
||||
import net.server.services.type.ChannelServices;
|
||||
import server.maps.MapObject;
|
||||
@@ -243,7 +244,7 @@ public class MobSkill {
|
||||
int skillLimit = this.getLimit();
|
||||
MapleMap map = monster.getMap();
|
||||
|
||||
if (GameConstants.isDojo(map.getId())) { // spawns in dojo should be unlimited
|
||||
if (MapId.isDojo(map.getId())) { // spawns in dojo should be unlimited
|
||||
skillLimit = Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
@@ -251,7 +252,7 @@ public class MobSkill {
|
||||
List<Integer> summons = getSummons();
|
||||
int summonLimit = monster.countAvailableMobSummons(summons.size(), skillLimit);
|
||||
if (summonLimit >= 1) {
|
||||
boolean bossRushMap = GameConstants.isBossRush(map.getId());
|
||||
boolean bossRushMap = MapId.isBossRush(map.getId());
|
||||
|
||||
Collections.shuffle(summons);
|
||||
for (Integer mobId : summons.subList(0, summonLimit)) {
|
||||
@@ -265,17 +266,17 @@ public class MobSkill {
|
||||
xpos = (int) monster.getPosition().getX();
|
||||
ypos = (int) monster.getPosition().getY();
|
||||
switch (mobId) {
|
||||
case 8500003: // Pap bomb high
|
||||
case MobId.HIGH_DARKSTAR: // Pap bomb high
|
||||
toSpawn.setFh((int) Math.ceil(Math.random() * 19.0));
|
||||
ypos = -590;
|
||||
break;
|
||||
case 8500004: // Pap bomb
|
||||
case MobId.LOW_DARKSTAR: // Pap bomb
|
||||
xpos = (int) (monster.getPosition().getX() + Randomizer.nextInt(1000) - 500);
|
||||
if (ypos != -590) {
|
||||
ypos = (int) monster.getPosition().getY();
|
||||
}
|
||||
break;
|
||||
case 8510100: //Pianus bomb
|
||||
case MobId.BLOODY_BOOM: //Pianus bomb
|
||||
if (Math.ceil(Math.random() * 5) == 1) {
|
||||
ypos = 78;
|
||||
xpos = Randomizer.nextInt(5) + (Randomizer.nextInt(2) == 1 ? 180 : 0);
|
||||
@@ -285,14 +286,14 @@ public class MobSkill {
|
||||
break;
|
||||
}
|
||||
switch (map.getId()) {
|
||||
case 220080001: //Pap map
|
||||
case MapId.ORIGIN_OF_CLOCKTOWER: //Pap map
|
||||
if (xpos < -890) {
|
||||
xpos = (int) (Math.ceil(Math.random() * 150) - 890);
|
||||
} else if (xpos > 230) {
|
||||
xpos = (int) (230 - Math.ceil(Math.random() * 150));
|
||||
}
|
||||
break;
|
||||
case 230040420: // Pianus map
|
||||
case MapId.CAVE_OF_PIANUS: // Pianus map
|
||||
if (xpos < -239) {
|
||||
xpos = (int) (Math.ceil(Math.random() * 150) - 239);
|
||||
} else if (xpos > 371) {
|
||||
@@ -301,7 +302,7 @@ public class MobSkill {
|
||||
break;
|
||||
}
|
||||
toSpawn.setPosition(new Point(xpos, ypos));
|
||||
if (toSpawn.getId() == 8500004) {
|
||||
if (toSpawn.getId() == MobId.LOW_DARKSTAR) {
|
||||
map.spawnFakeMonster(toSpawn);
|
||||
} else {
|
||||
map.spawnMonsterWithEffect(toSpawn, getSpawnEffect(), toSpawn.getPosition());
|
||||
|
||||
@@ -26,6 +26,7 @@ import client.*;
|
||||
import client.status.MonsterStatus;
|
||||
import client.status.MonsterStatusEffect;
|
||||
import config.YamlConfig;
|
||||
import constants.id.MobId;
|
||||
import constants.skills.*;
|
||||
import net.packet.Packet;
|
||||
import net.server.audit.LockCollector;
|
||||
@@ -761,7 +762,7 @@ public class Monster extends AbstractLoadedLife {
|
||||
final List<Integer> toSpawn = this.getRevives();
|
||||
if (toSpawn != null) {
|
||||
final MapleMap reviveMap = map;
|
||||
if (toSpawn.contains(9300216) && reviveMap.getId() > 925000000 && reviveMap.getId() < 926000000) {
|
||||
if (toSpawn.contains(MobId.TRANSPARENT_ITEM) && reviveMap.getId() > 925000000 && reviveMap.getId() < 926000000) {
|
||||
reviveMap.broadcastMessage(PacketCreator.playSound("Dojang/clear"));
|
||||
reviveMap.broadcastMessage(PacketCreator.showEffect("dojang/end/clear"));
|
||||
}
|
||||
@@ -790,9 +791,9 @@ public class Monster extends AbstractLoadedLife {
|
||||
}
|
||||
reviveMap.spawnMonster(mob);
|
||||
|
||||
if (mob.getId() >= 8810010 && mob.getId() <= 8810017 && reviveMap.isHorntailDefeated()) {
|
||||
if (MobId.isDeadHorntailPart(mob.getId()) && reviveMap.isHorntailDefeated()) {
|
||||
boolean htKilled = false;
|
||||
Monster ht = reviveMap.getMonsterById(8810018);
|
||||
Monster ht = reviveMap.getMonsterById(MobId.HORNTAIL);
|
||||
|
||||
if (ht != null) {
|
||||
ht.lockMonster();
|
||||
@@ -808,7 +809,7 @@ public class Monster extends AbstractLoadedLife {
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 8810017; i >= 8810010; i--) {
|
||||
for (int i = MobId.DEAD_HORNTAIL_MAX; i >= MobId.DEAD_HORNTAIL_MIN; i--) {
|
||||
reviveMap.killMonster(reviveMap.getMonsterById(i), killer, true);
|
||||
}
|
||||
} else if (controller != null) {
|
||||
|
||||
@@ -27,6 +27,7 @@ import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.NpcId;
|
||||
import net.server.Server;
|
||||
import net.server.channel.Channel;
|
||||
import net.server.world.World;
|
||||
@@ -312,7 +313,7 @@ public class PlayerNPC extends AbstractMapObject {
|
||||
private static void fetchAvailableScriptIdsFromDb(byte branch, List<Integer> list) {
|
||||
try {
|
||||
int branchLen = (branch < 26) ? 100 : 400;
|
||||
int branchSid = 9900000 + (branch * 100);
|
||||
int branchSid = NpcId.PLAYER_NPC_BASE + (branch * 100);
|
||||
int nextBranchSid = branchSid + branchLen;
|
||||
|
||||
List<Integer> availables = new ArrayList<>(20);
|
||||
@@ -556,7 +557,7 @@ public class PlayerNPC extends AbstractMapObject {
|
||||
for (MapObject pnpcObj : wserv.getChannel(1).getMapFactory().getMap(map).getMapObjectsInRange(new Point(0, 0), Double.POSITIVE_INFINITY, Arrays.asList(MapObjectType.PLAYER_NPC))) {
|
||||
PlayerNPC pn = (PlayerNPC) pnpcObj;
|
||||
|
||||
if (name.contentEquals(pn.getName()) && pn.getScriptId() < 9977777) {
|
||||
if (name.contentEquals(pn.getName()) && pn.getScriptId() < NpcId.CUSTOM_DEV) {
|
||||
return pn;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
*/
|
||||
package server.life;
|
||||
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.id.NpcId;
|
||||
import net.server.Server;
|
||||
import provider.Data;
|
||||
import provider.DataProvider;
|
||||
@@ -45,11 +48,11 @@ public class PlayerNPCFactory {
|
||||
}
|
||||
|
||||
private static void loadDeveloperRoomMetadata(DataProvider npc) {
|
||||
Data thisData = npc.getData("9977777.img");
|
||||
Data thisData = npc.getData(NpcId.CUSTOM_DEV + ".img");
|
||||
if (thisData != null) {
|
||||
DataProvider map = DataProviderFactory.getDataProvider(WZFiles.MAP);
|
||||
|
||||
thisData = map.getData("Map/Map7/777777777.img");
|
||||
thisData = map.getData("Map/Map7/" + MapId.DEVELOPERS_HQ + ".img");
|
||||
if (thisData != null) {
|
||||
DataProvider sound = DataProviderFactory.getDataProvider(WZFiles.SOUND);
|
||||
|
||||
@@ -105,21 +108,21 @@ public class PlayerNPCFactory {
|
||||
runningDeveloperOid++;
|
||||
}
|
||||
} else {
|
||||
Data thisData = npc.getData("9977777.img");
|
||||
Data thisData = npc.getData(NpcId.CUSTOM_DEV + ".img");
|
||||
|
||||
if (thisData != null) {
|
||||
byte[] encData = {0x52, 0x6F, 0x6E, 0x61, 0x6E};
|
||||
String name = new String(encData);
|
||||
int face = 20104, hair = 30215, gender = 0, skin = 0, dir = 0, mapid = 777777777;
|
||||
int FH = 4, RX0 = -143, RX1 = -243, CX = -193, CY = 117, scriptId = 9977777;
|
||||
int face = 20104, hair = 30215, gender = 0, skin = 0, dir = 0, mapid = MapId.DEVELOPERS_HQ;
|
||||
int FH = 4, RX0 = -143, RX1 = -243, CX = -193, CY = 117, scriptId = NpcId.CUSTOM_DEV;
|
||||
|
||||
Map<Short, Integer> equips = new HashMap<>();
|
||||
equips.put((short) -1, 1002067);
|
||||
equips.put((short) -11, 1402046);
|
||||
equips.put((short) -8, 1082140);
|
||||
equips.put((short) -6, 1060091);
|
||||
equips.put((short) -7, 1072154);
|
||||
equips.put((short) -5, 1040103);
|
||||
equips.put((short) -1, ItemId.GREEN_HEADBAND);
|
||||
equips.put((short) -11, ItemId.TIMELESS_NIBLEHEIM);
|
||||
equips.put((short) -8, ItemId.BLUE_KORBEN);
|
||||
equips.put((short) -6, ItemId.MITHRIL_PLATINE_PANTS);
|
||||
equips.put((short) -7, ItemId.BLUE_CARZEN_BOOTS);
|
||||
equips.put((short) -5, ItemId.MITHRIL_PLATINE);
|
||||
|
||||
List<PlayerNPC> dnpcSet = dnpcMaps.get(mapid);
|
||||
if (dnpcSet == null) {
|
||||
|
||||
@@ -21,6 +21,7 @@ package server.maps;
|
||||
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import constants.id.MapId;
|
||||
import net.server.audit.locks.MonitoredLockType;
|
||||
import net.server.audit.locks.MonitoredReadLock;
|
||||
import net.server.audit.locks.MonitoredReentrantReadWriteLock;
|
||||
@@ -128,7 +129,7 @@ public class DoorObject extends AbstractMapObject {
|
||||
if (from.getId() == chr.getMapId()) {
|
||||
Party party = chr.getParty();
|
||||
if (party != null && (ownerId == chr.getId() || party.getMemberById(ownerId) != null)) {
|
||||
client.sendPacket(PacketCreator.partyPortal(999999999, 999999999, new Point(-1, -1)));
|
||||
client.sendPacket(PacketCreator.partyPortal(MapId.NONE, MapId.NONE, new Point(-1, -1)));
|
||||
}
|
||||
client.sendPacket(PacketCreator.removeDoor(ownerId, inTown()));
|
||||
}
|
||||
@@ -136,7 +137,7 @@ public class DoorObject extends AbstractMapObject {
|
||||
|
||||
public void sendDestroyData(Client client, boolean partyUpdate) {
|
||||
if (client != null && from.getId() == client.getPlayer().getMapId()) {
|
||||
client.sendPacket(PacketCreator.partyPortal(999999999, 999999999, new Point(-1, -1)));
|
||||
client.sendPacket(PacketCreator.partyPortal(MapId.NONE, MapId.NONE, new Point(-1, -1)));
|
||||
client.sendPacket(PacketCreator.removeDoor(ownerId, inTown()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ package server.maps;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import net.server.audit.locks.MonitoredLockType;
|
||||
import net.server.audit.locks.MonitoredReentrantLock;
|
||||
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
|
||||
@@ -140,7 +141,7 @@ public class GenericPortal implements Portal {
|
||||
} catch (NullPointerException npe) {
|
||||
npe.printStackTrace();
|
||||
}
|
||||
} else if (getTargetMapId() != 999999999) {
|
||||
} else if (getTargetMapId() != MapId.NONE) {
|
||||
Character chr = c.getPlayer();
|
||||
if (!(chr.getChalkboard() != null && GameConstants.isFreeMarketRoom(getTargetMapId()))) {
|
||||
MapleMap to = chr.getEventInstance() == null ? c.getChannelServer().getMapFactory().getMap(getTargetMapId()) : chr.getEventInstance().getMapInstance(getTargetMapId());
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
package server.maps;
|
||||
|
||||
import constants.id.MapId;
|
||||
import provider.Data;
|
||||
import provider.DataProvider;
|
||||
import provider.DataProviderFactory;
|
||||
@@ -309,7 +310,7 @@ public class MapFactory {
|
||||
map.setTown(DataTool.getIntConvert("town", infoData, 0) != 0);
|
||||
map.setHPDec(DataTool.getIntConvert("decHP", infoData, 0));
|
||||
map.setHPDecProtect(DataTool.getIntConvert("protectItem", infoData, 0));
|
||||
map.setForcedReturnMap(DataTool.getInt(infoData.getChildByPath("forcedReturn"), 999999999));
|
||||
map.setForcedReturnMap(DataTool.getInt(infoData.getChildByPath("forcedReturn"), MapId.NONE));
|
||||
map.setBoat(mapData.getChildByPath("shipObj") != null);
|
||||
map.setTimeLimit(DataTool.getIntConvert("timeLimit", infoData, -1));
|
||||
map.setFieldType(DataTool.getIntConvert("fieldType", infoData, 0));
|
||||
@@ -381,15 +382,15 @@ public class MapFactory {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if (mapid < 100000000) {
|
||||
builder.append("maple");
|
||||
} else if (mapid >= 100000000 && mapid < 200000000) {
|
||||
} else if (mapid >= 100000000 && mapid < MapId.ORBIS) {
|
||||
builder.append("victoria");
|
||||
} else if (mapid >= 200000000 && mapid < 300000000) {
|
||||
} else if (mapid >= MapId.ORBIS && mapid < MapId.ELLIN_FOREST) {
|
||||
builder.append("ossyria");
|
||||
} else if (mapid >= 300000000 && mapid < 400000000) {
|
||||
} else if (mapid >= MapId.ELLIN_FOREST && mapid < 400000000) {
|
||||
builder.append("elin");
|
||||
} else if (mapid >= 540000000 && mapid < 560000000) {
|
||||
} else if (mapid >= MapId.SINGAPORE && mapid < 560000000) {
|
||||
builder.append("singapore");
|
||||
} else if (mapid >= 600000000 && mapid < 620000000) {
|
||||
} else if (mapid >= MapId.NEW_LEAF_CITY && mapid < 620000000) {
|
||||
builder.append("MasteriaGL");
|
||||
} else if (mapid >= 677000000 && mapid < 677100000) {
|
||||
builder.append("Episode1GL");
|
||||
@@ -403,7 +404,7 @@ public class MapFactory {
|
||||
builder.append("HalloweenGL");
|
||||
} else if (mapid >= 683000000 && mapid < 684000000) {
|
||||
builder.append("event");
|
||||
} else if (mapid >= 800000000 && mapid < 900000000) {
|
||||
} else if (mapid >= MapId.MUSHROOM_SHRINE && mapid < 900000000) {
|
||||
if ((mapid >= 889100000 && mapid < 889200000)) {
|
||||
builder.append("etc");
|
||||
} else {
|
||||
|
||||
@@ -33,6 +33,8 @@ import client.status.MonsterStatus;
|
||||
import client.status.MonsterStatusEffect;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import constants.id.MobId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.packet.Packet;
|
||||
import net.server.Server;
|
||||
@@ -119,7 +121,7 @@ public class MapleMap {
|
||||
private String streetName;
|
||||
private MapEffect mapEffect = null;
|
||||
private boolean everlast = false;
|
||||
private int forcedReturnMap = 999999999;
|
||||
private int forcedReturnMap = MapId.NONE;
|
||||
private int timeLimit;
|
||||
private long mapTimer;
|
||||
private int decHP = 0;
|
||||
@@ -263,7 +265,7 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
public MapleMap getReturnMap() {
|
||||
if (returnMapId == 999999999) {
|
||||
if (returnMapId == MapId.NONE) {
|
||||
return this;
|
||||
}
|
||||
return getChannelServer().getMapFactory().getMap(returnMapId);
|
||||
@@ -1301,11 +1303,11 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
public boolean damageMonster(final Character chr, final Monster monster, final int damage) {
|
||||
if (monster.getId() == 8800000) {
|
||||
if (monster.getId() == MobId.ZAKUM_1) {
|
||||
for (MapObject object : chr.getMap().getMapObjects()) {
|
||||
Monster mons = chr.getMap().getMonsterByOid(object.getObjectId());
|
||||
if (mons != null) {
|
||||
if (mons.getId() >= 8800003 && mons.getId() <= 8800010) {
|
||||
if (mons.getId() >= MobId.ZAKUM_ARM_1 && mons.getId() <= MobId.ZAKUM_ARM_8) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1412,13 +1414,13 @@ public class MapleMap {
|
||||
}
|
||||
}
|
||||
|
||||
if (monster.getId() >= 8800003 && monster.getId() <= 8800010) {
|
||||
if (MobId.isZakumArm(monster.getId())) {
|
||||
boolean makeZakReal = true;
|
||||
Collection<MapObject> objects = getMapObjects();
|
||||
for (MapObject object : objects) {
|
||||
Monster mons = getMonsterByOid(object.getObjectId());
|
||||
if (mons != null) {
|
||||
if (mons.getId() >= 8800003 && mons.getId() <= 8800010) {
|
||||
if (MobId.isZakumArm(mons.getId())) {
|
||||
makeZakReal = false;
|
||||
break;
|
||||
}
|
||||
@@ -1430,7 +1432,7 @@ public class MapleMap {
|
||||
for (MapObject object : objects) {
|
||||
Monster mons = map.getMonsterByOid(object.getObjectId());
|
||||
if (mons != null) {
|
||||
if (mons.getId() == 8800000) {
|
||||
if (mons.getId() == MobId.ZAKUM_1) {
|
||||
makeMonsterReal(mons);
|
||||
break;
|
||||
}
|
||||
@@ -1974,13 +1976,13 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
if (monster.getDropPeriodTime() > 0) { //9300102 - Watchhog, 9300061 - Moon Bunny (HPQ), 9300093 - Tylus
|
||||
if (monster.getId() == 9300102) {
|
||||
if (monster.getId() == MobId.WATCH_HOG) {
|
||||
monsterItemDrop(monster, monster.getDropPeriodTime());
|
||||
} else if (monster.getId() == 9300061) {
|
||||
} else if (monster.getId() == MobId.MOON_BUNNY) {
|
||||
monsterItemDrop(monster, monster.getDropPeriodTime() / 3);
|
||||
} else if (monster.getId() == 9300093) {
|
||||
} else if (monster.getId() == MobId.TYLUS) {
|
||||
monsterItemDrop(monster, monster.getDropPeriodTime());
|
||||
} else if (monster.getId() == 9400326 || monster.getId() == 9400331 || monster.getId() == 9400336) {
|
||||
} else if (monster.getId() == MobId.GIANT_SNOWMAN_LV5_EASY || monster.getId() == MobId.GIANT_SNOWMAN_LV5_MEDIUM || monster.getId() == MobId.GIANT_SNOWMAN_LV5_HARD) {
|
||||
monsterItemDrop(monster, monster.getDropPeriodTime());
|
||||
} else {
|
||||
FilePrinter.printError(FilePrinter.UNHANDLED_EVENT, "UNCODED TIMED MOB DETECTED: " + monster.getId());
|
||||
@@ -2387,7 +2389,7 @@ public class MapleMap {
|
||||
}
|
||||
}
|
||||
if (onUserEnter.length() != 0) {
|
||||
if (onUserEnter.equals("cygnusTest") && (mapid < 913040000 || mapid > 913040006)) {
|
||||
if (onUserEnter.equals("cygnusTest") && !MapId.isCygnusIntro(mapid)) {
|
||||
chr.saveLocation("INTRO");
|
||||
}
|
||||
|
||||
@@ -2398,52 +2400,52 @@ public class MapleMap {
|
||||
chr.cancelBuffStats(BuffStat.MONSTER_RIDING);
|
||||
}
|
||||
|
||||
if (mapid == 200090060) { // To Rien
|
||||
if (mapid == MapId.FROM_LITH_TO_RIEN) { // To Rien
|
||||
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(1));
|
||||
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() == 200090060) {
|
||||
chr.changeMap(140020300, 0);
|
||||
if (chr.getMapId() == MapId.FROM_LITH_TO_RIEN) {
|
||||
chr.changeMap(MapId.DANGEROUS_FOREST, 0);
|
||||
}
|
||||
}, travelTime);
|
||||
} else if (mapid == 200090070) { // To Lith Harbor
|
||||
} else if (mapid == MapId.FROM_RIEN_TO_LITH) { // To Lith Harbor
|
||||
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(1));
|
||||
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() == 200090070) {
|
||||
chr.changeMap(104000000, 3);
|
||||
if (chr.getMapId() == MapId.FROM_RIEN_TO_LITH) {
|
||||
chr.changeMap(MapId.LITH_HARBOUR, 3);
|
||||
}
|
||||
}, travelTime);
|
||||
} else if (mapid == 200090030) { // To Ereve (SkyFerry)
|
||||
} else if (mapid == MapId.FROM_ELLINIA_TO_EREVE) { // To Ereve (SkyFerry)
|
||||
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(2));
|
||||
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() == 200090030) {
|
||||
chr.changeMap(130000210, 0);
|
||||
if (chr.getMapId() == MapId.FROM_ELLINIA_TO_EREVE) {
|
||||
chr.changeMap(MapId.SKY_FERRY, 0);
|
||||
}
|
||||
}, travelTime);
|
||||
} else if (mapid == 200090031) { // To Victoria Island (SkyFerry)
|
||||
} else if (mapid == MapId.FROM_EREVE_TO_ELLINIA) { // To Victoria Island (SkyFerry)
|
||||
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(2));
|
||||
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() == 200090031) {
|
||||
chr.changeMap(101000400, 0);
|
||||
if (chr.getMapId() == MapId.FROM_EREVE_TO_ELLINIA) {
|
||||
chr.changeMap(MapId.ELLINIA_SKY_FERRY, 0);
|
||||
}
|
||||
}, travelTime);
|
||||
} else if (mapid == 200090021) { // To Orbis (SkyFerry)
|
||||
} else if (mapid == MapId.FROM_EREVE_TO_ORBIS) { // To Orbis (SkyFerry)
|
||||
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(8));
|
||||
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() == 200090021) {
|
||||
chr.changeMap(200000161, 0);
|
||||
if (chr.getMapId() == MapId.FROM_EREVE_TO_ORBIS) {
|
||||
chr.changeMap(MapId.ORBIS_STATION, 0);
|
||||
}
|
||||
}, travelTime);
|
||||
} else if (mapid == 200090020) { // To Ereve From Orbis (SkyFerry)
|
||||
} else if (mapid == MapId.FROM_ORBIS_TO_EREVE) { // To Ereve From Orbis (SkyFerry)
|
||||
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(8));
|
||||
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (chr.getMapId() == 200090020) {
|
||||
chr.changeMap(130000210, 0);
|
||||
if (chr.getMapId() == MapId.FROM_ORBIS_TO_EREVE) {
|
||||
chr.changeMap(MapId.SKY_FERRY, 0);
|
||||
}
|
||||
}, travelTime);
|
||||
} else if (MiniDungeonInfo.isDungeonMap(mapid)) {
|
||||
@@ -2549,7 +2551,7 @@ public class MapleMap {
|
||||
mapEffect.sendStartData(chr.getClient());
|
||||
}
|
||||
chr.sendPacket(PacketCreator.resetForcedStats());
|
||||
if (mapid == 914000200 || mapid == 914000210 || mapid == 914000220) {
|
||||
if (MapId.isGodlyStatMap(mapid)) {
|
||||
chr.sendPacket(PacketCreator.aranGodlyStats());
|
||||
}
|
||||
if (chr.getEventInstance() != null && chr.getEventInstance().isTimerStarted()) {
|
||||
@@ -2563,7 +2565,7 @@ public class MapleMap {
|
||||
chr.sendPacket(PacketCreator.getClock((int) (chr.getOla().getTimeLeft() / 1000)));
|
||||
}
|
||||
|
||||
if (mapid == 109060000) {
|
||||
if (mapid == MapId.EVENT_SNOWBALL) {
|
||||
chr.sendPacket(PacketCreator.rollSnowBall(true, 0, null, null));
|
||||
}
|
||||
|
||||
@@ -2590,7 +2592,7 @@ public class MapleMap {
|
||||
public Portal getRandomPlayerSpawnpoint() {
|
||||
List<Portal> spawnPoints = new ArrayList<>();
|
||||
for (Portal portal : portals.values()) {
|
||||
if (portal.getType() >= 0 && portal.getType() <= 1 && portal.getTargetMapId() == 999999999) {
|
||||
if (portal.getType() >= 0 && portal.getType() <= 1 && portal.getTargetMapId() == MapId.NONE) {
|
||||
spawnPoints.add(portal);
|
||||
}
|
||||
}
|
||||
@@ -2603,7 +2605,7 @@ public class MapleMap {
|
||||
double shortestDistance = Double.POSITIVE_INFINITY;
|
||||
for (Portal portal : portals.values()) {
|
||||
double distance = portal.getPosition().distanceSq(from);
|
||||
if (portal.getType() == Portal.TELEPORT_PORTAL && distance < shortestDistance && portal.getTargetMapId() != 999999999) {
|
||||
if (portal.getType() == Portal.TELEPORT_PORTAL && distance < shortestDistance && portal.getTargetMapId() != MapId.NONE) {
|
||||
closest = portal;
|
||||
shortestDistance = distance;
|
||||
}
|
||||
@@ -2616,7 +2618,7 @@ public class MapleMap {
|
||||
double shortestDistance = Double.POSITIVE_INFINITY;
|
||||
for (Portal portal : portals.values()) {
|
||||
double distance = portal.getPosition().distanceSq(from);
|
||||
if (portal.getType() >= 0 && portal.getType() <= 1 && distance < shortestDistance && portal.getTargetMapId() == 999999999) {
|
||||
if (portal.getType() >= 0 && portal.getType() <= 1 && distance < shortestDistance && portal.getTargetMapId() == MapId.NONE) {
|
||||
closest = portal;
|
||||
shortestDistance = distance;
|
||||
}
|
||||
@@ -3894,20 +3896,21 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
public void startEvent(final Character chr) {
|
||||
if (this.mapid == 109080000 && getCoconut() == null) {
|
||||
if (this.mapid == MapId.EVENT_COCONUT_HARVEST && getCoconut() == null) {
|
||||
setCoconut(new Coconut(this));
|
||||
coconut.startEvent();
|
||||
} else if (this.mapid == 109040000) {
|
||||
} else if (this.mapid == MapId.EVENT_PHYSICAL_FITNESS) {
|
||||
chr.setFitness(new Fitness(chr));
|
||||
chr.getFitness().startFitness();
|
||||
} else if (this.mapid == 109030101 || this.mapid == 109030201 || this.mapid == 109030301 || this.mapid == 109030401) {
|
||||
} else if (this.mapid == MapId.EVENT_OLA_OLA_1 || this.mapid == MapId.EVENT_OLA_OLA_2 ||
|
||||
this.mapid == MapId.EVENT_OLA_OLA_3 || this.mapid == MapId.EVENT_OLA_OLA_4) {
|
||||
chr.setOla(new Ola(chr));
|
||||
chr.getOla().startOla();
|
||||
} else if (this.mapid == 109020001 && getOx() == null) {
|
||||
} else if (this.mapid == MapId.EVENT_OX_QUIZ && getOx() == null) {
|
||||
setOx(new OxQuiz(this));
|
||||
getOx().sendQuestion();
|
||||
setOxQuiz(true);
|
||||
} else if (this.mapid == 109060000 && getSnowball(chr.getTeam()) == null) {
|
||||
} else if (this.mapid == MapId.EVENT_SNOWBALL && getSnowball(chr.getTeam()) == null) {
|
||||
setSnowball(0, new Snowball(0, this));
|
||||
setSnowball(1, new Snowball(1, this));
|
||||
getSnowball(chr.getTeam()).startEvent();
|
||||
@@ -3929,13 +3932,13 @@ public class MapleMap {
|
||||
public String getEventNPC() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Talk to ");
|
||||
if (mapid == 60000) {
|
||||
if (mapid == MapId.SOUTHPERRY) {
|
||||
sb.append("Paul!");
|
||||
} else if (mapid == 104000000) {
|
||||
} else if (mapid == MapId.LITH_HARBOUR) {
|
||||
sb.append("Jean!");
|
||||
} else if (mapid == 200000000) {
|
||||
} else if (mapid == MapId.ORBIS) {
|
||||
sb.append("Martin!");
|
||||
} else if (mapid == 220000000) {
|
||||
} else if (mapid == MapId.LUDIBRIUM) {
|
||||
sb.append("Tony!");
|
||||
} else {
|
||||
return null;
|
||||
@@ -3944,15 +3947,16 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
public boolean hasEventNPC() {
|
||||
return this.mapid == 60000 || this.mapid == 104000000 || this.mapid == 200000000 || this.mapid == 220000000;
|
||||
return this.mapid == 60000 || this.mapid == MapId.LITH_HARBOUR || this.mapid == MapId.ORBIS || this.mapid == MapId.LUDIBRIUM;
|
||||
}
|
||||
|
||||
public boolean isStartingEventMap() {
|
||||
return this.mapid == 109040000 || this.mapid == 109020001 || this.mapid == 109010000 || this.mapid == 109030001 || this.mapid == 109030101;
|
||||
return this.mapid == MapId.EVENT_PHYSICAL_FITNESS || this.mapid == MapId.EVENT_OX_QUIZ ||
|
||||
this.mapid == MapId.EVENT_FIND_THE_JEWEL || this.mapid == MapId.EVENT_OLA_OLA_0 || this.mapid == MapId.EVENT_OLA_OLA_1;
|
||||
}
|
||||
|
||||
public boolean isEventMap() {
|
||||
return this.mapid >= 109010000 && this.mapid < 109050000 || this.mapid > 109050001 && this.mapid <= 109090000;
|
||||
return this.mapid >= MapId.EVENT_FIND_THE_JEWEL && this.mapid < MapId.EVENT_WINNER || this.mapid > MapId.EVENT_EXIT && this.mapid <= 109090000;
|
||||
}
|
||||
|
||||
public void setTimeMob(int id, String msg) {
|
||||
@@ -4033,7 +4037,7 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
public boolean isHorntailDefeated() { // all parts of dead horntail can be found here?
|
||||
for (int i = 8810010; i <= 8810017; i++) {
|
||||
for (int i = MobId.DEAD_HORNTAIL_MIN; i <= MobId.DEAD_HORNTAIL_MAX; i++) {
|
||||
if (getMonsterById(i) == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -4043,10 +4047,10 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
public void spawnHorntailOnGroundBelow(final Point targetPoint) { // ayy lmao
|
||||
Monster htIntro = LifeFactory.getMonster(8810026);
|
||||
Monster htIntro = LifeFactory.getMonster(MobId.SUMMON_HORNTAIL);
|
||||
spawnMonsterOnGroundBelow(htIntro, targetPoint); // htintro spawn animation converting into horntail detected thanks to Arnah
|
||||
|
||||
final Monster ht = LifeFactory.getMonster(8810018);
|
||||
final Monster ht = LifeFactory.getMonster(MobId.HORNTAIL);
|
||||
ht.setParentMobOid(htIntro.getObjectId());
|
||||
ht.addListener(new MonsterListener() {
|
||||
@Override
|
||||
@@ -4064,8 +4068,8 @@ public class MapleMap {
|
||||
});
|
||||
spawnMonsterOnGroundBelow(ht, targetPoint);
|
||||
|
||||
for (int x = 8810002; x <= 8810009; x++) {
|
||||
Monster m = LifeFactory.getMonster(x);
|
||||
for (int mobId = MobId.HORNTAIL_HEAD_A; mobId <= MobId.HORNTAIL_TAIL; mobId++) {
|
||||
Monster m = LifeFactory.getMonster(mobId);
|
||||
m.setParentMobOid(htIntro.getObjectId());
|
||||
|
||||
m.addListener(new MonsterListener() {
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
package server.maps;
|
||||
|
||||
import constants.id.MapId;
|
||||
|
||||
/**
|
||||
* @author Alan (SharpAceX)
|
||||
*/
|
||||
@@ -29,18 +31,18 @@ public enum MiniDungeonInfo {
|
||||
|
||||
//http://bbb.hidden-street.net/search_finder/mini%20dungeon
|
||||
|
||||
CAVE_OF_MUSHROOMS(105050100, 105050101, 30),
|
||||
GOLEM_CASTLE_RUINS(105040304, 105040320, 34),
|
||||
HILL_OF_SANDSTORMS(260020600, 260020630, 30),
|
||||
HENESYS_PIG_FARM(100020000, 100020100, 30),
|
||||
DRAKES_BLUE_CAVE(105090311, 105090320, 30),
|
||||
DRUMMER_BUNNYS_LAIR(221023400, 221023401, 30),
|
||||
THE_ROUND_TABLE_OF_KENTARUS(240020500, 240020512, 30),
|
||||
THE_RESTORING_MEMORY(240040511, 240040800, 19),
|
||||
NEWT_SECURED_ZONE(240040520, 240040900, 19),
|
||||
PILLAGE_OF_TREASURE_ISLAND(251010402, 251010410, 30),
|
||||
CRITICAL_ERROR(261020300, 261020301, 30),
|
||||
LONGEST_RIDE_ON_BYEBYE_STATION(551030000, 551030001, 19);
|
||||
CAVE_OF_MUSHROOMS(MapId.ANT_TUNNEL_2, MapId.CAVE_OF_MUSHROOMS_BASE, 30), // Horny Mushroom, Zombie Mushroom
|
||||
GOLEM_CASTLE_RUINS(MapId.SLEEPY_DUNGEON_4, MapId.GOLEMS_CASTLE_RUINS_BASE, 34), // Stone Golem, Mixed Golem
|
||||
HILL_OF_SANDSTORMS(MapId.SAHEL_2, MapId.HILL_OF_SANDSTORMS_BASE, 30), // Sand Rat
|
||||
HENESYS_PIG_FARM(MapId.RAIN_FOREST_EAST_OF_HENESYS, MapId.HENESYS_PIG_FARM_BASE, 30), // Pig, Ribbon Pig
|
||||
DRAKES_BLUE_CAVE(MapId.COLD_CRADLE, MapId.DRAKES_BLUE_CAVE_BASE, 30), // Dark Drake
|
||||
DRUMMER_BUNNYS_LAIR(MapId.EOS_TOWER_76TH_TO_90TH_FLOOR, MapId.DRUMMER_BUNNYS_LAIR_BASE, 30), // Drumming Bunny
|
||||
THE_ROUND_TABLE_OF_KENTARUS(MapId.BATTLEFIELD_OF_FIRE_AND_WATER, MapId.ROUND_TABLE_OF_KENTAURUS_BASE, 30), // Blue/Red/Black Kentaurus
|
||||
THE_RESTORING_MEMORY(MapId.DRAGON_NEST_LEFT_BEHIND, MapId.RESTORING_MEMORY_BASE, 19), // Skelegon, Skelosaurus
|
||||
NEWT_SECURED_ZONE(MapId.DESTROYED_DRAGON_NEST, MapId.NEWT_SECURED_ZONE_BASE, 19), // Jr. Newtie, Transforming Jr. Newtie
|
||||
PILLAGE_OF_TREASURE_ISLAND(MapId.RED_NOSE_PIRATE_DEN_2, MapId.PILLAGE_OF_TREASURE_ISLAND_BASE, 30), // Captain
|
||||
CRITICAL_ERROR(MapId.LAB_AREA_C1, MapId.CRITICAL_ERROR_BASE, 30), // Roid
|
||||
LONGEST_RIDE_ON_BYEBYE_STATION(MapId.FANTASY_THEME_PARK_3, MapId.LONGEST_RIDE_ON_BYEBYE_STATION, 19); // Froscola, Jester Scarlion
|
||||
|
||||
private final int baseId;
|
||||
private final int dungeonId;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user