Quote:
|
Originally Posted by Saint666
ok the the question i have is does it work well with different types of spawner systems like the XML system if not would be great to see it work well with them as well.
looks good though and a nice idea you have. 
|
I'm not sure of what you asked for. Did you mean how to automatically group xmlspawners when importing them, like for normal spawners and uoamVendors?
If so, you can edit your xmlspawner script to make it happen. First, add this line to your xmlspawner.cs (or whatever the script file containing command routines for «xmlspawnerload» is called):
Code:
using Server.Scripts.Commands;
Then, locate the method performing load from xml (for instance
public static void Load_OnCommand( CommandEventArgs e )) and add this just before the cicling of DataRows:
Code:
// Create a new ItemsGroup for XmlSpawners, or return existing one
ItemsGroup xmlGroup = GroupsHandler.AddGroup( "xmlspawner", "Spawners of creatures/items in the world", true );
Change the
true into
false if you don't want the group to be secure. Then, immediately after each xmlspawner is generated and moved in the world, add the following code (
TheSpawn being the just generated xmlspawner gem):
Code:
// Add the spawner to ItemsGroup "xmlspawners"
xmlGroup.AddItem( TheSpawn, true );
That's all. You can do the same with all other scripts you wish, by just changing group name and description.