Full Version : Tryin to use GIVE to multiplayers
xmlspawner >>Q&A >>Tryin to use GIVE to multiplayers
<< Prev | Next >>
DazedAndConfused- 05-03-2007
Is there a way to use the GIVE command to provide all players within a range of the spawner an item? I looked at PLAYERSINRANGE, but I think that just returns a count.
ArteGordon- 05-04-2007
no, GIVE will only work with on the single triggering mob.
You should be able to do it like this
SETONNEARBY,5,*,playermobile/ADD/item
where the syntax for SETONNEARBY is
SETONNEARBY,range,name[,type][,searchcontainers][,proptest]/prop/value/prop/value...
DazedAndConfused- 05-04-2007
Thanks Arte, is the * used if you do not target based on a playermobile with a specific name?
ArteGordon- 05-04-2007

QUOTE (DazedAndConfused @ May 04, 2007 08:40 am)
Thanks Arte, is the * used if you do not target based on a playermobile with a specific name?

right. The '*' is a wildcard character that will match any name.
from xmlspawner2.txt

QUOTE
- Name tests have been modified to support a special wildcard "*" that will match any name. (thanks to Kaon for the suggestion) There are three types of name argument that can be used in tests and keywords 1) standard non-empty name argument (match specific named objects)
2) empty name argument (match only unnamed objects)
3) special * name argument (match objects with any name)
This should work anywhere that a name argument is normally required.
So, for example using a TriggerOnCarried string of
*,heavycrossbow
would allow triggering when the player was carrying a heavy crossbow regardless of the name.