variables:
{fire.%player%} = 0
{water.%player%} = 0
{dirt.%player%} = 0
{air.%player%} = 0
{mana.%player%} = 1
on first join:
give a blaze rod named "&5Staff" to the player
give a redstone named "&4Fire essence" to the player
give a clay named "&9Water essence" to the player
give a cocoa beans named "&8Dirt essence" to the player
give a nether quartz named "&7Air essence" to the player
give 1 lapis lazuli named "&1Mana" to the player
on player drop:
cancel event
command /MagicKit:
trigger:
give a blaze rod named "&5Staff" to the player
give a redstone named "&4Fire essence" to the player
give a clay named "&9Water essence" to the player
give a cocoa beans named "&8Dirt essence" to the player
give a nether quartz named "&7Air essence" to the player
give 1 lapis lazuli named "&1Mana" to the player
command /setmana <player> <int>:
trigger:
set {mana.%arg 1%} to arg 2
message "Your mana is set to: %{mana.%player%}"
on damage:
if attacker's tool is a blaze rod named "&5Staff":
if {fire.%attacker%} = 1:
set {fire.%attacker%} to {fire.%attacker%} - 1
ignite victim for 5 seconds
wait 3 seconds
give 1 lapis lazuli named "&1Mana" to the attacker
set {mana.%attacker%} to {mana.%attacker%} + 1
if {water.%attacker%} = 1:
set {water.%attacker%} to {water.%attacker%} - 1
apply poison to victim for 5 seconds
set {_loc.%victim%} to the location 1 meter above the victim
drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
wait 3 seconds
give 1 lapis lazuli named "&1Mana" to the attacker
set {mana.%attacker%} to {mana.%attacker%} + 1
if {dirt.%attacker%} = 1:
set {dirt.%attacker%} to {dirt.%attacker%} - 1
apply blindness to victim for 5 seconds
apply poison to victim for 5 seconds
set victim's helmet to grass
wait 5 seconds
set victim's helmet to air
wait 3 seconds
give 1 lapis lazuli named "&1Mana" to the attacker
set {mana.%attacker%} to {mana.%attacker%} + 1
if {air.%attacker%} = 1:
set {air.%attacker%} to {air.%attacker%} - 1
push victim backwards at speed 5
wait 3 seconds
give 1 lapis lazuli named "&1Mana" to the attacker
set {mana.%attacker%} to {mana.%attacker%} + 1
on rightclick:
if player is holding a redstone named "&4Fire essence":
if {mana.%player%} = 1:
set {fire.%player%} to {fire.%player%} + 1
remove 1 lapis lazuli named "&1Mana" from the player
set {mana.%player%} to {mana.%player%} - 1
on rightclick:
if player is holding a clay named "&9Water essence":
if {mana.%player%} = 1:
set {water.%player%} to {water.%player%} + 1
remove 1 lapis lazuli named "&1Mana" from the player
set {mana.%player%} to {mana.%player%} - 1
on rightclick:
if player is holding a cocoa beans named "&8Dirt essence":
if {mana.%player%} = 1:
set {dirt.%player%} to {dirt.%player%} + 1
remove 1 lapis lazuli named "&1Mana" from the player
set {mana.%player%} to {mana.%player%} - 1
on rightclick:
if player is holding a quartz named "&7Air essence":
if {mana.%player%} = 1:
set {air.%player%} to {air.%player%} + 1
remove 1 lapis lazuli named "&1Mana" from the player
set {mana.%player%} to {mana.%player%} - 1