ArtzifyHD

Playtime+Deathmsg

Aug 10th, 2017
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. #---------------------------------------------------#
  2. # #
  3. # Custom Death Messages #
  4. # #
  5. # Created by Fake / CraftageSetups #
  6. # #
  7. #---------------------------------------------------#
  8.  
  9. #---------------------------------------------------#
  10. # #
  11. # Main Options - Edit Below! #
  12. # #
  13. # prefix = &8[&bFactions&3X&8] #
  14. # main-color = &b #
  15. # secondary-color = &3 #
  16. # #
  17. #---------------------------------------------------#
  18. variables:
  19. {second::%player%} = 0
  20. {minute::%player%} = 0
  21. {hour::%player%} = 0
  22. options:
  23. heart: ❤
  24. prefix: &f[&5Death&f]
  25. main-color: &d
  26. secondary-color: &f
  27. Prefix: &b&lPlaytime &f•
  28. Message: &fYou've played for
  29. MessageDays: &f• Days
  30. MessageHours: &f• Hours
  31. MessageMinutes: &f• Minutes
  32. MessageSeconds: &f• Seconds
  33. DayCount: d
  34. HourCount: h
  35. MinuteCount: m
  36. SecondCount: s
  37. ColorCount: &b
  38. HelpTitle: &b&lPlaytime Help&f
  39. HelpMsg1: &b/playtime&f Show your playtime.
  40. HelpMsg2: &b/playtime help&f Show this message.
  41. InvalidArg: Invalid argument! # Access to all commands
  42. prefix1: &8[&b&lPlaytime&8] # Prefix on chat messages
  43.  
  44.  
  45. #---------------------------------------------------#
  46. # #
  47. # Skript - Do not touch! #
  48. # #
  49. #---------------------------------------------------#
  50.  
  51. on death:
  52.  
  53. if attacker is a player:
  54. if projectile is set:
  55. set the death message to "{@prefix} {@main-color}%victim% {@secondary-color}was shot by {@main-color}%attacker%{@secondary-color}! {@main-color}%attacker's health% {@heart} {@secondary-color}Left!"
  56. else:
  57. set the death message to "{@prefix} {@main-color}%victim% {@secondary-color}was killed by {@main-color}%attacker%{@secondary-color}! {@main-color}%attacker's health% {@heart} {@secondary-color}Left!"
  58.  
  59. if attacker is not a player:
  60. if attacker is set:
  61. set the death message to "{@prefix} {@main-color}%victim% {@secondary-color}was killed by {@main-color}%attacker%{@secondary-color}! {@main-color}%attacker's health% {@heart} {@secondary-color}Left!"
  62.  
  63. if damage was caused by potion:
  64. set the death message to "{@prefix} {@main-color}%victim% {@secondary-color}was killed by magic."#
  65.  
  66. else:
  67. set the death message to "{@prefix} {@main-color}%victim% {@secondary-color}was killed by {@main-color}%attacker%{@secondary-color}! {@main-color}%attacker's health% {@heart} {@secondary-color}Left!"
  68.  
  69. # +-----------------------------------------+ #
  70. #
  71. # Splaytime
  72. #
  73. # the name actually means Skript-Playtime,
  74. # not splaytime...
  75. #
  76. # skript by zDan_YT
  77. #
  78. # +-----------------------------------------+ #
  79.  
  80. # +-----------------------------------------+ #
  81. #
  82. # Configuration
  83. #
  84. # Configure the messages/colors here.
  85. #
  86. # +-----------------------------------------+ #
  87. command /playtime [<text>]:
  88. trigger:
  89. if arg 1 is not set:
  90. message "{@Prefix} {@Message}:"
  91. message "{@MessageDays}: {@ColorCount}%{Days.%player%}% {@DayCount}"
  92. message "{@MessageHours}: {@ColorCount}%{Hours.%player%}% {@HourCount}"
  93. message "{@MessageMinutes}: {@ColorCount}%{Minutes.%player%}% {@MinuteCount}"
  94. message "{@MessageSeconds}: {@ColorCount}%{Seconds.%player%}% {@SecondCount}"
  95. if arg 1 is set:
  96. if arg 1 is "help":
  97. message "{@HelpTitle}:"
  98. message "{@HelpMsg1}"
  99. message "{@HelpMsg2}"
  100. if arg 1 is not "help":
  101. message "{@InvalidArg}"
  102.  
  103. every 1 second:
  104. loop all players:
  105. add 1 to {Seconds.%loop-player%}
  106. if {Seconds.%loop-player%} is 60:
  107. set {Seconds.%loop-player%} to 0
  108. add 1 to {Minutes.%loop-player%}
  109. if {Minutes.%loop-player%} is 60:
  110. if {Seconds.%loop-player%} is 0:
  111. add 1 to {Hours.%loop-player%}
  112. set {Seconds.%loop-player%} to 0
  113. set {Minutes.%loop-player%} to 0
  114. if {Hours.%loop-player%} is 24:
  115. if {Minutes.%loop-player%} is 60:
  116. if {Seconds.%loop-player%} is 0:
  117. add 1 to {Days.%loop-player%}
  118. set {Hours.%loop-player%} to 0
  119. set {Minutes.%loop-player%} to 0
  120. set {Seconds.%loop-player%} to 0
  121. if {Seconds.%loop-player%} is not set:
  122. set {Seconds.%loop-player%} to 0
  123. if {Minutes.%loop-player%} is not set:
  124. set {Minutes.%loop-player%} to 0
  125. if {Hours.%loop-player%} is not set:
  126. set {Hours.%loop-player%} to 0
  127. if {Days.%loop-player%} is not set:
  128. set {Days.%loop-player%} to 0
  129. command /freeze [<player>]:
  130.  
  131. permission: freezer.freeze
  132.  
  133. trigger:
  134.  
  135. if arg 1 is not set:
  136.  
  137. send "&4Error >> &cdo /freeze (player)"
  138.  
  139. if arg 1 is set:
  140.  
  141. set {freeze.move.%arg-1%} to true
  142.  
  143. send "&a&o%arg-1% has been frozen"
  144.  
  145. broadcast "&7&4%arg-1% &7has been frozen by &4%player% &7for hacking, &4do not logout!"
  146. message "&4You were frozen by %player% for hacking, do not logout or you will be permanently banned %newline%. You can admit for a shorter ban or accept a screenshare! %newline% &4Join our discord and join Requesting Staff if you wish to do a screenshare and prove your innocence! %newline% &4Here is the discord link! -> https://discord.gg/PewhcdH <- %newline%" to arg 1
  147.  
  148. command /unfreeze [<player>]:
  149.  
  150. permission: freezer.freeze
  151.  
  152. trigger:
  153.  
  154. if arg 1 is not set:
  155.  
  156. send "&4Error >> &cdo /unfreeze (player)"
  157.  
  158. if arg 1 is set:
  159.  
  160. set {freeze.move.%arg-1%} to false
  161.  
  162. send "&a&o%arg-1% has been unfrozen"
  163. broadcast "&7&a%arg-1% &7has been unfrozen by &a%player%!"
  164. message "&2You were unfrozen by %player%! Sorry about that. Have a nice day &c❤" to arg 1
  165.  
  166.  
  167. on any movement:
  168.  
  169. if {freeze.move.%player%} is true:
  170.  
  171. cancel event
Add Comment
Please, Sign In to add comment