use enum for this
also, do not use DoCast(uint32) method, it is not meant for scripts like this one (its for the crappy default ais)