If anyone want to use pokerotation to pvp (small chance to win ) here is small script:
Code:
if C_PetBattles.GetPVPMatchmakingInfo() == nil and C_PetBattles.IsPlayerNPC(2) == nil then
C_PetBattles.StartPVPMatchmaking()
end
if C_PetBattles.GetPVPMatchmakingInfo() == "proposal" and C_PetBattles.IsPlayerNPC(2) == nil then
C_PetBattles.AcceptQueuedPVPMatch()
end
if C_PetBattles.GetPVPMatchmakingInfo() == nil and C_PetBattles.IsPlayerNPC(2) == false then
C_PetBattles.ChangePet(3)
end
In C_PetBattles.ChangePet(3) change 3 on pokemon that you want to use first.