Create a new goal if you have not done so already, as mentioned in the video tutorial on quest scripts. Here is my goal for my blacksmith, including all of the stuff mentioned here in this post. I did not add an item template yet, but just have the dialog button and such.

INIT:
DB_Dialog(CHARACTER_Town_Blacksmith);
CharacterSetCanTrade(CHARACTER_Player1, CHARACTER_Town_Blacksmith, 1);
CharacterSetCanTrade(CHARACTER_Player2, CHARACTER_Town_Blacksmith, 1);

KB:
IF
DialogStartRequested(_Char, _Player)
THEN
StartDefaultDialog(_Char, _Player);

IF
RequestTrade(_char, _trader)
THEN
ActivateTrade(_char, _trader, 1, 1, 1);

IF
HappyWithDeal(_Player,_Npc,_ValuePlayer,_ValueNpc)
AND
_ValuePlayer >= _ValueNpc
THEN
ExecuteDeal(_Player,1,0);


Edit: So running it in the editor, the only thing I don't see is a message about why I can't do a trade if it's in my favor. But he will accept trades in his favor.

Last edited by Farmer Bob; 02/08/14 08:29 PM.