1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved summon lightning on rightclick

Discussion in 'Skript' started by Buildingabyss90, Jun 15, 2021.

Thread Status:
Not open for further replies.
  1. Buildingabyss90

    Buildingabyss90 New Member

    Joined:
    Jun 15, 2021
    Messages:
    5
    Likes Received:
    1
    On rightclick:
    if player's tool is golden hoe:
    if lore of player's tool contains "Unbreaking V":
    on damage of a player:
    if attacker is player:
    do:
    strike lightning effect at the victim

    is what i have so far
    --- Double Post Merged, Jun 15, 2021, Original Post Date: Jun 15, 2021 ---
    respond as quickly as you can please!

     
  2. Best Answer:
    Post #11 by Buildingabyss90, Jun 23, 2021
  3. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    This code is very confusing - do u want it when you hit someone or when you right-click the tool?
    Code (Text):
    1. # this would be right click
    2. on right click with golden hoe:
    3.   if lore of player's tool contains "Unbreaking V":
    4.     strike lightning effect at target block of player
    5.  
    6. # this would be on damage
    7. on damage of player:
    8.   if lore of attacker's tool contains "Unbreaking V":
    9.     strike lightning effect at the victim
     
  4. Buildingabyss90

    Buildingabyss90 New Member

    Joined:
    Jun 15, 2021
    Messages:
    5
    Likes Received:
    1
    Like if I rightclick i want it to summon lightning where im looking at.
    --- Double Post Merged, Jun 17, 2021, Original Post Date: Jun 17, 2021 ---
    i want to summon lighning where i look at on rightclick
     
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Then that's the correct code
     
  6. Buildingabyss90

    Buildingabyss90 New Member

    Joined:
    Jun 15, 2021
    Messages:
    5
    Likes Received:
    1
    all it does is hoe the ground..
    --- Double Post Merged, Jun 17, 2021, Original Post Date: Jun 17, 2021 ---
    It doesnt summon lightning on rightclick though, all it does is hoe the ground.
     
  7. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    try to add a cancel event
     
  8. Buildingabyss90

    Buildingabyss90 New Member

    Joined:
    Jun 15, 2021
    Messages:
    5
    Likes Received:
    1
    im bad at skript lol could u add it for me idk how im dumb.
    thanks for all the help btw
     
  9. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Code (Text):
    1. on right click with golden hoe:
    2.   if lore of player's tool contains "Unbreaking V":
    3.     cancel event
    4.     strike lightning effect at target block of player
    But you know that "Unbreaking V" is an enchanted and not a lore?
     
  10. nicolas toledo

    Joined:
    Mar 29, 2020
    Messages:
    28
    Likes Received:
    0
    I tried it and it works, it also adds explosion effect, adds damage and sets the target on fire. It also adds a distance limit to be able to cast this ability. everything can be modified and make it just throw the lightning

    Code (Text):
    1. on rightclick:
    2.     if player's tool is golden hoe:
    3.         if lore of player's tool contains "Unbreaking V":
    4.             player's target is set
    5.             distance between the target and the player is more than 10:
    6.                 message "too far"
    7.                 stop
    8.             strike lightning effect at the target
    9.             damage target by 5
    10.             create a fake explosion at the target
    11.             ignite the target      
    12.             stop    
    only lighting:

    Code (Text):
    1. on rightclick:
    2.     if player's tool is golden hoe:
    3.         if lore of player's tool contains "Unbreaking V":
    4.             player's target is set
    5.             strike lightning effect at the target  
    6.             stop    
     
  11. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    The "stop" after everything is useless, and I would change the first part to:
    Code (Text):
    1. on right click with golden hoe:
    2.   if lore of player's tool contains "Unbreaking V":
    3.     if distance between the target and the player is less than 11:
    4.       strike lightning effect at the target
    5.       create a fake explosion at the target
    6.       loop players in radius 2 around target block:
    7.         ignite the loop-player
    8.         damage loop-player by 5
     
    • Informative Informative x 1
  12. Buildingabyss90

    Buildingabyss90 New Member

    Joined:
    Jun 15, 2021
    Messages:
    5
    Likes Received:
    1
    ill try it out
    --- Double Post Merged, Jun 23, 2021, Original Post Date: Jun 23, 2021 ---
    i edited it to
    on rightclick:
    if player's tool is golden hoe:
    if lore of player's tool contains "Unbreaking V":
    player's target block is set
    distance between the target and the player is more than 1000:
    message "too far"
    stop
    strike lightning effect at the target block
    damage target by 5
    create a fake explosion at the target block
    ignite the target
    stop
    and it works perfectly
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...