*getequipcardid(<equipment slot>,<card slot>)
Returns value from equipped item slot in the indicated slot (0, 1, 2, or 3).
This function returns CARD ID, 255,254,-255 (for card 0, if the item is produced).
It's useful for when you want to check whether an item contains cards, enchantments or if it's signed.
Use the script command above to retrieve enchantment id from a card slot and compare it to your conditions.