if(command.equalsIgnoreCase("zalp"))
{
if (!checkShot) {
Functions.npcSay(this, NpcString.CANNON_READY_TO_FIRE);
player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Cannon:<br><br>Preparations are underway to re-activate the cannon. This process can take up to 5 minutes."));
return;
} else if (!player.getInventory().destroyItemByItemId(17611, 1)) {
player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Cannon:<br><br>\"Huge Charges\" not available."));
return;
}
broadcastPacketToOthers(new MagicSkillUse(this, this, 14175, 1, 3000, 0));
broadcastPacket(new Earthquake(player.getLoc(), 10, 7));
ThreadPoolManager.getInstance().schedule(new Shot(), 300 * 1000L);
checkShot = false;
ThreadPoolManager.getInstance().schedule(new RunnableImpl() {
@Override
public void runImpl() throws Exception {
decayMe();
spawnMe();
}
}, 3100);
setTitle("Cannon is loading");
Location loc = point_bombs[getNpcId()-32939];
for (NpcInstance monster : World.getAroundNpcCor(loc, getCurrentRegion(), getReflectionId(), 650, 500))
{
if (monster == null || !monster.isNpc() || monster.getNpcId() != 22966 && monster.getNpcId() != 22965 && monster.getNpcId() != 22967)
continue;
if (monster.getNpcId() == 22966)
Functions.spawn(monster.getLoc(), 22980);
else if (monster.getNpcId() == 22965)
Functions.spawn(monster.getLoc(), 22979);
else if (monster.getNpcId() == 22967)
Functions.spawn(monster.getLoc(), 22981);
monster.decayMe();
monster.doDie(this);
}
} else if (command.equalsIgnoreCase("spezion_bomb"))
{
if (!checkShot) {
Functions.npcSay(this, NpcString.CANNON_READY_TO_FIRE);
player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Cannon:<br><br>Preparations are underway to re-activate the cannon. This process can take up to 5 minutes."));
return;
} else if (!player.getInventory().destroyItemByItemId(17611, 1)) {
player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Cannon:<br><br>\"Huge Charges\" not available."));
return;
}
checkShot = false;
broadcastPacketToOthers(new MagicSkillUse(this, this, 14175, 1, 3000, 0));