Could you post your script? I think it might be helpful
As for battles, there seem to be many different conditions that are active during battles, no idea if the campaign script is paused then or not:
BattleAllianceIsAttacker
BattleAllianceIsPlayers
BattleAllianceNumberOfShips
BattleAllianceNumberOfUnits
BattleEnemyAlliancePercentageCanHide
BattleEnemyAlliancePercentageOfClassAndCategory
BattleEnemyAlliancePercentageOfMountType
BattleEnemyAlliancePercentageOfSpecialAbility
BattleEnemyAlliancePercentageOfUnitCategory
BattleEnemyAlliancePercentageOfUnitClass
BattleEnemyDirectionOfMeleeAttack
BattleEnemyHasMissileSuperiority
BattleEnemyShipActionStatus
BattleEnemyShipOnFire
BattleEnemyUnitActionStatus
BattleEnemyUnitCategory
BattleEnemyUnitClass
BattleEnemyUnitCurrentFormation
BattleEnemyUnitOnLeftFlank
BattleEnemyUnitOnRightFlank
BattleEnemyUnitSpecialAbilitySupported
BattleEnemyUnitTechnologySupported
BattleHasCoverBuildings
BattleHasCoverWalls
BattleIsLandConflict
BattleIsNavalConflict
BattleIsSiegeConflict
BattlePlayerAllianceDefendingHill
BattlePlayerAlliancePercentageCanHide
BattlePlayerAlliancePercentageOfAmmoType
BattlePlayerAlliancePercentageOfClassAndCategory
BattlePlayerAlliancePercentageOfMountType
BattlePlayerAlliancePercentageOfSpecialAbility
BattlePlayerAlliancePercentageOfTechnology
BattlePlayerAlliancePercentageOfUnitCategory
BattlePlayerAlliancePercentageOfUnitClass
BattlePlayerAllianceToEnemyAllianceRatio
BattlePlayerDefendingFort
BattlePlayerDirectionOfMeleeAttack
BattlePlayerDirectionOfMissileAttack
BattlePlayerSailsPercentageDamaged
BattlePlayerShipActionStatus
BattlePlayerShipClass
BattlePlayerUnitActionStatus
BattlePlayerUnitAmmoType
BattlePlayerUnitCategory
BattlePlayerUnitClass
BattlePlayerUnitCurrentFormation
BattlePlayerUnitDefendingHill
BattlePlayerUnitEngaged
BattlePlayerUnitEngagedInMelee
BattlePlayerUnitMountType
BattlePlayerUnitMovingFast
BattlePlayerUnitSpecialAbilityActive
BattlePlayerUnitSpecialAbilitySupported
BattlePlayerUnitTechnologySupported
BattleResult
BattlesFought
BattleShipIsPlayers
BattleShipSailsPercentageDamage
BattleType
BattleUnitIsAllied
BattleUnitIsPlayers