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!

XmlSpawner2

ArteGordon

Wanderer
I'll take a look at it. Do you have any more information about what might have caused this, such as what you were doing at the time? Also, is it reproducible so that you could run the server in -debug mode to get a more precise error message?
 

Ocg_66

Wanderer
Ok...i don't know if it's cuz i'm up so late, but i'm having some problems


How do I get the spawn to load the monsters and animals? I've been out of the UO loop for probably 10 months so I'm lost when it comes to all the commands.

Any help would be appreicated.

thanks
 

ArteGordon

Wanderer
are you asking about where to find prespawned worlds? There are a couple of sources. Nerun's distro has world spawns that are in .map format.
http://www.runuo.com/forum/showthread.php?t=30688
You can import these with the [xmlimportmap command.
Cward's OSI spawns are in .msf format.
http://www.runuo.com/forum/showthread.php?t=42867
You can import these with the [xmlimportmsf command.

If you have existing xmlspawner spawn maps in .xml format, you can load these with [xmload, or make them with [xmlsave.
 

Ocg_66

Wanderer
Yeah I was under the impression that this package would do that, since it was based off the Bob Smarts package. Last time I was messing with this stuff I thought his package spawned the world for you. Does your package not do this?
 

ArteGordon

Wanderer
it does not include the spawns that were a part of bobsmart's world package. Nerun's is basically the maintained version of that set of world spawns.
 

Trying

Sorceror
Basic Beginners Document

I have made a "beginners" document on how to setup the xmlspawner from Arte, Please understand that this is designed for anyone that has no idea on how to setup the spawner, it covers .. (adding the spawner.. some "props" work.. adding a monster to the spawning.. and finally adding a woodenchest with some loot etc) this is NOT designed for people with experience with the spawner, this just covers the real A..B..C on how to get it running.

Im no expert at the spawner myself, but what I have learned thus far I wanted to try help out anyone else thats new to it...

Rename the zips to .rar if they dont extract.. once extracted, click on the index.html and follow it through...

Hope it helps someone out there.

Regards.
Trying.
 

Attachments

  • xmlspawner tutorial.part1.zip
    97.7 KB · Views: 3,558
  • xmlspawner tutorial.part2.zip
    97.7 KB · Views: 2,420
  • xmlspawner tutorial.part3.zip
    97.7 KB · Views: 2,209
  • xmlspawner tutorial.part4.zip
    32.5 KB · Views: 2,264

ArteGordon

Wanderer
Trying,
I looked through the guide and it is a great beginners walkthrough. Thanks, and nice job!

One small change is that the TriggerAccessLevel sets the minimum level for triggering, not the maximum, so setting it to Admin would allow anyone Admin and below to trigger. It lets admins test out triggering since normally only players will activate them.

(edit)
unfortunately, I have a big update coming and no hosting so I hope this doesnt get buried in the thread.
 

ArteGordon

Wanderer
updated to version 2.64

- quite a few additions in this one
- scripts have been reorganized.
Note small but important installation changes in steps 2 and 6 for people that have previous versions installed! see notes below.

Version 2.64
update 10/10/04
- added support for the OnAfterSpawned() method that can be defined in any mobile or item class and will be invoked when that item/mobile is spawned and placed in the world and AFTER any spawn entry modifications are applied. This allows individual objects to script in actions that they wish to occur at spawn time that require knowledge of the object's map and location. This differs from the OnSpawned() method that is applied BEFORE spawnentry modifications. This allows the OnAfterSpawned() method to take into account any properties that are changed in the spawn entry.

- a major system has been added that allows dynamic functionality to be added to items/mobs without requiring any modification to the item/mob scripts themselves. The system is called the "attachment" system, and is something like scripted "post-its" that can be stuck onto any item or mob, and can then give them new user-scriptable abilities. Multiple attachments can be added to targets. (thanks to Elementi for the inspiration)
For example, placing the simple xmlhue attachment onto a mobile allows you to change its hue for some duration, after which it gets changed back to its original hue. In order to do this conventionally you would have to modify the playermobile script with additional variables, serialization/deserialization, timers, etc. If you also wanted to be able to do the same thing for creatures, you would have to add the same mods to basecreature, armor... basearmor, etc. With attachments, you can add the hue changing ability to any item or mob with no script modification of the target class. This includes things that are derived directly from inaccessible classes such as statics.

- several new commands have been added for staff support of attachments. [addatt, [getatt, [delatt, [availatt

[addatt attachmenttype [args] - allows attachments of the specified type to be added to targeted objects. For example, to have a door display a message whenever it is approached, you could do "[addatt xmlmessage Welcome!". To also have a sound played you could add "[addatt xmlsound 1048"

[getatt [type] - allows the attachments on a targeted object to be listed. If the optional type argument is given, then only attachments of that type are displayed.

[delatt [type/serial [name]] - allows attachments on a targeted object to be deleted. If no arguments are given, then all attachments on the object are deleted. If the type is specified, then only attachments of that type are deleted. If a serial number is specified, then the specific attachment with that serial number is deleted (use [getatt to see the serial numbers).

[availatt - opens a gump that lists all of the available attachments and their various constructors and arguments. All constructors for objects derived from the XmlAttachment class and flagged with the [Attachable] attribute will be listed.

- a new checkbox has been added in the [xmlfind gump to allow searching for items/mobs with attachments. If the attach box is selected, then an additional filter for objects with attachments associated with them will be applied.

- the new ATTACH keyword has been added to the spawner that allows attachments to be added to spawned items/mobs. It is very similar to the ADD keyword, but instead of adding items, you add attachments. The syntax is "ATTACH[,probability]/attachmenttype". If you further wish to set properties on the attachment that you are adding, you would use the syntax "ATTACH[,probability]/<attachmenttype/prop/value/prop/value...>". For example, the xmlmagicword attachment has a requireidentification property that can be set, that forces players to identify the attachment before it can be used. This property can be set at spawn time with "ATTACH/<xmlmagicword/requireidentification/true>". See attachtest2.xml for an example.

- the GET series of keywords (this includes GET, GETONMOB, GETONTRIGMOB, GETONCARRIED, GETONSPAWN) now supports retrieving properties from attachments. Whereever a property would normally be specified for those keywords, the new property keyword <ATTACHMENT,type,name,property> can be used. For example, to read the value property on an xmlvalue attachment with the name XS on a triggering mob you would specify "GETONTRIGMOB,<ATTACHMENT,xmlvalue,XS,value>" (See attachtest1.xml for examples).

- attachments can also be used as quest rewards by specifying them in the RewardString of a questholder or questnote just as you would in the ATTACH keyword. You should also enable autoreward to have them automatically applied on quest completion. They will be displayed as a "Bonus:" in the quest gump. The details of the attachment cannot be queried at the moment, but I will add that capability (See minionstrike.xml for an example)

- Users can script their own attachments in much the same way that they would script new items or mobs. Attachments have class definitions that look similar to items or mobiles. All attachments are derived from the XmlAttachment class that implements the IXmlAttachment interface. This interface defines support for several features that all attachments have access to, including activation on movement, speech, and weapon hits (see XmlAttachment.cs for the interface specification). See the XmlAttachments folder for example scripts.

- attachments can also be used in other scripts by simply creating new instances of the attachments (e.g. XmlAttachment attachment = new XmlHue(200); ) and then applying them to the target with AttachTo(targetobject, attachment);
Note, that the attachment is achieved via an object/attachment hash table association, so there is no actual modification of the targetobject.

- all attachments are maintained in hashtables that are serialized separately from the item and mobile tables. The save information for attachments can be found in the Saves/Attachments folder.

- attachments support activation via speech or movement using the OnSpeech and OnMovement methods that can be defined in any attachment script. This is accomplished by adding additional speech and movement event handlers. I have done extensive stress test profiling of these handlers up to loads equivalent to 10,000 simultaneous players and have calculated the additional overhead to be around a maximum of 1-3% additional cpu overhead for movement at 10K players, and less than 0.1% for speech, with a proportional decrease in load with fewer players. While it is highly unlikely that anyone would notice any impact of these handlers, they can be disabled if desired (of course, speech/movement attachment triggering will also be disabled) by simply commenting out the EventSink.Speech and EventSink.Movement handler lines in the Initialize method of XmlAttach in XmlAttach.cs.

- note that optional installation steps 2 and 6 have been modified. For those that had the previous modifications, in BaseCreature.cs just change
XmlQuestToken.RegisterKill( this, ds.m_Mobile);
to
XmlQuest.RegisterKill( this, ds.m_Mobile);

and in ReportMurderer.cs change
Server.Items.XmlQuestToken.RegisterKill( m, g);
to
Server.Items.XmlQuest.RegisterKill( m, g);

- a new optional installation step 7 has been added to support the OnWeaponHit attachment method allowing attachments to be triggered when the targeted mob/weapon hits a defender.

- a new optional installation step 8 has been added to support the use of the ItemIdentification skill to reveal attachments on targeted items/mobs.

- the scripts in the package have been reorganized into folders.

- description of the new attachments included in this version:
XmlDex, XmlInt, XmlStr - these attachments simply apply temporary dex/int/str mods to the recipient. The value and duration can be specified.

XmlHue - allow the hue of the target to be temporarily modified. The value and duration can be specified.

XmlSkill - When applied to a mob, allows the specified skill to be temporarily modified. A word can also be specified which is required to activate the modification. If applied to a weapon or armor, the item must be equipped when the word is spoken to activate the skill mod. The skill, value, triggering word, and duration can be specified.

XmlDate, XmlData, XmlValue - these attachments allow bits of information to be added to the target. XmlDate supports DateTime information, XmlValue supports ints, XmlData supports strings. These can be added and read by spawners (see attachtest1.xml for an example).

XmlSound - allows a sound to be played whenever a player comes in range of the object it is attached to or says a triggering word. The sound value, minimum interval between activations, number of uses, and triggering word can be specified.

XmlMessage - allows an overhead message to be displayed whenever a player comes in range of the object it is attached to or says a triggering word. The message value, minimum interval between activations, number of uses, and triggering word can be specified.

XmlFire, XmlLightning - when attached to a weapon, it will apply additional fire/lightning damage on weapon hits. When attached to an object in the world it will apply damage when a player comes in range of the object. The amount of damage, minimum interval between activations, and how long the attachment will last (expiration) can be specified.

XmlMinionStrike - a personal favorite. When attached to a weapon, it allows the specified minions to be spawned with some probability every time the weapon hits a defender. These spawns will be under the control of the weapon owner. When attached to a mob, this ability will be applied to any weapon the mob wields (including fists). The minion type, chance of spawning, minimum interval between activations, and how long the attachment will last (expiration) can be specified (see minionstrike.xml for an example of its use).

XmlMagicWord - this is something of a template for a general speech activated attachment that has different abilities that can be unlocked depending on the word spoken. If it is added to a weapon or armor, the items must be equipped before the words can activate it. 9 words have been added
Lepto - gives a dex mod of +20
Malik - gives a str mod of +20
Shoda - gives an int mod of +20
Vas Malik - gives a str mod of +40
Tarda - gives a tactics skill mod of +20
Marda - gives a magery skill mod of +20
Narto - spawns a tamed drake
Santor - spawns a tamed horse
Velas - make you invisible
The activating word, duration of each effect, the number of uses, and how long the attachment will last (expiration) can be specified (see attachtest2.xml for an example).
 

Vento Divino

Wanderer
Hi ArteGordon :)
First of all, forgive me for my poor english.

I use this really awesome script since the first version on my shard and thank to this I've made many nice things.
Unfortunately I had some problems doing automatic quest but I'm trying to learn how to do them.

I have some question for you if you aren't too much annoied to answer :p
I'm trying to do a sort of bounty system where player A commit a omicide on player B by player C, who will recive the reward putted by player A.
Clear? lol
Then some problems come out.
I don't want to use playermade quests for this, 'cause i should teach to pgs how to do it..
So I made this scratch of xml:

Code:
<Name>Bounty</Name>
<UniqueId>57403fd6-6393-4d02-9026-e8071827f69e</UniqueId>
<Map>Felucca</Map>
<X>5437</X>
<Y>1168</Y>
<Width>10</Width>
<Height>10</Height>
<CentreX>5442</CentreX>
<CentreY>1173</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>4</MaxCount>
<MinDelay>0</MinDelay>
<MaxDelay>0</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>5</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<TriggerProbability>1</TriggerProbability>
<SpeechTrigger>bounty</SpeechTrigger>
<InContainer>False</InContainer>
<ContainerX>0</ContainerX>
<ContainerY>0</ContainerY>
<ContainerZ>0</ContainerZ>
<MinRefractory>0</MinRefractory>
<MaxRefractory>0</MaxRefractory>
<TODStart>0</TODStart>
<TODEnd>0</TODEnd>
<TODMode>0</TODMode>
<KillReset>1</KillReset>
<ExternalTriggering>False</ExternalTriggering>
<SequentialSpawning>1</SequentialSpawning>
<AllowGhostTriggering>False</AllowGhostTriggering>
<SmartSpawning>False</SmartSpawning>
<Team>0</Team>
<Amount>1</Amount>
<IsGroup>False</IsGroup>
<IsRunning>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
-
	<Objects2>
GUMP,BountyKiller,2/Write the name of the people you want to be killed.:MX=1:SB=1:RT=0:TO=0:KL=0:OBJ=WAITUNTIL/gumpstate!(-null-)/3:MX=1:SB=2:RT=0:TO=0:KL=0:OBJ=TAKEBYTYPE,1,10000/gold:MX=1:SB=3:RT=0:TO=0:KL=0:OBJ=questnote/autoreward/true/description1/Kill {GET,Bounty,gumpstate}/objective1/KILLNAMED,{GET,Bounty,gumpstate}/rewardstring/@gold,10000:MX=1:SB=4:RT=0:TO=0:KL=0
</Objects2>

...and it's ok, it works.
But:
1) I can't make the questnote "passable" to another player. this means that player A will commit the omicide and receive his own reward. Err... not what I wanted :p
2) Is there any control on the TAKE action? The spawn go on also if the pg doesn't have any money.
3) Making the xml triggering on speech, the pg must say the word for every passage of the xml and this could sound strange. Making the xml triggering for example on PlayerProp "str>0", the xml will trigger forever... no way out :p

Thank you in advance for help and forgive me if the questions are too stupid :D
 

ArteGordon

Wanderer
Vento Divino said:
Hi ArteGordon :)
First of all, forgive me for my poor english.

I use this really awesome script since the first version on my shard and thank to this I've made many nice things.
Unfortunately I had some problems doing automatic quest but I'm trying to learn how to do them.

I have some question for you if you aren't too much annoied to answer :p
I'm trying to do a sort of bounty system where player A commit a omicide on player B by player C, who will recive the reward putted by player A.
Clear? lol
Then some problems come out.
I don't want to use playermade quests for this, 'cause i should teach to pgs how to do it..
So I made this scratch of xml:

Code:
<Name>Bounty</Name>
<UniqueId>57403fd6-6393-4d02-9026-e8071827f69e</UniqueId>
<Map>Felucca</Map>
<X>5437</X>
<Y>1168</Y>
<Width>10</Width>
<Height>10</Height>
<CentreX>5442</CentreX>
<CentreY>1173</CentreY>
<CentreZ>0</CentreZ>
<Range>5</Range>
<MaxCount>4</MaxCount>
<MinDelay>0</MinDelay>
<MaxDelay>0</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>5</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<TriggerProbability>1</TriggerProbability>
<SpeechTrigger>bounty</SpeechTrigger>
<InContainer>False</InContainer>
<ContainerX>0</ContainerX>
<ContainerY>0</ContainerY>
<ContainerZ>0</ContainerZ>
<MinRefractory>0</MinRefractory>
<MaxRefractory>0</MaxRefractory>
<TODStart>0</TODStart>
<TODEnd>0</TODEnd>
<TODMode>0</TODMode>
<KillReset>1</KillReset>
<ExternalTriggering>False</ExternalTriggering>
<SequentialSpawning>1</SequentialSpawning>
<AllowGhostTriggering>False</AllowGhostTriggering>
<SmartSpawning>False</SmartSpawning>
<Team>0</Team>
<Amount>1</Amount>
<IsGroup>False</IsGroup>
<IsRunning>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
-
	<Objects2>
GUMP,BountyKiller,2/Write the name of the people you want to be killed.:MX=1:SB=1:RT=0:TO=0:KL=0:OBJ=WAITUNTIL/gumpstate!(-null-)/3:MX=1:SB=2:RT=0:TO=0:KL=0:OBJ=TAKEBYTYPE,1,10000/gold:MX=1:SB=3:RT=0:TO=0:KL=0:OBJ=questnote/autoreward/true/description1/Kill {GET,Bounty,gumpstate}/objective1/KILLNAMED,{GET,Bounty,gumpstate}/rewardstring/@gold,10000:MX=1:SB=4:RT=0:TO=0:KL=0
</Objects2>

...and it's ok, it works.
But:
1) I can't make the questnote "passable" to another player. this means that player A will commit the omicide and receive his own reward. Err... not what I wanted :p
2) Is there any control on the TAKE action? The spawn go on also if the pg doesn't have any money.
3) Making the xml triggering on speech, the pg must say the word for every passage of the xml and this could sound strange. Making the xml triggering for example on PlayerProp "str>0", the xml will trigger forever... no way out :p

Thank you in advance for help and forgive me if the questions are too stupid :D

1) questnotes are not passable by design to prevent exchanging non-player quests with other players. You just have to set the playermade flag to true when you make it to allow this.
So if you have player A making the quest and setting up the reward to kill player B, he can then give this to player C who will kill player B and get the reward.
2) you can have the money withdrawn from the bank if they are not carrying enough by adding the true argument to your TAKEBYTYPE keyword
TAKEBYTYPE,1,10000,true
3) you can enable freerunning on the spawner which basically allows you to trigger once, and then have a block of entries executed without requiring each to be triggered. You do this by adding in a SETONTHIS/freerunning/true entry when you want it on and a SETONTHIS/freerunning/false entry to turn it off.

I modified your .xml to reflect these changes. I think it now does what you want.

Code:
<?xml version="1.0" standalone="yes"?>
<Spawns>
  <Points>
    <Name>Bounty</Name>
    <UniqueId>57403fd6-6393-4d02-9026-e8071827f69e</UniqueId>
    <Map>Felucca</Map>
    <X>5443</X>
    <Y>1150</Y>
    <Width>10</Width>
    <Height>10</Height>
    <CentreX>5448</CentreX>
    <CentreY>1155</CentreY>
    <CentreZ>0</CentreZ>
    <Range>5</Range>
    <MaxCount>6</MaxCount>
    <MinDelay>0</MinDelay>
    <MaxDelay>0</MaxDelay>
    <DelayInSec>False</DelayInSec>
    <Duration>0</Duration>
    <DespawnTime>0</DespawnTime>
    <ProximityRange>5</ProximityRange>
    <ProximityTriggerSound>500</ProximityTriggerSound>
    <TriggerProbability>1</TriggerProbability>
    <SpeechTrigger>bounty</SpeechTrigger>
    <InContainer>False</InContainer>
    <ContainerX>0</ContainerX>
    <ContainerY>0</ContainerY>
    <ContainerZ>0</ContainerZ>
    <MinRefractory>0</MinRefractory>
    <MaxRefractory>0</MaxRefractory>
    <TODStart>0</TODStart>
    <TODEnd>0</TODEnd>
    <TODMode>0</TODMode>
    <KillReset>1</KillReset>
    <ExternalTriggering>False</ExternalTriggering>
    <SequentialSpawning>1</SequentialSpawning>
    <AllowGhostTriggering>False</AllowGhostTriggering>
    <SmartSpawning>False</SmartSpawning>
    <Team>0</Team>
    <Amount>1</Amount>
    <IsGroup>False</IsGroup>
    <IsRunning>True</IsRunning>
    <IsHomeRangeRelative>True</IsHomeRangeRelative>
    <Objects2>GUMP,BountyKiller,2/Write the name of the people you want to be killed.:MX=1:SB=1:RT=0:TO=0:KL=0:OBJ=SETONTHIS/freerun/true:MX=1:SB=1:RT=0:TO=0:KL=0:OBJ=WAITUNTIL/gumpstate!(-null-)/3:MX=1:SB=2:RT=0:TO=0:KL=0:OBJ=TAKEBYTYPE,1,10000/gold:MX=1:SB=3:RT=0:TO=0:KL=0:OBJ=GIVE/&lt;questnote/autoreward/true/playermade/true/description1/Kill {GET,Bounty,gumpstate}/objective1/KILLNAMED,{GET,Bounty,gumpstate}/rewardstring/@gold,10000&gt;:MX=1:SB=4:RT=0:TO=0:KL=0:OBJ=SETONTHIS/freerun/false:MX=1:SB=4:RT=0:TO=0:KL=0</Objects2>
  </Points>
</Spawns>

(edit)

oh, I also changed it to give the resulting bounty quest directly to the player (player A) instead of dropping it on the ground. Note that you could then have player A place this into a playerquestboard, a player vendor, or just give it to another player.

(edit)
the issue of allowing return values from keywords like TAKEBYTYPE to be placed into local variables that the spawner could later act on is something that cannot be done at the moment, but it will be coming.
 

ArteGordon

Wanderer
I forgot to mention an additional feature in the version 2.64 update

- spawner triggering can be made dependent upon attachments on the triggering mob by using the "ATTACHMENT,name,type" string in the TriggerOnCarried or NoTriggerOnCarried properties. This will make triggering dependent on attachments on the mob, or an attachment on an item equipped by the mob, or an attachment on an item in the top level of the mobs backpack (see attachtest1.xml for an example).

I updated the attachtest1.xml example to include this feature, so if you downloaded it previously, you would need to get the most recent version of xmlextras to see it.
 

Anvil

Wanderer
ArteGordon, with your recent release I'm now getting an error on a script that I was not getting prior to the 2.64 release... was wondering if you might assist on why I'm getting this now... Thanks.

Here is the error:

- Error: Scripts\Custom\Town Invasion\SpawnRegistry.cs: CS0118: (line 68, colum
n 39) 'Server.Engines.XmlSpawner' denotes a 'namespace' where a 'class' was expe
cted
- Error: Scripts\Custom\Town Invasion\SpawnRegistry.cs: CS0118: (line 70, colum
n 47) 'Server.Engines.XmlSpawner' denotes a 'namespace' where a 'class' was expe
cted
- Error: Scripts\Custom\Town Invasion\SpawnRegistry.cs: CS0118: (line 74, colum
n 10) 'Server.Engines.XmlSpawner' denotes a 'namespace' where a 'class' was expe
cted
- Error: Scripts\Custom\Town Invasion\SpawnRegistry.cs: CS0118: (line 75, colum
n 10) 'Server.Engines.XmlSpawner' denotes a 'namespace' where a 'class' was expe
cted
- Error: Scripts\Custom\Town Invasion\SpawnRegistry.cs: CS0118: (line 98, colum
n 50) 'Server.Engines.XmlSpawner' denotes a 'namespace' where a 'class' was expe
cted
- Error: Scripts\Custom\Town Invasion\SpawnRegistry.cs: CS0118: (line 100, colu
mn 8) 'Server.Engines.XmlSpawner' denotes a 'namespace' where a 'class' was expe
cted
- Error: Scripts\Custom\Town Invasion\SpawnRegistry.cs: CS0118: (line 101, colu
mn 8) 'Server.Engines.XmlSpawner' denotes a 'namespace' where a 'class' was expe
cted

Here is the script:

Code:
using System;
using System.IO;
using System.Collections;
using Server;
using Server.Items;
using Server.Regions;
using Server.Mobiles;

namespace Server.Engines.WarEvents
{
	public class SpawnRegistry
	{
		private ArrayList spawners;

		public ArrayList Spawners
		{
			get
			{
				return spawners;
			}
			set
			{
				spawners = value;
			}
		}

		public SpawnRegistry()
		{
			spawners = new ArrayList();
		}

		public void DisableSpawners(GuardedRegion r)
		{
			if (r == null) return;

			Map thismap = r.Map;

			if (thismap == null) return;
                    
			foreach(object o in r.Coords)
			{
				Rectangle2D rectangle;

				if (o is Rectangle3D)
				{
					rectangle = new Rectangle2D((((Rectangle3D)o).Start.X),(((Rectangle3D)o).Start.Y),(((Rectangle3D)o).Width),(((Rectangle3D)o).Height));
				}
				else
				{
					rectangle = (Rectangle2D)o;
				}

				IPooledEnumerable eable = thismap.GetItemsInBounds(rectangle);

				foreach(Item item in eable)
				{
					if (item != null && item is Spawner && !item.Deleted)
					{
						SpawnRecord sr = new SpawnRecord(item,((Spawner)item).Count);

						if (sr != null)
						{
							((Spawner)item).Count = 0;
							((Spawner)item).Respawn();
							spawners.Add( sr );									
						}
					}
					else if (item != null && item is XmlSpawner && !item.Deleted)
					{
						SpawnRecord sr = new SpawnRecord(item,((XmlSpawner)item).MaxCount);

						if (sr != null)
						{
							((XmlSpawner)item).MaxCount = 0;
							((XmlSpawner)item).DoReset = true;
							spawners.Add( sr );
						}

					}				
				}

				eable.Free();
			}
		}

		public void EnableSpawners()
		{
			if (spawners == null) return;

			for(int i=0;i<spawners.Count;i++)
			{	                  
				SpawnRecord sr = spawners[i] as SpawnRecord;

				if (sr.Spawner != null && sr.Spawner is Spawner && !sr.Spawner.Deleted)
				{
					((Spawner)sr.Spawner).Count = sr.Maxcount;
				}			
				else if (sr.Spawner != null && sr.Spawner is XmlSpawner  && !sr.Spawner.Deleted)
				{
					((XmlSpawner)sr.Spawner).MaxCount = sr.Maxcount;
					((XmlSpawner)sr.Spawner).Running = true;
				}

				spawners.RemoveAt(i);	
				i--;
			}
		}
	}
}
 

ArteGordon

Wanderer
ah, unfortunate namespace choice on my part for the attachments. I will change this in the next release and that will resolve the namespace/class conflict you are seeing.
 

ArteGordon

Wanderer
updated to version 2.65

- note installation steps 7 and 8 were changed slightly to reflect a namespace modification. If you have made these changes already, please note the update.

from the changelog

Version 2.65
update 10/13/04
- added two new attachments, XmlMorph, and XmlDialog.

- added an additional .xml example of the use of the XmlMorph and XmlDialog attachments in morph.xml and dialog.xml. The dialog.xml example assumes that you have the travelagent.npc file installed either in your RunUO home directory, or in the XmlQuestNPC folder in the home directory. Dialog.xml will spawn a chest that will interact with players using the travelagent.npc speech file. Morph.xml will spawn one item that morphs when approached, one that morphs when the word "open" is spoken next to it, and several mobs that morph in different ways for different lengths of time.

- modified a few of the previous attachments to support mob speech and movement.

- made a namespace modification to avoid class/namespace conflicts (changed the attachment namespace from Server.Engines.Xmlspawner to Server.Engines.Xmlspawner2). Unfortunately, this will cause previous attachments in existing saves to be removed when they are loaded on the next server restart (it will complain about not being able to deserialize them).

- installation steps 7 and 8 have been changed to reflect the namespace change.
 

ArteGordon

Wanderer
just a quick comment on the XmlDialog attachment. It is basically the TalkingBaseCreature class that has been turned into an attachment that can be used on mobs or items, so it has almost exactly the same functionality as the TalkingBaseCreature and will load any of the .npc files that work with TalkingBaseCreature.
One difference is that it doesnt generate actual speech the way TalkingBaseCreature does, and so all the text that you see is in the form of public overhead messages (actual speech means that it can trigger the OnSpeech method in the same way that a players speech can).
This means that you cant have two entities (mobs or items) talking to each other using the XmlDialog attachment, so examples such as the Abbott and Costello .npcs wont work using this attachment, but things like the travelagent.npc that just involve player speech activation will work just fine.
 

Anvil

Wanderer
Arte are you missing the reportmurder.cs and xmlquestgump.cs files from your zips? I had to take them from a previous installation (2.63 or newer) as I didn't see them in your 2.64 release file... I'm going to assume they're included with your newest 2.65 files?

Anvil
 

ArteGordon

Wanderer
the xmlquestgumps.cs is in the xmlspawner2-v265-2of2.zip file (I'm not sure if I forgot to include it in the 2.64 package).
I have not included a modified version of reportmurderer.cs in any of the packages and just provide the instructions on where to add the one line needed.
 
Top