예제 #1
0
        public BotResponse(string BotAi, string Keywords, string ResponseText, string ResponseMode, string ResponseBeverages)
        {
            AiType = BotUtility.GetAIFromString(BotAi);

            this.Keywords = new List <string>();
            foreach (var Keyword in Keywords.Split(','))
            {
                this.Keywords.Add(Keyword.ToLower());
            }

            this.ResponseText = ResponseText;
            ResponseType      = ResponseMode;

            BeverageIds = new List <int>();
            if (ResponseBeverages.Contains(","))
            {
                foreach (var VendingId in ResponseBeverages.Split(','))
                {
                    try
                    {
                        BeverageIds.Add(int.Parse(VendingId));
                    }
                    catch
                    {
                    }
                }
            }
            else if (!string.IsNullOrEmpty(ResponseBeverages) && int.Parse(ResponseBeverages) > 0)
            {
                BeverageIds.Add(int.Parse(ResponseBeverages));
            }
        }
예제 #2
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;
 }
예제 #3
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;
        }