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.

Splash Potion Thrown

Discussion in 'Skript' started by ZsCortzones, Jan 19, 2023.

  1. ZsCortzones

    ZsCortzones Member

    Joined:
    Feb 18, 2021
    Messages:
    24
    Likes Received:
    1
    Hello everyone, I'm currently trying to make a skript for an alchemist kit that can "rebrew" potions on a cooldown after using them, but I can't quite seem to get it to work. Heres what I have right now that doesn't work:

    Code (Text):
    1. on right click:
    2.     if player's held item is splash potion of harming:
    3.         send "&cYour potion of harming will be brewed in 5 seconds..."
    4.         wait 5 seconds
    5.         set slot 0 of player's inventory to splash potion of harming
    6.         send "&aYour potion of harming is ready again!"
    I don't get any errors with the skript, but it doesn't do anything, and I'm assuming it's because of the trigger I have set up. Does anyone have any ideas or solutions?
     
  2. NobikFly

    NobikFly New Member

    Joined:
    Jan 18, 2023
    Messages:
    7
    Likes Received:
    0
    Can you try this please?:
    Code (Text):
    1. on right click with splash potion:
    2.   if player's held item is splash potion of harming:
    3.     set {_potion} to player's held item
    4.     send "&cYour potion of harming will be brewed in 5 seconds..."
    5.     wait 5 seconds
    6.     give {_potion} to player
    7.     send "&aYour potion of harming is ready again!"
    So its working on me.
    Note: I add check for tier 2 harming potion.
     
  3. ZsCortzones

    ZsCortzones Member

    Joined:
    Feb 18, 2021
    Messages:
    24
    Likes Received:
    1

    Not sure why but this doesn't work either; the skript reloads without any errors, but when the potion is thrown no messages are sent to the player, nordoes the potion come back :/
     
  4. NobikFly

    NobikFly New Member

    Joined:
    Jan 18, 2023
    Messages:
    7
    Likes Received:
    0
    What is your skript version and if possible, can you send a video here?
     
  5. ZsCortzones

    ZsCortzones Member

    Joined:
    Feb 18, 2021
    Messages:
    24
    Likes Received:
    1
    Okay so I got the skript to work after restoring a backup to my server since I accidentally broke something, but unfortunately the skript triggers whenever ANY splash potion is thrown, not just harming.

    I'm on version 2.6.4 btw
    --- Double Post Merged, Jan 20, 2023, Original Post Date: Jan 20, 2023 ---
    also sorry for double post, but here's my addons as well

    upload_2023-1-20_9-46-9.png
     
  6. NobikFly

    NobikFly New Member

    Joined:
    Jan 18, 2023
    Messages:
    7
    Likes Received:
    0
    Can you try with a fresh server so just create new empty server and try with just skript plugin and this code.
    If it works on clean server there is probably a problem with your server and I can't help with that sorry.
     
  7. Zhync

    Zhync Active Member

    Joined:
    Feb 11, 2022
    Messages:
    69
    Likes Received:
    4
    Hi. Some more useful advice might be to try using the "on shoot" event. Then check the event-projectile and shooter.
     

Share This Page

Loading...