Beispiel #1
0
        public override string HandoutReward(EventRanking eventRanking, int position)
        {
            base.HandoutReward(eventRanking, position);

            if (Ranks.IsAllowed(eventRanking.Client, Enums.Rank.Scripter))
            {
                switch (position)
                {
                case 1:
                {
                    eventRanking.Client.Player.GiveItem(133, 10);
                    return("10 event tokens");
                }

                case 2:
                {
                    eventRanking.Client.Player.GiveItem(133, 5);
                    return("5 event tokens");
                }

                case 3:
                {
                    eventRanking.Client.Player.GiveItem(133, 3);
                    return("3 event tokens");
                }
                }
            }

            return("");
        }
Beispiel #2
0
        public override string HandoutReward(EventRanking eventRanking, int position)
        {
            base.HandoutReward(eventRanking, position);

            if (!Data.Scores.TryGetValue(eventRanking.Client.Player.CharID, out var userScore))
            {
                return("");
            }

            var availableSpecies = userScore.FoundSpecies.ToList();
            var selectedIndex    = Server.Math.Rand(0, availableSpecies.Count);
            var selectedSpecies  = Pokedex.GetPokemon(availableSpecies[selectedIndex]);

            var recruit = new Recruit(eventRanking.Client);

            //recruit.SpriteOverride = -1;
            recruit.Level   = 1;
            recruit.Species = selectedSpecies.ID;
            recruit.Sex     = Pokedex.GetPokemonForm(selectedSpecies.ID).GenerateLegalSex();
            recruit.Name    = Pokedex.GetPokemon(selectedSpecies.ID).Name;
            recruit.Shiny   = Enums.Coloration.Shiny;
            recruit.NpcBase = 0;

            recruit.GenerateMoveset();

            using (var dbConnection = new DatabaseConnection(DatabaseID.Players))
            {
                eventRanking.Client.Player.AddToRecruitmentBank(dbConnection, recruit);
            }

            return($"a shiny {selectedSpecies.Name}");
        }
Beispiel #3
0
        public override string HandoutReward(EventRanking eventRanking, int position)
        {
            base.HandoutReward(eventRanking, position);

            switch (position)
            {
            case 1:
            {
                eventRanking.Client.Player.GiveItem(133, 10);
                return("10 event tokens");
            }

            case 2:
            {
                eventRanking.Client.Player.GiveItem(133, 5);
                return("5 event tokens");
            }

            case 3:
            {
                eventRanking.Client.Player.GiveItem(133, 3);
                return("3 event tokens");
            }
            }

            return("");
        }