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

Bane

Wanderer
Happy Holidays Arte,

I was wondering if you would consider adding a prop that would make a creature break of an engagement with a player after getting a certain range from the spawner and going back to his original spawn location.

I have a good number of custom creatures, many made with your spawner, thank you for this. What we are trying to stop is the player running in, targeting the creature, leading them far from the battle and killing them there.

Don't know it this is possible but if so would be a nice add.

Thanks again for this great script...
 

ArteGordon

Wanderer
Bane said:
Happy Holidays Arte,

I was wondering if you would consider adding a prop that would make a creature break of an engagement with a player after getting a certain range from the spawner and going back to his original spawn location.

I have a good number of custom creatures, many made with your spawner, thank you for this. What we are trying to stop is the player running in, targeting the creature, leading them far from the battle and killing them there.

Don't know it this is possible but if so would be a nice add.

Thanks again for this great script...
ah yes, how to deal will pullers. Breaking engagement at range is an easy thing to implement but introduces other problems. You would have people exploiting this by pulling mobs out to their disengagement range and then using the fact that they would rather go home than fight to whack them without fear of attack while they returned. You could get around this by having them instantly tele home when beyond a set range, instead of wandering back.
 

ArteGordon

Wanderer
If you would like to test out a quick mod that implements this here is it

You need to make one change in BaseCreature.cs and another in the AI files such as MeeleeAI.cs and MageAI.cs in Scripts/Engines/AI/AI

In BaseCreature.cs just drop this in somewhere to define a new PullRange property.

Code:
		private int m_PullRange;
		public int PullRange { get { return m_PullRange; } set { m_PullRange = value; }}

and then in your ai file such as MeeleeAI.cs at the end of the DoActionCombat() method (around line 125 in RC0) change this

Code:
	return true;
		}

to this

Code:
// antipull mod
		if(m_Mobile.PullRange > 0 && m_Mobile.GetDistanceToSqrt( m_Mobile.Home ) > m_Mobile.PullRange)
		{
			// insta tele home with a poof
			Effects.SendLocationParticles( Server.Items.EffectItem.Create( m_Mobile.Location, m_Mobile.Map, Server.Items.EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
			m_Mobile.MoveToWorld(m_Mobile.Home, m_Mobile.Map);
				
		        // clear the combatant and switch to guard
			m_Mobile.Combatant = null;
		        Action = ActionType.Guard;
		}

		return true;
	}

I also tacked on a spawner pair to set up a mob and set the pullrange that you can try out. I used SETONSPAWN in a control spawner to avoid having to serialize/deserialize the pullrange property on basecreatures. The control spawner just updates the pullrange property on the spawns defined on the mob spawner.

Code:
<?xml version="1.0" standalone="yes"?>
<Spawns>
  <Points>
    <Name>NoPullController</Name>
    <UniqueId>4447545b-1da9-4f1c-969b-5210c4b2a299</UniqueId>
    <Map>Felucca</Map>
    <X>5434</X>
    <Y>1144</Y>
    <Width>10</Width>
    <Height>10</Height>
    <CentreX>5439</CentreX>
    <CentreY>1149</CentreY>
    <CentreZ>0</CentreZ>
    <Range>5</Range>
    <MaxCount>1</MaxCount>
    <MinDelay>5</MinDelay>
    <MaxDelay>5</MaxDelay>
    <DelayInSec>True</DelayInSec>
    <Duration>0</Duration>
    <DespawnTime>0</DespawnTime>
    <ProximityRange>-1</ProximityRange>
    <ProximityTriggerSound>500</ProximityTriggerSound>
    <TriggerProbability>1</TriggerProbability>
    <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>SETONSPAWN,NoPullSpawner,1/pullrange/12:MX=1:SB=0:RT=0:TO=0:KL=0</Objects2>
  </Points>
  <Points>
    <Name>NoPullSpawner</Name>
    <UniqueId>c11f5411-14d3-4050-9bcf-f570127ef19e</UniqueId>
    <Map>Felucca</Map>
    <X>5439</X>
    <Y>1150</Y>
    <Width>0</Width>
    <Height>0</Height>
    <CentreX>5439</CentreX>
    <CentreY>1150</CentreY>
    <CentreZ>0</CentreZ>
    <Range>3</Range>
    <MaxCount>1</MaxCount>
    <MinDelay>5</MinDelay>
    <MaxDelay>10</MaxDelay>
    <DelayInSec>False</DelayInSec>
    <Duration>0</Duration>
    <DespawnTime>0</DespawnTime>
    <ProximityRange>-1</ProximityRange>
    <ProximityTriggerSound>500</ProximityTriggerSound>
    <TriggerProbability>1</TriggerProbability>
    <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>ogre:MX=1:SB=1:RT=0:TO=0:KL=0</Objects2>
  </Points>
</Spawns>

Note, you would need to make the same change in MageAI.cs in order for this to work with magic using mobs.
 
cool script... very sophisticated :p

So if I have a shard thats Fel only that isnt spawned. Is there a command that I can just type and then sit back and wait for the facet to be spawned?
 

ArteGordon

Wanderer
QuIcK_FiNgErS said:
cool script... very sophisticated :p

So if I have a shard thats Fel only that isnt spawned. Is there a command that I can just type and then sit back and wait for the facet to be spawned?

you would need to import some of the prespawned maps such as from Nerun's distro or cwards OSI world spawns, both are in script submissions.
You could download the maps and then type something like

[xmlimportmap Spawns/Felucca

where Spawns/Felucca was a folder in your main RunUO installation directory containing all of the .map files for spawning felucca.

You could also do them individually like

[xmlimportmap Spawns/Felucca/animals.map

I just made up the directory and filenames in this example so you would want to use the actual folders and files that came in the map packages.

Use the [xmlimportmsf command with .msf files.
 

ArteGordon

Wanderer
updated to version 2.73

from the changelog

New to Version 2.73
updated 1/14/05

- improved detection of roaming mob spawns which can suppress smartspawning. This will tend to yield around a 10% further reduction in mob count when using smartspawning.

- added the "[smartstat" command that provides information on the effectiveness of smartspawning on the server by reporting the total number of xmlspawners, the total number of spawns, and the number of spawns that are currently being suppressed as a result of smartspawning.
 

ArteGordon

Wanderer
updated to version 2.74

from the changelog


New to Version 2.74
updated 1/22/05

- IMPORTANT: this version contains modifications that are specific to RunUO 1.0.0

- modified questholder and questnote items to allow them to be spawned into containers in the world.

- added support for use of hex values (values with the format 0x#####) in property tests.

- added support for use of item/mob serial values in property tests and assignments. This allows, for example, the use of [xmlfind to find objects by serial number using the serial=0x##### property test.

- additional optimization to smartspawning. Now, only the individual objects with the HoldSmartSpawning property set to true will be restricted from smartspawning instead of the entire spawner being restricted. This allows further reduction in mob count when using smartspawning. The amount of improvement depends on how many mobs were defined with the HoldSmartSpawning property.

- added a "Goto" button on the spawner gump to replace the "Close" button (which was redundant with right click to close the spawner gump). This will teleport you to the location of the spawner.

- added a range test (default 2 tiles) to use of the simple and timed switch items. (thanks to aka Reu for the suggestion).

- calls to the the OnSpawned method have been replaced with the 1.0.0 OnAfterSpawn method that is now part of the standard distribution. OnAfterSpawn is invoked at the same point during spawning as OnSpawned was - after placement but before any spawn entry property modifications.

- support for the OnAfterSpawned method has been removed.

- support has been added for the 1.0.0 OnBeforeSpawn method that is called after spawn creation but before spawn placement. This also provides support for the 1.0.0 Paragon system.

- new 1.0.0 installation instructions have been added (basically the same as the RC0 instructions but with updated line numbers based on the 1.0.0 files).

- modified 1.0.0 versions of container.cs and stealing.cs have been added to support the stealable rares system under 1.0.0
 

Liam

Sorceror
I installed Xmlspawner2 this morning, using RC0 and am getting the following errors:

-Error: Scripts/Custom/Xmlspanwer2.cs: CS0234: (line 21, column 22) The type or namespace name 'XmlSpawner2' does not exist in the class or namespace 'Server.Engines' (are you missing an assembly reference?)
-Error: Scripts/Custom/XmlSpawner2/XmlSpawnerSkillCheck.cs: CS0234: (line 19, column 22)The type or namespace name 'XmlSpawner2' does not exist in the class or namespace 'Server.Engines' (are you missing an assembly reference?)
-Error: Scripts/Custom/Xmlspawner2/XmlSpawner2.cs: CS0246: (line 6248, column 31) The type or namespace name 'BaseXmlSpawner' could not be found (are missing a using directive or an assembly reference?)

I only have MegaSpawner installed and the original spawn system that comes with RunUO.

Any help is most appreciated. :)
 

Maxus

Sorceror
Any plans on adjusting Myrunuo spawner to operate with xml spawner? I found the reply from several months ago about this possibly happening, but i haven't found any more info about it. I want to use a spawner that is going to stay up to date with new releases of RunUO. I imagine there is a converter to take my Megaspawners and turn them into XMLspawners, i just havent checked yet.
The ease of use of the two programs working together has me quite ruined for spawning my world, and i hope something could be in the works for support of the Myrunuo spawner program with XMLspawner in the near future. :)
Unfortunatly it appears Outkast wont be able to assist now (everyone eventually has a life to attend to).
 

ArteGordon

Wanderer
it's that "life" thing. Always getting in the way. So I dont have any plans to take this on personally at this point. There is a command that allows you to import .msf files the same way that you import .map files.

[xmlimportmsf <filename or directoryname>
 

Quick_silver

Sorceror
Okay i read this thread till page 20, i learned much about the Spawner but now have one Problem with a Questreward.

I want to give a Bow to the Player and take the "Testquest". But i can only take the Quest OR give the Bow. How to setup the Spawner to do both at once?
 

ArteGordon

Wanderer
Quick_silver said:
Okay i read this thread till page 20, i learned much about the Spawner but now have one Problem with a Questreward.

I want to give a Bow to the Player and take the "Testquest". But i can only take the Quest OR give the Bow. How to setup the Spawner to do both at once?

you can assign the two spawn entries to the same subgroup. That way they will both be executed together.
You set the subgroup by expanding the spawner gump with the little arrow in the lower right corner. Then just enter in a subgroup number for each spawn entry. For example, just make them both subgroup 1.
 

Quick_silver

Sorceror
Yea now i got it.
But i dont understand the Subgroups completly.

If i have a Spawner Triggered every second by a Mobile with following commands:

IF/Switch 1/state=1/2 Sub: 1
IF/Switch 2/state=2/3 Sub: 2
SET/MyDoor/Open/True Sub: 3

It dosn't work. But Why? And how i have to set the Amounts?
 

ArteGordon

Wanderer
Quick_silver said:
Yea now i got it.
But i dont understand the Subgroups completly.

If i have a Spawner Triggered every second by a Mobile with following commands:

IF/Switch 1/state=1/2 Sub: 1
IF/Switch 2/state=2/3 Sub: 2
SET/MyDoor/Open/True Sub: 3

It dosn't work. But Why? And how i have to set the Amounts?

the syntax for IF tests is like this

Code:
IF/conditional test/thenspawn[/elsespawn]

so if you want to test whether the state property of an object that is named "Switch 1" has the value of 1, you need to do it like this

Code:
IF/GET,itemname[,itemtype],property=1/2

where I assume your item name is "Switch 1" and the property is state

so the full test would look like

Code:
IF/GET,Switch 1,state=1/2

Your SET syntax is also slightly off. The correct form is

Code:
SET,itemname[,itemtype]/prop/value

so to set the Open property on the object named "MyDoor" to true, you would do

Code:
SET,MyDoor/Open/True

Now, if you want these to be executed sequentially, you will need to enable SequentialSpawning, by setting that property to something greater than 0 (that will normally be done automatically if you set subgroups, but its worth checking)

Also, you probably want to add in a GOTO statement before your SET command so that if your IF tests fail, then it doesnt do the SET.

Also, if what you want to do is to open the door if both switches are set, then an easier way would be to simply have one compound test, like this

Code:
IF/GET,Switch 1,state=1 & GET,Switch 2,state=1/3    Sub: 1
GOTO/1      Sub: 2
SET,MyDoor/Open/True  Sub: 3

Note that you can find the syntax for the various keywords like IF and SET in the help menus on the spawner. Just hit the help button on the spawner gump.

(edit)

oh, and I'm not sure what you were referring to in your question about Amounts.

(edit)

also, the current active XmlSpawner2 thread is here
http://www.runuo.com/forum/showthread.php?t=49901
 

amon2

Sorceror
didnt work for me

i installed it and all i got was error after error .....is there anything i can do to get it working?
 
Top