Code:
local class = pUnit:GetPlayerClass()
function Pet_Choice(pUnit,event)
class
if(class == 1 or 4 or 6) then
PetChoice=math.random(1, 2)
if PetChoice==1 then
pUnit:SpawnCreature(Succubus,-13209.465820,272.450928,21.857121,4.245078,14,360000)
end
elseif PetChoice==2 then
pUnit:SpawnCreature(FelGuard,-13209.465820,272.450928,21.857121,4.245078,14,360000)
end
else
if(class == 2) then
PetChoice2=math.random(1, 2)
if PetChoice2==1 then
pUnit:SpawnCreature(Succubus,-13209.465820,272.450928,21.857121,4.245078,14,360000)
end
elseif PetChoice2==2 then
pUnit:SpawnCreature(FelHunter,-13209.465820,272.450928,21.857121,4.245078,14,360000)
end
else
if(class == 3) then
PetChoice3=math.random(1, 2)
if PetChoice3==1 then
pUnit:SpawnCreature(Succubus,-13209.465820,272.450928,21.857121,4.245078,14,360000)
end
elseif PetChoice3==2 then
pUnit:SpawnCreature(VoidWalker,-13209.465820,272.450928,21.857121,4.245078,14,360000)
end
else
if(class == 5 or 8 or 9) then
pUnit:SpawnCreature(FelHunter,-13209.465820,272.450928,21.857121,4.245078,14,360000)
else
if(class == 6 or 7 or 11) then
pUnit:SpawnCreature(Imp,-13209.465820,272.450928,21.857121,4.245078,14,360000)
end
end