TypeLocation oldunitlocation; //VOID AddGold(player, amount) //INT HasAdvance(player, advance_name) //Generic Replace Unit function / message box trigger 'trigStartUp' when (IsHumanPlayer(g.player) && (g.year == 0)) { // Message(g.player, 'msgStartUp'); DisableMessageClass(987); DisableMessageClass(789); SetActionKey(1,"["); SetActionKey(2,"]"); } trigger 'ShowUpgradeMessages' when (key.1.pressed) { EnableMessageClass(987); EnableMessageClass(789); } trigger 'HideUpgradeMessages' when (key.2.pressed) { DisableMessageClass(987); DisableMessageClass(789); } //messagebox 'msgStartUp' //{ // Abort(); // oldunitcount=0; //} messagebox 'msgReplaceUnits' { Title(ID_TITLE_upgrade_query); MessageType("TP_QUEUE_EMPTY_AFTER_UNIT"); MessageClass(789); i = 0; onecost = 0; oldunitcount = 0; while (i < player.totalunits) { SetUnitByIndex(1, g.player, i); if (unit.type == oldunittype) { oldunitcount = oldunitcount + 1; } i = i + 1; } if(oldunitcount>0) { if(IsHumanPlayer(g.player)) { onecost = (newunitcost) - (oldunitcost); if (onecost <= player.gold) { KillClass(g.player,987); MessageClass(987); privoldunittype=oldunittype; privnewunittype=newunittype; privoldunitcost=oldunitcost; privnewunitcost=newunitcost; privtotalcost = (privnewunitcost*oldunitcount) - (privoldunitcost*oldunitcount); privonecost = privnewunitcost - privoldunitcost; if (privtotalcost <= player.gold && oldunitcount>1) { Button(ID_BUTTON_Do_upgrade) { AddGold(player, -privtotalcost); i = 0; while (i < player.totalunits) { SetUnitByIndex(1, player, i); if (unit.type == privoldunittype) { oldunitlocation = unit.location; SetOrder(1, 56); AddOrder(unit, oldunitlocation); CreateUnit(player, privnewunittype, oldunitlocation, 0); } else { i = i + 1; } } KillClass(g.player, 987); } } Button(ID_BUTTON_Do_one_upgrade) { AddGold(player, -privonecost); i = 0; while (i < player.totalunits) { SetUnitByIndex(1, g.player, i); if (unit.type == privoldunittype) { oldunitlocation = unit.location; SetOrder(1, 56); AddOrder(unit, oldunitlocation); CreateUnit(player, privnewunittype, oldunitlocation, 0); KillClass(player, 987); message(g.player,'msgReplaceUnits'); } else { i = i + 1; } } } Button(ID_BUTTON_LibraryNew) { LibraryUnit(privnewunittype); } Button(ID_BUTTON_LibraryOld) { LibraryUnit(privoldunittype); } if (oldunitcount>1) { Text(ID_TEXT_upgrade_query); } else { Text(ID_TEXT_upgrade_one_query); } } else { Abort(); } } else { // AI Player KillClass(g.player,978); MessageClass(978); privoldunittype=oldunittype; privnewunittype=newunittype; i = 0; while (i < player.totalunits) { SetUnitByIndex(1, player, i); if (unit.type == privoldunittype) { oldunitlocation = unit.location; KillUnit(unit.1); CreateUnit(player, privnewunittype, oldunitlocation, 0); } else { i = i + 1; } } KillClass(g.player, 978); } } else { Abort(); } } //Unit Replacement Triggers trigger 'IronWorking_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_IRON_WORKING) ) { oldunittype = UnitType("UNIT_HOPLITE"); newunittype = UnitType("UNIT_LEGION"); oldunitcost = 135; newunitcost = 335; SetString(0,ID_UNIT_HOPLITE); SetString(1,ID_UNIT_LEGION); message(g.player,'msgReplaceUnits'); } trigger 'AgriculturalRevolution_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_AGRICULTURAL_REVOLUTION) ) { oldunittype = UnitType("UNIT_HOPLITE"); newunittype = UnitType("UNIT_PIKEMEN"); oldunitcost = 135; newunitcost = 405; SetString(0,ID_UNIT_HOPLITE); SetString(1,ID_UNIT_PIKEMEN); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_LEGION"); newunittype = UnitType("UNIT_PIKEMEN"); oldunitcost = 200; newunitcost = 470; SetString(0,ID_UNIT_LEGION); SetString(1,ID_UNIT_PIKEMEN); message(g.player,'msgReplaceUnits'); } trigger 'Gunpowder_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_GUNPOWDER) ) { oldunittype = UnitType("UNIT_HOPLITE"); newunittype = UnitType("UNIT_MUSKETEERS"); oldunitcost = 135; newunitcost = 695; SetString(0,ID_UNIT_HOPLITE); SetString(1,ID_UNIT_MUSKETEERS); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_LEGION"); newunittype = UnitType("UNIT_MUSKETEERS"); oldunitcost = 200; newunitcost = 760; SetString(0,ID_UNIT_LEGION); SetString(1,ID_UNIT_MUSKETEERS); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_PIKEMEN"); newunittype = UnitType("UNIT_MUSKETEERS"); oldunitcost = 270; newunitcost = 830; SetString(0,ID_UNIT_PIKEMEN); SetString(1,ID_UNIT_MUSKETEERS); message(g.player,'msgReplaceUnits'); } trigger 'Explosives_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_EXPLOSIVES) ) { oldunittype = UnitType("UNIT_HOPLITE"); newunittype = UnitType("UNIT_MACHINE_GUNNER"); oldunitcost = 135; newunitcost = 935; SetString(0,ID_UNIT_HOPLITE); SetString(1,ID_UNIT_MACHINE_GUNNER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_LEGION"); newunittype = UnitType("UNIT_MACHINE_GUNNER"); oldunitcost = 200; newunitcost = 1000; SetString(0,ID_UNIT_LEGION); SetString(1,ID_UNIT_MACHINE_GUNNER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_PIKEMEN"); newunittype = UnitType("UNIT_MACHINE_GUNNER"); oldunitcost = 270; newunitcost = 1070; SetString(0,ID_UNIT_PIKEMEN); SetString(1,ID_UNIT_MACHINE_GUNNER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_MUSKETEERS"); newunittype = UnitType("UNIT_MACHINE_GUNNER"); oldunitcost = 560; newunitcost = 1360; SetString(0,ID_UNIT_MUSKETEERS); SetString(1,ID_UNIT_MACHINE_GUNNER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_CANNON"); newunittype = UnitType("UNIT_ARTILLERY"); oldunitcost = 540; newunitcost = 1740; SetString(0,ID_UNIT_CANNON); SetString(1,ID_UNIT_ARTILLERY); message(g.player,'msgReplaceUnits'); } trigger 'MassProduction_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_MASS_PRODUCTION) ) { oldunittype = UnitType("UNIT_HOPLITE"); newunittype = UnitType("UNIT_MARINES"); oldunitcost = 135; newunitcost = 1135; SetString(0,ID_UNIT_HOPLITE); SetString(1,ID_UNIT_MARINES); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_LEGION"); newunittype = UnitType("UNIT_MARINES"); oldunitcost = 200; newunitcost = 1200; SetString(0,ID_UNIT_LEGION); SetString(1,ID_UNIT_MARINES); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_PIKEMEN"); newunittype = UnitType("UNIT_MARINES"); oldunitcost = 270; newunitcost = 1270; SetString(0,ID_UNIT_PIKEMEN); SetString(1,ID_UNIT_MARINES); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_MUSKETEERS"); newunittype = UnitType("UNIT_MARINES"); oldunitcost = 560; newunitcost = 1560; SetString(0,ID_UNIT_MUSKETEERS); SetString(1,ID_UNIT_MARINES); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_MACHINE_GUNNER"); newunittype = UnitType("UNIT_MARINES"); oldunitcost = 800; newunitcost = 1800; SetString(0,ID_UNIT_MACHINE_GUNNER); SetString(1,ID_UNIT_MARINES); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_TRIREMES"); newunittype = UnitType("UNIT_TROOP_SHIP"); oldunitcost = 540; newunitcost = 1740; SetString(0,ID_UNIT_TRIREMES); SetString(1,ID_UNIT_TROOP_SHIP); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_LONGSHIP"); newunittype = UnitType("UNIT_TROOP_SHIP"); oldunitcost = 720; newunitcost = 1920; SetString(0,ID_UNIT_LONGSHIP); SetString(1,ID_UNIT_TROOP_SHIP); message(g.player,'msgReplaceUnits'); } trigger 'Technocracy_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_TECHNOCRACY) ) { oldunittype = UnitType("UNIT_HOPLITE"); newunittype = UnitType("UNIT_PLASMATICA"); oldunitcost = 135; newunitcost = 4635; SetString(0,ID_UNIT_HOPLITE); SetString(1,ID_UNIT_PLASMATICA); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_LEGION"); newunittype = UnitType("UNIT_PLASMATICA"); oldunitcost = 200; newunitcost = 4700; SetString(0,ID_UNIT_LEGION); SetString(1,ID_UNIT_PLASMATICA); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_PIKEMEN"); newunittype = UnitType("UNIT_PLASMATICA"); oldunitcost = 270; newunitcost = 4770; SetString(0,ID_UNIT_PIKEMEN); SetString(1,ID_UNIT_PLASMATICA); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_MUSKETEERS"); newunittype = UnitType("UNIT_PLASMATICA"); oldunitcost = 560; newunitcost = 5060; SetString(0,ID_UNIT_MUSKETEERS); SetString(1,ID_UNIT_PLASMATICA); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_MACHINE_GUNNER"); newunittype = UnitType("UNIT_PLASMATICA"); oldunitcost = 800; newunitcost = 5300; SetString(0,ID_UNIT_MACHINE_GUNNER); SetString(1,ID_UNIT_PLASMATICA); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_MARINES"); newunittype = UnitType("UNIT_PLASMATICA"); oldunitcost = 1000; newunitcost = 5500; SetString(0,ID_UNIT_MARINES); SetString(1,ID_UNIT_PLASMATICA); message(g.player,'msgReplaceUnits'); } trigger 'Domestication_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_DOMESTICATION) ) { oldunittype = UnitType("UNIT_GREEK_FIRE"); newunittype = UnitType("UNIT_CHARIOT"); oldunitcost = 270; newunitcost = 540; SetString(0,ID_UNIT_GREEK_FIRE); SetString(1,ID_UNIT_CHARIOT); message(g.player,'msgReplaceUnits'); } trigger 'CavalryTactics_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_CAVALRY_TACTICS) ) { oldunittype = UnitType("UNIT_GREEK_FIRE"); newunittype = UnitType("UNIT_CAVALRY"); oldunitcost = 270; newunitcost = 990; SetString(0,ID_UNIT_GREEK_FIRE); SetString(1,ID_UNIT_CAVALRY); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_CHARIOT"); newunittype = UnitType("UNIT_CAVALRY"); oldunitcost = 270; newunitcost = 990; SetString(0,ID_UNIT_CHARIOT); SetString(1,ID_UNIT_CAVALRY); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_KNIGHT"); newunittype = UnitType("UNIT_CAVALRY"); oldunitcost = 540; newunitcost = 1260; SetString(0,ID_UNIT_KNIGHT); SetString(1,ID_UNIT_CAVALRY); message(g.player,'msgReplaceUnits'); } trigger 'TankWarfare_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_TANK_WARFARE) ) { oldunittype = UnitType("UNIT_KNIGHT"); newunittype = UnitType("UNIT_TANK"); oldunitcost = 540; newunitcost = 2540; SetString(0,ID_UNIT_KNIGHT); SetString(1,ID_UNIT_TANK); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_CAVALRY"); newunittype = UnitType("UNIT_TANK"); oldunitcost = 720; newunitcost = 2720; SetString(0,ID_UNIT_CAVALRY); SetString(1,ID_UNIT_TANK); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_GREEK_FIRE"); newunittype = UnitType("UNIT_TANK"); oldunitcost = 270; newunitcost = 2270; SetString(0,ID_UNIT_GREEK_FIRE); SetString(1,ID_UNIT_TANK); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_CHARIOT"); newunittype = UnitType("UNIT_TANK"); oldunitcost = 270; newunitcost = 2270; SetString(0,ID_UNIT_CHARIOT); SetString(1,ID_UNIT_TANK); message(g.player,'msgReplaceUnits'); } trigger 'Fusion_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_FUSION) ) { oldunittype = UnitType("UNIT_GREEK_FIRE"); newunittype = UnitType("UNIT_FUSION_TANK"); oldunitcost = 270; newunitcost = 3520; SetString(0,ID_UNIT_GREEK_FIRE); SetString(1,ID_UNIT_FUSION_TANK); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_CHARIOT"); newunittype = UnitType("UNIT_FUSION_TANK"); oldunitcost = 270; newunitcost = 3520; SetString(0,ID_UNIT_CHARIOT); SetString(1,ID_UNIT_FUSION_TANK); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_KNIGHT"); newunittype = UnitType("UNIT_FUSION_TANK"); oldunitcost = 540; newunitcost = 3790; SetString(0,ID_UNIT_KNIGHT); SetString(1,ID_UNIT_FUSION_TANK); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_CAVALRY"); newunittype = UnitType("UNIT_FUSION_TANK"); oldunitcost = 720; newunitcost = 3970; SetString(0,ID_UNIT_CAVALRY); SetString(1,ID_UNIT_FUSION_TANK); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_TANK"); newunittype = UnitType("UNIT_FUSION_TANK"); oldunitcost = 2000; newunitcost = 5250; SetString(0,ID_UNIT_TANK); SetString(1,ID_UNIT_FUSION_TANK); message(g.player,'msgReplaceUnits'); } trigger 'Rocketry_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_ROCKETRY) ) { oldunittype = UnitType("UNIT_CANNON"); newunittype = UnitType("UNIT_MOBILE_SAM"); oldunitcost = 540; newunitcost = 2540; SetString(0,ID_UNIT_CANNON); SetString(1,ID_UNIT_MOBILE_SAM); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_ARTILLERY"); newunittype = UnitType("UNIT_MOBILE_SAM"); oldunitcost = 1200; newunitcost = 3200; SetString(0,ID_UNIT_ARTILLERY); SetString(1,ID_UNIT_MOBILE_SAM); message(g.player,'msgReplaceUnits'); } trigger 'Robotics_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_ROBOTICS) ) { oldunittype = UnitType("UNIT_CANNON"); newunittype = UnitType("UNIT_BATTLEBOT"); oldunitcost = 540; newunitcost = 3540; SetString(0,ID_UNIT_CANNON); SetString(1,ID_UNIT_BATTLEBOT); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_ARTILLERY"); newunittype = UnitType("UNIT_BATTLEBOT"); oldunitcost = 1200; newunitcost = 4200; SetString(0,ID_UNIT_ARTILLERY); SetString(1,ID_UNIT_BATTLEBOT); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_MOBILE_SAM"); newunittype = UnitType("UNIT_BATTLEBOT"); oldunitcost = 2000; newunitcost = 5000; SetString(0,ID_UNIT_MOBILE_SAM); SetString(1,ID_UNIT_BATTLEBOT); message(g.player,'msgReplaceUnits'); } trigger 'JetPropulsion_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_JET_PROPULSION) ) { oldunittype = UnitType("UNIT_FIGHTER"); newunittype = UnitType("UNIT_INTERCEPTORS"); oldunitcost = 1125; newunitcost = 2625; SetString(0,ID_UNIT_FIGHTER); SetString(1,ID_UNIT_INTERCEPTORS); message(g.player,'msgReplaceUnits'); } trigger 'IntelligentMaterials_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_INTELLIGENT_MATERIALS) ) { oldunittype = UnitType("UNIT_FIGHTER"); newunittype = UnitType("UNIT_STEALTH_FIGHTER"); oldunitcost = 1125; newunitcost = 3375; SetString(0,ID_UNIT_FIGHTER); SetString(1,ID_UNIT_STEALTH_FIGHTER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_INTERCEPTORS"); newunittype = UnitType("UNIT_STEALTH_FIGHTER"); oldunitcost = 1500; newunitcost = 3750; SetString(0,ID_UNIT_INTERCEPTORS); SetString(1,ID_UNIT_STEALTH_FIGHTER); message(g.player,'msgReplaceUnits'); } trigger 'AdvancedComposites_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_ADVANCED_COMPOSITES) ) { oldunittype = UnitType("UNIT_BOMBER"); newunittype = UnitType("UNIT_STEALTH_BOMBER"); oldunitcost = 2250; newunitcost = 5625; SetString(0,ID_UNIT_BOMBER); SetString(1,ID_UNIT_STEALTH_BOMBER); message(g.player,'msgReplaceUnits'); } trigger 'HullMaking_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_HULL_MAKING) ) { oldunittype = UnitType("UNIT_TRIREMES"); newunittype = UnitType("UNIT_LONGSHIP"); oldunitcost = 540; newunitcost = 1260; SetString(0,ID_UNIT_TRIREMES); SetString(1,ID_UNIT_LONGSHIP); message(g.player,'msgReplaceUnits'); } trigger 'MachineTools_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_MACHINE_TOOLS) ) { oldunittype = UnitType("UNIT_GREEK_FIRE_TRIREME"); newunittype = UnitType("UNIT_SHIP_OF_THE_LINE"); oldunitcost = 720; newunitcost = 1575; SetString(0,ID_UNIT_GREEK_FIRE_TRIREME); SetString(1,ID_UNIT_SHIP_OF_THE_LINE); message(g.player,'msgReplaceUnits'); } trigger 'Steel_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_STEEL) ) { oldunittype = UnitType("UNIT_GREEK_FIRE_TRIREME"); newunittype = UnitType("UNIT_BATTLESHIP"); oldunitcost = 720; newunitcost = 2720; SetString(0,ID_UNIT_GREEK_FIRE_TRIREME); SetString(1,ID_UNIT_BATTLESHIP); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_SHIP_OF_THE_LINE"); newunittype = UnitType("UNIT_BATTLESHIP"); oldunitcost = 855; newunitcost = 2855; SetString(0,ID_UNIT_SHIP_OF_THE_LINE); SetString(1,ID_UNIT_BATTLESHIP); message(g.player,'msgReplaceUnits'); } trigger 'UltrapressureMachinery_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_ULTRAPRESSURE_MACHINERY) ) { oldunittype = UnitType("UNIT_GREEK_FIRE_TRIREME"); newunittype = UnitType("UNIT_PLASMA_DESTROYER"); oldunitcost = 720; newunitcost = 5220; SetString(0,ID_UNIT_GREEK_FIRE_TRIREME); SetString(1,ID_UNIT_PLASMA_DESTROYER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_SHIP_OF_THE_LINE"); newunittype = UnitType("UNIT_PLASMA_DESTROYER"); oldunitcost = 855; newunitcost = 5355; SetString(0,ID_UNIT_SHIP_OF_THE_LINE); SetString(1,ID_UNIT_PLASMA_DESTROYER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_BATTLESHIP"); newunittype = UnitType("UNIT_PLASMA_DESTROYER"); oldunitcost = 2000; newunitcost = 6500; SetString(0,ID_UNIT_BATTLESHIP); SetString(1,ID_UNIT_PLASMA_DESTROYER); message(g.player,'msgReplaceUnits'); oldunittype = UnitType("UNIT_DESTROYER"); newunittype = UnitType("UNIT_PLASMA_DESTROYER"); oldunitcost = 1000; newunitcost = 5500; SetString(0,ID_UNIT_DESTROYER); SetString(1,ID_UNIT_PLASMA_DESTROYER); message(g.player,'msgReplaceUnits'); } trigger 'SeaColonies_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_SEA_COLONIES) ) { oldunittype = UnitType("UNIT_SUBMARINE"); newunittype = UnitType("UNIT_STEALTH_SUB"); oldunitcost = 1500; newunitcost = 7500; SetString(0,ID_UNIT_SUBMARINE); SetString(1,ID_UNIT_STEALTH_SUB); message(g.player,'msgReplaceUnits'); } trigger 'AsteroidMining_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_ASTEROID_MINING) ) { oldunittype = UnitType("UNIT_PARATROOPER"); newunittype = UnitType("UNIT_SWARM"); oldunitcost = 2500; newunitcost = 7750; SetString(0,ID_UNIT_PARATROOPER); SetString(1,ID_UNIT_SWARM); message(g.player,'msgReplaceUnits'); } trigger 'NeuralSiliconInterface_trigReplaceUnits' when (HasAdvance(g.player, ID_ADVANCE_NEURAL_SILICON_INTERFACE) ) { oldunittype = UnitType("UNIT_SPY"); newunittype = UnitType("UNIT_CYBER_NINJA"); oldunitcost = 1500; newunitcost = 4000; SetString(0,ID_UNIT_SPY); SetString(1,ID_UNIT_CYBER_NINJA); message(g.player,'msgReplaceUnits'); }