Esempio n. 1
0
        protected virtual void OnKnuBotAnswerEvent(KnuBotAnswerEventArgs e)
        {
            EventHandler <KnuBotAnswerEventArgs> handler = this.CallKnuBotAnswer;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 2
0
 public virtual void OnKnuBotAnswer(object sender, KnuBotAnswerEventArgs e)
 {
 }
Esempio n. 3
0
 protected virtual void OnKnuBotAnswerEvent(KnuBotAnswerEventArgs e)
 {
     EventHandler<KnuBotAnswerEventArgs> handler = this.CallKnuBotAnswer;
     if (handler != null)
     {
         handler(this, e);
     }
 }
Esempio n. 4
0
 public virtual void OnKnuBotAnswer(object sender, KnuBotAnswerEventArgs e)
 {
 }
        public void MyAnswer(object sender, KnuBotAnswerEventArgs e)
        {
            switch (this.lastaction)
            {
                case 3:
                    this.TalkingTo.Client.SendChatText("Chosen number " + e.Answer.ToString());
                    switch (e.Answer)
                    {
                        case 0:
                            this.KnuBotNextAction(30, 100);
                            break;
                        case 1:
                            this.KnuBotNextAction(31, 100);
                            break;
                        case 2:
                            this.KnuBotNextAction(32, 100);
                            break;
                        case 3:
                            this.KnuBotNextAction(33, 100);
                            break;
                        case 4:
                            this.CloseChat();
                            break;
                            /* Other way to do this:
                if (e._answer<4)
                {
                    KnuBotNextAction(lastaction * 10 + e._answer, 100);
                    break;
                }
                CloseChat(); break;
                         */
                    }
                    break;
                case 30:
                    switch (e.Answer)
                    {
                            // { "15", "25", "60", "100", "150", "175", "200", "220", "Something else" }
                        case 0:
                            this.TalkingTo.Stats.Level.Value = 15;
                            break;
                        case 1:
                            this.TalkingTo.Stats.Level.Value = 25;
                            break;
                        case 2:
                            this.TalkingTo.Stats.Level.Value = 60;
                            break;
                        case 3:
                            this.TalkingTo.Stats.Level.Value = 100;
                            break;
                        case 4:
                            this.TalkingTo.Stats.Level.Value = 150;
                            break;
                        case 5:
                            this.TalkingTo.Stats.Level.Value = 175;
                            break;
                        case 6:
                            this.TalkingTo.Stats.Level.Value = 200;
                            break;
                        case 7:
                            this.TalkingTo.Stats.Level.Value = 220;
                            break;
                    }
                    this.KnuBotNextAction(1, 100);
                    break;
                case 31:
                    switch (e.Answer)
                    {
                            // { "10", "20", "30", "Something else" }
                        case 0:
                            this.TalkingTo.Stats.AlienLevel.Value = 10;
                            break;
                        case 1:
                            this.TalkingTo.Stats.AlienLevel.Value = 20;
                            break;
                        case 2:
                            this.TalkingTo.Stats.AlienLevel.Value = 30;
                            break;
                    }
                    this.KnuBotNextAction(1, 100);
                    break;
                case 32:
                    switch (e.Answer)
                    {
                        case 0:
                            this.Teleport(458, 317, 37, 500, 500);
                            this.CloseChat();
                            break;
                        case 1:
                            this.Teleport(702, 749, 40, 501, 500);
                            this.CloseChat();
                            break;
                        case 2:
                            this.Teleport(670, 535, 73, 800, 500);
                            this.CloseChat();
                            break;
                        case 3:
                            this.KnuBotNextAction(1, 100);
                            break;
                    }

                    break;
                case 33:
                    switch (e.Answer)
                    {
                        case 0:
                            this.AppendText("Oh, you like the gold one? Nice choice.");
                            this.SpawnItem(203292, 203293, 30);
                            break;
                    }
                    this.KnuBotNextAction(1, 100);
                    break;
            }
        }