Zeldaboy111

Skript Tutorial #16 Ban variables zetten

Oct 4th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. options:
  2. {max::bantime::%uuid of arg 1%} = {max::bantime::%uuid of loop-value%}
  3. {time::ban::%uuid of arg 1%} = {time::ban::%uuid of loop-value%}
  4. {ban::%uuid of arg 1%} = {ban::%uuid of player%}
  5. {playerb::ban::%uuid of arg 1%} = {playerb::ban::%uuid of loop-value%}
  6.  
  7. command /punishment [<offline player>]:
  8. aliases: /pu
  9. trigger:
  10. if player has permission "punishment":
  11. if arg 1 is set:
  12. open chest with 2 rows named "&4-=-=-&cBan &c%arg 1%&4-=-=-" to player
  13.  
  14. format slot 0 of player with diamond named "&3X-Ray Hacks" with lore "&7Ban voor: 3 dagen" to close then run [execute console command "/cpunishment %arg 1% X-Ray 3 %player%"]
  15. stop
  16. else:
  17. send "&c<Punishment> &4Doe &c/punishment [speler] &4om deze command uit te voeren."
  18. stop
  19. else:
  20. send "&c<Punishment> &4Je hebt onvoldoende rechten om deze command uit te voeren."
  21. stop
  22.  
  23. #===================================================
  24.  
  25. command /cpunishment [<offline player>] [<text>] [<number>] [<offline player>]:
  26. executable by: console
  27. trigger:
  28. if arg 1 is set:
  29. if arg 2 is set:
  30. #set {tempban.%arg 1%} to {banntime.%arg 1%}+arg 3
  31. #add arg 1 to {tempbanned::*}
  32. set {playerb::ban::%uuid of arg 1%} to "%arg 1%"
  33. set {ban::world::%uuid of arg 1%} to world of arg 1
  34.  
  35. set {ban::reason::%uuid of arg 1%} to arg 2
  36. set {ban::date::%uuid of arg 1%} to now
  37. set {ban::unbandate::%uuid of arg 1%} to arg 3
  38.  
  39. set {time::ban::%uuid of arg 1%} to 0
  40. set {max::bantime::%uuid of arg 1%} to arg 3
  41.  
  42. set {ban::%uuid of arg 1%} to true
  43. add "%uuid of arg 1%" to {x-raytempbanned::*}
  44.  
  45. send "&2De speler: &a%{ban::player::%uuid of arg 1%}% &2is succesvol gebanned:" to arg 4
  46. send "&2Speler: &a%{ban::player::%uuid of arg 1%}%" to arg 4
  47. send "&2Datum: &a%{ban::date::%uuid of arg 1%}%" to arg 4
  48. send "&2Rede: &a%{ban::reason::%uuid of arg 1%}%" to arg 4
  49.  
  50.  
  51.  
  52.  
  53. loop all players in world "%{ban::world::%uuid of arg 1%}%":
  54. send "&4<&cBanned&4> De speler: &c%{ban::player::%uuid of arg 1%}% &4is gebanned met de rede: &c%{ban::reason::%uuid of arg 1%}%" to loop-player
  55.  
  56. kick arg 1 due to "&4Je bent gebanned!%nl%&4Rede: &c%{ban::reason::%uuid of arg 1%}%%nl%&4Bandatum: &c%{ban::date::%uuid of arg 1%}%%nl%&4Unban over: &c%{ban::unbandate::%uuid of arg 1%}% &4dagen"
  57.  
  58. strike lightning at arg 1
  59. wait 5 ticks
  60. strike lightning at arg 1
  61. wait 5 ticks
  62. launch star firework colored blue and white at arg 1 timed 0.2
  63. wait 1 ticks
  64. launch star firework colored red and white at arg 1 timed 0.2
  65. wait 1 ticks
  66. launch star firework colored green and white at arg 1 timed 0.2
  67. stop
  68.  
  69. else:
  70. send "&c<CPunishment> &4Kan persoon niet bannen omdat: de &creden &4niet opgegeven is." to console
  71. stop
  72. else:
  73. send "&c<CPunishment> &4Kan persoon niet bannen omdat: de &cnaam &4niet opgegeven is en de &creden &4is niet opgegeven." to console
  74. stop
  75.  
  76. command /punban <offline player>:
  77. executable by: console
  78. trigger:
  79. if {time::ban::%uuid of arg 1%} is more than {max::bantime::%uuid of arg 1%}-1:
  80. delete {ban::%uuid of arg 1%}
  81. delete {time::ban::%uuid of arg 1%}
  82. delete {max::bantime::%uuid of arg 1%}
  83. remove "%uuid of arg 1%" from {x-raytempbanned::*}
  84. stop
  85.  
  86. command /punban2 <offline player>:
  87. executable by: console
  88. trigger:
  89. delete {ban::%uuid of arg 1%}
  90. delete {time::ban::%uuid of arg 1%}
  91. delete {max::bantime::%uuid of arg 1%}
  92. remove "%uuid of arg 1%" from {x-raytempbanned::*}
  93. remove arg 1 from {x-raytempbanned::*}
  94. send "&aUnbanned %arg 1%" to console
  95. stop
  96.  
  97. command /pm:
  98. trigger:
  99. execute player command "/sk reload punishment"
Add Comment
Please, Sign In to add comment