From Divinity Engine Wiki
- call CharacterSetCanTrade((CHARACTERGUID)_Trader, (INTEGER)_Bool)
Enables player-initiated trades during dialogues with _Trader if _Bool is 1, otherwise disables them. Player-initiated trades are started by the player clicking on the trade icon or pressing the appropriate button on the controller.
- Regardless of this setting, script can always still open the trading interface (e.g. in response to a certain dialogue choice).
- Changing this setting for a character while it is already in a dialogue is supported and will adapt its trade setting on-the-fly.