Aller au contenu

Photo

AddItemToInventory


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
ponozsticka

ponozsticka
  • Members
  • 453 messages
 Greetings everyone.
Id like to ask you for help, cause Im trying to create a module and I have never been scripting, nor using C before (thus Im complete dummy).
Heres a thing.
I need to create a script, which I put into conversation, so once NPC will speak the line, a custom item (my own creation) will be put into PCs inventory.

As I mentioned Im complete noob, so Id appriciate, if you could write me whole script, or if theres someone patient enough write me PM and learn me a little about scripting, since Im not able to compile any script at the moment.

Thanks .

#2
sillyrobot

sillyrobot
  • Members
  • 171 messages


void main()

{

CreateItemOnObject( R"yourobject.uti", GetHero(), 1 );

}



is about the minimum you need. This doesn't check f there is space in the inventory, whether the player has already received the object, or for any other illogical situations.