Full Version : Quest allocation
xmlspawner >>Q&A >>Quest allocation


<< Prev | Next >>

bubzy1000- 02-07-2006
Ill try to explain what i want to know.

I have a lot of quest npcs, that players can trigger at the moment, pretty much whenever they like, however some of the npcs give out some meaty rewards (not too meaty tho) is it possible to give a quest out to a player only once in like every seven days, but for it still to be available to other players? does the timer already do this? ty.

ArteGordon- 02-07-2006
yes, that is what the 'repeatable' timer does. Just set the NextRepeatable property on the quest to set the timer.

from xmlspawner2.txt

QUOTE

- added support for flagging quests as either non-repeatable, or repeatable but only after some time period.  If the Repeatable property is set to false on a questholder or questnote item, when the quest is completed and deleted, the player will be given a quest attachment (XmlQuestAttachment)  that will flag the player as having completed the quest.  If the Repeatable property is set to true (the default) and the NextRepeatable property is set to a TimeSpan value, then the attachment will be set to expire after that time.  As long as the XmlQuestAttachment with the quest name is attached to the player, objectives for that quest cannot be completed. The quest can still be held by the player and when the attachment expires, the player can then repeat the quest.  Note, staff can add or remove these attachments in-game using [addatt and [delatt to manually control whether specific players can repeat specific quests. The repeatability status of a quest will be shown at the bottom of the quest status gump.
For example spawning a quest as

questholder/name/waitforme/objective1/KILL,orc/autoreward/true/rewardstring/ARMOR,1,2/nextrepeatable/10:00

would make a quest named 'waitforme' with the objective to kill an orc and a random armor auto reward that could only be repeated once every 10 hours.

questholder/name/onlyone/objective1/KILL,balron/autoreward/true/rewardstring/ARMOR,4,5/repeatable/false

would make a quest named 'onlyone' with the objective to kill a balron and a random armor auto reward that could only be done once.



(edit)

note, if you bring up the quest log, it will tell you how long you have to wait until the quest can be repeated again.

Fafnir- 02-28-2006
First let me thank you for an excellent spawner and quest system. I am working on getting quests ready for our shard and I'm learn this bit by bit.

I want a quest to be not repeatable and I set the questholder/repeatable/false. I see that it shows in the quest log as not repeatable and if I talk to the quest npc again, it offers me the quest. It shows in the new questholder that it is not repeatable.

The thing that does not make sense to me is that the quest is offered to the player again. Would it not make more sense to not offer or perhaps say they cannot take it again?

ArteGordon- 02-28-2006
the repeatable status only prevents the quest from being completed again.

If you want to prevent a spawner or npc dialog from being activated once a quest has been completed, you just need to check for the XmlQuestAttachment for that quest.

For example, you can add the following check to your NoTriggerOnCarried property on the spawner or XmlDialog (look in the [xmledit gump).

ATTACHMENT,yourquestname,XmlQuestAttachment

from xmlspawner2.txt
QUOTE

- spawner triggering can be made dependent upon attachments on the triggering mob by using the "ATTACHMENT,name,type" string in the TriggerOnCarried or NoTriggerOnCarried properties.  This will make triggering dependent on attachments on the mob, or an attachment on an item equipped by the mob, or an attachment on an item in the top level of the mobs backpack (see attachtest1.xml for an example).


When you set the Repeatable flag, or set the NextRepeatable property, what happens is that when the quest is completed, an XmlQuestAttachment with the questname is added to the player. If it is repeatable with some minimum time interval set in the NextRepeatable property, then when the time expires, the attachment is automatically removed.

Fafnir- 03-01-2006
Thanks Arte! I'm glad there is a way to do this!

Fafnir- 03-01-2006
OK, I tried that and it does not seem to work. I entered the text in the NoTriggerOnCarried field in my xmledit gump with my questname of course. I am still getting the gump, even though my char shows the completed quest in questlog.

One point of confusion for me, is what to put in my first DependsOn field for my first item. Previously, I had -1 because I wanted everyone to get the initial gump. It makes sense that -1 may not be right if I have a condition, but what does go there?

Edit: I thought I had found the answer with -2, but I still get the gump!

ArteGordon- 03-02-2006
I would guess that this is a spelling or capitalization issue. Post the xml and/or .npc files.

Fafnir- 03-03-2006
Aye, it was a capitalization error!

Vladimir- 04-24-2006
I'm trying to set a NoTrigOnCarried condition so that the quest npc won't tirgger if the quest has already been completed

I have tried adding: ATTACHMENT,Kill the Orc,XmlQuestAttachment but it still triggers

here is my .npc

QUOTE
<?xml version="1.0" standalone="yes"?>
<XmlQuestNPC>
  <NPC>
    <Name>Talia</Name>
    <Running>True</Running>
    <ProximityRange>3</ProximityRange>
    <NoTriggerOnCarried>ATTACHMENT,Kill the Orc,XmlQuestAttachment</NoTriggerOnCarried>
    <AllowGhost>False</AllowGhost>
    <SpeechPace>10</SpeechPace>
    <ResetTime>0</ResetTime>
    <ConfigFile>TaliaCoveForest</ConfigFile>
    <SpeechEntries>8</SpeechEntries>
  </NPC>
  <SpeechEntry>
    <EntryNumber>0</EntryNumber>
    <ID>0</ID>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>10</EntryNumber>
    <ID>10</ID>
    <Text>Hi!</Text>
    <DependsOn>-1</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>20</EntryNumber>
    <ID>20</ID>
    <Text>Greeting traveler!</Text>
    <DependsOn>-1</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>30</EntryNumber>
    <ID>30</ID>
    <Text>Wouldst thou mind helping a troubled lady, brave traveler?</Text>
    <DependsOn>10,20</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>40</EntryNumber>
    <ID>40</ID>
    <Keywords>yes,ok</Keywords>
    <DependsOn>30</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
    <Gump>GUMP,Talia,4/Will you help me restore my trade, whom the Orcs have brought to a standstill?;Ok;ok;Whats in it for me?;money</Gump>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>50</EntryNumber>
    <ID>50</ID>
    <Keywords>ok</Keywords>
    <DependsOn>40,60</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
    <Gump>GUMP,Talia,3/I have lost too much trade to those devilish Orcs. would you help me deal with them? I often lumber for wood in the near-by forest, but as of late it is too dangerous for me because of the Orc that roams there. Will you rid him from those trees good traveler? I will kindly reward you.</Gump>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>60</EntryNumber>
    <ID>60</ID>
    <Keywords>money</Keywords>
    <DependsOn>40</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
    <Gump>GUMP,Talia,4/I can reward you with 200 gold!;Ok;ok;No thanks;No</Gump>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>70</EntryNumber>
    <ID>70</ID>
    <Keywords>accept</Keywords>
    <Action>GIVE/&lt;questholder/name/Kill the Orc/notestring/Kill the orc in the forest/objective1/KILL,orc,1/repeatable/false/autoreward/true/rewardstring/@bag/ADD/gold,200</Action>
    <DependsOn>50</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
</XmlQuestNPC>


What am i doing wrong? :/

ArteGordon- 04-25-2006
remember that any entries with DependsOn set to -1 can be activated by player proximity regardless of the NoTriggerOnCarried settings. If you want banter that will also be sensitive to the NoTriggerOnCarried settings, then use a DependsOn value of -2 instead.