Full Version : Problem with quest NPC
xmlspawner >>Q&A >>Problem with quest NPC


<< Prev | Next >>

xlilcasper- 10-25-2006
Here's the issues, everything works fine for her giving the quest, you can go out and compleate it, then come back. The problems are when you return to her, she tries to give you the quest again about 95% of the time. the other 5% she gives you the gold but doesn't take the questholder item from you. Heres what I got.

CODE

<?xml version="1.0" standalone="yes"?>
<XmlQuestNPC>
 <NPC>
   <Name>Azalia</Name>
   <Running>True</Running>
   <ProximityRange>3</ProximityRange>
   <NoTriggerOnCarried>Visit 5 Shrines</NoTriggerOnCarried>
   <AllowGhost>False</AllowGhost>
   <SpeechPace>10</SpeechPace>
   <ResetTime>1</ResetTime>
   <ConfigFile>Azalia</ConfigFile>
   <SpeechEntries>6</SpeechEntries>
 </NPC>
 <SpeechEntry>
   <EntryNumber>10</EntryNumber>
   <ID>10</ID>
   <Text>Hello there.</Text>
   <DependsOn>-1</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <IgnoreCarried>False</IgnoreCarried>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>20</EntryNumber>
   <ID>20</ID>
   <Text>Greetings</Text>
   <DependsOn>-1</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <IgnoreCarried>False</IgnoreCarried>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>30</EntryNumber>
   <ID>30</ID>
   <Text>Have you seen the places around the world?</Text>
   <DependsOn>10,20</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <IgnoreCarried>False</IgnoreCarried>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>40</EntryNumber>
   <ID>40</ID>
   <Keywords>no</Keywords>
   <DependsOn>30</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>False</LockConversation>
   <IgnoreCarried>False</IgnoreCarried>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Azalia,3/I've always wanted to see the many shrines around the world. Could you visit them and come back and tell me about them?</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>50</EntryNumber>
   <ID>50</ID>
   <Text>Oh how wounderful.</Text>
   <Keywords>accept</Keywords>
   <Action>GIVE/&lt;questholder/name/Visit 5 Shrines/objective1/Visit the shrine of Honor/objective2/Visit the shrine of Humility/objective3/Visit the shrine of Sacrifice/objective4/Visit the shrine of Justice/objective5/Visit the shrine of Spirituality/repeatable/false</Action>
   <DependsOn>40</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>False</LockConversation>
   <IgnoreCarried>False</IgnoreCarried>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>60</EntryNumber>
   <ID>60</ID>
   <Text>Thank you! Your adventures sound great.</Text>
   <Action>GIVE/Gold,500; TAKE/Visit 5 Shrines</Action>
   <Condition>GETONCARRIED,Visit 5 Shrines,questholder,iscompleted=true</Condition>
   <DependsOn>-1</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>False</LockConversation>
   <IgnoreCarried>True</IgnoreCarried>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
</XmlQuestNPC>


ArteGordon- 10-25-2006
hmm, it looks fine.

I would try loading it up again on a fresh npc. It sounds like there was a problem with matching the name assigned to the questholder with the name specified in the NoTriggerOnCarried and TAKE strings. If they dont match exactly then it would give you that kind of behavior.
Perhaps you were testing a version that wasnt exactly what you posted because the .npc file that you posted looks like it has the correct strings and so it should work.
I copied it and tested the quest several times with no problem.

Vladimir- 10-25-2006
Just something I noticed... In Entry 50 where you hand out the questholder... you don't specify autoreward/false... surely when you have completed the 5 objectives the quest book will be deleted, and therefore when you return to the NPC, your condition check of GETONCARRIED,Visit 5 Shrines,questholder,iscompleted=true will return false.. and not give the reward. Instead it will give you the quest again, because you do not have the quest book?


2nd Problem:
Your line reads "GIVE/Gold,500; TAKE/Visit 5 Shrines"

I'm not sure if it really matters... but try adding a space between GIVE/gold,500 and your ;

so that the line reads GIVE/Gold,500 ; TAKE/Visit 5 Shrines

Just some of my thoughts smile.gif hope it helps

ArteGordon- 10-26-2006
The autoreward flag should be false by default so it should be ok if you dont explicitly set it.
Spaces before or after the ; should also not be necessary but it doesnt hurt to add them.

xlilcasper- 10-29-2006
Well i've respawned the questnpc several times now and she still acts funny. Doing the same thing. Gives the quest, you compleate, gives you the quest again, then you can turn in the book.

Vladimir- 10-29-2006
Hmm try this...

At the top of the GUMP, put the name of the quest book in the NoTriggerOnCarried bar
ie Visit 5 Shrines

Then change the depends on field for entries 10 and 20, to -2 instead of -1

That should stop the NPC giving you the quest if you are already carrying the book

ArteGordon- 10-30-2006
are you possibly carrying more than one copy of the questbook with that name?