stormtrooper28

SkMagiks [Beta 0.7]

Mar 25th, 2015
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 56.85 KB | None | 0 0
  1. # For most updated version, join the TroopCraft server at troopcraft.gamename.net
  2. # cost:cooldown
  3. # droom = anvil attack = (Spell_Level / 2) + 1 Explosion_Size 40:15
  4. # lance = lance of explosions = Spell_Level * 6 Lance_Size 75:50
  5. # magic missile = (Spell_Level / 2) + 2.5 Damage, Spell_Level * 15 Length 15:5
  6. # rumble!!!
  7.  
  8. on first join:
  9.     give player 1 blaze rod named "&6&lWand &7No active spell" with lore "&bLeft click to cast a spell, &3Right click to choose one!"
  10.     set {mana::%player%} to 128
  11.    
  12. on join:
  13.     delete {converting.%player%}
  14.    
  15.  
  16. options:
  17.     protection.level: 6 #This is the level of protection mana mobs will have on their armor#
  18.     droprate.min: 10 #this is the minimum amount of mana a manamob will drop#
  19.     droprate.max: 128 #this is the maximum amount of mana a manamob will drop#
  20.     convert.rate: 1 #this is the amount of redstone required to make 1 mana in a mana converter#
  21.     fragment.rate: 1% #this is the percent chance of a mana mob dropping a wand fragment#
  22.    
  23.     #below are the mana costs per spell#
  24.     mana.Warp: 120
  25.     mana.heal: 50
  26.     mana.feed: 50
  27.     mana.rapidfire: 15
  28.     mana.speedboost: 20
  29.     mana.minibomb: 20
  30.     mana.raindance: 128 #note: this is very high because players changing the weather constantly is annoying#
  31.     mana.droom: 40
  32.     mana.fireball: 30
  33.     mana.lance: 75
  34.     mana.lightning_strike: 50
  35.     mana.magic_blast: 15
  36.     mana.implode: 50
  37.     mana.leap: 40
  38.     mana.ghost: 180
  39.     mana.nofall: 45
  40.     mana.gust: 40
  41.     mana.nova: 240
  42.     mana.earthquake: 512
  43.     mana.iceprison: 80
  44.     mana.witherskull: 40
  45.     mana.fireball: 40
  46.     mana.starcrash: 200
  47.     mana.starstorm: 2500
  48.     mana.armageddon: 10000
  49.    
  50.     #below are the cooldowns per spell (in seconds)#
  51.     timer.Warp: 60
  52.     timer.heal: 30
  53.     timer.feed: 30
  54.     timer.rapidfire: 5
  55.     timer.speedboost: 30
  56.     timer.minibomb: 15
  57.     timer.raindance: 3600
  58.     timer.implode: 30
  59.     timer.leap: 8
  60.     timer.ghost: 16
  61.     timer.nofall: 20
  62.     timer.gust: 20
  63.     timer.nova: 360
  64.     timer.earthquake: 200
  65.     timer.iceprison: 120
  66.     timer.witherskull: 60
  67.     timer.fireball: 8
  68.     timer.starcrash: 300
  69.     timer.starstorm: 900
  70.     timer.armageddon: 259200
  71.    
  72.    
  73.  
  74.  
  75. on spawn of skeleton or zombie:
  76.     chance of 7%:
  77.         equip event-entity with leather helmet of protection {@protection.level} named "&4Mana Helmet"
  78.         equip event-entity with leather chestplate of protection {@protection.level} named "&4Mana Chestplate"
  79.         equip event-entity with leather leggings of protection {@protection.level} named "&4Mana Leggings"
  80.         equip event-entity with leather boots of protection {@protection.level} named "&4Mana Boots"
  81.         dye event-entity's helmet red
  82.         dye event-entity's chestplate red
  83.         dye event-entity's leggings red
  84.         dye event-entity's boots red
  85.         if event-entity is a zombie:
  86.             set tool of event-entity to iron sword of sharpness 2 and fire aspect 1 named "&4Mana Sword"
  87.         else if event-entity is a skeleton:
  88.             set tool of event-entity to bow of punch 1 and flame 1 named "&4Mana Bow"
  89.         set {manamob.%event-entity%} to true
  90.  
  91. on death:
  92.     if {manamob.%victim%} is true:
  93.         set {_count} to a random integer between {@droprate.min} and {@droprate.max}
  94.         loop {_count} times:
  95.             add redstone named "&4Mana" to drops
  96.         chance of {@fragment.rate}:
  97.             add 1 blaze powder named "&6&oWand Fragment" to drops
  98.            
  99. on death:
  100.     world is "troopcraft" or "troopcraft_nether" or "troopcraf_the_end":
  101.         chance of 5%:
  102.             add 3 redstone named "&4Mana" to drops
  103.         chance of 1%:
  104.             set {_count} to a random integer between {@droprate.min} and {@droprate.max}
  105.             loop {_count} times:
  106.                 add redstone named "&4Mana" to drops
  107.         chance of 1%:
  108.             chance of 1%:
  109.                 add 1 blaze powder named "&6&oWand Fragment" to drops
  110.            
  111.            
  112. #on right click on stone button:
  113. #   loop blocks in radius 3 around event-block:
  114. #       if loop-block is stone brick stairs:
  115. #           add 1 to {_count.stonebrick} #should be 6#
  116. #       if loop-block is double stone slab:
  117. #           add 1 to {_count.stoneslab} #should be 2#
  118. #       if loop-block is a chest:
  119. #           set {_chest} to location of loop-block
  120. #       if loop-block is a dropper:
  121. #           set {_output} to location of loop-block
  122.            
  123.  
  124.  
  125.        
  126. #   if {_count.stonebrick} > 5:
  127. #       if {_count.stoneslab} > 1:
  128. #           if {_output} is set:
  129. #               if {_chest} is set:
  130. #                   loop all items in block at {_chest}:
  131. #                       if loop-item is redstone:
  132. #                           set {_count.stack} to amount of loop-item in block at {_chest}
  133. #                           add {_count.stack} to {_count.redstone}
  134. #                       while {_count.redstone} > {@convert.rate} - 1:
  135. #                           remove 10 redstone from block at {_chest}
  136. #                           remove 10 from {_count.redstone}
  137. #                           add 1 redstone named "&4Mana" to block at {_output}
  138.  
  139.  
  140.                            
  141. on right click:
  142.     world is "troopcraft" or "troopcraft_nether" or "troopcraf_the_end"
  143.     {manachest.picking.%uuid of player%} is true:
  144.         set {manachest.%uuid of player%} to event-block
  145.         message "&3You set your mana chest to the %event-block% at &b%{manachest.%uuid of player%}%"
  146.         set {manachest.picking.%uuid of player%} to false
  147.        
  148.        
  149.  
  150.  
  151.  
  152. command /wand:
  153.     aliases: /wandgive
  154.     permission: skript.op
  155.     permission message: Unknown command. Type "/help" for help.
  156.     trigger:
  157.         give player 1 blaze rod named "&6&lWand &7No active spell" with lore "&bLeft click to cast a spell, &3Right click to choose one!"
  158.        
  159. command /convert: #123
  160.     aliases: /c, /c!
  161.     trigger:
  162.         {converting.%player%} is not set
  163.         set {converting.%player%} to true
  164.         set {_mana} to redstone named "&4Mana"
  165.         loop items in player's inventory:
  166.             if loop-value is {_mana}:
  167.                 set {_itemstack} to "%loop-value%"
  168.                 set {_split::*} to {_itemstack} split at " "
  169.                 add {_split::1} parsed as integer to {_numb}
  170.                 if parse error is set:
  171.                     add 1 to {_numb}
  172.                 remove {_numb} of {_mana} from player
  173.         add {_numb} to {mana::%player%}
  174.         {_numb} is greater than 0
  175.         send "&2You just gained &c%{_numb}%&2 mana!"
  176.         send "&2Now you have &4%{mana::%player%}%&2 total mana!"
  177.         delete {converting.%player%}
  178.        
  179. on pickup of redstone:
  180.     set {_mana} to redstone named "&4Mana"
  181.     event-item is {_mana}:
  182.         wait 5 ticks
  183.         execute player command "/c"
  184.         delete {converting.%player%}
  185.        
  186. command /mana [<text>] [<integer>]:
  187.     aliases: /magic, /magicka, /magik, /magick
  188.     trigger:
  189.         if arg 1 is not set:
  190.             send "&cYou have &4%{mana::%player%}%&c mana!"
  191.         else if arg 1 is "handset" or "set" or "chest":
  192.             set {manachest.picking.%uuid of player%} to true
  193.             message "&3Click a &bchest &3to select your chest!"
  194.         else if arg 1 is "open":
  195.             if {manachest.%uuid of player%} isn't set:
  196.                 message "&3You need to set a &bMana Chest &3to open your mana storage!"
  197.                 message "&3To do this, look at your specified chest and type ""&b/mana set&3""!"
  198.                 stop
  199.             open inventory of block at {manachest.%uuid of player%} to player
  200.             message "&bHere you go!"
  201.         else if arg 1 is "give":
  202.             if player doesn't have permission "skript.op":
  203.                 message "Unknown command. Type ""/help"" for help."
  204.                 stop
  205.             if arg 2 isn't set:
  206.                 message "&cError! Invalid amount of redstone!"
  207.                 stop
  208.             if arg 2 < 1:
  209.                 message "&cError! Invalid amount of redstone!"
  210.                 stop
  211.             set {_count} to arg 2
  212.             loop {_count} times:
  213.                 give player 1 redstone named "&4Mana"
  214.         else:
  215.             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. &6You then run the /convert command to this mana to convert is to a usable form!"
  216.        
  217. on click:
  218.     player's tool is redstone named "&4Mana":
  219.         cancel the event
  220.         execute player command "/c"
  221.        
  222.  
  223.  
  224. on mine:
  225.     if block is a dispenser:
  226.         if block contains 4 diamond blocks:
  227.             if block contains 1 blaze rod:
  228.                 if block contains 4 gold blocks:
  229.                     if block contains 1 emerald:
  230.                         set {_loc} to location of target block
  231.                         cancel the event
  232.                         clear block's inventory
  233.                         set block to air
  234.                         wait 1 tick
  235.                         drop a blaze rod named "&6&lWand &7No active spell" at {_loc}
  236.         if block contains 4 diamonds:
  237.             if block contains 4 gold ingots:
  238.                 if block contains 1 emerald:
  239.                     if block contains 3 blaze powder named "&6&oWand Fragment":
  240.                         set {_loc} to location of target block
  241.                         cancel the event
  242.                         clear block's inventory
  243.                         set block to air
  244.                         wait 1 tick
  245.                         drop a blaze rod named "&6&lWand &7No active spell" at {_loc}
  246.                        
  247. on right click with feather:
  248.     player has permission "spell.test":
  249.         send "No spell is waiting"
  250.    
  251. command /spell-Warp:
  252.     permission: skript.op
  253.     permission message: Unknown command. Type "/help" for help.
  254.     trigger:
  255.         if {mana::%player%} < {@mana.Warp}:
  256.             message "&3You need at least &4{@mana.Warp}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  257.             stop
  258.         set {_difference} to difference between {spell.timer.Warp.%player%} and now
  259.         if {_difference} is less than {@timer.Warp} seconds:
  260.             set {_difference} to difference between {_difference} and {@timer.Warp} seconds
  261.             message "&3Cooldown: &b%{_difference}%"
  262.             stop
  263.         set {spell.timer.Warp.%player%} to now
  264.         remove {@mana.Warp} from {mana::%player%}
  265.         shoot an enderpearl with velocity 4
  266.         set {nofall.%player%} to true
  267.         set {enderwand.%projectile%} to true
  268.        
  269. command /spell-feed:
  270.     permission: skript.op
  271.     permission message: Unknown command. Type "/help" for help.
  272.     trigger:
  273.         if {mana::%player%} < {@mana.feed}:
  274.             message "&3You need at least &4{@mana.feed}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  275.             stop
  276.         set {_difference} to difference between {spell.timer.feed.%player%} and now
  277.         if {_difference} is less than {@timer.feed} seconds:
  278.             set {_difference} to difference between {_difference} and {@timer.feed} seconds
  279.             message "&3Cooldown: &b%{_difference}%"
  280.             stop
  281.         set {spell.timer.feed.%player%} to now
  282.         remove {@mana.feed} from {mana::%player%}
  283.         apply saturation 20 to the player for 3 seconds
  284.         send "&2Care Package Received!"
  285.    
  286. command /spell-heal:
  287.     permission: skript.op
  288.     permission message: Unknown command. Type "/help" for help.
  289.     trigger:
  290.         if {mana::%player%} < {@mana.heal}:
  291.             message "&3You need at least &4{@mana.heal}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  292.             stop
  293.         set {_difference} to difference between {spell.timer.heal.%player%} and now
  294.         if {_difference} is less than {@timer.heal} seconds:
  295.             set {_difference} to difference between {_difference} and {@timer.heal} seconds
  296.             message "&3Cooldown: &b%{_difference}%"
  297.             stop
  298.         set {spell.timer.heal.%player%} to now
  299.         remove {@mana.heal} from {mana::%player%}
  300.         heal the player by 40 hearts
  301.         send "&2First Aid Received!"
  302.        
  303. command /spell-rapidfire:
  304.     permission: skript.op
  305.     permission message: Unknown command. Type "/help" for help.
  306.     trigger:
  307.         if {mana::%player%} < {@mana.rapidfire}:
  308.             message "&3You need at least &4{@mana.rapidfire}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  309.             stop
  310.         set {_difference} to difference between {spell.timer.rapidfire.%player%} and now
  311.         if {_difference} is less than {@timer.rapidfire} seconds:
  312.             set {_difference} to difference between {_difference} and {@timer.rapidfire} seconds
  313.             message "&3Cooldown: &b%{_difference}%"
  314.             stop
  315.         set {spell.timer.rapidfire.%player%} to now
  316.         remove {@mana.rapidfire} from {mana::%player%}
  317.         loop 20 times:
  318.             if {mana::%player%} >= {@mana.rapidfire}:
  319.                 if {mana::%player%} > 0:
  320.                     make player shoot arrow at velocity 3
  321.                     set {rapidfire.%last shot projectile%} to true
  322.                     play raw sound "random.bow" at player with pitch 1 volume 1
  323.                     if {_mana.inv} > 0:
  324.                         remove 1 from {mana::%player%}
  325.                     else if {_mana.inv} < 1:
  326.                         remove 1 from {mana::%player%}
  327.                     wait 2 ticks
  328.                 if {mana::%player%} < 0:
  329.                     send "&3Mana is out"
  330.                     stop
  331.        
  332. command /spell-speedboost:
  333.     permission: skript.op
  334.     permission message: Unknown command. Type "/help" for help.
  335.     trigger:
  336.         if {mana::%player%} < {@mana.speedboost}:
  337.             message "&3You need at least &4{@mana.speedboost}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  338.             stop
  339.         set {_difference} to difference between {spell.timer.speedboost.%player%} and now
  340.         if {_difference} is less than {@timer.speedboost} seconds:
  341.             set {_difference} to difference between {_difference} and {@timer.speedboost} seconds
  342.             message "&3Cooldown: &b%{_difference}%"
  343.             stop
  344.         set {spell.timer.speedboost.%player%} to now
  345.         remove {@mana.speedboost} from {mana::%player%}
  346.        
  347.         set player's walk speed to 0.6
  348.         wait 30 seconds
  349.         set player's walk speed to 0.2
  350.        
  351. on join:
  352.     set player's walk speed to 0.2
  353.        
  354. command /spell-minibomb:
  355.     permission: skript.op
  356.     permission message: Unknown command. Type "/help" for help.
  357.     trigger:
  358.         if {mana::%player%} < {@mana.minibomb}:
  359.             message "&3You need at least &4{@mana.minibomb}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  360.             stop
  361.         set {_difference} to difference between {spell.timer.minibomb.%player%} and now
  362.         if {_difference} is less than {@timer.minibomb} seconds:
  363.             set {_difference} to difference between {_difference} and {@timer.minibomb} seconds
  364.             message "&3Cooldown: &b%{_difference}%"
  365.             stop
  366.         set {spell.timer.minibomb.%player%} to now
  367.         remove {@mana.minibomb} from {mana::%player%}
  368.        
  369.         shoot a snowball at velocity 1.5
  370.         set {minibomb.%last shot projectile%} to true
  371.        
  372. command /spell-raindance:
  373.     permission: skript.op
  374.     permission message: Unknown command. Type "/help" for help.
  375.     trigger:
  376.         if {mana::%player%} < {@mana.raindance}:
  377.             message "&3You need at least &4{@mana.raindance}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  378.             stop
  379.         set {_difference} to difference between {spell.timer.raindance.%player%} and now
  380.         if {_difference} is less than {@timer.raindance} seconds:
  381.             set {_difference} to difference between {_difference} and {@timer.raindance} seconds
  382.             message "&3Cooldown: &b%{_difference}%"
  383.             stop
  384.         set {spell.timer.raindance.%player%} to now
  385.         remove {@mana.raindance} from {mana::%player%}
  386.        
  387.         run player command "/td" as op
  388.         broadcast "&9&o%player% has performed a rain dance . . ."
  389.        
  390.  
  391.    
  392.    
  393. command /spell-nova:
  394.     permission: skript.op
  395.     permission message: Unknown command. Type "/help" for help.
  396.     trigger:
  397.         if {mana::%player%} < {@mana.nova}:
  398.             message "&3You need at least &4{@mana.nova}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  399.             stop
  400.         set {_difference} to difference between {spell.timer.nova.%player%} and now
  401.         if {_difference} is less than {@timer.nova} seconds:
  402.             set {_difference} to difference between {_difference} and {@timer.nova} seconds
  403.             message "&3Cooldown: &b%{_difference}%"
  404.             stop
  405.         set {spell.timer.nova.%player%} to now
  406.         remove {@mana.nova} from {mana::%player%}
  407.        
  408.         loop blocks in radius 2 around player:
  409.             loop-block is air:
  410.                 block below loop-block is not air
  411.                 create fake explosion at loop-block
  412.                 chance of 50%:
  413.                     create safe explosion of force 1 at loop-block
  414.                 strike lightning effect at loop-block
  415.         wait 4 ticks
  416.         loop blocks in radius 3 around player:
  417.             loop-block is air:
  418.                 block below loop-block is not air
  419.                 distance between player and loop-block is greater than 2
  420.                 create fake explosion at loop-block
  421.                 chance of 75%:
  422.                     create safe explosion of force 1 at loop-block
  423.                 strike lightning effect at loop-block
  424.         wait 4 ticks
  425.         loop blocks in radius 4 around player:
  426.             loop-block is air:
  427.                 create fake explosion at loop-block
  428.         loop blocks in radius 4 around player:
  429.             loop-block is air:
  430.                 block below loop-block is not air
  431.                 distance between player and loop-block is greater than 3
  432.                 create fake explosion at loop-block
  433.                 create safe explosion of force 1 at loop-block
  434.                 strike lightning effect at loop-block
  435.         loop entities in radius 5 around player:
  436.             damage loop-entity by 5
  437.         push player up at speed 1
  438.         wait 15 ticks
  439.         loop blocks in radius 4 around player:
  440.             loop-block is air:
  441.                 block below loop-block is not air
  442.                 create fake explosion at loop-block
  443.                 wait 1 tick
  444.    
  445.    
  446. command /spell-gust:
  447.     permission: skript.op
  448.     permission message: Unknown command. Type "/help" for help.
  449.     trigger:
  450.         if {mana::%player%} < {@mana.gust}:
  451.             message "&3You need at least &4{@mana.gust}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  452.             stop
  453.         set {_difference} to difference between {spell.timer.gust.%player%} and now
  454.         if {_difference} is less than {@timer.gust} seconds:
  455.             set {_difference} to difference between {_difference} and {@timer.gust} seconds
  456.             message "&3Cooldown: &b%{_difference}%"
  457.             stop
  458.         set {spell.timer.gust.%player%} to now
  459.         remove {@mana.gust} from {mana::%player%}
  460.        
  461.         loop entities in radius 8 around player:
  462.             push the loop-entity upwards at speed 0.5
  463.             push the loop-entity backwards at speed 1
  464.             apply slowness 4 to loop-entity for 3 seconds
  465.         push player forward at speed .5
  466.         push player up at speed .3
  467.    
  468.    
  469. command /spell-earthquake:
  470.     permission: skript.op
  471.     permission message: Unknown command. Type "/help" for help.
  472.     trigger:
  473.         if {mana::%player%} < {@mana.earthquake}:
  474.             message "&3You need at least &4{@mana.earthquake}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  475.             stop
  476.         set {_difference} to difference between {spell.timer.earthquake.%player%} and now
  477.         if {_difference} is less than {@timer.earthquake} seconds:
  478.             set {_difference} to difference between {_difference} and {@timer.earthquake} seconds
  479.             message "&3Cooldown: &b%{_difference}%"
  480.             stop
  481.         set {spell.timer.earthquake.%player%} to now
  482.         remove {@mana.earthquake} from {mana::%player%}
  483.        
  484.         set {_x.%player%} to the player's x-coordinate
  485.         set {_y.%player%} to the player's y-coordinate - 5
  486.         set {_z.%player%} to the player's z-coordinate
  487.         set {_quaketime.%player%} to 60
  488.         while {_quaketime.%player%} is greater than 0:
  489.             subtract 1 from {_quaketime.%player%}
  490.             loop all entities in radius 16 around the targeted block or entity:
  491.                 if {_list::*} doesn't contain loop-entity:
  492.                     add loop-entity to {_list::*}
  493.                 distance between loop-entity and the targeted block or entity is less than 12
  494.                 block below loop-entity is not air
  495.                 chance of 33%
  496.                 execute console command "playsound random.explode %player% %{_x.%player%}% %{_y.%player%}% %{_z.%player%}% 0.5 0.1"
  497.                 push loop-entity up at speed 0.25
  498.                 damage loop-entity by 7
  499.                 apply slowness 4 to the loop-entity for 1 second
  500.                 wait 1 tick
  501.             execute console command "particle lava %{_x.%player%}% %{_y.%player%}% %{_z.%player%}% 12 12 12 1 100 force"
  502.             wait 3 ticks
  503.         loop {_list::*}:
  504.             set {_p} to loop-value
  505.             send "The Earthquake of %player% is over!" to {_p}
  506.         clear {_list::*}
  507.    
  508.    
  509.    
  510. command /spell-iceprison:
  511.     permission: skript.op
  512.     permission message: Unknown command. Type "/help" for help.
  513.     trigger:
  514.         if {mana::%player%} < {@mana.iceprison}:
  515.             message "&3You need at least &4{@mana.iceprison}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  516.             stop
  517.         set {_difference} to difference between {spell.timer.iceprison.%player%} and now
  518.         if {_difference} is less than {@timer.iceprison} seconds:
  519.             set {_difference} to difference between {_difference} and {@timer.iceprison} seconds
  520.             message "&3Cooldown: &b%{_difference}%"
  521.             stop
  522.         set {spell.timer.iceprison.%player%} to now
  523.         remove {@mana.iceprison} from {mana::%player%}
  524.        
  525.         if player's targeted entity exists:
  526.             apply slowness 10 to the player's targeted entity for 2 seconds
  527.             set {_spell2.%player%} to the altitude of the player's targeted entity
  528.             set {_l} to block at player's targeted entity
  529.             make player shoot a snowball at speed 50
  530.             damage targeted entity by 3
  531.         else:
  532.             spawn a chicken at player's targeted block
  533.             set {_l} to last spawned entity
  534.         execute console command "playsound mob.wither.shoot %player%"
  535.         wait 3 ticks
  536.         execute console command "playsound random.glass %player%"
  537.         loop blocks in radius 2 around {_l}:
  538.             loop-block is air or long grass:
  539.                 add location of loop-block to {_blocks::*}
  540.                 set loop-block to ice
  541.         loop 4 times:
  542.             wait 1 second
  543.         loop {_blocks::*}:
  544.             set block at loop-value to air
  545.             execute console command "playsound random.glass %player%"
  546.             wait 1 tick
  547.         if last spawned entity is alive:
  548.             kill last spawned entity
  549.        
  550.        
  551. command /spell-witherskull:
  552.     permission: skript.op
  553.     permission message: Unknown command. Type "/help" for help.
  554.     trigger:
  555.         if {mana::%player%} < {@mana.witherskull}:
  556.             message "&3You need at least &4{@mana.witherskull}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  557.             stop
  558.         set {_difference} to difference between {spell.timer.witherskull.%player%} and now
  559.         if {_difference} is less than {@timer.witherskull} seconds:
  560.             set {_difference} to difference between {_difference} and {@timer.witherskull} seconds
  561.             message "&3Cooldown: &b%{_difference}%"
  562.             stop
  563.         set {spell.timer.witherskull.%player%} to now
  564.         remove {@mana.witherskull} from {mana::%player%}
  565.        
  566.         shoot a wither skull at speed 1
  567.         execute console command "playsound mob.blaze.death %player%"
  568.        
  569. command /spell-fireball:
  570.     permission: skript.op
  571.     permission message: Unknown command. Type "/help" for help.
  572.     trigger:
  573.         if {mana::%player%} < {@mana.fireball}:
  574.             message "&3You need at least &4{@mana.fireball}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  575.             stop
  576.         set {_difference} to difference between {spell.timer.fireball.%player%} and now
  577.         if {_difference} is less than {@timer.fireball} seconds:
  578.             set {_difference} to difference between {_difference} and {@timer.fireball} seconds
  579.             message "&3Cooldown: &b%{_difference}%"
  580.             stop
  581.         set {spell.timer.fireball.%player%} to now
  582.         remove {@mana.fireball} from {mana::%player%}
  583.        
  584.         shoot a fireball at speed 3
  585.         execute console command "playsound mob.wither.shoot %player%"
  586.        
  587. command /spell-starstorm:
  588.     permission: skript.op
  589.     permission message: Unknown command. Type "/help" for help.
  590.     trigger:
  591.         if {mana::%player%} < {@mana.starstorm}:
  592.             message "&3You need at least &4{@mana.starstorm}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  593.             stop
  594.         set {_difference} to difference between {spell.timer.starstorm.%player%} and now
  595.         if {_difference} is less than {@timer.starstorm} seconds:
  596.             set {_difference} to difference between {_difference} and {@timer.starstorm} seconds
  597.             message "&3Cooldown: &b%{_difference}%"
  598.             stop
  599.         set {spell.timer.starstorm.%player%} to now
  600.         remove {@mana.starstorm} from {mana::%player%}
  601.        
  602.         set {_l} to player's targeted block
  603.         set {_o} to {_l}
  604.         loop entities in radius 12 around the block at {_l}:
  605.             push loop-entity up at speed 1
  606.             create a safe explosion of force 1 10 meters above the loop-entity's head
  607.             wait 1 ticks
  608.             create a safe explosion of force 1 8 meters above the loop-entity's head
  609.             wait 1 ticks
  610.             create a safe explosion of force 1 6 meters above the loop-entity's head
  611.             wait 1 ticks
  612.             create a safe explosion of force 1 4 meters above the loop-entity's head
  613.             wait 1 ticks
  614.             create a safe explosion of force 1 2 meters above the loop-entity's head
  615.             wait 1 ticks
  616.             create a safe explosion of force 3 at the loop-entity
  617.         set {_n} to 0
  618.         loop 5 times:
  619.             create a safe explosion of force 1 10 meters above {_l}
  620.             wait 1 ticks
  621.             create a safe explosion of force 1 8 meters above {_l}
  622.             wait 1 ticks
  623.             create a safe explosion of force 1 6 meters above {_l}
  624.             wait 1 ticks
  625.             create a safe explosion of force 1 4 meters above {_l}
  626.             wait 1 ticks
  627.             create a safe explosion of force 1 2 meters above {_l}
  628.             wait 1 ticks
  629.             create a safe explosion of force 3 at {_l}
  630.             add 1 to {_n}
  631.             wait 5 ticks
  632.             if {_n} is 1:
  633.                 set {_l} to block 5 meters north of {_o}
  634.             if {_n} is 2:
  635.                 set {_l} to block 5 meters south of {_o}
  636.             if {_n} is 3:
  637.                 set {_l} to block 5 meters east of {_o}
  638.             if {_n} is 4:
  639.                 set {_l} to block 5 meters west of {_o}
  640.            
  641.        
  642.        
  643. command /spell-starcrash:
  644.     permission: skript.op
  645.     permission message: Unknown command. Type "/help" for help.
  646.     trigger:
  647.         if {mana::%player%} < {@mana.starcrash}:
  648.             message "&3You need at least &4{@mana.starcrash}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  649.             stop
  650.         set {_difference} to difference between {spell.timer.starcrash.%player%} and now
  651.         if {_difference} is less than {@timer.starcrash} seconds:
  652.             set {_difference} to difference between {_difference} and {@timer.starcrash} seconds
  653.             message "&3Cooldown: &b%{_difference}%"
  654.             stop
  655.         set {spell.timer.starcrash.%player%} to now
  656.         remove {@mana.starcrash} from {mana::%player%}
  657.            
  658.         set {_t} to player's targeted block
  659.         create a safe explosion of force 5 15 meters above {_t}
  660.         wait 6 ticks
  661.         create a safe explosion of force 5 12 meters above {_t}
  662.         wait 6 ticks
  663.         create a safe explosion of force 5 9 meters above {_t}
  664.         wait 6 ticks
  665.         create a safe explosion of force 5 6 meters above {_t}
  666.         wait 6 ticks
  667.         create a safe explosion of force 5 3 meters above {_t}
  668.         wait 6 ticks
  669.         create a safe explosion of force 10 at {_t}
  670.        
  671. command /spell-armageddon:
  672.     permission: skript.op
  673.     permission message: Unknown command. Type "/help" for help.
  674.     trigger:
  675.         if {mana::%player%} < {@mana.armageddon}:
  676.             message "&3You need at least &4{@mana.armageddon}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  677.             stop
  678.         set {_difference} to difference between {spell.timer.armageddon.%player%} and now
  679.         if {_difference} is less than {@timer.armageddon} seconds:
  680.             set {_difference} to difference between {_difference} and {@timer.armageddon} seconds
  681.             message "&3Cooldown: &b%{_difference}%"
  682.             stop
  683.         set {spell.timer.armageddon.%player%} to now
  684.         remove {@mana.armageddon} from {mana::%player%}
  685.        
  686.         set {_targeted} to target of player
  687.         if {_targeted} is not set:
  688.             spawn a chicken at player's targeted block
  689.             set {_targeted} to last spawned entity
  690.         if {_targeted} is not set:
  691.             set {_targeted} to player
  692.             send "&cYour spell backfired... &4&l&n&oRUN!!!"
  693.         set {chat.%player%} to false
  694.         loop 100 times:
  695.             set {_target} to location of {_targeted}
  696.             increase y-coordinate of {_target} by 50
  697.             reduce x-coordinate of {_target} by 10
  698.             reduce z-coordinate of {_target} by 10
  699.             set {_MinimumLoc} to {_target}
  700.             increase x-coordinate of {_target} by a random number between 20 and 0
  701.             increase z-coordinate of {_target} by a random number between 20 and 0
  702.             set {_x} to x-coordinate of {_target}
  703.             set {_z} to z-coordinate of {_target}
  704.             set {_y} to y-coordinate of {_target}
  705.             run player command "/summon Fireball %{_x}% %{_y}% %{_z}% {ExplosionPower:5,direction: [0.0,-5.0,0.0]}" as op          
  706.             set shooter of the last shot projectile to player
  707.             wait 15 ticks
  708.         set {chat.%player%} to true
  709. on server chat send:
  710.     {chat.%player%} is false:
  711.         packet message contains "commands.summon.success"
  712.         cancel event
  713.    
  714.        
  715. command /spell-implode:
  716.     permission: skript.op
  717.     permission message: Unknown command. Type "/help" for help.
  718.     trigger:
  719.         if {mana::%player%} < {@mana.implode}:
  720.             message "&3You need at least &4{@mana.implode}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  721.             stop
  722.         set {_difference} to difference between {spell.timer.implode.%player%} and now
  723.         if {_difference} is less than {@timer.implode} seconds:
  724.             set {_difference} to difference between {_difference} and {@timer.implode} seconds
  725.             message "&3Cooldown: &b%{_difference}%"
  726.             stop
  727.         set {spell.timer.implode.%player%} to now
  728.         remove {@mana.implode} from {mana::%player%}       
  729.         make player shoot tnt at speed 1
  730.         if 1 is 1:
  731.             stop
  732.         add east to {_listofdirections::*}
  733.         add west to {_listofdirections::*}
  734.         add south to {_listofdirections::*}
  735.         add north to {_listofdirections::*}
  736.        
  737.         set {_loc} to targeted block
  738.        
  739.         play raw sound "random.explode" at {_loc} with pitch 1 volume 10
  740.         # play 60 of effect "blockcrack_35_14" with data 1 at {_loc}
  741.         # play 55 of effect "lava" with data 1 at {_loc}
  742.        
  743.         #loop blocks in radius 4 around block at {_loc}:
  744.         loop blocks in radius 3 around block at {_loc}:
  745.             #message "%loop-block's type%" to all players
  746.             "%loop-block%" does not contain "air" or "bedrock" or "obsidian" or "barrier":
  747.                 clear {_check}
  748.                 distance between loop-block and {_loc} is greater than 3.2:
  749.                     chance of 50%:
  750.                         set {_check} to true
  751.                 distance between loop-block and {_loc} is greater than 5:
  752.                     set {_check} to true
  753.                 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":
  754.                     if "%loop-block%" does not contain "block":
  755.                         if "%loop-block%" contains "sign":
  756.                             set {fallingblocks.soft.sign.1::%location of loop-block%} to "%line 1 of loop-block%"
  757.                             set {fallingblocks.soft.sign.2::%location of loop-block%} to "%line 2 of loop-block%"
  758.                             set {fallingblocks.soft.sign.3::%location of loop-block%} to "%line 3 of loop-block%"
  759.                             set {fallingblocks.soft.sign.4::%location of loop-block%} to "%line 4 of loop-block%"
  760.  
  761.                         #message "Soft" to all players
  762.                         set {fallingblocks.soft.location::%location of loop-block%} to location of loop-block
  763.                         set {fallingblocks.soft.blocktype::%location of loop-block%} to loop-block's type
  764.                         set {fallingblocks.soft.time::%location of loop-block%} to now
  765.                         add loop-block's location to {_blocks.soft::*}
  766.                        
  767.                 if {fallingblocks.soft.location::%location of loop-block%} is not set:
  768.                     if {_check} is not set:
  769.                         #message "Hard" to all players
  770.                         set {fallingblocks.hard.location::%location of loop-block%} to location of loop-block
  771.                         #message "%loop-block's type%" to all players
  772.                         set {fallingblocks.hard.blocktype::%location of loop-block%} to loop-block's type
  773.                         set {fallingblocks.hard.time::%location of loop-block%} to now
  774.                         add loop-block's location to {_blocks.hard::*}
  775.             else if "%loop-block%" is "air":
  776.                 if {fallingblocks.hard.time::%location of loop-block%} is set:
  777.                     set {fallingblocks.hard.time::%location of loop-block%} to now
  778.                 else if {fallingblocks.soft.time::%location of loop-block%} is set:
  779.                     set {fallingblocks.soft.time::%location of loop-block%} to now
  780.        
  781.        
  782.         loop {_blocks.soft::*}:
  783. #           make player break block at loop-value
  784.             block at loop-value is air
  785.             set {_looploc} to location 1 above block at loop-value
  786.             set {_block} to type of block at loop-value
  787.             spawn falling block of {_block} at {_looploc}
  788.         wait 1 tick
  789.         loop {_blocks.hard::*}:
  790. #           make player break block at loop-value
  791.             block at loop-value is air
  792.             set {_looploc} to location 1 above block at loop-value
  793.             set {_block} to type of block at loop-value
  794.             set block at loop-value to air
  795.             spawn falling block of {_block} at {_looploc}
  796.        
  797.         wait 1 tick
  798.         play raw sound "random.explode" at {_loc} with pitch 1 volume 10
  799.         #play 60 of effect "blockcrack_35_14" with data 1 at {_loc}
  800.         #play 55 of effect "lava" with data 1 at {_loc}
  801.        
  802.         loop entities in radius 6 around block at {_loc}:
  803.             #message "%loop-entity%"
  804.             "%loop-entity%" is "falling block":
  805.                 set {listoffallingblock::%loop-entity%} to true
  806.                
  807.                 set {_speed} to a random number between .3 and 1.2
  808.                
  809.                 push loop-entity up at speed {_speed}
  810.                
  811.                 set {_dir.1} to random element out of {_listofdirections::*}
  812.                 set {_dir.2} to random element out of {_listofdirections::*}
  813.                 set {_dir.3} to random element out of {_listofdirections::*}
  814.                
  815.                 set {_dir.1.speed} to random number between .1 and .6
  816.                 set {_dir.2.speed} to random number between .1 and .6
  817.                 set {_dir.3.speed} to random number between .1 and .6
  818.                
  819.                 push loop-entity {_dir.1} at speed {_dir.1.speed}
  820.                 push loop-entity {_dir.2} at speed {_dir.2.speed}
  821.                 push loop-entity {_dir.3} at speed {_dir.3.speed}
  822.                    
  823.         wait 1 tick
  824.         play raw sound "random.explode" at {_loc} with pitch 1 volume 10
  825.         #play 60 of effect "blockcrack_35_14" with data 1 at {_loc}
  826.         #play 55 of effect "lava" with data 1 at {_loc}
  827.         if size of {fallingblocks.hard.location::*} is greater than 0:
  828.             set {fallingblocks.activate} to true
  829.            
  830. command /spell-leap:
  831.     permission: skript.op
  832.     permission message: Unknown command. Type "/help" for help.
  833.     trigger:
  834.         if {mana::%player%} < {@mana.leap}:
  835.             message "&3You need at least &4{@mana.leap}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  836.             stop
  837.         set {_difference} to difference between {spell.timer.leap.%player%} and now
  838.         if {_difference} is less than {@timer.leap} seconds:
  839.             set {_difference} to difference between {_difference} and {@timer.leap} seconds
  840.             message "&3Cooldown: &b%{_difference}%"
  841.             stop
  842.         set {spell.timer.leap.%player%} to now
  843.         remove {@mana.leap} from {mana::%player%}
  844.        
  845.         push player forward at speed 5
  846.         push player up at speed 1
  847.         set {nofall.%player%} to true
  848.         wait 28 seconds
  849.         delete {nofall.%player%}
  850.        
  851. command /spell-ghost:
  852.     permission: skript.op
  853.     permission message: Unknown command. Type "/help" for help.
  854.     trigger:
  855.         if {mana::%player%} < {@mana.Warp}:
  856.             message "&3You need at least &4{@mana.Warp}&c Mana&3 to use this spell! &6Don't forget to convert it with /c!"
  857.             stop
  858.         set {_difference} to difference between {spell.timer.Warp.%player%} and now
  859.         if {_difference} is less than {@timer.Warp} seconds:
  860.             set {_difference} to difference between {_difference} and {@timer.Warp} seconds
  861.             message "&3Cooldown: &b%{_difference}%"
  862.             stop
  863.         set {spell.timer.Warp.%player%} to now
  864.         remove {@mana.Warp} from {mana::%player%}
  865.        
  866.         set {_loc} to location of player
  867.         set {no.gm.msg.%player%} to true
  868.         run player command "/gmsp" as op
  869.         delete {no.gm.msg.%player%}
  870.         send "&7You are now a ghost!"
  871.         apply water breathing to player for 10 seconds
  872.         wait 10 seconds
  873.         teleport player to {_loc}
  874.         set {no.gm.msg.%player%} to true
  875.         run player command "/gms" as op
  876.         delete {no.gm.msg.%player%}
  877.         teleport player to {_loc}
  878.         send "&6You are a player again!"
  879.         apply hunger 28 to player for 3 seconds
  880.  
  881. on server chat send:
  882.     {no.gm.msg.%player%} is true
  883.     packet message contains "Set game mode":
  884.         cancel event
  885.         set {no.gm.msg.%player%} to false
  886.            
  887. command /spell-nofall:
  888.     permission: skript.op
  889.     permission message: Unknown command. Type "/help" for help.
  890.     trigger:
  891.         set {_mana.inv} to amount of redstone named "&4Mana" in player's inventory
  892.         set {_mana.chest} to amount of redstone named "&4Mana" in block at {manachest.%uuid of player%}
  893.         set {_mana} to {_mana.inv} + {_mana.chest}
  894.         if {_mana} < {@mana.nofall}:
  895.             message "&3You need at least &c{@mana.nofall} Mana &3to use this spell!"
  896.             stop
  897.         set {_difference} to difference between {spell.timer.nofall.%player%} and now
  898.         if {_difference} is less than {@timer.nofall} seconds:
  899.             set {_difference} to difference between {_difference} and {@timer.nofall} seconds
  900.             message "&3Cooldown: &b%{_difference}%"
  901.             stop
  902.         set {spell.timer.nofall.%player%} to now
  903.         if {_mana.inv} >= {@mana.nofall}:
  904.             remove {@mana.nofall} of redstone named "&4Mana" from player
  905.         else if {_mana.inv} < {@mana.nofall}:
  906.             remove {@mana.nofall} of redstone named "&4Mana" from block at {manachest.%uuid of player%}
  907.             set {nofall.%player%} to true
  908.             set {nofall.msg.%player%} to true
  909.             send "&2Your Feather Falling is &lenabled&2!"
  910.        
  911. on projectile hit:
  912.     if {rapidfire.%projectile%} is true:
  913.         delete projectile
  914.         delete {rapidfire.%projectile%}
  915.     if {minibomb.%projectile%} is true:
  916.         create safe explosion of force 3.5 at projectile
  917.  
  918.  
  919.  
  920. # spell run / executing
  921.        
  922. on left click:
  923.     player's tool is a blaze rod:
  924.         name of player's tool contains "&6&lWand":
  925.             cancel the event
  926.             if player's world is "troopcraft" or "troopcraft_nether" or "troopcraft_the_end":
  927.                 if name of player's tool contains "No active":
  928.                     send "&3Right Click to select a spell, &bleft click to cast!"
  929.                     stop
  930.                 #if {spell.%player%} is "Warp" or "heal" or "rapidfire" or "speedboost" or "minibomb" or "raindance" or "ghost" or "leap" or "nofall" or "gust":
  931.                 if {spell.%player%} is set:
  932.                     run player command "/spell-%{spell.%player%}%" as op
  933.             else:
  934.                 send "&cThis can only be used in the factions world!"
  935.                 stop
  936. #           if {spell.%player%} is "Warp":
  937. #               run player command "/spell-Warp" as op
  938. #           else if {spell.%player%} is "heal":
  939. #               run player command "/spell-heal" as op
  940. #           else if {spell.%player%} is "rapidfire":
  941. #               run player command "/spell-rapidfire" as op
  942. #           else if {spell.%player%} is "speedboost":
  943. #               run player command "/spell-speedboost" as op
  944. #           else if {spell.%player%} is "minibomb":
  945. #               run player command "/spell-minibomb" as op
  946. #           else if {spell.%player%} is "raindance":
  947. #               run player command "/spell-raindance" as op
  948. #           else if {spell.%player%} is "implode":
  949. #               run player command "/spell-implode" as op
  950. #           else if {spell.%player%} is "leap":
  951. #               run player command "/spell-leap" as op
  952.        
  953. # format slot  of player with  named "" with lore "" to run "%player%"
  954. # spell name and changing # filler = light gray glass
  955.  
  956. command /spell-select <player> <text>:
  957.     permission: skript.op
  958.     permission message: Unknown command. Type "/help" for help.
  959.     trigger:
  960.         set name of {_p}'s tool to "%{_spell}%"
  961.         set slot in {_p}'s hand bar to {magik.select.slot.%{_p}%}
  962.         set {_p} to arg 1
  963.         set {_spell} to arg 2
  964.         set {spell.%{_p}%} to "%{_spell}%"
  965.         close {_p}'s inventory
  966.         wait 1 tick
  967.         if {_p}'s tool is blaze rod:
  968.             if name of {_p}'s tool contains "&6&lWand":
  969.                 set name of {_p}'s tool to "&6&lWand &3&o %{_spell}%"
  970.                 execute console command "title %{_p}% title {""text"":"""",""extra"":[{""text"":""%{_spell}%!"",""color"":""aqua"",""bold"":""true""}]}"
  971.                 execute console command "title %{_p}% subtitle {""text"":"""",""extra"":[{""text"":""selected!"",""color"":""aqua"",""bold"":""true""}]}"
  972.                 set {magik.inv.open.%player%} to false
  973.                 stop
  974.         send "&4&lDon't change your wand around while selecting a spell!!!" to {_p}
  975.        
  976. on inventory close:
  977.     set {_1} to diamond sword named "&4&lOffensive Spells!"
  978.     set {_2} to diamond chestplate named "&2&lDefensive Spells!"
  979.     set {_3} to healing potion named "&2Health Boost"
  980.     set {_4} to ghast tear named "&7Ghost"
  981.     set {_5} to end portal frame named "&5Warp"
  982.     set {_6} to gunpowder named "&0ForcePush<gold><bold>[WIP]"
  983.     set {_7} to tnt named "&0Implode&6&l[WIP]"
  984.     set {_8} to diamond chestplate named "&2&lDefensive Spells!"
  985.     wait 5 ticks
  986.     loop items in player's inventory:
  987.         loop-item is {_1} or {_2} or {_3} or {_4} or {_5} or {_6} or {_7} or {_8}
  988.         remove loop-item from player
  989.         send "&4&l&n&oYOU ARE NOT SUPPOSED TO HAVE THAT"
  990.         execute console command "kick %player% Abusing the Server"
  991.         broadcast "&4&l&n%player% was kicked for abusing the server!"
  992.     {magik.inv.open.%player%} is true
  993.     set {magik.inv.open.%player%} to false
  994.        
  995.        
  996. every 30 seconds:
  997.     set {_1} to diamond sword named "&4&lOffensive Spells!"
  998.     set {_2} to diamond chestplate named "&2&lDefensive Spells!"
  999.     set {_3} to healing potion named "&2Health Boost"
  1000.     set {_4} to ghast tear named "&7Ghost"
  1001.     set {_5} to end portal frame named "&5Warp"
  1002.     set {_6} to gunpowder named "&0ForcePush<gold><bold>[WIP]"
  1003.     set {_7} to tnt named "&0Implode&6&l[WIP]"
  1004.     set {_8} to diamond chestplate named "&2&lDefensive Spells!"
  1005.     loop all players:
  1006.         loop items in loop-player's inventory:
  1007.             loop-item is {_1} or {_2} or {_3} or {_4} or {_5} or {_6} or {_7} or {_8}
  1008.             remove loop-item from loop-player
  1009.             send "&4&l&n&oYOU ARE NOT SUPPOSED TO HAVE THAT" to loop-player
  1010.             execute console command "kick %loop-player% Abusing the Server"
  1011.             broadcast "&4&l&n%loop-player% was kicked for abusing the server!"
  1012.         {magik.inv.open.%loop-player%} is true
  1013.         set {magik.inv.open.%loop-player%} to false
  1014.        
  1015. on inventory click:
  1016.     {magik.inv.open.%player%} is true:
  1017.         cancel event
  1018.        
  1019. on right click:  # beacon - armageddon #cobble -earthquake #ice - iceprison #witherskull - witherskull #fire charge - fireball
  1020.     player's tool is a blaze rod:
  1021.         name of player's tool contains "&6&lWand":
  1022.             set {magik.select.slot.%player%} to player's current hotbar slot
  1023.             cancel the event
  1024.             wait 1 tick
  1025.             set {magik.inv.open.%player%} to true
  1026.             open chest with 5 rows named "<black><magic>___<purple><bold>Spell Selector<black><magic>___" to player
  1027.             format slot 0 of player with diamond sword named "&4&lOffensive Spells!" with lore "These spells cause damage!" to be unstealable
  1028.             format slot 1 of player with diamond sword named "&4&lOffensive Spells!" with lore "These spells cause damage!" to be unstealable
  1029.            
  1030.             format slot 2 of player with diamond chestplate named "&2&lDefensive Spells!" with lore "These spells defend / support!" to be unstealable
  1031.             format slot 3 of player with diamond chestplate named "&2&lDefensive Spells!" with lore "These spells defend / support!" to be unstealable
  1032.            
  1033.             format slot 4 of player with white glass pane named "<black><magic><i>filler" with lore "<white><bold><magic>__________" to be unstealable
  1034.            
  1035.             format slot 5 of player with grass block named "&2&lTerrain Spells!" with lore "These spells älter the environment!" to be unstealable
  1036.             format slot 6 of player with grass block named "&2&lTerrain Spells!" with lore "These spells älter the environment!" to be unstealable
  1037.            
  1038.             format slot 7 of player with gold boots named "&2&lMovement Spells!" with lore "These spells do stuff to how you move!" to be unstealable
  1039.             format slot 8 of player with gold boots named "&2&lMovement Spells!" with lore "These spells do stuff to how you move!" to be unstealable
  1040.            
  1041.            
  1042.             format slot 9 of player with arrow named "&cRapid Fire" with lore "Quickly shoot arrows at the cost of 1 mana/arrow! ||&3Mana Cost: {@mana.rapidfire} ||&3Cooldown: {@timer.rapidfire}" to run "spell-select %player% rapidfire"
  1043.             format slot 10 of player with snowball named "&cMini-Bomb" with lore "Shoot a terrain-safe grenade! ||&3Mana Cost: {@mana.minibomb} ||&3Cooldown: {@timer.minibomb}" to run "spell-select %player% minibomb"
  1044.             format slot 11 of player with healing potion named "&2Health Boost" with lore "Heals you to double natural heats! ||&3Mana Cost: {@mana.heal} ||&3Cooldown: {@timer.heal}" to run "spell-select %player% heal"
  1045.             format slot 12 of player with feather named "&fFeather Falling" with lore "Suffer no fall damage on your  ||next other-wise damaging fall! ||&3Mana Cost: {@mana.nofall} ||&3Cooldown: {@timer.nofall}" to run "spell-select %player% nofall"
  1046.            
  1047.             format slot 13 of player with white glass pane named "<black><magic><i>filler" with lore "<white><bold><magic>__________" to run "%player%"
  1048.            
  1049.             format slot 14 of player with water bucket named "&9Rain Dance" with lore "Perform a ritual to the Aztec god, Tlaloc! ||&3Mana Cost: {@mana.raindance} ||&3Cooldown: {@timer.raindance}" to run "spell-select %player% raindance"
  1050.             format slot 15 of player with ghast tear named "&7Ghost" with lore "Become a spectral Ghost for 10 seconds! ||&3Mana Cost: {@mana.ghost} ||&3Cooldown: {@timer.ghost}" to run "spell-select %player% ghost"
  1051.             format slot 16 of player with end portal frame named "&5Warp" with lore "Teleport and hope the chunks are loaded! ||&3Mana Cost: {@mana.Warp} ||&3Cooldown: {@timer.Warp}" to run "spell-select %player% Warp"
  1052.             format slot 17 of player with sugar named "&3Speed Boost" with lore "Run faster for 30 seconds! ||&3Mana Cost: {@mana.speedboost} ||&3Cooldown: {@timer.speedboost}" to run "spell-select %player%  speedboost"
  1053.            
  1054.            
  1055.             format slot 18 of player with firework star named "&6&lStarCrash" with lore "&6&lSummon a fallen angel  ||&6&lin the form of a Star! ||&3Mana Cost: {@mana.starcrash} ||&3Cooldown: {@timer.starcrash}" to run "spell-select %player% starcrash"
  1056.             format slot 19 of player with 64 firework star named "&5&k_|_&6&lStarStorm&5&k_|_" with lore "&4&lThe deadliest of all spells!  ||&4&lSummon a league of fallen angels  ||&4&lto decimate your foes! ||&3Mana Cost: {@mana.starstorm} ||&3Cooldown: {@timer.starstorm}" to run "spell-select %player% starstorm"
  1057.             format slot 20 of player with {banner.angy_bird} to run "spell-select %player%  gust"
  1058.             format slot 21 of player with prismarine crystals named "&6&lNova" with lore "&6&l&nThis Spell is the  ||&6&l&nUltimate Close quarters defense! ||&3Mana Cost: {@mana.nova} ||&3Cooldown: {@timer.nova}" to run "spell-select %player% nova"
  1059.            
  1060.             format slot 22 of player with white glass pane named "<black><magic><i>filler" with lore "<white><bold><magic>__________" to run "%player%"
  1061.            
  1062.             format slot 23 of player with tnt named "&3&lImplode&4&n[Unfinished]" with lore "Watch the blocks fly!  ||(The actual spell is not ready...) ||&3Mana Cost: {@mana.implode} ||&3Cooldown: {@timer.implode}" to run "spell-select %player% implode"
  1063.             format slot 24 of player with ender dragon egg named "&f☢☢☢&4&lA&c&lr&4&lm&c&la&4&lg&c&le&4&ld&c&ld&4&lo&c&ln&f☢☢☢" with lore "&6&l&oSUMMON THE END UPON THY ENEMIES! ||&3Mana Cost: {@mana.armageddon} ||&3Cooldown: {@timer.armageddon}" to run "spell-select %player% armageddon"
  1064.             format slot 25 of player with rabbit's foot named "&fLeap" with lore "Leap far and suffer no fall damage! ||&3Mana Cost: {@mana.leap} ||&3Cooldown: {@timer.leap}" to run "spell-select %player% leap"
  1065.             format slot 26 of player with steak named "&2&oFill 'er up!" with lore "Refill that old sprint bar! ||&3Mana Cost: {@mana.feed} ||&3Cooldown: {@timer.feed}" to run "spell-select %player% feed"           
  1066.            
  1067.            
  1068.             format slot 27 of player with dirt:1 named "&2EARTHQUAKE" with lore "Quake the Earth! ||&3Mana Cost: {@mana.earthquake} ||&3Cooldown: {@timer.earthquake}" to run "spell-select %player% earthquake"           
  1069.             format slot 28 of player with fire charge named "&cFireBall" with lore "&4&lFyah-POWER!!! ||&3Mana Cost: {@mana.fireball} ||&3Cooldown: {@timer.fireball}" to run "spell-select %player% fireball"         
  1070.             format slot 29 of player with ice named "&3Prison on Ice" with lore "&3&oLet it jailllll, let it jaillllll! ||&3Mana Cost: {@mana.iceprison} ||&3Cooldown: {@timer.iceprison}" to run "spell-select %player% iceprison"        
  1071.             format slot 30 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1072.            
  1073.             format slot 31 of player with white glass pane named "<black><magic><i>filler" with lore "<white><bold><magic>__________" to run "%player%"
  1074.            
  1075.             format slot 32 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"       
  1076.             format slot 33 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1077.             format slot 34 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1078.             format slot 35 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1079.            
  1080.            
  1081.             format slot 36 of player with coal named "&0&lShoot a WitherSkull!" with lore "Become a wither!  ||(Not actually, that'll cost real money...) ||&3Mana Cost: {@mana.witherskull} ||&3Cooldown: {@timer.witherskull}" to run "spell-select %player% witherskull"
  1082.             format slot 37 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1083.             format slot 38 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1084.             format slot 39 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1085.            
  1086.             format slot 40 of player with white glass pane named "<black><magic><i>filler" with lore "<white><bold><magic>__________" to run "%player%"
  1087.            
  1088.             format slot 41 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1089.             format slot 42 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1090.             format slot 43 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1091.             format slot 44 of player with black glass pane named "<magic><i>filler" with lore "<black><bold><magic>__________" to run "%player%"           
  1092.            
  1093.            
  1094.             stop
  1095.            
  1096.             if player is sneaking:
  1097.                 execute player command "/mana open"
  1098.                 stop
  1099.            
  1100.  
  1101.             if {spellnum.%player%} is 10:
  1102.                 set {spell.%player%} to "Equal Exchange"
  1103.                 set name of player's tool to "&6&lWand of &2Equal Exchange"
  1104.                 set lore of player's tool to "Use your Thaumaturgy and change the environment! ||&7&oNext spell: &3Warp"
  1105.                
  1106.  
  1107. #               set {spell.%player%} to "implode"
  1108. #               set name of player's tool to "&6&lWand &8Implode"
  1109.            
  1110. on damage:
  1111.     if damage was caused by fall:
  1112.         if {nofall.%victim%} is true:
  1113.             cancel the event
  1114.             delete {nofall.%victim%}
  1115.         if {nofall.msg.%victim%} is true:
  1116.             send "&cYou used up your anti-fall!"
  1117.             delete {nofall.msg.%victim%}
  1118.            
  1119. function mana_converter_south(l: location):
  1120.     block north of {mana.stone.button.converter.block} is air
  1121.     block north east of {mana.stone.button.converter.block} is air
  1122.     block east of {mana.stone.button.converter.block} is air
  1123.     block south east of {mana.stone.button.converter.block} is air
  1124.     block south of {mana.stone.button.converter.block} is double stone slab item
  1125.     block south west of {mana.stone.button.converter.block} is air
  1126.     block west of {mana.stone.button.converter.block} is air
  1127.     block north west of {mana.stone.button.converter.block} is air
  1128.     block at {mana.stone.button.converter.block} is stone button
  1129.     set {_chest} to block below {mana.stone.button.converter.block}
  1130.     set {_output} to block north of {_chest}
  1131.     block north of {_chest} is dropper
  1132.     block north east of {_chest} is stone brick stairs
  1133.     block east of {_chest} is stone brick stairs
  1134.     block south east of {_chest} is stone brick stairs
  1135.     block south of {_chest} is double stone slab item
  1136.     block south west of {_chest} is stone brick stairs
  1137.     block west of {_chest} is stone brick stairs
  1138.     block north west of {_chest} is stone brick stairs
  1139.     block at {_chest} is a chest
  1140.     loop all items in block at {_chest}:
  1141.         if loop-item is redstone:
  1142.             set {_count.stack} to amount of loop-item in block at {_chest}
  1143.             add {_count.stack} to {_count.redstone}
  1144.         if loop-item is exp bottle:
  1145.             set {_count.stack} to amount of loop-item in block at {_chest}
  1146.             add {_count.stack} to {_count.exp}
  1147.         while {_count.redstone} > {@convert.rate} - 1:
  1148.             remove 1 redstone from block at {_chest}
  1149.             remove 1 from {_count.redstone}
  1150.             add 1 redstone named "&4Mana" to block at {_output}
  1151.         while {_count.exp} > 0:
  1152.             remove 1 exp bottle from block at {_chest}
  1153.             remove 1 from {_count.exp}
  1154.             add 16 redstone named "&4Mana" to block at {_output}
  1155.             add 1 glass bottle to block at {_output}
  1156.            
  1157. function mana_converter_north(l: location):
  1158.     block south of {mana.stone.button.converter.block} is air
  1159.     block south west of {mana.stone.button.converter.block} is air
  1160.     block west of {mana.stone.button.converter.block} is air
  1161.     block north west of {mana.stone.button.converter.block} is air
  1162.     block north of {mana.stone.button.converter.block} is double stone slab item
  1163.     block north east of {mana.stone.button.converter.block} is air
  1164.     block east of {mana.stone.button.converter.block} is air
  1165.     block south east of {mana.stone.button.converter.block} is air
  1166.     block at {mana.stone.button.converter.block} is stone button
  1167.     set {_chest} to block below {mana.stone.button.converter.block}
  1168.     set {_output} to block south of {_chest}
  1169.     block south of {_chest} is dropper
  1170.     block south west of {_chest} is stone brick stairs
  1171.     block west of {_chest} is stone brick stairs
  1172.     block north west of {_chest} is stone brick stairs
  1173.     block north of {_chest} is double stone slab item
  1174.     block north east of {_chest} is stone brick stairs
  1175.     block east of {_chest} is stone brick stairs
  1176.     block south east of {_chest} is stone brick stairs
  1177.     block at {_chest} is a chest
  1178.     loop all items in block at {_chest}:
  1179.         if loop-item is redstone:
  1180.             set {_count.stack} to amount of loop-item in block at {_chest}
  1181.             add {_count.stack} to {_count.redstone}
  1182.         if loop-item is exp bottle:
  1183.             set {_count.stack} to amount of loop-item in block at {_chest}
  1184.             add {_count.stack} to {_count.exp}
  1185.         while {_count.redstone} > {@convert.rate} - 1:
  1186.             remove 10 redstone from block at {_chest}
  1187.             remove 10 from {_count.redstone}
  1188.             add 1 redstone named "&4Mana" to block at {_output}
  1189.         while {_count.exp} > 0:
  1190.             remove 1 exp bottle from block at {_chest}
  1191.             remove 1 from {_count.exp}
  1192.             add 1 redstone named "&4Mana" to block at {_output}
  1193.             add 1 glass bottle to block at {_output}
  1194.  
  1195. function mana_converter_west(l: location):
  1196.     block east of {mana.stone.button.converter.block} is air
  1197.     block south east of {mana.stone.button.converter.block} is air
  1198.     block south of {mana.stone.button.converter.block} is air
  1199.     block south west of {mana.stone.button.converter.block} is air
  1200.     block west of {mana.stone.button.converter.block} is double stone slab item
  1201.     block north west of {mana.stone.button.converter.block} is air
  1202.     block north of {mana.stone.button.converter.block} is air
  1203.     block north east of {mana.stone.button.converter.block} is air
  1204.     block at {mana.stone.button.converter.block} is stone button
  1205.     set {_chest} to block below {mana.stone.button.converter.block}
  1206.     set {_output} to block east of {_chest}
  1207.     block east of {_chest} is dropper
  1208.     block south east of {_chest} is stone brick stairs
  1209.     block south of {_chest} is stone brick stairs
  1210.     block south west of {_chest} is stone brick stairs
  1211.     block west of {_chest} is double stone slab item
  1212.     block north west of {_chest} is stone brick stairs
  1213.     block north of {_chest} is stone brick stairs
  1214.     block north east of {_chest} is stone brick stairs
  1215.     block at {_chest} is a chest
  1216.     loop all items in block at {_chest}:
  1217.         if loop-item is redstone:
  1218.             set {_count.stack} to amount of loop-item in block at {_chest}
  1219.             add {_count.stack} to {_count.redstone}
  1220.         if loop-item is exp bottle:
  1221.             set {_count.stack} to amount of loop-item in block at {_chest}
  1222.             add {_count.stack} to {_count.exp}
  1223.         while {_count.redstone} > {@convert.rate} - 1:
  1224.             remove 10 redstone from block at {_chest}
  1225.             remove 10 from {_count.redstone}
  1226.             add 1 redstone named "&4Mana" to block at {_output}
  1227.         while {_count.exp} > 0:
  1228.             remove 1 exp bottle from block at {_chest}
  1229.             remove 1 from {_count.exp}
  1230.             add 1 redstone named "&4Mana" to block at {_output}
  1231.             add 1 glass bottle to block at {_output}
  1232.            
  1233. function mana_converter_east(l: location):
  1234.     block west of {mana.stone.button.converter.block} is air
  1235.     block north west of {mana.stone.button.converter.block} is air
  1236.     block north of {mana.stone.button.converter.block} is air
  1237.     block north east of {mana.stone.button.converter.block} is air
  1238.     block east of {mana.stone.button.converter.block} is double stone slab item
  1239.     block south east of {mana.stone.button.converter.block} is air
  1240.     block south of {mana.stone.button.converter.block} is air
  1241.     block south east of {mana.stone.button.converter.block} is air
  1242.     block at {mana.stone.button.converter.block} is stone button
  1243.     set {_chest} to block below {mana.stone.button.converter.block}
  1244.     set {_output} to block west of {_chest}
  1245.     block west of {_chest} is dropper
  1246.     block north west of {_chest} is stone brick stairs
  1247.     block north of {_chest} is stone brick stairs
  1248.     block north east of {_chest} is stone brick stairs
  1249.     block east of {_chest} is double stone slab item
  1250.     block south east of {_chest} is stone brick stairs
  1251.     block south of {_chest} is stone brick stairs
  1252.     block south west of {_chest} is stone brick stairs
  1253.     block at {_chest} is a chest
  1254.     loop all items in block at {_chest}:
  1255.         if loop-item is redstone:
  1256.             set {_count.stack} to amount of loop-item in block at {_chest}
  1257.             add {_count.stack} to {_count.redstone}
  1258.         if loop-item is exp bottle:
  1259.             set {_count.stack} to amount of loop-item in block at {_chest}
  1260.             add {_count.stack} to {_count.exp}
  1261.         while {_count.redstone} > {@convert.rate} - 1:
  1262.             remove 10 redstone from block at {_chest}
  1263.             remove 10 from {_count.redstone}
  1264.             add 1 redstone named "&4Mana" to block at {_output}
  1265.         while {_count.exp} > 0:
  1266.             remove 1 exp bottle from block at {_chest}
  1267.             remove 1 from {_count.exp}
  1268.             add 1 redstone named "&4Mana" to block at {_output}
  1269.             add 1 glass bottle to block at {_output}
  1270.                            
  1271. on right click on stone button:
  1272.     if block south of event-block is double stone slab item:
  1273.         set {mana.stone.button.converter.block} to event-block
  1274.         mana_converter_south({mana.stone.button.converter.block})
  1275.     if block north of event-block is double stone slab item:
  1276.         set {mana.stone.button.converter.block} to event-block
  1277.         mana_converter_north({mana.stone.button.converter.block})
  1278.     if block east of event-block is double stone slab item:
  1279.         set {mana.stone.button.converter.block} to event-block
  1280.         mana_converter_east({mana.stone.button.converter.block})
  1281.     if block west of event-block is double stone slab item:
  1282.         set {mana.stone.button.converter.block} to event-block
  1283.         mana_converter_west({mana.stone.button.converter.block})
Advertisement
Add Comment
Please, Sign In to add comment