Exemplo n.º 1
0
        public override void OnDamage(int amount, Mobile from, bool willKill)
        {
            ZombieAvatar avatar         = null;
            int          amountmodified = amount;

            if (Damagers != null)
            {
                if (from is ZombieAvatar)
                {
                    avatar = from as ZombieAvatar;
                }
                else if (from is BaseCreature && ((BaseCreature)from).GetMaster() is ZombieAvatar)
                {
                    avatar = ((BaseCreature)from).GetMaster() as ZombieAvatar;
                }
                if (avatar != null && Damagers.ContainsKey(avatar))
                {
                    Damagers[avatar] += amountmodified;
                }
                else if (avatar != null)
                {
                    Damagers.Add(avatar, amountmodified);
                }
            }

            base.OnDamage(amount, from, willKill);
        }
Exemplo n.º 2
0
        public void DetermineTarget(ZombieAvatar pm, object target)
	    {
            IEntity targetedEntity = target as IEntity;

	        if (targetedEntity is CacheChest)
	        {
	            pm.SendMessage(54, "Where do you wish to bury this cache chest?");
                pm.Target = new GenericSelectTarget<object>((m, t) => DetermineBuryLocation(pm, t, targetedEntity), m => { }, -1, true, TargetFlags.None);
	            return;
	        }
	        if (target is LandTarget)
	        {
	            var tile = ((LandTarget) target);
	            if (!Mining.m_MountainAndCaveTiles.Contains(tile.TileID))
	            {
                    pm.PlaySound(Utility.RandomList(0x126));
                    pm.Animate(11, 5, 1, true, false, 0);
                    pm.PublicOverheadMessage(MessageType.Label, pm.SpeechHue, true, "*Begins to dig*");
                    var list = tile.Location.GetEntitiesInRange(Map.ZombieLand, 3);
                    if (list.Exists(x => x is CacheChest && ((CacheChest)x).Buried))
                    {
                        pm.SendMessage(54, "You have found a cache!");
                        var chest = list.First(x => x is CacheChest) as CacheChest;
                        if (chest != null)
                        {
                            DigTimer = new InternalDigTimer(chest, pm);
                            DigTimer.Start();
                            pm.Frozen = true;
                        }
                        return;
                    }
                    pm.SendMessage(54, "There is nothing of note in this location.");
	            }
	            else
	            {
                    if (!HarvestSystem.CheckHarvest(pm, this))
                    {
                        return;
                    }

                    DoHarvest(pm, target);            
	            }
	        }
	    }
Exemplo n.º 3
0
        public ZombieClueGiverUI(
PlayerMobile user, ZombieAvatar avatar,
            string title = null,
            string html = null,
            Gump parent = null,
            int? x = null,
            int? y = null,
            Action<GumpButton> onAccept = null)
            : base(user, parent, 0, 0, title, null, 0, onAccept)
        {
            Title = title;
            CanMove = true;
            Closable = true;
            Modal = false;

            HTML = html;

            Avatar = avatar;
        }
        public ZombieAvatar CreateAvatar()
        {
            var mob = new ZombieAvatar(Owner);

            mob.Name = Owner.RawName;
            mob.Hue = Owner.Hue;
            mob.FacialHairItemID = Owner.FacialHairItemID;
            mob.HairItemID = Owner.HairItemID;
            mob.HairHue = Owner.HairHue;
            mob.BodyValue = Owner.BodyValue;
            mob.RawStr = 45;
            mob.RawInt = 35;
            mob.RawDex = 35;
            mob.Hits = 60;
            mob.Stam = 35;
            mob.Mana = 35;
            mob.SkillsCap = 50000;
            mob.StatCap = 225;


            mob.Skills.Anatomy.Base = 35;
            mob.Skills.Macing.Base = 35;
            mob.Skills.Swords.Base = 35;
            mob.Skills.Archery.Base = 35;
            mob.Skills.MagicResist.Base = 35;
            mob.Skills.Wrestling.Base = 35;
            mob.Skills.Fencing.Base = 35;
            mob.Skills.Poisoning.Base = 40;
            mob.Skills.ItemID.Base = 25;
            mob.Skills.ArmsLore.Base = 25;
            mob.Skills.Alchemy.Base = 40;
            mob.Skills.Parry.Base = 10;
            mob.Skills.Blacksmith.Base = 40;
            mob.Skills.Fletching.Base = 25;
            mob.Skills.Peacemaking.Base = 40;
            mob.Skills.Camping.Base = 40;
            mob.Skills.Carpentry.Base = 40;
            mob.Skills.Cartography.Base = 40;
            mob.Skills.Cooking.Base = 40;
            mob.Skills.EvalInt.Base = 35;
            mob.Skills.Healing.Base = 40;
            mob.Skills.Forensics.Base = 40;
            mob.Skills.Inscribe.Base = 35;
            mob.Skills.Lockpicking.Base = 40;
            mob.Skills.Magery.Base = 35;
            mob.Skills.Tactics.Base = 35;
            mob.Skills.Tinkering.Base = 45;
            mob.Skills.Lumberjacking.Base = 40;
            mob.Skills.Mining.Base = 25;
            mob.Skills.Meditation.Base = 35;
            mob.Skills.RemoveTrap.Base = 40;
            ZombieAvatar = mob;

            return mob;
        }
Exemplo n.º 5
0
        public void DoHarvest(ZombieAvatar pm, object targeted)
	    {
            IEntity targetedEntity = targeted as IEntity;
            if (XmlScript.HasTrigger(targetedEntity, TriggerName.onTargeted) && UberScriptTriggers.Trigger(targetedEntity, pm, TriggerName.onTargeted, this))
            {
                return;
            }

            CustomRegion customRegion = pm.Region as CustomRegion;
            if (customRegion != null && customRegion.Controller != null)
            {
                SkillName skill = SkillName.Spellweaving; // placeholder
                if (HarvestSystem is Mining) skill = SkillName.Mining;

                if (customRegion.Controller.IsRestrictedSkill((int)skill))
                {
                    pm.SendMessage("You cannot use that skill here.");
                    return;
                }
            }

            //conquest skill check
		    Skill tskill = null;
            if (HarvestSystem is Mining)
		    {
                tskill = pm.Skills[SkillName.Mining];		        
		    }

            HarvestSystem.StartHarvesting(pm, this, targeted);
		}
Exemplo n.º 6
0
 public void DetermineBuryLocation(ZombieAvatar pm, object target, IEntity cache)
 {
     if (target is LandTarget)
     {
         var loc = ((LandTarget)target).Location;
         var list = loc.GetEntitiesInRange(Map.ZombieLand, 3);
         if (list.Exists(x => x is CacheChest && ((CacheChest)x).Buried))
         {
             pm.SendMessage(54, "You cannot bury a cache here.  There is one already present in this location!  Try to dig it up first.");
         }
         else if (DigTimer == null || !DigTimer.Running)
         {
             var chest = cache as CacheChest;
             if (chest != null)
             {
                 pm.PublicOverheadMessage(MessageType.Label, pm.SpeechHue, true, "*Begins to bury a cache*");
                 chest.MoveToWorld(loc, Map.ZombieLand);
                 DigTimer = new InternalBuryTimer(chest, pm);
                 DigTimer.Start();
                 pm.Frozen = true;
             }
         }
         else
         {
             pm.SendMessage(54, "You are already digging with this shovel!");
         }
     }
 }
        public void HandleMobDeath(BaseCreature mob, ZombieAvatar avatar)
        {
            if (mob is ZombieZEvent)
            {
                _ZombiesLoc1.Remove(mob);
                _ZombiesLoc2.Remove(mob);
                _ZombiesLoc3.Remove(mob);
                _ZombiesLoc4.Remove(mob);
            }
            else if (mob is DaemonZombieEvent)
            {
                Daemons.Remove(mob);
            }
            else if (mob is TreeFellow)
            {
                TreeFellows.Remove(mob);
            }
            else if (mob is ZombieSpider)
            {
                ZombieSpiders.Remove(mob);
            }
            else if (mob is FeyWarrior)
            {
                FeyWarriors.Remove(mob);
            }
            else if (mob is Vitriol)
            {
                FeyWarriors.Remove(mob);
            }
            else if (mob is Bird)
            {
                FeyWarriors.Remove(mob);
            }
            else if (mob is HorrifyingTentacle)
            {
                HorrifyingTentacles.Remove(mob);
            }
            else if (mob is GoreFiendZombieEvent)
            {
                GoreFiends.Remove(mob);
            }

            if (avatar.Owner != null)
            {
                PlayerZombieProfile profile = ZombieEvent.EnsureProfile(avatar.Owner);
                profile.AddKill(mob);
            }
        }