Selling items by player¶
Engine restrictions
It's only available for Gothic 2 Addon (G2A)!
This hook is triggered whenever the player tries to sell an item to an NPC during a trade.
It extends the default trading system by allowing script conditions to decide whether an item can be sold.
When the player attempts to sell an item, the hook looks for the following Daedalus function: zDExt_Npc_CanPlayerSellItem defined in Scripts/Content directory.
player– player selling the itemtrader– NPC receiving the itemitm– item being soldreturn–FALSE(zero) to block the action;TRUE(nonzero) to allow it. If the script call fails, the action is allowed and the failure is logged.