Exemplo n.º 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_BookSrc.Deleted)
                {
                    return;
                }

                BaseBook bookDst = targeted as BaseBook;

                if (bookDst == null)
                {
                    from.SendLocalizedMessage(1046296); // That is not a book
                }
                else if (Inscribe.IsEmpty(m_BookSrc))
                {
                    from.SendLocalizedMessage(501611); // Can't copy an empty book.
                }
                else if (bookDst == m_BookSrc)
                {
                    from.SendLocalizedMessage(501616); // Cannot copy a book onto itself.
                }
                else if (!bookDst.Writable)
                {
                    from.SendLocalizedMessage(501614); // Cannot write into that book.
                }
                else if (Inscribe.GetUser(bookDst) != null)
                {
                    from.SendLocalizedMessage(501621); // Someone else is inscribing that item.
                }
                else
                {
                    if (from.CheckTargetSkill(SkillName.Inscribe, bookDst, 0, 50))
                    {
                        Inscribe.Copy(m_BookSrc, bookDst);

                        from.SendLocalizedMessage(501618); // You make a copy of the book.
                        from.PlaySound(0x249);
                    }
                    else
                    {
                        from.SendLocalizedMessage(501617); // You fail to make a copy of the book.
                    }
                }
            }
Exemplo n.º 2
0
 protected override void OnTargetFinish(Mobile from)
 {
     Inscribe.CancelUser(m_BookSrc);
 }