I found another "bug" in your Pet Swapper ability.
In this line:
Code:
if ( level <= PetSwapValue or JournalHealth(1) <= SwapInHealthValue )
it should be
Code:
if ( level < PetSwapValue or JournalHealth(1) <= SwapInHealthValue )
or else it goes into an infinite loop trying to summon my 25s, then start the search again due to the level being the same as the PetSwapValue.
EDIT: I'm bored and not tired so I figured out a check for how many of the pet you're currently fighting you have so you can set something to pick how many of each pet you catch.
Code:
and C_PetJournal.GetNumCollectedInfo(C_PetBattles.GetPetSpeciesID(2,NmeactivePetSlot)) < 1
Adding that into the capture pet check makes it so you will only catch a pet you don't already have.