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.

Potions

Discussion in 'Skript' started by SoMuchWessel, Feb 1, 2018.

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

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    Hi guys,

    I wrote this code:

    Code (Skript):
    1.         add 1 Potion of Leaping to {potion::normal::*}
    2.         add 1 potion of fire resistance to {potion::normal::*}
    3.         add 1 potion of swiftness to {potion::normal::*}
    4.         add 1 potion of water breathing to {potion::normal::*}
    5.         add 1 Potion of Healing II to {potion::normal::*}
    6.         add 1 potion of regeneration to {potion::normal::*}
    7.         add 1 potion of strength to {potion::normal::*}
    8.         add 1 potion of luck to {potion::normal::*}
    But none of them is working.
    Error: 1 potion of (thing) cant be added to {potion::normal::*} because the former is not an object

    Can you guys help me out here?

     
  2. Best Answer:
    Post #9 by Wynnevir, Feb 2, 2018
  3. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,015
    Likes Received:
    62
    You can only add text to a list
    add "Potion of Leaping" to {potion::normal::*}
     
  4. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    No, you can add integers, numbers, strings, items, etc. to the list. As long as it's a value, it can be added.

    Try removing the 1 from all the lines to see if it works.
     
  5. Parrothead

    Parrothead Member

    Joined:
    Feb 1, 2017
    Messages:
    27
    Likes Received:
    3
    Potions need NBT in order to have specific effects.

    Code (Skript):
    1. !give player 1 of potion with nbt "{Potion:""minecraft:leaping""}"
    Use that syntax.
     
  6. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    Not a valid item data
    --- Double Post Merged, Feb 1, 2018, Original Post Date: Feb 1, 2018 ---
    Does not work
    --- Double Post Merged, Feb 1, 2018 ---
    Also does not work
     
  7. Parrothead

    Parrothead Member

    Joined:
    Feb 1, 2017
    Messages:
    27
    Likes Received:
    3
    You need an addon that supports NBT. I tried my effect command ingame and it works.
     
  8. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    I've done what OP is doing before. No NBT is even required unless you want to modify the potion itself.

    Maybe you should inspect the alias file and see what is named there.
     
  9. Parrothead

    Parrothead Member

    Joined:
    Feb 1, 2017
    Messages:
    27
    Likes Received:
    3
    How long ago was this?

    1.9 Changelog:

     
  10. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,015
    Likes Received:
    62
    Did some testing and it works if you label it as water_bottle:#
    so like water_bottle:3 is Fire resistance
     
  11. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    Thanks, this worked!
    --- Double Post Merged, Feb 2, 2018, Original Post Date: Feb 2, 2018 ---
    I got another thing:
    How do i do it with splash potions?
    Because splash_potion:1 gives me a bugged item with no texture and no effect.
     
  12. Snow-Pyon

    Snow-Pyon Well-Known Member

    Joined:
    Jan 25, 2017
    Messages:
    1,235
    Likes Received:
    176
    Medals:
  13. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    What do you mean with bensku's fork?
     
  14. Snow-Pyon

    Snow-Pyon Well-Known Member

    Joined:
    Jan 25, 2017
    Messages:
    1,235
    Likes Received:
    176
    Medals:
  15. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
  16. Snow-Pyon

    Snow-Pyon Well-Known Member

    Joined:
    Jan 25, 2017
    Messages:
    1,235
    Likes Received:
    176
    Medals:
    yes, it's a fork that supports 1.9+
     
  17. Pikachu

    Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    870
    Likes Received:
    139
    Medals:
    The original version of Skript is by njol and was abandoned around 2014. After that, Mirreski maintained it for a while in his fork and now Bensku maintains it.
     
  18. SoMuchWessel

    SoMuchWessel Active Member

    Joined:
    Apr 3, 2017
    Messages:
    147
    Likes Received:
    2
    I got the latest skript, from bensku, but still the splash potions wont work
     
  19. Snow-Pyon

    Snow-Pyon Well-Known Member

    Joined:
    Jan 25, 2017
    Messages:
    1,235
    Likes Received:
    176
    Medals:
    what did you try?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...