Advertisement
Guest User

timebomb.sk

a guest
Apr 25th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. command /timebomb <text="toggle">:
  2. description: Enable/Disable/Toggle Time Bomb
  3. usage: /timebomb [enable/disable/toggle] defaults to toggle
  4. permission: UHC.Admin
  5. trigger:
  6. if arg 1 is "disable":
  7. set {timebomb} to false
  8. broadcast "&7[&6Server&7]&c Time bomb disabled!"
  9. execute console command "/gamerule keepInventory false"
  10. else if arg 1 is "enable":
  11. set {timebomb} to true
  12. broadcast "&7[&6Server&7]&c Time bomb enabled!"
  13. execute console command "/gamerule keepInventory true"
  14. else if arg 1 is "toggle":
  15. if {timebomb} is true:
  16. set {timebomb} to false
  17. broadcast "&7[&6Server&7]&c Time bomb disabled!"
  18. execute console command "/gamerule keepInventory false"
  19. else:
  20. set {timebomb} to true
  21. broadcast "&7[&6Server&7]&c Time bomb enabled!"
  22. execute console command "/gamerule keepInventory true"
  23.  
  24. command /setbombtimer <integer=30>:
  25. description: Set the length of time until the bomb goes off
  26. usage: /setbombtimer [time (s)] Defaults to 30s
  27. permission: UHC.Admin
  28. trigger:
  29. set {timer} to arg 1
  30. broadcast "&7[&6Server&7]&c Bomb timer set to %arg 1% seconds"
  31.  
  32. command /setexplosionforce <integer=10>:
  33. description: Set the force of the time bomb explosion
  34. usage: /setexplosionforce [force (1-10)] Default force is 10
  35. permission: UHC.Admin
  36. trigger:
  37. set {explosionforce} to arg 1
  38. broadcast "&7[&6Server&7]&c Explosion force set to %arg 1%"
  39.  
  40. on death of player:
  41. if {timebomb} is true:
  42. set {_tempinventory} to the player's inventory
  43. set {_templocation} to the block below the player
  44. set block 1 meter north of {_templocation} to Chest
  45. set block at {_templocation} to Chest
  46. set the inventory of the block at {_templocation} to {_tempinventory}
  47. drop player's helmet at the player
  48. drop player's chestplate at the player
  49. drop player's leggings at the player
  50. drop player's boots at the player
  51. if {timer} is set:
  52. set {_bombcounter} to {timer}
  53. else:
  54. set {_bombcounter} to 30
  55. if {explosionforce} is not set:
  56. set {explosionforce} to 10
  57. while {_bombcounter} is greater than 0:
  58. set {_bombcounter} to ({_bombcounter} - 1)
  59. wait 1 second
  60. broadcast "&7[&bTimeBomb&7] &c%player%'s corpse has exploded!"
  61. create an explosion of force {explosionforce} at {_templocation}
  62. strike lightning at {_templocation}
  63. wait 1 second
  64. strike lightning at {_templocation}
  65.  
  66. on player respawn:
  67. if {timebomb} is true:
  68. clear the player's inventory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement