IntToHexString

The   NWScript command converts an integer to a hexadecimal string. A hexadecimal string has the format "0x########" with each (of the eight) '#' being a hexadecimal digit (one of '0' through '9' or 'a' through 'f'), and it is the string representation of an integer in base 16.

This command can be somewhat useful (and simple) when integers need to be converted to a fixed-length string, but it lacks some utility in that there is no reverse command that will convert a hexadecimal string to an integer. It is generally unsuitable for feedback to a player (as few players understand hexadecimal), but it does have some debugging usefulness when dealing with bit fields.