Skip to content

Creatures ​

Creatures functions.

IS_ITEM_ON_CREATURE action ​

Returns 1 if the creature has the item, 0 if not, -1 if the creature is not in the game.

INT_VARDescriptionTypeDefault
logPrint the resultboolFalse
warnWarn if the creature is in the game but doesn't have the itemboolFalse
STR_VARDescriptionTypeDefault
creaturecreature resourceresrefrequired
itemitem resourceresrefrequired
ReturnDescriptionType
presentdoes the creature possess the item?int

REPLACE_CRE_ITEM_MATCH patch ​

Replaces each occurrence of match_item with new_item. Doesn't change charges, flags, etc. Does nothing if match_item wasn't found.

STR_VARDescriptionTypeDefault
match_itemold itemresrefrequired
new_itemnew itemresrefrequired