is this for ServUO- i know it says xmlspawner but it could be RunUO... i have run into alot of this here ;)(was messing with light coding for 6months on & off & havent touched it in awhile

i have been comparing this Cs with the stock guard cs & it looks very different but theres also 6 spawn types in the killable guard file so i am unsure either way

http://servuo.com/threads/lightweight-killable-guards.1201/

i dont wanna mess with it until im sure lol

please tell me i can use this....

THE REASON I AM LOOKING AT THIS IS

it looks like everything i need to make fast NPC faction mobs in cities or other
instead of a bunch a gump dancing & having to do alot of the same thing over *&* over again
I can do 8 factions in a week with this, & edit them anytime i want once i have a working template

& spend the time i need on quest building (crosses fingers):p
-------------------------------------------------------------------------------------------------------------
 
RunUO doesn't include Xmlspawner, it must be added.

Are you wanting to add to the real factions like the ones currently in UO: True Britannians, Council of Mages, Minax and Shadowlords? Or are you doing something different?

Xmlspawner has a Mob Factions addon that allows you to create factions very easily. While not a "true" faction system like the ones currently in UO (players don't have to "join" to earn faction points, there's no voting for a faction leader, etc) you are still able to set up specific faction-based quests, mobs to kill, etc.
 
so killable guards is for xmlspawner?
or is it for ServUO xmlspawner

let me try to clear this up

im trying to setup ServUO server at the moment using xmlspawner 2
i want to add attackable humans with custom hues dress & weapons not new items
just be able to change what they are wearing. with set names instead of suchinsuch the guard

for now i tried out doing this

Creatures:
An example of the specification would be instead of just listing an ogre to be spawned you would list an ogre/name/The Butcher/str/190/damagemax/50/hue/500, which would create a blue ogre, named "The Butcher", with 190 strength, and maximum attack damage of 50.


from Milva's

http://www.servuo.com/threads/xml-spawner-tutorial.98/

but this is for creatures
have had some sucess with this changing their skin color on (guards)

but weapons armor locked
i wanna be able to set them like any other creature on the list of mobiles

but yes i do want npc factions for roleplay 5 opposing sides for story ark

i hope this is clear...
 
Last edited:
so killable guards is for xmlspawner?
or is it for ServUO xmlspawner

let me try to clear this up

im trying to setup ServUO server at the moment using xmlspawner 2
i want to add attackable humans with custom hues dress & weapons not new items
just be able to change what they are wearing. with set names instead of suchinsuch the guard

for now i tried out doing this

Creatures:
An example of the specification would be instead of just listing an ogre to be spawned you would list an ogre/name/The Butcher/str/190/damagemax/50/hue/500, which would create a blue ogre, named "The Butcher", with 190 strength, and maximum attack damage of 50.


from Milva's

http://www.servuo.com/threads/xml-spawner-tutorial.98/

but this is for creatures
have had some sucess with this changing their skin color on (guards)

but weapons armor locked
i wanna be able to set them like any other creature on the list of mobiles

but yes i do want npc factions for roleplay 5 opposing sides for story ark

i hope this is clear...
You can do all that with Xmlspawner. Going from Milva's example and taking it a step further:
Code:
elfbrigand/name/The Arrow/str/175/damagemax/35/hue/500
which would create a blue elf brigand, named "The Arrow", with 175 strength, and maximum attack damage of 35

Now, lets say you want that to equip that brigand with a special bow. Using the same code, you would make these additions:
Code:
elfbrigand/name/The Arrow/str/175/damagemax/35/hue/500/UNEQUIP,TwoHanded,Delete/Equip,TwoHanded/<magicalshortbow/name/The Punisher/hue/1151>/
Now that elf brigand has a magical short bow equipped named The Punisher with a white hue. You could continue to make changes to that magical short bow as well. Any property for a bow can be changed right on a spawner. Just note the < > that are surrounding the bow itself, that is key. Without the < > the spawner doesn't see you're making those changes to the bow and assumes you're making those changes to the mob itself. This kind of thing can be done for everything you want to equip a mob with. The catch here is, only humans can wear gear and wield weapons.

In the long run, doing the above for more than a handful of mobs is a major pain. It's much easier to script them instead.
 
thank you i must of missed the <> part of milva's tutorial but yea Major pain to do for the whole server cause you cant just cut & paste these spawners in game once one is done.

like make one then clone it & put another one somewhere else & make changes to it
that would be epic...

So i am looking at the WarriorGuard.Cs in the Guard file can I:

change all the "WarriorGuard" to a new name change the stats & hues armor & put it in the guards file "under dif name like NewGuard & have it show up in the xmlspawner in game or am i dreaming...
 
hey this worked
"change all the "WarriorGuard" to a new name change the stats & hues armor & put it in the guards file "under dif name like NewGuard & have it show up in the xmlspawner"
Sorta
i need to get rid of some of the code like them teleporting & disappearing

& the insta kill protocol

so how would i change their armor hues in the .Cs this is what i did

Code:
				AddItem(new PlateArms());
				Hue = 2949;

whats the right way
 
really its not changing though its still standard metal hue huh

maybe i missed something ill play with that after i change these

things i found & want to delete from modded WarriorGuard.Cs file

but am unsure which parts. first ima make a new .Cs And paste what i think is needed & leave out what i dont want & run it see what happens if i get a fatal ill put it in but these have to go

1 // If a guard dies, three more guards will spawn
(this could be cool for like kill one 3 appear kill 3 6 appear & so on until you kill awhole mob just saying but has to go for now

2 // </instakill>

3 TeleportTo(Mobile target) what is this i wanna get rid of all teleporting for this spawn?
 
I don't have the scrips in front of me to see what it is you're making changes to. Would you please post the script in code brackets?
 
Heres the stuff im looking at
Code:
		public override bool OnBeforeDeath()
		{
			if (m_Focus != null && m_Focus.Alive)
			{
				new AvengeTimer(m_Focus).Start(); // If a guard dies, three more guards will spawn
			}

			return base.OnBeforeDeath();
		}



Code:
		private class AvengeTimer : Timer
		{
			private readonly Mobile m_Focus;

			public AvengeTimer(Mobile focus)
				: base(TimeSpan.FromSeconds(2.5), TimeSpan.FromSeconds(1.0), 3)
			{
				m_Focus = focus;
			}

			protected override void OnTick()
			{
				Spawn(m_Focus, m_Focus, 1, true);
			}
		}



Code:
					// <instakill>
					TeleportTo(target);
					target.BoltEffect(0);

					if (target is BaseCreature)
					{
						((BaseCreature)target).NoKillAwards = true;
					}

					target.Damage(target.HitsMax, m_Owner);
					target.Kill(); // just in case, maybe Damage is overriden on some shard

					if (target.Corpse != null && !target.Player)
					{
						target.Corpse.Delete();
					}


Code:
				} // </instakill>
				/*else if ( !m_Owner.InRange( target, 20 ) )
                {
                m_Owner.Focus = null;
                }
                else if ( !m_Owner.InRange( target, 10 ) || !m_Owner.InLOS( target ) )
                {
                TeleportTo( target );
                }
                else if ( !m_Owner.InRange( target, 1 ) )
                {
                if ( !m_Owner.Move( m_Owner.GetDirectionTo( target ) | Direction.Running ) )
                TeleportTo( target );
                }
                else if ( !m_Owner.CanSee( target ) )
                {
                if ( !m_Owner.UseSkill( SkillName.DetectHidden ) && Utility.Random( 50 ) == 0 )
                m_Owner.Say( "Reveal!" );
                }*/
			}

Code:
			private void TeleportTo(Mobile target)
			{
				Point3D from = m_Owner.Location;
				Point3D to = target.Location;

				m_Owner.Location = to;

				Effects.SendLocationParticles(
					EffectItem.Create(from, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
				Effects.SendLocationParticles(EffectItem.Create(to, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);

				m_Owner.PlaySound(0x1FE);
			}



Avenger timer looks like part of the spawn three more why i added it

the teleporting is not needed & I have another i may want to change is the IdleTimer not sure if its what i think it is yet that can wait
 
:DTo be clear the original WarriorGuard.Cs is still there i am jus using this as a template to make my own killable guards & learn a lil more about the Code.
it looks like i need a base File like baseGuard.Cs for my killable Guards script?
o_O
 
Base classes setup general info that every item that is assigned to that class inherits. Like all monsters inherit things from Basecreature. You don't have to have a base class for your guards, they could inherit from Basecreature. Look at this class for an Actor:
Code:
	public class Actor : BaseCreature 
	{ 
		[Constructable] 
		public Actor () : base( AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4 ) 
		{
Even though the Actor is human, he's still inheriting from Basecreature and he is also assigned Animal AI.
So, you could build a new class for your guards, but it'd still need to inherit from some original class construct (like Basecreature). So you would do:
Code:
 public class BaseWarriorGuard : BaseCreature
{
	[Constructable]
	public BaseWarriorGuard (): base(AIType.AI_"Insert AI Here", FightMode.Closest, 10,1,0.2,0.4)
	{

Then fill in things under the Base class constructable you want ALL those guards to inherit (like gear for example).
 
"general info that every item that is assigned to that class inherits. "

is this why items are not changing color?





.... i know this should be easy but im making a mistake somewhere

i know ima adumbdumb :D

im editing a copy of human brigand right now but i cant get it to hue the items & weapons from the script am i missing something the skin does change but nothing else


Code:
        // outfit

			AddItem(new PlateArms());
			Hue = 01;
			
			AddItem(new PlateGloves());
			Hue = 01;

doing this as a test but nothing happen the items spawn but no hue change

I even try'd this.Hue = 01
& a few different hues nothin
 
Last edited:
Maybe try
PlateArms.Hue = 01;

this what i had
Code:
			AddItem(new PlateArms());
			Hue = 01; 	
			AddItem(new PlateGloves());
			Hue = 01;
			AddItem(new PlateLegs());
			Hue = 01;

i just tried this it throws errors

Code:
			AddItem(new PlateArms.Hue = 01; 	
			AddItem(new PlateGloves.Hue = 01;
			AddItem(new PlateLegs.Hue = 01;

()); do i need these

sorry i maybe messing up syntax
 
:eek:-Errors: Mobiles/Monster/Humanoid/FigthingMen.Cs:
CS0120: Line 46, 48,50,54:
An object reference is required for the non-static field,
method, property 'Server.Item.Hue.get'


Code:
using System;
using Server.Items;

namespace Server.Mobiles
{
    [CorpseName("a human corpse")]
    public class FightingMen: BaseCreature
    {
        [Constructable]
        public FightingMen()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.Race = Race.Human;

            {
                this.Body = 400;
                this.Name = "A";
            }

            this.Title = "FatalPrime FightingMen";
            this.Hue = 2949;

            this.SetStr(86, 100);
            this.SetDex(81, 95);
            this.SetInt(61, 75);

            this.SetDamage(10, 23);

            this.SetDamageType(ResistanceType.Physical, 100);

            this.SetResistance(ResistanceType.Physical, 10, 15);
            this.SetResistance(ResistanceType.Fire, 10, 15);
            this.SetResistance(ResistanceType.Poison, 10, 15);
            this.SetResistance(ResistanceType.Energy, 10, 15);

            this.SetSkill(SkillName.MagicResist, 25.0, 47.5);
            this.SetSkill(SkillName.Tactics, 65.0, 87.5);
            this.SetSkill(SkillName.Wrestling, 15.0, 37.5);

            this.Fame = 1000;
            this.Karma = -1000;

            // outfit

			AddItem(new PlateArms());
			PlateArms.Hue = 01;
			AddItem(new PlateGloves());
			PlateGloves.Hue = 01;
			AddItem(new PlateLegs());
			PlateLegs.Hue = 01;
			
            // weapon
            Halberd weapon = (new Halberd());
			Halberd.Hue = 1171;	
			
            this.AddItem(weapon);
			
            this.PackGold(25, 89);
        }

        public FightingMen(Serial serial)
            : base(serial)
        {
        }

        public override bool AlwaysMurderer
        {
            get
            {
                return true;
            }
        }
        public override bool ShowFameTitle
        {
            get
            {
                return false;
            }
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (Utility.RandomDouble() < 0.75)
                c.DropItem(new PristineDreadHorn());
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
        }
    }
}

  • this.Title = "FatalPrime FightingMen";
this.Hue = 2949;

^ this works the skin changes to the color i want ( this is a mod of the Elf brigand Script have only changed the outfit weapon & added hues & of course changed the public class
titles etc.
 
Try this for each piece, just change the names :) If you still get an error, then you need something at the very top of the script.
Item platearms;
platearms = new PlateArms();
platearms.Hue = 01;
AddItem(platearms);
 
it worked it worked thank you haha soon as i saw it i was like yup nice & redundent just how code likes it

now i just got get the weapon to hue :D& then i can play with AI & base creature :eek:
 
Your welcome, this script really isn't xml though :)
Halberd weapon = new Halberd();
weapon.Hue = 1171;
weapon.Movable = false;
AddItem(weapon);
 
ha im just happy i got threw that wow lol that is fun!?:Dty for helping me
I am learning you guys are awesome to put up with my horrible grammer & uneducated syntax. I now have made two scripts & plan to play around with xmlquest tutorial tomorrow... by next week i should be ready to start populating Trammel with my own npc's. Writing out some beginners quests.

im actually about to look for a better client the one i was using was 7.35. so i think i want 7.33.. :mad:Ima really do it because i dont like the more detailed status gump its just to big & looks un UO.;) the older original gump no extra's
 
Last edited:
Back