Code: Select all
ACTOR WeaponUpgrade : CustomInventory
{
//	+AUTOACTIVATE
	+ALWYASPICKUP
	+INVBAR
	Inventory.PickupMessage "You shouldn't see this message."
	Inventory.Amount 1
	Inventory.MaxAmount 10
	States
	{
	Spawn:
		TNT1 A -1
		Stop
	Pickup:
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 1, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 2!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("FullHealth", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 2, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 3!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 3, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 4!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("FullHealth", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 4, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 5!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 5, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 6!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("FullHealth", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 6, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 7!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 7, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 8!") 
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("FullHealth", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 8, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 9!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
		Goto Pickup+36
		TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 9, 4)
		TNT1 A 0 A_Print("You gained a level!  You are now at level 10!") 		
		TNT1 A 1 A_PlaySound("misc/levelup")
		TNT1 A 0 A_GiveInventory("FullHealth", 1)
		
		TNT1 A 1 A_GiveInventory("LevelCounter2", 1)
		Stop
	}
}

