Exemplo n.º 1
0
            protected override void OnTick()
            {
                if (m_Corpse.Deleted || m_Ghost.Deleted || m_Healer.Deleted)
                {
                    return;
                }

                if (!m_Healer.Alive)
                {
                    m_Healer.SendMessage("You were unable to finish your work before your died.");
                    return;
                }

                if (m_Healer.CheckSkill(SkillName.Healing, 40.0, 120.0))
                {
                    m_Ghost.Location = m_Corpse.Location;
                    m_Ghost.Resurrect();

                    if (m_Healer is TeiravonMobile && (((TeiravonMobile)m_Healer).IsCleric() || ((TeiravonMobile)m_Healer).IsDarkCleric() || ((TeiravonMobile)m_Healer).IsForester() || ((TeiravonMobile)m_Healer).IsPaladin()))
                    {
                        Titles.AwardExp((TeiravonMobile)(m_Healer), m_Ghost.Fame);
                    }
                    Titles.AwardFame(m_Ghost, -(m_Ghost.Fame / 15), true);
                    m_Corpse.Open(m_Ghost, true);
                    m_Ghost.Animate(m_Ghost.Body == 17 ? 2 : 21, 4, 1, false, false, 0);
                    m_Ghost.Emote("*Gasps back to life!*");
                    m_Ghost.PlaySound(m_Ghost.Female ? 0x319 : 0x429);
                    m_Healer.SendMessage("You revive the fallen!");
                    Titles.AwardFame(m_Healer, m_Ghost.Fame / 20, true);
                }
                else
                {
                    m_Healer.SendMessage("You were unable to revive the body.");
                }
            }
Exemplo n.º 2
0
        public virtual void EndQuest(PlayerMobile pm)
        {
            TeiravonMobile tm = (TeiravonMobile)pm;

            if (Titles.AwardExp(tm, QuestExp))
            {
                pm.SendMessage("You have gained {0} experience.", QuestExp);
            }
            pm.AddToBackpack(new Gold(GoldAmt));
            if (this.Backpack != null)
            {
                if (this.Backpack.Items.Count > 0)
                {
                    pm.AddToBackpack((Item)this.Backpack.Items[Utility.Random(this.Backpack.Items.Count)]);
                }
            }
        }