Advertisement
Furqankhan123

Untitled

Jul 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.28 KB | None | 0 0
  1.  
  2. #====================================================#
  3. # BalefulEnchants #
  4. # By Midnighters A.K.A MedievalGaming #
  5. # Custom Enchantments, Custom Gear, Custom Shops #
  6. #====================================================#
  7.  
  8. # Basic Enchants #
  9. #======================#
  10. # Wrath of Zeus
  11. # Cripling Blow
  12. # Roaring Flames
  13. #
  14. # Good Enchants #
  15. #=======================#
  16. # Venomous Strike
  17. # Decimation
  18. # Rejuvination
  19. #
  20. # Superior Enchants #
  21. #===========================#
  22. # Relentless
  23. # Hells Embrace
  24. # Endurance
  25.  
  26. # This Skript requires the Following.
  27. # SharpSK
  28. # SkQuery
  29. # SkRayFall
  30. # Umbaska
  31. # Skript
  32.  
  33. on death:
  34. attacker is a player
  35. set {_dying} to "%victim%"
  36. set {_mobs::*} to yaml nodes "mobs" from "BalefulEnchantsConfigs/sofrates.yml"
  37. set {_bal} to yaml value "%attacker%.balance" from "BalefulEnchantsConfigs/playerdata/%attacker%.yml"
  38. set {_enabled} to yaml value "mobs.%{_dying}%.enabled" from "BalefulEnchantsConfigs/sofrates.yml"
  39. set {_bal} to "%{_bal}%" parsed as integer
  40. set {_drop} to yaml value "mobs.%{_dying}%.drop" from "BalefulEnchantsConfigs/sofrates.yml"
  41. set {_drop} to "%{_drop}%" parsed as integer
  42. if {_dying} is {_mobs::*}:
  43. if {_enabled} is "true":
  44. add {_drop} to {_bal}
  45. set yaml value "%attacker%.balance" from "BalefulEnchantsConfigs/playerdata/%attacker%.yml" to {_bal}
  46.  
  47. command /essence:
  48. trigger:
  49. set {_bal} to yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml"
  50. message "Total Life Essence Collected: %{_bal}%!"
  51.  
  52. command /book [<text>]:
  53. trigger:
  54. set {_bal} to yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml"
  55. player has permission "be.book"
  56. set {_item} to yaml value "books.itemtype" from "BalefulEnchantsConfigs/enchants.yml"
  57. set {_item} to "%{_item}%" parsed as item type
  58. set {_name} to yaml value "books.%arg-1%.name" from "BalefulEnchantsConfigs/enchants.yml"
  59. set {_lore} to yaml value "books.%arg-1%.lore" from "BalefulEnchantsConfigs/enchants.yml"
  60. if arg-1 is not set:
  61. send "Error! Please Choose a book type!"
  62. if arg-1 is "basic":
  63. if {_bal} is above 50:
  64. add {_item} named "%{_name}%" with lore "%{_lore}%" to player's inventory
  65. subtract 50 from {_bal}
  66. set yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml" to {_bal}
  67. else:
  68. send "You do not have enough Life Essence!"
  69. if arg-1 is "good":
  70. if {_bal} is above 75:
  71. add {_item} named "%{_name}%" with lore "%{_lore}%" to player's inventory
  72. subtract 75 from {_bal}
  73. set yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml" to {_bal}
  74. else:
  75. send "You do not have enough Life Essence!"
  76. if arg-1 is "superior":
  77. if {_bal} is above 100:
  78. add {_item} named "%{_name}%" with lore "%{_lore}%" to player's inventory
  79. subtract 100 from {_bal}
  80. set yaml value "%player%.balance" from "BalefulEnchantsConfigs/playerdata/%player%.yml" to {_bal}
  81. else:
  82. send "You do not have enough Life Essence!"
  83.  
  84. command /enchanter:
  85. trigger:
  86. open chest with 3 row named "&f&lEnchanter" to player
  87. format slot 0 of player with black stained Glass Pane named "&0" to be unstealable
  88. format slot 1 of player with black stained Glass Pane named "&0" to be unstealable
  89. format slot 2 of player with black stained Glass Pane named "&0" to be unstealable
  90. format slot 3 of player with black stained Glass Pane named "&0" to be unstealable
  91. format slot 4 of player with black stained Glass Pane named "&0" to be unstealable
  92. format slot 5 of player with black stained Glass Pane named "&0" to be unstealable
  93. format slot 6 of player with black stained Glass Pane named "&0" to be unstealable
  94. format slot 7 of player with black stained Glass Pane named "&0" to be unstealable
  95. format slot 8 of player with black stained Glass Pane named "&0" to be unstealable
  96. format slot 9 of player with book named "&c&lSoul Enchantment Book" with lore "&7Currently Disabled||" to close
  97. format slot 10 of player with black stained Glass Pane named "&0" to be unstealable
  98. format slot 11 of player with book named "&f&lBasic Enchantment Book" with lore "&7Examine to recieve a random||&f&l&nBasic&r &7Enchantment Book.||||&b&lBuy for &f50 Souls" to close then run [make player execute command "/book basic"]
  99. format slot 12 of player with book named "&b&lGood Enchantment Book" with lore "&7Examine to recieve a random||&b&l&nGood&r &7Enchantment Book.||||&b&lBuy for &f75 Souls" to close then run [make player execute command "/book good"]
  100. format slot 13 of player with book named "&d&lSuperior Enchantment Book" with lore "&7Examine to recieve a random||&d&l&nSuperior&r &7Enchantment Book.||||&b&lBuy for &f100 Levels" to close then run [make player execute command "/book superior"]
  101. format slot 14 of player with book named "&2&lMaster Enchantment Book" with lore "&7Currently Disabled" to close
  102. format slot 15 of player with book named "&6&lLegendary Enchantment Book" with lore "&7Currently Disabled" to close
  103. format slot 16 of player with black stained Glass Pane named "&0" to be unstealable
  104. format slot 17 of player with black stained Glass Pane named "&0" to be unstealable
  105. format slot 18 of player with black stained Glass Pane named "&0" to be unstealable
  106. format slot 19 of player with black stained Glass Pane named "&0" to be unstealable
  107. format slot 20 of player with black stained Glass Pane named "&0" to be unstealable
  108. format slot 21 of player with black stained Glass Pane named "&0" to be unstealable
  109. format slot 22 of player with black stained Glass Pane named "&0" to be unstealable
  110. format slot 23 of player with black stained Glass Pane named "&0" to be unstealable
  111. format slot 24 of player with black stained Glass Pane named "&0" to be unstealable
  112. format slot 25 of player with black stained Glass Pane named "&0" to be unstealable
  113. format slot 26 of player with black stained Glass Pane named "&0" to be unstealable
  114.  
  115. # The "on rightclick" event below is used to randomly
  116. # Randomly select an enchantment based on the unviewed
  117. # Book type in your hand when right clicking
  118.  
  119. on rightclick:
  120. # Setting and checking the unviewed enchant item
  121. set {_item} to yaml value "books.itemtype" from "BalefulEnchantsConfigs/enchants.yml"
  122. set {_item} to "%{_item}%" parsed as item type
  123. if held item is {_item}:
  124. set {_name::*} to name of held item split at " "
  125. set {_rarity} to {_name::1}
  126.  
  127. # Replacing all color codes and capital letters
  128. # To use with yaml get events
  129. set {_rarity} to uncolored {_rarity}
  130. set {_rarity} to convert {_rarity} to all lowercase
  131.  
  132. # Testing that {_rarity} properly pulls yaml nodes
  133. set {_enchants::*} to yaml nodes "%{_rarity}%enchants" from "BalefulEnchantsConfigs/enchants.yml"
  134. set {_temp} to random integer from 0.9 to 3
  135. set {_enchant} to {_enchants::%{_temp}%}
  136.  
  137. # Set the name and lore based on the enchantment from the YML
  138. set {_lore} to yaml value "%{_rarity}%enchants.%{_enchant}%.lore" from "BalefulEnchantsConfigs/enchants.yml"
  139. set {_name} to yaml value "%{_rarity}%enchants.%{_enchant}%.name" from "BalefulEnchantsConfigs/enchants.yml"
  140.  
  141. # Set the max level based on the enchantment from the YML
  142. set {_maxlevel} to yaml value "%{_rarity}%enchants.%{_enchant}%.maxlevel" from "BalefulEnchantsConfigs/enchants.yml"
  143. set {_maxlevel} to "%{_maxlevel}%" parsed as integer
  144.  
  145. # Randomly select a level for the enchantment
  146. set {_level} to random integer between 0.9 and {_maxlevel}
  147.  
  148. # Convert that random number to a roman numeral
  149. set {_level} to roman numeral of {_level}
  150.  
  151. # Set the percentage chances for success and destroy
  152. set {_success} to a random integer between 1 and 100
  153. set {_destroy} to a random integer between 0 and 100
  154.  
  155. # Test Broadcasts
  156. # Testing Selection of Random Enchant
  157. # As well as corresponding max level and lore
  158. set {_success} to a random integer between 1 and 100
  159. set {_destroy} to a random integer between 0 and 100
  160. remove 1 of player's tool from player's tool
  161. add enchanted book named "%{_name}% %{_level}%" with lore "%{_lore}%||&aSuccess Chance %{_success}% %%||&cDestroy Chance %{_destroy}% %%" to player's inventory
  162.  
  163.  
  164.  
  165. # The "on inventory click" event below checks the
  166. # Random enchant given from the book, and then if the
  167. # Item is correct, and does not contain any level of
  168. # The enchant, it applies the enchant to the item
  169.  
  170. on inventory click:
  171. # Set the name and lore variables
  172. set {_name} to name of cursor item
  173. set {_lore::*} to lore of cursor item split at "||"
  174.  
  175. # Check the books rarity to pull from YML file
  176. set {_temp::*} to {_lore::3} split at " "
  177. set {_rarity} to uncolored {_temp::1}
  178. set {_rarity} to convert {_rarity} to all lowercase
  179.  
  180. # Set enchant name variable list and remove roman numerals
  181. # Used to check if item already contains the enchant
  182. set {_namepart::*} to name of cursor item split at " "
  183. set {_namepart::*} to uncolored {_namepart::*}
  184. remove "I" and "II" and "III" and "IV" and "V" from {_namepart::*}
  185.  
  186. # Set the item type allowed
  187. set {_temp::*} to {_lore::2} split at " "
  188. set {_allowed} to {_temp::1}
  189. set {_allowed} to uncolored {_allowed}
  190. set {_allowed} to convert {_allowed} to all lowercase
  191. set {_allowed} to {_allowed} parsed as item type
  192.  
  193. if name of cursor item is {_name}:
  194. if clicked item is {_allowed}:
  195. if lore of clicked item contains {_namepart::*}:
  196. set action bar of player to "Your Item Already Contains This Enchant!"
  197. else:
  198. set {_tempsuc::*} to {_lore::5} split at " "
  199. set {_tempdes::*} to {_lore::6} split at " "
  200. set {_success} to {_tempsuc::3} parsed as integer
  201. set {_destroy} to {_tempdes::3} parsed as integer
  202. chance of {_success}%:
  203. set lore of clicked item to "%lore of clicked item%||%{_name}%"
  204. set cursor item to air
  205. set clicked item to shiny clicked item
  206. cancel event
  207. else:
  208. set cursor item to air
  209. set clicked item to air
  210. set action bar of player to "The Enchant Failed! Gear Destroyed!"
  211. cancel event
  212. else if clicked item is not {_allowed}:
  213. if clicked item is not air:
  214. set action bar of player to "Not the Correct item to enchant!"
  215.  
  216.  
  217.  
  218. on damage of player:
  219. attacker is a player
  220.  
  221. # Wrath of Zeus Setup #
  222. if lore of attacker's held item contains "Wrath of Zeus I":
  223. chance of 6%:
  224. strike lightning effect at the victim
  225. damage the victim by 1 heart
  226. if lore of attacker's held item contains "Wrath of Zeus II":
  227. chance of 4.5%:
  228. strike lightning effect at the victim
  229. damage the victim by 1.5 heart
  230. if lore of attacker's held item contains "Wrath of Zeus III":
  231. chance of 3.5%:
  232. strike lightning effect at the victim
  233. damage the victim by 2 heart
  234. if lore of attacker's held item contains "Wrath of Zeus IV":
  235. chance of 2.5%:
  236. strike lightning effect at the victim
  237. damage the victim by 2.5 heart
  238. if lore of attacker's held item contains "Wrath of Zeus V":
  239. chance of 1.5%:
  240. strike lightning effect at the victim
  241. damage the victim by 3 heart
  242.  
  243. # Cripling Blow Setup #
  244. if lore of attacker's held item contains "Cripling Blow I":
  245. chance of 6%:
  246. apply slowness to victim for 3 seconds
  247. if lore of attacker's held item contains "Cripling Blow II":
  248. chance of 4.5%:
  249. apply slowness to victim for 4 seconds
  250. if lore of attacker's held item contains "Cripling Blow III":
  251. chance of 3.5%:
  252. apply slowness to victim for 5 seconds
  253. if lore of attacker's held item contains "Cripling Blow IV":
  254. chance of 2.5%:
  255. apply slowness to victim for 6 seconds
  256. if lore of attacker's held item contains "Cripling Blow V":
  257. chance of 1.5%:
  258. apply slowness to victim for 7 seconds
  259.  
  260. # Roaring Flames Setup #
  261. if lore of victim's chestplate contains "Roaring Flames I":
  262. chance of 3%:
  263. ignite the attacker
  264. if lore of victim's chestplate contains "Roaring Flames II":
  265. chance of 5%:
  266. ignite the attacker
  267. if lore of victim's chestplate contains "Roaring Flames III":
  268. chance of 7%:
  269. ignite the attacker
  270. if lore of victim's chestplate contains "Roaring Flames IV":
  271. chance of 9%:
  272. ignite the attacker
  273. if lore of victim's chestplate contains "Roaring Flames V":
  274. chance of 11%:
  275. ignite the attacker
  276.  
  277. # Venomous Strike Setup #
  278. if lore of attacker's held item contains "Venomous Strike I":
  279. chance of 4%:
  280. remove poison from victim
  281. apply poison 1 to victim for 3 seconds
  282. if lore of attacker's held item contains "Venomous Strike II":
  283. chance of 6.5%:
  284. remove poison from victim
  285. apply poison 1 to victim for 3 seconds
  286. if lore of attacker's held item contains "Venomous Strike III":
  287. chance of 8%:
  288. remove poison from victim
  289. apply poison 1 to victim for 3 seconds
  290. if lore of attacker's held item contains "Venomous Strike IV":
  291. chance of 10.5%:
  292. remove poison from victim
  293. apply poison 1 to victim for 3 seconds
  294. if lore of attacker's held item contains "Venomous Strike V":
  295. chance of 12%:
  296. remove poison from victim
  297. apply poison 1 to victim for 3 seconds
  298.  
  299. # Decimation Setup #
  300. if lore of attacker's held item contains "Decimation I":
  301. chance of 4%:
  302. damage the victim by 2 hearts
  303. if lore of attacker's held item contains "Decimation II":
  304. chance of 6.5%:
  305. damage the victim by 2 hearts
  306. if lore of attacker's held item contains "Decimation III":
  307. chance of 8%:
  308. damage the victim by 2 hearts
  309. if lore of attacker's held item contains "Decimation IV":
  310. chance of 10.5%:
  311. damage the victim by 2 hearts
  312. if lore of attacker's held item contains "Decimation V":
  313. chance of 12%:
  314. damage the victim by 2 hearts
  315.  
  316.  
  317. sharpsk on armor equip:
  318. # Hells Embrace Setup
  319. if item is helmet:
  320. if lore of event-item contains "Hells Embrace I":
  321. apply fire resistance to the player for 999 days
  322.  
  323. # Rejuvenation Setup
  324. if item is chestplate:
  325. if lore of event-item contains "Rejuvenation I":
  326. apply regeneration 1 to the player for 999 days
  327. apply saturation 1 to the player for 999 days
  328. if lore of event-item contains "Rejuvenation II":
  329. apply regeneration 2 to the player for 999 days
  330. apply saturation 1 to the player for 999 days
  331. if lore of event-item contains "Rejuvenation III":
  332. apply regeneration 3 to the player for 999 days
  333. apply saturation 1 to the player for 999 days
  334. if lore of event-item contains "Rejuvenation IV":
  335. apply regeneration 4 to the player for 999 days
  336. apply saturation 1 to the player for 999 days
  337. if lore of event-item contains "Rejuvenation V":
  338. apply regeneration 5 to the player for 999 days
  339. apply saturation 1 to the player for 999 days
  340.  
  341. sharpsk on armor unequip:
  342. if item is chestplate:
  343. if lore of event-item contains "Rejuvenation I":
  344. remove regeneration from the player
  345. remove saturation from the player
  346. if lore of event-item contains "Rejuvenation II":
  347. remove regeneration from the player
  348. remove saturation from the player
  349. if lore of event-item contains "Rejuvenation III":
  350. remove regeneration from the player
  351. remove saturation from the player
  352. if lore of event-item contains "Rejuvenation IV":
  353. remove regeneration from the player
  354. remove saturation from the player
  355. if lore of event-item contains "Rejuvenation V":
  356. remove regeneration from the player
  357. remove saturation from the player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement