Full Version : Specifying QuestOwner on a TemporaryQuestObject
xmlspawner >>Q&A >>Specifying QuestOwner on a TemporaryQuestObject


<< Prev | Next >>

morganm- 02-04-2007
I've seen tons of easy examples of just using /QuestOwner/TRIGMOB to specifiy a QuestOwner on a TemporaryQuestObject. This works great if GIVE is used to obtain the item. However I have a quest where i use /ADD/ in a spawn entry to put a quest item in an NPCs pack. How can I specify a QuestOwner this way?

Basicly the quest is to go out and get COLLECTNAMED items. They are named and associated with the quest on spawners. However when the player kills the MOB or steals the item and it gets into the players pack it doesn't automaticly register with the QuestHolder. The user must use the Collect feature of the QuestHolder.

Now the spawner creating the MOBs with the items to be collected is not triggerd by players; it's just running. Any player can run up and kill the MOBs. Infact groups of them kill the MOBs so it's a little tough to just say /QuestOwner/TRIGMOB because what if Bill "triggers" the spawner but then Ted loots the item; it's associated to Bill and not Ted.

Here is an example of the spawn entry:
CODE
/Name/the skull of Cid/ATTACH/<TemporaryQuestObject,Grave Robbers,1440>>/


ArteGordon- 02-05-2007
do you just want to avoid having players that arent doing the quest accumulating the skulls?
If so, you could just have the skulls autodelete after some period of time using the temporaryquestobject attachment with no quest specified.
That way, players that have the quest can immediately COLLECT it and the autodelete wont make any difference, but players that dont have the quest wont be able to horde them.

morganm- 02-06-2007
I tried just doing TemporaryQuestObject with only a timer so it would auto delete. However when a player with the QuestHolder came, killed the MOB, grabed the item, it wouldn't check it off in the QuestHolder for the given objective.

Example:

QuestHolder Objective - /COLLECTNAMED,a grave robber's pickaxe,6/

TempQuestObj - /EQUIP/<PickAxe/Name/a grave robber's pickaxe/ATTACH/<TemporaryQuestObject,1440>>

Player would come and kill the grave robber, grab the pickaxes but would never complete the objective. That's why I ended up specifying a quest name to the TempQuestObj... I wash oping it would automaticly collect the pickaxes (and skulls) but that didnt do it either.

I figured the problem was becuase I didnt specify a QuestOwner. Because I have another similar quest where an NPC uses GIVE to give the player a TempQuestObj and it automaticly completes an objective in the QuestHolder once it's in the players pack.

ArteGordon- 02-06-2007
the temporaryquestobject attachment wont autocomplete any objectives. What it will do is autodelete objects when a quest is completed.
For any COLLECT type objective, the only way to satisfy it is to use the collect button in the questholder.

QUOTE

I figured the problem was becuase I didnt specify a QuestOwner. Because I have another similar quest where an NPC uses GIVE to give the player a TempQuestObj and it automaticly completes an objective in the QuestHolder once it's in the players pack.


I would have to see what the actual objective was. I dont think the temporaryquestobject attachment would have had anything to do with it.

from xmlspawner2.txt
QUOTE

- added the new TemporaryQuestObject attachment that allows you to tag items/mobiles so that they are automatically deleted after some period of time, or whenever the quest they are associated with is completed (when the questholder associated with the quest deleted). (thanks to Eymerich for the idea).
The syntax is
TemporaryQuestObject,questname[,expiration]

To use this simply put the attachment on an object, and assign the questname, owner.
You can also use it to make temporary objects that are not associated with a quest by just specifying an expiration time.
The way it works is When the attachment is deleted, the object it is attached to is also deleted.

Typically you would probably create the object with the attachment using a spawn entry like this

GIVE/<questholder/name/MyQuest/objective1/KILL,orc/autoreward/true/rewardstring/gold,100>
GIVE/<longsword/name/Quest Sword/ATTACH/<temporaryquestobject,MyQuest/questowner/TRIGMOB>>

This would hand out a quest named MyQuest, and then give the triggering player a longsword named "Quest Sword" that was associated with MyQuest.
Note that the mobile who is the questowner of the temporaryquestobject must be manually specified by setting the QuestOwner property on the attachment.

To make a general temporary object independent of any quests, just use the attachment with an expiration time like this

longsword/name/poof/ATTACH/temporaryquestobject,tempsword,3

which would make a sword that would autodelete after 3 minutes (the name "tempsword" could be anything since it it isnt really used for autodeletion and is just to identify the attachment).

morganm- 02-09-2007
OK, I was missunderstanding how these features worked. Thank you for clarifying. I will have to make an effort to educate our players on how to use the Collect button.

Thanks Arte!