Giving a NPC an object in a dialog

Started by deedee, Sat 28/02/2004 15:30:56

Previous topic - Next topic

deedee

Let me explain first: My character is gathering some items for another character. I have managed to make the dialog options appear (when he has the specified object) saying that he has the item and he is giving it to the NPC.
I want a reaction from the NPC when all items are in his inventory (the NPC's inventory)... but i can't find a way to add an inv item to the NPC's inventory in the dialog scripting.

Any ideas?
There can be only one.

RickJ

In the dialog you can do a "Run Script Command".  This will trigger an event handler to run in the global scriopt file.  Check the help file to see how to do this.

In the global script file just do the following to give the NPC one of the inventory-1 objects.  

character[NPC].inv[1] = 1;  


deedee

i managed to add the run-script and all that... but i have a doubt on that script line you wrote: What do those numbers mean? wich one is the inventory item number; and what does the other stand for?


tnx
There can be only one.

Fabiano

NPC is the npc's name
.inv[1] means the object 1
= 1 means true
so
character[NPC].inv[1]=1 means
the NPC has the object 1
Yeah, yeah, It happens. A lot.

SMF spam blocked by CleanTalk