Guest User

Untitled

a guest
Jun 25th, 2015
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. # ---------------------------- #
  2. # TimeTnT Skript #
  3. # Author: GlobooX #
  4. # For: MinecraftPolska.Net #
  5. # ---------------------------- #
  6.  
  7. on load:
  8. if {timetnt} is not set:
  9. set {timetnt} to true
  10.  
  11. # ------------------- #
  12. # KONFIGURACJA #
  13. # ------------------- #
  14. options:
  15. tag: &6[&eTimeTnT&6] # PREFIX WIADOMOŚCI
  16.  
  17. msg: &cTnT oraz Creepery dostępne są w godzinach od (time-on) do (time-off)
  18. # KOMUNIKAT. ZMIENNE: (time-on) = Godzina włączenia TNT / (time-on) = Godzina wylączenia TNT
  19.  
  20. check: 30 # CZAS W SEKUNDACH, CO ILE MA SPRAWDZAĆ AKTUALNĄ GODZINĘ
  21. tnt-set-on: 7 # O KÓREJ GODZINIE MA ZOSTAĆ WŁĄCZONE TNT (MINUT NIE MA!)
  22. tnt-set-off: 23 # O KTÓREJ GODZINE MA ZOSTAĆ WYŁĄCZONE TNT (MINUT NIE MA!)
  23.  
  24. # ------------------- #
  25. # KOD SKRYPTU #
  26. # ------------------- #
  27. every {@check} second:
  28. set {_check.time} to "%hour%" parsed as number
  29. if {timetnt} is false:
  30. if {_check.time} is equal to {@tnt-set-on}:
  31. set {timetnt} to true
  32. if {timetnt} is true:
  33. if {_check.time} is equal to {@tnt-set-off}:
  34. set {timetnt} to false
  35.  
  36. on rightclick with a tnt:
  37. if {timetnt} is false:
  38. cancel event
  39. set {_msg} to "{@msg}"
  40. replace all "(time-on)" with "{@tnt-set-on}" in {_msg}
  41. replace all "(time-off)" with "{@tnt-set-off}" in {_msg}
  42. send "{@tag} %{_msg}%"
  43. on place tnt:
  44. if {timetnt} is false:
  45. cancel event
  46. set {_msg} to "{@msg}"
  47. replace all "(time-on)" with "{@tnt-set-on}" in {_msg}
  48. replace all "(time-off)" with "{@tnt-set-off}" in {_msg}
  49. send "{@tag} %{_msg}%"
  50. on explode:
  51. if {timetnt} is false:
  52. cancel event
Advertisement
Add Comment
Please, Sign In to add comment