ArtzifyHD

chat game

Aug 22nd, 2017
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. # [Skript] Bow Health dev by srxSaw
  2.  
  3. Options:
  4. bowmesagge : &e%victim% &fhas &c%health of victim% ♥
  5.  
  6. on damage of player:
  7. wait 1 tick
  8. attacker is a player:
  9. projectile exists
  10. if projectile is arrow:
  11. wait 1 tick
  12. victim is not dead:
  13. message "{@bowmesagge}" to the attacker
  14. #
  15. # ChatGame by Andalmere | Please leave a 5-star review ;)
  16. #
  17.  
  18. # Here you can configure everything you want, from prefixes to modes.
  19. options:
  20.  
  21. # -=[]=-
  22. # Settings
  23. # -=[]=-
  24.  
  25. # Prefixes will be displayed in each broadcast.
  26. prefix: &8[&bFactions&3X&8]
  27.  
  28. # Minimum players in order to start the chat game.
  29. min-players: 1
  30.  
  31. # Delay between each game/broadcast.
  32. delay: 300
  33.  
  34. # How many random characters to be guessed?
  35. chars: 8
  36.  
  37. # Do we need to hide the answer of the player who guessed the answer?
  38. hide-word-on-chat: true
  39.  
  40. # Enable reward when a player guessed the answer?
  41. enable-reward: true
  42.  
  43. # If enable-reward is enabled, this command will be executed.
  44. reward-command: crate key %player% fire 1
  45.  
  46. # This would be displayed if a new chatgame starts.
  47. broadcast-pending: &6Type this to win » &e%{word}%&6!
  48.  
  49. # This would be displayed if someone guessed the answer.
  50. broadcast-win: &e%player% &6won the game and has received a &cFire &6crate key !
  51.  
  52. # How many seconds do we need to wait to consider that no one answered the chatgame.
  53. warm-seconds: 60
  54.  
  55. # This would be displayed if no one answered the chatgame.
  56. broadcast-none: &cNo one answered the chatgame.
  57.  
  58. # ---------------------------------------------= [ Code ] =-----------------------------------------------------------
  59.  
  60. on join:
  61. add 1 to {chatgame.players::*}
  62.  
  63. on quit:
  64. reduce {chatgame.players::*} by 1
  65.  
  66. every {@delay} seconds:
  67. {chatgame.players::*} >= {@min-players}
  68. set {chatgame.chat} to true
  69. set {word} to random {@chars} char string from `a-zA-Z0-9`
  70. broadcast "{@prefix} {@broadcast-pending}"
  71. set {chatgame.active} to now
  72. stop
  73.  
  74. on chat:
  75. if {chatgame.chat} is true:
  76. if message contains "%{word}%":
  77. set {chatgame.chat} to false
  78. delete {chatgame.active}
  79. if {@hide-word-on-chat} is true:
  80. cancel event
  81. if {@enable-reward} is true:
  82. execute console command "{@reward-command}"
  83. broadcast "{@prefix} {@broadcast-win}"
  84. stop
  85.  
  86. every tick:
  87. if {chatgame.active} is set:
  88. if difference between {chatgame.active} and now is greater than {@warm-seconds} seconds:
  89. set {chatgame.chat} to false
  90. delete {chatgame.active}
  91. broadcast "{@prefix} {@broadcast-none}"
  92. stop
  93. # --------------------------------------------= [ End of Code ] =-----------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment