Full Version : Auto Delete Before 5 Minutes (Before Picked)
xmlspawner >>Q&A >>Auto Delete Before 5 Minutes (Before Picked)
<< Prev | Next >>
Xerocrates- 11-25-2007
Hi,
One question.
I've make a Spawner (with a xmldialog) for create a Metal Chest and a Guard
Ok... easy... If the guard is too close to the chest and this is picked, it descover the steal and searching for the Thief...
All made...
The problem is:
How i can tell to the Xmldialog "delete the chest 5 minutes before was picked"? (for start the counter for the next spawning)
The Guard and the Chest is on the same Spawn, so i Can't use the Despawn Timer...
I've Thinked too, "set this movable true, the Decay will delete this automatically" but the despawn in my server is for 1 hour... too much for a despawn for that damned chest...
Tnx for any Help/Ideas...
ArteGordon- 11-25-2007
you can spawn the chest with a TemporaryQuestObject attachment that will autodelete it after some time.
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).

Xerocrates- 11-26-2007
err.... acc....
Ok... Sorry for the stupid question
tnx
Xerocrates- 11-26-2007
And for Tell to the script "look if this had already got this attachment"?
Condition:GETONxyz/ATTACHMENT,attachtype,args,Xyz=Xyz
is it right?
ArteGordon- 11-26-2007
use the GET keyword 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]". The change involved using [] instead of <> for the ATTACHMENT delimiters. This was to resolve a conflict with the use of the old syntax in conditional tests. The example attachtest1.xml has been modified to reflect the change.

so
GET,itemname,itemtype,[ATTACHMENT,temporaryquestobject,,name]=thenameoftheattachment
would test to see whether the item of type 'itemtype' named 'itemname' had an attachment of type 'temporaryquestobject' with the specified name.
Xerocrates- 11-26-2007
Yes sorry, i've maded but i have forgot to delete this replay
Damned [], i always forgot
Tnx 100000