Full Version : Question about setting up quests
xmlspawner >>Q&A >>Question about setting up quests
<< Prev | Next >>
ArteGordon- 01-29-2006

QUOTE (Galfaroth @ Jan 29 2006, 10:37 AM)
Okay now everything works perfect. Great system Arte... I saw many shards with XMLSpawner, but there were no Quest Scripts. It is very easy, but now 6 questions: 1. What are other quest types: KILLNAMED... 2. How to make quest avaliable only one time (we can do it only once by our character)
3. How to make no-autoreward (we go to npc for our reward)
4. How to add props as reward (e.g if we do quest, we will have name Kon)
5. How to trigger quests based on props (e.g if player has swords more than 60 - trigger the dialog.
6. How to make quests already done (marked once-doneable) mark doneable once again (e.g we finished quest x(we can't do it again), we do quest y (as reward we can make again questx)).

- supports the following quest objective types: KILL, KILLNAMED, COLLECT, COLLECTNAMED, ESCORT, GIVE, GIVENAMED
COLLECTNAMED,itemname[,itemtype][,count][,proptest]
COLLECT,itemtype[,count][,proptest]
GIVENAMED,mobname,itemname[,itemtype][,count][,proptest]
GIVE,mobname,itemtype[,count][,proptest]
KILLNAMED,mobname[,mobtype][,count][,proptest]
KILL,mobtype[,count][,proptest]
ESCORT,mobname[,proptest]
2. to make a quest non-repeatable, just set the Repeatable property on the questholder to false.
3. You do not have to set the quests for autoreward. You can use spawners or npcs to give out rewards using the GIVE keyword (note, this is not the same as the GIVE quest objective). There are several example quests that do this, such as katarquest.xml
4. You can use spawners or npcs to set properties on the triggering player with the SETONTRIGMOB keyword
5. See the How-to on the subject http://xmlspawner.15.forumer.com/index.php?showtopic=10
6. Quests are marked non-repeatable by adding an xmlquestattachment with the questname to the player. As long as that player has that attachment, the quest will be blocked. You simply need to change the expiration time of the xmlquestattachment for the quest you wish to unblock.
Galfaroth- 01-29-2006

QUOTE (Galfaroth @ Jan 29 2006, 03:37 PM)
7. How to spawn specific items inside monster's backpack. 8. How to make trigger quest x if we have done quest y and z.

9. How to make delivery quest (we take itemx from one questnpcx and give to questnpcy) and to make giving itemx only one time.
ArteGordon- 01-29-2006
that would be the GIVE type objective.
Galfaroth- 01-29-2006
Okay and:
7. How to spawn specific items inside monster's backpack.
8. How to make trigger quest x if we have done quest y and z.
10.(last) Is it possible to spawn monster visible only for one player (and how to trigger spawn by starting some quest).
ArteGordon- 01-29-2006
1. http://xmlspawner.15.forumer.com/index.php?showtopic=13
8. You would check to see if they had the xmlquestattachments for quest y and z. there is a How to on triggering when you detect attachments
http://xmlspawner.15.forumer.com/index.php?showtopic=28
10. It is possible, but you would need to make a mod to the PlayerMobile CanSee method.
When you hand out a quest, you can also spawn a creature (or do anything else that you want).
Galfaroth- 01-30-2006
The quests can have objectives? How do/can they work?
ArteGordon- 01-30-2006
just set the objective strings on the questholder to things like
KILL,orc,10
to create quest objectives. The objective string properties are numbered like
objective1
objective2
etc.
so if you spawn a questholder and set an objective string like
questholder/objective1/KILL,orc,10/objective2/COLLECT,emerald,10
then it will create a quest with 2 objectives that need to be completed. The first is to kill 10 orcs, the second is to collect 10 emeralds.
Galfaroth- 01-30-2006
Okay and if i have autoreward disabled, how should seems like the action inside XMLQuestNPC (so if player done the quest but didn't took reward, new option in this XMLQuestNPC appears and player can recieve Reward by clicking: I want now my reward (and he can do it only once) ).
ArteGordon- 01-30-2006
you can check to see if the questholder is completed in the Condition field of a dialog entry using a string like
GETONCARRIED,questname,questholder,iscompleted=true
Then you can add a GUMP specification to the Gump field that will pop up a gump.
Then add a separate dialog entry that depends on the gump response to hand out your reward using the GIVE keyword in the Action field.
You probably also want to TAKE the questholder at that point.
Galfaroth- 01-30-2006
Uh yes... As soon as I have some time I will make some useful tutorials for this QuestSystem... At this point I have to make more than 200 quests on my shard (World of Gothic - based on Gothic I the game, but I have staff and I teach them). Arte I never met somebody who can do as great systems as you did. Thanks so lot for your support .
ArteGordon- 01-30-2006
good luck, and feel free to ask questions if you encounter any difficulties.
Galfaroth- 01-31-2006
Okay so three simply questions:
1. here is my action(which gives 200 gold and takes questholder):
GIVE/gold,200,TAKE/Zabij Orka,questholder (doesn't work)
2. how should seem like condition to first entry that player with attachement Zabij Orka(quest) does not trigger the dialog. (e.g. GETATT/Zabij Orka, Quest/!exist->trigger first entry)
3. how to make in action (and how does should seem syntax for this) SETONTRIGMOB/Criminal,true
ArteGordon- 01-31-2006

QUOTE
GIVE/gold,200,TAKE/Zabij Orka,questholder (doesn't work)

the GIVE and TAKE keywords are both what are referred to as 'type' keywords. That is, they are always placed at the beginning of a spawn entry, just like other object 'types' such as mobs or items (e.g. orc or ginseng).
If you were to add them to a spawner, they would have separate entries like
GIVE/gold,200
TAKE/Zabij Orka,questholder
To specify two entries in a single Action, you need to separate them with a semicolon, like
GIVE/gold,200 ; TAKE/Zabij Orka,questholder

QUOTE
how should seem like condition to first entry that player with attachement Zabij Orka(quest) does not trigger the dialog. (e.g. GETATT/Zabij Orka, Quest/!exist->trigger first entry)

Take a look at the Help menu in the xmlspawner gump. It gives the syntax for all sorts of things, including the TriggerOnCarried and NoTriggerOnCarried strings.
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).

so if you wanted to control the triggering of a spawner or an xmldialog you would use a string like this in the TriggerOnCarried or NoTriggerOnCarried fields
ATTACHMENT,Zabij Orka,xmlquestattachment
If you wanted to enter in a test for an attachment in a Condition field, you would do it like this

QUOTE
- modified the syntax for referencing attachments using the GET series of keywords. Whereever a property would normally be specified for those keywords, the new property keyword [ATTACHMENT,type,name,property] can be used. For example, to read the value property on an xmlvalue attachment with the name XS on a triggering mob you would specify "GETONTRIGMOB,[ATTACHMENT,xmlvalue,XS,value]".

so you could use a test like
GETONTRIGMOB,[ATTACHMENT,xmlquestattachment,Zabij Orka,name]="Zabij Orka"

QUOTE
3. how to make in action (and how does should seem syntax for this) SETONTRIGMOB/Criminal,true

the general syntax for setting properties on spawned objects is
objectype/propertyname/value
so you would do
SETONTRIGMOB/Criminal/true
(note that SETONTRIGMOB is another one of those 'type' keywords)
Galfaroth- 02-01-2006
Thanks so lot. And to add attachement to player in ACTION: ADD/ATTACHEMENT, QuestSubObjective, questobj ? Is there somewhere Wiki for XMLSpawner (maybe it is good idea to make one - you can download from SourceForge.net - wiki builder) It is very useful tool for users.
Here is one wiki builder: http://sourceforge.net/projects/sfwiki
ArteGordon- 02-01-2006
actually you would use the ATTACH keyword. It is just like ADD only for attachments.
ATTACH[,probability]/attachmenttype
so like,
ATTACH/xmlquestattachment,My Quest
from xmlspawner2.txt

QUOTE
- the new ATTACH keyword has been added to the spawner that allows attachments to be added to spawned items/mobs. It is very similar to the ADD keyword, but instead of adding items, you add attachments. The syntax is "ATTACH[,probability]/attachmenttype". If you further wish to set properties on the attachment that you are adding, you would use the syntax "ATTACH[,probability]/<attachmenttype/prop/value/prop/value...>". For example, the xmlmagicword attachment has a requireidentification property that can be set, that forces players to identify the attachment before it can be used. This property can be set at spawn time with "ATTACH/<xmlmagicword/requireidentification/true>". See attachtest2.xml for an example.