RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Resource icon

XmlSpawner 2 Version 4.0 Revision 21

No permission to download
Now the TryParse for enum types is done internally, with the use of Enum.IsDefined, previous check on null string is done, so the method will remain secure and try{}catch{} will be unnecessary.
If you have compiled with .net 4.0, you can convert all the "TryParse" with "Enum.TryParse" and it will use the original Framework methods.

Precompressed source of revision 8 is available here: https://docs.google.com/file/d/0B_I6Jquo2-k8VDNnbGFuSm03c28
Revision 6:
Fix to a Cast exception in GetClientsInRange, since this call returns Netstate Type, not Mobile, also an original bug was found in PlayMusic, considering that netstate were directly casted as mobile, it could cause a server crash.

-------------
Revision 7:

Completely converted attachment system to use strongly typed List instead of ArrayList and Dictionary instead of Hashtable.

Tried a conversion of XmlMobFactions/XmlDynamicFaction with the use of the same as above.

Generic List<T> and Dictionary are better in those situation, were the gain in speed is way better than the old methods.
Fixed the use of name proptest, in case you want to allow a search and don't
want to specify a name in property test, you can use the wildcard "*" (FOREACH -
AMOUNTCARRIED and many others that will allow to input a name among other
things):

Example:
FOREACH,PlayerMobile,*,3/DAMAGE,100

Will do 100 damage to all playermobiles in a range of three, the * will match
any name
FOREACH,Item,,3/Name/New Name
Will get any Item in a range of three whose name is "null" in the property test,
and will rename them to "New Name".


Modified and fixed a bug in SETONPETS:

Before:
SETONPETS,range/prop/value/prop/value...
but it wouldn't work, since the checkname, with a value of null, wasn't valid
(and you couldn't modify it!)

Now:
SETONPETS,range[,name]/prop/value/prop/value...
If you don't specify a name, any name will match, if you input a *, also, any
name will match, an empty name will match only pets with "null" name in
property.

----

Modified the PLAYERSINRANGE, so instead of searching for any mobile and checking
if they are players, it will search for any active client (logged in player,
that's it).

-----

Those changes, excluded for the last one that was done for better speed checks, are to maintain compatibility with all the rest of xmlspawner commands, since the first objective is relative to COMPATIBILITY without the need, for the user, to change their old spawner.

Enjoy.
Changed QuestLogGump in XMLQuestLogGump because of name conflicts with RunUO source from SVN.

In XmlSpawner2.cs fixed the SpawnerBounds, that returned a smaller area than the real one of the spawner, this only affected FOREACH command.

Fixed an old bug in XmlDialog, where an NPC with LockedConversation selected, if it starts a conversation and then waits for input from the user, another user giving speech for that input could obtain, in case of successful eventual checks, the control of the subsequent input, now this is checked, so LockedConversation makes more sense.

Added some extras (SIEGE/Socketable/MobFactions, etc) found in the web, they were not checked for any bugs, so, if you plan on using them, be warned that they may cause server instability, TEST THEM at your own risk!
Top