PHP Code:
if not PetFunctions then
PetFunctions = true
TypeWeaknessTable = {
{ Num = 1, Type = "Humanoid", Weak = 8, Strong = 2, Resist = 5, Color = "00AAFF" },
{ Num = 2, Type = "Dragonkin", Weak = 4, Strong = 6, Resist = 3, Color = "33FF33" },
{ Num = 3, Type = "Flying", Weak = 2, Strong = 9, Resist = 8, Color = "FFFF66" },
{ Num = 4, Type = "Undead", Weak = 9, Strong = 1, Resist = 2, Color = "663366" },
{ Num = 5, Type = "Critter", Weak = 1, Strong = 4, Resist = 7, Color = "AA7744" },
{ Num = 6, Type = "Magic", Weak = 10, Strong = 3, Resist = 9, Color = "CC44DD" },
{ Num = 7, Type = "Elemental", Weak = 5, Strong = 10,Resist = 10,Color = "FF9933" },
{ Num = 8, Type = "Beast", Weak = 3, Strong = 5, Resist = 1, Color = "DD2200" },
{ Num = 9, Type = "Aquatic", Weak = 6, Strong = 7, Resist = 4, Color = "33CCFF" },
{ Num = 10, Type = "Mechanical",Weak = 7, Strong = 8, Resist = 6, Color = "999999" },
}
end
Poke_Ability = 356 -- Trash
if TypeWeaknessTable[select(7,C_PetBattles.GetAbilityInfoByID(Poke_Ability))].Strong == C_PetBattles.GetPetType(2, C_PetBattles.GetActivePet(2)) then IsStrongAbility = true else IsStrongAbility = false end
if TypeWeaknessTable[select(7,C_PetBattles.GetAbilityInfoByID(Poke_Ability))].Weak == C_PetBattles.GetPetType(2, C_PetBattles.GetActivePet(2)) then IsWeakAbility = true else IsWeakAbility = false end
Thanks anyway