Ejemplo n.º 1
0
        private void CheckPassive(object source, Client client)
        {
            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Regenerate <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, "IsRegenerateReady", SkillCooldowns.Regenerate);

            if (!levelRankCooldowns.IsRegenerateReady)
            {
                return;
            }

            levelRankCooldowns.IsRegenerateReady = false;

            if (client.Health >= 95)
            {
                return;
            }

            client.SendNotification("~b~Regenerate ~w~You feel a bit healthier.");
            client.Health += levelRanks.Regenerate;
        }
Ejemplo n.º 2
0
        private void HandleDeath(object source, Client client, Client killer)
        {
            AccountUtil.SetPlayerDeath(client, true);
            LevelRanks         levelRanks  = AccountUtil.GetLevelRanks(client);
            LevelRankCooldowns cooldowns   = AccountUtil.GetCooldowns(client);
            DateTime           timeOfDeath = AccountUtil.SetTimeOfDeath(client);

            int downerBonus = 0;

            if (levelRanks.Downer > 0 && cooldowns.IsDownerReady)
            {
                cooldowns.IsDownerReady = false;
                downerBonus             = 5000 * levelRanks.Downer;
                client.SendChatMessage("~r~Downer ~w~You are using your extended downtime for dieing.");
            }

            NotifyPlayersOfDeath(client);

            NAPI.Task.Run(() =>
            {
                if (!AccountUtil.IsPlayerDead(client))
                {
                    return;
                }

                if (timeOfDeath != AccountUtil.GetTimeOfDeath(client))
                {
                    return;
                }

                AccountUtil.SetPlayerDeath(client, false);
            }, 30000 + downerBonus); // 30 Seconds + Bonus
        }
Ejemplo n.º 3
0
        public static void Use(Client client, Client target)
        {
            if (!target.Exists)
            {
                return;
            }

            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (!cooldowns.IsIntimidateReady || ranks.Intimidate <= 0)
            {
                return;
            }

            if (client.Position.DistanceTo2D(target.Position) > 4)
            {
                return;
            }

            cooldowns.IsIntimidateReady = false;
            Utilities.ForcePlayerCower(target, ranks.Intimidate * 1000);
            client.SendChatMessage($"~r~Intimidate ~w~You look quite intimidating and ~o~{target.Name}~w~ has noticed.");
            target.SendChatMessage($"~r~Intimidate ~o~{client.Name} ~w~looks very intimidating you cower in fear.");
        }
Ejemplo n.º 4
0
        public static int Use(Client client)
        {
            int damageRollBonus = 0;

            if (!client.Exists)
            {
                return(damageRollBonus);
            }

            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (ranks.DamageRoll <= 0)
            {
                return(damageRollBonus);
            }

            if (!cooldowns.IsDamageRollReady)
            {
                return(damageRollBonus);
            }

            damageRollBonus = ranks.DamageRoll / 2;

            cooldowns.IsDamageRollReady = false;
            client.SendNotification("Your shot hit for a little more damage.");
            return(damageRollBonus);
        }
Ejemplo n.º 5
0
        public static void Use(Client client, Client target)
        {
            if (!client.Exists)
            {
                return;
            }

            if (!target.Exists)
            {
                return;
            }

            if (client.Position.DistanceTo2D(target.Position) > 5)
            {
                return;
            }

            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (ranks.Drag <= 0)
            {
                return;
            }

            if (!cooldowns.IsDragReady)
            {
                return;
            }

            cooldowns.IsDragReady = false;
            Utilities.ForcePlayerToFollowPlayer(target, client, ranks.Drag * 1500);
            client.SendNotification($"You are dragging ~o~{target.Name}.");
            target.SendNotification($"You are being dragged by ~o~{client.Name}.");
        }
Ejemplo n.º 6
0
        public static int Use(Client client, int number)
        {
            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (!cooldowns.IsQuickReady || ranks.Quick <= 0)
            {
                return(number);
            }

            cooldowns.IsQuickReady = false;
            client.SendNotification("You used your increased dodge chance.");
            return(number += ranks.Quick);
        }
Ejemplo n.º 7
0
        public static bool Use(Client client)
        {
            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (!cooldowns.IsDeadeyeReady || ranks.Deadeye <= 0)
            {
                return(false);
            }

            cooldowns.IsDeadeyeReady = false;
            client.SendNotification("Your shot had increased accuracy.");
            return(true);
        }
Ejemplo n.º 8
0
        public static bool Use(Client client)
        {
            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (!cooldowns.IsCalculatedReady || ranks.Calculated <= 0)
            {
                return(false);
            }

            client.SendNotification("Your shot hit with 100% accuracy.");
            cooldowns.IsCalculatedReady = false;
            return(true);
        }
Ejemplo n.º 9
0
        public static int Use(Client client, int number)
        {
            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (!cooldowns.IsConcentrateReady || ranks.Concentrate <= 0)
            {
                return(number);
            }

            cooldowns.IsConcentrateReady = false;
            client.SendNotification("Your shot hit for double damage.");
            return(number * 2);
        }
Ejemplo n.º 10
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
                client.SetData(VariableName + Notification, false);

            if (!(client.GetData(EntityData.Account) is Account account))
                return;

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Electric <= 0)
                return;

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);
            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Electric);

            if (!levelRankCooldowns.IsElectricReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.IsInVehicle)
            {
                // Check if the vehicle is electric.
                if (!client.Vehicle.HasData("ElectricVehicle"))
                    return;

                // Get the electric vehicle class.
                if (!(client.GetData("ElectricVehicle") is ElectricVehicle electricVehicle))
                    return;
                
                // If the electric vehicle's power is greater than 100. Don't try recharging.
                if (electricVehicle.Power > 100)
                    return;

                // If the electric vehicle has less than 100 power. Add some power based on ranks put into Electric.
                levelRankCooldowns.IsElectricReady = false;
                electricVehicle.Power += levelRanks.Electric;
                client.SendChatMessage("~b~Electric ~w~This vehicle has recieved a little more power.");
            }

            // Has the notification been sent.
            if (client.GetData(VariableName + Notification))
                return;

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~b~Electric ~w~You will recharge a vehicle slightly when you enter it.");
        }
Ejemplo n.º 11
0
        public void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Brute <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Brute);

            if (!levelRankCooldowns.IsBruteReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            levelRankCooldowns.IsBruteReady = false;

            if (client.Armor >= levelRanks.Brute)
            {
                return;
            }

            if (!client.GetData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, true);
                client.SendChatMessage("~r~Brute ~w~You feel your skin tighten.");
                client.Armor = levelRanks.Brute;
            }
        }
Ejemplo n.º 12
0
        public static void Use(Client client, Vehicle vehicle)
        {
            if (!vehicle.Exists)
            {
                return;
            }

            LevelRankCooldowns cooldowns = AccountUtil.GetCooldowns(client);
            LevelRanks         ranks     = AccountUtil.GetLevelRanks(client);

            if (!cooldowns.IsSmashReady || ranks.Smash <= 0)
            {
                return;
            }

            if (client.Position.DistanceTo2D(vehicle.Position) > 2.5)
            {
                return;
            }

            if (!vehicle.Locked)
            {
                return;
            }

            cooldowns.IsSmashReady = false;

            bool didPlayerSucceed = Skillcheck.SkillCheckPlayer(client, Skillcheck.Skills.strength, new Random().Next(15, 28), clientModifier: ranks.Smash, impact: -1);

            if (!didPlayerSucceed)
            {
                client.SendNotification("You try to smash the vehicle window but end up hurting your fist.");
                return;
            }

            vehicle.Locked = false;
            client.SendNotification("You successfully smash the vehicle window.");
            Utilities.BreakVehicleWindow(client, vehicle);
        }
Ejemplo n.º 13
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Attention <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Attention);

            if (!levelRankCooldowns.IsAttentionReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~o~Attention ~w~You are able to draw the attention of everyone around you.");
        }
Ejemplo n.º 14
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Hidden <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Hidden);

            if (!levelRankCooldowns.IsHiddenReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~o~Hidden ~w~You are able to hide your nametag from others for a period of time.");
        }
Ejemplo n.º 15
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Calculated <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Calculated);

            if (!levelRankCooldowns.IsCalculatedReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendNotification("~b~Calculated ~w~First shot will hit with 100% accuracy.");
        }
Ejemplo n.º 16
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Persuasion <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Persuasion);

            if (!levelRankCooldowns.IsPersuasionReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~o~Persuasion ~w~Next time someone questions you, you'll sound very persuasive.");
        }
Ejemplo n.º 17
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Concentrate <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Concentrate);

            if (!levelRankCooldowns.IsConcentrateReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendNotification("~g~Concentrate ~w~Your next shot will do double damage.");
        }
Ejemplo n.º 18
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Medicine <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Medicine);

            if (!levelRankCooldowns.IsMedicineReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendNotification("~b~Medicine ~w~You can heal someone else or heal yourself for additional again.");
        }
Ejemplo n.º 19
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Smash <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Smash - (levelRanks.Smash * 7));

            if (!levelRankCooldowns.IsSmashReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~r~Smash ~w~You're able to break a window again.");
        }
Ejemplo n.º 20
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.VehicleSense <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.VehicleSense);

            if (!levelRankCooldowns.IsVehicleSenseReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~b~VehicleSense ~w~You're able to see your owned vehicles and moving vehicles again.");
        }
Ejemplo n.º 21
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Brains <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Brains);

            if (!levelRankCooldowns.IsBrainsReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~o~Brains ~w~Your next complete objective grants additional currency.");
        }
Ejemplo n.º 22
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Deadeye <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Deadeye);

            if (!levelRankCooldowns.IsDeadeyeReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendNotification("~g~Deadeye ~w~You have increased accuracy on your next shot.");
        }
Ejemplo n.º 23
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Drag <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Drag);

            if (!levelRankCooldowns.IsDragReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendNotification("~r~Drag ~w~You're able to drag someone again.");
        }
Ejemplo n.º 24
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Leadership <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Leadership);

            if (!levelRankCooldowns.IsLeadershipReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~o~Leadership ~w~You can increase your teammates ability scores again.");
        }
Ejemplo n.º 25
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.CrowdControl <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.CrowdControl);

            if (!levelRankCooldowns.IsCrowdControlReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~b~CrowdControl ~w~You are able to disable a person or vehicle temporarily again.");
        }
Ejemplo n.º 26
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Lockpick <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Lockpick - (levelRanks.Lockpick * 5));

            if (!levelRankCooldowns.IsLockpickReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~b~Lockpick ~w~Your next lockpick will have a higher chance to succeed.");
        }
Ejemplo n.º 27
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Quick <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Quick);

            if (!levelRankCooldowns.IsQuickReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendNotification("~g~Quick ~w~You have increased dodge chance for your next hit.");
        }
Ejemplo n.º 28
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Disguise <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Disguise);

            if (!levelRankCooldowns.IsDisguiseReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~o~Disguise ~w~You can swap to a new outfit again.");
        }
Ejemplo n.º 29
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.Downer <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Downer);

            if (!levelRankCooldowns.IsDownerReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendChatMessage("~r~Downer ~w~You have an extended down time available.");
        }
Ejemplo n.º 30
0
        private void CheckPassive(object source, Client client)
        {
            if (!client.HasData(VariableName + Notification))
            {
                client.SetData(VariableName + Notification, false);
            }

            if (!(client.GetData(EntityData.Account) is Account account))
            {
                return;
            }

            LevelRanks levelRanks = account.GetLevelRanks();

            if (levelRanks.DamageRoll <= 0)
            {
                return;
            }

            LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client);

            levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.HighJump);

            if (!levelRankCooldowns.IsDamageRollReady)
            {
                client.SetData(VariableName + Notification, false);
                return;
            }

            if (client.GetData(VariableName + Notification))
            {
                return;
            }

            client.SetData(VariableName + Notification, true);
            client.SendNotification("~g~Damage Roll ~w~Your next hit will have a higher damage roll.");
        }