HookerHeels Posted September 20, 2012 Share Posted September 20, 2012 (edited) I'm currently working on a mod and I need NPC's to give keys, could someone help me on making NPCs that give items after talking to the player? Edited September 20, 2012 by HookerHeels Link to comment Share on other sites More sharing options...
LtMattmoo Posted September 27, 2012 Share Posted September 27, 2012 (edited) I don't know how much help I'm being, but generally the AddItem function is used in, say, a related quest script to grant the player an item during conversation. The NPC saying something like "Here, take this." gives the illusion that the item came from the NPC. If you would rather the NPC had the item in their inventory and actually gave you that item, you could use RemoveItem, which allows you to remove an item from an inventory, then optionally place that item in another specified inventory. In the following line of code, 1 KEY is removed from NPC's inventory and given to the player.NPC.RemoveItem(KEY, 1, false, Game.GetPlayer()) Edited September 27, 2012 by LtMattmoo Link to comment Share on other sites More sharing options...
Recommended Posts