In this lesson you will use what you've learned to add a spell that causes a lightning strike at the target location
It is recommended that you complete The Wand, the Midas Touch, and the setSpell() Function lessons before attempting this challenge unless you have prior experience with custom items, the PlayerInteract event, and exporting functions.
CHALLENGE: Add a new item based on the Magic Wand that has the spell set to "Lightning Strike"
NOTE: You do not need a crafting recipe for this wand since we will be using the setSpell() function to give it to the player.
CHALLENGE: Add "Lightning Strike" to your setSpell() function
You should be able to use the command /js setSpell("Lightning Strike") to place the wand you made in the previous step in your hand.
CHALLENGE: Add code to your onPlayerInteract function that allows you to cast the lightning spell
Check the action the player performed
Check the item in the player's hand
Use world.strikeLightning(location); to cause a lightning strike at location
Check Your Work
Make sure everything is working properly
Once you have successfully completed this challenge try to think of another spell you would like to add that would use the PlayerInteract event in a similar way.