Full Version : Problem with XMLQuestNPCs
xmlspawner >>Q&A >>Problem with XMLQuestNPCs
<< Prev | Next >>
Ranma@Bardock- 10-24-2007
Hi there,
I've created an XmlQuestNpc and configured it further for providing a quest. But there are some things I need to know to complete it.
At first something about the use of xmledit in this little Problem:
The Npc talks to a player and asks him if he can harvest some wood for gold, if the player accept, then a Questbook is created in his backpack.
After that, the Npc should emote one last time, I tried it as it is explained here: http://xmlspawner.15.forumer.com/index.php?showtopic=520 but it didn't work.
The last emote isn't active, cause the player have the Questbook in his backpack at this time, which is mentioned at NoTriggerOnCarried.
Is there a Way, how I can give it to the player and get the emote?
Then I got a second question: if I want to make this Quest with more then one step (like if the first task is completed, the questbook changes it's description and provide new tasks) and let this happen (as well as giving the reward) only at interacting with an NPC,
how can I do it?
Is there a tutorial for this, cause I couldn't find one.
Thanks in advance for your help
ArteGordon- 10-25-2007
you could either give out the questbook in the entry with the emote instead of the one before it, or you could just check the 'IgnoreCar' box for the emote dialog entry which will make it ignore the TriggerOnCarried settings.
To change questholder objectives in an xmldialog entry, you can just set the objectives and descriptions manually in an Action field with things like
SETONCARRIED,yourquest,questholder/objective3/COLLECTNAMED,slime ring,goldring/description3/Get the ring from the green slime/addjournalentry/A new objective:You have been asked to complete another objective
which would add a 3rd objective, give it a description, and add a journal entry for it. You would substitute 'yourquest' with the name of your questholder.
To trigger such an entry only after they had completed the other objectives, you could set the Condition field for the entry to test for their status like
GETONCARRIED,yourquest,questholder,completed1=true & GETONCARRIED,yourquest,questholder,completed2=true
that way the dialog entry could only be triggered if they had the questholder and had completed the first two objectives.
Ranma@Bardock- 10-25-2007
Much Thanks to you
But I fear, that I have some more questions now
I've only used SETONCARRIED with XMLSpawner, so i wondered, if it's possible to use this (for changing the Questtasks as well as Description) with a QuestNPC, most likely the same who started the Quest?
Normally I used NoTriggerOnCarried with my QuestNPCs, so maybe it is possible to delete the Questholder with a XmlSpawner, but I don't know how to start a new Dialog with the Npc.
What I mean is: if the player completed the Quest and I want to start a new Dialog then, how could I possible do that?
ArteGordon- 10-25-2007

QUOTE (Ranma@Bardock @ October 25, 2007 10:48 am)
Much Thanks to you But I fear, that I have some more questions now I've only used SETONCARRIED with XMLSpawner, so i wondered, if it's possible to use this (for changing the Questtasks as well as Description) with a QuestNPC, most likely the same who started the Quest?
Normally I used NoTriggerOnCarried with my QuestNPCs, so maybe it is possible to delete the Questholder with a XmlSpawner, but I don't know how to start a new Dialog with the Npc.
What I mean is: if the player completed the Quest and I want to start a new Dialog then, how could I possible do that?

yes, you can the same keywords that work in a spawner entry, such as SETONCARRIED, in the Action field of an xmldialog entry.
To have different dialog depend on the state of a quest (like completing it or completing certain objectives), you would have branching entries that each have a different Condition test.
Think of the dialog tree with a branching point where each branch is followed depending on the state of a quest.
So you can use the Condition tests in individual dialog entries to control branches instead of the TriggerOnCarried test that basically just controls the entire dialog tree.
For example, leave the TriggerOnCarried empty and add entries like
Entry 10
DependsOn = -1
Text = Greetings
Entry 15
DependsOn = 10
Text = I have a task for you. Complete it and return.
Condition = ~GETONCARRIED,MyQuest,questholder,visible=true
Action = GIVE/<questholder/name/MyQuest/objective1/KILL,orc>
Entry 20
DependsOn = 10
Text = I see you have completed the first objective. I have something else for you.
Condition = GETONCARRIED,MyQuest,questholder,completed1 = true & GETONCARRIED,MyQuest,questholder,completed2 = false
Entry 30
DependsOn = 20
Text = I want you to kill troll
Action = SETONCARRIED,MyQuest,questholder/objective2/KILL,troll
Entry 80
DependsOn = 10
Condition = GETONCARRIED,MyQuest,questholder,completed2 = true
Text = You passed the second test. Now to complete the quest.
Entry 90
DependsOn = 80
Text = I want you to kill a daemon
Action = SETONCARRIED,MyQuest,questholder/objective3/KILL,daemon
Entry 100
DependsOn = 10
Text = You have completed the quest. Here is your reward
Condition = GETONCARRIED,MyQuest,questholder,completed3 = true
Action = GIVE/ARMOR,3,4 ; SETONCARRIED,MyQuest,questholder/dodelete
This will set up four branches, that fork depending on whether you have just started, or completed the first, 2nd, or third quest objective.
The starting branch is 10,15
The second branch is 10,20,30
The third is 10,80,90
The final is 10,100
Note that the first condition test in entry 15 tests to see whether the player actually has a questholder by that name so that you only start things out when you dont have the questholder yet.
The second branch will be followed if you have done the first objective but not the second
The third will be followed if you have done the second objective but not the third.
The final is followed if you have done the third and it gives out the reward and deletes the questholder.
If you wanted to have an entirely new branch that was only activated if the player had previously completed the first quest, for example to give out a completely new quest, you could set it up like
Entry 500
DependsOn = 10
Text = You finished my first task, now I have a new task for you.
Condition = GETONTRIGMOB,[ATTACHMENT,xmlquestattachment,MyQuest,deleted]=false
Action = GIVE/<questholder/name/MyNextQuest/objective1/KILL,dragon>
and then you would probably want to add a test to the first branch so that it would only be followed if they did not currently have the quest AND had not done the quest before, like this
Entry 15
DependsOn = 10
Text = I have a task for you. Complete it and return.
Condition = ~GETONCARRIED,MyQuest,questholder,visible=true & ~GETONTRIGMOB,[ATTACHMENT,xmlquestattachment,MyQuest,deleted]=false
Action = GIVE/<questholder/name/MyQuest/objective1/KILL,orc>