Esempio n. 1
0
        public bool Init(TasSayEventArgs e, string[] words)
        {
            if (words.Length == 0)
            {
                AutoHost.Respond(tas, spring, e, "You must specify preset name");
                return(false);
            }

            string[] vals;
            int[]    indexes;
            if (AutoHost.FilterPresets(words, ah, out vals, out indexes) > 0)
            {
                presetId   = indexes[0];
                presetName = vals[0];
                ah.SayBattle("Do you want to apply preset " + presetName + "? !vote 1 = yes, !vote 2 = no");
                return(true);
            }
            else
            {
                AutoHost.Respond(tas, spring, e, "cannot find such preset");
                return(false);
            }
        }