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.
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.
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-
//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;
}
//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
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;
}
}
//Zombiex
if (m_Killer is Zombiex)
this.Delete();
//Zombiex end
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);
}
}
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);
}
}