Splash Potion Thrown

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ZsCortzones

Member
Feb 18, 2021
32
1
8
26
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:
on right click:
    if player's held item is splash potion of harming:
        send "&cYour potion of harming will be brewed in 5 seconds..."
        wait 5 seconds
        set slot 0 of player's inventory to splash potion of harming
        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?
 
Can you try this please?:
Code:
on right click with splash potion:
  if player's held item is splash potion of harming:
    set {_potion} to player's held item
    send "&cYour potion of harming will be brewed in 5 seconds..."
    wait 5 seconds
    give {_potion} to player
    send "&aYour potion of harming is ready again!"
So its working on me.
Note: I add check for tier 2 harming potion.
 
Can you try this please?:
Code:
on right click with splash potion:
  if player's held item is splash potion of harming:
    set {_potion} to player's held item
    send "&cYour potion of harming will be brewed in 5 seconds..."
    wait 5 seconds
    give {_potion} to player
    send "&aYour potion of harming is ready again!"
So its working on me.
Note: I add check for tier 2 harming potion.


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 :/
 
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 :/
What is your skript version and if possible, can you send a video here?
 
What is your skript version and if possible, can you send a video here?

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
[doublepost=1674236776,1674236721][/doublepost]also sorry for double post, but here's my addons as well

upload_2023-1-20_9-46-9.png
 
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
[doublepost=1674236776,1674236721][/doublepost]also sorry for double post, but here's my addons as well

View attachment 7277
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.
 
Hi. Some more useful advice might be to try using the "on shoot" event. Then check the event-projectile and shooter.
 
Status
Not open for further replies.