Example #1
0
File: User.cs Project: vadian/Novus
 public void MessageHandler(string message)
 {
     if (!this.Player.IsNPC)
     {
         OutBuffer = message;
     }
     else
     {
         Character.Inpc npc = _character as Character.Inpc;
         if (npc != null)
         {
             npc.ParseMessage(message);
         }
     }
 }
Example #2
0
        public static void CreateNPC(int mobTypeID, string location, int amount)
        {
            amount = amount * Rooms.Room.GetRoom(location).GetObjectsInRoom(Room.RoomObjects.Players).Count;

            for (int i = 0; i < amount; i++)
            {
                Character.Iactor actor = Character.NPCUtils.CreateNPC(mobTypeID);
                if (actor != null)
                {
                    actor.Location = location;
                    //meh this whole AI stuff may need to be changed depending on how AI will handle triggers
                    actor.LastCombatTime = DateTime.MinValue.ToUniversalTime();
                    Character.Inpc npc = actor as Character.Inpc;
                    npc.Fsm.state = AI.FindTarget.GetState();
                    actor.Save();
                }
            }
        }