Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2011  |  syntax: None  |  size: 2.25 KB  |  hits: 40  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #****************************************************************************
  2. #**
  3. #**  File     :  /cdimage/units/UAB0301/UAB0301_script.lua
  4. #**  Author(s):  David Tomandl
  5. #**
  6. #**  Summary  :  Aeon Land Factory Tier 3 Script
  7. #**
  8. #**  Copyright © 2005 Gas Powered Games, Inc.  All rights reserved.
  9. #****************************************************************************
  10.  
  11. local CWalkingLandUnit = import('/lua/cybranunits.lua').CWalkingLandUnit
  12.  
  13. local URL0001OLD = URL0001
  14.  
  15. URL0001 = Class(URL0001OLD) {
  16.  
  17.     OnScriptBitSet = function(self, bit)
  18.         if bit == 0 then # shield toggle
  19.             self:EnableShield()
  20.         elseif bit == 8 then # cloak toggle
  21.             self:StopUnitAmbientSound( 'ActiveLoop' )
  22.             self:SetMaintenanceConsumptionInactive()
  23.             self:DisableUnitIntel('Cloak')
  24.             self:DisableUnitIntel('RadarStealth')
  25.             self:DisableUnitIntel('RadarStealthField')
  26.             self:DisableUnitIntel('SonarStealth')
  27.             self:DisableUnitIntel('SonarStealthField')          
  28.         end
  29.     end,
  30.  
  31.     OnScriptBitClear = function(self, bit)
  32.         if bit == 0 then # shield toggle
  33.             self:DisableShield()
  34.         elseif bit == 8 then # cloak toggle
  35.             self:PlayUnitAmbientSound( 'ActiveLoop' )
  36.             self:SetMaintenanceConsumptionActive()
  37.             self:EnableUnitIntel('Cloak')
  38.             self:EnableUnitIntel('RadarStealth')
  39.             self:EnableUnitIntel('RadarStealthField')
  40.             self:EnableUnitIntel('SonarStealth')
  41.             self:EnableUnitIntel('SonarStealthField')
  42.         end
  43.     end,
  44.  
  45.         CreateEnhancement = function(self, enh)
  46.         CWalkingLandUnit.CreateEnhancement(self, enh)
  47.         local bp = self:GetBlueprint().Enhancements[enh]
  48.         if enh == 'Shield' then
  49.             self:AddToggleCap('RULEUTC_ShieldToggle')
  50.             self:SetEnergyMaintenanceConsumptionOverride(bp.MaintenanceConsumptionPerSecondEnergy or 0)
  51.             self:SetMaintenanceConsumptionActive()
  52.             self:CreatePersonalShield(bp)
  53.         elseif enh == 'ShieldRemove' then
  54.             self:DestroyShield()
  55.             self:SetMaintenanceConsumptionInactive()
  56.             self:RemoveToggleCap('RULEUTC_ShieldToggle')
  57.                 end
  58.         end,
  59.  
  60. }
  61.  
  62. TypeClass = URL0001