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!

A Contagious Zombie

jhs59

Sorceror
Look at line 151 of your OppositionGroup.cs

The error you're getting is saying that there should be a ) at the end of that line. Check it out and see. :)
 

Hemectu

Wanderer
Yes I had already fixed that error, but thank you for the response :)

What I need help with is the next 5 errors, which is probably one edit fix. But not sure what.

..... LOL....

Ok I found out what I had done wrong... well basically you know you have spent too much time script editing when you configure all the scripts correctly but forget to actually place the script files into your customs folder. After puting the zombie files into my customs folder it compiles fine.

If your not laughing I sure as hell am right now. :D :D
 

jhs59

Sorceror
HAHA! Actually I should have paid attention. I stopped reading your error report after that first error.

I did the exact same thing and forgot to add them as well the first time I compiled. hehe :p
 

Rayne

Wanderer
Macil;720996 said:
A timer so they die after so long or something? Like a summoned creature perhaps? That sounds like one good way to keep the population down.


You can always use an xmlspawner and have it spawn this type of zombie, setting a time for despawn :) xmlspawners are the best way to control a spawn in a custom way.
 

Spookyrobert

Sorceror
Rayne;753302 said:
You can always use an xmlspawner and have it spawn this type of zombie, setting a time for despawn :) xmlspawners are the best way to control a spawn in a custom way.

Sorry i have been MIA, My shop has kept me busy, I recently took over a body piercing shop and I can't seem to find the free time to script anymore.

They have a timer kinda, the STR drops every so often (decaying) and when drops to low they die. Also when they attack and are attacked the STR drops (muscles breaking) works faster if fighting a player.

So they will die off and not wonder the map for too long but they will infect others.

I would like to thank the other people that have helped with the errors with my script, you're the reason I love these forums, tons of community help.
 

Thagoras

Sorceror
Sorry to dredge up old thread

I love this script! However, I thought it a bit powerful (a zombie can kill a daemon) so I modified it so the stats (strength, hp, etc...) were a multiple of the original stats. No reason why a zombie sparrow has 100+ hp.
Ran into something interesting though...I like the fact that the zombies will attack other mobiles. So for fun I used the Pirates that chase you script....and spawned them in the water. The zombies were on shore. They aggro the pirates, who start to attack back. The zombies are poisoning the pirates without coming in contact with them.
Is there any way to make it so they HAVE to at least touch (hit, bite, slap, kick, wrestle) with their target in order to poison them? Or do I have to modify the Poison script?

-Nathan-
 

nadious

Sorceror
I really want to try this script out, but I would like to REMOVE the timer in which is makes the zombie decay. I'd like to use the idea of having it with regular undead (in graveyards, etc) and NOT using the distro edit, so it only infects players.

I took a look at it myself, but I'm still a little 'too new' with scripting to figure out what needs to be removed. Can anyone point me in the right direction there?

The idea of this is wicked cool...
 

Thagoras

Sorceror
Ok,

Was just wondering a few things.

Humanoid mobiles. Any way to get them to become the zombie mobile every time?

Player corpse. So there's a zombie nathan AND a corpse of the fallen nathan?

Inventory/Gear. This goes along with Player corpse...oh, and humanoid mobiles. Any way to make it so the inventory/gear transfers to the zombie? Minus blessed/insurred items of course? I just think it's more fun if a zombie gets you....you run to get rezed and have to kill your zombie self to get your stuff back.

That last point is more important than the first two...because then at least the zombie nathan would be dressed like i used to be dressed...if you understand me.

thanks
(you folks really are good help)

-Nathan-
 

wolfblader

Wanderer
SOUNDS FREAKING SWEET !! Sounds like Zombie mode in CSS FTW !! and since its just one char mod ima tkae it and make it into a event You know !!! ill take his hp up a bit and they can only using one type of weapon one hit will turn players into zombie so kill him fast type of thing iv heard about it and its prolly already out there but hey wtf ever lol THnxm ap i m dl it and hope it works !!
 

Spookyrobert

Sorceror
Thagoras;769807 said:
Ok,

Was just wondering a few things.

Humanoid mobiles. Any way to get them to become the zombie mobile every time?

Player corpse. So there's a zombie nathan AND a corpse of the fallen nathan?

Inventory/Gear. This goes along with Player corpse...oh, and humanoid mobiles. Any way to make it so the inventory/gear transfers to the zombie? Minus blessed/insurred items of course? I just think it's more fun if a zombie gets you....you run to get rezed and have to kill your zombie self to get your stuff back.

That last point is more important than the first two...because then at least the zombie nathan would be dressed like i used to be dressed...if you understand me.

thanks
(you folks really are good help)

-Nathan-

Sorry I'm not really around to help out with this script.... RL has kept me busy.

I know there is a creature out there that copies what is is fighting, try taking a look at that and see if you can apply it the zombie. I thought it might be too hard to get your stuff back and if it didn't take it,if the stuff was just copied, I was worry about people "dupeing" items.

Please feel free to post any changes you have made, I would love it if my zombie script ends up infested all of the runuo severs *mah ha ha haaa* Sadly as stated before I no longer have the time to make any improvements.
 

sirdon71854

Sorceror
Just a thought. But id there was something to remove a zombie or zombie copy. It would be cool to make a bow that shoots it.Like say have a potion bottle that they carry around in their pack.You have the bow use the potion bottle as ammo.The bottle has only so many times before it disappears.You could name the bottle something like zombie posion.That way it would be like posion dipped bolts or arrows that you use to shoot the zombies and cure ( kill ) them.Just something that poped up in my head while I was on here.Great script and ++ Kama to you. Keep it up!!

Don
aka The Lego King.:cool:
 

Thagoras

Sorceror
Ok, made a little progress.

Grabbed a few things from Ninjitsu spell Mirror image (simple script) and the deal is, it WILL copy npcs things, but not players. Any ideas?

Code:
//Start Zombiex edit
			 
			Mobile killerx = this.FindMostRecentDamager( true );

			if ( killerx is Zombiex )
			{

				//What Should the Zombie virus not affect
				if ( this.Summoned || this is Zombiex || this is AncientLich || this is Bogle || this is LichLord || this is Shade || this is Spectre || this is Wraith || this is BoneKnight || this is Ghoul || this is Mummy || this is SkeletalKnight || this is Skeleton || this is Zombie || this is ShadowKnight || this is DarknightCreeper || this is RevenantLion || this is LadyOfTheSnow || this is RottingCorpse || this is SkeletalDragon || this is AirElemental || this is IceElemental || this is ToxicElemental || this is PoisonElemental || this is FireElemental || this is WaterElemental || this is EarthElemental || this is Efreet || this is SnowElemental || this is AgapiteElemental || this is BronzeElemental || this is CopperElemental || this is DullCopperElemental || this is GoldenElemental || this is ShadowIronElemental || this is ValoriteElemental || this is VeriteElemental || this is BloodElemental ) 
				{
					return base.OnBeforeDeath();
				}
				else 
				{
				
					double dhits, dstr;

					Zombiex zomb = new Zombiex();
					
					zomb.Map = this.Map;
					zomb.Female = this.Female;
					zomb.Body = this.Body;
					zomb.Location = this.Location;
					zomb.Hue = 768;
					zomb.Name = this.Name;
					zomb.Title = "*Infected*";

					dhits = this.HitsMax/2;
					dstr = this.Str/2;
			for ( int i = 0; i < this.Skills.Length; ++i )
			{
				zomb.Skills[i].Base = this.Skills[i].Base;
				zomb.Skills[i].Cap = this.Skills[i].Cap;
			}

			for( int i = 0; i < this.Items.Count; i++ )
			{
				zomb.AddItem( CloneItem( this.Items[i] ) );
			}

					zomb.HitsMaxSeed = this.HitsMax + (int) dhits;
					zomb.Hits = this.HitsMax + (int) dhits;
					zomb.DamageMin = this.DamageMin;
					zomb.DamageMax = this.DamageMax;
					zomb.Str = this.Str + (int) dstr; 
					this.Delete();
					new Zombiex();
				}

			}
//End Zombiex edit

			return base.OnBeforeDeath();
		}

		private Item CloneItem( Item item )
		{
			Item newItem = new Item( item.ItemID );
			newItem.Hue = item.Hue;
			newItem.Layer = item.Layer;

			return newItem;
		}
 

peepeetree

Sorceror
Hands down this is my favorite runuo script, I created a dungeon with these guys in it and spawning wandering healers. At the end of the dungeon is a really hard zombie boss and lol watching people try to make it through was great. Can't thank you enough for this script!
 

Thagoras

Sorceror
Hello again. Ok, as I'm getting little to no help for these things I wanted to do with this script, I had to figure it out myself.

Got a number of things accomplished. I posted already about the zombiexs looking like their NPC counterpart. I did finally figure out the issues with the Playermobile though (Mostly).

Add this in the PlayerMobile.cs in the BeforeDeath section.
Code:
//Zombiex
            Mobile killer = this.FindMostRecentDamager(true);
		if (killer is Zombiex)
		{
			double dhits, dstr;
			Zombiex zomb = new Zombiex();
					
			zomb.Map = this.Map;
			zomb.Female = this.Female;
			zomb.Body = this.Body;
			zomb.Location = this.Location;
			zomb.Hue = 768;
			zomb.Name = this.Name;
			zomb.Title = "*Infected*";

			zomb.HairItemID = this.HairItemID;
			zomb.HairHue = this.HairHue;
			zomb.FacialHairItemID = this.FacialHairItemID;
			zomb.FacialHairHue = this.FacialHairHue;

			dhits = this.HitsMax/2;
			dstr = this.Str/2;
			for ( int i = 0; i < this.Skills.Length; ++i )
			{
				zomb.Skills[i].Base = this.Skills[i].Base;
				zomb.Skills[i].Cap = this.Skills[i].Cap;
			}

			for( int i = 0; i < this.Items.Count; i++ )
			{
				zomb.AddItem( zomb.CloneItem( this.Items[i] ) );
			}

				Backpack bag = new Backpack();
				Container pack = this.Backpack;
				ArrayList equipitems = new ArrayList(this.Items);
				ArrayList bagitems = new ArrayList( pack.Items );

				foreach (Item item in equipitems)
				{
					if ((item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack) && (item.Layer != Layer.Hair) && (item.Layer != Layer.FacialHair))
					{
						pack.DropItem( item );
					}
				}

				Container pouch = this.Backpack;
				ArrayList finalitems = new ArrayList( pouch.Items );

				foreach (Item items in finalitems)
				{
					bag.DropItem(items);
				}

				bag.Hue = 768;
				//bag.MoveToWorld (zomb.Location, zomb.Map);
				zomb.AddItem( bag );

			zomb.HitsMaxSeed = this.HitsMax + (int) dhits;
			zomb.Hits = this.HitsMax + (int) dhits;
			zomb.Str = this.Str + (int) dstr; 
//			this.Delete();
			new Zombiex();
		}
//Zombiex end

You need to comment out the "if ( defender is PlayerMobile )" in the Zombiex.cs in the
public override void OnGaveMeleeAttack( Mobile defender )

And add
Code:
		public Item CloneItem( Item item )
		{
			if ((item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack))
			{
				Item newItem = new Item( item.ItemID );
				newItem.Hue = item.Hue;
				newItem.Layer = item.Layer;

				return newItem;
			}
			else
			{
				Item newItem = new Bandage();
				return newItem;
			}
		}

Just somewhere...like before the RotTimer in the Zombiex.cs

And in the Corpses.cs, in the BeginDecay add

Code:
//Zombiex
			if (m_Killer is Zombiex)
				this.Delete();
//Zombiex end

The ONLY problem I got from this was the fact that the dropitem in the playermobile seems to ignore blessed and insurred status...so it moves everything to a backpack on the zombiex mobile. I know I need an If statement to take care of this, but don't really know its phrasing. It took me 3 days just to get this far.

Anyway, that's what I came up with.
 

Thagoras

Sorceror
Hey, Got it. Stole a lot of these changes from the jail script by Siren's Song. They did what I needed.

Towards the top of the modifications in the Playermobile.cs add
Code:
			if ( this.Mounted )
			{
				if ( this.Mount is EtherealMount )
				{
					EtherealMount pet = this.Mount as EtherealMount;
					pet.Internalize();
					pet.Rider = null;
				}
				else if ( this.Mount is BaseMount )
				{
					BaseMount petm = this.Mount as BaseMount;
					petm.Rider = null;
					BaseCreature pet = petm as BaseCreature;
					pet.Internalize();
					pet.ControlTarget = null;
					pet.SetControlMaster( null );
					pet.SummonMaster = null;
					pet.MoveToWorld(zomb.Location, zomb.Map);
				}
			}

Just realized there was a serious mount issue that was unresolved. If mounted, the zombie would be on your mount and then when killed it would keep your mount.

And then find
Code:
				foreach (Item item in equipitems)
				{
					if ((item.Insured == false) && (item.LootType != LootType.Blessed) && (item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack) && (item.Layer != Layer.Hair) && (item.Layer != Layer.FacialHair))
					{
						pack.DropItem( item );
					}
				}

				Container pouch = this.Backpack;
				ArrayList finalitems = new ArrayList( pouch.Items );

				foreach (Item items in finalitems)
				{
					if ((items.Insured == false) && (items.LootType != LootType.Blessed))
					{
						bag.DropItem(items);
					}
				}

and make the changes in the if filters. This should fix that. The corpse is deleted and the clone module in the zombiex (which can also be used from the basecreature.cs) only clones the item...NOT copy it. It looks like the item but it doesn't have all the properties.

Hope this has been helpful to everyone wanting this script do more, like me. An awesome concept but needed a little more.

Thanks!
 

Cyndrz

Wanderer
Now that's what i call a true plague and the idea is almost scary and if someone is using this and has added a timer to stop it, please share cause this would be alot of fun but not at the expense of destroying my server.

I have a small player base and they wouldnt be able to keep up with it the way it sits.
 

Thagoras

Sorceror
There is a decay (rot) timer built into it...so that the zombies die after so long (I think it's 10 minutes or so, but I sure that can be adjusted) just to make sure that it's not a serious epidemic. The only problems you may encounter is if you place the zombiex spawner next to a normal spawner. As said in the first few posts about this, you may want it placed somewhere isolated. Placing this next to a normal spawner is like feeding the zombies...endless. It's really fun though...I've seen them take down dragons...and then you have this zombie dragon.
I have all my zombies on the felucca map, and they're the only spawn (for the most part...there are some creatures that they're programmed to ignore). But restricting them to a specific location will save on server crashes. I suppose you could program them to delete if they find their way to a region or map.
if (this.Map == Map.Trammel)
this.delete;
You could (although I haven't fiddled with the time system yet) perhaps make them restrictive to a season, day/night, or perhaps just time...but I haven't figured out timers yet either.
 
Top