HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A very embarassing question: Item types

05-23-2006, 01:33 PM#1
buttoxide
What do you type in JASS to set an item-type? (Not item-class which is Purchasable, Permanent etc.)
the script local itemtype = GetItemTypeId(GetManipulatedItem()) apparently doesn't work. It seems that in jass, itemtype = item-class in the world editor. Apparently itemcode (taken from the variable editor of the WE as well) doesn't work too.
05-23-2006, 02:01 PM#2
Sharingan
There are no embarassing questions...
ok, unless you ask ...***...>_<
Abilitycodes and itemcodes like 'I00I' are seen as Integers...
05-23-2006, 02:01 PM#3
blu_da_noob
There are two things you could be looking for here.

Item type:
Collapse JASS:
local itemtype = GetItemType(GetManipulatedItem())

Item type ID:
Collapse JASS:
local integer = GetItemTypeId(GetManipulatedItem())
(ID's are integer values; the 'A000' codes)
05-24-2006, 10:05 AM#4
buttoxide
Rep up for blu_da_noob! I was looking for the latter, thanks alot!
05-24-2006, 12:28 PM#5
iNfraNe
For the future, just check out the native and see what it returns.
Collapse JASS:
native GetItemType takes item whichItem returns itemtype
native GetItemTypeId takes item i returns integer
There you can instantly spot which type you should use :)