Author Topic: NPC Gives PC Item During Convo  (Read 363 times)

Legacy_Souldry

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
NPC Gives PC Item During Convo
« on: July 03, 2011, 06:22:54 pm »


               Hey, can anyone help me out with a script that enables the npc to give the pc a item during the convo? Thank you
               
               

               
            

Legacy_Bazilbrush

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #1 on: July 03, 2011, 07:50:39 pm »


               What is the resref of the item you wish to give?
               
               

               
            

Legacy_Snarkblat

  • Full Member
  • ***
  • Posts: 104
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #2 on: July 03, 2011, 08:04:44 pm »


               There's a fairly simple way to give/take away items using the NW script wizard in the toolset...  you can find it under the "actions taken" section in the conversation node.

If memory serves, it should look something like this:

//Put this on action taken in the conversation editor
void main()
{

object oPC = GetPCSpeaker();

CreateItemOnObject("blueprint_of_item_goes_here", oPC);

}
               
               

               


                     Modifié par Snarkblat, 03 juillet 2011 - 09:36 .
                     
                  


            

Legacy_Souldry

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #3 on: July 03, 2011, 10:13:22 pm »


               does the npc have to have the item in his inventory?
               
               

               
            

Legacy_Bazilbrush

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #4 on: July 03, 2011, 10:17:46 pm »


               No he doesn't, it is automatically put into the player's inventory.
               
               

               
            

Legacy_Souldry

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #5 on: July 03, 2011, 10:34:41 pm »


               I copied and pasted the script into actions taken and its not working
               
               

               
            

Legacy_Snarkblat

  • Full Member
  • ***
  • Posts: 104
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #6 on: July 03, 2011, 10:35:49 pm »


               Oh, my bad. It should be the blueprint of the item, not the tag. It's case sensitive too. Make sure the blueprint in the script matches the one in your palatte.
               
               

               
            

Legacy_Bazilbrush

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #7 on: July 03, 2011, 10:37:19 pm »


               Try this one, you need to put the resref of your item in between the quotes.


void main()
{

object oPC = GetPCSpeaker();

CreateItemOnObject("resref of item", oPC);

}
               
               

               
            

Legacy_Souldry

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
NPC Gives PC Item During Convo
« Reply #8 on: July 04, 2011, 01:53:24 am »


               lol my bad you guys are right haha thanks a lot guys