Beispiel #1
0
 protected override void OnTarget(Mobile from, object target)
 {
     if (target == from)
     {
         from.SendMessage("You are sure you can remember your own name without the address book.");
     }
     else if (target is BaseCreature)
     {
         from.SendMessage("The creature shuns all attempts to get its address.");
     }
     else if (target is PlayerMobile)
     {
         PlayerMobile c = (PlayerMobile)target;
         if (m_Book.Entries != null)
         {
             if (m_Book.Entries.Contains(c))
             {
                 from.SendMessage("They are already listed in that book!");
             }
             else
             {
                 from.SendMessage("You add them to your address book.");
                 m_Book.AddEntry(c);
             }
         }
         else
         {
             from.SendMessage("For some reason, nothing happens.");
         }
     }
     else
     {
         from.SendMessage("Nothing happens.");
     }
 }