Guest User

Untitled

a guest
Apr 28th, 2014
3,406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. #=================#
  2. # Skrzynki #
  3. #=================#
  4. # Skrypt by Metox #
  5. #=================#
  6. # Config #
  7. #=================#
  8. options:
  9.  
  10. #Szansa na dropnięcie klucza
  11. chance: 5%
  12. #Nazwa klucza
  13. keyname: &4&lKlucz
  14. #Crafting skrzynki
  15. 1: oak plank
  16. 2: oak plank
  17. 3: oak plank
  18. 4: oak plank
  19. 5: enchanted golden apple
  20. 6: oak plank
  21. 7: oak plank
  22. 8: oak plank
  23. 9: oak plank
  24. #Nazwa skrzynki
  25. chestname: &4&lSkrzynka
  26.  
  27. #=================#
  28. # Kod #
  29. #=================#
  30.  
  31. on death:
  32. if victim is a player:
  33. chance of {@chance}:
  34. give player a tripwire hook named "{@keyname}"
  35.  
  36. on script load:
  37. register new shaped recipe for chest named "{@chestname}" using {@1}, {@2}, {@3}, {@4}, {@5}, {@6}, {@7}, {@8}, {@9}
  38.  
  39. command /skrzynki [<text>] [<text>]:
  40. trigger:
  41. if arg 1 is "give":
  42. if arg 2 is "key" or "klucz":
  43. give player a tripwire hook named "{@keyname}"
  44. if arg 2 is "skrzynka" or "chest":
  45. give player a chest named "{@chestname}"
  46. else:
  47. send "Poprawne uzycie: '/skrzynki give key/klucz/skrzynka/chest'" to player
  48.  
  49. on rightclick:
  50. if player is holding a tripwire hook named "{@keyname}":
  51. if player has a chest named "{@chestname}":
  52. cancel event
  53. remove 1 chest named "{@chestname}" from the player
  54. remove 1 tripwire hook named "{@keyname}" from the player
  55. chance of 25%:
  56. give player a diamond sword of sharpness 7
  57. chance of 25%:
  58. give player a diamond pickaxe of efficiency 7
  59. chance of 25%:
  60. give player a diamond helmet of protection 6
  61. else:
  62. cancel event
  63. if player is holding a chest named "{@chestname}":
  64. cancel event
Advertisement
Add Comment
Please, Sign In to add comment