function main()
{
variable index:attack Attacks
variable index:attacker Attackers
variable index:jammer Jammers
variable index:string Jams
variable int Counter
variable int Counter2
variable iterator _jam_
variable iterator _attack_
variable iterator _attacker_
variable iterator _jammer_
echo "--------------------------------------------------------------------"
echo "Testing Jammers...."
Me:GetJammers[Jammers]
echo "Jammers index initialized ... ${Jammers.Used} Jammer(s) found."
Jammers:GetIterator[_jammer_]
Counter:Set[1]
if ${_jammer_:First(exists)}
{
do
{
echo "Jammer ${Counter}: ${_jammer_.Value.ID}: ${_jammer_.Value.Name} (${_jammer_.Value.Type})"
_jammer_.Value:GetJams[Jams]
Jams:GetIterator[_jam_]
echo "- ${Jams.Used} jams on you."
if ${_jam_:First(exists)}
{
Counter2:Set[1]
do
{
echo "-- #${Counter2}: '${_jam_.Value}'"
Counter2:Inc
}
while ${_jam_:Next(exists)}
}
Counter:Inc
}
while ${_jammer_:Next(exists)}
}
echo "----"
echo "Testing Attackers...."
Me:GetAttackers[Attackers]
echo "Attackers index initialized ... ${Attackers.Used} Attackers found."
Attackers:GetIterator[_attacker_]
Counter:Set[1]
if ${_attacker_:First(exists)}
{
do
{
echo "Attacker ${Counter}: ${_attacker_.Value.ID}: ${_attacker_.Value.Name} (${_attacker_.Value.Type})"
echo " -- IsCurrentlyAttacking: ${_attacker_.Value.IsCurrentlyAttacking}"
_attacker_.Value:GetAttacks[Attacks]
echo " -- Attacks: ${Attacks.Used}"
Attacks:GetIterator[_attack_]
Counter2:Set[1]
if ${_attack_:First(exists)}
{
do
{
echo " --- Attack ${Counter2}: '${_attack_.Value.Name}'"
echo " ----- TimeStarted: ${_attack_.Value.TimeStarted}"
Counter2:Inc
}
while ${_attack_:Next(exists)}
}
Counter:Inc
}
while ${_attacker_:Next(exists)}
}
echo "--------------------------------------------------------------------"
}
Home » Script Examples (Snippets)
Also available in: PDF
Accessing Jammers/Jams (electronic warfare) and Attackers
Article version: 1 -
Added by Amadeus over 6 years ago
| Viewed 681 times