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; }
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."); }
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; } }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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."); }
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.Fakeout <= 0) { return; } LevelRankCooldowns levelRankCooldowns = AccountUtil.GetCooldowns(client); levelRankCooldowns.UpdateCooldownTime(client, VariableName, SkillCooldowns.Fakeout - (levelRanks.Fakeout * 5)); if (!levelRankCooldowns.IsFakeoutReady) { client.SetData(VariableName + Notification, false); return; } if (client.GetData(VariableName + Notification)) { return; } client.SetData(VariableName + Notification, true); client.SendChatMessage("~o~Fakeout ~w~You are able to skip an objective completely again."); }