{
target = activeChar;
}
Pattern pattern = Pattern.compile("[0-9]*");
Matcher regexp = pattern.matcher(monsterId);
NpcTemplate template;
if (regexp.matches())
{
int monsterTemplate = Integer.parseInt(monsterId);
template = NpcHolder.getInstance().getTemplate(monsterTemplate);
}
else
{
monsterId = monsterId.replace('_', ' ');
template = NpcHolder.getInstance().getTemplateByName(monsterId);
}
if (template == null)
{
activeChar.sendMessage("Incorrect monster template.");
return;
}
try
{
SimpleSpawner spawn = new SimpleSpawner(template);
spawn.setLoc(target.getLoc());
spawn.setAmount(mobCount);
spawn.setHeading(activeChar.getHeading());
spawn.setRespawnDelay(respawnTime);
spawn.setReflection(activeChar.getReflection());
if (RaidBossSpawnManager.getInstance().isDefined(template.getNpcId()))
{
activeChar.sendMessage("Raid Boss " + template.name + " already spawned.");
}
else
{