Shared function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version:

Function gets item name (instance) by it's id. Items must be registered in items.xml file, in order to be able to, for example: give item for specifc player.

NOTE! After server restart, every item does have different id. The id is the same on both sides. You should only use item id in functions, not in save eq, etc.


string or null id)

Required Arguments

  • id: The item id.


  • string or null: string if item is registered in items.xml, otherwise null.


	local itemId ="ITMI_GOLD"))
        local itemName = // dummy example
	print(itemName); // it will print ITMI_GOLD

Related functions