how would i get the class of the player that got the finishing blow on a mob and then repop him if its not = to random class
example
Code:
my $Random;
sub EVENT_SPAWN
{
quest::setnexthpevent(20);
$Random = quest::ChooseRandom(Warrior,Cleric,Paladin,Ranger,Shadowknight,Druid,Monk,Bard,Rogue,Shaman,Necromancer,Wizard,Magician,Enchanter,Beastlord,Berserker);
}
sub EVENT_HP
{
if($hpevent == 20)
{
quest::shout("Only The powers of a $Random can defeat me!");
quest::setnexthpevent(0);
}
if($hpevent == 0)
{
if($client->$class eq $Random)
{
quest::spawn2(1325,0,0,-144.6,-401.2,-2.7,63.1);
quest::shout("You Cannot Defeat me!");
quest::depop();
}
else
{
quest::shout("You are the right class!");
}
}
}