예제 #1
0
        public virtual void Talk(EnumTalkType talkType)
        {
            IClientWorldAccessor world = capi.World as IClientWorldAccessor;

            this.talkType       = talkType;
            totalLettersTalked  = 0;
            currentLetterInWord = 0;

            chordDelay = TalkSpeed[talkType];

            if (talkType == EnumTalkType.Meet)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(10);
            }

            if (talkType == EnumTalkType.Hurt || talkType == EnumTalkType.Hurt2)
            {
                lettersLeftToTalk = 3 + world.Rand.Next(6);
            }

            if (talkType == EnumTalkType.Idle)
            {
                lettersLeftToTalk = 3 + world.Rand.Next(12);
            }

            if (talkType == EnumTalkType.IdleShort)
            {
                lettersLeftToTalk = 3 + world.Rand.Next(4);
            }

            if (talkType == EnumTalkType.Laugh)
            {
                lettersLeftToTalk = (int)((3 + world.Rand.Next(3)) * Math.Max(1, pitchModifier));
            }

            if (talkType == EnumTalkType.Purchase)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(2);
            }

            if (talkType == EnumTalkType.Complain)
            {
                lettersLeftToTalk = 3 + world.Rand.Next(5);
            }

            if (talkType == EnumTalkType.Goodbye)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(2);
            }

            if (talkType == EnumTalkType.Death)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(2);
            }

            totalLettersToTalk = lettersLeftToTalk;
        }
예제 #2
0
        public void Talk(EnumTalkType talkType)
        {
            IClientWorldAccessor world = capi.World as IClientWorldAccessor;

            this.talkType       = talkType;
            totalLettersTalked  = 0;
            currentLetterInWord = 0;

            chordDelay = TalkSpeed[talkType];

            if (talkType == EnumTalkType.Meet)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(10);
            }

            if (talkType == EnumTalkType.Hurt)
            {
                lettersLeftToTalk = 3 + world.Rand.Next(6);
            }

            if (talkType == EnumTalkType.Idle)
            {
                lettersLeftToTalk = 3 + world.Rand.Next(12);
            }

            if (talkType == EnumTalkType.Purchase)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(2);
            }

            if (talkType == EnumTalkType.Complain)
            {
                lettersLeftToTalk = 3 + world.Rand.Next(5);
            }

            if (talkType == EnumTalkType.Goodbye)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(2);
            }

            if (talkType == EnumTalkType.Death)
            {
                lettersLeftToTalk = 2 + world.Rand.Next(2);
            }

            totalLettersToTalk = lettersLeftToTalk;
        }