Code: Select all
<OnUpdate>
(block nil
(if (itmIsInstalled gItem)
(block nil
(dbgOutPut (unvGetTick) (itmGetData gItem "downTime"))
(switch
(eq (shpGetShieldDamage gSource) 100)
(switch
(not (itmGetData gItem "downTime"))
(block nil
(itmSetData gItem "downTime" (add (unvGetTick) 60))
(dbgOutPut "going down up at" (itmGetData gItem "downTime"))
)
(ls (itmGetData gItem "downTime") (unvGetTick))
(block nil
(shpRechargeShield gSource 1)
(itmSetData gItem "downTime" nil)
)
)
(gr (shpGetShieldDamage gSource) 90)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 80)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 70)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 60)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 50)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 40)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 30)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 20)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 10)
(shpRechargeShield gSource 1)
(gr (shpGetShieldDamage gSource) 0)
(shpRechargeShield gSource 1)
)
)
)
)
</OnUpdate>