Full Version : Creation Chest
xmlspawner >>Q&A >>Creation Chest
<< Prev | Next >>
xlilcasper- 08-23-2007
Here's my idea, I did it on sphere and I know I can do it with XMLSpawn but i'm not sure how to do the tests.
Idea:
Having a chest that when some items are added too it in the right combination, they are "transformed" into something else.
What the one I made before did was when you put a piece of armor in the chest along with some regs and 1000 platinum coins in the chest and flipped a switch it removed all the items and replaced it with a platinum piece of armor.
Now I know I can spawn the items in the chest, and I know I can do it when the switch is pulled. What i'm not sure is how to do the checks for the items?
I looked at "How Do I - Use property tests" at http://xmlspawner.15.forumer.com/index.php?showtopic=399 but i'm not sure how to go about doing this.
ArteGordon- 08-25-2007
check out the xmlsockets package. It includes a box of transmutation that does exactly that.
If you want to do it with a spawner, you can use the GETONNEARBY keyword, that has a 'searchcontainers' option that will let you check for items in nearby containers.
from xmlspawner2.txt

QUOTE
- added the 'GETONNEARBY,range,name[,type][,searchcontainers],property' keyword that can be used to get or test properties on nearby items or mobiles. This can be used in property assignments or property tests. If more than one of the specified object is found, it will only return the value from one.
For example, to test to see if someone has placed the longsword named "Grizzleblag" on the ground near the spawner you could use a condition test like
GETONNEARBY,1,Grizzleblag,longsword,visible=true
Or you could get the size of a pile of gold in a nearby container with
SENDMSG/{GETONNEARBY,1,,gold,true,amount} gold pieces are in the container

You could probably do the whole thing in one line like,
#CONDITION,GETONNEARBY,1,,longsword,visible=true & GETONNEARBY,1,,gold,true,amount=5 ; orc
to spawn an orc when a longsword and 5 pieces of gold were placed into the nearby container.