Author Topic: Help needed with quest nd conversation script  (Read 317 times)

Legacy_BrynHexx

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Help needed with quest nd conversation script
« on: January 19, 2011, 12:56:54 pm »


               Ok here is the situation. Dwarf NPC gives the PC a quest to find her missing husband. (thats the easy bit). But how do I get her to say something like "Have you found him yet?", instead of repeating the same conversation? I don't know how to use the StartingConditional function. I have played around with it, but no dice. Im guessing its got something to do with the StartingConditional though. Any help would be appreciated alot!
               
               

               
            

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
Help needed with quest nd conversation script
« Reply #1 on: January 19, 2011, 01:05:39 pm »


               In the ActonTaken tab put this kind of script when the quest is taken



void main()

{

string sTag = GetTag(OBJECT_SELF);

SetLocalInt(GetPCSpeaker(), sTag, 1);

}



In the StartingConditional of the next node of your conversation put this one:



int StartingConditional()

{

string sTag = GetTag(OBJECT_SELF);

if (GetLocalInt(GetPCSpeaker(), sTag) == 1)

return TRUE;

return FALSE;

}



Note that the node with the conditional should be set before the node where the quest is taken in the conversation. Also note that these scripts are generic and can be reused with another npc (as long as their tags are different!)

Good luck!
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Help needed with quest nd conversation script
« Reply #2 on: January 19, 2011, 07:10:18 pm »


               Here is a tutorial on the Lexicon that might help you understand better how to set up the conversation for something like what you want.

www.nwnlexicon.com/compiled/tutorial.asimplequest.html
               
               

               
            

Legacy_BrynHexx

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Help needed with quest nd conversation script
« Reply #3 on: January 19, 2011, 11:19:46 pm »


               Thank you both very much. I Shall try it imediatley.
               
               

               
            

Legacy_zero-feeling

  • Sr. Member
  • ****
  • Posts: 287
  • Karma: +0/-0
Help needed with quest nd conversation script
« Reply #4 on: January 26, 2011, 08:41:28 am »


               easier way... look up pqj on the vault... knats journal system... think lightfoot has it as well as an editor he made for me in his projects too. easiest journal system for persistant worlds in my opinion.



zero



added the file to my projects as well.
               
               

               
            

Legacy_BrynHexx

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Help needed with quest nd conversation script
« Reply #5 on: January 27, 2011, 12:37:28 am »


               Ah i got it fixed with the SetLocalInt, thanks for  the help those folks. But now I have a very big problm. I (against my better judgment) allowed my friends son to have a go at scripting, but I got a lovley suprise when I found out he has over written nw_c2_default4. I waas wondering where I can get the CEP script. I really don't want to re-instal as I have both up to date CEP and PRC haks. I would absolutley hate to redo all that just for a script.so if anybody knows or cold post the CEP 2.3 version, I would be gratley in your debt.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Help needed with quest nd conversation script
« Reply #6 on: January 27, 2011, 12:55:24 am »


               It never really gets overwritten. When you alter one of the default scripts it creates a new script in your list with the same name and acts as an override script but the default still exists in your module. If you don't like what he did to the default then just delete the one he altered from your list and the real default script will take over again.

Hope that makes sense.
               
               

               
            

Legacy_BrynHexx

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Help needed with quest nd conversation script
« Reply #7 on: January 27, 2011, 01:23:57 am »


               FANTASTIC, you da man! Yep, It worked out all good. Thank you. I panicked for a while there. I really appreciate the help Thanx GhostOfGod