For the 1.2 beta 2 version of the superconducting shield this should work.
Code: Select all
<Invoke key="L" installedonly="true">
(switch
; Does the ship have superconducting coils? If not
; then we can't do anything.
(not (objHasItem gSource (itmCreate &itSuperconductingCoil; 1) ) )
(objSendMessage gSource nil "No Superconducting Coils")
; Are the shields fully charged? If they are, then this
; won't do anything.
(eq (shpGetShieldDamage gSource) 0)
(objSendMessage gSource Nil "Superconducting shields already fully charged")
; Charge the shields
(block Nil
(shpRechargeShield gSource (random 40 60))
(objRemoveItem gSource (itmCreate &itSuperconductingCoil; 1) 1)
(objSendMessage gSource Nil "Superconducting shields recharged")
)
)
)
</Invoke>