Exemplo n.º 1
0
 internal RoomBot(int botId,
                  int roomId,
                  string aiType,
                  string walkingMode,
                  string name,
                  string motto,
                  string look,
                  int x,
                  int y,
                  double z,
                  int rot,
                  int minX,
                  int minY,
                  int maxX,
                  int maxY,
                  ref List <RandomSpeech> speeches,
                  string gender,
                  int dance,
                  int ownerId,
                  bool automaticChat,
                  int speakingInterval,
                  bool mixSentences,
                  int chatBubble)
 {
     Id          = botId;
     BotId       = botId;
     RoomId      = roomId;
     Name        = name;
     Motto       = motto;
     Look        = look;
     Gender      = gender.ToUpper();
     AiType      = BotUtility.GetAIFromString(aiType);
     WalkingMode = walkingMode;
     X           = x;
     Y           = y;
     Z           = z;
     Rot         = rot;
     MinX        = minX;
     MinY        = minY;
     MaxX        = maxX;
     MaxY        = maxY;
     VirtualId   = -1;
     RoomUser    = null;
     DanceId     = dance;
     LoadRandomSpeech(speeches);
     OwnerId          = ownerId;
     AutomaticChat    = automaticChat;
     SpeakingInterval = speakingInterval;
     MixSentences     = mixSentences;
     ChatBubble       = chatBubble;
     ForcedMovement   = false;
     TargetCoordinate = new Point();
     TargetUser       = 0;
 }
Exemplo n.º 2
0
        public BotResponse GetResponse(BotAIType type, string message)
        {
            foreach (BotResponse response in _responses.Where(x => x.AiType == type).ToList())
            {
                if (response.KeywordMatched(message))
                {
                    return(response);
                }
            }

            return(null);
        }
Exemplo n.º 3
0
        public BotResponse GetResponse(BotAIType AiType, string Message)
        {
            foreach (BotResponse Response in _responses.Where(X => X.AiType == AiType).ToList())
            {
                if (Response.KeywordMatched(Message))
                {
                    return(Response);
                }
            }

            return(null);
        }
Exemplo n.º 4
0
        public BotResponse GetResponse(BotAIType AiType, string Message)
        {
            foreach (BotResponse Response in this._responses.Where(X => X.AiType == AiType).ToList())
            {
                if (Response.KeywordMatched(Message))
                {
                    return Response;
                }
            }

            return null;
        }
Exemplo n.º 5
0
        public RoomBot(int BotId, int RoomId, string AiType, string WalkingMode, string Name, string Motto, string Look, int X, int Y, double Z, int Rot,
                       int minX, int minY, int maxX, int maxY, ref List <RandomSpeech> Speeches, string Gender, int Dance, int ownerID,
                       bool AutomaticChat, int SpeakingInterval, bool MixSentences, int ChatBubble)
        {
            this.Id     = BotId;
            this.BotId  = BotId;
            this.RoomId = RoomId;

            this.Name   = Name;
            this.Motto  = Motto;
            this.Look   = Look;
            this.Gender = Gender.ToUpper();

            this.AiType      = BotUtility.GetAIFromString(AiType);
            this.WalkingMode = WalkingMode;

            this.X    = X;
            this.Y    = Y;
            this.Z    = Z;
            this.Rot  = Rot;
            this.minX = minX;
            this.minY = minY;
            this.maxX = maxX;
            this.maxY = maxY;

            this.VirtualId = -1;
            this.RoomUser  = null;
            this.DanceId   = Dance;

            this.LoadRandomSpeech(Speeches);
            //this.LoadResponses(Responses);

            this.ownerID = ownerID;

            this.AutomaticChat    = AutomaticChat;
            this.SpeakingInterval = SpeakingInterval;
            this.MixSentences     = MixSentences;

            this._chatBubble      = ChatBubble;
            this.ForcedMovement   = false;
            this.TargetCoordinate = new Point();
            this.TargetUser       = 0;
            WasPicked             = RoomId == 0;
        }
Exemplo n.º 6
0
        public RoomBot(int BotId, int RoomId, string AiType, string WalkingMode, string Name, string Motto, string Look, int X, int Y, double Z, int Rot,
            int minX, int minY, int maxX, int maxY, ref List<RandomSpeech> Speeches, string Gender, int Dance, int ownerID,
            bool AutomaticChat, int SpeakingInterval, bool MixSentences, int ChatBubble)
        {
            this.Id = BotId;
            this.BotId = BotId;
            this.RoomId = RoomId;

            this.Name = Name;
            this.Motto = Motto;
            this.Look = Look;
            this.Gender = Gender.ToUpper();

            this.AiType = BotUtility.GetAIFromString(AiType);
            this.WalkingMode = WalkingMode;

            this.X = X;
            this.Y = Y;
            this.Z = Z;
            this.Rot = Rot;
            this.minX = minX;
            this.minY = minY;
            this.maxX = maxX;
            this.maxY = maxY;

            this.VirtualId = -1;
            this.RoomUser = null;
            this.DanceId = Dance;

            this.LoadRandomSpeech(Speeches);
            //this.LoadResponses(Responses);

            this.ownerID = ownerID;

            this.AutomaticChat = AutomaticChat;
            this.SpeakingInterval = SpeakingInterval;
            this.MixSentences = MixSentences;

            this._chatBubble = ChatBubble;
            this.ForcedMovement = false;
            this.TargetCoordinate = new Point();
            this.TargetUser = 0;
        }