Randall123459

ProtectedOres

Apr 9th, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. command /protectedores [<text>] [<text>]:
  2. permission: skript.op
  3. usage: /protectedores <enable/disable> <cutclean? true/false>
  4. trigger:
  5. if arg-1 is "on" or "enable" or "start":
  6. if {ProtectedOres} is true:
  7. message "&aProtectedOres is already enabled."
  8. else:
  9. set {ProtectedOres} to true
  10. broadcast "&aProtectedOres enabled."
  11. if arg-1 is "off" or "disable" or "stop":
  12. if {ProtectedOres} is false:
  13. message "&cProtectedOres is already disabled."
  14. else:
  15. set {ProtectedOres} to false
  16. broadcast "&cProtectedOres disabled."
  17. if arg-2 is "true" or "on":
  18. set {cutclean} to true
  19. if arg-2 is "false" or "off":
  20. set {cutclean} to false
  21. if arg-2 is not set:
  22. set {cutclean} to false
  23.  
  24. command /myores [<player>]:
  25. trigger:
  26. if {ProtectedOres} is true:
  27. if player-argument is set:
  28. player is an op
  29. player-argument is online
  30. open player-argument's ender chest to the player
  31. if player-argument is not set:
  32. open the player's ender chest to the player
  33. else:
  34. message "&cProtectedOres is disabled." to the player
  35.  
  36. command /poclear [<player>]:
  37. permission: skript.op
  38. trigger:
  39. if {ProtectedOres} is true:
  40. if player-argument is set:
  41. clear player-argument's ender chest
  42. message "&b%player-argument%'s ProtectedOres emptied."
  43. else:
  44. loop all players:
  45. clear loop-player's ender chest
  46. broadcast "&bAll ProtectedOres emptied."
  47. else:
  48. message "&cProtectedOres is disabled." to the player
  49.  
  50. on death:
  51. if {ProtectedOres} is true:
  52. set {_ender} to the victim's ender chest
  53. set {_deathloc} to the block below the player
  54. set the block at {_deathloc} to a chest
  55. set the inventory of the block at {_deathloc} to {_ender}
  56. set {_signloc} to the location 1 meter south of {_deathloc}
  57. set the block at {_signloc} to a wall sign
  58. set line 1 of the block at {_signloc} to "================="
  59. set line 2 of the block at {_signloc} to "%victim%'s"
  60. set line 3 of the block at {_signloc} to "ProtectedOres"
  61. set line 4 of the block at {_signloc} to "================="
  62. clear victim's ender chest
  63. message "&bYour ProtectedOres has been emptied." to the victim
  64.  
  65.  
  66. on mine of diamond ore:
  67. if {ProtectedOres} is true:
  68. add 1 diamond to player's enderchest
  69.  
  70. on mine of gold ore:
  71. if {ProtectedOres} is true:
  72. if {cutclean} is true:
  73. add 1 gold ingot to player's enderchest
  74. else:
  75. add 1 gold ore to player's enderchest
  76.  
  77. on mine of iron ore:
  78. if {ProtectedOres} is true:
  79. if {cutclean} is true:
  80. add 1 iron ingot to player's enderchest
  81. else:
  82. add 1 iron ore to player's enderchest
  83.  
  84. on pickup:
  85. item is a diamond
  86. add 1 diamond to player's enderchest
  87.  
  88. on pickup:
  89. item is a gold ingot
  90. add 1 gold ingot to player's enderchest
  91.  
  92. on pickup:
  93. item is a iron ingot
  94. add 1 iron ingot to player's enderchest
Advertisement
Add Comment
Please, Sign In to add comment