Advertisement
Klapek

Untitled

Feb 8th, 2020
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. public static void FirstDraw(RandomGenerator rnd, ReferenceHub hub/*, MySqlConnection conn*/)
  2. {
  3.  
  4. string rank = ServerStatic.GetPermissionsHandler()._groups.FirstOrDefault(g => g.Value == hub.serverRoles.Group).Key;
  5. RoleType role = hub.characterClassManager.CurClass;
  6. if (rank == "VIP" && !_forbiddenTeams.Contains(role))
  7. {
  8. //int dropchance = GetDropChance(player, conn);
  9.  
  10. var percentage = rnd.Next(0, 100);
  11. Plugin.Info("1d vip procent: " + percentage);
  12. if (percentage <= 20)
  13. {
  14.  
  15. SecondDraw(rnd, hub, rank);
  16. //bool ResetChance = true;
  17. //RaiseorDeleteDropChance(player, conn, ResetChance);
  18. }
  19. else
  20. {
  21. //_plugin.Info("Nic " + percentage);
  22. hub.inventory.AddNewItem(ItemType.Coin);
  23. //bool ResetChance = false;
  24. //RaiseorDeleteDropChance(player, conn, ResetChance);
  25. }
  26. }
  27. else if (rank == "SVIP" && !_forbiddenTeams.Contains(role))
  28. {
  29. //int dropchance = GetDropChance(player, conn);
  30.  
  31. var percentage = _random.Next(0, 100);
  32. Plugin.Info("1d svip procent: " + percentage);
  33.  
  34. //_plugin.Info(percentage + " FirstDraw" + player.Name);
  35. if (percentage <= 35)
  36. {
  37. SecondDraw(rnd, hub, rank);
  38. //bool ResetChance = true;
  39. //RaiseorDeleteDropChance(player, conn, ResetChance);
  40. }
  41. else
  42. {
  43. //_plugin.Info("Nic " + percentage);
  44. hub.inventory.AddNewItem(ItemType.Coin);
  45. //bool ResetChance = false;
  46. //RaiseorDeleteDropChance(player, conn, ResetChance);
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement