public KnuBotItemGiver(Identity identity)
            : base(identity)
        {
            this.InitializeItemSets();

            KnuBotDialogTree rootNode = new KnuBotDialogTree(
                "0",
                this.Condition0,
                new[]
            {
                this.CAS(this.DialogGM0, "self"), this.CAS(this.TransferToRKArmorSet, "RKArmorSet"),
                this.CAS(this.TransferToSLArmorSet, "SLArmorSet"), this.CAS(this.GoodBye, "self")
            });

            this.SetRootNode(rootNode);

            KnuBotDialogTree lastNode =
                rootNode.AddNode(
                    new KnuBotDialogTree(
                        "RKArmorSet",
                        this.Condition01,
                        new[]
            {
                this.CAS(this.DialogShowRKArmorSets, "self"),
                this.CAS(this.ChooseQlFromSet, "QLChoiceRKArmorSet"), this.CAS(this.BackToRoot, "root")
            }));

            lastNode.AddNode(
                new KnuBotDialogTree(
                    "QLChoiceRKArmorSet",
                    this.QLCondition,
                    new[]
            {
                this.CAS(this.ShowQLs, "self"), this.CAS(this.GiveItemSet, "root"),
                this.CAS(this.BackToRoot, "parent")
            }));

            lastNode =
                rootNode.AddNode(
                    new KnuBotDialogTree(
                        "SLArmorSet",
                        this.ConditionSL,
                        new[]
            {
                this.CAS(this.DialogShowSLArmorSets, "self"),
                this.CAS(this.ChooseQlFromSet, "QLChoiceSLArmorSet"), this.CAS(this.BackToRoot, "root")
            }));

            lastNode.AddNode(
                new KnuBotDialogTree(
                    "QLChoiceSLArmorSet",
                    this.QLCondition,
                    new[]
            {
                this.CAS(this.ShowQLs, "self"), this.CAS(this.GiveItemSet, "root"),
                this.CAS(this.BackToRoot, "parent")
            }));
        }
Esempio n. 2
0
        public InfoBotKnu(Identity identity)
            : base(identity)
        {
            KnuBotDialogTree temp = new KnuBotDialogTree(
                "0",
                this.TreeCondition0,
                new[]
            {
                // This is the main dialog
                this.CAS(this.MainDialog, "self"),
                // This will be called if the player asks for commands in the main dialog
                this.CAS(this.ChatCommands, "self"),
                // this will be called if the player selects goodbye in the main dialog
                this.CAS(this.GoodBye, "self")
            });

            // SetRootNode needs to be done after building the first node, so AddNode can put in neccesary information in subsequent nodes
            this.SetRootNode(temp);
        }
        public KnuBotFlappy(Identity identity)
            : base(identity)
        {
            KnuBotDialogTree temp = new KnuBotDialogTree(
                "0",
                this.TreeCondition0,
                new[]
            {
                // This is the main dialog (send text in here)
                this.CAS(this.StartDialog, "self"),
                // This will be called on the first option
                this.CAS(this.Option0_1, "01"),
                // this will be called on the second option
                this.CAS(this.Option0_2, "02")
            });

            // SetRootNode needs to be done after building the first node, so AddNode can put in neccesary information in subsequent nodes
            this.SetRootNode(temp);

            temp.AddNode(
                new KnuBotDialogTree(
                    "01",
                    this.TreeCondition01,
                    new[]
            {
                // This is the main dialog (send text in here)
                this.CAS(this.Dialog1, "self"),
                // This will be called on the first option
                this.CAS(this.Option01_1, "root"),
                // this will be called on the second option
                this.CAS(this.Option01_2, "self")
            }));
            temp.AddNode(
                new KnuBotDialogTree(
                    "02",
                    this.TreeCondition02,
                    new[]
            {
                // This sends only back to the root node
                this.CAS(this.Dialog02, "root")
            }));
        }