Remove "Maple" prefix from MaplePacketCreator name
This commit is contained in:
@@ -57,18 +57,18 @@ function cancelSchedule() {
|
|||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
const Server = Java.type('net.server.Server');
|
const Server = Java.type('net.server.Server');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
|
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
|
||||||
world.setExpRate(8);
|
world.setExpRate(8);
|
||||||
world.broadcastPacket(MaplePacketCreator.serverNotice(6, "The Bunny Onslaught Survival Scanner (BOSS) has detected an Easter Bunny onslaught soon! The GM team has activated the Emergency XP Pool (EXP) that doubles experience gained for the next two hours!"));
|
world.broadcastPacket(PacketCreator.serverNotice(6, "The Bunny Onslaught Survival Scanner (BOSS) has detected an Easter Bunny onslaught soon! The GM team has activated the Emergency XP Pool (EXP) that doubles experience gained for the next two hours!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop() {
|
function stop() {
|
||||||
const Server = Java.type('net.server.Server');
|
const Server = Java.type('net.server.Server');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
|
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
|
||||||
world.setExpRate(4);
|
world.setExpRate(4);
|
||||||
world.broadcastPacket(MaplePacketCreator.serverNotice(6, "Unfortunately the Emergency XP Pool (EXP) has run out of juice for now and needs to recharge causing the EXP rate to go back to normal."));
|
world.broadcastPacket(PacketCreator.serverNotice(6, "Unfortunately the Emergency XP Pool (EXP) has run out of juice for now and needs to recharge causing the EXP rate to go back to normal."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- FILLER FUNCTIONS ----------
|
// ---------- FILLER FUNCTIONS ----------
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 0);
|
player.changeMap(entryMap, 0);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 0);
|
player.changeMap(entryMap, 0);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 0);
|
player.changeMap(entryMap, 0);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 0);
|
player.changeMap(entryMap, 0);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 0);
|
player.changeMap(entryMap, 0);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 0);
|
player.changeMap(entryMap, 0);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 2);
|
player.changeMap(entryMap, 2);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 1);
|
player.changeMap(entryMap, 1);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ function start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(560, 50));
|
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(560, 50));
|
||||||
mapObj.broadcastMessage(MaplePacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
|
mapObj.broadcastMessage(PacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var gcent = MapleLifeFactory.getMonster(5220004);
|
var gcent = MapleLifeFactory.getMonster(5220004);
|
||||||
herbGarden.spawnMonsterOnGroundBelow(gcent, new Point(560, 50));
|
herbGarden.spawnMonsterOnGroundBelow(gcent, new Point(560, 50));
|
||||||
herbGarden.broadcastMessage(MaplePacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears."));
|
herbGarden.broadcastMessage(PacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var deo = MapleLifeFactory.getMonster(3220001);
|
var deo = MapleLifeFactory.getMonster(3220001);
|
||||||
royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Point(645, 275));
|
royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Point(645, 275));
|
||||||
royalCatthusDesert.broadcastMessage(MaplePacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust."));
|
royalCatthusDesert.broadcastMessage(PacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,13 +49,13 @@ function start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
|
|
||||||
var boss = MapleLifeFactory.getMonster(bossMobid);
|
var boss = MapleLifeFactory.getMonster(bossMobid);
|
||||||
var bossPos = new Point(467, 0);
|
var bossPos = new Point(467, 0);
|
||||||
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
||||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
|
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
|
||||||
|
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var boss = MapleLifeFactory.getMonster(bossMobid);
|
var boss = MapleLifeFactory.getMonster(bossMobid);
|
||||||
var bossPos = new Point(201, 80);
|
var bossPos = new Point(201, 80);
|
||||||
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
||||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
|
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
|
||||||
|
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var boss = MapleLifeFactory.getMonster(bossMobid);
|
var boss = MapleLifeFactory.getMonster(bossMobid);
|
||||||
var bossPos = new Point(251, -841);
|
var bossPos = new Point(251, -841);
|
||||||
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
||||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
|
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
|
||||||
|
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var boss = MapleLifeFactory.getMonster(bossMobid);
|
var boss = MapleLifeFactory.getMonster(bossMobid);
|
||||||
var bossPos = new Point(842, 0);
|
var bossPos = new Point(842, 0);
|
||||||
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
||||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
|
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
|
||||||
|
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var boss = MapleLifeFactory.getMonster(bossMobid);
|
var boss = MapleLifeFactory.getMonster(bossMobid);
|
||||||
var bossPos = new Point(461, 61);
|
var bossPos = new Point(461, 61);
|
||||||
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
||||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
|
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
|
||||||
|
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var boss = MapleLifeFactory.getMonster(bossMobid);
|
var boss = MapleLifeFactory.getMonster(bossMobid);
|
||||||
var bossPos = new Point(171, 50);
|
var bossPos = new Point(171, 50);
|
||||||
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
map.spawnMonsterOnGroundBelow(boss, bossPos);
|
||||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, bossMsg));
|
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
|
||||||
|
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ function start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const spawnpoint = new Point(90, 119);
|
const spawnpoint = new Point(90, 119);
|
||||||
dangeroudCroko1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(6220000), spawnpoint);
|
dangeroudCroko1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(6220000), spawnpoint);
|
||||||
dangeroudCroko1.broadcastMessage(MaplePacketCreator.serverNotice(6, "The huge crocodile Dyle has come out from the swamp."));
|
dangeroudCroko1.broadcastMessage(PacketCreator.serverNotice(6, "The huge crocodile Dyle has come out from the swamp."));
|
||||||
setupTask = em.schedule("start", 3 * 60 * 60 * 1000);
|
setupTask = em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,11 +52,11 @@ function start() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const spawnpoint = new Point(208, 83);
|
const spawnpoint = new Point(208, 83);
|
||||||
stairwayToTheSky2.spawnMonsterOnGroundBelow(eliza, spawnpoint);
|
stairwayToTheSky2.spawnMonsterOnGroundBelow(eliza, spawnpoint);
|
||||||
stairwayToTheSky2.broadcastMessage(MaplePacketCreator.serverNotice(6, "Eliza has appeared with a black whirlwind."));
|
stairwayToTheSky2.broadcastMessage(PacketCreator.serverNotice(6, "Eliza has appeared with a black whirlwind."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ function start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
|
|
||||||
var faust1 = MapleLifeFactory.getMonster(5220002);
|
var faust1 = MapleLifeFactory.getMonster(5220002);
|
||||||
const spawnpoint = new Point(456, 278);
|
const spawnpoint = new Point(456, 278);
|
||||||
theForestOfEvil1.spawnMonsterOnGroundBelow(faust1, spawnpoint);
|
theForestOfEvil1.spawnMonsterOnGroundBelow(faust1, spawnpoint);
|
||||||
theForestOfEvil1.broadcastMessage(MaplePacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
|
theForestOfEvil1.broadcastMessage(PacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(474, 278);
|
const spawnpoint = new Point(474, 278);
|
||||||
theForestOfEvil2.spawnMonsterOnGroundBelow(faust2, spawnpoint);
|
theForestOfEvil2.spawnMonsterOnGroundBelow(faust2, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
theForestOfEvil2.broadcastMessage(MaplePacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
|
theForestOfEvil2.broadcastMessage(PacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
labSecretBasementPath.spawnMonsterOnGroundBelow(chimera, spawnpoint);
|
labSecretBasementPath.spawnMonsterOnGroundBelow(chimera, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
labSecretBasementPath.broadcastMessage(MaplePacketCreator.serverNotice(6, "Kimera has appeared out of the darkness of the underground with a glitter in her eyes."));
|
labSecretBasementPath.broadcastMessage(PacketCreator.serverNotice(6, "Kimera has appeared out of the darkness of the underground with a glitter in her eyes."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
hotSand.spawnMonsterOnGroundBelow(kingClang, spawnpoint);
|
hotSand.spawnMonsterOnGroundBelow(kingClang, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
hotSand.broadcastMessage(MaplePacketCreator.serverNotice(6, "A strange turban shell has appeared on the beach."));
|
hotSand.broadcastMessage(PacketCreator.serverNotice(6, "A strange turban shell has appeared on the beach."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
goblinForest2.spawnMonsterOnGroundBelow(kingSageCat, spawnpoint);
|
goblinForest2.spawnMonsterOnGroundBelow(kingSageCat, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
goblinForest2.broadcastMessage(MaplePacketCreator.serverNotice(6, "The ghostly air around here has become stronger. The unpleasant sound of a cat crying can be heard."));
|
goblinForest2.broadcastMessage(PacketCreator.serverNotice(6, "The ghostly air around here has become stronger. The unpleasant sound of a cat crying can be heard."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
leviathansCanyon.spawnMonsterOnGroundBelow(leviathan, spawnpoint);
|
leviathansCanyon.spawnMonsterOnGroundBelow(leviathan, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
leviathansCanyon.broadcastMessage(MaplePacketCreator.serverNotice(6, "Leviathan emerges from the canyon and the cold icy wind blows."));
|
leviathansCanyon.broadcastMessage(PacketCreator.serverNotice(6, "Leviathan emerges from the canyon and the cold icy wind blows."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(279, -496);
|
const spawnpoint = new Point(279, -496);
|
||||||
thicketAroundTheBeach3.spawnMonsterOnGroundBelow(mano, spawnpoint);
|
thicketAroundTheBeach3.spawnMonsterOnGroundBelow(mano, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
thicketAroundTheBeach3.broadcastMessage(MaplePacketCreator.serverNotice(6, "A cool breeze was felt when Mano appeared."));
|
thicketAroundTheBeach3.broadcastMessage(PacketCreator.serverNotice(6, "A cool breeze was felt when Mano appeared."));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
moonRidge.spawnMonsterOnGroundBelow(nineTailedFox, spawnpoint);
|
moonRidge.spawnMonsterOnGroundBelow(nineTailedFox, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
moonRidge.broadcastMessage(MaplePacketCreator.serverNotice(6, "As the moon light dims, a long fox cry can be heard and the presence of the old fox can be felt"));
|
moonRidge.broadcastMessage(PacketCreator.serverNotice(6, "As the moon light dims, a long fox cry can be heard and the presence of the old fox can be felt"));
|
||||||
em.schedule("start", 3 * 60 *60 * 1000);
|
em.schedule("start", 3 * 60 *60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
theSeaweedTower.spawnMonsterOnGroundBelow(seruf, spawnpoint);
|
theSeaweedTower.spawnMonsterOnGroundBelow(seruf, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
theSeaweedTower.broadcastMessage(MaplePacketCreator.serverNotice(6, "A strange shell has appeared from a grove of seaweed"));
|
theSeaweedTower.broadcastMessage(PacketCreator.serverNotice(6, "A strange shell has appeared from a grove of seaweed"));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,11 +52,11 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var snackBar = MapleLifeFactory.getMonster(8220008);
|
var snackBar = MapleLifeFactory.getMonster(8220008);
|
||||||
snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Point(rndPos[0], rndPos[1]));
|
snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Point(rndPos[0], rndPos[1]));
|
||||||
snackBarMap.broadcastMessage(MaplePacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place."));
|
snackBarMap.broadcastMessage(PacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
eastRockyMountain5.spawnMonsterOnGroundBelow(stumpy, spawnpoint);
|
eastRockyMountain5.spawnMonsterOnGroundBelow(stumpy, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
eastRockyMountain5.broadcastMessage(MaplePacketCreator.serverNotice(6, "Stumpy has appeared with a stumping sound that rings the Stone Mountain."));
|
eastRockyMountain5.broadcastMessage(PacketCreator.serverNotice(6, "Stumpy has appeared with a stumping sound that rings the Stone Mountain."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
territoryOfWanderingBear.spawnMonsterOnGroundBelow(taeRoon, spawnpoint);
|
territoryOfWanderingBear.spawnMonsterOnGroundBelow(taeRoon, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
territoryOfWanderingBear.broadcastMessage(MaplePacketCreator.serverNotice(6, "Tae Roon has appeared with a soft whistling sound."));
|
territoryOfWanderingBear.broadcastMessage(PacketCreator.serverNotice(6, "Tae Roon has appeared with a soft whistling sound."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
whirlpoolOfTime.spawnMonsterOnGroundBelow(timer1, spawnpoint);
|
whirlpoolOfTime.spawnMonsterOnGroundBelow(timer1, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
whirlpoolOfTime.broadcastMessage(MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
|
whirlpoolOfTime.broadcastMessage(PacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
lostTime1.spawnMonsterOnGroundBelow(timer2, spawnpoint);
|
lostTime1.spawnMonsterOnGroundBelow(timer2, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
lostTime1.broadcastMessage(MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
|
lostTime1.broadcastMessage(PacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ function start() {
|
|||||||
const spawnpoint = new Point(posX, posY);
|
const spawnpoint = new Point(posX, posY);
|
||||||
lostTime2.spawnMonsterOnGroundBelow(timer3, spawnpoint);
|
lostTime2.spawnMonsterOnGroundBelow(timer3, spawnpoint);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
lostTime2.broadcastMessage(MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
|
lostTime2.broadcastMessage(PacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ function start() {
|
|||||||
|
|
||||||
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
const MapleLifeFactory = Java.type('server.life.MapleLifeFactory');
|
||||||
const Point = Java.type('java.awt.Point');
|
const Point = Java.type('java.awt.Point');
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
var zeno = MapleLifeFactory.getMonster(6220001);
|
var zeno = MapleLifeFactory.getMonster(6220001);
|
||||||
graysPrairie.spawnMonsterOnGroundBelow(zeno, new Point(-4224, 776));
|
graysPrairie.spawnMonsterOnGroundBelow(zeno, new Point(-4224, 776));
|
||||||
graysPrairie.broadcastMessage(MaplePacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery."));
|
graysPrairie.broadcastMessage(PacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery."));
|
||||||
em.schedule("start", 3 * 60 * 60 * 1000);
|
em.schedule("start", 3 * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 1);
|
player.changeMap(entryMap, 1);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ function approach() {
|
|||||||
em.setProperty("haveBalrog","true");
|
em.setProperty("haveBalrog","true");
|
||||||
Boat_to_Orbis.broadcastEnemyShip(true);
|
Boat_to_Orbis.broadcastEnemyShip(true);
|
||||||
Boat_to_Ellinia.broadcastEnemyShip(true);
|
Boat_to_Ellinia.broadcastEnemyShip(true);
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
Boat_to_Orbis.broadcastMessage(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
|
Boat_to_Orbis.broadcastMessage(PacketCreator.musicChange("Bgm04/ArabPirate"));
|
||||||
Boat_to_Ellinia.broadcastMessage(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
|
Boat_to_Ellinia.broadcastMessage(PacketCreator.musicChange("Bgm04/ArabPirate"));
|
||||||
|
|
||||||
em.schedule("invasion", invasionDelay);
|
em.schedule("invasion", invasionDelay);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ function playerEntry(eim, player) {
|
|||||||
player.changeMap(entryMap, 0);
|
player.changeMap(entryMap, 0);
|
||||||
em.setProperty("noEntry","true");
|
em.setProperty("noEntry","true");
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
|
player.getClient().announce(PacketCreator.getClock(eventTime * 60));
|
||||||
eim.startEventTimer(eventTime * 60000);
|
eim.startEventTimer(eventTime * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ function playerEntry(eim, player) {
|
|||||||
onRide = eim.getMapFactory().getMap(birdRide[myRide]);
|
onRide = eim.getMapFactory().getMap(birdRide[myRide]);
|
||||||
player.changeMap(onRide, onRide.getPortal(0));
|
player.changeMap(onRide, onRide.getPortal(0));
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(rideTime / 1000));
|
player.getClient().announce(PacketCreator.getClock(rideTime / 1000));
|
||||||
eim.schedule("timeOut", rideTime);
|
eim.schedule("timeOut", rideTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -250,8 +250,8 @@ function friendlyItemDrop(eim, mob) {
|
|||||||
var cakes = eim.getIntProperty("bunnyCake") + 1;
|
var cakes = eim.getIntProperty("bunnyCake") + 1;
|
||||||
eim.setIntProperty("bunnyCake", cakes);
|
eim.setIntProperty("bunnyCake", cakes);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
mob.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "The Moon Bunny made rice cake number " + cakes + "."));
|
mob.getMap().broadcastMessage(PacketCreator.serverNotice(6, "The Moon Bunny made rice cake number " + cakes + "."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,8 +259,8 @@ function friendlyDamaged(eim, mob) {
|
|||||||
if (mob.getId() == 9300061) {
|
if (mob.getId() == 9300061) {
|
||||||
var bunnyDamage = eim.getIntProperty("bunnyDamaged") + 1;
|
var bunnyDamage = eim.getIntProperty("bunnyDamaged") + 1;
|
||||||
if (bunnyDamage > 5) {
|
if (bunnyDamage > 5) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
broadcastMessage(MaplePacketCreator.serverNotice(6, "The Moon Bunny is feeling sick. Please protect it so it can make delicious rice cakes."));
|
broadcastMessage(PacketCreator.serverNotice(6, "The Moon Bunny is feeling sick. Please protect it so it can make delicious rice cakes."));
|
||||||
eim.setIntProperty("bunnyDamaged", 0);
|
eim.setIntProperty("bunnyDamaged", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ function playerEntry(eim, player) {
|
|||||||
onRide = eim.getMapFactory().getMap(trainRide[myRide]);
|
onRide = eim.getMapFactory().getMap(trainRide[myRide]);
|
||||||
player.changeMap(onRide, onRide.getPortal(0));
|
player.changeMap(onRide, onRide.getPortal(0));
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getClient().announce(MaplePacketCreator.getClock(rideTime / 1000));
|
player.getClient().announce(PacketCreator.getClock(rideTime / 1000));
|
||||||
player.getClient().announce(MaplePacketCreator.earnTitleMessage("The next stop is at Kerning " + (myRide == 0 ? "Square" : "Subway") + " Station. The exit is to your left."));
|
player.getClient().announce(PacketCreator.earnTitleMessage("The next stop is at Kerning " + (myRide == 0 ? "Square" : "Subway") + " Station. The exit is to your left."));
|
||||||
eim.schedule("timeOut", rideTime);
|
eim.schedule("timeOut", rideTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ function playerEntry(eim, player) {
|
|||||||
var map = eim.getMapInstance(entryMap);
|
var map = eim.getMapInstance(entryMap);
|
||||||
player.changeMap(map, map.getPortal(0));
|
player.changeMap(map, map.getPortal(0));
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.announce(MaplePacketCreator.showEffect("event/space/start"));
|
player.announce(PacketCreator.showEffect("event/space/start"));
|
||||||
player.startMapEffect("Please rescue Gaga within the time limit.", 5120027);
|
player.startMapEffect("Please rescue Gaga within the time limit.", 5120027);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ function stopEntry() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function takeoff() {
|
function takeoff() {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
|
|
||||||
//sound src: https://www.soundjay.com/transportation/metro-door-close-01.mp3
|
//sound src: https://www.soundjay.com/transportation/metro-door-close-01.mp3
|
||||||
KC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
|
KC_docked.broadcastMessage(PacketCreator.playSound("subway/whistle"));
|
||||||
NLC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
|
NLC_docked.broadcastMessage(PacketCreator.playSound("subway/whistle"));
|
||||||
|
|
||||||
em.setProperty("docked","false");
|
em.setProperty("docked","false");
|
||||||
KC_Waiting.warpEveryone(Subway_to_NLC.getId());
|
KC_Waiting.warpEveryone(Subway_to_NLC.getId());
|
||||||
@@ -53,9 +53,9 @@ function arrived() {
|
|||||||
Subway_to_NLC.warpEveryone(NLC_docked.getId(), 0);
|
Subway_to_NLC.warpEveryone(NLC_docked.getId(), 0);
|
||||||
scheduleNew();
|
scheduleNew();
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
KC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
|
KC_docked.broadcastMessage(PacketCreator.playSound("subway/whistle"));
|
||||||
NLC_docked.broadcastMessage(MaplePacketCreator.playSound("subway/whistle"));
|
NLC_docked.broadcastMessage(PacketCreator.playSound("subway/whistle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelSchedule() {}
|
function cancelSchedule() {}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ function start(ms) {
|
|||||||
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
|
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
|
||||||
|
|
||||||
if(map.getDocked()) {
|
if(map.getDocked()) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
ms.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
|
ms.getClient().announce(PacketCreator.musicChange("Bgm04/ArabPirate"));
|
||||||
ms.getClient().announce(MaplePacketCreator.crogBoatPacket(true));
|
ms.getClient().announce(PacketCreator.crogBoatPacket(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ function start(ms) {
|
|||||||
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
|
var map = ms.getClient().getChannelServer().getMapFactory().getMap(mapId);
|
||||||
|
|
||||||
if(map.getDocked()) {
|
if(map.getDocked()) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
ms.getClient().announce(MaplePacketCreator.musicChange("Bgm04/ArabPirate"));
|
ms.getClient().announce(PacketCreator.musicChange("Bgm04/ArabPirate"));
|
||||||
ms.getClient().announce(MaplePacketCreator.crogBoatPacket(true));
|
ms.getClient().announce(PacketCreator.crogBoatPacket(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ function action(mode, type, selection) {
|
|||||||
cm.gainItem(itemToUse, -1);
|
cm.gainItem(itemToUse, -1);
|
||||||
|
|
||||||
cm.getPlayer().getCashShop().gainCash(1, nxAmount);
|
cm.getPlayer().getCashShop().gainCash(1, nxAmount);
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getPlayer().announce(MaplePacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX"));
|
cm.getPlayer().announce(PacketCreator.earnTitleMessage("You have earned " + nxAmount + " NX"));
|
||||||
cm.logLeaf(nxAmount + " NX");
|
cm.logLeaf(nxAmount + " NX");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
} else if(choice == 2) {
|
} else if(choice == 2) {
|
||||||
|
|||||||
@@ -156,8 +156,8 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
||||||
status = 4;
|
status = 4;
|
||||||
} else if (selection == 3) {
|
} else if (selection == 3) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
player.getMap().broadcastMessage(PacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||||
cm.endExpedition(expedition);
|
cm.endExpedition(expedition);
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ function action(mode, type, selection) {
|
|||||||
status--;
|
status--;
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
cm.getMap().broadcastMessage(PacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||||
|
|
||||||
if(cm.isQuestStarted(3114)) {
|
if(cm.isQuestStarted(3114)) {
|
||||||
var idx = -1 * cm.getQuestProgressInt(3114); // infoEx without infoNumber, must use one progress only, critical hit!
|
var idx = -1 * cm.getQuestProgressInt(3114); // infoEx without infoNumber, must use one progress only, critical hit!
|
||||||
@@ -57,8 +57,8 @@ function action(mode, type, selection) {
|
|||||||
if(harpNote != nextNote) {
|
if(harpNote != nextNote) {
|
||||||
cm.setQuestProgress(3114, 0);
|
cm.setQuestProgress(3114, 0);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
cm.message("You've missed the note... Start over again.");
|
cm.message("You've missed the note... Start over again.");
|
||||||
} else {
|
} else {
|
||||||
@@ -71,8 +71,8 @@ function action(mode, type, selection) {
|
|||||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||||
cm.setQuestProgress(3114, 42);
|
cm.setQuestProgress(3114, 42);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/clear"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Clear"));
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ function action(mode, type, selection) {
|
|||||||
status--;
|
status--;
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
cm.getMap().broadcastMessage(PacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||||
|
|
||||||
if(cm.isQuestStarted(3114)) {
|
if(cm.isQuestStarted(3114)) {
|
||||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||||
@@ -57,8 +57,8 @@ function action(mode, type, selection) {
|
|||||||
if(harpNote != nextNote) {
|
if(harpNote != nextNote) {
|
||||||
cm.setQuestProgress(3114, 0);
|
cm.setQuestProgress(3114, 0);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
cm.message("You've missed the note... Start over again.");
|
cm.message("You've missed the note... Start over again.");
|
||||||
} else {
|
} else {
|
||||||
@@ -71,8 +71,8 @@ function action(mode, type, selection) {
|
|||||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||||
cm.setQuestProgress(3114, 42);
|
cm.setQuestProgress(3114, 42);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/clear"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Clear"));
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ function action(mode, type, selection) {
|
|||||||
status--;
|
status--;
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
cm.getMap().broadcastMessage(PacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||||
|
|
||||||
if(cm.isQuestStarted(3114)) {
|
if(cm.isQuestStarted(3114)) {
|
||||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||||
@@ -57,8 +57,8 @@ function action(mode, type, selection) {
|
|||||||
if(harpNote != nextNote) {
|
if(harpNote != nextNote) {
|
||||||
cm.setQuestProgress(3114, 0);
|
cm.setQuestProgress(3114, 0);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
cm.message("You've missed the note... Start over again.");
|
cm.message("You've missed the note... Start over again.");
|
||||||
} else {
|
} else {
|
||||||
@@ -71,8 +71,8 @@ function action(mode, type, selection) {
|
|||||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||||
cm.setQuestProgress(3114, 42);
|
cm.setQuestProgress(3114, 42);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/clear"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Clear"));
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ function action(mode, type, selection) {
|
|||||||
status--;
|
status--;
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
cm.getMap().broadcastMessage(PacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||||
|
|
||||||
if(cm.isQuestStarted(3114)) {
|
if(cm.isQuestStarted(3114)) {
|
||||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||||
@@ -57,8 +57,8 @@ function action(mode, type, selection) {
|
|||||||
if(harpNote != nextNote) {
|
if(harpNote != nextNote) {
|
||||||
cm.setQuestProgress(3114, 0);
|
cm.setQuestProgress(3114, 0);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
cm.message("You've missed the note... Start over again.");
|
cm.message("You've missed the note... Start over again.");
|
||||||
} else {
|
} else {
|
||||||
@@ -71,8 +71,8 @@ function action(mode, type, selection) {
|
|||||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||||
cm.setQuestProgress(3114, 42);
|
cm.setQuestProgress(3114, 42);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/clear"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Clear"));
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ function action(mode, type, selection) {
|
|||||||
status--;
|
status--;
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
cm.getMap().broadcastMessage(PacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||||
|
|
||||||
if(cm.isQuestStarted(3114)) {
|
if(cm.isQuestStarted(3114)) {
|
||||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||||
@@ -57,8 +57,8 @@ function action(mode, type, selection) {
|
|||||||
if(harpNote != nextNote) {
|
if(harpNote != nextNote) {
|
||||||
cm.setQuestProgress(3114, 0);
|
cm.setQuestProgress(3114, 0);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
cm.message("You've missed the note... Start over again.");
|
cm.message("You've missed the note... Start over again.");
|
||||||
} else {
|
} else {
|
||||||
@@ -71,8 +71,8 @@ function action(mode, type, selection) {
|
|||||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||||
cm.setQuestProgress(3114, 42);
|
cm.setQuestProgress(3114, 42);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/clear"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Clear"));
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ function action(mode, type, selection) {
|
|||||||
status--;
|
status--;
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
cm.getMap().broadcastMessage(PacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||||
|
|
||||||
if(cm.isQuestStarted(3114)) {
|
if(cm.isQuestStarted(3114)) {
|
||||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||||
@@ -57,8 +57,8 @@ function action(mode, type, selection) {
|
|||||||
if(harpNote != nextNote) {
|
if(harpNote != nextNote) {
|
||||||
cm.setQuestProgress(3114, 0);
|
cm.setQuestProgress(3114, 0);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
cm.message("You've missed the note... Start over again.");
|
cm.message("You've missed the note... Start over again.");
|
||||||
} else {
|
} else {
|
||||||
@@ -71,8 +71,8 @@ function action(mode, type, selection) {
|
|||||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||||
cm.setQuestProgress(3114, 42);
|
cm.setQuestProgress(3114, 42);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/clear"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Clear"));
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ function action(mode, type, selection) {
|
|||||||
status--;
|
status--;
|
||||||
|
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
cm.getMap().broadcastMessage(PacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||||||
|
|
||||||
if(cm.isQuestStarted(3114)) {
|
if(cm.isQuestStarted(3114)) {
|
||||||
var idx = -1 * cm.getQuestProgressInt(3114);
|
var idx = -1 * cm.getQuestProgressInt(3114);
|
||||||
@@ -57,8 +57,8 @@ function action(mode, type, selection) {
|
|||||||
if(harpNote != nextNote) {
|
if(harpNote != nextNote) {
|
||||||
cm.setQuestProgress(3114, 0);
|
cm.setQuestProgress(3114, 0);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
cm.message("You've missed the note... Start over again.");
|
cm.message("You've missed the note... Start over again.");
|
||||||
} else {
|
} else {
|
||||||
@@ -71,8 +71,8 @@ function action(mode, type, selection) {
|
|||||||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||||||
cm.setQuestProgress(3114, 42);
|
cm.setQuestProgress(3114, 42);
|
||||||
|
|
||||||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
cm.getPlayer().announce(PacketCreator.showEffect("quest/party/clear"));
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
cm.getPlayer().announce(PacketCreator.playSound("Party1/Clear"));
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -159,8 +159,8 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
||||||
status = 4;
|
status = 4;
|
||||||
} else if (selection == 3) {
|
} else if (selection == 3) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
player.getMap().broadcastMessage(PacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||||
cm.endExpedition(expedition);
|
cm.endExpedition(expedition);
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -151,8 +151,8 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("Good luck! All of Leafre is counting on you.");
|
cm.sendOk("Good luck! All of Leafre is counting on you.");
|
||||||
status = 4;
|
status = 4;
|
||||||
} else if (selection == 3) {
|
} else if (selection == 3) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
player.getMap().broadcastMessage(PacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||||
cm.endExpedition(expedition);
|
cm.endExpedition(expedition);
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -154,8 +154,8 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
||||||
status = 4;
|
status = 4;
|
||||||
} else if (selection == 3) {
|
} else if (selection == 3) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
player.getMap().broadcastMessage(PacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||||
cm.endExpedition(expedition);
|
cm.endExpedition(expedition);
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ function action(mode, type, selection) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getClient().announce(MaplePacketCreator.openRPSNPC());
|
cm.getClient().announce(PacketCreator.openRPSNPC());
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
||||||
status = 4;
|
status = 4;
|
||||||
} else if (selection == 3) {
|
} else if (selection == 3) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
player.getMap().broadcastMessage(PacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||||
cm.endExpedition(expedition);
|
cm.endExpedition(expedition);
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -300,19 +300,19 @@ function action(mode, type, selection) {
|
|||||||
if (state == 0) { // give player blessings
|
if (state == 0) { // give player blessings
|
||||||
eim.gridInsert(cm.getPlayer(), 1);
|
eim.gridInsert(cm.getPlayer(), 1);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
if (YamlConfig.config.server.WEDDING_BLESSER_SHOWFX) {
|
if (YamlConfig.config.server.WEDDING_BLESSER_SHOWFX) {
|
||||||
var target = cm.getPlayer();
|
var target = cm.getPlayer();
|
||||||
target.announce(MaplePacketCreator.showSpecialEffect(9));
|
target.announce(PacketCreator.showSpecialEffect(9));
|
||||||
target.getMap().broadcastMessage(target, MaplePacketCreator.showForeignEffect(target.getId(), 9), false);
|
target.getMap().broadcastMessage(target, PacketCreator.showForeignEffect(target.getId(), 9), false);
|
||||||
} else {
|
} else {
|
||||||
var target = eim.getPlayerById(eim.getIntProperty("groomId"));
|
var target = eim.getPlayerById(eim.getIntProperty("groomId"));
|
||||||
target.announce(MaplePacketCreator.showSpecialEffect(9));
|
target.announce(PacketCreator.showSpecialEffect(9));
|
||||||
target.getMap().broadcastMessage(target, MaplePacketCreator.showForeignEffect(target.getId(), 9), false);
|
target.getMap().broadcastMessage(target, PacketCreator.showForeignEffect(target.getId(), 9), false);
|
||||||
|
|
||||||
target = eim.getPlayerById(eim.getIntProperty("brideId"));
|
target = eim.getPlayerById(eim.getIntProperty("brideId"));
|
||||||
target.announce(MaplePacketCreator.showSpecialEffect(9));
|
target.announce(PacketCreator.showSpecialEffect(9));
|
||||||
target.getMap().broadcastMessage(target, MaplePacketCreator.showForeignEffect(target.getId(), 9), false);
|
target.getMap().broadcastMessage(target, PacketCreator.showForeignEffect(target.getId(), 9), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
cm.sendOk("Your blessings have been added to their love. What a noble act for a lovely couple!");
|
cm.sendOk("Your blessings have been added to their love. What a noble act for a lovely couple!");
|
||||||
|
|||||||
@@ -170,19 +170,19 @@ function action(mode, type, selection) {
|
|||||||
if(state == 0) { // give player blessings
|
if(state == 0) { // give player blessings
|
||||||
eim.gridInsert(cm.getPlayer(), 1);
|
eim.gridInsert(cm.getPlayer(), 1);
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
if(YamlConfig.config.server.WEDDING_BLESSER_SHOWFX) {
|
if(YamlConfig.config.server.WEDDING_BLESSER_SHOWFX) {
|
||||||
var target = cm.getPlayer();
|
var target = cm.getPlayer();
|
||||||
target.announce(MaplePacketCreator.showSpecialEffect(9));
|
target.announce(PacketCreator.showSpecialEffect(9));
|
||||||
target.getMap().broadcastMessage(target, MaplePacketCreator.showForeignEffect(target.getId(), 9), false);
|
target.getMap().broadcastMessage(target, PacketCreator.showForeignEffect(target.getId(), 9), false);
|
||||||
} else {
|
} else {
|
||||||
var target = eim.getPlayerById(eim.getIntProperty("groomId"));
|
var target = eim.getPlayerById(eim.getIntProperty("groomId"));
|
||||||
target.announce(MaplePacketCreator.showSpecialEffect(9));
|
target.announce(PacketCreator.showSpecialEffect(9));
|
||||||
target.getMap().broadcastMessage(target, MaplePacketCreator.showForeignEffect(target.getId(), 9), false);
|
target.getMap().broadcastMessage(target, PacketCreator.showForeignEffect(target.getId(), 9), false);
|
||||||
|
|
||||||
target = eim.getPlayerById(eim.getIntProperty("brideId"));
|
target = eim.getPlayerById(eim.getIntProperty("brideId"));
|
||||||
target.announce(MaplePacketCreator.showSpecialEffect(9));
|
target.announce(PacketCreator.showSpecialEffect(9));
|
||||||
target.getMap().broadcastMessage(target, MaplePacketCreator.showForeignEffect(target.getId(), 9), false);
|
target.getMap().broadcastMessage(target, PacketCreator.showForeignEffect(target.getId(), 9), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
cm.sendOk("Way to go, my friend! Your LOVE has been added to theirs, now in one bigger heart-shaped sentiment that will remain lively in our hearts forever! Who-hoo~!");
|
cm.sendOk("Way to go, my friend! Your LOVE has been added to theirs, now in one bigger heart-shaped sentiment that will remain lively in our hearts forever! Who-hoo~!");
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("The expedition will begin and you will now be escorted to the #bEntrance to CWKPQ Altar#k.");
|
cm.sendOk("The expedition will begin and you will now be escorted to the #bEntrance to CWKPQ Altar#k.");
|
||||||
status = 4;
|
status = 4;
|
||||||
} else if (selection == 3) {
|
} else if (selection == 3) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
player.getMap().broadcastMessage(PacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||||
cm.endExpedition(expedition);
|
cm.endExpedition(expedition);
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ function action(mode, type, selection) {
|
|||||||
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
cm.sendOk("The expedition will begin and you will now be escorted to the #b" + expedMap + "#k.");
|
||||||
status = 4;
|
status = 4;
|
||||||
} else if (selection == 3) {
|
} else if (selection == 3) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
player.getMap().broadcastMessage(PacketCreator.serverNotice(6, expedition.getLeader().getName() + " has ended the expedition."));
|
||||||
cm.endExpedition(expedition);
|
cm.endExpedition(expedition);
|
||||||
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
cm.sendOk("The expedition has now ended. Sometimes the best strategy is to run away.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -308,21 +308,21 @@ function writeAllFeatures() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(anthemSong));
|
cm.getPlayer().announce(PacketCreator.musicChange(anthemSong));
|
||||||
status = -1;
|
status = -1;
|
||||||
writeAllFeatures();
|
writeAllFeatures();
|
||||||
action(1, 0, 0);
|
action(1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
function action(mode, type, selection) {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
if (mode == -1) {
|
if (mode == -1) {
|
||||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(ambientSong));
|
cm.getPlayer().announce(PacketCreator.musicChange(ambientSong));
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
} else {
|
} else {
|
||||||
if (mode == 0 && type > 0) {
|
if (mode == 0 && type > 0) {
|
||||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(ambientSong));
|
cm.getPlayer().announce(PacketCreator.musicChange(ambientSong));
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ function action(mode, type, selection) {
|
|||||||
|
|
||||||
cm.sendPrev(sendStr);
|
cm.sendPrev(sendStr);
|
||||||
} else {
|
} else {
|
||||||
cm.getPlayer().announce(MaplePacketCreator.musicChange(ambientSong));
|
cm.getPlayer().announce(PacketCreator.musicChange(ambientSong));
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ function action(mode, type, selection){
|
|||||||
else if(status == 1){
|
else if(status == 1){
|
||||||
if(cm.getText() == cm.getQuestProgress(3360)){
|
if(cm.getText() == cm.getQuestProgress(3360)){
|
||||||
cm.setQuestProgress(3360, 1);
|
cm.setQuestProgress(3360, 1);
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
cm.getPlayer().announce(MaplePacketCreator.playPortalSound());
|
cm.getPlayer().announce(PacketCreator.playPortalSound());
|
||||||
cm.warp(261030000, "sp_" + ((cm.getMapId() == 261010000) ? "jenu" : "alca"));
|
cm.warp(261030000, "sp_" + ((cm.getMapId() == 261010000) ? "jenu" : "alca"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -28,17 +28,17 @@ function enterLeverSequence(pi) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
if(countMiss > 0) {
|
if(countMiss > 0) {
|
||||||
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
map.broadcastMessage(PacketCreator.showEffect("quest/party/wrong_kor"));
|
||||||
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Failed"));
|
map.broadcastMessage(PacketCreator.playSound("Party1/Failed"));
|
||||||
|
|
||||||
pi.playerMessage(5, "The right combination of levers is needed to pass. " + countMiss + " lever(s) are misplaced.");
|
pi.playerMessage(5, "The right combination of levers is needed to pass. " + countMiss + " lever(s) are misplaced.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
map.broadcastMessage(MaplePacketCreator.showEffect("quest/party/clear"));
|
map.broadcastMessage(PacketCreator.showEffect("quest/party/clear"));
|
||||||
map.broadcastMessage(MaplePacketCreator.playSound("Party1/Clear"));
|
map.broadcastMessage(PacketCreator.playSound("Party1/Clear"));
|
||||||
pi.getEventInstance().setProperty("jail" + jailn, "0");
|
pi.getEventInstance().setProperty("jail" + jailn, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function act() {
|
function act() {
|
||||||
const MaplePacketCreator = Java.type('tools.MaplePacketCreator');
|
const PacketCreator = Java.type('tools.PacketCreator');
|
||||||
rm.spawnMonster(9300061, 1, 0, 0); // (0, 0) is temp position
|
rm.spawnMonster(9300061, 1, 0, 0); // (0, 0) is temp position
|
||||||
rm.getClient().getMap().startMapEffect("Protect the Moon Bunny that's pounding the mill, and gather up 10 Moon Bunny's Rice Cakes!", 5120016, 7000);
|
rm.getClient().getMap().startMapEffect("Protect the Moon Bunny that's pounding the mill, and gather up 10 Moon Bunny's Rice Cakes!", 5120016, 7000);
|
||||||
rm.getClient().getMap().broadcastMessage(MaplePacketCreator.bunnyPacket()); // Protect the Moon Bunny!
|
rm.getClient().getMap().broadcastMessage(PacketCreator.bunnyPacket()); // Protect the Moon Bunny!
|
||||||
rm.getClient().getMap().broadcastMessage(MaplePacketCreator.showHPQMoon());
|
rm.getClient().getMap().broadcastMessage(PacketCreator.showHPQMoon());
|
||||||
rm.getClient().getMap().showAllMonsters();
|
rm.getClient().getMap().showAllMonsters();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@ package client;
|
|||||||
|
|
||||||
import net.server.PlayerStorage;
|
import net.server.PlayerStorage;
|
||||||
import tools.DatabaseConnection;
|
import tools.DatabaseConnection;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
@@ -167,7 +167,7 @@ public class BuddyList {
|
|||||||
public void addBuddyRequest(MapleClient c, int cidFrom, String nameFrom, int channelFrom) {
|
public void addBuddyRequest(MapleClient c, int cidFrom, String nameFrom, int channelFrom) {
|
||||||
put(new BuddylistEntry(nameFrom, "Default Group", cidFrom, channelFrom, false));
|
put(new BuddylistEntry(nameFrom, "Default Group", cidFrom, channelFrom, false));
|
||||||
if (pendingRequests.isEmpty()) {
|
if (pendingRequests.isEmpty()) {
|
||||||
c.announce(MaplePacketCreator.requestBuddylistAdd(cidFrom, c.getPlayer().getId(), nameFrom));
|
c.announce(PacketCreator.requestBuddylistAdd(cidFrom, c.getPlayer().getId(), nameFrom));
|
||||||
} else {
|
} else {
|
||||||
pendingRequests.push(new CharacterNameAndId(cidFrom, nameFrom));
|
pendingRequests.push(new CharacterNameAndId(cidFrom, nameFrom));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
statup.add(new Pair<>(s.getKey(), s.getValue()));
|
statup.add(new Pair<>(s.getKey(), s.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
announce(MaplePacketCreator.updatePlayerStats(statup, true, MapleCharacter.this));
|
announce(PacketCreator.updatePlayerStats(statup, true, MapleCharacter.this));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -757,7 +757,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
combocounter = (short) Math.min(30000, count);
|
combocounter = (short) Math.min(30000, count);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
announce(MaplePacketCreator.showCombo(combocounter));
|
announce(PacketCreator.showCombo(combocounter));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -823,13 +823,13 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (isGM() && hide != this.hidden) {
|
if (isGM() && hide != this.hidden) {
|
||||||
if (!hide) {
|
if (!hide) {
|
||||||
this.hidden = false;
|
this.hidden = false;
|
||||||
announce(MaplePacketCreator.getGMEffect(0x10, (byte) 0));
|
announce(PacketCreator.getGMEffect(0x10, (byte) 0));
|
||||||
List<MapleBuffStat> dsstat = Collections.singletonList(MapleBuffStat.DARKSIGHT);
|
List<MapleBuffStat> dsstat = Collections.singletonList(MapleBuffStat.DARKSIGHT);
|
||||||
getMap().broadcastGMMessage(this, MaplePacketCreator.cancelForeignBuff(id, dsstat), false);
|
getMap().broadcastGMMessage(this, PacketCreator.cancelForeignBuff(id, dsstat), false);
|
||||||
getMap().broadcastSpawnPlayerMapObjectMessage(this, this, false);
|
getMap().broadcastSpawnPlayerMapObjectMessage(this, this, false);
|
||||||
|
|
||||||
for(MapleSummon ms: this.getSummonsValues()) {
|
for(MapleSummon ms: this.getSummonsValues()) {
|
||||||
getMap().broadcastNONGMMessage(this, MaplePacketCreator.spawnSummon(ms, false), false);
|
getMap().broadcastNONGMMessage(this, PacketCreator.spawnSummon(ms, false), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (MapleMapObject mo : this.getMap().getMonsters()) {
|
for (MapleMapObject mo : this.getMap().getMonsters()) {
|
||||||
@@ -838,15 +838,15 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.hidden = true;
|
this.hidden = true;
|
||||||
announce(MaplePacketCreator.getGMEffect(0x10, (byte) 1));
|
announce(PacketCreator.getGMEffect(0x10, (byte) 1));
|
||||||
if (!login) {
|
if (!login) {
|
||||||
getMap().broadcastNONGMMessage(this, MaplePacketCreator.removePlayerFromMap(getId()), false);
|
getMap().broadcastNONGMMessage(this, PacketCreator.removePlayerFromMap(getId()), false);
|
||||||
}
|
}
|
||||||
List<Pair<MapleBuffStat, Integer>> ldsstat = Collections.singletonList(new Pair<MapleBuffStat, Integer>(MapleBuffStat.DARKSIGHT, 0));
|
List<Pair<MapleBuffStat, Integer>> ldsstat = Collections.singletonList(new Pair<MapleBuffStat, Integer>(MapleBuffStat.DARKSIGHT, 0));
|
||||||
getMap().broadcastGMMessage(this, MaplePacketCreator.giveForeignBuff(id, ldsstat), false);
|
getMap().broadcastGMMessage(this, PacketCreator.giveForeignBuff(id, ldsstat), false);
|
||||||
this.releaseControlledMonsters();
|
this.releaseControlledMonsters();
|
||||||
}
|
}
|
||||||
announce(MaplePacketCreator.enableActions());
|
announce(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -871,9 +871,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
private void cancelPlayerBuffs(List<MapleBuffStat> buffstats) {
|
private void cancelPlayerBuffs(List<MapleBuffStat> buffstats) {
|
||||||
if (client.getChannelServer().getPlayerStorage().getCharacterById(getId()) != null) {
|
if (client.getChannelServer().getPlayerStorage().getCharacterById(getId()) != null) {
|
||||||
updateLocalStats();
|
updateLocalStats();
|
||||||
client.announce(MaplePacketCreator.cancelBuff(buffstats));
|
client.announce(PacketCreator.cancelBuff(buffstats));
|
||||||
if (buffstats.size() > 0) {
|
if (buffstats.size() > 0) {
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.cancelForeignBuff(getId(), buffstats), false);
|
getMap().broadcastMessage(this, PacketCreator.cancelForeignBuff(getId(), buffstats), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1034,7 +1034,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
MapleMap map = thisChr.getMap();
|
MapleMap map = thisChr.getMap();
|
||||||
|
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
map.broadcastMessage(thisChr, MaplePacketCreator.showForeignEffect(thisChr.getId(), 8), false);
|
map.broadcastMessage(thisChr, PacketCreator.showForeignEffect(thisChr.getId(), 8), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 777);
|
}, 777);
|
||||||
@@ -1137,7 +1137,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
statup.add(new Pair<>(MapleStat.AVAILABLEAP, remainingAp));
|
statup.add(new Pair<>(MapleStat.AVAILABLEAP, remainingAp));
|
||||||
statup.add(new Pair<>(MapleStat.AVAILABLESP, remainingSp[GameConstants.getSkillBook(job.getId())]));
|
statup.add(new Pair<>(MapleStat.AVAILABLESP, remainingSp[GameConstants.getSkillBook(job.getId())]));
|
||||||
statup.add(new Pair<>(MapleStat.JOB, job.getId()));
|
statup.add(new Pair<>(MapleStat.JOB, job.getId()));
|
||||||
client.announce(MaplePacketCreator.updatePlayerStats(statup, true, this));
|
client.announce(PacketCreator.updatePlayerStats(statup, true, this));
|
||||||
} finally {
|
} finally {
|
||||||
statWlock.unlock();
|
statWlock.unlock();
|
||||||
effLock.unlock();
|
effLock.unlock();
|
||||||
@@ -1147,16 +1147,16 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
silentPartyUpdate();
|
silentPartyUpdate();
|
||||||
|
|
||||||
if (dragon != null) {
|
if (dragon != null) {
|
||||||
getMap().broadcastMessage(MaplePacketCreator.removeDragon(dragon.getObjectId()));
|
getMap().broadcastMessage(PacketCreator.removeDragon(dragon.getObjectId()));
|
||||||
dragon = null;
|
dragon = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.guildid > 0) {
|
if (this.guildid > 0) {
|
||||||
getGuild().broadcast(MaplePacketCreator.jobMessage(0, job.getId(), name), this.getId());
|
getGuild().broadcast(PacketCreator.jobMessage(0, job.getId(), name), this.getId());
|
||||||
}
|
}
|
||||||
MapleFamily family = getFamily();
|
MapleFamily family = getFamily();
|
||||||
if(family != null) {
|
if(family != null) {
|
||||||
family.broadcast(MaplePacketCreator.jobMessage(1, job.getId(), name), this.getId());
|
family.broadcast(PacketCreator.jobMessage(1, job.getId(), name), this.getId());
|
||||||
}
|
}
|
||||||
setMasteries(this.job.getId());
|
setMasteries(this.job.getId());
|
||||||
guildUpdate();
|
guildUpdate();
|
||||||
@@ -1178,7 +1178,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void broadcastAcquaintances(int type, String message) {
|
public void broadcastAcquaintances(int type, String message) {
|
||||||
broadcastAcquaintances(MaplePacketCreator.serverNotice(type, message));
|
broadcastAcquaintances(PacketCreator.serverNotice(type, message));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void broadcastAcquaintances(byte[] packet) {
|
public void broadcastAcquaintances(byte[] packet) {
|
||||||
@@ -1219,7 +1219,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void broadcastStance() {
|
public void broadcastStance() {
|
||||||
map.broadcastMessage(this, MaplePacketCreator.movePlayer(id, this.getIdleMovement(), getIdleMovementDataLength()), false);
|
map.broadcastMessage(this, PacketCreator.movePlayer(id, this.getIdleMovement(), getIdleMovementDataLength()), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleMap getWarpMap(int map) {
|
public MapleMap getWarpMap(int map) {
|
||||||
@@ -1366,7 +1366,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (pto == null) {
|
if (pto == null) {
|
||||||
pto = to.getPortal(0);
|
pto = to.getPortal(0);
|
||||||
}
|
}
|
||||||
changeMapInternal(to, pto.getPosition(), MaplePacketCreator.getWarpToMap(to, pto.getId(), this));
|
changeMapInternal(to, pto.getPosition(), PacketCreator.getWarpToMap(to, pto.getId(), this));
|
||||||
canWarpMap = false;
|
canWarpMap = false;
|
||||||
|
|
||||||
canWarpCounter--;
|
canWarpCounter--;
|
||||||
@@ -1382,7 +1382,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
eventChangedMap(target.getId());
|
eventChangedMap(target.getId());
|
||||||
MapleMap to = getWarpMap(target.getId());
|
MapleMap to = getWarpMap(target.getId());
|
||||||
changeMapInternal(to, pos, MaplePacketCreator.getWarpToMap(to, 0x80, pos, this));
|
changeMapInternal(to, pos, PacketCreator.getWarpToMap(to, 0x80, pos, this));
|
||||||
canWarpMap = false;
|
canWarpMap = false;
|
||||||
|
|
||||||
canWarpCounter--;
|
canWarpCounter--;
|
||||||
@@ -1417,7 +1417,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (pto == null) {
|
if (pto == null) {
|
||||||
pto = to.getPortal(0);
|
pto = to.getPortal(0);
|
||||||
}
|
}
|
||||||
changeMapInternal(to, pto.getPosition(), MaplePacketCreator.getWarpToMap(to, pto.getId(), this));
|
changeMapInternal(to, pto.getPosition(), PacketCreator.getWarpToMap(to, pto.getId(), this));
|
||||||
canWarpMap = false;
|
canWarpMap = false;
|
||||||
|
|
||||||
canWarpCounter--;
|
canWarpCounter--;
|
||||||
@@ -1701,7 +1701,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
try {
|
try {
|
||||||
if (party != null) {
|
if (party != null) {
|
||||||
mpc.setMapId(to.getId());
|
mpc.setMapId(to.getId());
|
||||||
client.announce(MaplePacketCreator.updateParty(client.getChannel(), party, PartyOperation.SILENT_UPDATE, null));
|
client.announce(PacketCreator.updateParty(client.getChannel(), party, PartyOperation.SILENT_UPDATE, null));
|
||||||
updatePartyMemberHPInternal();
|
updatePartyMemberHPInternal();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -1738,7 +1738,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if this map has obstacle components moving, make it do so for this client
|
// if this map has obstacle components moving, make it do so for this client
|
||||||
announce(MaplePacketCreator.environmentMoveList(map.getEnvironment().entrySet()));
|
announce(PacketCreator.environmentMoveList(map.getEnvironment().entrySet()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1758,11 +1758,11 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (newLevel > -1) {
|
if (newLevel > -1) {
|
||||||
skills.put(skill, new SkillEntry(newLevel, newMasterlevel, expiration));
|
skills.put(skill, new SkillEntry(newLevel, newMasterlevel, expiration));
|
||||||
if (!GameConstants.isHiddenSkills(skill.getId())) {
|
if (!GameConstants.isHiddenSkills(skill.getId())) {
|
||||||
this.client.announce(MaplePacketCreator.updateSkill(skill.getId(), newLevel, newMasterlevel, expiration));
|
this.client.announce(PacketCreator.updateSkill(skill.getId(), newLevel, newMasterlevel, expiration));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
skills.remove(skill);
|
skills.remove(skill);
|
||||||
this.client.announce(MaplePacketCreator.updateSkill(skill.getId(), newLevel, newMasterlevel, -1)); //Shouldn't use expiration anymore :)
|
this.client.announce(PacketCreator.updateSkill(skill.getId(), newLevel, newMasterlevel, -1)); //Shouldn't use expiration anymore :)
|
||||||
try (Connection con = DatabaseConnection.getConnection();
|
try (Connection con = DatabaseConnection.getConnection();
|
||||||
PreparedStatement ps = con.prepareStatement("DELETE FROM skills WHERE skillid = ? AND characterid = ?")) {
|
PreparedStatement ps = con.prepareStatement("DELETE FROM skills WHERE skillid = ? AND characterid = ?")) {
|
||||||
ps.setInt(1, skill.getId());
|
ps.setInt(1, skill.getId());
|
||||||
@@ -1799,11 +1799,11 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.announce(MaplePacketCreator.showOwnBerserk(skilllevel, berserk));
|
client.announce(PacketCreator.showOwnBerserk(skilllevel, berserk));
|
||||||
if (!isHidden) {
|
if (!isHidden) {
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.showBerserk(getId(), skilllevel, berserk), false);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.showBerserk(getId(), skilllevel, berserk), false);
|
||||||
} else {
|
} else {
|
||||||
getMap().broadcastGMMessage(MapleCharacter.this, MaplePacketCreator.showBerserk(getId(), skilllevel, berserk), false);
|
getMap().broadcastGMMessage(MapleCharacter.this, PacketCreator.showBerserk(getId(), skilllevel, berserk), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 5000, 3000);
|
}, 5000, 3000);
|
||||||
@@ -1923,7 +1923,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (ob instanceof MapleMapItem) {
|
if (ob instanceof MapleMapItem) {
|
||||||
MapleMapItem mapitem = (MapleMapItem) ob;
|
MapleMapItem mapitem = (MapleMapItem) ob;
|
||||||
if (System.currentTimeMillis() - mapitem.getDropTime() < 400 || !mapitem.canBePickedBy(this)) {
|
if (System.currentTimeMillis() - mapitem.getDropTime() < 400 || !mapitem.canBePickedBy(this)) {
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1936,13 +1936,13 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
mapitem.lockItem();
|
mapitem.lockItem();
|
||||||
try {
|
try {
|
||||||
if (mapitem.isPickedUp()) {
|
if (mapitem.isPickedUp()) {
|
||||||
client.announce(MaplePacketCreator.showItemUnavailable());
|
client.announce(PacketCreator.showItemUnavailable());
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isPet = petIndex > -1;
|
boolean isPet = petIndex > -1;
|
||||||
final byte[] pickupPacket = MaplePacketCreator.removeItemFromMap(mapitem.getObjectId(), (isPet) ? 5 : 2, this.getId(), isPet, petIndex);
|
final byte[] pickupPacket = PacketCreator.removeItemFromMap(mapitem.getObjectId(), (isPet) ? 5 : 2, this.getId(), isPet, petIndex);
|
||||||
|
|
||||||
Item mItem = mapitem.getItem();
|
Item mItem = mapitem.getItem();
|
||||||
boolean hasSpaceInventory = true;
|
boolean hasSpaceInventory = true;
|
||||||
@@ -1975,21 +1975,21 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
} else if (MapleInventoryManipulator.addFromDrop(client, mItem, true)) {
|
} else if (MapleInventoryManipulator.addFromDrop(client, mItem, true)) {
|
||||||
this.getMap().pickItemDrop(pickupPacket, mapitem);
|
this.getMap().pickItemDrop(pickupPacket, mapitem);
|
||||||
} else {
|
} else {
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
client.announce(MaplePacketCreator.showItemUnavailable());
|
client.announce(PacketCreator.showItemUnavailable());
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.needQuestItem(mapitem.getQuest(), mapitem.getItemId())) {
|
if (!this.needQuestItem(mapitem.getQuest(), mapitem.getItemId())) {
|
||||||
client.announce(MaplePacketCreator.showItemUnavailable());
|
client.announce(PacketCreator.showItemUnavailable());
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2010,7 +2010,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
itemScript = info;
|
itemScript = info;
|
||||||
} else {
|
} else {
|
||||||
if (!MapleInventoryManipulator.addFromDrop(client, mItem, true)) {
|
if (!MapleInventoryManipulator.addFromDrop(client, mItem, true)) {
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2026,14 +2026,14 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
updateAriantScore();
|
updateAriantScore();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getMap().pickItemDrop(pickupPacket, mapitem);
|
this.getMap().pickItemDrop(pickupPacket, mapitem);
|
||||||
} else if(!hasSpaceInventory) {
|
} else if(!hasSpaceInventory) {
|
||||||
client.announce(MaplePacketCreator.getInventoryFull());
|
client.announce(PacketCreator.getInventoryFull());
|
||||||
client.announce(MaplePacketCreator.getShowInventoryFull());
|
client.announce(PacketCreator.getShowInventoryFull());
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
mapitem.unlockItem();
|
mapitem.unlockItem();
|
||||||
@@ -2044,7 +2044,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
ism.runItemScript(client, itemScript);
|
ism.runItemScript(client, itemScript);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int countItem(int itemid) {
|
public int countItem(int itemid) {
|
||||||
@@ -2075,7 +2075,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void announceBattleshipHp() {
|
public void announceBattleshipHp() {
|
||||||
announce(MaplePacketCreator.skillCooldown(5221999, battleshipHp));
|
announce(PacketCreator.skillCooldown(5221999, battleshipHp));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void decreaseBattleshipHp(int decrease) {
|
public void decreaseBattleshipHp(int decrease) {
|
||||||
@@ -2083,7 +2083,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (battleshipHp <= 0) {
|
if (battleshipHp <= 0) {
|
||||||
Skill battleship = SkillFactory.getSkill(Corsair.BATTLE_SHIP);
|
Skill battleship = SkillFactory.getSkill(Corsair.BATTLE_SHIP);
|
||||||
int cooldown = battleship.getEffect(getSkillLevel(battleship)).getCooldown();
|
int cooldown = battleship.getEffect(getSkillLevel(battleship)).getCooldown();
|
||||||
announce(MaplePacketCreator.skillCooldown(Corsair.BATTLE_SHIP, cooldown));
|
announce(PacketCreator.skillCooldown(Corsair.BATTLE_SHIP, cooldown));
|
||||||
addCooldown(Corsair.BATTLE_SHIP, Server.getInstance().getCurrentTime(), (long)(cooldown * 1000));
|
addCooldown(Corsair.BATTLE_SHIP, Server.getInstance().getCurrentTime(), (long)(cooldown * 1000));
|
||||||
removeCooldown(5221999);
|
removeCooldown(5221999);
|
||||||
cancelEffectFromBuffStat(MapleBuffStat.MONSTER_RIDING);
|
cancelEffectFromBuffStat(MapleBuffStat.MONSTER_RIDING);
|
||||||
@@ -2115,7 +2115,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
private void nextPendingRequest(MapleClient c) {
|
private void nextPendingRequest(MapleClient c) {
|
||||||
CharacterNameAndId pendingBuddyRequest = c.getPlayer().getBuddylist().pollPendingRequest();
|
CharacterNameAndId pendingBuddyRequest = c.getPlayer().getBuddylist().pollPendingRequest();
|
||||||
if (pendingBuddyRequest != null) {
|
if (pendingBuddyRequest != null) {
|
||||||
c.announce(MaplePacketCreator.requestBuddylistAdd(pendingBuddyRequest.getId(), c.getPlayer().getId(), pendingBuddyRequest.getName()));
|
c.announce(PacketCreator.requestBuddylistAdd(pendingBuddyRequest.getId(), c.getPlayer().getId(), pendingBuddyRequest.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2133,7 +2133,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
notifyRemoteChannel(client, getWorldServer().find(otherCid), otherCid, BuddyList.BuddyOperation.DELETED);
|
notifyRemoteChannel(client, getWorldServer().find(otherCid), otherCid, BuddyList.BuddyOperation.DELETED);
|
||||||
}
|
}
|
||||||
bl.remove(otherCid);
|
bl.remove(otherCid);
|
||||||
client.announce(MaplePacketCreator.updateBuddylist(getBuddylist().getBuddies()));
|
client.announce(PacketCreator.updateBuddylist(getBuddylist().getBuddies()));
|
||||||
nextPendingRequest(client);
|
nextPendingRequest(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2458,8 +2458,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if(MapleCharacter.this.getHp() < localmaxhp) {
|
if(MapleCharacter.this.getHp() < localmaxhp) {
|
||||||
byte recHP = (byte) (healHP / YamlConfig.config.server.CHAIR_EXTRA_HEAL_MULTIPLIER);
|
byte recHP = (byte) (healHP / YamlConfig.config.server.CHAIR_EXTRA_HEAL_MULTIPLIER);
|
||||||
|
|
||||||
client.announce(MaplePacketCreator.showOwnRecovery(recHP));
|
client.announce(PacketCreator.showOwnRecovery(recHP));
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.showRecovery(id, recHP), false);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.showRecovery(id, recHP), false);
|
||||||
} else if (MapleCharacter.this.getMp() >= localmaxmp) {
|
} else if (MapleCharacter.this.getMp() >= localmaxmp) {
|
||||||
stopChairTask(); // optimizing schedule management when player is already with full pool.
|
stopChairTask(); // optimizing schedule management when player is already with full pool.
|
||||||
}
|
}
|
||||||
@@ -2506,8 +2506,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
if(MapleCharacter.this.getHp() < localmaxhp) {
|
if(MapleCharacter.this.getHp() < localmaxhp) {
|
||||||
if(healHP > 0) {
|
if(healHP > 0) {
|
||||||
client.announce(MaplePacketCreator.showOwnRecovery(healHP));
|
client.announce(PacketCreator.showOwnRecovery(healHP));
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.showRecovery(id, healHP), false);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.showRecovery(id, healHP), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2614,9 +2614,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
final List<Pair<MapleDisease, Integer>> debuff = Collections.singletonList(new Pair<>(disease, Integer.valueOf(skill.getX())));
|
final List<Pair<MapleDisease, Integer>> debuff = Collections.singletonList(new Pair<>(disease, Integer.valueOf(skill.getX())));
|
||||||
|
|
||||||
if (disease != MapleDisease.SLOW) {
|
if (disease != MapleDisease.SLOW) {
|
||||||
map.broadcastMessage(MaplePacketCreator.giveForeignDebuff(id, debuff, skill));
|
map.broadcastMessage(PacketCreator.giveForeignDebuff(id, debuff, skill));
|
||||||
} else {
|
} else {
|
||||||
map.broadcastMessage(MaplePacketCreator.giveForeignSlowDebuff(id, debuff, skill));
|
map.broadcastMessage(PacketCreator.giveForeignSlowDebuff(id, debuff, skill));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2631,9 +2631,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
final List<Pair<MapleDisease, Integer>> debuff = Collections.singletonList(new Pair<>(disease, Integer.valueOf(skill.getX())));
|
final List<Pair<MapleDisease, Integer>> debuff = Collections.singletonList(new Pair<>(disease, Integer.valueOf(skill.getX())));
|
||||||
|
|
||||||
if (disease != MapleDisease.SLOW) {
|
if (disease != MapleDisease.SLOW) {
|
||||||
this.announce(MaplePacketCreator.giveForeignDebuff(cid, debuff, skill));
|
this.announce(PacketCreator.giveForeignDebuff(cid, debuff, skill));
|
||||||
} else {
|
} else {
|
||||||
this.announce(MaplePacketCreator.giveForeignSlowDebuff(cid, debuff, skill));
|
this.announce(PacketCreator.giveForeignSlowDebuff(cid, debuff, skill));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2661,12 +2661,12 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final List<Pair<MapleDisease, Integer>> debuff = Collections.singletonList(new Pair<>(disease, Integer.valueOf(skill.getX())));
|
final List<Pair<MapleDisease, Integer>> debuff = Collections.singletonList(new Pair<>(disease, Integer.valueOf(skill.getX())));
|
||||||
client.announce(MaplePacketCreator.giveDebuff(debuff, skill));
|
client.announce(PacketCreator.giveDebuff(debuff, skill));
|
||||||
|
|
||||||
if (disease != MapleDisease.SLOW) {
|
if (disease != MapleDisease.SLOW) {
|
||||||
map.broadcastMessage(this, MaplePacketCreator.giveForeignDebuff(id, debuff, skill), false);
|
map.broadcastMessage(this, PacketCreator.giveForeignDebuff(id, debuff, skill), false);
|
||||||
} else {
|
} else {
|
||||||
map.broadcastMessage(this, MaplePacketCreator.giveForeignSlowDebuff(id, debuff, skill), false);
|
map.broadcastMessage(this, PacketCreator.giveForeignSlowDebuff(id, debuff, skill), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2674,12 +2674,12 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
public void dispelDebuff(MapleDisease debuff) {
|
public void dispelDebuff(MapleDisease debuff) {
|
||||||
if (hasDisease(debuff)) {
|
if (hasDisease(debuff)) {
|
||||||
long mask = debuff.getValue();
|
long mask = debuff.getValue();
|
||||||
announce(MaplePacketCreator.cancelDebuff(mask));
|
announce(PacketCreator.cancelDebuff(mask));
|
||||||
|
|
||||||
if (debuff != MapleDisease.SLOW) {
|
if (debuff != MapleDisease.SLOW) {
|
||||||
map.broadcastMessage(this, MaplePacketCreator.cancelForeignDebuff(id, mask), false);
|
map.broadcastMessage(this, PacketCreator.cancelForeignDebuff(id, mask), false);
|
||||||
} else {
|
} else {
|
||||||
map.broadcastMessage(this, MaplePacketCreator.cancelForeignSlowDebuff(id), false);
|
map.broadcastMessage(this, PacketCreator.cancelForeignSlowDebuff(id), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
chrLock.lock();
|
chrLock.lock();
|
||||||
@@ -2789,7 +2789,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void dropMessage(int type, String message) {
|
public void dropMessage(int type, String message) {
|
||||||
client.announce(MaplePacketCreator.serverNotice(type, message));
|
client.announce(PacketCreator.serverNotice(type, message));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enteredScript(String script, int mapid) {
|
public void enteredScript(String script, int mapid) {
|
||||||
@@ -2909,7 +2909,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
MapleCoolDownValueHolder mcdvh = bel.getValue();
|
MapleCoolDownValueHolder mcdvh = bel.getValue();
|
||||||
if(curTime >= mcdvh.startTime + mcdvh.length) {
|
if(curTime >= mcdvh.startTime + mcdvh.length) {
|
||||||
removeCooldown(mcdvh.skillId);
|
removeCooldown(mcdvh.skillId);
|
||||||
client.announce(MaplePacketCreator.skillCooldown(mcdvh.skillId, 0));
|
client.announce(PacketCreator.skillCooldown(mcdvh.skillId, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2954,7 +2954,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
forceUpdateItem(item); //TEST :3
|
forceUpdateItem(item); //TEST :3
|
||||||
} else if (expiration != -1 && expiration < currenttime) {
|
} else if (expiration != -1 && expiration < currenttime) {
|
||||||
if (!ItemConstants.isPet(item.getItemId())) {
|
if (!ItemConstants.isPet(item.getItemId())) {
|
||||||
client.announce(MaplePacketCreator.itemExpired(item.getItemId()));
|
client.announce(PacketCreator.itemExpired(item.getItemId()));
|
||||||
toberemove.add(item);
|
toberemove.add(item);
|
||||||
if (ItemConstants.isRateCoupon(item.getItemId())) {
|
if (ItemConstants.isRateCoupon(item.getItemId())) {
|
||||||
deletedCoupon = true;
|
deletedCoupon = true;
|
||||||
@@ -2966,7 +2966,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ItemConstants.isExpirablePet(item.getItemId())) {
|
if (ItemConstants.isExpirablePet(item.getItemId())) {
|
||||||
client.announce(MaplePacketCreator.itemExpired(item.getItemId()));
|
client.announce(PacketCreator.itemExpired(item.getItemId()));
|
||||||
toberemove.add(item);
|
toberemove.add(item);
|
||||||
} else {
|
} else {
|
||||||
item.setExpiration(-1);
|
item.setExpiration(-1);
|
||||||
@@ -3017,7 +3017,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
final List<ModifyInventory> mods = new LinkedList<>();
|
final List<ModifyInventory> mods = new LinkedList<>();
|
||||||
mods.add(new ModifyInventory(3, item));
|
mods.add(new ModifyInventory(3, item));
|
||||||
mods.add(new ModifyInventory(0, item));
|
mods.add(new ModifyInventory(0, item));
|
||||||
client.announce(MaplePacketCreator.modifyInventory(true, mods));
|
client.announce(PacketCreator.modifyInventory(true, mods));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gainGachaExp() {
|
public void gainGachaExp() {
|
||||||
@@ -3094,7 +3094,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
white = false;
|
white = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.announce(MaplePacketCreator.getShowExpGain((int) gain, equip, party, inChat, white));
|
client.announce(PacketCreator.getShowExpGain((int) gain, equip, party, inChat, white));
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void gainExpInternal(long gain, int equip, int party, boolean show, boolean inChat, boolean white) { // need of method synchonization here detected thanks to MedicOP
|
private synchronized void gainExpInternal(long gain, int equip, int party, boolean show, boolean inChat, boolean white) { // need of method synchonization here detected thanks to MedicOP
|
||||||
@@ -3158,10 +3158,10 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
updateSingleStat(MapleStat.FAME, thisFame);
|
updateSingleStat(MapleStat.FAME, thisFame);
|
||||||
|
|
||||||
if (fromPlayer != null) {
|
if (fromPlayer != null) {
|
||||||
fromPlayer.announce(MaplePacketCreator.giveFameResponse(mode, getName(), thisFame));
|
fromPlayer.announce(PacketCreator.giveFameResponse(mode, getName(), thisFame));
|
||||||
announce(MaplePacketCreator.receiveFame(mode, fromPlayer.getName()));
|
announce(PacketCreator.receiveFame(mode, fromPlayer.getName()));
|
||||||
} else {
|
} else {
|
||||||
announce(MaplePacketCreator.getShowFameGain(delta));
|
announce(PacketCreator.getShowFameGain(delta));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -3201,15 +3201,15 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (gain != 0) {
|
if (gain != 0) {
|
||||||
updateSingleStat(MapleStat.MESO, (int) nextMeso, enableActions);
|
updateSingleStat(MapleStat.MESO, (int) nextMeso, enableActions);
|
||||||
if (show) {
|
if (show) {
|
||||||
client.announce(MaplePacketCreator.getShowMesoGain(gain, inChat));
|
client.announce(PacketCreator.getShowMesoGain(gain, inChat));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void genericGuildMessage(int code) {
|
public void genericGuildMessage(int code) {
|
||||||
this.client.announce(MaplePacketCreator.genericGuildMessage((byte) code));
|
this.client.announce(PacketCreator.genericGuildMessage((byte) code));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAccountID() {
|
public int getAccountID() {
|
||||||
@@ -3712,7 +3712,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
MapleSummon summon = summons.get(summonId);
|
MapleSummon summon = summons.get(summonId);
|
||||||
if (summon != null) {
|
if (summon != null) {
|
||||||
getMap().broadcastMessage(MaplePacketCreator.removeSummon(summon, true), summon.getPosition());
|
getMap().broadcastMessage(PacketCreator.removeSummon(summon, true), summon.getPosition());
|
||||||
getMap().removeMapObject(summon);
|
getMap().removeMapObject(summon);
|
||||||
removeVisibleMapObject(summon);
|
removeVisibleMapObject(summon);
|
||||||
|
|
||||||
@@ -4032,8 +4032,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!inactiveStats.isEmpty()) {
|
if (!inactiveStats.isEmpty()) {
|
||||||
client.announce(MaplePacketCreator.cancelBuff(inactiveStats));
|
client.announce(PacketCreator.cancelBuff(inactiveStats));
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.cancelForeignBuff(getId(), inactiveStats), false);
|
getMap().broadcastMessage(this, PacketCreator.cancelForeignBuff(getId(), inactiveStats), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4308,7 +4308,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (this.isRidingBattleship()) {
|
if (this.isRidingBattleship()) {
|
||||||
List<Pair<MapleBuffStat, Integer>> statups = new ArrayList<>(1);
|
List<Pair<MapleBuffStat, Integer>> statups = new ArrayList<>(1);
|
||||||
statups.add(new Pair<>(MapleBuffStat.MONSTER_RIDING, 0));
|
statups.add(new Pair<>(MapleBuffStat.MONSTER_RIDING, 0));
|
||||||
this.announce(MaplePacketCreator.giveBuff(1932000, 5221006, statups));
|
this.announce(PacketCreator.giveBuff(1932000, 5221006, statups));
|
||||||
this.announceBattleshipHp();
|
this.announceBattleshipHp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4402,9 +4402,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addHP(healEffect.getHp());
|
addHP(healEffect.getHp());
|
||||||
client.announce(MaplePacketCreator.showOwnBuffEffect(beholder, 2));
|
client.announce(PacketCreator.showOwnBuffEffect(beholder, 2));
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.summonSkill(getId(), beholder, 5), true);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.summonSkill(getId(), beholder, 5), true);
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.showOwnBuffEffect(beholder, 2), false);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.showOwnBuffEffect(beholder, 2), false);
|
||||||
}
|
}
|
||||||
}, healInterval, healInterval);
|
}, healInterval, healInterval);
|
||||||
}
|
}
|
||||||
@@ -4420,9 +4420,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buffEffect.applyTo(MapleCharacter.this);
|
buffEffect.applyTo(MapleCharacter.this);
|
||||||
client.announce(MaplePacketCreator.showOwnBuffEffect(beholder, 2));
|
client.announce(PacketCreator.showOwnBuffEffect(beholder, 2));
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.summonSkill(getId(), beholder, (int) (Math.random() * 3) + 6), true);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.summonSkill(getId(), beholder, (int) (Math.random() * 3) + 6), true);
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.showBuffeffect(getId(), beholder, 2), false);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.showBuffeffect(getId(), beholder, 2), false);
|
||||||
}
|
}
|
||||||
}, buffInterval, buffInterval);
|
}, buffInterval, buffInterval);
|
||||||
}
|
}
|
||||||
@@ -4454,8 +4454,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addHP(heal);
|
addHP(heal);
|
||||||
client.announce(MaplePacketCreator.showOwnRecovery(heal));
|
client.announce(PacketCreator.showOwnRecovery(heal));
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.showRecovery(id, heal), false);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.showRecovery(id, heal), false);
|
||||||
}
|
}
|
||||||
}, healInterval, healInterval);
|
}, healInterval, healInterval);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -4812,7 +4812,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
Set<Integer> exclItems = pe.getValue();
|
Set<Integer> exclItems = pe.getValue();
|
||||||
if (!exclItems.isEmpty()) {
|
if (!exclItems.isEmpty()) {
|
||||||
client.announce(MaplePacketCreator.loadExceptionList(this.getId(), pe.getKey(), petIndex, new ArrayList<>(exclItems)));
|
client.announce(PacketCreator.loadExceptionList(this.getId(), pe.getKey(), petIndex, new ArrayList<>(exclItems)));
|
||||||
|
|
||||||
chrLock.lock();
|
chrLock.lock();
|
||||||
try {
|
try {
|
||||||
@@ -4836,7 +4836,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
Set<Integer> exclItems = pe.getValue();
|
Set<Integer> exclItems = pe.getValue();
|
||||||
if (!exclItems.isEmpty()) {
|
if (!exclItems.isEmpty()) {
|
||||||
c.announce(MaplePacketCreator.loadExceptionList(this.getId(), pe.getKey(), petIndex, new ArrayList<>(exclItems)));
|
c.announce(PacketCreator.loadExceptionList(this.getId(), pe.getKey(), petIndex, new ArrayList<>(exclItems)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5935,7 +5935,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
//Server.getInstance().getGuild(guildid, world, mgc).gainGP(40);
|
//Server.getInstance().getGuild(guildid, world, mgc).gainGP(40);
|
||||||
int allianceId = getGuild().getAllianceId();
|
int allianceId = getGuild().getAllianceId();
|
||||||
if (allianceId > 0) {
|
if (allianceId > 0) {
|
||||||
Server.getInstance().allianceMessage(allianceId, MaplePacketCreator.updateAllianceJobLevel(this), getId(), -1);
|
Server.getInstance().allianceMessage(allianceId, PacketCreator.updateAllianceJobLevel(this), getId(), -1);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -5954,10 +5954,10 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.ENERGY_CHARGE, energybar));
|
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.ENERGY_CHARGE, energybar));
|
||||||
setBuffedValue(MapleBuffStat.ENERGY_CHARGE, energybar);
|
setBuffedValue(MapleBuffStat.ENERGY_CHARGE, energybar);
|
||||||
client.announce(MaplePacketCreator.giveBuff(energybar, 0, stat));
|
client.announce(PacketCreator.giveBuff(energybar, 0, stat));
|
||||||
client.announce(MaplePacketCreator.showOwnBuffEffect(energycharge.getId(), 2));
|
client.announce(PacketCreator.showOwnBuffEffect(energycharge.getId(), 2));
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.showBuffeffect(id, energycharge.getId(), 2));
|
getMap().broadcastMessage(this, PacketCreator.showBuffeffect(id, energycharge.getId(), 2));
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.giveForeignBuff(energybar, stat));
|
getMap().broadcastMessage(this, PacketCreator.giveForeignBuff(energybar, stat));
|
||||||
}
|
}
|
||||||
if (energybar >= 10000 && energybar < 11000) {
|
if (energybar >= 10000 && energybar < 11000) {
|
||||||
energybar = 15000;
|
energybar = 15000;
|
||||||
@@ -5968,8 +5968,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
energybar = 0;
|
energybar = 0;
|
||||||
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.ENERGY_CHARGE, energybar));
|
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.ENERGY_CHARGE, energybar));
|
||||||
setBuffedValue(MapleBuffStat.ENERGY_CHARGE, energybar);
|
setBuffedValue(MapleBuffStat.ENERGY_CHARGE, energybar);
|
||||||
client.announce(MaplePacketCreator.giveBuff(energybar, 0, stat));
|
client.announce(PacketCreator.giveBuff(energybar, 0, stat));
|
||||||
getMap().broadcastMessage(chr, MaplePacketCreator.cancelForeignFirstDebuff(id, ((long) 1) << 50));
|
getMap().broadcastMessage(chr, PacketCreator.cancelForeignFirstDebuff(id, ((long) 1) << 50));
|
||||||
}
|
}
|
||||||
}, ceffect.getDuration());
|
}, ceffect.getDuration());
|
||||||
}
|
}
|
||||||
@@ -5980,8 +5980,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
Skill combo = SkillFactory.getSkill(skillid);
|
Skill combo = SkillFactory.getSkill(skillid);
|
||||||
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.COMBO, 1));
|
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<>(MapleBuffStat.COMBO, 1));
|
||||||
setBuffedValue(MapleBuffStat.COMBO, 1);
|
setBuffedValue(MapleBuffStat.COMBO, 1);
|
||||||
client.announce(MaplePacketCreator.giveBuff(skillid, combo.getEffect(getSkillLevel(combo)).getDuration() + (int) ((getBuffedStarttime(MapleBuffStat.COMBO) - System.currentTimeMillis())), stat));
|
client.announce(PacketCreator.giveBuff(skillid, combo.getEffect(getSkillLevel(combo)).getDuration() + (int) ((getBuffedStarttime(MapleBuffStat.COMBO) - System.currentTimeMillis())), stat));
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.giveForeignBuff(getId(), stat), false);
|
getMap().broadcastMessage(this, PacketCreator.giveForeignBuff(getId(), stat), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasEntered(String script) {
|
public boolean hasEntered(String script) {
|
||||||
@@ -6412,7 +6412,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String names = (getMedalText() + name);
|
final String names = (getMedalText() + name);
|
||||||
getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, String.format(LEVEL_200, names, maxClassLevel, names)));
|
getWorldServer().broadcastPacket(PacketCreator.serverNotice(6, String.format(LEVEL_200, names, maxClassLevel, names)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6439,18 +6439,18 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
statup.add(new Pair<>(MapleStat.STR, str));
|
statup.add(new Pair<>(MapleStat.STR, str));
|
||||||
statup.add(new Pair<>(MapleStat.DEX, dex));
|
statup.add(new Pair<>(MapleStat.DEX, dex));
|
||||||
|
|
||||||
client.announce(MaplePacketCreator.updatePlayerStats(statup, true, this));
|
client.announce(PacketCreator.updatePlayerStats(statup, true, this));
|
||||||
} finally {
|
} finally {
|
||||||
statWlock.unlock();
|
statWlock.unlock();
|
||||||
effLock.unlock();
|
effLock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.showForeignEffect(getId(), 0), false);
|
getMap().broadcastMessage(this, PacketCreator.showForeignEffect(getId(), 0), false);
|
||||||
setMPC(new MaplePartyCharacter(this));
|
setMPC(new MaplePartyCharacter(this));
|
||||||
silentPartyUpdate();
|
silentPartyUpdate();
|
||||||
|
|
||||||
if (this.guildid > 0) {
|
if (this.guildid > 0) {
|
||||||
getGuild().broadcast(MaplePacketCreator.levelUpMessage(2, level, name), this.getId());
|
getGuild().broadcast(PacketCreator.levelUpMessage(2, level, name), this.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (level % 20 == 0) {
|
if (level % 20 == 0) {
|
||||||
@@ -6497,7 +6497,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
MapleFamilyEntry senior = familyEntry.getSenior();
|
MapleFamilyEntry senior = familyEntry.getSenior();
|
||||||
if(senior != null) { //only send the message to direct senior
|
if(senior != null) { //only send the message to direct senior
|
||||||
MapleCharacter seniorChr = senior.getChr();
|
MapleCharacter seniorChr = senior.getChr();
|
||||||
if(seniorChr != null) seniorChr.announce(MaplePacketCreator.levelUpMessage(1, level, getName()));
|
if(seniorChr != null) seniorChr.announce(PacketCreator.levelUpMessage(1, level, getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7495,7 +7495,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void yellowMessage(String m) {
|
public void yellowMessage(String m) {
|
||||||
announce(MaplePacketCreator.sendYellowTip(m));
|
announce(PacketCreator.sendYellowTip(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void raiseQuestMobCount(int id) {
|
public void raiseQuestMobCount(int id) {
|
||||||
@@ -7544,7 +7544,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (getCP() < losing) {
|
if (getCP() < losing) {
|
||||||
losing = getCP();
|
losing = getCP();
|
||||||
}
|
}
|
||||||
getMap().broadcastMessage(MaplePacketCreator.playerDiedMessage(getName(), losing, getTeam()));
|
getMap().broadcastMessage(PacketCreator.playerDiedMessage(getName(), losing, getTeam()));
|
||||||
gainCP(-losing);
|
gainCP(-losing);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -7603,7 +7603,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsitChairInternal();
|
unsitChairInternal();
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void unsitChairInternal() {
|
private void unsitChairInternal() {
|
||||||
@@ -7615,13 +7615,13 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
setChair(-1);
|
setChair(-1);
|
||||||
if (unregisterChairBuff()) {
|
if (unregisterChairBuff()) {
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.cancelForeignChairSkillEffect(this.getId()), false);
|
getMap().broadcastMessage(this, PacketCreator.cancelForeignChairSkillEffect(this.getId()), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.showChair(this.getId(), 0), false);
|
getMap().broadcastMessage(this, PacketCreator.showChair(this.getId(), 0), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
announce(MaplePacketCreator.cancelChair(-1));
|
announce(PacketCreator.cancelChair(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sitChair(int itemId) {
|
public void sitChair(int itemId) {
|
||||||
@@ -7629,16 +7629,16 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (itemId >= 1000000) { // sit on item chair
|
if (itemId >= 1000000) { // sit on item chair
|
||||||
if (chair.get() < 0) {
|
if (chair.get() < 0) {
|
||||||
setChair(itemId);
|
setChair(itemId);
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.showChair(this.getId(), itemId), false);
|
getMap().broadcastMessage(this, PacketCreator.showChair(this.getId(), itemId), false);
|
||||||
}
|
}
|
||||||
announce(MaplePacketCreator.enableActions());
|
announce(PacketCreator.enableActions());
|
||||||
} else if (itemId >= 0) { // sit on map chair
|
} else if (itemId >= 0) { // sit on map chair
|
||||||
if (chair.get() < 0) {
|
if (chair.get() < 0) {
|
||||||
setChair(itemId);
|
setChair(itemId);
|
||||||
if (registerChairBuff()) {
|
if (registerChairBuff()) {
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.giveForeignChairSkillEffect(this.getId()), false);
|
getMap().broadcastMessage(this, PacketCreator.giveForeignChairSkillEffect(this.getId()), false);
|
||||||
}
|
}
|
||||||
announce(MaplePacketCreator.cancelChair(itemId));
|
announce(PacketCreator.cancelChair(itemId));
|
||||||
}
|
}
|
||||||
} else { // stand up
|
} else { // stand up
|
||||||
unsitChairInternal();
|
unsitChairInternal();
|
||||||
@@ -7683,8 +7683,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addHP(-bloodEffect.getX());
|
addHP(-bloodEffect.getX());
|
||||||
announce(MaplePacketCreator.showOwnBuffEffect(bloodEffect.getSourceId(), 5));
|
announce(PacketCreator.showOwnBuffEffect(bloodEffect.getSourceId(), 5));
|
||||||
getMap().broadcastMessage(MapleCharacter.this, MaplePacketCreator.showBuffeffect(getId(), bloodEffect.getSourceId(), 5), false);
|
getMap().broadcastMessage(MapleCharacter.this, PacketCreator.showBuffeffect(getId(), bloodEffect.getSourceId(), 5), false);
|
||||||
}
|
}
|
||||||
}, 4000, 4000);
|
}, 4000, 4000);
|
||||||
}
|
}
|
||||||
@@ -7908,7 +7908,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
enforceMaxHpMp();
|
enforceMaxHpMp();
|
||||||
|
|
||||||
if (!hpmpupdate.isEmpty()) {
|
if (!hpmpupdate.isEmpty()) {
|
||||||
client.announce(MaplePacketCreator.updatePlayerStats(hpmpupdate, true, this));
|
client.announce(PacketCreator.updatePlayerStats(hpmpupdate, true, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldmaxhp != localmaxhp) { // thanks Wh1SK3Y (Suwaidy) for pointing out a deadlock occuring related to party members HP
|
if (oldmaxhp != localmaxhp) { // thanks Wh1SK3Y (Suwaidy) for pointing out a deadlock occuring related to party members HP
|
||||||
@@ -7926,7 +7926,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
try {
|
try {
|
||||||
if (party != null) {
|
if (party != null) {
|
||||||
for (MapleCharacter partychar : this.getPartyMembersOnSameMap()) {
|
for (MapleCharacter partychar : this.getPartyMembersOnSameMap()) {
|
||||||
announce(MaplePacketCreator.updatePartyMemberHP(partychar.getId(), partychar.getHp(), partychar.getCurrentMaxHp()));
|
announce(PacketCreator.updatePartyMemberHP(partychar.getId(), partychar.getHp(), partychar.getCurrentMaxHp()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -7943,7 +7943,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (mcvh.skillId != id) {
|
if (mcvh.skillId != id) {
|
||||||
coolDowns.remove(mcvh.skillId);
|
coolDowns.remove(mcvh.skillId);
|
||||||
if (packet) {
|
if (packet) {
|
||||||
client.announce(MaplePacketCreator.skillCooldown(mcvh.skillId, 0));
|
client.announce(PacketCreator.skillCooldown(mcvh.skillId, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8742,7 +8742,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendPolice(int greason, String reason, int duration) {
|
public void sendPolice(int greason, String reason, int duration) {
|
||||||
announce(MaplePacketCreator.sendPolice(String.format("You have been blocked by the#b %s Police for %s.#k", "Cosmic", reason)));
|
announce(PacketCreator.sendPolice(String.format("You have been blocked by the#b %s Police for %s.#k", "Cosmic", reason)));
|
||||||
this.isbanned = true;
|
this.isbanned = true;
|
||||||
TimerManager.getInstance().schedule(new Runnable() {
|
TimerManager.getInstance().schedule(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -8755,14 +8755,14 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
public void sendPolice(String text) {
|
public void sendPolice(String text) {
|
||||||
String message = getName() + " received this - " + text;
|
String message = getName() + " received this - " + text;
|
||||||
if (Server.getInstance().isGmOnline(this.getWorld())) { //Alert and log if a GM is online
|
if (Server.getInstance().isGmOnline(this.getWorld())) { //Alert and log if a GM is online
|
||||||
Server.getInstance().broadcastGMMessage(this.getWorld(), MaplePacketCreator.sendYellowTip(message));
|
Server.getInstance().broadcastGMMessage(this.getWorld(), PacketCreator.sendYellowTip(message));
|
||||||
FilePrinter.print(FilePrinter.AUTOBAN_WARNING, message);
|
FilePrinter.print(FilePrinter.AUTOBAN_WARNING, message);
|
||||||
} else { //Auto DC and log if no GM is online
|
} else { //Auto DC and log if no GM is online
|
||||||
client.disconnect(false, false);
|
client.disconnect(false, false);
|
||||||
FilePrinter.print(FilePrinter.AUTOBAN_DC, message);
|
FilePrinter.print(FilePrinter.AUTOBAN_DC, message);
|
||||||
}
|
}
|
||||||
//Server.getInstance().broadcastGMMessage(0, MaplePacketCreator.serverNotice(1, getName() + " received this - " + text));
|
//Server.getInstance().broadcastGMMessage(0, PacketCreator.serverNotice(1, getName() + " received this - " + text));
|
||||||
//announce(MaplePacketCreator.sendPolice(text));
|
//announce(PacketCreator.sendPolice(text));
|
||||||
//this.isbanned = true;
|
//this.isbanned = true;
|
||||||
//TimerManager.getInstance().schedule(new Runnable() {
|
//TimerManager.getInstance().schedule(new Runnable() {
|
||||||
// @Override
|
// @Override
|
||||||
@@ -8773,7 +8773,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendKeymap() {
|
public void sendKeymap() {
|
||||||
client.announce(MaplePacketCreator.getKeymap(keymap));
|
client.announce(PacketCreator.getKeymap(keymap));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendQuickmap() {
|
public void sendQuickmap() {
|
||||||
@@ -8784,12 +8784,12 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
pQuickslotKeyMapped = new MapleQuickslotBinding(MapleQuickslotBinding.DEFAULT_QUICKSLOTS);
|
pQuickslotKeyMapped = new MapleQuickslotBinding(MapleQuickslotBinding.DEFAULT_QUICKSLOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.announce(MaplePacketCreator.QuickslotMappedInit(pQuickslotKeyMapped));
|
this.announce(PacketCreator.QuickslotMappedInit(pQuickslotKeyMapped));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendMacros() {
|
public void sendMacros() {
|
||||||
// Always send the macro packet to fix a client side bug when switching characters.
|
// Always send the macro packet to fix a client side bug when switching characters.
|
||||||
client.announce(MaplePacketCreator.getMacros(skillMacros));
|
client.announce(PacketCreator.getMacros(skillMacros));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillMacro[] getMacros() {
|
public SkillMacro[] getMacros() {
|
||||||
@@ -8826,7 +8826,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
public void setBuddyCapacity(int capacity) {
|
public void setBuddyCapacity(int capacity) {
|
||||||
buddylist.setCapacity(capacity);
|
buddylist.setCapacity(capacity);
|
||||||
client.announce(MaplePacketCreator.updateBuddyCapacity(capacity));
|
client.announce(PacketCreator.updateBuddyCapacity(capacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBuffedValue(MapleBuffStat effect, int value) {
|
public void setBuffedValue(MapleBuffStat effect, int value) {
|
||||||
@@ -9300,7 +9300,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (newLimit != -1) {
|
if (newLimit != -1) {
|
||||||
this.saveCharToDB();
|
this.saveCharToDB();
|
||||||
if (update) {
|
if (update) {
|
||||||
client.announce(MaplePacketCreator.updateInventorySlotLimit(type, newLimit));
|
client.announce(PacketCreator.updateInventorySlotLimit(type, newLimit));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -9602,7 +9602,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
public void showDojoClock() {
|
public void showDojoClock() {
|
||||||
if (GameConstants.isDojoBossArea(map.getId())) {
|
if (GameConstants.isDojoBossArea(map.getId())) {
|
||||||
client.announce(MaplePacketCreator.getClock((int) (getDojoTimeLeft() / 1000)));
|
client.announce(PacketCreator.getClock((int) (getDojoTimeLeft() / 1000)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9632,7 +9632,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
strLines.add("");
|
strLines.add("");
|
||||||
strLines.add(this.getClient().getChannelServer().getServerMessage().isEmpty() ? 0 : 1, "Get off my lawn!!");
|
strLines.add(this.getClient().getChannelServer().getServerMessage().isEmpty() ? 0 : 1, "Get off my lawn!!");
|
||||||
|
|
||||||
this.announce(MaplePacketCreator.getAvatarMega(mapOwner, medal, this.getClient().getChannel(), 5390006, strLines, true));
|
this.announce(PacketCreator.getAvatarMega(mapOwner, medal, this.getClient().getChannel(), 5390006, strLines, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9652,7 +9652,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
rs.last();
|
rs.last();
|
||||||
int count = rs.getRow();
|
int count = rs.getRow();
|
||||||
rs.first();
|
rs.first();
|
||||||
client.announce(MaplePacketCreator.showNotes(rs, count));
|
client.announce(PacketCreator.showNotes(rs, count));
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -9731,7 +9731,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if(maplemount != null) {
|
if(maplemount != null) {
|
||||||
int tiredness = maplemount.incrementAndGetTiredness();
|
int tiredness = maplemount.incrementAndGetTiredness();
|
||||||
|
|
||||||
this.getMap().broadcastMessage(MaplePacketCreator.updateMount(this.getId(), maplemount, false));
|
this.getMap().broadcastMessage(PacketCreator.updateMount(this.getId(), maplemount, false));
|
||||||
if (tiredness > 99) {
|
if (tiredness > 99) {
|
||||||
maplemount.setTiredness(99);
|
maplemount.setTiredness(99);
|
||||||
this.dispelSkill(this.getJobType() * 10000000 + 1004);
|
this.dispelSkill(this.getJobType() * 10000000 + 1004);
|
||||||
@@ -9781,13 +9781,13 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.getClient().getWorldServer().unregisterPetHunger(this, petIdx);
|
this.getClient().getWorldServer().unregisterPetHunger(this, petIdx);
|
||||||
getMap().broadcastMessage(this, MaplePacketCreator.showPet(this, pet, true, hunger), true);
|
getMap().broadcastMessage(this, PacketCreator.showPet(this, pet, true, hunger), true);
|
||||||
|
|
||||||
removePet(pet, shift_left);
|
removePet(pet, shift_left);
|
||||||
commitExcludedItems();
|
commitExcludedItems();
|
||||||
|
|
||||||
client.announce(MaplePacketCreator.petStatUpdate(this));
|
client.announce(PacketCreator.petStatUpdate(this));
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateMacros(int position, SkillMacro updateMacro) {
|
public void updateMacros(int position, SkillMacro updateMacro) {
|
||||||
@@ -9808,7 +9808,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
int curmaxhp = getCurrentMaxHp();
|
int curmaxhp = getCurrentMaxHp();
|
||||||
int curhp = getHp();
|
int curhp = getHp();
|
||||||
for (MapleCharacter partychar : this.getPartyMembersOnSameMap()) {
|
for (MapleCharacter partychar : this.getPartyMembersOnSameMap()) {
|
||||||
partychar.announce(MaplePacketCreator.updatePartyMemberHP(getId(), curhp, curmaxhp));
|
partychar.announce(PacketCreator.updatePartyMemberHP(getId(), curhp, curmaxhp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9858,20 +9858,20 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
switch (questUpdate.getLeft()) {
|
switch (questUpdate.getLeft()) {
|
||||||
case UPDATE:
|
case UPDATE:
|
||||||
announce(MaplePacketCreator.updateQuest(chr, (MapleQuestStatus) objs[0], (Boolean) objs[1]));
|
announce(PacketCreator.updateQuest(chr, (MapleQuestStatus) objs[0], (Boolean) objs[1]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FORFEIT:
|
case FORFEIT:
|
||||||
announce(MaplePacketCreator.forfeitQuest((Short) objs[0]));
|
announce(PacketCreator.forfeitQuest((Short) objs[0]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COMPLETE:
|
case COMPLETE:
|
||||||
announce(MaplePacketCreator.completeQuest((Short) objs[0], (Long) objs[1]));
|
announce(PacketCreator.completeQuest((Short) objs[0], (Long) objs[1]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INFO:
|
case INFO:
|
||||||
MapleQuestStatus qs = (MapleQuestStatus) objs[0];
|
MapleQuestStatus qs = (MapleQuestStatus) objs[0];
|
||||||
announce(MaplePacketCreator.updateQuestInfo(qs.getQuest().getId(), qs.getNpc()));
|
announce(PacketCreator.updateQuestInfo(qs.getQuest().getId(), qs.getNpc()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9932,7 +9932,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
private void expireQuest(MapleQuest quest) {
|
private void expireQuest(MapleQuest quest) {
|
||||||
if (quest.forfeit(this)) {
|
if (quest.forfeit(this)) {
|
||||||
announce(MaplePacketCreator.questExpire(quest.getId()));
|
announce(PacketCreator.questExpire(quest.getId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10027,7 +10027,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
public void questTimeLimit(final MapleQuest quest, int seconds) {
|
public void questTimeLimit(final MapleQuest quest, int seconds) {
|
||||||
registerQuestExpire(quest, seconds * 1000);
|
registerQuestExpire(quest, seconds * 1000);
|
||||||
announce(MaplePacketCreator.addQuestTimeLimit(quest.getId(), seconds * 1000));
|
announce(PacketCreator.addQuestTimeLimit(quest.getId(), seconds * 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void questTimeLimit2(final MapleQuest quest, long expires) {
|
public void questTimeLimit2(final MapleQuest quest, long expires) {
|
||||||
@@ -10045,7 +10045,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateSingleStat(MapleStat stat, int newval, boolean itemReaction) {
|
private void updateSingleStat(MapleStat stat, int newval, boolean itemReaction) {
|
||||||
announce(MaplePacketCreator.updatePlayerStats(Collections.singletonList(new Pair<>(stat, Integer.valueOf(newval))), itemReaction, this));
|
announce(PacketCreator.updatePlayerStats(Collections.singletonList(new Pair<>(stat, Integer.valueOf(newval))), itemReaction, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void announce(final byte[] packet) {
|
public void announce(final byte[] packet) {
|
||||||
@@ -10064,22 +10064,22 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendDestroyData(MapleClient client) {
|
public void sendDestroyData(MapleClient client) {
|
||||||
client.announce(MaplePacketCreator.removePlayerFromMap(this.getObjectId()));
|
client.announce(PacketCreator.removePlayerFromMap(this.getObjectId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendSpawnData(MapleClient client) {
|
public void sendSpawnData(MapleClient client) {
|
||||||
if (!this.isHidden() || client.getPlayer().gmLevel() > 1) {
|
if (!this.isHidden() || client.getPlayer().gmLevel() > 1) {
|
||||||
client.announce(MaplePacketCreator.spawnPlayerMapObject(client, this, false));
|
client.announce(PacketCreator.spawnPlayerMapObject(client, this, false));
|
||||||
|
|
||||||
if (buffEffects.containsKey(getJobMapChair(job))) { // mustn't effLock, chrLock sendSpawnData
|
if (buffEffects.containsKey(getJobMapChair(job))) { // mustn't effLock, chrLock sendSpawnData
|
||||||
client.announce(MaplePacketCreator.giveForeignChairSkillEffect(id));
|
client.announce(PacketCreator.giveForeignChairSkillEffect(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isHidden()) {
|
if (this.isHidden()) {
|
||||||
List<Pair<MapleBuffStat, Integer>> dsstat = Collections.singletonList(new Pair<>(MapleBuffStat.DARKSIGHT, 0));
|
List<Pair<MapleBuffStat, Integer>> dsstat = Collections.singletonList(new Pair<>(MapleBuffStat.DARKSIGHT, 0));
|
||||||
getMap().broadcastGMMessage(this, MaplePacketCreator.giveForeignBuff(getId(), dsstat), false);
|
getMap().broadcastGMMessage(this, PacketCreator.giveForeignBuff(getId(), dsstat), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10148,7 +10148,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
public void blockPortal(String scriptName) {
|
public void blockPortal(String scriptName) {
|
||||||
if (!blockedPortals.contains(scriptName) && scriptName != null) {
|
if (!blockedPortals.contains(scriptName) && scriptName != null) {
|
||||||
blockedPortals.add(scriptName);
|
blockedPortals.add(scriptName);
|
||||||
client.announce(MaplePacketCreator.enableActions());
|
client.announce(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10172,7 +10172,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
|
|
||||||
public void updateAreaInfo(int area, String info) {
|
public void updateAreaInfo(int area, String info) {
|
||||||
area_info.put(Short.valueOf((short) area), info);
|
area_info.put(Short.valueOf((short) area), info);
|
||||||
announce(MaplePacketCreator.updateAreaInfo(area, info));
|
announce(PacketCreator.updateAreaInfo(area, info));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAreaInfo(int area) {
|
public String getAreaInfo(int area) {
|
||||||
@@ -10189,7 +10189,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.ban(reason);
|
this.ban(reason);
|
||||||
announce(MaplePacketCreator.sendPolice(String.format("You have been blocked by the#b %s Police for HACK reason.#k", "Cosmic")));
|
announce(PacketCreator.sendPolice(String.format("You have been blocked by the#b %s Police for HACK reason.#k", "Cosmic")));
|
||||||
TimerManager.getInstance().schedule(new Runnable() {
|
TimerManager.getInstance().schedule(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -10197,7 +10197,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
}
|
}
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
Server.getInstance().broadcastGMMessage(this.getWorld(), MaplePacketCreator.serverNotice(6, MapleCharacter.makeMapleReadable(this.name) + " was autobanned for " + reason));
|
Server.getInstance().broadcastGMMessage(this.getWorld(), PacketCreator.serverNotice(6, MapleCharacter.makeMapleReadable(this.name) + " was autobanned for " + reason));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void block(int reason, int days, String desc) {
|
public void block(int reason, int days, String desc) {
|
||||||
@@ -10417,12 +10417,12 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
public void broadcastMarriageMessage() {
|
public void broadcastMarriageMessage() {
|
||||||
MapleGuild guild = this.getGuild();
|
MapleGuild guild = this.getGuild();
|
||||||
if(guild != null) {
|
if(guild != null) {
|
||||||
guild.broadcast(MaplePacketCreator.marriageMessage(0, name));
|
guild.broadcast(PacketCreator.marriageMessage(0, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
MapleFamily family = this.getFamily();
|
MapleFamily family = this.getFamily();
|
||||||
if(family != null) {
|
if(family != null) {
|
||||||
family.broadcast(MaplePacketCreator.marriageMessage(1, name));
|
family.broadcast(PacketCreator.marriageMessage(1, name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11238,9 +11238,9 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
|||||||
if (this.getCP() > this.getTotalCP()) {
|
if (this.getCP() > this.getTotalCP()) {
|
||||||
this.setTotalCP(this.getCP());
|
this.setTotalCP(this.getCP());
|
||||||
}
|
}
|
||||||
this.getClient().announce(MaplePacketCreator.CPUpdate(false, this.getCP(), this.getTotalCP(), getTeam()));
|
this.getClient().announce(PacketCreator.CPUpdate(false, this.getCP(), this.getTotalCP(), getTeam()));
|
||||||
if (this.getParty() != null && getTeam() != -1) {
|
if (this.getParty() != null && getTeam() != -1) {
|
||||||
this.getMap().broadcastMessage(MaplePacketCreator.CPUpdate(true, this.getMonsterCarnival().getCP(team), this.getMonsterCarnival().getTotalCP(team), getTeam()));
|
this.getMap().broadcastMessage(PacketCreator.CPUpdate(true, this.getMonsterCarnival().getCP(team), this.getMonsterCarnival().getTotalCP(team), getTeam()));
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ import io.netty.handler.timeout.IdleStateEvent;
|
|||||||
import net.MaplePacketHandler;
|
import net.MaplePacketHandler;
|
||||||
import net.PacketProcessor;
|
import net.PacketProcessor;
|
||||||
import net.netty.InvalidPacketHeaderException;
|
import net.netty.InvalidPacketHeaderException;
|
||||||
import net.packet.logging.LoggingUtil;
|
|
||||||
import net.packet.logging.MapleLogger;
|
|
||||||
import net.packet.ByteBufOutPacket;
|
import net.packet.ByteBufOutPacket;
|
||||||
import net.packet.InPacket;
|
import net.packet.InPacket;
|
||||||
import net.packet.OutPacket;
|
import net.packet.OutPacket;
|
||||||
|
import net.packet.logging.LoggingUtil;
|
||||||
|
import net.packet.logging.MapleLogger;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import net.server.audit.locks.MonitoredLockType;
|
import net.server.audit.locks.MonitoredLockType;
|
||||||
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
|
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
|
||||||
@@ -208,7 +208,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
handler.handlePacket(accessor, this);
|
handler.handlePacket(accessor, this);
|
||||||
} catch (final Throwable t) {
|
} catch (final Throwable t) {
|
||||||
FilePrinter.printError(FilePrinter.PACKET_HANDLER + handler.getClass().getName() + ".txt", t, "Error for " + (getPlayer() == null ? "" : "player ; " + getPlayer() + " on map ; " + getPlayer().getMapId() + " - ") + "account ; " + getAccountName() + "\r\n" + accessor);
|
FilePrinter.printError(FilePrinter.PACKET_HANDLER + handler.getClass().getName() + ".txt", t, "Error for " + (getPlayer() == null ? "" : "player ; " + getPlayer() + " on map ; " + getPlayer().getMapId() + " - ") + "account ; " + getAccountName() + "\r\n" + accessor);
|
||||||
//client.announce(MaplePacketCreator.enableActions());//bugs sometimes
|
//client.announce(PacketCreator.enableActions());//bugs sometimes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,7 +307,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendCharList(int server) {
|
public void sendCharList(int server) {
|
||||||
this.announce(MaplePacketCreator.getCharList(this, server, 0));
|
this.announce(PacketCreator.getCharList(this, server, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MapleCharacter> loadCharacters(int serverId) {
|
public List<MapleCharacter> loadCharacters(int serverId) {
|
||||||
@@ -999,7 +999,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
if (guild != null) {
|
if (guild != null) {
|
||||||
final Server server = Server.getInstance();
|
final Server server = Server.getInstance();
|
||||||
server.setGuildMemberOnline(player, false, player.getClient().getChannel());
|
server.setGuildMemberOnline(player, false, player.getClient().getChannel());
|
||||||
player.getClient().announce(MaplePacketCreator.showGuildInfo(player));
|
player.getClient().announce(PacketCreator.showGuildInfo(player));
|
||||||
}
|
}
|
||||||
if (bl != null) {
|
if (bl != null) {
|
||||||
wserv.loggedOff(player.getName(), player.getId(), channel, player.getBuddylist().getBuddyIds());
|
wserv.loggedOff(player.getName(), player.getId(), channel, player.getBuddylist().getBuddyIds());
|
||||||
@@ -1144,7 +1144,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
|
|
||||||
public void checkIfIdle(final IdleStateEvent event) {
|
public void checkIfIdle(final IdleStateEvent event) {
|
||||||
final long pingedAt = System.currentTimeMillis();
|
final long pingedAt = System.currentTimeMillis();
|
||||||
announce(MaplePacketCreator.getPing());
|
announce(PacketCreator.getPing());
|
||||||
TimerManager.getInstance().schedule(() -> {
|
TimerManager.getInstance().schedule(() -> {
|
||||||
try {
|
try {
|
||||||
if (lastPong < pingedAt) {
|
if (lastPong < pingedAt) {
|
||||||
@@ -1414,12 +1414,12 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
|
|
||||||
private void announceDisableServerMessage() {
|
private void announceDisableServerMessage() {
|
||||||
if (!this.getWorldServer().registerDisabledServerMessage(player.getId())) {
|
if (!this.getWorldServer().registerDisabledServerMessage(player.getId())) {
|
||||||
announce(MaplePacketCreator.serverMessage(""));
|
announce(PacketCreator.serverMessage(""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void announceServerMessage() {
|
public void announceServerMessage() {
|
||||||
announce(MaplePacketCreator.serverMessage(this.getChannelServer().getServerMessage()));
|
announce(PacketCreator.serverMessage(this.getChannelServer().getServerMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void announceBossHpBar(MapleMonster mm, final int mobHash, final byte[] packet) {
|
public synchronized void announceBossHpBar(MapleMonster mm, final int mobHash, final byte[] packet) {
|
||||||
@@ -1477,8 +1477,8 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void announceHint(String msg, int length) {
|
public void announceHint(String msg, int length) {
|
||||||
announce(MaplePacketCreator.sendHint(msg, length, 10));
|
announce(PacketCreator.sendHint(msg, length, 10));
|
||||||
announce(MaplePacketCreator.enableActions());
|
announce(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeChannel(int channel) {
|
public void changeChannel(int channel) {
|
||||||
@@ -1488,18 +1488,18 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!player.isAlive() || FieldLimit.CANNOTMIGRATE.check(player.getMap().getFieldLimit())) {
|
if (!player.isAlive() || FieldLimit.CANNOTMIGRATE.check(player.getMap().getFieldLimit())) {
|
||||||
announce(MaplePacketCreator.enableActions());
|
announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
} else if (MapleMiniDungeonInfo.isDungeonMap(player.getMapId())) {
|
} else if (MapleMiniDungeonInfo.isDungeonMap(player.getMapId())) {
|
||||||
announce(MaplePacketCreator.serverNotice(5, "Changing channels or entering Cash Shop or MTS are disabled when inside a Mini-Dungeon."));
|
announce(PacketCreator.serverNotice(5, "Changing channels or entering Cash Shop or MTS are disabled when inside a Mini-Dungeon."));
|
||||||
announce(MaplePacketCreator.enableActions());
|
announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] socket = Server.getInstance().getInetSocket(this, getWorld(), channel);
|
String[] socket = Server.getInstance().getInetSocket(this, getWorld(), channel);
|
||||||
if (socket == null) {
|
if (socket == null) {
|
||||||
announce(MaplePacketCreator.serverNotice(1, "Channel " + channel + " is currently disabled. Try another channel."));
|
announce(PacketCreator.serverNotice(1, "Channel " + channel + " is currently disabled. Try another channel."));
|
||||||
announce(MaplePacketCreator.enableActions());
|
announce(PacketCreator.enableActions());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1530,7 +1530,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
|
|
||||||
player.setSessionTransitionState();
|
player.setSessionTransitionState();
|
||||||
try {
|
try {
|
||||||
announce(MaplePacketCreator.getChannelChange(InetAddress.getByName(socket[0]), Integer.parseInt(socket[1])));
|
announce(PacketCreator.getChannelChange(InetAddress.getByName(socket[0]), Integer.parseInt(socket[1])));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -1586,7 +1586,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void enableCSActions() {
|
public void enableCSActions() {
|
||||||
announce(MaplePacketCreator.enableCSUse(player));
|
announce(PacketCreator.enableCSUse(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canBypassPin() {
|
public boolean canBypassPin() {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import net.server.Server;
|
|||||||
import net.server.world.World;
|
import net.server.world.World;
|
||||||
import tools.DatabaseConnection;
|
import tools.DatabaseConnection;
|
||||||
import tools.FilePrinter;
|
import tools.FilePrinter;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
import tools.Pair;
|
import tools.Pair;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
@@ -169,7 +169,7 @@ public class MapleFamily {
|
|||||||
for(MapleFamilyEntry entry : members.values()) {
|
for(MapleFamilyEntry entry : members.values()) {
|
||||||
MapleCharacter chr = entry.getChr();
|
MapleCharacter chr = entry.getChr();
|
||||||
if(chr != null) {
|
if(chr != null) {
|
||||||
chr.getClient().announce(MaplePacketCreator.getFamilyInfo(entry));
|
chr.getClient().announce(PacketCreator.getFamilyInfo(entry));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
*/
|
*/
|
||||||
package client;
|
package client;
|
||||||
|
|
||||||
|
import net.server.Server;
|
||||||
|
import tools.DatabaseConnection;
|
||||||
|
import tools.FilePrinter;
|
||||||
|
import tools.PacketCreator;
|
||||||
|
import tools.Pair;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -26,12 +32,6 @@ import java.util.Arrays;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.server.Server;
|
|
||||||
import tools.DatabaseConnection;
|
|
||||||
import tools.FilePrinter;
|
|
||||||
import tools.MaplePacketCreator;
|
|
||||||
import tools.Pair;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Ubaware
|
* @author Ubaware
|
||||||
*/
|
*/
|
||||||
@@ -264,7 +264,7 @@ public class MapleFamilyEntry {
|
|||||||
this.totalReputation += gain;
|
this.totalReputation += gain;
|
||||||
}
|
}
|
||||||
MapleCharacter chr = getChr();
|
MapleCharacter chr = getChr();
|
||||||
if(chr != null) chr.announce(MaplePacketCreator.sendGainRep(gain, from != null ? from.getName() : ""));
|
if(chr != null) chr.announce(PacketCreator.sendGainRep(gain, from != null ? from.getName() : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void giveReputationToSenior(int gain, boolean includeSuperSenior) {
|
public void giveReputationToSenior(int gain, boolean includeSuperSenior) {
|
||||||
@@ -437,11 +437,11 @@ public class MapleFamilyEntry {
|
|||||||
MapleFamilyEntry senior = getSenior();
|
MapleFamilyEntry senior = getSenior();
|
||||||
if(senior != null) {
|
if(senior != null) {
|
||||||
MapleCharacter seniorChr = senior.getChr();
|
MapleCharacter seniorChr = senior.getChr();
|
||||||
if(seniorChr != null) seniorChr.announce(MaplePacketCreator.getFamilyInfo(senior));
|
if(seniorChr != null) seniorChr.announce(PacketCreator.getFamilyInfo(senior));
|
||||||
senior = senior.getSenior();
|
senior = senior.getSenior();
|
||||||
if(includeSuperSenior && senior != null) {
|
if(includeSuperSenior && senior != null) {
|
||||||
seniorChr = senior.getChr();
|
seniorChr = senior.getChr();
|
||||||
if(seniorChr != null) seniorChr.announce(MaplePacketCreator.getFamilyInfo(senior));
|
if(seniorChr != null) seniorChr.announce(PacketCreator.getFamilyInfo(senior));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ package client;
|
|||||||
import net.server.audit.locks.MonitoredLockType;
|
import net.server.audit.locks.MonitoredLockType;
|
||||||
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
|
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
|
||||||
import tools.DatabaseConnection;
|
import tools.DatabaseConnection;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
@@ -54,7 +54,7 @@ public final class MonsterBook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addCard(final MapleClient c, final int cardid) {
|
public void addCard(final MapleClient c, final int cardid) {
|
||||||
c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MaplePacketCreator.showForeignCardEffect(c.getPlayer().getId()), false);
|
c.getPlayer().getMap().broadcastMessage(c.getPlayer(), PacketCreator.showForeignCardEffect(c.getPlayer().getId()), false);
|
||||||
|
|
||||||
Integer qty;
|
Integer qty;
|
||||||
lock.lock();
|
lock.lock();
|
||||||
@@ -84,10 +84,10 @@ public final class MonsterBook {
|
|||||||
calculateLevel();
|
calculateLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
c.announce(MaplePacketCreator.addCard(false, cardid, qty + 1));
|
c.announce(PacketCreator.addCard(false, cardid, qty + 1));
|
||||||
c.announce(MaplePacketCreator.showGainCard());
|
c.announce(PacketCreator.showGainCard());
|
||||||
} else {
|
} else {
|
||||||
c.announce(MaplePacketCreator.addCard(true, cardid, 5));
|
c.announce(PacketCreator.addCard(true, cardid, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ package client.autoban;
|
|||||||
|
|
||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import config.YamlConfig;
|
import config.YamlConfig;
|
||||||
|
import net.packet.logging.MapleLogger;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.FilePrinter;
|
import tools.FilePrinter;
|
||||||
import net.packet.logging.MapleLogger;
|
import tools.PacketCreator;
|
||||||
import tools.MaplePacketCreator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -88,7 +88,7 @@ public enum AutobanFactory {
|
|||||||
if (chr != null && MapleLogger.ignored.contains(chr.getId())){
|
if (chr != null && MapleLogger.ignored.contains(chr.getId())){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Server.getInstance().broadcastGMMessage((chr != null ? chr.getWorld() : 0), MaplePacketCreator.sendYellowTip((chr != null ? MapleCharacter.makeMapleReadable(chr.getName()) : "") + " caused " + this.name() + " " + reason));
|
Server.getInstance().broadcastGMMessage((chr != null ? chr.getWorld() : 0), PacketCreator.sendYellowTip((chr != null ? MapleCharacter.makeMapleReadable(chr.getName()) : "") + " caused " + this.name() + " " + reason));
|
||||||
}
|
}
|
||||||
if (YamlConfig.config.server.USE_AUTOBAN_LOG) {
|
if (YamlConfig.config.server.USE_AUTOBAN_LOG) {
|
||||||
FilePrinter.print(FilePrinter.AUTOBAN_WARNING, (chr != null ? MapleCharacter.makeMapleReadable(chr.getName()) : "") + " caused " + this.name() + " " + reason);
|
FilePrinter.print(FilePrinter.AUTOBAN_WARNING, (chr != null ? MapleCharacter.makeMapleReadable(chr.getName()) : "") + " caused " + this.name() + " " + reason);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import client.MapleClient;
|
|||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import scripting.npc.NPCScriptManager;
|
import scripting.npc.NPCScriptManager;
|
||||||
import scripting.quest.QuestScriptManager;
|
import scripting.quest.QuestScriptManager;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class DisposeCommand extends Command {
|
public class DisposeCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ public class DisposeCommand extends Command {
|
|||||||
public void execute(MapleClient c, String[] params) {
|
public void execute(MapleClient c, String[] params) {
|
||||||
NPCScriptManager.getInstance().dispose(c);
|
NPCScriptManager.getInstance().dispose(c);
|
||||||
QuestScriptManager.getInstance().dispose(c);
|
QuestScriptManager.getInstance().dispose(c);
|
||||||
c.announce(MaplePacketCreator.enableActions());
|
c.announce(PacketCreator.enableActions());
|
||||||
c.removeClickedNPC();
|
c.removeClickedNPC();
|
||||||
c.getPlayer().message("You've been disposed.");
|
c.getPlayer().message("You've been disposed.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import client.MapleClient;
|
|||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.FilePrinter;
|
import tools.FilePrinter;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
import tools.Randomizer;
|
import tools.Randomizer;
|
||||||
|
|
||||||
public class GmCommand extends Command {
|
public class GmCommand extends Command {
|
||||||
@@ -51,8 +51,8 @@ public class GmCommand extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String message = player.getLastCommandMessage();
|
String message = player.getLastCommandMessage();
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.sendYellowTip("[GM Message]:" + MapleCharacter.makeMapleReadable(player.getName()) + ": " + message));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.sendYellowTip("[GM Message]:" + MapleCharacter.makeMapleReadable(player.getName()) + ": " + message));
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(1, message));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(1, message));
|
||||||
FilePrinter.printError(FilePrinter.COMMAND_GM, MapleCharacter.makeMapleReadable(player.getName()) + ": " + message);
|
FilePrinter.printError(FilePrinter.COMMAND_GM, MapleCharacter.makeMapleReadable(player.getName()) + ": " + message);
|
||||||
player.dropMessage(5, "Your message '" + message + "' was sent to GMs.");
|
player.dropMessage(5, "Your message '" + message + "' was sent to GMs.");
|
||||||
player.dropMessage(5, tips[Randomizer.nextInt(tips.length)]);
|
player.dropMessage(5, tips[Randomizer.nextInt(tips.length)]);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
|||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
import tools.Pair;
|
import tools.Pair;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -42,6 +42,6 @@ public class RanksCommand extends Command {
|
|||||||
MapleCharacter player = c.getPlayer();
|
MapleCharacter player = c.getPlayer();
|
||||||
|
|
||||||
List<Pair<String, Integer>> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld());
|
List<Pair<String, Integer>> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld());
|
||||||
player.announce(MaplePacketCreator.showPlayerRanks(9010000, worldRanking));
|
player.announce(PacketCreator.showPlayerRanks(9010000, worldRanking));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import client.MapleClient;
|
|||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.FilePrinter;
|
import tools.FilePrinter;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class ReportBugCommand extends Command {
|
public class ReportBugCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -44,8 +44,8 @@ public class ReportBugCommand extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String message = player.getLastCommandMessage();
|
String message = player.getLastCommandMessage();
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.sendYellowTip("[Bug]:" + MapleCharacter.makeMapleReadable(player.getName()) + ": " + message));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.sendYellowTip("[Bug]:" + MapleCharacter.makeMapleReadable(player.getName()) + ": " + message));
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(1, message));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(1, message));
|
||||||
FilePrinter.printError(FilePrinter.COMMAND_BUG, MapleCharacter.makeMapleReadable(player.getName()) + ": " + message);
|
FilePrinter.printError(FilePrinter.COMMAND_BUG, MapleCharacter.makeMapleReadable(player.getName()) + ": " + message);
|
||||||
player.dropMessage(5, "Your bug '" + message + "' was submitted successfully to our developers. Thank you!");
|
player.dropMessage(5, "Your bug '" + message + "' was submitted successfully to our developers. Thank you!");
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import client.MapleClient;
|
|||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import server.life.MapleLifeFactory;
|
import server.life.MapleLifeFactory;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class BombCommand extends Command {
|
public class BombCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -42,7 +42,7 @@ public class BombCommand extends Command {
|
|||||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||||
if (victim != null) {
|
if (victim != null) {
|
||||||
victim.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300166), victim.getPosition());
|
victim.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300166), victim.getPosition());
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(5, player.getName() + " used !bomb on " + victim.getName()));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !bomb on " + victim.getName()));
|
||||||
} else {
|
} else {
|
||||||
player.message("Player '" + params[0] + "' could not be found on this world.");
|
player.message("Player '" + params[0] + "' could not be found on this world.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package client.command.commands.gm2;
|
|||||||
|
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class UnBugCommand extends Command {
|
public class UnBugCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -34,6 +34,6 @@ public class UnBugCommand extends Command {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(MapleClient c, String[] params) {
|
public void execute(MapleClient c, String[] params) {
|
||||||
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.enableActions());
|
c.getPlayer().getMap().broadcastMessage(PacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import client.command.Command;
|
|||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import server.TimerManager;
|
import server.TimerManager;
|
||||||
import tools.DatabaseConnection;
|
import tools.DatabaseConnection;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
@@ -73,15 +73,15 @@ public class BanCommand extends Command {
|
|||||||
target.ban(reason);
|
target.ban(reason);
|
||||||
target.yellowMessage("You have been banned by #b" + c.getPlayer().getName() + " #k.");
|
target.yellowMessage("You have been banned by #b" + c.getPlayer().getName() + " #k.");
|
||||||
target.yellowMessage("Reason: " + reason);
|
target.yellowMessage("Reason: " + reason);
|
||||||
c.announce(MaplePacketCreator.getGMEffect(4, (byte) 0));
|
c.announce(PacketCreator.getGMEffect(4, (byte) 0));
|
||||||
final MapleCharacter rip = target;
|
final MapleCharacter rip = target;
|
||||||
TimerManager.getInstance().schedule(() -> rip.getClient().disconnect(false, false), 5000); //5 Seconds
|
TimerManager.getInstance().schedule(() -> rip.getClient().disconnect(false, false), 5000); //5 Seconds
|
||||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||||
} else if (MapleCharacter.ban(ign, reason, false)) {
|
} else if (MapleCharacter.ban(ign, reason, false)) {
|
||||||
c.announce(MaplePacketCreator.getGMEffect(4, (byte) 0));
|
c.announce(PacketCreator.getGMEffect(4, (byte) 0));
|
||||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||||
} else {
|
} else {
|
||||||
c.announce(MaplePacketCreator.getGMEffect(6, (byte) 1));
|
c.announce(PacketCreator.getGMEffect(6, (byte) 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ package client.command.commands.gm3;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
|
||||||
import net.packet.logging.MapleLogger;
|
import net.packet.logging.MapleLogger;
|
||||||
import tools.MaplePacketCreator;
|
import net.server.Server;
|
||||||
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class IgnoreCommand extends Command {
|
public class IgnoreCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,7 @@ public class IgnoreCommand extends Command {
|
|||||||
}
|
}
|
||||||
player.yellowMessage(victim.getName() + " is " + (!monitored_ ? "now being ignored." : "no longer being ignored."));
|
player.yellowMessage(victim.getName() + " is " + (!monitored_ ? "now being ignored." : "no longer being ignored."));
|
||||||
String message_ = player.getName() + (!monitored_ ? " has started ignoring " : " has stopped ignoring ") + victim.getName() + ".";
|
String message_ = player.getName() + (!monitored_ ? " has started ignoring " : " has stopped ignoring ") + victim.getName() + ".";
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(5, message_));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, message_));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
|||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class KillCommand extends Command {
|
public class KillCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -45,7 +45,7 @@ public class KillCommand extends Command {
|
|||||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||||
if (victim != null) {
|
if (victim != null) {
|
||||||
victim.updateHpMp(0);
|
victim.updateHpMp(0);
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(5, player.getName() + " used !kill on " + victim.getName()));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !kill on " + victim.getName()));
|
||||||
} else {
|
} else {
|
||||||
player.message("Player '" + params[0] + "' could not be found.");
|
player.message("Player '" + params[0] + "' could not be found.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class MaxEnergyCommand extends Command {
|
public class MaxEnergyCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -37,6 +37,6 @@ public class MaxEnergyCommand extends Command {
|
|||||||
public void execute(MapleClient c, String[] params) {
|
public void execute(MapleClient c, String[] params) {
|
||||||
MapleCharacter player = c.getPlayer();
|
MapleCharacter player = c.getPlayer();
|
||||||
c.getPlayer().setDojoEnergy(10000);
|
c.getPlayer().setDojoEnergy(10000);
|
||||||
c.announce(MaplePacketCreator.getEnergy("energy", 10000));
|
c.announce(PacketCreator.getEnergy("energy", 10000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ package client.command.commands.gm3;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
|
||||||
import net.packet.logging.MapleLogger;
|
import net.packet.logging.MapleLogger;
|
||||||
import tools.MaplePacketCreator;
|
import net.server.Server;
|
||||||
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class MonitorCommand extends Command {
|
public class MonitorCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,7 @@ public class MonitorCommand extends Command {
|
|||||||
}
|
}
|
||||||
player.yellowMessage(victim.getId() + " is " + (!monitored ? "now being monitored." : "no longer being monitored."));
|
player.yellowMessage(victim.getId() + " is " + (!monitored ? "now being monitored." : "no longer being monitored."));
|
||||||
String message = player.getName() + (!monitored ? " has started monitoring " : " has stopped monitoring ") + victim.getId() + ".";
|
String message = player.getName() + (!monitored ? " has started monitoring " : " has stopped monitoring ") + victim.getId() + ".";
|
||||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(5, message));
|
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, message));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
|||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import constants.game.GameConstants;
|
import constants.game.GameConstants;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class MusicCommand extends Command {
|
public class MusicCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -53,14 +53,14 @@ public class MusicCommand extends Command {
|
|||||||
sendMsg += "Syntax: #r!music <song>#k\r\n\r\n";
|
sendMsg += "Syntax: #r!music <song>#k\r\n\r\n";
|
||||||
sendMsg += getSongList();
|
sendMsg += getSongList();
|
||||||
|
|
||||||
c.announce(MaplePacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
c.announce(PacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String song = player.getLastCommandMessage();
|
String song = player.getLastCommandMessage();
|
||||||
for (String s : GameConstants.GAME_SONGS) {
|
for (String s : GameConstants.GAME_SONGS) {
|
||||||
if (s.equalsIgnoreCase(song)) { // thanks Masterrulax for finding an issue here
|
if (s.equalsIgnoreCase(song)) { // thanks Masterrulax for finding an issue here
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.musicChange(s));
|
player.getMap().broadcastMessage(PacketCreator.musicChange(s));
|
||||||
player.yellowMessage("Now playing song " + s + ".");
|
player.yellowMessage("Now playing song " + s + ".");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -70,6 +70,6 @@ public class MusicCommand extends Command {
|
|||||||
sendMsg += "Song not found, please enter a song below.\r\n\r\n";
|
sendMsg += "Song not found, please enter a song below.\r\n\r\n";
|
||||||
sendMsg += getSongList();
|
sendMsg += getSongList();
|
||||||
|
|
||||||
c.announce(MaplePacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
c.announce(PacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
|||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class NoticeCommand extends Command {
|
public class NoticeCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -37,6 +37,6 @@ public class NoticeCommand extends Command {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(MapleClient c, String[] params) {
|
public void execute(MapleClient c, String[] params) {
|
||||||
MapleCharacter player = c.getPlayer();
|
MapleCharacter player = c.getPlayer();
|
||||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[Notice] " + player.getLastCommandMessage()));
|
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[Notice] " + player.getLastCommandMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import client.MapleClient;
|
|||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import server.life.MapleLifeFactory;
|
import server.life.MapleLifeFactory;
|
||||||
import server.life.MapleNPC;
|
import server.life.MapleNPC;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class NpcCommand extends Command {
|
public class NpcCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -50,7 +50,7 @@ public class NpcCommand extends Command {
|
|||||||
npc.setRx1(player.getPosition().x - 50);
|
npc.setRx1(player.getPosition().x - 50);
|
||||||
npc.setFh(player.getMap().getFootholds().findBelow(c.getPlayer().getPosition()).getId());
|
npc.setFh(player.getMap().getFootholds().findBelow(c.getPlayer().getPosition()).getId());
|
||||||
player.getMap().addMapObject(npc);
|
player.getMap().addMapObject(npc);
|
||||||
player.getMap().broadcastMessage(MaplePacketCreator.spawnNPC(npc));
|
player.getMap().broadcastMessage(PacketCreator.spawnNPC(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
|||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class RipCommand extends Command {
|
public class RipCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -37,6 +37,6 @@ public class RipCommand extends Command {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(MapleClient c, String[] params) {
|
public void execute(MapleClient c, String[] params) {
|
||||||
MapleCharacter player = c.getPlayer();
|
MapleCharacter player = c.getPlayer();
|
||||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[RIP]: " + joinStringFrom(params, 1)));
|
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + joinStringFrom(params, 1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import client.MapleClient;
|
|||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import server.events.gm.MapleEvent;
|
import server.events.gm.MapleEvent;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class StartEventCommand extends Command {
|
public class StartEventCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -42,14 +42,14 @@ public class StartEventCommand extends Command {
|
|||||||
if (params.length > 1)
|
if (params.length > 1)
|
||||||
players = Integer.parseInt(params[0]);
|
players = Integer.parseInt(params[0]);
|
||||||
c.getChannelServer().setEvent(new MapleEvent(player.getMapId(), players));
|
c.getChannelServer().setEvent(new MapleEvent(player.getMapId(), players));
|
||||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.earnTitleMessage(
|
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.earnTitleMessage(
|
||||||
"[Event] An event has started on "
|
"[Event] An event has started on "
|
||||||
+ player.getMap().getMapName()
|
+ player.getMap().getMapName()
|
||||||
+ " and will allow "
|
+ " and will allow "
|
||||||
+ players
|
+ players
|
||||||
+ " players to join. Type @joinevent to participate."));
|
+ " players to join. Type @joinevent to participate."));
|
||||||
Server.getInstance().broadcastMessage(c.getWorld(),
|
Server.getInstance().broadcastMessage(c.getWorld(),
|
||||||
MaplePacketCreator.serverNotice(6, "[Event] An event has started on "
|
PacketCreator.serverNotice(6, "[Event] An event has started on "
|
||||||
+ player.getMap().getMapName()
|
+ player.getMap().getMapName()
|
||||||
+ " and will allow "
|
+ " and will allow "
|
||||||
+ players
|
+ players
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class TimerAllCommand extends Command {
|
public class TimerAllCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -43,13 +43,13 @@ public class TimerAllCommand extends Command {
|
|||||||
|
|
||||||
if (params[0].equalsIgnoreCase("remove")) {
|
if (params[0].equalsIgnoreCase("remove")) {
|
||||||
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||||
victim.announce(MaplePacketCreator.removeClock());
|
victim.announce(PacketCreator.removeClock());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
int seconds = Integer.parseInt(params[0]);
|
int seconds = Integer.parseInt(params[0]);
|
||||||
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||||
victim.announce(MaplePacketCreator.getClock(seconds));
|
victim.announce(PacketCreator.getClock(seconds));
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
player.yellowMessage("Syntax: !timerall <seconds>|remove");
|
player.yellowMessage("Syntax: !timerall <seconds>|remove");
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class TimerCommand extends Command {
|
public class TimerCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -44,10 +44,10 @@ public class TimerCommand extends Command {
|
|||||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||||
if (victim != null) {
|
if (victim != null) {
|
||||||
if (params[1].equalsIgnoreCase("remove")) {
|
if (params[1].equalsIgnoreCase("remove")) {
|
||||||
victim.announce(MaplePacketCreator.removeClock());
|
victim.announce(PacketCreator.removeClock());
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
victim.announce(MaplePacketCreator.getClock(Integer.parseInt(params[1])));
|
victim.announce(PacketCreator.getClock(Integer.parseInt(params[1])));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
player.yellowMessage("Syntax: !timer <playername> <seconds>|remove");
|
player.yellowMessage("Syntax: !timer <playername> <seconds>|remove");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class TimerMapCommand extends Command {
|
public class TimerMapCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -43,13 +43,13 @@ public class TimerMapCommand extends Command {
|
|||||||
|
|
||||||
if (params[0].equalsIgnoreCase("remove")) {
|
if (params[0].equalsIgnoreCase("remove")) {
|
||||||
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
||||||
victim.announce(MaplePacketCreator.removeClock());
|
victim.announce(PacketCreator.removeClock());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
int seconds = Integer.parseInt(params[0]);
|
int seconds = Integer.parseInt(params[0]);
|
||||||
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
||||||
victim.announce(MaplePacketCreator.getClock(seconds));
|
victim.announce(PacketCreator.getClock(seconds));
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
player.yellowMessage("Syntax: !timermap <seconds>|remove");
|
player.yellowMessage("Syntax: !timermap <seconds>|remove");
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ package client.command.commands.gm4;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -43,6 +43,6 @@ public class BossDropRateCommand extends Command {
|
|||||||
|
|
||||||
int bossdroprate = Math.max(Integer.parseInt(params[0]), 1);
|
int bossdroprate = Math.max(Integer.parseInt(params[0]), 1);
|
||||||
c.getWorldServer().setBossDropRate(bossdroprate);
|
c.getWorldServer().setBossDropRate(bossdroprate);
|
||||||
c.getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "[Rate] Boss Drop Rate has been changed to " + bossdroprate + "x."));
|
c.getWorldServer().broadcastPacket(PacketCreator.serverNotice(6, "[Rate] Boss Drop Rate has been changed to " + bossdroprate + "x."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm4;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class DropRateCommand extends Command {
|
public class DropRateCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -43,7 +43,7 @@ public class DropRateCommand extends Command {
|
|||||||
|
|
||||||
int droprate = Math.max(Integer.parseInt(params[0]), 1);
|
int droprate = Math.max(Integer.parseInt(params[0]), 1);
|
||||||
c.getWorldServer().setDropRate(droprate);
|
c.getWorldServer().setDropRate(droprate);
|
||||||
c.getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "[Rate] Drop Rate has been changed to " + droprate + "x."));
|
c.getWorldServer().broadcastPacket(PacketCreator.serverNotice(6, "[Rate] Drop Rate has been changed to " + droprate + "x."));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm4;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class ExpRateCommand extends Command {
|
public class ExpRateCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -43,6 +43,6 @@ public class ExpRateCommand extends Command {
|
|||||||
|
|
||||||
int exprate = Math.max(Integer.parseInt(params[0]), 1);
|
int exprate = Math.max(Integer.parseInt(params[0]), 1);
|
||||||
c.getWorldServer().setExpRate(exprate);
|
c.getWorldServer().setExpRate(exprate);
|
||||||
c.getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "[Rate] Exp Rate has been changed to " + exprate + "x."));
|
c.getWorldServer().broadcastPacket(PacketCreator.serverNotice(6, "[Rate] Exp Rate has been changed to " + exprate + "x."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm4;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class FishingRateCommand extends Command {
|
public class FishingRateCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -43,6 +43,6 @@ public class FishingRateCommand extends Command {
|
|||||||
|
|
||||||
int fishrate = Math.max(Integer.parseInt(params[0]), 1);
|
int fishrate = Math.max(Integer.parseInt(params[0]), 1);
|
||||||
c.getWorldServer().setFishingRate(fishrate);
|
c.getWorldServer().setFishingRate(fishrate);
|
||||||
c.getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "[Rate] Fishing Rate has been changed to " + fishrate + "x."));
|
c.getWorldServer().broadcastPacket(PacketCreator.serverNotice(6, "[Rate] Fishing Rate has been changed to " + fishrate + "x."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import client.inventory.manipulator.MapleInventoryManipulator;
|
|||||||
import server.maps.MapleMapItem;
|
import server.maps.MapleMapItem;
|
||||||
import server.maps.MapleMapObject;
|
import server.maps.MapleMapObject;
|
||||||
import server.maps.MapleMapObjectType;
|
import server.maps.MapleMapObjectType;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -70,7 +70,7 @@ public class ForceVacCommand extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.getMap().pickItemDrop(MaplePacketCreator.removeItemFromMap(mapItem.getObjectId(), 2, player.getId()), mapItem);
|
player.getMap().pickItemDrop(PacketCreator.removeItemFromMap(mapItem.getObjectId(), 2, player.getId()), mapItem);
|
||||||
} finally {
|
} finally {
|
||||||
mapItem.unlockItem();
|
mapItem.unlockItem();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package client.command.commands.gm4;
|
|||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
import client.MapleClient;
|
import client.MapleClient;
|
||||||
import client.command.Command;
|
import client.command.Command;
|
||||||
import tools.MaplePacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
public class MesoRateCommand extends Command {
|
public class MesoRateCommand extends Command {
|
||||||
{
|
{
|
||||||
@@ -43,6 +43,6 @@ public class MesoRateCommand extends Command {
|
|||||||
|
|
||||||
int mesorate = Math.max(Integer.parseInt(params[0]), 1);
|
int mesorate = Math.max(Integer.parseInt(params[0]), 1);
|
||||||
c.getWorldServer().setMesoRate(mesorate);
|
c.getWorldServer().setMesoRate(mesorate);
|
||||||
c.getWorldServer().broadcastPacket(MaplePacketCreator.serverNotice(6, "[Rate] Meso Rate has been changed to " + mesorate + "x."));
|
c.getWorldServer().broadcastPacket(PacketCreator.serverNotice(6, "[Rate] Meso Rate has been changed to " + mesorate + "x."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user