ArtzifyHD

Pets

Aug 1st, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.55 KB | None | 0 0
  1. # _ ____ _
  2. # ___ | | __ | _ \ ___ | |_ ___
  3. # / __| | |/ / | |_) | / _ \ | __| / __|
  4. # \__ \ | < | __/ | __/ | |_ \__ \
  5. # |___/ |_|\_\ |_| \___| \__| |___/
  6. #
  7.  
  8. #Author: YoshYz
  9. #Version: 1.2.1c
  10.  
  11. #==========================================================================================================#
  12. # -------------------------------------------------------------------------------------------------------- #
  13. # OPTIONS #
  14. # -------------------------------------------------------------------------------------------------------- #
  15. #==========================================================================================================#
  16.  
  17. options:
  18. #Main Things:
  19. Prefix: &9▪ skPets&9>
  20. NoPermissions: &cYou don't have the permission to execute this command.
  21. #Options:
  22. LoadingPanel: true #false
  23. #Messages:
  24. newPet_created: &7You have created the &a[pet] &7pet.
  25. newPet_alreadyExist: &7The &a[pet] &7pet already exist.
  26. deletePet_deleted: &7You have deleted the &c[pet] &7pet.
  27. findPet_doesntExist: &7The &c[pet] &7pet doesn't exist in the database.
  28. spawnPet_spawned: &7Your pet is now spawned.
  29. myPet_withoutPet: &7You don't have a pet.
  30. myPet_notwithYou: &7Your pet isn't with you.
  31. callPet: &7Your pet has just reached you!
  32. despawnPet: &7Your pet is now despawned.
  33. hatPet_enable: &7Your pet jumped on you.
  34. hatPet_disable: &7Your pet dropped from you.
  35. myPet_hungry: &7Your pet is hungry , you need to feed him.
  36. wrong_sintax: &cWrong syntax of the command&8: &c/pets help
  37. #Panels:
  38. #> LoadingPanel:
  39. loadingPanel_title: &9Loading...
  40. #> PetsShop:
  41. petsShop_title: &9skPets - Selector
  42. petsShop_petUnlocked: &8[&a[pet]&8]
  43. petsShop_petLocked: &8[&c[pet]&8]
  44. #> PetsProfile:
  45. petsProfile_title: &9skPets - Profile
  46.  
  47. #==========================================================================================================#
  48. # -------------------------------------------------------------------------------------------------------- #
  49. # FUNCTIONS #
  50. # -------------------------------------------------------------------------------------------------------- #
  51. #==========================================================================================================#
  52.  
  53. function loadingPanel(p: player):
  54. open virtual chest inventory with size 5 named "{@loadingPanel_title}" to {_p}
  55. loop 3 times:
  56. make a gui slot 23 of {_p} with Air named " " to do nothing
  57. make a gui slot 21 of {_p} with Light Green Stained Glass Pane named " " to do nothing
  58. wait 2 ticks
  59. make a gui slot 21 of {_p} with Air named " " to do nothing
  60. make a gui slot 22 of {_p} with Light Green Stained Glass Pane named " " to do nothing
  61. wait 2 ticks
  62. make a gui slot 22 of {_p} with Air named " " to do nothing
  63. make a gui slot 23 of {_p} with Light Green Stained Glass Pane named " " to do nothing
  64. wait 2 ticks
  65. make a gui slot 21 of {_p} with Air named " " to do nothing
  66. make a gui slot 22 of {_p} with Air named " " to do nothing
  67. make a gui slot 23 of {_p} with Air named " " to do nothing
  68.  
  69. function progressPet(player: player) :: text:
  70. set {_uuid} to "%uuid of {_player}%"
  71. set {_progress} to ""
  72. loop 8 times:
  73. if loop-value > ({skpets::players::%{_uuid}%::pet::exp} / {skpets::players::%{_uuid}%::pet::expneeded} * 8):
  74. set {_progress} to "%{_progress}%&8■"
  75. else:
  76. set {_progress} to "%{_progress}%■"
  77. set {_medium} to {skpets::players::%{_uuid}%::pet::expneeded}/2
  78. set {_low} to {skpets::players::%{_uuid}%::pet::expneeded}/3
  79. if {skpets::players::%{_uuid}%::pet::exp} >= {skpets::players::%{_uuid}%::pet::expneeded}:
  80. set {_progress} to "&2%{_progress}%"
  81. if {skpets::players::%{_uuid}%::pet::exp} >= {_medium}:
  82. if {skpets::players::%{_uuid}%::pet::exp} < {skpets::players::%{_uuid}%::pet::expneeded}:
  83. set {_progress} to "&a%{_progress}%"
  84. if {skpets::players::%{_uuid}%::pet::exp} <= {_medium}:
  85. if {skpets::players::%{_uuid}%::pet::exp} > {_low}:
  86. set {_progress} to "&6%{_progress}%"
  87. if {skpets::players::%{_uuid}%::pet::exp} <= {_low}:
  88. set {_progress} to "&c%{_progress}%"
  89. return {_progress}
  90.  
  91. function levelUpPet(player: player):
  92. set {_uuid} to "%uuid of {_player}%"
  93. if {skpets::players::%{_uuid}%::pet::exp} >= {skpets::players::%{_uuid}%::pet::expneeded}:
  94. add 1 to {skpets::players::%{_uuid}%::pet::level}
  95. remove {skpets::players::%{_uuid}%::pet::expneeded} from {skpets::players::%{_uuid}%::pet::exp}
  96. set {skpets::players::%{_uuid}%::pet::exp} to {skpets::players::%{_uuid}%::pet::exp}
  97. set {skpets::players::%{_uuid}%::pet::progress} to 0
  98. set {skpets::players::%{_uuid}%::pet::expneeded} to {skpets::players::%{_uuid}%::pet::expneeded}*2
  99.  
  100. function forcedespawnPet(player: player):
  101. set {_uuid} to "%uuid of {_player}%"
  102. if {skpets::players::%{_uuid}%::pet::type} is set:
  103. if {skpets::players::%{_uuid}%::pet::entity} is set:
  104. teleport {skpets::players::%{_uuid}%::pet::entity} to location at 99999 , 200 , 99999 in world "world"
  105. kill {skpets::players::%{_uuid}%::pet::entity}
  106. delete {skpets::players::%{_uuid}%::pet::entity}
  107. stop
  108.  
  109. function despawnALLPets():
  110. loop all entities:
  111. if loop-entity is a zombie:
  112. if "%nbt of loop-entity%" contains "Silent:1":
  113. teleport loop-entity to location at 99999 , 200 , 99999 in world "world"
  114. kill loop-entity
  115. if loop-entity is a player:
  116. delete {skpets::players::%uuid of loop-entity%::pet::entity}
  117.  
  118. function despawnPet(player: player) :: boolean:
  119. set {_uuid} to "%uuid of {_player}%"
  120. if {skpets::players::%{_uuid}%::pet::type} is set:
  121. if {skpets::players::%{_uuid}%::pet::entity} is set:
  122. teleport {skpets::players::%{_uuid}%::pet::entity} to location at 99999 , 200 , 99999 in world "world"
  123. kill {skpets::players::%{_uuid}%::pet::entity}
  124. delete {skpets::players::%{_uuid}%::pet::entity}
  125. set {_status} to true
  126. return {_status}
  127. stop
  128. set {_status} to false
  129. return {_status}
  130.  
  131. function oorangePet(player: player):
  132. set {_uuid} to "%uuid of {_player}%"
  133. if {skpets::players::%{_uuid}%::pet::type} is set:
  134. if {skpets::players::%{_uuid}%::pet::entity} is set:
  135. while {skpets::players::%{_uuid}%::pet::entity} is alive:
  136. if distance between {skpets::players::%{_uuid}%::pet::entity} and {_player} >= 15:
  137. forcedespawnPet( {_player} )
  138. message " {@Prefix} {@despawnPet}" to {_player}
  139. stop
  140. wait 5 seconds
  141. chance of 25%:
  142. if {skpets::players::%{_uuid}%::pet::hunger} > 0:
  143. remove 1 from {skpets::players::%{_uuid}%::pet::hunger}
  144. stop
  145.  
  146. function newPet(name: text , texture: integer) :: boolean:
  147. if {skpets::list::%{_name}%} is set:
  148. set {_status} to false
  149. return {_status}
  150. stop
  151. set {skpets::list::%{_name}%} to "%{_name}%"
  152. if {_texture} is 1: #VOLTORB
  153. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""9aa4abee-bee6-4770-811d-f8b02fa30b43"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTJmM2Y5Y2NhNzdjNzI1MjE3ZTQ1YWQ0ZWVlZWZmYTA1NjVmODJiODY2YWM2Nzk5OWI0M2MzYTk3MzExNjI4YyJ9fX0=""}]}}}"
  154. if {_texture} is 2: #FROG
  155. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""ce649e79-9da2-49b3-8e72-6614b7abf17c"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTdlYmNlZjQ2ODNjZGI3MTYzZTk2OWU0ZTIyNjlmMzY3M2E1ZDVlNmI3OGUwNmZhZWU0NWJjZjdjNDljMzk3In19fQ==""}]}}}"
  156. if {_texture} is 3: #GOLDEN CHICKEN
  157. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""0298fc50-d90e-4f59-8978-227e490784a8"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmM0MjUyZTMyMzI5ODUzNTM5ZjhmMWVmMWQwNTAyZGFlY2JhZTdiZTVkMzNiODU3ZjQzZTFjMjg0Y2ViNWEifX19""}]}}}"
  158. if {_texture} is 4: #PIDGEOT
  159. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""a20bdb44-c996-46a1-86f2-4ab799708f32"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjZjOTZhZWY2NTU4ZjI5YjI0N2JjOGUzOGQ5MzIwNjE0M2YxMzE0NDc1YzVmY2QxMWUyZWZjYzVkYjU1ZTg1In19fQ==""}]}}}"
  160. if {_texture} is 5: #MAGIKARP
  161. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""41dac880-eb6f-422e-9dc0-f7dec0e12933"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmY1OGZiN2NiZjlmOGRjZmMzYmM5ZDYxYzdjYjViMjI5YmY0OWRiMTEwMTMzNmZmZGMyZDA4N2MwYjk0MTYyIn19fQ==""}]}}}"
  162. if {_texture} is 6: #OWL
  163. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""42f3cb1a-519c-48ba-84e7-2981c909672a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWRiZDhiNmNiM2IxZWNkOWNhMzU5YjgzM2MxYmVmMjJlOTczMmZiN2FhMGQwZmY0ZmI1NTg4ODZmNWE2YSJ9fX0=""}]}}}"
  164. if {_texture} is 7: #WHITE TURKEY
  165. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""13453078-0126-45a2-b76f-da8b92731f9e"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWJkM2VlZThmOWU5NGUzMDhjYzNjNjFkN2IzMzBmZWQ1ZGE4MzVjNjRhYWFhYzZhM2QyYTVkMTZkNDlmNDgifX19""}]}}}"
  166. if {_texture} is 8: #BLACK TURKEY
  167. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""976303b8-8d2d-4f9f-8aff-9395950f2178"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGMxNjJkOTY5ODQ0ZDcyMzEyOTZjZmVhNThmZGRjNGFmZTRiNGYyY2ZhMTFiODg3ZmU3YjAzZWQ4ZSJ9fX0=""}]}}}"
  168. if {_texture} is 9: #BEE
  169. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""bc1ca880-4dc5-4d17-9c05-027a7d3999b3"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTQ3MzIyZjgzMWUzYzE2OGNmYmQzZTI4ZmU5MjUxNDRiMjYxZTc5ZWIzOWM3NzEzNDlmYWM1NWE4MTI2NDczIn19fQ==""}]}}}"
  170. if {_texture} is 10: #TURTLE
  171. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""ef56c7a3-a5e7-4a7f-9786-a4b6273a591d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTJlNTQ4NDA4YWI3NWQ3ZGY4ZTZkNWQyNDQ2ZDkwYjZlYzYyYWE0ZjdmZWI3OTMwZDFlZTcxZWVmZGRmNjE4OSJ9fX0=""}]}}}"
  172. if {_texture} is 11: #ALIEN
  173. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""24b35510-4cfd-4b24-b19d-d41727aff5f3"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmViMjMxOWEzZDg4NDMxOGQ4MjkxMmI2OTEwMjZkZjZlNjYzNmMyZTI0MWQ0OWM1YTY5ZGI4MzBhYTdmNTEifX19""}]}}}"
  174. if {_texture} is 12: #BB-8
  175. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""837e8ce1-1850-4087-a51e-72720b19d7d9"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzg1Njk4MWNjZWM4YTQ5Mjg5OGUwY2I0ZDk0NDNkMjE0NTlkNWI2NWRmYThkYTQ2MmQxNzY5N2ExNzhmOGUifX19""}]}}}"
  176. if {_texture} is 13: #BROWN DOG
  177. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""007f45cd-8b89-4198-a484-358a7fd943e8"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmVjMDUyYmU3NmUzOTE0OGEyN2YyNTVlYzUzN2RmZjkyMDE4Yzc5NzQ0MjAyZDYwYzUxYmM2N2Q2MThhZTM2YSJ9fX0=""}]}}}"
  178. if {_texture} is 14: #JACK LANTERN
  179. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""3208edcf-3a19-46ab-9d9b-e2077ba088c0"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTMyMTVhZDJiNTYwNzgxM2YwODExZTZmMTkzZTdmNzExYWQ5NTE2NGM0NWI3ZGM1ZTViYWRmNDU4M2I2OTQifX19""}]}}}"
  180. if {_texture} is 15: #PUG DOG
  181. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""e637de03-8a6b-492f-ac45-1afd3feaf31d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTZlOTY3NTYzMWVhZDI1Yzc4MmI1NmExMzM4MjdiN2JjZTRhNTJmNDVkMTg0OTJlZjE4ZWY5ZGJhMzI0YzVkIn19fQ==""}]}}}"
  182. if {_texture} is 16: #CYAN SLIME
  183. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""d3b9225c-a6d0-4f61-b022-a48c98f2042c"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTVhYTc4OTU4MzBmNTY2NjE4YTcxYWY2OTExMjQ2NTRhYmMxY2RmYzE4YmJkNmE2NjMxZGZiZGM2YTY0OGIyIn19fQ==""}]}}}"
  184. if {_texture} is 17: #BLUE SLIME
  185. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""656db066-d2c1-4c8d-8591-c633d0892369"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzZmMjg2MDM5YmRkNDBjZmM5NmE1YzU5N2Y5ZjRiZGVkNDMzOWVjOTU3MzJkYTY1NTE5NzJlMGYxZDU3MyJ9fX0=""}]}}}"
  186. if {_texture} is 18: #PINK SLIME
  187. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""36aeb989-42d5-4a66-a8b0-788e637cf3b6"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNThiMTdiMzQ4ZWJlNzM5OTYzOGIwNDUzMjVmZTQ3NDdmMjEzZmJkNzEyN2ZjMzM3NDZjZTkyNDA2NjMyNmMifX19""}]}}}"
  188. if {_texture} is 19: #RED SLIME
  189. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""f2cb7f86-d752-496e-bf24-92900a9afc0d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDE3MTU3ZjNkYzNlMWE1OTJiNDNiNGVmN2UxNjg3OTRlYzYyNzEzOGExMDY1MzcyM2FkMzJjOGQxNjAyNiJ9fX0=""}]}}}"
  190. if {_texture} is 20: #YELLOW SLIME
  191. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""9e621490-a9c2-4ff5-983b-ab5a9a93b17a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDRmMmE5ZWNlOGEyNDQ2NmU2NDU1NmZlZjQyNjdiNTlkYjQ5MWE0Y2NiNmE1NmUwNGQzOGVhNWI1MzU0MmRjIn19fQ==""}]}}}"
  192. if {_texture} is 21: #KIRYU
  193. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""17001653-ef1c-409e-ac5f-ee5519c82d39"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2FhZWM0OGZhZmJmZTViOTc3YjNmYWE0OTE2ZDZhYTMwYmViNjkxYzUxMTc0ZDVlY2ExMTc0YmMyNWJiYjgxIn19fQ==""}]}}}"
  194. if {_texture} is 22: #RED DRAGON
  195. set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""22bde0b3-d29a-49cd-a5a0-04cf4f107173"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzgzYWI0MmYyMmFkZDkzNjZkODkzNjRiYTNhZTIwMTNmYTQ1YTQ1NWNkODdjYTZhYWQ4MmY0MDFhNzcifX19""}]}}}"
  196. set {_status} to true
  197. return {_status}
  198.  
  199. function deletePet(name: text) :: boolean:
  200. if {skpets::list::%{_name}%} is set:
  201. set {_status} to true
  202. clear {skpets::list::%{_name}%}
  203. delete {skpets::list::%{_name}%}
  204. clear {skpets::pets::%{_name}%::*}
  205. loop all zombies:
  206. set {_nbt} to "%nbt of loop-entity%"
  207. if {_nbt} contains "%{_name}%":
  208. teleport loop-entity to location at 99999 , 200 , 99999 in world "world"
  209. kill loop-entity
  210. loop all players:
  211. if {skpets::players::%uuid of loop-player%::pet::type} is "%{_name}%":
  212. clear {skpets::players::%uuid of loop-player%::pet::*}
  213. return {_status}
  214. stop
  215. set {_status} to false
  216. return {_status}
  217.  
  218. function setPet(player: player , name: text) :: boolean:
  219. close {_player}'s inventory
  220. set {_uuid} to "%uuid of {_player}%"
  221. if {skpets::list::%{_name}%} is set:
  222. if {skpets::players::%{_uuid}%::pet::entity} is set:
  223. forcedespawnPet( {_player} )
  224. set {skpets::players::%{_uuid}%::pet::type} to "%{_name}%"
  225. set {skpets::players::%{_uuid}%::pet::hunger} to 100
  226. set {skpets::players::%{_uuid}%::pet::name} to "&a%{_player}%&b's pet &7LvL-&b1"
  227. set {skpets::players::%{_uuid}%::pet::level} to 1
  228. set {skpets::players::%{_uuid}%::pet::exp} to 0
  229. set {skpets::players::%{_uuid}%::pet::expneeded} to 25
  230. set {skpets::players::%{_uuid}%::pet::progress} to 0
  231. set {_status} to true
  232. return {_status}
  233. stop
  234. set {_status} to false
  235. return {_status}
  236.  
  237. function fixPet(player: player):
  238. set {_uuid} to "%uuid of {_player}%"
  239. set {skpets::players::%{_uuid}%::pet::entity}'s chestplate to iron chestplate
  240. set {skpets::players::%{_uuid}%::pet::entity}'s leggings to iron leggings
  241. set {skpets::players::%{_uuid}%::pet::entity}'s boots to iron boots
  242. set {skpets::players::%{_uuid}%::pet::entity}'s held item to iron sword
  243. wait 1 ticks
  244. set {skpets::players::%{_uuid}%::pet::entity}'s chestplate to air
  245. set {skpets::players::%{_uuid}%::pet::entity}'s leggings to air
  246. set {skpets::players::%{_uuid}%::pet::entity}'s boots to air
  247. set {skpets::players::%{_uuid}%::pet::entity}'s held item to air
  248.  
  249. function spawnPet(player: player) :: boolean:
  250. set {_uuid} to "%uuid of {_player}%"
  251. if {skpets::players::%{_uuid}%::pet::type} is set:
  252. if {skpets::players::%{_uuid}%::pet::entity} is set:
  253. forcedespawnPet( {_player} )
  254. spawn 1 zombie at location 99999 , 200 , 99999 in world "world"
  255. add "{CanPickUpLoot:0,Equipment:[{id:""air"",damage:0},{id:""air"",damage:0},{id:""air"",damage:0},{id:""air"",damage:0},{id:""air"",damage:0}],Silent:1,NoAI:0,ActiveEffects:[{Id:14,Amplifier:2,Duration:999999,ShowParticles:0b}],Attributes:[{Name:generic.attackDamage,Base:0},{Name:generic.followRange,Base:30},{Name:generic.movementSpeed,Base:0.3}]}" to nbt of last spawned zombie
  256. set the helmet of last spawned zombie to skull of player with nbt "%{skpets::pets::%{skpets::players::%{_uuid}%::pet::type}%::texture}%"
  257. set {_skpets::players::%{_uuid}%::pet::entity} to last spawned zombie
  258. set {skpets::players::%{_uuid}%::pet::entity} to {_skpets::players::%{_uuid}%::pet::entity}
  259. fixPet( {_player} )
  260. teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
  261. set {_status} to true
  262. return {_status}
  263. stop
  264. set {_status} to false
  265. return {_status}
  266.  
  267. function callPet(player: player) :: boolean:
  268. set {_uuid} to "%uuid of {_player}%"
  269. if {skpets::players::%{_uuid}%::pet::type} is set:
  270. forcedespawnPet( {_player} )
  271. spawnPet( {_player} )
  272. set {_status} to true
  273. return {_status}
  274. stop
  275. set {_status} to false
  276. return {_status}
  277.  
  278. function ridePet(player: player) :: boolean:
  279. set {_uuid} to "%uuid of {_player}%"
  280. force {_player} dismount
  281. if {skpets::players::%{_uuid}%::pet::type} is set:
  282. if {skpets::players::%{_uuid}%::pet::entity} is set:
  283. if {skpets::players::%{_uuid}%::pet::hunger} > 20:
  284. close {_player}'s inventory
  285. teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
  286. make {_player} ride {skpets::players::%{_uuid}%::pet::entity}
  287. set {_status} to true
  288. loop integers from 2 to 6:
  289. set {_slot::%loop-int%} to {_player}'s slot loop-int
  290. set slot 2 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Left""},SkullOwner:{Id:""2391d533-ab09-434d-9980-adafde4057a3"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmQ2OWUwNmU1ZGFkZmQ4NGU1ZjNkMWMyMTA2M2YyNTUzYjJmYTk0NWVlMWQ0ZDcxNTJmZGM1NDI1YmMxMmE5In19fQ==""}]}}}" named "&bLeft"
  291. set slot 3 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Down""},SkullOwner:{Id:""5ca62fac-d094-4346-8361-e1dfdd970607"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzQzNzM0NmQ4YmRhNzhkNTI1ZDE5ZjU0MGE5NWU0ZTc5ZGFlZGE3OTVjYmM1YTEzMjU2MjM2MzEyY2YifX19""}]}}}" named "&bBackwards"
  292. set slot 4 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Dot""},SkullOwner:{Id:""b4f2fdc2-aa8e-44d7-ab8d-f409cae70b50"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzQ1NjQ4NWFhMjM2MTQzNGNiM2JlNTMxYmMxMjE2NTlmNTU1YTRhYWYyNjFkMjFhMDZkN2FmZGU1YWE2MGIyIn19fQ==""}]}}}" named "&bJump"
  293. set slot 5 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Up""},SkullOwner:{Id:""36ecf9de-9ce4-4ee3-a5af-c8beb82b9cc3"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzA0MGZlODM2YTZjMmZiZDJjN2E5YzhlYzZiZTUxNzRmZGRmMWFjMjBmNTVlMzY2MTU2ZmE1ZjcxMmUxMCJ9fX0=""}]}}}" named "&bForwards"
  294. set slot 6 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Right""},SkullOwner:{Id:""d513d666-0992-42c7-9aa6-e518a83e0b38"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTliZjMyOTJlMTI2YTEwNWI1NGViYTcxM2FhMWIxNTJkNTQxYTFkODkzODgyOWM1NjM2NGQxNzhlZDIyYmYifX19""}]}}}" named "&bRight"
  295. while {_player}'s vehicle is set:
  296. if name of {_player}'s held item is "&bJump":
  297. push {_player}'s vehicle upwards at speed 0.4
  298. wait 5 ticks
  299. push {_player}'s vehicle forwards at speed 0.2
  300. wait 2 ticks
  301. push {_player}'s vehicle downwards at speed 0.4
  302. if name of {_player}'s held item is "&bLeft":
  303. push {_player}'s vehicle left at speed 0.4
  304. if name of {_player}'s held item is "&bRight":
  305. push {_player}'s vehicle right at speed 0.4
  306. if name of {_player}'s held item is "&bForwards":
  307. push {_player}'s vehicle forwards at speed 0.4
  308. if name of {_player}'s held item is "&bBackwards":
  309. push {_player}'s vehicle backwards at speed 0.4
  310. wait 4 ticks
  311. loop integers from 2 to 6:
  312. set slot loop-int of {_player}'s inventory to air
  313. set slot loop-int of {_player}'s inventory to {_slot::%loop-int%}
  314. else:
  315. set {_status} to false
  316. return {_status}
  317. stop
  318. else:
  319. set {_status} to false
  320. return {_status}
  321. stop
  322. else:
  323. set {_status} to false
  324. return {_status}
  325. stop
  326.  
  327. function toggleHatPet(player: player) :: boolean:
  328. set {_uuid} to "%uuid of {_player}%"
  329. if {skpets::players::%{_uuid}%::pet::type} is set:
  330. if {skpets::players::%{_uuid}%::pet::entity} is set:
  331. if {skpets::players::%{_uuid}%::pet::hunger} > 20:
  332. close {_player}'s inventory
  333. if {skpets::players::%{_uuid}%::pet::entity} is riding {_player}:
  334. make {skpets::players::%{_uuid}%::pet::entity} dismount
  335. teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
  336. message " {@Prefix} {@hatPet_disable}" to {_player}
  337. else:
  338. teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
  339. make {skpets::players::%{_uuid}%::pet::entity} ride {_player}
  340. message " {@Prefix} {@hatPet_enable}" to {_player}
  341. set {_status} to true
  342. return {_status}
  343. stop
  344. set {_status} to false
  345. return {_status}
  346. stop
  347.  
  348. #==========================================================================================================#
  349. # -------------------------------------------------------------------------------------------------------- #
  350. # GLOBAL DESPAWNING #
  351. # -------------------------------------------------------------------------------------------------------- #
  352. #==========================================================================================================#
  353.  
  354. on skript start:
  355. despawnALLPets()
  356.  
  357. on skript load:
  358. despawnALLPets()
  359.  
  360. on skript stop:
  361. despawnALLPets()
  362.  
  363. #==========================================================================================================#
  364. # -------------------------------------------------------------------------------------------------------- #
  365. # COMMANDS #
  366. # -------------------------------------------------------------------------------------------------------- #
  367. #==========================================================================================================#
  368.  
  369. command /pets [<text>] [<text>] [<integer>]:
  370. aliases: /pet, /skpet or /skpets
  371. trigger:
  372. if argument-1 isn't set:
  373. if {skpets::players::%uuid of player%::pet::type} is set:
  374. make player execute command "/pets profile"
  375. stop
  376. else:
  377. make player execute command "/pets shop"
  378. stop
  379. if argument-1 is "create":
  380. if player has permission "skpets.create":
  381. if argument-2 is set:
  382. if argument-3 is set:
  383. set {_value} to "%arg-3%" parsed as integer
  384. set {_status} to newPet( "%arg-2%" , {_value} )
  385. set {_message-1} to "{@newPet_created}"
  386. set {_message-2} to "{@newPet_alreadyExist}"
  387. replace all "[pet]" with "%arg-2%" in {_message-1}
  388. replace all "[pet]" with "%arg-2%" in {_message-2}
  389. if {_status} is true:
  390. message " {@Prefix} %{_message-1}%"
  391. stop
  392. if {_status} is false:
  393. message " {@Prefix} %{_message-2}%"
  394. stop
  395. else:
  396. message "{@Prefix} {@wrong_sintax}"
  397. stop
  398. else:
  399. message "{@Prefix} {@wrong_sintax}"
  400. stop
  401. else:
  402. message "{@Prefix} {@NoPermissions}"
  403. stop
  404. if argument-1 is "delete":
  405. if player has permission "skpets.delete":
  406. if argument-2 is set:
  407. set {_status} to deletePet( "%arg-2%" )
  408. set {_message-1} to "{@deletePet_deleted}"
  409. set {_message-2} to "{@findPet_doesntExist}"
  410. replace all "[pet]" with "%arg-2%" in {_message-1}
  411. replace all "[pet]" with "%arg-2%" in {_message-2}
  412. if {_status} is true:
  413. message " {@Prefix} %{_message-1}%"
  414. stop
  415. if {_status} is false:
  416. message " {@Prefix} %{_message-2}%"
  417. stop
  418. else:
  419. message "{@Prefix} {@wrong_sintax}"
  420. stop
  421. else:
  422. message "{@Prefix} {@NoPermissions}"
  423. stop
  424. if argument-1 is "set":
  425. if argument-2 is set:
  426. if player has permission "skpets.pets.%arg-2%":
  427. set {_status} to setPet( player , "%arg-2%" )
  428. set {_message-1} to "{@findPet_doesntExist}"
  429. replace all "[pet]" with "%arg-2%" in {_message-1}
  430. if {_status} is true:
  431. set {_status} to spawnPet( player )
  432. if {_status} is true:
  433. set {_message-1} to "{@spawnPet_spawned}"
  434. oorangePet(player)
  435. message " {@Prefix} %{_message-1}%"
  436. stop
  437. if {_status} is false:
  438. message " {@Prefix} %{_message-1}%"
  439. stop
  440. else:
  441. message "{@Prefix} {@NoPermissions}"
  442. stop
  443. else:
  444. message "{@Prefix} {@wrong_sintax}"
  445. stop
  446. if argument-1 is "menu" or "profile":
  447. if player has permission "skpets.menu" or "skpets.profile":
  448. if {@LoadingPanel} is true:
  449. loadingPanel( player )
  450. wait 1 second
  451. open virtual chest inventory with size 6 named "{@petsProfile_title}" to the player
  452. loop 54 times:
  453. make a gui slot loop-number -1 of player with Gray Stained Glass Pane named " " to do nothing
  454. set {_progress} to progressPet( player )
  455. make a gui slot 22 of player with player's skull with nbt "%{skpets::pets::%{skpets::players::%uuid of player%::pet::type}%::texture}%" named "&8-[&aMy pet&8]-" with lore "|| &3Informations&8:|||| &9▪ &7Hunger&8: &8[&b%{skpets::players::%uuid of player%::pet::hunger}%&7/&3100&8]|| &9▪ &7Level&8: &e%{skpets::players::%uuid of player%::pet::level}%|| &9▪ &7Progress&8: &8[&b%{skpets::players::%uuid of player%::pet::exp}%&7/&3%{skpets::players::%uuid of player%::pet::expneeded}%&8]|||| %{_progress}%||&d" to do nothing
  456. make a gui slot 37 of player with Lead named "&aCall" with lore "|| &9» &7Rightclick to call your pet.||&d" to run player command "/pet call"
  457. make a gui slot 38 of player with player's skull with nbt "{display:{Name:""Blue Chalice""},SkullOwner:{Id:""df3308c5-b324-4eab-952e-309ef2008f92"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzRlYWY5NmMzYzBiMWYwZTQ2OGFmM2RkOWEyODk2MzI3N2ZhNDQ4Njc2YjE0YzVlODk0NTA4NTNjZDUzIn19fQ==""}]}}}" named "&aDespawn" with lore "|| &9» &7Rightclick to despawn your pet.||&d" to run player command "/pet back"
  458. make a gui slot 42 of player with Saddle named "&aRide" with lore "|| &9» &7Rightclick to ride your pet.||&d" to run player command "/pet ride"
  459. make a gui slot 43 of player with player's skull with nbt "{display:{Name:""Top Hat""},SkullOwner:{Id:""819376bc-d037-4816-8fa4-a55b3bc36ef4"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTIyYWY2N2M1YjFlMjUyZjgzYjM2NWIzOWE2YjU4OTVkMTU3NGRhYWIyZDU3NDg0MjIzY2Y0ZTE1OWM2N2UifX19""}]}}}" named "&aHat" with lore "|| &9» &7Rightclick to toggle your hat.||&d" to run player command "/pet hat"
  460. if argument-1 is "shop" or "selector":
  461. if player has permission "skpets.shop":
  462. if {@LoadingPanel} is true:
  463. loadingPanel( player )
  464. wait 1 second
  465. open virtual chest inventory with size 6 named "{@petsShop_title}" to the player
  466. loop 54 times:
  467. make a gui slot loop-number -1 of player with Gray Stained Glass Pane named " " to do nothing
  468. set {_slot} to 10
  469. loop {skpets::list::*}:
  470. add 1 to {_pets}
  471. set {_unlocked} to "{@petsShop_petUnlocked}"
  472. set {_locked} to "{@petsShop_petLocked}"
  473. replace all "[pet]" with "%loop-value%" in {_unlocked}
  474. replace all "[pet]" with "%loop-value%" in {_locked}
  475. if player has permission "skpets.pets.%loop-value%":
  476. make a gui slot {_slot} of player with player's skull with nbt "%{skpets::pets::%loop-value%::texture}%" named "%{_unlocked}%" with lore "|| &3Informations&8:|||| &9▪ &7Type&8: &b%loop-value%|| &9▪ &7Status&8: &aUnlocked|||| &9» &aRightclick to select." to run player command "/pets set %loop-value%"
  477. else if player doesn't have permission "skpets.pets.%loop-value%":
  478. make a gui slot {_slot} of player with player's skull with nbt "%{skpets::pets::%loop-value%::texture}%" named "%{_locked}%" with lore "|| &3Informations&8:|||| &9▪ &7Type&8: &b%loop-value%|| &9▪ &7Status&8: &cLocked|||| &9» &cYou don't own this pet." to do nothing
  479. if {_slot} is 16,25 or 34:
  480. add 3 to {_slot}
  481. else:
  482. add 1 to {_slot}
  483. if {_pets} >= 28:
  484. stop loop
  485. else:
  486. message "{@Prefix} {@NoPermissions}"
  487. stop
  488. if argument-1 is "call":
  489. if player has permission "skpets.call":
  490. set {_status} to callPet( player )
  491. set {_message-1} to "{@callPet}"
  492. if {_status} is true:
  493. message " {@Prefix} %{_message-1}%"
  494. oorangePet(player)
  495. stop
  496. if {_status} is false:
  497. message " {@Prefix} {@myPet_withoutPet}"
  498. stop
  499. else:
  500. message "{@Prefix} {@NoPermissions}"
  501. stop
  502. if argument-1 is "ride":
  503. if player has permission "skpets.ride":
  504. set {_status} to ridePet( player )
  505. if {_status} is false:
  506. if {skpets::players::%uuid of player%::pet::type} is set:
  507. if {skpets::players::%uuid of player%::pet::hunger} > 20:
  508. message " {@Prefix} {@myPet_notwithYou}"
  509. stop
  510. else:
  511. message " {@Prefix} {@myPet_hungry}"
  512. stop
  513. else:
  514. message " {@Prefix} {@myPet_withoutPet}"
  515. stop
  516. else:
  517. message "{@Prefix} {@NoPermissions}"
  518. stop
  519. if argument-1 is "hat":
  520. if player has permission "skpets.hat":
  521. set {_status} to toggleHatPet( player )
  522. if {_status} is false:
  523. if {skpets::players::%uuid of player%::pet::type} is set:
  524. if {skpets::players::%uuid of player%::pet::hunger} > 20:
  525. message " {@Prefix} {@myPet_notwithYou}"
  526. stop
  527. else:
  528. message " {@Prefix} {@myPet_hungry}"
  529. stop
  530. else:
  531. message " {@Prefix} {@myPet_withoutPet}"
  532. stop
  533. else:
  534. message "{@Prefix} {@NoPermissions}"
  535. stop
  536. if argument-1 is "despawn" or "back":
  537. if player has permission "skpets.despawn":
  538. set {_status} to despawnPet( player )
  539. if {_status} is true:
  540. message " {@Prefix} {@despawnPet}"
  541. stop
  542. if {_status} is false:
  543. if {skpets::players::%uuid of player%::pet::type} is set:
  544. message " {@Prefix} {@myPet_notwithYou}"
  545. stop
  546. else:
  547. message " {@Prefix} {@myPet_withoutPet}"
  548. stop
  549. else:
  550. message "{@Prefix} {@NoPermissions}"
  551. stop
  552. if argument-1 is "author", "version", "ver" or "info":
  553. message " {@Prefix} &aYoshYz Version&8: &7v1.2.1c"
  554. stop
  555. if argument-1 is "help":
  556. if player has permission "skpets.help":
  557. message "&f&l&m---------------------------------------"
  558. message "&a&l SKPETS"
  559. message " &9▪ /pets help"
  560. message " &9▪ /pets ver"
  561. message " &9▪ /pets profile"
  562. message " &9▪ /pets shop"
  563. message " &9▪ /pets create [<name>] [<ID>]"
  564. message " &9▪ /pets delete [<name>]"
  565. message "&f&l&m---------------------------------------"
  566. stop
  567. else:
  568. message " {@Prefix} {@NoPermissions}"
  569. stop
  570.  
  571. #==========================================================================================================#
  572. # -------------------------------------------------------------------------------------------------------- #
  573. # FEED PET #
  574. # -------------------------------------------------------------------------------------------------------- #
  575. #==========================================================================================================#
  576.  
  577. on rightclick on zombie:
  578. if {skpets::players::%uuid of player%::pet::type} is set:
  579. if {skpets::players::%uuid of player%::pet::entity} is set:
  580. if {skpets::players::%uuid of player%::pet::entity} is clicked entity:
  581. if player is holding apple, bread, melon, cookie, carrot, potato, baked potato or cooked fish:
  582. if {skpets::players::%uuid of player%::pet::hunger} < 100:
  583. remove 1 of player's held item from player's inventory
  584. set {_x} to a random integer between 2 and 5
  585. loop {_x} times:
  586. if {skpets::players::%uuid of player%::pet::hunger} < 100:
  587. add 1 to {skpets::players::%uuid of player%::pet::hunger}
  588. add 1 to {skpets::players::%uuid of player%::pet::exp}
  589. set {_pos} to a random integer between 2 and 3
  590. show heart at the location {_pos} blocks upwards clicked entity
  591. wait 3 ticks
  592. levelUpPet( player )
  593. stop
  594. else:
  595. set {_x} to a random integer between 2 and 3
  596. loop {_x} times:
  597. set {_pos} to a random integer between 2 and 3
  598. show angry villager at the location {_pos} blocks upwards clicked entity
  599. wait 3 ticks
  600. stop
  601. else:
  602. set {_x} to a random integer between 2 and 3
  603. loop {_x} times:
  604. set {_pos} to a random integer between 2 and 3
  605. show angry villager at the location {_pos} blocks upwards clicked entity
  606. wait 3 ticks
  607. stop
  608.  
  609.  
  610.  
  611. #==========================================================================================================#
  612. # -------------------------------------------------------------------------------------------------------- #
  613. # SMALL EVENTS #
  614. # -------------------------------------------------------------------------------------------------------- #
  615. #==========================================================================================================#
  616.  
  617. #Ride debugs
  618.  
  619. on inventory open:
  620. if player is riding:
  621. make the player dismount
  622.  
  623. on join:
  624. remove all heads from player's inventory
  625. if player is riding:
  626. make the player dismount
  627.  
  628. on disconnect:
  629. remove all heads from player's inventory
  630. if player is riding:
  631. make the player dismount
  632.  
  633. on command:
  634. if player is riding:
  635. make the player dismount
  636.  
  637. on place:
  638. if player is riding:
  639. cancel the event
  640.  
  641. #Despawn
  642.  
  643. on quit:
  644. forcedespawnPet( player )
  645.  
  646. #Death drop FIX
  647.  
  648. on death of zombie:
  649. if "%nbt of event-entity%" contains "Silent:1":
  650. remove all dropped items from drops
  651. remove all rotten flesh from drops
  652. remove all heads from drops
  653.  
  654. #Damage
  655.  
  656. on damage:
  657. if "%nbt of victim%" contains "Silent:1":
  658. cancel the event
  659. if attacker is a zombie:
  660. if "%nbt of attacker%" contains "Silent:1":
  661. cancel the event
Advertisement
Add Comment
Please, Sign In to add comment