Full Version : Problem with xmlspawerunload
xmlspawner >>Q&A >>Problem with xmlspawerunload


<< Prev | Next >>

Dave1969- 03-06-2006
Im having problems with the xmlspawnerunload command. im typing in
xmlspawnerunload Data/Monsters/Trammel/LostLands.map and it resturns with 0 spawners unloaded. I know for a fact that there are alot of spawners because im going around and having to delete manually.

ArteGordon- 03-06-2006
you can only unload xml files. If you have .map files, then you need to first

1) import them (it looks like you have already done that), then
2) save them back out as xml files using the [xmlsave command or using the Save feature of [xmlfind. Then
3) you can load/unload those xml files using the [xmlload or [xmlunload type commands.

Dave1969- 03-06-2006
Thanks Arte but could you please give me an example. Im trying to delete the LostLands.map so do i first make an xml file called LostLands.xml? Then what would i type to save the LostLands.map to a LostLands.xml ?

Oh and one more thing. Where do i put the new LostLands.xml file that i created?

ArteGordon- 03-06-2006
One way to do this is to use the Spawn Editor which will allow you to import and save spawns by just drawing out a bounding box across the lost lands area of the map.
Either use the Transfer Server to load in your spawns from that area, and then you can either Save them to an XML file or you can unload them directly from within the Spawn Editor.

Another way to do it is with [xmlfind.
I believe that nerun's spawners use a naming convention in which all of the lost lands spawners have names that begin with the string '#T2A', so you could also use xmlfind to load and save these by
1) running [xmlfind, and then
2) setting the Name field to #T2A and doing a Search, and then
3) Save them to an XML file by entering a filename in the Save dialog, checking the Select All button in the lower right corner of the gump, and hitting the Save button. It will automatically put the file into the Spawns folder in the main RunUO directory if it exists, otherwise it will just put it into the main RunUO folder.

Note that once you have them selected in [xmlfind, you can also delete them.

Dave1969- 03-07-2006
I did exactly what you instruted and the server crashed. Heres the crash log

CODE
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
  at Server.Mobiles.XmlSpawner.SaveSpawnList(Mobile from, ArrayList savelist, String dirname, Stream stream, Boolean oldformat, Boolean verbose)
  at Server.Mobiles.XmlSpawner.SaveSpawnList(Mobile from, ArrayList savelist, String dirname, Boolean oldformat, Boolean verbose)
  at Server.Mobiles.XmlFindGump.SaveList(Mobile from, String filename)
  at Server.Mobiles.XmlFindGump.OnResponse(NetState state, RelayInfo info)
  at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
  at Server.Network.MessagePump.HandleReceive(NetState ns)
  at Server.Network.MessagePump.Slice()
  at Server.Core.Main(String[] args)

ArteGordon- 03-07-2006
That may occur if somehow you have a spawner with a null map. I've added a slightly modified version of the save method with additional error checking to XmlSpawner.cs in the beta_308.zip file in the Uncoming Releases thread to deal with that possibility.
http://xmlspawner.15.forumer.com/index.php?showtopic=53