I have looked on the forums, i found some answers but being under cafeined im probably missing the point.
What i would like to do is activate a spawner when a player is carrying a specific item.
** done that part, works great **
Now i would like the item deleted from the players bag when the item is spawned
** that part i cant do **
please be precise when you explain, i feel like im 2 years old when i use these great tools that are XMLSpawners....
Thanks
the first question is how you plan on identifying the player.
Are there going to be more than one of these items in circulation at any given time?
Do you want to take it back from the most recent person that you gave it to?
Players will acquire this item through a quest and the item as a decay timer.
There is a probability there would be more then 1 of these in circulation at any given time.
The item in the players pack can trigger a large amount of different spawners but what im looking for is that after the player as triggered one the item is deleted from his pack and thus he cant trigger any other spawner.
just add and entry like this to your item-triggered spawners
SETONCARRIED,itemname,itemtype/DELETE
Then, when the spawner it triggered, it will delete the item.
You would probably add it to an existing subgroup of things that you are already spawning.
Also, you need to substitute your item's actual name and type into that example.
Thank you so much for the inofrmation.
At first i didnt understand any thing from your message but i did a little seach on the forums, doen a few trials and errors on the spawner and wouldnt you know it, it works and i learned a few things along the way.
thank you so much for taking the time to answer me and with such speed....
glad to hear you got it working.
Another thing you might want to take a look at is the TemporaryQuestObject attachment that will automatically delete objects that they are attached to when a quest is completed.
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).
|
How would you set up the TAKE end of this?
I have given my quester 3 temporaryquestobject when he gives you the quest, these 3 things need to be delivered to the proper NPC to complete that section of the quest - everything seems to be working fine except at this point the first objective NPC marks you as completing the proper part, but he does not take the temp quest object (in this case a named bag with some contents) from you when he does it.
you can either delete it directly using
SETONCARRIED,itemname,itemtype/DELETE
like
SETONCARRIED,bagname,bag/DELETE
or you could take it with
TAKE[,prob[,quantity[,searchbank,[typename]]]]/itemname
so something like
TAKE,1,1,false,bag/bagname
the difference is that when you TAKE it, it holds on to the object so that you can do things to it after you take it, such as test it, change it, give it back, etc.
Just what I needed - working great. Always a lie saver Arte
*big hugs to him before she skips off to finish*