ok i got this working but not all the way.
Code:
my $Random;
my $x;
my $y;
my $z;
my $h;
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
$Random = quest::ChooseRandom(Warrior,Cleric,Paladin,Ranger,Shadowknight,Druid,Monk,Bard,Rogue,Shaman,Necromancer,Wizard,Magician,Enchanter,Beastlord,Berserker);
quest::setnexthpevent(90);
}
sub EVENT_HP
{
if($hpevent == 90)
{
quest::shout("Only The powers of a $Random can defeat me!");
}
}
sub EVENT_DEATH
{
if($class eq $Random)
{
quest::shout("You Have Defeated me!");
}
else
{
quest::spawn2(1333,0,0, $x,$y,$z,$h);
quest::shout("You Cannot Defeat me!");
$mob->SetTarget($mobid);
$npc->kill();
}
}
when they die they give exp and then shouting You Cannot Defeat me but then leaves a corpse thats lootable and does not respawn..
what i want to do is not give exp if i can but i don't really care about the exp what i care about is if your not the right class that kills them then don't leave a corpse and repop.