Item type is a distinct artificial (artificial being fake) type in GUI : \. As for converting between the artificial item type and integer in GUI, you can always save it in a hashtable and load it as w/e.
Also, I didn't understand what you were asking, so I simply guessed : p.