Full Version : Setting properties on items from questnpc
xmlspawner >>Q&A >>Setting properties on items from questnpc
<< Prev | Next >>
thristam- 06-07-2006
Im trying to build a quest where the person brings a key and gives it to the questgiver, and he unlocks a door for them. So far i think it wil work, but i cant find anything on how to set properties on doors that are nearby
GIVE/&lt;questholder/nextrepeatable/0:01/name/Find The Key!/notestring/Find the Key, bring it to bob./objective1/COLLECTNAMED,Silver Key,1/objective2/GIVENAMED,bob,Silver Key,1/
At this point im lost. Would it be some form of SET? Does this look ok?
Thanks for the help, i apprecate it.
ArteGordon- 06-07-2006
you could use the SETONNEARBY keyword.
from xmlspawner2.txt

QUOTE
- added the new "SETONNEARBY,range,name[,type]/prop/value/prop/value..." keyword that allows you to set properties on all objects of the given name and type within the specified number of tiles from the spawner (thanks to CEO for the idea). The objects can be mobiles, items, or both.

QUOTE
- added the ability to access container contents in the SETONNEARBY keyword with the new 'searchcontainers' argument. The new syntax is SETONNEARBY,range,name[,type][,searchcontainers]/prop/value/prop/value... where searchcontainers is a flag set to true or false (default is false). This will only access containers that are placed in the world, not containers carried by mobiles. If searchcontainers is set, then only items in containers will be included.
So, to delete all ginseng found in containers within 5 tiles of the spawner but not on the ground, you could use the spawn entry
SETONNEARBY,5,,ginseng,true/DELETE
Without the searchcontainers argument, or setting it to false it would delete all ginseng on the ground within 5 tiles of the spawner but not in containers.
An example of the use of this for filling and deleting contents of nearby boxes can be found in the nearbyboxes.xml example in xmlextras.zip (thanks to snicker7 for the idea).