- Joined
- Sep 18, 2008
- Messages
- 8
- Reaction score
- 0
I tried to find this command, but seems there is nothing in the forum.
therefore, i created this simple command from the !killall command.
What this command do is set all the monsters in the map to be a certain HP.
I think this is better than just Killing the monster, as we wont get any drops
}else if (splitted[0].equals("!hitall")){
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[1]);
range = irange * irange;
}
List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition(), range, Arrays
.asList(MapleMapObjectType.MONSTER));
for(MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
monster.setHp(10000);
}
therefore, i created this simple command from the !killall command.
What this command do is set all the monsters in the map to be a certain HP.
I think this is better than just Killing the monster, as we wont get any drops
}else if (splitted[0].equals("!hitall")){
MapleMap map = c.getPlayer().getMap();
double range = Double.POSITIVE_INFINITY;
if (splitted.length > 1) {
int irange = Integer.parseInt(splitted[1]);
range = irange * irange;
}
List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition(), range, Arrays
.asList(MapleMapObjectType.MONSTER));
for(MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
monster.setHp(10000);
}

