stormtrooper28

SkMagiks [Beta 0.4]

Feb 8th, 2015
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.29 KB | None | 0 0
  1. # cost:cooldown
  2. # droom = anvil attack = (Spell_Level / 2) + 1 Explosion_Size 40:15
  3. # fireball = (Spell_Level * .25) +.8 Explosion_Size 30:15
  4. # lance = lance of explosions = Spell_Level * 6 Lance_Size 75:50
  5. # lighting strike = right click on chasm = Spell_Level * 10 length 50:20
  6. # magic missile = (Spell_Level / 2) + 2.5 Damage, Spell_Level * 15 Length 15:5
  7. # flash = Warp = (Spell_Level * 10) + 20 Range 50:50
  8.  
  9. on first join:
  10. give player 1 blaze rod named "&6&lWand &7No active spell" with lore "&bLeft click to cast a spell, &3Right click to choose one!"
  11. give player 128 redstone named "&4Mana"
  12.  
  13. options:
  14. protection.level: 6 #This is the level of protection mana mobs will have on their armor#
  15. droprate.min: 10 #this is the minimum amout of mana a manamob will drop#
  16. droprate.max: 32 #this is the maximum amount of mana a manamob will drop#
  17. convert.rate: 10 #this is the amount of redstone required to make 1 mana in a mana converter#
  18. fragment.rate: 1% #this is the percent chance of a mana mob dropping a wand fragment#
  19.  
  20. #below are the mana costs per spell#
  21. mana.Warp: 120
  22. mana.heal: 50
  23. mana.rapidfire: 15
  24. mana.speedboost: 20
  25. mana.minibomb: 20
  26. mana.raindance: 512 #note: this is very high because players changing the weather constantly is annoying#
  27. mana.droom: 40
  28. mana.fireball: 30
  29. mana.lance: 75
  30. mana.lightning_strike: 50
  31. mana.magic_blast: 15
  32. mana.implode: 1 # 50
  33. mana.leap: 40
  34. mana.ghost: 180
  35. mana.nofall: 45
  36.  
  37. #below are the cooldowns per spell (in seconds)#
  38. timer.Warp: 60
  39. timer.heal: 30
  40. timer.rapidfire: 5
  41. timer.speedboost: 30
  42. timer.minibomb: 15
  43. timer.raindance: 3600
  44. timer.implode: 1 # 30
  45. timer.leap: 8
  46. timer.ghost: 1
  47. timer.nofall: 20
  48.  
  49.  
  50.  
  51. on spawn of skeleton or zombie:
  52. chance of 7%:
  53. equip event-entity with leather helmet of protection {@protection.level} named "&4Mana Helmet"
  54. equip event-entity with leather chestplate of protection {@protection.level} named "&4Mana Chestplate"
  55. equip event-entity with leather leggings of protection {@protection.level} named "&4Mana Leggings"
  56. equip event-entity with leather boots of protection {@protection.level} named "&4Mana Boots"
  57. dye event-entity's helmet red
  58. dye event-entity's chestplate red
  59. dye event-entity's leggings red
  60. dye event-entity's boots red
  61. if event-entity is a zombie:
  62. set tool of event-entity to iron sword of sharpness 2 and fire aspect 1 named "&4Mana Sword"
  63. else if event-entity is a skeleton:
  64. set tool of event-entity to bow of punch 1 and flame 1 named "&4Mana Bow"
  65. set {manamob.%event-entity%} to true
  66.  
  67. on death:
  68. if {manamob.%victim%} is true:
  69. set {_count} to a random integer between {@droprate.min} and {@droprate.max}
  70. loop {_count} times:
  71. add redstone named "&4Mana" to drops
  72. chance of {@fragment.rate}:
  73. add 1 blaze powder named "&6&oWand Fragment" to drops
  74.  
  75. on death:
  76. world is "troopcraft" or "troopcraft_nether" or "troopcraf_the_end":
  77. chance of 5%:
  78. add 3 redstone named "&4Mana" to drops
  79. chance of 1%:
  80. set {_count} to a random integer between {@droprate.min} and {@droprate.max}
  81. loop {_count} times:
  82. add redstone named "&4Mana" to drops
  83. chance of 1%:
  84. chance of 1%:
  85. add 1 blaze powder named "&6&oWand Fragment" to drops
  86.  
  87.  
  88. #on right click on stone button:
  89. # loop blocks in radius 3 around event-block:
  90. # if loop-block is stone brick stairs:
  91. # add 1 to {_count.stonebrick} #should be 6#
  92. # if loop-block is double stone slab:
  93. # add 1 to {_count.stoneslab} #should be 2#
  94. # if loop-block is a chest:
  95. # set {_chest} to location of loop-block
  96. # if loop-block is a dropper:
  97. # set {_output} to location of loop-block
  98.  
  99.  
  100.  
  101.  
  102. # if {_count.stonebrick} > 5:
  103. # if {_count.stoneslab} > 1:
  104. # if {_output} is set:
  105. # if {_chest} is set:
  106. # loop all items in block at {_chest}:
  107. # if loop-item is redstone:
  108. # set {_count.stack} to amount of loop-item in block at {_chest}
  109. # add {_count.stack} to {_count.redstone}
  110. # while {_count.redstone} > {@convert.rate} - 1:
  111. # remove 10 redstone from block at {_chest}
  112. # remove 10 from {_count.redstone}
  113. # add 1 redstone named "&4Mana" to block at {_output}
  114.  
  115.  
  116.  
  117. on right click:
  118. world is "troopcraft" or "troopcraft_nether" or "troopcraf_the_end"
  119. {manachest.picking.%uuid of player%} is true:
  120. set {manachest.%uuid of player%} to event-block
  121. message "&3You set your mana chest to the %event-block% at &b%{manachest.%uuid of player%}%"
  122. set {manachest.picking.%uuid of player%} to false
  123.  
  124.  
  125.  
  126.  
  127.  
  128. command /wand:
  129. aliases: /wandgive
  130. permission: skript.op
  131. permission message: Unknown command. Type "/help" for help.
  132. trigger:
  133. give player 1 blaze rod named "&6&lWand &7No active spell" with lore "&bLeft click to cast a spell, &3Right click to choose one!"
  134.  
  135. command /mana [<text>] [<integer>]:
  136. aliases: /magic, /magicka, /magik
  137. trigger:
  138. if arg 1 is not set:
  139. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  140. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  141. set {_mana} to {_mana.inv} + {_mana.chest}
  142. message "&3You have &b%{_mana}% &3mana!"
  143. stop
  144. else if arg 1 is "set":
  145. set {manachest.%uuid of player%} to location of target block
  146. message "&3You set your mana chest to the %target block% at &b%{manachest.%uuid of player%}%"
  147. else if arg 1 is "handset":
  148. set {manachest.picking.%uuid of player%} to true
  149. message "&3Click a &bchest &3to select your chest!"
  150. else if arg 1 is "open":
  151. if {manachest.%uuid of player%} isn't set:
  152. message "&3You need to set a &bMana Chest &3to open your mana storage!"
  153. message "&3To do this, look at your specified chest and type ""&b/mana set&3""!"
  154. stop
  155. open inventory of block at {manachest.%uuid of player%} to player
  156. message "&bHere you go!"
  157. else if arg 1 is "give":
  158. if player doesn't have permission "skript.op":
  159. message "Unknown command. Type ""/help"" for help."
  160. stop
  161. if arg 2 isn't set:
  162. message "&cError! Invalid amount of redstone!"
  163. stop
  164. if arg 2 < 1:
  165. message "&cError! Invalid amount of redstone!"
  166. stop
  167. set {_count} to arg 2
  168. loop {_count} times:
  169. give player 1 redstone named "&4Mana"
  170. else:
  171. send "&3You need a wand to perform the most basic of magic! &4The easiest way to get a wand is by killing mobs. &2Of course there is a cost, which is called mana. &cYou can either kill mobs or convert redstone in a converter to gain this mana."
  172.  
  173. on click:
  174. player's tool is redstone named "&4Mana":
  175. cancel the event
  176.  
  177.  
  178.  
  179. on mine:
  180. if block is a dispenser:
  181. if block contains 4 diamond blocks:
  182. if block contains 1 blaze rod:
  183. if block contains 4 gold blocks:
  184. if block contains 1 emerald:
  185. set {_loc} to location of target block
  186. cancel the event
  187. clear block's inventory
  188. set block to air
  189. wait 1 tick
  190. drop a blaze rod named "&6&lWand &7No active spell" at {_loc}
  191. if block contains 4 diamonds:
  192. if block contains 4 gold ingots:
  193. if block contains 1 emerald:
  194. if block contains 3 blaze powder named "&6&oWand Fragment":
  195. set {_loc} to location of target block
  196. cancel the event
  197. clear block's inventory
  198. set block to air
  199. wait 1 tick
  200. drop a blaze rod named "&6&lWand &7No active spell" at {_loc}
  201.  
  202. command /spell-Warp:
  203. permission: skript.op
  204. permission message: Unknown command. Type "/help" for help.
  205. trigger:
  206. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  207. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  208. set {_mana} to {_mana.inv} + {_mana.chest}
  209. if {_mana} < {@mana.Warp}:
  210. message "&3You need at least &c{@mana.Warp} Mana &3to use this spell!"
  211. stop
  212. set {_difference} to difference between {spell.timer.Warp.%player%} and now
  213. if {_difference} is less than {@timer.Warp} seconds:
  214. set {_difference} to difference between {_difference} and {@timer.Warp} seconds
  215. message "&3Cooldown: &b%{_difference}%"
  216. stop
  217. set {spell.timer.Warp.%player%} to now
  218. if {_mana.inv} >= {@mana.Warp}:
  219. remove {@mana.Warp} redstone named "&4Mana" from player
  220. else if {_mana.inv} < {@mana.Warp}:
  221. remove {@mana.Warp} redstone named "&4Mana" from block at {manachest.%uuid of player%}
  222. shoot an enderpearl with velocity 4
  223. set {nofall.%player%} to true
  224. set {enderwand.%projectile%} to true
  225.  
  226. command /spell-heal:
  227. permission: skript.op
  228. permission message: Unknown command. Type "/help" for help.
  229. trigger:
  230. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  231. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  232. set {_mana} to {_mana.inv} + {_mana.chest}
  233. if {_mana} < {@mana.heal}:
  234. message "&3You need at least &c{@mana.heal} Mana &3to use this spell!"
  235. stop
  236. set {_difference} to difference between {spell.timer.heal.%player%} and now
  237. if {_difference} is less than {@timer.heal} seconds:
  238. set {_difference} to difference between {_difference} and {@timer.heal} seconds
  239. message "&3Cooldown: &b%{_difference}%"
  240. stop
  241. set {spell.timer.heal.%player%} to now
  242. if {_mana.inv} >= {@mana.heal}:
  243. remove {@mana.heal} redstone named "&4Mana" from player
  244. else if {_mana.inv} < {@mana.heal}:
  245. remove {@mana.heal} redstone named "&4Mana" from block at {manachest.%uuid of player%}
  246. heal the player by 40 hearts
  247. send "&2Care Package Received!"
  248.  
  249. command /spell-rapidfire:
  250. permission: skript.op
  251. permission message: Unknown command. Type "/help" for help.
  252. trigger:
  253. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  254. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  255. set {_mana} to {_mana.inv} + {_mana.chest}
  256. if {_mana} < {@mana.rapidfire}:
  257. message "&3You need at least &c{@mana.rapidfire} Mana &3 plus an additional &c1 &3Mana per arrow to use this spell!"
  258. stop
  259. set {_difference} to difference between {spell.timer.rapidfire.%player%} and now
  260. if {_difference} is less than {@timer.rapidfire} seconds:
  261. set {_difference} to difference between {_difference} and {@timer.rapidfire} seconds
  262. message "&3Cooldown: &b%{_difference}%"
  263. stop
  264. set {spell.timer.rapidfire.%player%} to now
  265. if {_mana.inv} >= {@mana.rapidfire}:
  266. remove {@mana.rapidfire} redstone named "&4Mana" from player
  267. else if {_mana.inv} < {@mana.rapidfire}:
  268. remove {@mana.rapidfire} redstone named "&4Mana" from block at {manachest.%uuid of player%}
  269. subtract {@mana.rapidfire} from {_mana.inv}
  270. loop 20 times:
  271. if {_mana.inv} >= {@mana.rapidfire}:
  272. if {_mana.inv} > 0:
  273. make player shoot arrow at velocity 3
  274. set {rapidfire.%last shot projectile%} to true
  275. play raw sound "random.bow" at player with pitch 1 volume 1
  276. if {_mana.inv} > 0:
  277. remove 1 redstone named "&4Mana" from player
  278. subtract 1 from {_mana.inv}
  279. else if {_mana.inv} < 1:
  280. remove 1 redstone named "&4Mana" from block at {manachest.%uuid of player%}
  281. remove 1 from {_mana.inv}
  282. wait 2 ticks
  283. if {_mana.inv} < 0:
  284. send "&3Mana is out"
  285. stop
  286. else if {_mana.inv} < {@mana.rapidfire}:
  287. if {_mana.chest} > 0:
  288. make player shoot arrow at velocity 3
  289. set {rapidfire.%last shot projectile%} to true
  290. play raw sound "random.bow" at player with pitch 1 volume 1
  291. if {_mana.inv} > 0:
  292. remove 1 redstone named "&4Mana" from player
  293. subtract 1 from {_mana.chest}
  294. else if {_mana.chest} < 1:
  295. remove 1 redstone named "&4Mana" from block at {manachest.%uuid of player%}
  296. remove 1 from {_mana.chest}
  297. wait 2 ticks
  298. if {_mana.chest} < 0:
  299. send "&3Mana is out"
  300. stop
  301.  
  302. command /spell-speedboost:
  303. permission: skript.op
  304. permission message: Unknown command. Type "/help" for help.
  305. trigger:
  306. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  307. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  308. set {_mana} to {_mana.inv} + {_mana.chest}
  309. if {_mana} < {@mana.speedboost}:
  310. message "&3You need at least &c{@mana.speedboost} Mana &3to use this spell!"
  311. stop
  312. set {_difference} to difference between {spell.timer.speedboost.%player%} and now
  313. if {_difference} is less than {@timer.speedboost} seconds:
  314. set {_difference} to difference between {_difference} and {@timer.speedboost} seconds
  315. message "&3Cooldown: &b%{_difference}%"
  316. stop
  317. set {spell.timer.speedboost.%player%} to now
  318. if {_mana.inv} >= {@mana.speedboost}:
  319. remove {@mana.speedboost} redstone named "&4Mana" from player
  320. else if {_mana.inv} < {@mana.speedboost}:
  321. remove {@mana.speedboost} redstone named "&4Mana" from block at {manachest.%uuid of player%}
  322.  
  323. set player's walk speed to 0.6
  324. wait 30 seconds
  325. set player's walk speed to 0.2
  326.  
  327. on join:
  328. set player's walk speed to 0.2
  329.  
  330. command /spell-minibomb:
  331. permission: skript.op
  332. permission message: Unknown command. Type "/help" for help.
  333. trigger:
  334. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  335. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  336. set {_mana} to {_mana.inv} + {_mana.chest}
  337. if {_mana} < {@mana.minibomb}:
  338. message "&3You need at least &c{@mana.minibomb} Mana &3to use this spell!"
  339. stop
  340. set {_difference} to difference between {spell.timer.minibomb.%player%} and now
  341. if {_difference} is less than {@timer.minibomb} seconds :
  342. set {_difference} to difference between {_difference} and {@timer.minibomb} seconds
  343. message "&3Cooldown: &b%{_difference}%"
  344. stop
  345. set {spell.timer.minibomb.%player%} to now
  346. if {_mana.inv} >= {@mana.minibomb}:
  347. remove {@mana.minibomb} redstone named "&4Mana" from player
  348. else if {_mana.inv} < {@mana.minibomb}:
  349. remove {@mana.minibomb} redstone named "&4Mana" from block at {manachest.%uuid of player%}
  350. shoot a snowball at velocity 1.5
  351. set {minibomb.%last shot projectile%} to true
  352.  
  353. command /spell-raindance:
  354. permission: skript.op
  355. permission message: Unknown command. Type "/help" for help.
  356. trigger:
  357. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  358. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  359. set {_mana} to {_mana.inv} + {_mana.chest}
  360. if {_mana} < {@mana.raindance}:
  361. message "&3You need at least &c{@mana.raindance} Mana &3to use this spell!"
  362. stop
  363. set {_difference} to difference between {spell.timer.raindance.%player%} and now
  364. if {_difference} is less than {@timer.raindance} seconds:
  365. set {_difference} to difference between {_difference} and {@timer.raindance} seconds
  366. message "&3Cooldown: &b%{_difference}%"
  367. stop
  368. set {spell.timer.raindance.%player%} to now
  369. if {_mana.inv} >= {@mana.raindance}:
  370. remove {@mana.raindance} redstone named "&4Mana" from player
  371. else if {_mana.inv} < {@mana.raindance}:
  372. remove {@mana.raindance} redstone named "&4Mana" from block at {manachest.%uuid of player%}
  373. run player command "/toggledownfall" as op
  374. broadcast "&9&o%player% has performed a rain dance . . ."
  375.  
  376. command /spell-implode:
  377. permission: skript.op
  378. permission message: Unknown command. Type "/help" for help.
  379. trigger:
  380. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  381. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  382. set {_mana} to {_mana.inv} + {_mana.chest}
  383. if {_mana} < {@mana.implode}:
  384. message "&3You need at least &c{@mana.implode} Mana &3to use this spell!"
  385. stop
  386. set {_difference} to difference between {spell.timer.implode.%player%} and now
  387. if {_difference} is less than {@timer.implode} seconds:
  388. set {_difference} to difference between {_difference} and {@timer.implode} seconds
  389. message "&3Cooldown: &b%{_difference}%"
  390. stop
  391. set {spell.timer.implode.%player%} to now
  392. if {_mana.inv} >= {@mana.implode}:
  393. remove {@mana.implode} of redstone named "&4Mana" from player
  394. else if {_mana.inv} < {@mana.implode}:
  395. remove {@mana.implode} of redstone named "&4Mana" from block at {manachest.%uuid of player%}
  396.  
  397. add east to {_listofdirections::*}
  398. add west to {_listofdirections::*}
  399. add south to {_listofdirections::*}
  400. add north to {_listofdirections::*}
  401.  
  402. set {_loc} to targeted block
  403.  
  404. play raw sound "random.explode" at {_loc} with pitch 1 volume 10
  405. # play 60 of effect "blockcrack_35_14" with data 1 at {_loc}
  406. # play 55 of effect "lava" with data 1 at {_loc}
  407.  
  408. #loop blocks in radius 4 around block at {_loc}:
  409. loop blocks in radius 3 around block at {_loc}:
  410. #message "%loop-block's type%" to all players
  411. "%loop-block%" does not contain "air" or "bedrock" or "obsidian" or "barrier":
  412. clear {_check}
  413. distance between loop-block and {_loc} is greater than 3.2:
  414. chance of 50%:
  415. set {_check} to true
  416. distance between loop-block and {_loc} is greater than 5:
  417. set {_check} to true
  418. if "%loop-block%" contains "torch" or "lever" or "sign" or "wheat" or "carrot" or "layer" or "potato" or "cake" or "button" or "long" or "stem" or "redstone" or "fire" or "wire" or "diode" or "door" or "sand" or "gravel" or "sapling" or "leaves" or "mushroom" or "poppy" or "dandelion" or "fern" or "orchid" or "allium" or "bluet" or "tulip" or "daisy" or "ladder" or "carpet" or "vine" or "lily" or "anvil" or "lilac" or "flower" or "rose" or "peony" or "bed" or "diode" or "comparator" or "plate" or "hook" or "rail":
  419. if "%loop-block%" does not contain "block":
  420. if "%loop-block%" contains "sign":
  421. set {fallingblocks.soft.sign.1::%location of loop-block%} to "%line 1 of loop-block%"
  422. set {fallingblocks.soft.sign.2::%location of loop-block%} to "%line 2 of loop-block%"
  423. set {fallingblocks.soft.sign.3::%location of loop-block%} to "%line 3 of loop-block%"
  424. set {fallingblocks.soft.sign.4::%location of loop-block%} to "%line 4 of loop-block%"
  425.  
  426. #message "Soft" to all players
  427. set {fallingblocks.soft.location::%location of loop-block%} to location of loop-block
  428. set {fallingblocks.soft.blocktype::%location of loop-block%} to loop-block's type
  429. set {fallingblocks.soft.time::%location of loop-block%} to now
  430. add loop-block's location to {_blocks.soft::*}
  431.  
  432. if {fallingblocks.soft.location::%location of loop-block%} is not set:
  433. if {_check} is not set:
  434. #message "Hard" to all players
  435. set {fallingblocks.hard.location::%location of loop-block%} to location of loop-block
  436. #message "%loop-block's type%" to all players
  437. set {fallingblocks.hard.blocktype::%location of loop-block%} to loop-block's type
  438. set {fallingblocks.hard.time::%location of loop-block%} to now
  439. add loop-block's location to {_blocks.hard::*}
  440. else if "%loop-block%" is "air":
  441. if {fallingblocks.hard.time::%location of loop-block%} is set:
  442. set {fallingblocks.hard.time::%location of loop-block%} to now
  443. else if {fallingblocks.soft.time::%location of loop-block%} is set:
  444. set {fallingblocks.soft.time::%location of loop-block%} to now
  445.  
  446.  
  447. loop {_blocks.soft::*}:
  448. # make player break block at loop-value
  449. block at loop-value is air
  450. set {_looploc} to location 1 above block at loop-value
  451. set {_block} to type of block at loop-value
  452. spawn falling block of {_block} at {_looploc}
  453. wait 1 tick
  454. loop {_blocks.hard::*}:
  455. # make player break block at loop-value
  456. block at loop-value is air
  457. set {_looploc} to location 1 above block at loop-value
  458. set {_block} to type of block at loop-value
  459. set block at loop-value to air
  460. spawn falling block of {_block} at {_looploc}
  461.  
  462. wait 1 tick
  463. play raw sound "random.explode" at {_loc} with pitch 1 volume 10
  464. #play 60 of effect "blockcrack_35_14" with data 1 at {_loc}
  465. #play 55 of effect "lava" with data 1 at {_loc}
  466.  
  467. loop entities in radius 6 around block at {_loc}:
  468. #message "%loop-entity%"
  469. "%loop-entity%" is "falling block":
  470. set {listoffallingblock::%loop-entity%} to true
  471.  
  472. set {_speed} to a random number between .3 and 1.2
  473.  
  474. push loop-entity up at speed {_speed}
  475.  
  476. set {_dir.1} to random element out of {_listofdirections::*}
  477. set {_dir.2} to random element out of {_listofdirections::*}
  478. set {_dir.3} to random element out of {_listofdirections::*}
  479.  
  480. set {_dir.1.speed} to random number between .1 and .6
  481. set {_dir.2.speed} to random number between .1 and .6
  482. set {_dir.3.speed} to random number between .1 and .6
  483.  
  484. push loop-entity {_dir.1} at speed {_dir.1.speed}
  485. push loop-entity {_dir.2} at speed {_dir.2.speed}
  486. push loop-entity {_dir.3} at speed {_dir.3.speed}
  487.  
  488. wait 1 tick
  489. play raw sound "random.explode" at {_loc} with pitch 1 volume 10
  490. #play 60 of effect "blockcrack_35_14" with data 1 at {_loc}
  491. #play 55 of effect "lava" with data 1 at {_loc}
  492. if size of {fallingblocks.hard.location::*} is greater than 0:
  493. set {fallingblocks.activate} to true
  494.  
  495. command /spell-leap:
  496. permission: skript.op
  497. permission message: Unknown command. Type "/help" for help.
  498. trigger:
  499. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  500. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  501. set {_mana} to {_mana.inv} + {_mana.chest}
  502. if {_mana} < {@mana.leap}:
  503. message "&3You need at least &c{@mana.leap} Mana &3to use this spell!"
  504. stop
  505. set {_difference} to difference between {spell.timer.leap.%player%} and now
  506. if {_difference} is less than {@timer.leap} seconds:
  507. set {_difference} to difference between {_difference} and {@timer.leap} seconds
  508. message "&3Cooldown: &b%{_difference}%"
  509. stop
  510. set {spell.timer.leap.%player%} to now
  511. if {_mana.inv} >= {@mana.leap}:
  512. remove {@mana.leap} of redstone named "&4Mana" from player
  513. else if {_mana.inv} < {@mana.leap}:
  514. remove {@mana.leap} of redstone named "&4Mana" from block at {manachest.%uuid of player%}
  515. push player forward at speed 5
  516. push player up at speed 1
  517. set {nofall.%player%} to true
  518. wait 28 seconds
  519. delete {nofall.%player%}
  520.  
  521. command /spell-ghost:
  522. permission: skript.op
  523. permission message: Unknown command. Type "/help" for help.
  524. trigger:
  525. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  526. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  527. set {_mana} to {_mana.inv} + {_mana.chest}
  528. if {_mana} < {@mana.ghost}:
  529. message "&3You need at least &c{@mana.ghost} Mana &3to use this spell!"
  530. stop
  531. set {_difference} to difference between {spell.timer.ghost.%player%} and now
  532. if {_difference} is less than {@timer.ghost} seconds:
  533. set {_difference} to difference between {_difference} and {@timer.ghost} seconds
  534. message "&3Cooldown: &b%{_difference}%"
  535. stop
  536. set {spell.timer.ghost.%player%} to now
  537. if {_mana.inv} >= {@mana.ghost}:
  538. remove {@mana.ghost} of redstone named "&4Mana" from player
  539. else if {_mana.inv} < {@mana.ghost}:
  540. remove {@mana.ghost} of redstone named "&4Mana" from block at {manachest.%uuid of player%}
  541. set {_loc} to location of player
  542. set {no.gm.msg.%player%} to true
  543. run player command "/gmsp" as op
  544. delete {no.gm.msg.%player%}
  545. send "&7You are now a ghost!"
  546. apply water breathing to player for 10 seconds
  547. wait 10 seconds
  548. teleport player to {_loc}
  549. set {no.gm.msg.%player%} to true
  550. run player command "/gms" as op
  551. delete {no.gm.msg.%player%}
  552. teleport player to {_loc}
  553. send "&6You are a player again!"
  554. apply hunger 28 to player for 3 seconds
  555.  
  556. on server chat send:
  557. {no.gm.msg.%player%} is false
  558. packet message contains "Set game mode":
  559. cancel event
  560. set {no.gm.msg.%player%} to false
  561.  
  562. command /spell-nofall:
  563. permission: skript.op
  564. permission message: Unknown command. Type "/help" for help.
  565. trigger:
  566. set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  567. set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  568. set {_mana} to {_mana.inv} + {_mana.chest}
  569. if {_mana} < {@mana.nofall}:
  570. message "&3You need at least &c{@mana.nofall} Mana &3to use this spell!"
  571. stop
  572. set {_difference} to difference between {spell.timer.nofall.%player%} and now
  573. if {_difference} is less than {@timer.nofall} seconds:
  574. set {_difference} to difference between {_difference} and {@timer.nofall} seconds
  575. message "&3Cooldown: &b%{_difference}%"
  576. stop
  577. set {spell.timer.nofall.%player%} to now
  578. if {_mana.inv} >= {@mana.nofall}:
  579. remove {@mana.nofall} of redstone named "&4Mana" from player
  580. else if {_mana.inv} < {@mana.nofall}:
  581. remove {@mana.nofall} of redstone named "&4Mana" from block at {manachest.%uuid of player%}
  582. set {nofall.%player%} to true
  583. set {nofall.msg.%player%} to true
  584. send "&2Your Feather Falling is &lenabled&2!"
  585.  
  586. on projectile hit:
  587. if {rapidfire.%projectile%} is true:
  588. delete projectile
  589. delete {rapidfire.%projectile%}
  590. if {minibomb.%projectile%} is true:
  591. create safe explosion of force 3.5 at projectile
  592.  
  593. # spell run / executing
  594.  
  595. on left click:
  596. player's tool is a blaze rod:
  597. name of player's tool contains "&6&lWand":
  598. cancel the event
  599. if player's world is "troopcraft" or "troopcraft_nether" or "troopcraft_the_end":
  600. if name of player's tool contains "No active":
  601. send "&3Right Click to select a spell, &bleft click to cast!"
  602. stop
  603. if {spell.%player%} is "Warp" or "heal" or "rapidfire" or "speedboost" or "minibomb" or "raindance" or "ghost" or "leap" or "nofall":
  604. run player command "/spell-%{spell.%player%}%" as op
  605. else:
  606. send "&cThis can only be used in the factions world!"
  607. stop
  608. # if {spell.%player%} is "Warp":
  609. # run player command "/spell-Warp" as op
  610. # else if {spell.%player%} is "heal":
  611. # run player command "/spell-heal" as op
  612. # else if {spell.%player%} is "rapidfire":
  613. # run player command "/spell-rapidfire" as op
  614. # else if {spell.%player%} is "speedboost":
  615. # run player command "/spell-speedboost" as op
  616. # else if {spell.%player%} is "minibomb":
  617. # run player command "/spell-minibomb" as op
  618. # else if {spell.%player%} is "raindance":
  619. # run player command "/spell-raindance" as op
  620. # else if {spell.%player%} is "implode":
  621. # run player command "/spell-implode" as op
  622. # else if {spell.%player%} is "leap":
  623. # run player command "/spell-leap" as op
  624.  
  625. # format slot of player with named "" with lore "" to run "%player%"
  626. # spell name and changing # filler = light gray glass
  627.  
  628. command /spell-select <player> <text>:
  629. permission: skript.op
  630. permission message: Unknown command. Type "/help" for help.
  631. trigger:
  632. set name of {_p}'s tool to "%{_spell}%"
  633. set slot in {_p}'s hand bar to {magik.select.slot.%{_p}%}
  634. set {_p} to arg 1
  635. set {_spell} to arg 2
  636. set {spell.%{_p}%} to "%{_spell}%"
  637. close {_p}'s inventory
  638. wait 1 tick
  639. if {_p}'s tool is blaze rod:
  640. if name of {_p}'s tool contains "&6&lWand":
  641. set name of {_p}'s tool to "&6&lWand &3&o %{_spell}%"
  642. execute console command "title %{_p}% title {""text"":"""",""extra"":[{""text"":""%{_spell}%!"",""color"":""aqua"",""bold"":""true""}]}"
  643. execute console command "title %{_p}% subtitle {""text"":"""",""extra"":[{""text"":""selected!"",""color"":""aqua"",""bold"":""true""}]}"
  644. stop
  645. send "&4&lDon't change your wand around while selecting a spell!!!" to {_p}
  646.  
  647. on right click:
  648. player's tool is a blaze rod:
  649. name of player's tool contains "&6&lWand":
  650. set {magik.select.slot.%player%} to player's current hotbar slot
  651. cancel the event
  652. wait 1 tick
  653. open chest with 3 rows named "<black><magic>___<purple><bold>Spell Selector<black><magic>___" to player
  654. format slot 0 of player with diamond sword named "&4&lOffensive Spells!" with lore "These spells cause damage!" to run "%player%"
  655. format slot 1 of player with diamond sword named "&4&lOffensive Spells!" with lore "These spells cause damage!" to run "%player%"
  656.  
  657. format slot 2 of player with diamond chestplate named "&2&lDefensive Spells!" with lore "These spells defend / support!" to run "%player%"
  658. format slot 3 of player with diamond chestplate named "&2&lDefensive Spells!" with lore "These spells defend / support!" to run "%player%"
  659.  
  660. format slot 4 of player with white glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  661.  
  662. format slot 5 of player with grass block named "&2&lTerrain Spells!" with lore "These spells alter the environment!" to run "%player%"
  663. format slot 6 of player with grass block named "&2&lTerrain Spells!" with lore "These spells alter the environment!" to run "%player%"
  664.  
  665. format slot 7 of player with gold boots named "&2&lMovement Spells!" with lore "These spells do stuff to how you move!" to run "%player%"
  666. format slot 8 of player with gold boots named "&2&lMovement Spells!" with lore "These spells do stuff to how you move!" to run "%player%"
  667.  
  668. format slot 9 of player with arrow named "&cRapid Fire" with lore "Quickly shoot arrows at the cost of 1 mana/arrow!" to run "spell-select %player% rapidfire"
  669. format slot 10 of player with firework star named "&cMini-Bomb" with lore "Shoot a terrain-safe grenade!" to run "spell-select %player% minibomb"
  670. format slot 11 of player with healing potion named "&2Health Boost" with lore "Heals you to double natural heats!" to run "spell-select %player% heal"
  671. format slot 12 of player with feather named "&fFeather Falling" with lore "Suffer no fall damage on your ||next other-wise damaging fall!" to run "spell-select %player% nofall"
  672.  
  673. format slot 13 of player with white glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  674.  
  675. format slot 14 of player with water bucket named "&9Rain Dance" with lore "Perform a ritual to the Aztec god, Tlaloc!" to run "spell-select %player% raindance"
  676. format slot 15 of player with ghast tear named "&7Ghost" with lore "Become a spectral Ghost for 10 seconds!" to run "spell-select %player% ghost"
  677. format slot 16 of player with end portal frame named "&5Warp" with lore "Teleport and hope the chunks are loaded!" to run "spell-select %player% Warp"
  678. format slot 17 of player with sugar named "&3Speed Boost" with lore "Run faster for 30 seconds!" to run "spell-select %player% speedboost"
  679.  
  680. format slot 18 of player with gunpowder named "&0ForcePush<gold><bold>[WIP]" with lore "Push away your foes!" to run "tell %player% &cSorry, but that's not ready, yet..."
  681. format slot 19 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  682. format slot 20 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  683. format slot 21 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  684.  
  685. format slot 22 of player with white glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  686.  
  687. format slot 23 of player with tnt named "&0Implode&6&l[WIP]" with lore "Watch the blocks fly!" to run "tell %player% &cSorry, but that's not ready, yet..."
  688. format slot 24 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  689. format slot 25 of player with rabbit's foot named "&fLeap" with lore "Leap far and suffer no fall damage!" to run "spell-select %player% leap"
  690. format slot 26 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"
  691. stop
  692.  
  693. if player is sneaking:
  694. execute player command "/mana open"
  695. stop
  696.  
  697.  
  698. if {spellnum.%player%} is 10:
  699. set {spell.%player%} to "Equal Exchange"
  700. set name of player's tool to "&6&lWand of &2Equal Exchange"
  701. set lore of player's tool to "Use your Thaumaturgy and change the environment! ||&7&oNext spell: &3Warp"
  702.  
  703.  
  704. # set {spell.%player%} to "implode"
  705. # set name of player's tool to "&6&lWand &8Implode"
  706.  
  707. on damage:
  708. if damage was caused by fall:
  709. if {nofall.%victim%} is true:
  710. cancel the event
  711. delete {nofall.%victim%}
  712. if {nofall.msg.%victim%} is true:
  713. send "&cYou used up your anti-fall!"
  714. delete {nofall.msg.%victim%}
  715.  
  716. function mana_converter_south(l: location):
  717. block north of {mana.stone.button.converter.block} is air
  718. block north east of {mana.stone.button.converter.block} is air
  719. block east of {mana.stone.button.converter.block} is air
  720. block south east of {mana.stone.button.converter.block} is air
  721. block south of {mana.stone.button.converter.block} is double stone slab item
  722. block south west of {mana.stone.button.converter.block} is air
  723. block west of {mana.stone.button.converter.block} is air
  724. block north west of {mana.stone.button.converter.block} is air
  725. block at {mana.stone.button.converter.block} is stone button
  726. set {_chest} to block below {mana.stone.button.converter.block}
  727. set {_output} to block north of {_chest}
  728. block north of {_chest} is dropper
  729. block north east of {_chest} is stone brick stairs
  730. block east of {_chest} is stone brick stairs
  731. block south east of {_chest} is stone brick stairs
  732. block south of {_chest} is double stone slab item
  733. block south west of {_chest} is stone brick stairs
  734. block west of {_chest} is stone brick stairs
  735. block north west of {_chest} is stone brick stairs
  736. block at {_chest} is a chest
  737. loop all items in block at {_chest}:
  738. if loop-item is redstone:
  739. set {_count.stack} to amount of loop-item in block at {_chest}
  740. add {_count.stack} to {_count.redstone}
  741. if loop-item is exp bottle:
  742. set {_count.stack} to amount of loop-item in block at {_chest}
  743. add {_count.stack} to {_count.exp}
  744. while {_count.redstone} > {@convert.rate} - 1:
  745. remove 10 redstone from block at {_chest}
  746. remove 10 from {_count.redstone}
  747. add 1 redstone named "&4Mana" to block at {_output}
  748. while {_count.exp} > 0:
  749. remove 1 exp bottle from block at {_chest}
  750. remove 1 from {_count.exp}
  751. add 1 redstone named "&4Mana" to block at {_output}
  752. add 1 glass bottle to block at {_output}
  753.  
  754. function mana_converter_north(l: location):
  755. block south of {mana.stone.button.converter.block} is air
  756. block south west of {mana.stone.button.converter.block} is air
  757. block west of {mana.stone.button.converter.block} is air
  758. block north west of {mana.stone.button.converter.block} is air
  759. block north of {mana.stone.button.converter.block} is double stone slab item
  760. block north east of {mana.stone.button.converter.block} is air
  761. block east of {mana.stone.button.converter.block} is air
  762. block south east of {mana.stone.button.converter.block} is air
  763. block at {mana.stone.button.converter.block} is stone button
  764. set {_chest} to block below {mana.stone.button.converter.block}
  765. set {_output} to block south of {_chest}
  766. block south of {_chest} is dropper
  767. block south west of {_chest} is stone brick stairs
  768. block west of {_chest} is stone brick stairs
  769. block north west of {_chest} is stone brick stairs
  770. block north of {_chest} is double stone slab item
  771. block north east of {_chest} is stone brick stairs
  772. block east of {_chest} is stone brick stairs
  773. block south east of {_chest} is stone brick stairs
  774. block at {_chest} is a chest
  775. loop all items in block at {_chest}:
  776. if loop-item is redstone:
  777. set {_count.stack} to amount of loop-item in block at {_chest}
  778. add {_count.stack} to {_count.redstone}
  779. if loop-item is exp bottle:
  780. set {_count.stack} to amount of loop-item in block at {_chest}
  781. add {_count.stack} to {_count.exp}
  782. while {_count.redstone} > {@convert.rate} - 1:
  783. remove 10 redstone from block at {_chest}
  784. remove 10 from {_count.redstone}
  785. add 1 redstone named "&4Mana" to block at {_output}
  786. while {_count.exp} > 0:
  787. remove 1 exp bottle from block at {_chest}
  788. remove 1 from {_count.exp}
  789. add 1 redstone named "&4Mana" to block at {_output}
  790. add 1 glass bottle to block at {_output}
  791.  
  792. function mana_converter_west(l: location):
  793. block east of {mana.stone.button.converter.block} is air
  794. block south east of {mana.stone.button.converter.block} is air
  795. block south of {mana.stone.button.converter.block} is air
  796. block south west of {mana.stone.button.converter.block} is air
  797. block west of {mana.stone.button.converter.block} is double stone slab item
  798. block north west of {mana.stone.button.converter.block} is air
  799. block north of {mana.stone.button.converter.block} is air
  800. block north east of {mana.stone.button.converter.block} is air
  801. block at {mana.stone.button.converter.block} is stone button
  802. set {_chest} to block below {mana.stone.button.converter.block}
  803. set {_output} to block east of {_chest}
  804. block east of {_chest} is dropper
  805. block south east of {_chest} is stone brick stairs
  806. block south of {_chest} is stone brick stairs
  807. block south west of {_chest} is stone brick stairs
  808. block west of {_chest} is double stone slab item
  809. block north west of {_chest} is stone brick stairs
  810. block north of {_chest} is stone brick stairs
  811. block north east of {_chest} is stone brick stairs
  812. block at {_chest} is a chest
  813. loop all items in block at {_chest}:
  814. if loop-item is redstone:
  815. set {_count.stack} to amount of loop-item in block at {_chest}
  816. add {_count.stack} to {_count.redstone}
  817. if loop-item is exp bottle:
  818. set {_count.stack} to amount of loop-item in block at {_chest}
  819. add {_count.stack} to {_count.exp}
  820. while {_count.redstone} > {@convert.rate} - 1:
  821. remove 10 redstone from block at {_chest}
  822. remove 10 from {_count.redstone}
  823. add 1 redstone named "&4Mana" to block at {_output}
  824. while {_count.exp} > 0:
  825. remove 1 exp bottle from block at {_chest}
  826. remove 1 from {_count.exp}
  827. add 1 redstone named "&4Mana" to block at {_output}
  828. add 1 glass bottle to block at {_output}
  829.  
  830. function mana_converter_east(l: location):
  831. block west of {mana.stone.button.converter.block} is air
  832. block north west of {mana.stone.button.converter.block} is air
  833. block north of {mana.stone.button.converter.block} is air
  834. block north east of {mana.stone.button.converter.block} is air
  835. block east of {mana.stone.button.converter.block} is double stone slab item
  836. block south east of {mana.stone.button.converter.block} is air
  837. block south of {mana.stone.button.converter.block} is air
  838. block south east of {mana.stone.button.converter.block} is air
  839. block at {mana.stone.button.converter.block} is stone button
  840. set {_chest} to block below {mana.stone.button.converter.block}
  841. set {_output} to block west of {_chest}
  842. block west of {_chest} is dropper
  843. block north west of {_chest} is stone brick stairs
  844. block north of {_chest} is stone brick stairs
  845. block north east of {_chest} is stone brick stairs
  846. block east of {_chest} is double stone slab item
  847. block south east of {_chest} is stone brick stairs
  848. block south of {_chest} is stone brick stairs
  849. block south west of {_chest} is stone brick stairs
  850. block at {_chest} is a chest
  851. loop all items in block at {_chest}:
  852. if loop-item is redstone:
  853. set {_count.stack} to amount of loop-item in block at {_chest}
  854. add {_count.stack} to {_count.redstone}
  855. if loop-item is exp bottle:
  856. set {_count.stack} to amount of loop-item in block at {_chest}
  857. add {_count.stack} to {_count.exp}
  858. while {_count.redstone} > {@convert.rate} - 1:
  859. remove 10 redstone from block at {_chest}
  860. remove 10 from {_count.redstone}
  861. add 1 redstone named "&4Mana" to block at {_output}
  862. while {_count.exp} > 0:
  863. remove 1 exp bottle from block at {_chest}
  864. remove 1 from {_count.exp}
  865. add 1 redstone named "&4Mana" to block at {_output}
  866. add 1 glass bottle to block at {_output}
  867.  
  868. on right click on stone button:
  869. if block south of event-block is double stone slab item:
  870. set {mana.stone.button.converter.block} to event-block
  871. mana_converter_south({mana.stone.button.converter.block})
  872. if block north of event-block is double stone slab item:
  873. set {mana.stone.button.converter.block} to event-block
  874. mana_converter_north({mana.stone.button.converter.block})
  875. if block east of event-block is double stone slab item:
  876. set {mana.stone.button.converter.block} to event-block
  877. mana_converter_east({mana.stone.button.converter.block})
  878. if block west of event-block is double stone slab item:
  879. set {mana.stone.button.converter.block} to event-block
  880. mana_converter_west({mana.stone.button.converter.block})
Advertisement
Add Comment
Please, Sign In to add comment