A function from MWSE update by Merzasphor.
Returns info about the enchantment on the target item, 0 if no enchantment present. Scrolls are not currently supported.
SyntaxEdit
enchantId (string ref) type (short) cost (short) charge (float) maxCharge (long) numEffects (short) autocalc (long): ref->xGetEnchant
type: 0 = Cast Once, 1 = Cast When Strikes, 2 = Cast When Used, 3 = Constant
autocalc: 0 = off, 1 = on
ExampleEdit
long enchId short type short cost float charge long maxCharge short numEffects long autocalc long target setx target to xGetPCTarget setx enchId type cost charge maxCharge numEffects autocalc to target->xGetEnchant