-- define lua functions 
function NoOp(self, source)
end


function kill(self) -- Kill unit self.
	ExecuteAction("NAMED_KILL", self);
end

function RadiatePhialFear( self )
	ObjectBroadcastEventToEnemies( self, "BeAfraidOfPhial", 75 )
end

function RadiateUncontrollableFear( self )
	ObjectBroadcastEventToEnemies( self, "BeUncontrollablyAfraid", 350 )
end

function RadiateGateDamageFear(self)
	ObjectBroadcastEventToAllies(self, "BeAfraidOfGateDamaged", 200)
end

function RadiateBalrogFear(self)
	ObjectBroadcastEventToEnemies(self, "BeAfraidOfBalrog", 180)
end

function OnMumakilCreated(self)
	ObjectHideSubObjectPermanently( self, "Houda", true )
	ObjectHideSubObjectPermanently( self, "Houda01", true )
end

function OnTrollCreated(self)
	ObjectHideSubObjectPermanently( self, "Trunk01", true )
	ObjectGrantUpgrade( self, "Upgrade_SwitchToRockThrowing" )
end

function OnCreepTrollCreated(self)
	ObjectHideSubObjectPermanently( self, "Trunk01", true )
	ObjectHideSubObjectPermanently( self, "ROCK", true )
end

function OnCaptureFlagGenericEvent(self,data)
	local str = ObjectCapturingObjectPlayerSide(self)
	if str == nil then
		str = ObjectPlayerSide(self)
	end


	ObjectHideSubObjectPermanently( self, "FLAG_ISENGARD", true)
	ObjectHideSubObjectPermanently( self, "FLAG_MORDOR", true)
	ObjectHideSubObjectPermanently( self, "FLAG_WILD", true)
	ObjectHideSubObjectPermanently( self, "FLAG_MEN", true)
	ObjectHideSubObjectPermanently( self, "FLAG_ELVES", true)
	ObjectHideSubObjectPermanently( self, "FLAG_DWARVES", true)
	ObjectHideSubObjectPermanently( self, "FLAG_ANGMAR", true)

	if str == "Isengard" then
		ObjectHideSubObjectPermanently( self, "FLAG_ISENGARD", false)
	elseif str == "Mordor" then
		ObjectHideSubObjectPermanently( self, "FLAG_MORDOR", false)
	elseif str == "Men" then
		ObjectHideSubObjectPermanently( self, "FLAG_MEN", false)
	elseif str == "Dwarves" then
		ObjectHideSubObjectPermanently( self, "FLAG_DWARVES", false)
	elseif str == "Elves" then
		ObjectHideSubObjectPermanently( self, "FLAG_ELVES", false)
	elseif str == "Wild" then
		ObjectHideSubObjectPermanently( self, "FLAG_WILD", false)
	elseif str == "Angmar" then
		ObjectHideSubObjectPermanently( self, "FLAG_ANGMAR", false)
	elseif str == "Mercenaries" then
		ObjectHideSubObjectPermanently( self, "FLAG_ANGMAR", false)
	else
		ObjectHideSubObjectPermanently( self, "FLAG_NEUTRAL", false)
	end
end

function OnTrollGenericEvent(self,data)

	local str = tostring( data )

	if str == "show_rock" then
		ObjectHideSubObjectPermanently( self, "ROCK", false )
	elseif str == "hide_rock" then
		ObjectHideSubObjectPermanently( self, "ROCK", true )
	end
end

function OnEntCreated(self)
	--ObjectShowSubObjectPermanently( self, "ROCK", true )
	ObjectGrantUpgrade( self, "Upgrade_SwitchToRockThrowing" )
end

function OnMountainGiantCreated(self)
	--ObjectHideSubObjectPermanently( self, "ROCK", true )
	ObjectGrantUpgrade( self, "Upgrade_SwitchToRockThrowing" )
end

function OnMountainGiantGenericEvent(self)
	
	local str = tostring( data )

	if str == "show_rock" then
		ObjectHideSubObjectPermanently( self, "ROCK", false )
	elseif str == "hide_rock" then
		ObjectHideSubObjectPermanently( self, "ROCK", true )
	end
end

function GoIntoRampage(self)
	ObjectEnterRampageState(self)
		
	--Broadcast fear to surrounding unit(if we actually rampaged)
	if ObjectTestModelCondition(self, "WEAPONSET_RAMPAGE") then
		ObjectBroadcastEventToUnits(self, "BeAfraidOfRampage", 250)
	end
end

function MakeMeAlert(self)
	ObjectEnterAlertState(self)
end

function BeEnraged(self)
	--Broadcast enraged to surrounding units.
	ObjectBroadcastEventToAllies(self, "BeingEnraged", 500)
end

function BecomeEnraged(self)
	ObjectSetEnragedState(self, true)
end

function StopEnraged(self)
	ObjectSetEnragedState(self, false)
end

function BecomeUncontrollablyAfraid(self, other)
	if not ObjectTestCanSufferFear(self) then
		return
	end

	ObjectEnterUncontrollableCowerState(self, other)
end

function BecomeAfraidOfRampage(self, other)
	if not ObjectTestCanSufferFear(self) then
		return
	end

	ObjectEnterCowerState(self, other)
end

function BecomeAfraidOfBalrog(self, other)
	if not ObjectTestCanSufferFear(self) then
		return
	end

	ObjectEnterCowerState(self, other)
end

function RadiateTerror(self, other)
	ObjectBroadcastEventToEnemies(self, "BeTerrified", 180)
end
	
function RadiateTerrorEx(self, other, terrorRange)
	ObjectBroadcastEventToEnemies(self, "BeTerrified", terrorRange)
end
	

function BecomeTerrified(self, other)
	ObjectEnterRunAwayPanicState(self, other)
end

function BecomeAfraidOfGateDamaged(self, other)
	if not ObjectTestCanSufferFear(self) then
		return
	end

	ObjectEnterCowerState(self,other)
end


function ChantForUnit(self) -- Used by units to broadcast the chant event to their own side.
	ObjectBroadcastEventToAllies(self, "BeginChanting", 9999)
end

function StopChantForUnit(self) -- Used by units to stop the chant event to their own side.
	ObjectBroadcastEventToAllies(self, "StopChanting", 9999)
end

function BeginCheeringForGrond(self)
	ObjectSetChanting(self, true)
end

function StopCheeringForGrond(self)
	ObjectSetChanting(self, false)
end

function OnMordorArcherCreated(self)
	ObjectHideSubObjectPermanently( self, "ARROWFIRE", true )
end

function OnMordorFighterCreated(self)
	ObjectHideSubObjectPermanently( self, "FORGED_BLADE", true )
	ObjectHideSubObjectPermanently( self, "FORGED_BLADES", true )
end

function MordorFighterBecomeUncontrollablyAfraid(self,other)
	local wasAfraid = ObjectTestModelCondition(self, "EMOTION_AFRAID")

	BecomeUncontrollablyAfraid(self,other)                 -- Call base function appropriate to many unit types
	
	-- Play unit-specific sound, but only when first entering state (not every time troll sends out fear message!)
	-- BecomeAfraidOfTroll may fail, don't play sound if we didn't enter fear state
		if ( not wasAfraid ) and ObjectTestModelCondition(self, "EMOTION_AFRAID") then
		ObjectPlaySound(self, "MordorFighterEntFear") 
	end
end

function MordorFighterBecomeAfraidOfPhial(self,other)
	local wasAfraid = ObjectTestModelCondition(self, "EMOTION_AFRAID")

	BecomeUncontrollablyAfraid(self,other)
	-- BecomeAfraidOfTroll(self,other)                 -- Call base function appropriate to many unit types
	
	-- Play unit-specific sound, but only when first entering state (not every time troll sends out fear message!)
	-- BecomeAfraidOfTroll may fail, don't play sound if we didn't enter fear state
--		if ( not wasAfraid ) and ObjectTestModelCondition(self, "EMOTION_AFRAID") then
--			ObjectPlaySound(self, "MordorFighterEntFear") 
--		end
end

function OnMordorCorsairCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "Forged_Blade01", true )
end

function WildInfantryBecomeAfraidOfPhial(self,other)
	local wasAfraid = ObjectTestModelCondition(self, "EMOTION_AFRAID")
	BecomeUncontrollablyAfraid(self,other)
end


function ShelobBecomeAfraidOfPhial(self,other)
	local wasAfraid = ObjectTestModelCondition(self, "EMOTION_AFRAID")

	BecomeUncontrollablyAfraid(self,other)
	-- BecomeAfraidOfTroll(self,other)                 -- Call base function appropriate to many unit types
	
	-- Play unit-specific sound, but only when first entering state (not every time troll sends out fear message!)
	-- BecomeAfraidOfTroll may fail, don't play sound if we didn't enter fear state
--		if ( not wasAfraid ) and ObjectTestModelCondition(self, "EMOTION_AFRAID") then
--			ObjectPlaySound(self, "MordorFighterEntFear") 
--		end
end

function OnInfantryBannerCreated(self)
	ObjectHideSubObjectPermanently( self, "Glow", true )
end

function OnCavalryCreated(self)
	ObjectHideSubObjectPermanently( self, "Glow", true )
end

function OnGondorFighterCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "Hammer1", true )
	ObjectHideSubObjectPermanently( self, "Glow", true )
	ObjectHideSubObjectPermanently( self, "Glow1", true )
end

function OnAragornCreated(self)
	ObjectHideSubObjectPermanently( self, "PLANE02", true )
end

function OnGondorArcherCreated(self)
	-- ObjectHideSubObjectPermanently( self, "arrow", true )		-- This gets hidden pending the art being fixed.  it is the pre-new-archer-firing-pattern arrow
	ObjectHideSubObjectPermanently( self, "FireArowTip", true ) -- This gets hidden because the Fire Arrow upgrade turns it on.
end

function DragonStrikeDragonCreated(self)
	ObjectForbidPlayerCommands( self, true )
end

function OnLegolasCreated(self)
	-- ObjectHideSubObjectPermanently( self, "arrow02", true )		-- This gets hidden pending the art being fixed.  it is the pre-new-archer-firing-pattern arrow
	-- ObjectHideSubObjectPermanently( self, "arrow", true )		-- This gets hidden pending the art being fixed.  it is the pre-new-archer-firing-pattern arrow
end

function OnRohanArcherCreated(self)
	ObjectHideSubObjectPermanently( self, "FireArowTip", true ) -- yes, it's a typo in the art.
	-- ObjectHideSubObjectPermanently( self, "ArrowNock", true )
	-- ObjectHideSubObjectPermanently( self, "arrow", true )
end

function GondorFighterBecomeAfraid(self, other)
	local wasAfraid = ObjectTestModelCondition(self, "EMOTION_AFRAID")

	-- An object has a 100% chance to become afraid.
	-- An object has a 66% chance to be feared, 33% chance to run away.
	if GetRandomNumber() <= 0.67 then 
		ObjectEnterFearState(self, other, false) -- become afraid of other.
	else --if GetRandomNumber() > 0.67 then
		ObjectEnterRunAwayPanicState(self, other) -- run away.

	end
	
	if ( not wasAfraid ) and ObjectTestModelCondition(self, "EMOTION_AFRAID") then
		ObjectPlaySound(self, "GondorSoldierScream")	
	end
	
end


function GondorFighterBecomeAfraidOfGateDamaged(self, other)
	local wasAfraid = ObjectTestModelCondition(self, "EMOTION_AFRAID")

	BecomeAfraidOfGateDamaged(self,other)                 -- Call base function appropriate to many unit types
	
	-- Play unit-specific sound, but only when first entering state (not every time troll sends out fear message!)
	-- BecomeAfraidOfGateDamaged may fail, don't play sound if we didn't enter fear state
	
	if ( not wasAfraid ) and ObjectTestModelCondition(self, "EMOTION_AFRAID") then
		ObjectPlaySound(self, "GondorSoldierScream")	
	end
end

function GondorFighterRecoverFromTerror(self)
	-- Add recovery sound
	ObjectPlaySound(self, "GondorSoldierRecoverFromTerror")
end

function SpyMoving(self, other)
	print(ObjectDescription(self).." spying movement of "..ObjectDescription(other));
end

--function GandalfConsiderUsingDefensePower(self, other, delay, amount)
--	-- Put up the shield if a big attack is coming and we have time to block it
--	if tonumber(delay) > 1 then
--		if tonumber(amount) >= 100 then
--			ObjectDoSpecialPower(self, "SpecialPowerShieldBubble")
--			return
--		end
--	end
--	
--	-- Or, if we are being hit and there are alot of guys arround, do our cool pushback power
--	if tonumber(ObjectCountNearbyEnemies(self, 50)) >= 4 then
--		ObjectDoSpecialPower(self, "SpecialPowerTelekeneticPush")
--		return
--	end
--end

function GandalfTriggerWizardBlast(self)
	ObjectCreateAndFireTempWeapon(self, "GandalfWizardBlast")
end

--function SarumanConsiderUsingDefensePower(self, other, delay, amount)
--	-- Put up the shield if a big attack is coming and we have time to block it
--E4	if tonumber(delay) > 1 then
--E4		if tonumber(amount) >= 25 then
--E4			ObjectDoSpecialPower(self, "SpecialPowerShieldBubble")
--E4			return
--E4		end
--E4	end
--	
--	-- Or, if we are being hit and there are alot of guys arround, do our cool pushback power
--	if tonumber(ObjectCountNearbyEnemies(self, 50)) >= 4 then
--		ObjectDoSpecialPower(self, "SpecialPowerTelekeneticPush")
--		return
--	end
--end

function BalrogTriggerBreatheFire(self)
	ObjectCreateAndFireTempWeapon(self, "MordorBalrogBreath")
end

function OnRohirrimCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "SHIELD", true )
	ObjectHideSubObjectPermanently( self, "FireArowTip", true )
end

function OnSummonedRohirrimCreated(self)
	ObjectGrantUpgrade( self, "Upgrade_RohanHeavyArmorForRohirrim" )
	ObjectGrantUpgrade( self, "Upgrade_RohanHorseShield" )
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
end

function OnGondorCavalryCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "sshield", true )
end

function OnDwarvenBattleWagonCreated(self)
	ObjectHideSubObjectPermanently( self, "dwarfHearth", true )
	ObjectHideSubObjectPermanently( self, "dwarfHearthFire", true )
	ObjectHideSubObjectPermanently( self, "Banner_L", true )
	ObjectHideSubObjectPermanently( self, "Glow", true )
end

function OnDwarvenCartCreated(self)
	ObjectHideSubObjectPermanently( self, "dwarfHearth", true )
	ObjectHideSubObjectPermanently( self, "dwarfHearthFire", true )
	ObjectHideSubObjectPermanently( self, "Banner_L", true )
	ObjectHideSubObjectPermanently( self, "Glow", true )
	ObjectHideSubObjectPermanently( self, "DWARFENGM", true )
end

function OnEvilMenBlackRiderCreated(self)
	-- @todo place appropriate functionality here
end

function OnBallistaCreated(self)
	ObjectHideSubObjectPermanently( self, "MinedArrow", true )
end

function OnCatapultCreated(self)
	ObjectHideSubObjectPermanently( self, "PROJECTILEROCK", true )
	ObjectHideSubObjectPermanently( self, "FIREPLANE", true )
end

function OnTrebuchetCreated(self)
	ObjectHideSubObjectPermanently( self, "FIREPLANE", true )
end

function OnTrollSlingCreated(self)
	ObjectHideSubObjectPermanently( self, "FORGED_BLADE", true )
end

function OnPorterCreated(self)
	ObjectHideSubObjectPermanently( self, "ARROWS", true )
	ObjectHideSubObjectPermanently( self, "BRAZIER", true )
	ObjectHideSubObjectPermanently( self, "BOWS", true )
	ObjectHideSubObjectPermanently( self, "TREBUCHET_FIRE", true )
	ObjectHideSubObjectPermanently( self, "SWORDS", true )
	ObjectHideSubObjectPermanently( self, "SHIELDS", true )
	ObjectHideSubObjectPermanently( self, "ARMOR", true )
	ObjectHideSubObjectPermanently( self, "BANNERS", true )
end

function OnEvilPorterCreated(self)
	ObjectHideSubObjectPermanently( self, "FIREAROWTIP", true )
	ObjectHideSubObjectPermanently( self, "FORGED_BLADE", true )
	ObjectHideSubObjectPermanently( self, "ARROW_UPGRADE", true )
	ObjectHideSubObjectPermanently( self, "ARMOR_UPGRADE", true )
	ObjectHideSubObjectPermanently( self, "GOLD", true )
	ObjectHideSubObjectPermanently( self, "SWORD_UPGRADES", true )
end

function OnPeasantCreated(self)
	ObjectHideSubObjectPermanently( self, "HELMET", true )
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "HAMMER", false )
	ObjectHideSubObjectPermanently( self, "FORGED_BLADE", true )
	ObjectHideSubObjectPermanently( self, "SHIELD", true )
	ObjectHideSubObjectPermanently( self, "Broom", true )
end

function OnMordorSauronCreated(self)
	ObjectHideSubObjectPermanently( self, "SHARD01", true )
	ObjectHideSubObjectPermanently( self, "SHARD02", true )
	ObjectHideSubObjectPermanently( self, "SHARD03", true )
	ObjectHideSubObjectPermanently( self, "SHARD04", true )
	ObjectHideSubObjectPermanently( self, "SHARD05", true )
	ObjectHideSubObjectPermanently( self, "SHARD06", true )
	ObjectHideSubObjectPermanently( self, "SHARD07", true )
	ObjectHideSubObjectPermanently( self, "SHARD08", true )
	ObjectHideSubObjectPermanently( self, "SHARD09", true )
	ObjectHideSubObjectPermanently( self, "SHARD10", true )
	ObjectHideSubObjectPermanently( self, "SHARD11", true )
	ObjectHideSubObjectPermanently( self, "SHARD12", true )
	ObjectHideSubObjectPermanently( self, "SHARD13", true )
	ObjectHideSubObjectPermanently( self, "SHARD14", true )
	ObjectHideSubObjectPermanently( self, "SHARD15", true )
	ObjectHideSubObjectPermanently( self, "SHARD16", true )
	ObjectHideSubObjectPermanently( self, "SHARD17", true )
	ObjectHideSubObjectPermanently( self, "SHARD18", true )
	ObjectHideSubObjectPermanently( self, "SHARD19", true )
	ObjectHideSubObjectPermanently( self, "SHARD20", true )
end

function OnElvenWarriorCreated(self)
	ObjectHideSubObject( self, "ARROW", true )
	ObjectHideSubObject( self, "ARROWNOCK", true )
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "FIREAROWTIP", true )
end

function OnIsengardFighterCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "Glow", true )
end

function OnIsengardWildmanCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "Torch", true )
	ObjectHideSubObjectPermanently( self, "FireArowTip", true )
end

function OnWildSpiderRiderCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "FIREAROWTIP", true )
	ObjectHideSubObject( self, "ARROWNOCK", true )
end

function OnHaradrimArcherCreated(self)
	ObjectHideSubObjectPermanently( self, "FireArowTip", true )
	ObjectHideSubObject( self, "ArrowNock", true )
end

function OnIsengardArcherCreated(self)
	ObjectHideSubObject( self, "ARROWNOCK", true )
	ObjectHideSubObjectPermanently( self, "FIREAROWTIP", true )
end

function OnWildGoblinArcherCreated(self)
	ObjectHideSubObjectPermanently( self, "FIREAROWTIP", true )
end

function OnGarrisonableCreated(self)
	ObjectHideSubObjectPermanently( self, "GARRISON01", true )
	ObjectHideSubObjectPermanently( self, "GARRISON02", true )
end
function OnDwarvenGuardianCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "Hammer1", true )
end

function CreateAHeroHideEverything(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	-- ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
end

function OnCreateAHeroFunctions(self)
	CreateAHeroHideEverything(self)
end

function OnEvilShipCreated(self)
	ObjectHideSubObjectPermanently( self, "CAULDRON", true )
	ObjectHideSubObjectPermanently( self, "CAULDRON_FIRE", true )
	ObjectHideSubObjectPermanently( self, "CAULDRON_TOP", true )
	ObjectHideSubObjectPermanently( self, "CROWSNEST", true )
	ObjectHideSubObjectPermanently( self, "FLAG", true )
	ObjectHideSubObjectPermanently( self, "BANNER", true )
end

function OnGoodShipCreated(self)
	ObjectHideSubObjectPermanently( self, "UG_FLAMING_01", true )
	ObjectHideSubObjectPermanently( self, "UG_FLAMING_02", true )
	ObjectHideSubObjectPermanently( self, "UG_FLAMING_FIRE", true )
	ObjectHideSubObjectPermanently( self, "UG_ARMOR", true )
	ObjectHideSubObjectPermanently( self, "BANNER", true )
end

function OnShipWrightCreated(self)
	ObjectHideSubObjectPermanently( self, "GoodPart_A", true )
	ObjectHideSubObjectPermanently( self, "GoodPart_B", true )
	ObjectHideSubObjectPermanently( self, "EvilPart_A", true )
	ObjectHideSubObjectPermanently( self, "EvilPart_B", true )
end

function OnDormitoryBuildVariation(self,variation)

	local var = tonumber(variation)

	if var == 1 then
		ObjectSetGeometryActive( self, "VersionOne", true )
		ObjectSetGeometryActive( self, "VersionTwo", false )
	elseif var == 2 then
		ObjectSetGeometryActive( self, "VersionOne", false )
		ObjectSetGeometryActive( self, "VersionTwo", true )
	end

end

function OnFortressCreated(self)
	ObjectHideSubObjectPermanently( self, "DBFBANNER", true )	
	ObjectSetGeometryActive( self, "HighTowerGeom", false )
end

function OnGateWatcherBuilt(self)
	ObjectDoSpecialPower(self, "SpecialAbilityGateWatchersFear")
end	

function NeutralGollum_RingStealerDamaged(self,other)

	if ObjectHasUpgrade( other, "Upgrade_RingHero" ) == 0 then
		ObjectChangeAllegianceFromNonPlayablePlayer( self, other )
	end
	
end

function NeutralGollum_RingStealerSlaughtered(self,other)
	ObjectRemoveUpgrade( other, "Upgrade_RingHero" )
end

function OnNecromancerStatueCreated(self)
	ObjectDoSpecialPower(self, "SpecialAbilityGateWatchersFear")
end	

function OnCatapultMercenaryCreated(self)
	ObjectHideSubObjectPermanently( self, "PROJECTILEROCK", true )
	ObjectHideSubObjectPermanently( self, "FIREPLANE", true )
	ObjectHideSubObjectPermanently( self, "DWARFENGM", true )
end

function HorseMountCreated(self)
	ObjectHideSubObjectPermanently( self, "Forged_Blade", true )
	ObjectHideSubObjectPermanently( self, "SHIELD", true )
	ObjectHideSubObjectPermanently( self, "FireArowTip", true )
	ObjectHideSubObjectPermanently( self, "RUROHRM", true )	
	ObjectHideSubObjectPermanently( self, "GANDALF_M", true )
	ObjectHideSubObjectPermanently( self, "WITCHKING", true )
	ObjectHideSubObjectPermanently( self, "SHOULDERPADLEFT", true )
	ObjectHideSubObjectPermanently( self, "SHOULDERPADRIGH", true )	
end

function FellBeastMountCreated(self)
	ObjectHideSubObjectPermanently( self, "NAZGUL_SKIN", true )
end

function ScorpionMountCreated(self)
	ObjectHideSubObjectPermanently( self, "RIDER", true )
end

function FlyingDragonMountOnCreated(self)
	ObjectHideSubObjectPermanently( self, "DRAGONARMOR", true )
end

function SnowTrebuchetOnCreated(self)
	ObjectHideSubObjectPermanently( self, "FORGED_BLADE", true )
	ObjectHideSubObjectPermanently( self, "HILLTROLL ", true )
	ObjectHideSubObjectPermanently( self, "HILLTROLL 01", true )
end

function TrollcartOnCreated(self)
	ObjectHideSubObjectPermanently( self, "SK_SKULL", true )
end

function DemolisherMercenariesOnCreated(self)
	ObjectHideSubObjectPermanently( self, "RHINOSM01", true )
	ObjectHideSubObjectPermanently( self, "RHINOSM", true )
	ObjectHideSubObjectPermanently( self, "DWARFENGM01", true )
	ObjectHideSubObjectPermanently( self, "DWARFENGM", true )
	ObjectHideSubObjectPermanently( self, "ROPES", true )
	ObjectHideSubObjectPermanently( self, "DEMOSHIELD", true )
end

function OnMercenaryStablesBuilt(self)
	ObjectHideSubObjectPermanently( self, "Fence", true )
	ObjectHideSubObjectPermanently( self, "V1", true )
	ObjectHideSubObjectPermanently( self, "V1a", true )
	ObjectHideSubObjectPermanently( self, "V2", true )
end	

function OnMercenaryForgeBuilt(self)
	ObjectGrantUpgrade( self, "Upgrade_StartAura" )
end	

function OnGrondMercenariesCreated(self)
	ObjectHideSubObjectPermanently( self, "BURNERS", true )
	ObjectHideSubObjectPermanently( self, "TORCHES", true )
end	

function AmazonMercenaryOncreated(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
	ObjectHideSubObjectPermanently( self, "QUIVR", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01", true )

-- Boots
	local str = GetRandomNumber()
	if str <= 0.1 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_01" )
	elseif str <= 0.2 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_02" )
	elseif str <= 0.3 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_03" )	
	elseif str <= 0.4 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_04" )
	elseif str <= 0.5 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_05" )
	elseif str <= 0.6 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_06" )
	end
	
-- Swords
	local str = GetRandomNumber()
	if str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_WIZARDSWORD" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SWORD_01" )
	end
	
-- Bows
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_MITHLONDRECURVE" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_BELTHRONDING" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_BOW_03" )	
	elseif str <= 0.80 then 
	ObjectGrantUpgrade( self, "Upgrade_BOW_04" )
	elseif str <= 1.0 then 
	ObjectGrantUpgrade( self, "Upgrade_BOW_05" )
	end
	
-- Armor
	local str = GetRandomNumber()
	if str <= 0.8 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_01" )
	elseif str <= 1.0 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_07" )
	end
	
-- Gauntlets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_07" )
	end
  
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_04" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_05" )
	end 
	
-- Spaulders
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_06" )
	end
end

function WizardMercenaryOncreated(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
	ObjectHideSubObjectPermanently( self, "QUIVR", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01", true )


-- Armor
	local str = GetRandomNumber()
	if str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_01" )
	elseif str <= 0.80 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_02" )
	elseif str <= 1.0 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_03" )
	end
	
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_03" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_04" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_05" )
	end 
	
 -- Helmets 2
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_06" )
	end 
	
 -- Helmets 3
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_02" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_07" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_08" )
	end 
	
-- Spaulders
	local str = GetRandomNumber()
	if str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_01" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_02" )
	end
	
-- Staves
	local str = GetRandomNumber()
	if str <= 0.17 then 
	ObjectGrantUpgrade( self, "Upgrade_STFF_05" )
	elseif str <= 0.33 then 
	ObjectGrantUpgrade( self, "Upgrade_STFF_06" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_WIZARDSTAFF01" )
	elseif str <= 0.67 then 
	ObjectGrantUpgrade( self, "Upgrade_WIZARDSTAFF02" )
	elseif str <= 0.83 then 
	ObjectGrantUpgrade( self, "Upgrade_WIZARDSTAFF03" )
	elseif str <= 1.0 then 
	ObjectGrantUpgrade( self, "Upgrade_WIZARDSTAFF04" )
	end

end


function SnowTrollMercenaryOncreated(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
	ObjectHideSubObjectPermanently( self, "QUIVR", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01", true )

	   
-- Weapons
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLTREE" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_PAXE_01" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_CLUB_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HMR_02" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_HMR_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLMACE" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLSWORD" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SWD_03" )
	elseif str <= 0.65 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLHAMMER" )
	end
	
-- Boots
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_02" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_03" )	
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_04" )
	end
		
-- Armor
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_02" )
	end
	
-- Gauntlets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_01" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_02" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_03" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_04" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_05" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_07" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_08" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_09" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_10" )
	end
  
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_03" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_04" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_05" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_06" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_07" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_08" )
	end 
	
-- Spaulders
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_06" )
	end
	
   
-- Shield
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_SHIELD_1OG" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_SHIELD_2OG" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SHLD_01" )	
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SHLD_02" )
	end
	
-- Skin/armor
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_02" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_03" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_05" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_06" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_07" )
	end
end

function MountainTrollMercenaryOncreated(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
	ObjectHideSubObjectPermanently( self, "QUIVR", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01", true )

-- Weapons
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLTREE" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_CLUB_01" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_HMR_02" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLMACE" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLSWORD" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLHAMMER" )
	end
	
-- Boots
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_01" )
	end
		
-- Armor
	local str = GetRandomNumber()
	if str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_02" )
	end
	
-- Gauntlets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_10" )
	end
  
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_02" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_03" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_08" )
	end 
	
-- Spaulders
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_06" )
	end
end

function HillTrollMercenaryOncreated(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
	ObjectHideSubObjectPermanently( self, "QUIVR", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01", true )

	   
-- Weapons
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLTREE" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_PAXE_01" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_CLUB_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HMR_02" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_HMR_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLMACE" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLSWORD" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SWD_03" )
	elseif str <= 0.65 then 
	ObjectGrantUpgrade( self, "Upgrade_TROLLHAMMER" )
	end
	
-- Boots
	local str = GetRandomNumber()
	if str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_01" )
	end
		
-- Armor
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_01" )
	elseif str <= 0.18 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_02" )
	end
	
-- Gauntlets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_02" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_03" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_04" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_05" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_07" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_08" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_09" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_10" )
	end
  
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_01" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_02" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_03" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_04" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_05" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_06" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_07" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_08" )
	end 
	
-- Spaulders
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_06" )
	end
	
-- Skin/armor
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_01" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_02" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_03" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_05" )
	elseif str <= 0.65 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_06" )
	elseif str <= 0.70 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_07" )
	end
end

function CorruptedmanMercenaryHideEverything(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
	ObjectHideSubObjectPermanently( self, "QUIVR", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01", true )

-- Weapons
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_SWRD_04" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_SWRD_05" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_CMSWORD01" )	
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_CMSWORD02" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SWRD_03" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_CLUB_03" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_HMR_03" )
	end

-- Bows
	local str = GetRandomNumber()
	if str <= 0.33 then 
	ObjectGrantUpgrade( self, "Upgrade_MITHLONDRECURVE" )
	elseif str <= 0.66 then 
	ObjectGrantUpgrade( self, "Upgrade_BELTHRONDING" )
	end
	
 -- Boots
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_02" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_03" )
	end 
	
-- Armor
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_CHEST_02" )
	end
	
-- Skin/armor
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_02" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_03" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_04" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_06" )
	elseif str <= 0.65 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_07" )
	end
	
 -- Gauntlets
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_02" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_03" )
	end 
	
-- Helmets
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_01" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_02" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_03" )	
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_04" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_05" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_06" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_08" )
	end
	
 -- Spauldrons
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_02" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_03" )
	end 
end


function HumanMercenaryOncreated(self)
	ObjectHideSubObjectPermanently( self, "SWORD", true )
	ObjectHideSubObjectPermanently( self, "BOW", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "TRUNK01", true )
	ObjectHideSubObjectPermanently( self, "STAFF_LIGHT", true )
	ObjectHideSubObjectPermanently( self, "OBJECT01", true )
	
	ObjectHideSubObjectPermanently( self, "SHIELD01", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_01", true )
	ObjectHideSubObjectPermanently( self, "SPEAR", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_B", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_C", true )
	ObjectHideSubObjectPermanently( self, "SHIELD_D", true )
	ObjectHideSubObjectPermanently( self, "B_SHIELD", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_A", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_B", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_C", true )
	ObjectHideSubObjectPermanently( self, "WEAPON_D", true )
	
	ObjectHideSubObjectPermanently( self, "AXE02", true )

	ObjectHideSubObjectPermanently( self, "AxeWeapon", true )
	ObjectHideSubObjectPermanently( self, "Belthronding", true )
	ObjectHideSubObjectPermanently( self, "Mithlondrecurve", true )
	ObjectHideSubObjectPermanently( self, "Dwarf_Axe01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_SM", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX01", true )
	ObjectHideSubObjectPermanently( self, "FireBrand_FX02", true )
	ObjectHideSubObjectPermanently( self, "Gurthang", true )
	ObjectHideSubObjectPermanently( self, "Gurthang_SM", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield", true )
	ObjectHideSubObjectPermanently( self, "HeroOfTheWestShield_SM", true )
	ObjectHideSubObjectPermanently( self, "MithlondBow", true )
	ObjectHideSubObjectPermanently( self, "TrollBane", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_SM", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX01", true )
	ObjectHideSubObjectPermanently( self, "TrollBane_FX02", true )
	ObjectHideSubObjectPermanently( self, "TrollMace", true )
	ObjectHideSubObjectPermanently( self, "TrollSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword", true )
	ObjectHideSubObjectPermanently( self, "WestronSword_SM", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX2", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX3", true )
	ObjectHideSubObjectPermanently( self, "WizStaff01_FX4", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff02_FX1", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff03_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizardStaff04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX01", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX02", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX03", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX04", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX05", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX06", true )
	ObjectHideSubObjectPermanently( self, "WizStaff04_FX07", true )
	ObjectHideSubObjectPermanently( self, "WizardSword", true )
	ObjectHideSubObjectPermanently( self, "CMSword01", true )
	ObjectHideSubObjectPermanently( self, "CMSword02", true )
	ObjectHideSubObjectPermanently( self, "CHEST_00", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_01", true )	
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )	
	ObjectHideSubObjectPermanently( self, "BOOT_00", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "SHLD_00", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_00", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06", true )
	ObjectHideSubObjectPermanently( self, "Shield_1OG", true )
	ObjectHideSubObjectPermanently( self, "Shield_2OG", true )
	ObjectHideSubObjectPermanently( self, "HAIR_00", true )
	ObjectHideSubObjectPermanently( self, "HAIR_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_00", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07_LOD1", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_00", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08", true )
	ObjectHideSubObjectPermanently( self, "GHLT_08", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09_LOD1", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10", true )
	ObjectHideSubObjectPermanently( self, "SPR_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01", true )
	ObjectHideSubObjectPermanently( self, "PAXE_01_LOD1", true )
	ObjectHideSubObjectPermanently( self, "SWRD_01", true )
	ObjectHideSubObjectPermanently( self, "SWRD_02", true )
	ObjectHideSubObjectPermanently( self, "SWRD_03", true )
	ObjectHideSubObjectPermanently( self, "SWRD_04", true )
	ObjectHideSubObjectPermanently( self, "SWRD_05", true )
	ObjectHideSubObjectPermanently( self, "SWD_01", true )
	ObjectHideSubObjectPermanently( self, "SWD_02", true )
	ObjectHideSubObjectPermanently( self, "SWD_03", true )
	ObjectHideSubObjectPermanently( self, "SWD_04", true )
	ObjectHideSubObjectPermanently( self, "STFF_05", true )
	ObjectHideSubObjectPermanently( self, "STFF_06", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_01", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_02", true )
	ObjectHideSubObjectPermanently( self, "objSLDR_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_01", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_02", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_03", true )
	ObjectHideSubObjectPermanently( self, "objHLMT_04", true )	
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_01", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_02", true )
	ObjectHideSubObjectPermanently( self, "Uruk_Sword_03", true )
	ObjectHideSubObjectPermanently( self, "TrollTree", true )
	ObjectHideSubObjectPermanently( self, "TrollHammer", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01", true )
	ObjectHideSubObjectPermanently( self, "CLUB_02", true )
	ObjectHideSubObjectPermanently( self, "CLUB_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_01", true )
	ObjectHideSubObjectPermanently( self, "HMR_02", true )
	ObjectHideSubObjectPermanently( self, "HMR_03", true )
	ObjectHideSubObjectPermanently( self, "HMR_04", true )
	ObjectHideSubObjectPermanently( self, "AXE_01", true )
	ObjectHideSubObjectPermanently( self, "AXE_02", true )
	ObjectHideSubObjectPermanently( self, "AXE_03", true )
	ObjectHideSubObjectPermanently( self, "BARREL", true )
	ObjectHideSubObjectPermanently( self, "OBJECT02", true )	-- Barrel on the Orc Raider
	ObjectHideSubObjectPermanently( self, "ARROW", true )
	ObjectHideSubObjectPermanently( self, "PLANE02", true )	
	ObjectHideSubObjectPermanently( self, "QUIVR", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01", true )


	
-- Swords
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_AXE_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_BELTHRONDING" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SWRD_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SWRD_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_SWRD_05" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_CMSWORD01" )
	elseif str <= 0.70 then 
	ObjectGrantUpgrade( self, "Upgrade_CMSWORD02" )
	end
	
-- Boots
	local str = GetRandomNumber()
	if str <= 0.1 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_01" )
	elseif str <= 0.2 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_02" )
	elseif str <= 0.3 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_03" )	
	elseif str <= 0.4 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_04" )
	elseif str <= 0.5 then 
	ObjectGrantUpgrade( self, "Upgrade_BOOT_05" )
	end
	
-- Bows
	
-- Armor
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_05" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_06" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_07" )
	end
	
-- Gauntlets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_04" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_GNLT_05" )
	end
  
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_03" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_05" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_HLMT_06" )
	end 
	
-- Spaulders
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_02" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_04" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SLDR_05" )
	end
	
-- Shield
	local str = GetRandomNumber()
	if str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_SHLD_01" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SHLD_02" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_SHIELD_1OG" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_SHIELD_2OG" )
	end

end

function OnSpecialMercenaryCreated(self)
	ObjectHideSubObjectPermanently( self, "MACE", true )
	ObjectHideSubObjectPermanently( self, "MACE2", true )
	ObjectHideSubObjectPermanently( self, "CROSSBOW", true )
	ObjectHideSubObjectPermanently( self, "AXE_01L", true )	
	ObjectHideSubObjectPermanently( self, "AXE_02L", true )
	ObjectHideSubObjectPermanently( self, "AXE_03L", true )
	ObjectHideSubObjectPermanently( self, "AXE_04L", true )
	ObjectHideSubObjectPermanently( self, "AXE_05L", true )
	ObjectHideSubObjectPermanently( self, "AXE_06L", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01L", true )
	ObjectHideSubObjectPermanently( self, "CMSWORD01L", true )
	ObjectHideSubObjectPermanently( self, "DAGGER01L", true )
	ObjectHideSubObjectPermanently( self, "ELVENSWORD01L", true )
	ObjectHideSubObjectPermanently( self, "SPEAR_01L", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01L", true )
	ObjectHideSubObjectPermanently( self, "SWORD_02L", true )
	ObjectHideSubObjectPermanently( self, "SWORD_03L", true )
	ObjectHideSubObjectPermanently( self, "SWORD_04L", true )
	ObjectHideSubObjectPermanently( self, "SWORD_05L", true )
	ObjectHideSubObjectPermanently( self, "SWORD_06L", true )
	ObjectHideSubObjectPermanently( self, "SWORD_07L", true )
	ObjectHideSubObjectPermanently( self, "HMR_01L", true )
	ObjectHideSubObjectPermanently( self, "HMR_02L", true )
	ObjectHideSubObjectPermanently( self, "AXE_01R", true )
	ObjectHideSubObjectPermanently( self, "AXE_02R", true )
	ObjectHideSubObjectPermanently( self, "AXE_03R", true )
	ObjectHideSubObjectPermanently( self, "AXE_04R", true )
	ObjectHideSubObjectPermanently( self, "AXE_05R", true )
	ObjectHideSubObjectPermanently( self, "AXE_06R", true )
	ObjectHideSubObjectPermanently( self, "CLUB_01R", true )
	ObjectHideSubObjectPermanently( self, "CMSWORD01R", true )
	ObjectHideSubObjectPermanently( self, "DAGGER01R", true )
	ObjectHideSubObjectPermanently( self, "ELVENSWORD01R", true )
	ObjectHideSubObjectPermanently( self, "SPEAR_01R", true )
	ObjectHideSubObjectPermanently( self, "SWORD_01R", true )
	ObjectHideSubObjectPermanently( self, "SWORD_02R", true )
	ObjectHideSubObjectPermanently( self, "SWORD_03R", true )
	ObjectHideSubObjectPermanently( self, "SWORD_04R", true )
	ObjectHideSubObjectPermanently( self, "SWORD_05R", true )
	ObjectHideSubObjectPermanently( self, "SWORD_06R", true )
	ObjectHideSubObjectPermanently( self, "SWORD_07R", true )
	ObjectHideSubObjectPermanently( self, "HMR_01R", true )
	ObjectHideSubObjectPermanently( self, "HMR_02R", true )
	ObjectHideSubObjectPermanently( self, "BOW_01", true )
	ObjectHideSubObjectPermanently( self, "BOW_02", true )
	ObjectHideSubObjectPermanently( self, "BOW_03", true )
	ObjectHideSubObjectPermanently( self, "BOW_04", true )
	ObjectHideSubObjectPermanently( self, "BOW_05", true )
	ObjectHideSubObjectPermanently( self, "BOW_06", true )
	ObjectHideSubObjectPermanently( self, "QUIVER", true )
	ObjectHideSubObjectPermanently( self, "BOOT_01", true )
	ObjectHideSubObjectPermanently( self, "BOOT_02", true )
	ObjectHideSubObjectPermanently( self, "BOOT_03", true )
	ObjectHideSubObjectPermanently( self, "BOOT_04", true )
	ObjectHideSubObjectPermanently( self, "BOOT_05", true )
	ObjectHideSubObjectPermanently( self, "BOOT_06", true )
	ObjectHideSubObjectPermanently( self, "BOOT_07", true )
	ObjectHideSubObjectPermanently( self, "BOOT_08", true )
	ObjectHideSubObjectPermanently( self, "BOOT_09", true )
	ObjectHideSubObjectPermanently( self, "BOOT_10", true )
	ObjectHideSubObjectPermanently( self, "BOOT_11", true )
	ObjectHideSubObjectPermanently( self, "BOOT_12", true )
	ObjectHideSubObjectPermanently( self, "CHEST_02", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_11L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_12L", true )
	ObjectHideSubObjectPermanently( self, "GNLT_01R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_02R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_03R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_04R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_05R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_06R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_07R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_08R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_09R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_10R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_11R", true )
	ObjectHideSubObjectPermanently( self, "GNLT_12R", true )
	ObjectHideSubObjectPermanently( self, "HLMT_01", true )
	ObjectHideSubObjectPermanently( self, "HLMT_02", true )
	ObjectHideSubObjectPermanently( self, "HLMT_03", true )
	ObjectHideSubObjectPermanently( self, "HLMT_04", true )
	ObjectHideSubObjectPermanently( self, "HLMT_05", true )
	ObjectHideSubObjectPermanently( self, "HLMT_06", true )
	ObjectHideSubObjectPermanently( self, "HLMT_07", true )
	ObjectHideSubObjectPermanently( self, "HLMT_08", true )
	ObjectHideSubObjectPermanently( self, "HLMT_09", true )
	ObjectHideSubObjectPermanently( self, "HLMT_10", true )
	ObjectHideSubObjectPermanently( self, "HLMT_11", true )
	ObjectHideSubObjectPermanently( self, "HLMT_12", true )
	ObjectHideSubObjectPermanently( self, "SHLD_01", true )
	ObjectHideSubObjectPermanently( self, "SHLD_02", true )
	ObjectHideSubObjectPermanently( self, "SHLD_03", true )
	ObjectHideSubObjectPermanently( self, "SHLD_04", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_07L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_08L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_09L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_10L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_11L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_12L", true )
	ObjectHideSubObjectPermanently( self, "SLDR_01R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_02R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_03R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_04R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_05R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_06R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_07R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_08R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_09R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_10R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_11R", true )
	ObjectHideSubObjectPermanently( self, "SLDR_12R", true )

-- Weapons Left
	local str = GetRandomNumber()
	if str <= 0.02 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW01" )
	elseif str <= 0.04 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW02" )
	elseif str <= 0.06 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW03" )
	elseif str <= 0.08 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW04" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW05" )
	elseif str <= 0.12 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW06" )
	elseif str <= 0.14 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW07" )
	elseif str <= 0.16 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW08" )
	elseif str <= 0.18 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW09" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW10" )
	elseif str <= 0.22 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW11" )
	elseif str <= 0.24 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW12" )
	elseif str <= 0.26 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW13" )
	elseif str <= 0.28 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW14" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW15" )
	elseif str <= 0.32 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW16" )
	elseif str <= 0.34 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW17" )
	elseif str <= 0.36 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW18" )
	elseif str <= 0.38 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW19" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW20" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW41" )
	end
	
-- Weapons Right
	local str = GetRandomNumber()
	if str <= 0.02 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW21" )
	elseif str <= 0.04 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW22" )
	elseif str <= 0.06 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW23" )
	elseif str <= 0.08 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW24" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW25" )
	elseif str <= 0.12 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW26" )
	elseif str <= 0.14 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW27" )
	elseif str <= 0.16 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW28" )
	elseif str <= 0.18 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW29" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW30" )
	elseif str <= 0.22 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW31" )
	elseif str <= 0.24 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW32" )
	elseif str <= 0.26 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW33" )
	elseif str <= 0.28 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW34" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW35" )
	elseif str <= 0.32 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW36" )
	elseif str <= 0.34 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW37" )
	elseif str <= 0.36 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW38" )
	elseif str <= 0.38 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW39" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW40" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_CHW42" )
	end
	
-- Ranged Weapons
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_CreateAHero_SubClass_0" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_CreateAHero_SubClass_1" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_CreateAHero_SubClass_2" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_CreateAHero_SubClass_3" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_CreateAHero_SubClass_4" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_CreateAHero_SubClass_5" )
	elseif str <= 0.70 then 
	ObjectGrantUpgrade( self, "Upgrade_CreateAHero_SubClass_6" )
	end	
	
 -- Skins
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_01" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_02" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_03" )
	elseif str <= 0.80 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_04" )
	elseif str <= 1.00 then 
	ObjectGrantUpgrade( self, "Upgrade_Armor_07" )
	end 
	
 -- Boots
	local str = GetRandomNumber()
	if str <= 0.05 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute01" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute02" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute03" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute04" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute05" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute06" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute07" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute08" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute09" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute10" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute11" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute12" )
	end 
	
 -- Chest
	local str = GetRandomNumber()
	if str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_ArmorAttribute01" )
	end 
	
 -- Gauntlets Left
	local str = GetRandomNumber()
	if str <= 0.05 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute01" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute02" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute03" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute04" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute05" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute06" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute07" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute08" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute09" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute10" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute11" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute12" )
	end 
	
 -- Gauntlets Left
	local str = GetRandomNumber()
	if str <= 0.05 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute13" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute14" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute15" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute16" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute17" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute18" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute19" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_VisionAttribute20" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_Uruk_CHSP01" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_Uruk_CHSP02" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_Uruk_CHSP03" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_Uruk_CHSP04" )
	end 
	
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.05 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute01" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute02" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute03" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute04" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute05" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute06" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute07" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute08" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute09" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute10" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute11" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_DamageMultAttribute12" )
	end 
	
 -- Helmets
	local str = GetRandomNumber()
	if str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_SHLD_01" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_SHLD_02" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_SHIELD_1OG" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_SHIELD_2OG" )
	end
	
 -- Shoulderpads Left
	local str = GetRandomNumber()
	if str <= 0.05 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute01" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute02" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute03" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute04" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute05" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute06" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute07" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute08" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute09" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute10" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute11" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute12" )
	end 
	
 -- Shoulderpads Right
	local str = GetRandomNumber()
	if str <= 0.05 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute13" )
	elseif str <= 0.10 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute14" )
	elseif str <= 0.15 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute15" )
	elseif str <= 0.20 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute16" )
	elseif str <= 0.25 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute17" )
	elseif str <= 0.30 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute18" )
	elseif str <= 0.35 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute19" )
	elseif str <= 0.40 then 
	ObjectGrantUpgrade( self, "Upgrade_AutoHealAttribute20" )
	elseif str <= 0.45 then 
	ObjectGrantUpgrade( self, "Upgrade_CorruptedMan_1_CHSP01" )
	elseif str <= 0.50 then 
	ObjectGrantUpgrade( self, "Upgrade_CorruptedMan_1_CHSP02" )
	elseif str <= 0.55 then 
	ObjectGrantUpgrade( self, "Upgrade_CorruptedMan_1_CHSP03" )
	elseif str <= 0.60 then 
	ObjectGrantUpgrade( self, "Upgrade_CorruptedMan_1_CHSP04" )
	end 
	
end

function OnSpecialMercenaryGenericEvent(self,data)

	local str = tostring( data )

	--if ObjectHasUpgrade( self, "Upgrade_maceL" ) == 1 then
		if str == "show_macea" then
			ObjectHideSubObjectPermanently( self, "MACEL", true )
			ObjectShowSubObjectPermanently( self, "MACELA", true )
		elseif str == "hide_macea" then
			ObjectHideSubObjectPermanently( self, "MACELA", true )
			ObjectShowSubObjectPermanently( self, "MACEL", true )
		end
	--end
	
	--if ObjectHasUpgrade( self, "Upgrade_maceR" ) == 1 then
		if str == "show_macea" then
			ObjectHideSubObjectPermanently( self, "MACER", true )
			ObjectShowSubObjectPermanently( self, "MACERA", true )
		elseif str == "hide_macea" then
			ObjectHideSubObjectPermanently( self, "MACERA", true )
			ObjectShowSubObjectPermanently( self, "MACER", true )
		end
	--end
	
	--if ObjectTestModelCondition(self, "WEAPONSET_RAMPAGE") then
end
