Procix94

MyKits

Aug 22nd, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.44 KB | None | 0 0
  1. command /kit [<text>] [<text>] [<player>]:
  2. trigger:
  3. if arg 1 is "save":
  4. if player has permission "kit.save" or "kit.*":
  5. if arg 2 is set:
  6. if {kits::%arg 2%} is set:
  7. send "&6>> &9Ten kit pod taka nazwa jest juz zapisany"
  8. stop
  9. set {kits::%arg 2%} to argument 2
  10. send "&6>> &9Zapisales &6[&a%arg 2%&6]&9 jako kit."
  11. clear {kit.%arg 1%::*}
  12. set {kit.%arg 2%.helmet} to "%helmet of the player%"
  13. set {kit.%arg 2%.chestplate} to "%chestplate of the player%"
  14. set {kit.%arg 2%.leggings} to "%leggings of the player%"
  15. set {kit.%arg 2%.boots} to "%boots of the player%"
  16. loop items in player's inventory:
  17. if ID of loop-item is 373:
  18. set {_id} to ID of loop-item
  19. set {_data} to data value of loop-item
  20. add "%{_id}%:%{_data}%" to {kit.%arg 2%::*}
  21. else:
  22. add "%loop-item%" to {kit.%arg 2%::*}
  23. if arg 1 is "load":
  24. if player has permission "kit.load" or "kit.*":
  25. if arg 2 is set:
  26. if {kits::%arg 2%} is not set:
  27. send "&6>> &9Nie ma takiego kitu"
  28. stop
  29. loop {kit.%arg 2%::*}:
  30. give player (loop-value parsed as item)
  31. equip player with {kit.%arg 2%.boots} parsed as item
  32. equip player with {kit.%arg 2%.chestplate} parsed as item
  33. equip player with {kit.%arg 2%.leggings} parsed as item
  34. equip player with {kit.%arg 2%.helmet} parsed as item
  35. send "&6>> &aDostales kit &6[&a%arg 2%&6]"
  36. if arg 1 is "list":
  37. if player has permission "kit.list" or "kit.*":
  38. send "&6>> &9Zapisane kity: &6%{kits::*}%"
  39. stop
  40. if arg 1 is "delete":
  41. if player has permission "kit.delete" or "kit.*":
  42. if arg 2 is set:
  43. if {kits::%arg 2%} is not set:
  44. send "&6>> &9Nie ma takiego kitu"
  45. stop
  46. clear {kits::%arg 2%}
  47. clear {kit.%arg 2%::*}
  48. clear {kit.%arg 2%.helmet}
  49. clear {kit.%arg 2%.chestplate}
  50. clear {kit.%arg 2%.leggings}
  51. clear {kit.%arg 2%.boots}
  52. send "&6>> &9Usunales kit &6[&a%arg 2%&6]"
  53. if arg 1 is not set:
  54. send "&6<>&7&M-----------------------------------&6<>"
  55. send "&6/kit save <nazwa> &f- &9Zapisuje kit"
  56. send "&6/kit load <nazwa> &f- &9Daje kit"
  57. send "&6/kit delete <nazwa> &f- &9Usuwa kit"
  58. send "&6/kit list &f- &9Lista kitow"
  59. send "&6<>&7&M-----------------------------------&6<>"
  60. stop
  61. on rightclick on sign:
  62. if player has permission "kit.sign" or "kit.*":
  63. if line 1 of the clicked block is "&1[KitDeath]":
  64. loop {kits::*}:
  65. line 2 of the clicked block is loop-value
  66. loop {kit.%line 2 of the clicked block%::*}:
  67. give player (loop-value-2 parsed as item)
  68. equip player with {kit.%line 2 of the clicked block%.boots} parsed as item
  69. equip player with {kit.%line 2 of the clicked block%.chestplate} parsed as item
  70. equip player with {kit.%line 2 of the clicked block%.leggings} parsed as item
  71. equip player with {kit.%line 2 of the clicked block%.helmet} parsed as item
  72. send "&6>> &aDostales kit &6[&a%line 2 of the clicked block%&6]"
  73. stop
  74. send "&6>> &cNie znaleziono zestawu zdefiniowanego na tabliczce."
  75. on sign change:
  76. if player has permission "kit.*":
  77. if line 1 is "[k]":
  78. loop {kits::*}:
  79. line 2 is loop-value
  80. set line 1 to "&1[KitDeath]"
  81. send "&6>> &aStworzono tabliczke &6KIT"
  82. stop
  83. cancel event
  84. send "&6>> &cNie znaleziono zestawu, ktory chcesz przypisac do tej tabliczki"
Advertisement
Add Comment
Please, Sign In to add comment