More PQ-esque script modules + HP Bar on some bosses

Completed (hopefully, now!) implementation of automated modules for PQ
scripting. Added HP bar for some bosses that wouldn't display it before
(like King Slime, Alishar and CRog).
This commit is contained in:
ronancpl
2017-05-09 20:02:10 -03:00
parent da00345aec
commit 73557f0d61
59 changed files with 943 additions and 608 deletions

View File

@@ -63,6 +63,7 @@ import client.inventory.ModifyInventory;
import client.inventory.PetDataFactory;
import constants.ItemConstants;
import constants.ServerConstants;
import server.life.MapleNPC;
public class AbstractPlayerInteraction {
@@ -694,6 +695,19 @@ public class AbstractPlayerInteraction {
c.getPlayer().getInventory(MapleInventoryType.EQUIPPED).addFromDB(newItem);
c.announce(MaplePacketCreator.modifyInventory(false, Collections.singletonList(new ModifyInventory(0, newItem))));
}
public void spawnNpc(int npcId, Point pos, MapleMap map) {
MapleNPC npc = MapleLifeFactory.getNPC(npcId);
if (npc != null) {
npc.setPosition(pos);
npc.setCy(pos.y);
npc.setRx0(pos.x + 50);
npc.setRx1(pos.x - 50);
npc.setFh(map.getFootholds().findBelow(pos).getId());
map.addMapObject(npc);
map.broadcastMessage(MaplePacketCreator.spawnNPC(npc));
}
}
public void spawnMonster(int id, int x, int y) {
MapleMonster monster = MapleLifeFactory.getMonster(id);