Advertisement
Pugly

custom crafting skript

Jul 4th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. command /giveitem:
  2. trigger:
  3. give glowing diamond sword named "&fDiamond Sword" with lore "&7Damage: &c30", "", "&f---&b&lEnchants&f---", "&cSharpness 5", "&cVampire 5" and "&f--------------" to player
  4.  
  5. on damage:
  6. set {_damage} to 0
  7.  
  8. if attacker is player:
  9. set {_item} to attacker's weapon
  10. set {_split::*} to lore of {_item} split at "||"
  11. set {_burn} to 0
  12. loop {_split::*}:
  13. if loop-value contains "Damage":
  14. set {_splitLine::*} to loop-value split at " "
  15. add uncolored {_splitLine::2} parsed as number to {_damage}
  16.  
  17. if loop-value contains "Vampire":
  18. set {_splitLine::*} to loop-value split at " "
  19. set {_vamp} to uncolored {_splitLine::2} parsed as integer
  20.  
  21. if loop-value contains "Sharpness":
  22. set {_splitLine::*} to loop-value split at " "
  23. set {_n} to uncolored {_splitLine::2} parsed as integer
  24. add {_n} * 5 to {_damage}
  25.  
  26. if loop-value contains "Power":
  27. set {_splitLine::*} to loop-value split at " "
  28. set {_n} to uncolored {_splitLine::2} parsed as integer
  29. add {_n} * 5 to {_damage}
  30.  
  31. add {_vamp}/10*{_damage} to {%attacker%.health}
  32. if {%attacker%.health} is greater than {%attacker%.maxHealth}:
  33. set {%attacker%.health} to {%attacker%.maxHealth}
  34.  
  35. if victim is not a player:
  36. if {%victim%.health} is greater than 0:
  37. remove {_damage} from {%victim%.health}
  38. if {%victim%.health} is greater than 0:
  39. set name of victim to "&7Health: &c%{%victim%.health}%"
  40. heal the victim
  41.  
  42. if {%victim%.health} is less than 0:
  43. kill the victim
  44. set {%victim%.health} to 1
  45.  
  46. on death:
  47. if victim is a ravager:
  48. drop 2 firework stars named "&7Ravager Scale" with lore "&8Crafting Ingredient" at the victim's location
  49.  
  50. command /boss:
  51. trigger:
  52. spawn a ravager 5 meters above the player
  53. set {%last spawned ravager%.health} to 1000
  54. set name of last spawned ravager to "&7Health: &c%{%last spawned ravager%.health}%"
  55.  
  56. on join:
  57. set {%player%.health} to 100
  58. set {%player%.maxHealth} to 100
  59.  
  60. every 2 seconds in "Void":
  61. make console execute command "/title @a times 10000 10000 10000"
  62. loop all players:
  63.  
  64. set {_health} to 0
  65.  
  66. set {_item} to loop-player's helmet
  67. set {_split::*} to lore of {_item} split at "||"
  68. loop {_split::*}:
  69.  
  70. if loop-value-2 contains "Health":
  71. set {_splitLine::*} to loop-value-2 split at " "
  72. add uncolored {_splitLine::2} parsed as number to {_health}
  73.  
  74. if loop-value-2 contains "Absorption":
  75. set {_splitLine::*} to loop-value-2 split at " "
  76. add uncolored {_splitLine::2} parsed as number * 15 to {_health}
  77.  
  78. if chestplate of loop-player is not air:
  79. set {_item} to loop-player's chestplate
  80. set {_split::*} to lore of {_item} split at "||"
  81. loop {_split::*}:
  82.  
  83. if loop-value-2 contains "Health":
  84. set {_splitLine::*} to loop-value-2 split at " "
  85. add uncolored {_splitLine::2} parsed as number to {_health}
  86.  
  87. if loop-value-2 contains "Absorption":
  88. set {_splitLine::*} to loop-value-2 split at " "
  89. add uncolored {_splitLine::2} parsed as number * 15 to {_health}
  90.  
  91. if helmet of loop-player is not air:
  92. set {_item} to loop-player's leggings
  93. set {_split::*} to lore of {_item} split at "||"
  94. loop {_split::*}:
  95.  
  96. if loop-value-2 contains "Health":
  97. set {_splitLine::*} to loop-value-2 split at " "
  98. add uncolored {_splitLine::2} parsed as number to {_health}
  99.  
  100. if loop-value-2 contains "Absorption":
  101. set {_splitLine::*} to loop-value-2 split at " "
  102. add uncolored {_splitLine::2} parsed as number * 15 to {_health}
  103.  
  104. if boots of loop-player is not air:
  105. set {_item} to loop-player's boots
  106. set {_split::*} to lore of {_item} split at "||"
  107. loop {_split::*}:
  108.  
  109. if loop-value-2 contains "Health":
  110. set {_splitLine::*} to loop-value-2 split at " "
  111. add uncolored {_splitLine::2} parsed as number to {_health}
  112.  
  113. if loop-value-2 contains "Absorption":
  114. set {_splitLine::*} to loop-value-2 split at " "
  115. add uncolored {_splitLine::2} parsed as number * 15 to {_health}
  116.  
  117. set {%loop-player%.maxHealth} to 100 + {_health}
  118.  
  119. if {%loop-player%.health} is less than {%loop-player%.maxHealth}:
  120. add 10 to {%loop-player%.health}
  121. if {%loop-player%.health} is greater than {%loop-player%.maxHealth}:
  122. set {%loop-player%.health} to {%loop-player%.maxHealth}
  123.  
  124. make console execute command "/title %loop-player% actionbar ""&c%{%loop-player%.health}% / %{%loop-player%.maxHealth}%"""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement