Aller au contenu

Photo

Scripting Question


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
What does the GetItemType function do? I can't get into the Toolset Wiki right now to try looking it up there. Does this function tell the game to call a specific Base Type?  If so, how would it be used/referenced in the script?

#2
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
Not documented in the wiki. There is a GetItemMaterialType but no GetItemType. Doesn't necessarily mean it don't exist, just that it isn't documented yet if it does.

#3
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Oh, it definitely exists, I'm looking right at it in the Toolset script editor.

#4
Phaenan

Phaenan
  • Members
  • 315 messages
« Returns the type an item belongs to (e.g. ITEM_TYPE_WEAPON_RANGED) from BITEM_base.xls, column "Type" »

And those constants are :

ITEM_TYPE_INVALID

ITEM_TYPE_MISC

ITEM_TYPE_WEAPON_MELEE

ITEM_TYPE_SHIELD

ITEM_TYPE_ARMOUR

ITEM_TYPE_WEAPON_MAGIC

ITEM_TYPE_WEAPON_RANGED

ITEM_TYPE_AMMO

ITEM_TYPE_RUNE



Not sure why it's here since GetBaseItemType() would be enough, but still, it works. :o

#5
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Ok, so all it does is report something back, it doesn't actually tell the game to use something.

#6
Sunjammer

Sunjammer
  • Members
  • 925 messages

Ambaryerno wrote...

What does the GetItemType function do? I can't get into the Toolset Wiki right now to try looking it up there. Does this function tell the game to call a specific Base Type?  If so, how would it be used/referenced in the script?

In the toolset go to View > Other Windows > Help Window.  Now click on GetItemType in the function palette or double click on it in your script.

#7
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Thanks Sun, that's going to be a BIG help figuring out this whole scripting thing.