Wolfzomby Posted March 19, 2015 Share Posted March 19, 2015 To all modders willing and able to help: I am currently working on a simple quest mod to practice my modding abilities and I've been going through some tutorials on YouTube to help with papyrus scripting. I've also been looking at the wiki and while papyrus is similar to java, it's different enough and too new (to me) for me to completely comprehend overnight. Essentially, what I want to happen is this: 0 - quest has not begun10 - an NPC asks for a letter to be delivered to another NPC, player agrees, and quest stage advances.20 - Player delivers letter to recipient NPC and quest progresses to stage 20 and ends so far, I understand how to advance the quest through dialog and I am working with the scripts for the recipient NPC (the tutorial I was looking at involved his NPC dying to advance the quest). This is the code I have so far: Event OnDeath(Actor killer) //This is the wrong event heading. I do not know what I need in place of this. zabamundSabineQuestProperty.SetObjectiveDisplayed(20) zabamundSabineQuestProperty.SetStage(20)EndEvent Any advice and help (other than RTFM) is appreciated. Until then, I will continue to look for answers. Thank you very much. -Wolfzomby Link to comment Share on other sites More sharing options...
Mattiewagg Posted March 19, 2015 Share Posted March 19, 2015 What are you trying to have the event be? When the NOC speaks to you? Link to comment Share on other sites More sharing options...
Wolfzomby Posted March 19, 2015 Author Share Posted March 19, 2015 Yes. When you open dialogue with the recipient NPC, it'll be like "Here's a letter for you." and the letter then leaves your inventory, reaction dialogue and then the quest is over. Link to comment Share on other sites More sharing options...
Mattiewagg Posted March 19, 2015 Share Posted March 19, 2015 That doesn't require an event. You simply put the code that would be in the event WITHOUT THE EVENT in the END part of the response (you'll find the End box in the Info window containing your NPC responses). You'll first have to put in a ; then close the window with ok, then reopen it and then paste in your script or else you won't be able to fill properties. Link to comment Share on other sites More sharing options...
Wolfzomby Posted March 19, 2015 Author Share Posted March 19, 2015 I see. Then what is the command to force add/remove the letter from the player's inventory? I feel that the Giving NPC must have it in his inventory in order to give it. I feel it would be a function/method along the lines of Player.addItem(letter) and then Sabine.additem(letter) but then it seems there will be two copies of the letter floating around. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 19, 2015 Share Posted March 19, 2015 When giving item to player and item is not on NPC: Player.AddItem(TheItem) When giving item to player and item is on NPC: TheNPC.RemoveItem(TheItem,Quantity,true,Player) When taking item from player: Player.RemoveItem(TheItem) If you want the item to be on the NPC after taking it from the player (perhaps for realism) Player.RemoveItem(TheItem,Quantity,false,TheNPC) Be sure to replace the psuedo variables with what you actually use. Link to comment Share on other sites More sharing options...
Wolfzomby Posted March 20, 2015 Author Share Posted March 20, 2015 Awesome. Thank you. I will get on that now. Link to comment Share on other sites More sharing options...
Recommended Posts