Full Version : Duration of #DXY,2,3
xmlspawner >>Q&A >>Duration of #DXY,2,3
<< Prev | Next >>
Datguy- 08-20-2007
How can i set a duration of this in the Action field
SETONTHIS/currentspeed/0.1/#DXY,2,3;OrderGuard
The player talked to npc, the npc resonded by calling guards & running away. How do i get rid of the guards now. They're only there for the shock value
ArteGordon- 08-20-2007
#DXY,2,3;
cant be used in an Action field. That can only be used at the beginning of a spawn entry in a spawner.
To limit the duration of the spawn on a spawner, set the Duration property on the spawner. When the duration expires, the spawn will be despawned.
But it looks like you are trying to do this via an xmldialog Action, so those spawner features dont apply.
A general way of making something time-limited is to attach a TemporaryQuestObject attachment to it. When the attachment expires, the object will be deleted.
So if you have your action like
SETONTHIS/currentspeed/0.1 ; OrderGuard/ATTACH/TemporaryQuestObject,temp,1
it will set the currentspeed on the npc, and spawn an orderguard that will self-delete in 1 minute.
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).
- added an example of the use of the temporaryquestobject attachment in tempobject.xml