It really depends upon what you are setting this up for, for instance, if you are setting this up for a Server Module, then it's best to use a token, which is something the PC carries (and cannot drop), and just store variables on that, whenever you have finished setting the variable, optionally you can export the (single) character.. (Though this is a bad idea & usually not necessary, unless you check to see if the PC is polymorphed first, as polymorphed creatures get annoyed by the Export Character Function)
Basically you would want to store (whether on the token or in the database) a variable with the name of the NPC & then set the NODE # they are on, e.g. at each interval in the conversation, set that the PC has indeed read the line by settings the NODE that they are on, e.g., if on line 5, set it to NODE 5 (meaning they have read line 5, etc).
If the NPC has no node stored for the NPC, obviously they would NOT have talked to them before! This way you can keep track of WHO they have talked to,and how far along they are in EACH & EVERY conversation...
However you decide to keep set/track variables is your call, for variables are, by all means, very complex & simple at the same time, they can store information in a wide array of ways, meaning you can use larger numbers to dictate which NPC they have talked to, like 1010 would mean they have talked to the first NPC and are on NODE 10 in that converation.. 2005, would mean they have talked to the 2nd NPC and are on NODE 5 in that conversation... However that may not fit your system, so I just threw it out there to help you understand the power of variables & the various ways they can be used.
//This only works for Multi-Player modules!
object oToken = GetObjectPossessedBy(oPC, "tagname");
GetLocalInt(oToken, "NPCTAGNAME");
//This works for ANY Type of module..
GetCampaignInt("NPC_CONVERSATIONS", "NPCTAGNAME", oPC);
I would use Integers / strings / floats, not Objects...
Objects stored in the database usually have rather large amounts of information stored in the database, like what is in their inventory (if they have one) & all the variables on those items, age / sex/ race /etc /etc...
I hope that helped you some...
Modifié par _Guile, 21 septembre 2011 - 06:16 .