XRWS           	   >  áext_01.cat ext_01.dat md/csics.xml 2273 1461346022 05fdb0110f103d6317382b91211a24c8
<?xml version="1.0" encoding="utf-8"?>
<mdscript name="csics" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
<cues>
<cue name="csics_cue" instantiate="true" checkinterval="31s" namespace="this">
	<actions>
		<set_value name="$found" exact="false"/>
		<create_list name="$ships"/>
		<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}"/>
			<find_ship name="$ships" class="[class.ship_s, class.ship_m]" owner="faction.ownerless" multiple="true" space="$capship.zone"/>
			<do_all exact="$ships.count" counter="$si">
				<set_value name="$ship" exact="$ships.{$si}"/>

				<create_pilot name="$pilot" ship="$ship">
					<owner exact="faction.player"/>
				</create_pilot>

				<set_skill entity="$pilot" type="navigation" exact="5"/>
				<set_skill entity="$pilot" type="combat" exact="5"/>
				<set_skill entity="$pilot" type="morale" exact="5"/>
				<set_skills_visible entity="$pilot" visible="true"/>

				<set_owner object="$ship" faction="faction.player"/>

				<add_to_player_squad object="$ship"/>

				<show_help custom="$capship.name + ' has claimed a new ship to your squad.'"/>

				<set_value name="stat.ships_claimed" operation="add"/>

				<set_value name="$hull" exact="$ship.hullpercentage"/>
				<do_while value="$hull lt 100 and 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="$hull + 5"/>
					<do_if value="$hull gt 100">
						<set_value name="$hull" exact="100"/>
					</do_if>
				</do_while>
				<set_object_hull object="$ship" exact="$hull"/>

				<set_object_commander object="$ship" commander="$capship"/>
				<start_script object="$ship.pilot" name="'move.escort'">
					<param name="target" value="$capship"/>
				</start_script>

				<set_value name="$found" exact="true"/>
				<break/>
			</do_all>

			<do_if value="$found">
				<break/>
			</do_if>
		</do_all>
	</actions>
</cue>
</cues>
</mdscript>
<?xml version="1.0" encoding="iso-8859-1"?>
<content name="" description="" author="Assailer" version="102" save="false" date="2016-04-22" id="" lastupdate="">
  <text language="44" name="CSI: Claim Ships" description="Capital Ship Improvements: Claim Ships" author="Assailer" version="1.02"/>
</content>
