XRWS           	ô   >  	¶ext_01.cat ext_01.dat md/csisr.xml 2486 1513660940 9de580de4e6d0462e2ad8f93b917fb30
<?xml version="1.0" encoding="utf-8"?>
<mdscript name="csisr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
<cues>
<cue name="csisr_cue" instantiate="true" checkinterval="20s" namespace="this">
	<actions>
		<create_list name="$capships"/>
		<find_ship name="$capships" class="[class.ship_l, class.ship_xl]" owner="faction.player" multiple="true"/>
		<do_all exact="$capships.count" counter="$csi">
			<set_value name="$capship" exact="$capships.{$csi}"/>
		        <set_value name="$subordinates" exact="$capship.subordinates"/>
		        <do_all exact="$subordinates.count" counter="$si">
				<set_value name="$ship" exact="$subordinates.{$si}"/>
				<do_if value="$ship.class == class.ship_s or $ship.class == class.ship_m">
					<do_if value="$capship.zone == $ship.zone and $capship.distanceto.{$ship} lt 1km">
						<do_if value="$ship.hullpercentage lt 100 and $ship.shieldpercentage gt 90">
							<do_if value="player.entity.inventory.{ware.inv_shipwreckage}.count gt 0">
								<remove_inventory entity="player.entity" ware="ware.inv_shipwreckage" exact="1"/>
								<set_value name="$hull" exact="$ship.hullpercentage + 5"/>
								<do_if value="$hull gt 100">
									<set_value name="$hull" exact="100"/>
								</do_if>
								<set_object_hull object="$ship" exact="$hull"/>
							</do_if>
						</do_if>
					</do_if>

				        <set_value name="$wingmates" exact="$ship.subordinates"/>
				        <do_all exact="$wingmates.count" counter="$wi">
						<set_value name="$wingmate" exact="$wingmates.{$wi}"/>
						<do_if value="$wingmate.class == class.ship_s or $wingmate.class == class.ship_m">
							<do_if value="$capship.zone == $wingmate.zone and $capship.distanceto.{$wingmate} lt 2km">
								<do_if value="$wingmate.hullpercentage lt 100 and $wingmate.shieldpercentage gt 90">
									<do_if value="player.entity.inventory.{ware.inv_shipwreckage}.count gt 0">
										<remove_inventory entity="player.entity" ware="ware.inv_shipwreckage" exact="1"/>
										<set_value name="$hull" exact="$wingmate.hullpercentage + 5"/>
										<do_if value="$hull gt 100">
											<set_value name="$hull" exact="100"/>
										</do_if>
										<set_object_hull object="$wingmate" exact="$hull"/>
									</do_if>
								</do_if>
							</do_if>
						</do_if>
					</do_all>
				</do_if>
			</do_all>
		</do_all>
	</actions>
</cue>
</cues>
</mdscript>
<?xml version="1.0" encoding="iso-8859-1"?>
<content name="" description="" author="Assailer" version="103" save="false" date="2017-12-19" id="" lastupdate="">
  <text language="44" name="CSI: Squad Repair" description="Capital Ship Improvements: Squad Repair" author="Assailer" version="1.03"/>
</content>
