Advertisement
fleft17

Untitled

Jul 4th, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. options:
  2. P: &7[&4Restriction&7]&r
  3. command /Restriction <text> [<text>] [<integer>]:
  4. permission: skript.Restriction
  5. trigger:
  6. if arg-1 is "on" or "enable" or "true":
  7. set {Restriction} to true
  8. broadcast "{@P} Enabled by %command sender%!"
  9.  
  10.  
  11. if arg-1 is "off" or "disable" or "true":
  12. set {Restriction} to false
  13. broadcast "{@P} Disabled by %command sender%!"
  14.  
  15.  
  16. if arg-1 is "toggle" or "switch":
  17. {Restriction} is true:
  18. command sender command "/Restriction off"
  19. stop trigger
  20. {Restriction} is false:
  21. command sender command "/Restriction on"
  22. stop trigger
  23.  
  24.  
  25. if arg-1 is "set":
  26. arg-2 is "diamond" or "diamonds":
  27. set {DiamondRestriction} to arg-3
  28. broadcast "{@P} Diamond limit changed to &b%arg-3%&r by %command sender%!"
  29.  
  30. arg-2 is "gold":
  31. set {GoldRestriction} to arg-3
  32. broadcast "{@P} Gold limit changed to &6%arg-3%&r by %command sender%!"
  33.  
  34. arg-2 is "normal":
  35. set {DiamondRestriction} to 0
  36. set {GoldRestriction} to 0
  37. loop all players:
  38. add 5 to {DiamondRestriction}
  39. add 25 to {GoldRestriction}
  40. broadcast "{@P} Diamond limit changed to &b%{DiamondRestriction}%&r by %command sender%!"
  41. broadcast "{@P} Gold limit changed to &6%{GoldRestriction}%&r by %command sender%!"
  42.  
  43. if arg-1 is "reset":
  44. set {TotalDiamondCount} to 0
  45. set {TotalGoldCount} to 0
  46. set {DiamondRestriction} to 0
  47. set {GoldRestriction} to 0
  48. broadcast "{@P} Reset by %command sender%!"
  49.  
  50.  
  51.  
  52. on mine of diamond ore:
  53. {Restriction} is true:
  54. add 1 to {TotalDiamondCount}
  55. if {TotalDiamondCount} is 10 or 25 or 50 or 100 or 150 or 200 or 225 or 250 or 300 or 350 or 400:
  56. broadcast "{@P} %{TotalDiamondCount}% &bdiamonds&r have been mined!"
  57. if {TotalDiamondCount} is greater than {DiamondRestriction}:
  58. cancel the event
  59. message "{@P} You cannot mine &bdiamonds&r!"
  60. subtract 1 from {TotalDiamondCount}
  61. if {TotalDiamondCount} is equal to {DiamondRestriction}:
  62. broadcast "{@P} Diamonds can no longer be mined!"
  63.  
  64.  
  65. on mine of gold ore:
  66. {Restriction} is true:
  67. add 1 to {TotalGoldCount}
  68. if {TotalGoldCount} is less than or equal to {GoldRestriction}:
  69. cancel the event
  70. set the block to air
  71. drop 1 gold ingot
  72. if {TotalGoldCount} is 1-00 or 50 or 100 or 150 or 200 or 250 or 300 or 350 or 400 or 500 or 600 or 700 or 750 or 800 or 900 or 1000 or 1050 or 1100 or 1150 or 1200 or 1250:
  73. broadcast "{@P} %{TotalGoldCount}% &6gold&r has been mined!"
  74. if {TotalGoldCount} is greater than {GoldRestriction}:
  75. cancel the event
  76. message "{@P} You cannot mine &6gold&r!"
  77. subtract 1 from {TotalGoldCount}
  78. if {TotalGoldCount} is equal to {GoldRestriction}:
  79. broadcast "{@P} Gold can no longer be mined!"
  80.  
  81. command /ores:
  82. trigger:
  83. {Restriction} is true:
  84. message "{@P} %{TotalDiamondCount}% &bdiamonds&r have been mined!"
  85. message "{@P} %{TotalGoldCount}% &6gold&r has been mined!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement