Aller au contenu

Photo

Quest reminder?


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Who said that I

Who said that I
  • Members
  • 492 messages

okay I got a little issue here.... The whole quest is persistent however the quest can be "restarted" when I restart the module and that was not my intent for this so am hoping someone could help me get this fixed...

 

here is my quest entry script:

 

NPC: Hello would you like to deliver these items?

Text appears when:

int StartingConditional()
{
int nShow = !GetLocalInt(OBJECT_SELF, "p026began");
return nShow;
}

 

 

PC says: Sure!
 
NPC:  Grand! Here are the items have fun now!

Onaction tab

 

#include "nw_i0_plotwizard"
#include "pqj_inc"
void main()
{
    // Set the variables
    SetLocalInt(GetPCSpeaker(), "p026state", 100);
// Get the PC who is in this conversation.
    object oPC = GetPCSpeaker();
 
    // Update the player's journal.
    AddPersistentJournalQuestEntry("p026", 1, oPC, FALSE);
}

 

 

idea of the quest: 
okay so the npc asks if the pc is willing to deliver some items to several NPC's throughout the city. though the pc keeps getting the welcome/questgive option the second time you speak to the NPC. how do I fix this?


#2
Thayan

Thayan
  • Members
  • 244 messages

Variables stored on a PC don't remain over a server reset. You'll either need to give all your PCs an undroppable item and store the variable on that item, or else use the Set/GetCampaignInt variables that stores the variable in a database.



#3
meaglyn

meaglyn
  • Members
  • 804 messages

Some of those variables aren't stored on the PC either, but the NPC.  That also means multiple players can get odd results.  The StartingConditional for example...

 

Also you have a p06state variable you are tracking in parallel to setting the journal entry for p026 using persistent journals. You could just read the persisted journal entry variable on the PC which will be named  "NW_JOURNAL_ENTRYp026"  (e.g.  "NW_JOURNAL_ENTRY"  + quest tag). That would be persisted with the pqj stuff without dealing with persisting additional PC variables (unless you have states you need that are not represented by actual journal entries).



#4
Who said that I

Who said that I
  • Members
  • 492 messages
Okay well will try it out.

#5
Baaleos

Baaleos
  • Members
  • 1 322 messages
The variable names are also different - not sure if thats intentional.
Also - yeah, one sets the variable on the player, the other on the NPC.
int StartingConditional()
{
int nShow = !GetLocalInt(OBJECT_SELF, "p026began");
return nShow;
}
 

#include "nw_i0_plotwizard"
#include "pqj_inc"
void main()
{
    // Set the variables
    SetLocalInt(GetPCSpeaker(), "p026state", 100);
// Get the PC who is in this conversation.
    object oPC = GetPCSpeaker();
 
    // Update the player's journal.
    AddPersistentJournalQuestEntry("p026", 1, oPC, FALSE);
}


The reason you keep getting the same dialogue option/response is because you are looking for 
p026began
 
However, the onAction script is setting p026state to 100
It is never touching p026began
 
Perhaps im over simplifying it?


#6
Who said that I

Who said that I
  • Members
  • 492 messages
The variable names are also different - not sure if thats intentional.
Also - yeah, one sets the variable on the player, the other on the NPC.
int StartingConditional()
{
int nShow = !GetLocalInt(OBJECT_SELF, "p026began");
return nShow;
}
 

#include "nw_i0_plotwizard"
#include "pqj_inc"
void main()
{
    // Set the variables
    SetLocalInt(GetPCSpeaker(), "p026state", 100);
// Get the PC who is in this conversation.
    object oPC = GetPCSpeaker();
 
    // Update the player's journal.
    AddPersistentJournalQuestEntry("p026", 1, oPC, FALSE);
}


The reason you keep getting the same dialogue option/response is because you are looking for 
p026began
 
However, the onAction script is setting p026state to 100
It is never touching p026began
 
Perhaps im over simplifying it?

 

the only reason I kept that began line was to prefent the quest of breaking (or mainly I was afraid it would break). I broke the quest once before by tinkering with it hence why I kept it all.



#7
Who said that I

Who said that I
  • Members
  • 492 messages

okay got it to work thanks guys! :D