Exemplo n.º 1
0
        public static void OpenCoffin(Mobile from, int item, int level)
        {
            if (Utility.RandomMinMax(1, 10) == 1)                 // 10% CHANCE FOR RAISING DEAD IN COFFINS
            {
                if (item == 0x2800 || item == 0x2801 || item == 0x27E9 || item == 0x27EA || item == 0x27E0 || item == 0x280A || item == 0x2802 || item == 0x2803)
                {
                    int seance = (int)(from.Skills[SkillName.SpiritSpeak].Value);

                    if (!Server.Misc.GetPlayerInfo.LuckyPlayer(from.Luck) && Utility.RandomMinMax(1, 100) > seance)
                    {
                        if (level > 6)
                        {
                            level = 6;
                        }
                        level = level * 3;

                        from.RevealingAction();

                        BaseCreature spawned = new Zombie();

                        switch (Utility.Random(level))
                        {
                        case 0: spawned = new Skeleton(); break;

                        case 1: spawned = new Zombie(); break;

                        case 2: spawned = new Ghoul(); break;

                        case 3: spawned = new Shade(); break;

                        case 4: spawned = new Spectre(); break;

                        case 5: spawned = new Wraith(); break;

                        case 6: spawned = new Phantom(); break;

                        case 7: spawned = new SkeletalWizard(); break;

                        case 8: spawned = new BoneKnight(); break;

                        case 9: spawned = new BoneMagi(); break;

                        case 10: spawned = new SkeletalKnight(); break;

                        case 11: spawned = new SkeletalMage(); break;

                        case 12: spawned = new Mummy(); break;

                        case 13: spawned = new Vampire(); break;

                        case 14: spawned = new Ghostly(); break;

                        case 15: spawned = new Lich(); break;

                        case 16: spawned = new LichLord(); break;

                        case 17: spawned = new RottingCorpse(); break;
                        }

                        string sSaying = "";
                        switch (Utility.Random(9))
                        {
                        case 0: sSaying = "Who has disturbed me!"; break;

                        case 1: sSaying = "You dare steal from my grave?"; break;

                        case 2: sSaying = "Those that take from me will join me!"; break;

                        case 3: sSaying = "Your soul is now mine for the taking!"; break;

                        case 4: sSaying = "Who dares waken me?"; break;

                        case 5: sSaying = "Your life will be extinguished!"; break;

                        case 6: sSaying = "Do you have no respect for the dead?"; break;

                        case 7: sSaying = "I have been waiting to feast off the living!"; break;

                        case 8: sSaying = "Soon you will join my legion of the dead!"; break;
                        }

                        spawned.OnBeforeSpawn(from.Location, from.Map);
                        spawned.Home      = from.Location;
                        spawned.RangeHome = 5;
                        spawned.Title    += " [Awakened]";
                        spawned.MoveToWorld(from.Location, from.Map);
                        spawned.Say(sSaying);
                        spawned.ControlSlots = 666;
                        spawned.Combatant    = from;
                    }
                }
            }
        }
Exemplo n.º 2
0
        public void OnChop(Mobile from)
        {
            if (from.InRange(this.GetWorldLocation(), 2))
            {
                Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10);  //smoke or dust
                Effects.PlaySound(Location, Map, 0x11C);

                switch (Utility.Random(12))
                {
                case 0:
                    Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10);       //Posion Player
                    from.PlaySound(0x231);
                    from.ApplyPoison(from, Poison.Regular);
                    break;

                case 1:
                    Effects.SendLocationEffect(from, from.Map, 0x3709, 30);     //Burn Player
                    from.PlaySound(0x54);
                    AOS.Damage(from, from, Utility.RandomMinMax(10, 40), 0, 100, 0, 0, 0);
                    break;

                case 2:
                    new BarrelLid().MoveToWorld(Location, Map);
                    new BarrelHoops().MoveToWorld(Location, Map);
                    break;

                case 3:
                    Bandage b = new Bandage(Utility.RandomMinMax(50, 100));
                    b.MoveToWorld(Location, Map);
                    break;

                case 4:
                    new BarrelStaves().MoveToWorld(Location, Map);
                    new BarrelHoops().MoveToWorld(Location, Map);
                    break;

                case 5:
                    Gold g = new Gold(Utility.RandomMinMax(100, 1000));
                    g.MoveToWorld(Location, Map);
                    break;

                case 6:
                    new CurePotion().MoveToWorld(Location, Map);
                    break;

                case 7:
                    new GreaterCurePotion().MoveToWorld(Location, Map);
                    break;

                case 8:
                    new HealPotion().MoveToWorld(Location, Map);
                    break;

                case 9:
                    new GreaterHealPotion().MoveToWorld(Location, Map);
                    break;

                case 10:
                    CoralSnake S1 = new CoralSnake();
                    CoralSnake S2 = new CoralSnake();
                    S1.MoveToWorld(new Point3D(((DungeonBarrel)this).X, ((DungeonBarrel)this).Y, ((DungeonBarrel)this).Z), ((DungeonBarrel)this).Map);
                    S2.MoveToWorld(new Point3D(((DungeonBarrel)this).X, ((DungeonBarrel)this).Y, ((DungeonBarrel)this).Z), ((DungeonBarrel)this).Map);
                    from.SendMessage("The barrel was infested with snakes!");
                    break;

                case 11:
                    RottingCorpse S3 = new RottingCorpse();
                    S3.MoveToWorld(new Point3D(((DungeonBarrel)this).X, ((DungeonBarrel)this).Y, ((DungeonBarrel)this).Z), ((DungeonBarrel)this).Map);
                    from.SendMessage("You have awakened a rotting corpse!");
                    break;
                }
                Destroy();
            }
            else
            {
                from.SendLocalizedMessage(500446);   // That is too far away.
            }
        }