Potions

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

SoMuchWessel

Active Member
Apr 3, 2017
147
3
18
46
Hi guys,

I wrote this code:

code_language.skript:
        add 1 Potion of Leaping to {potion::normal::*}
        add 1 potion of fire resistance to {potion::normal::*}
        add 1 potion of swiftness to {potion::normal::*}
        add 1 potion of water breathing to {potion::normal::*}
        add 1 Potion of Healing II to {potion::normal::*}
        add 1 potion of regeneration to {potion::normal::*}
        add 1 potion of strength to {potion::normal::*}
        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?
 
You can only add text to a list
add "Potion of Leaping" to {potion::normal::*}
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.
 
Potions need NBT in order to have specific effects.

code_language.skript:
!give player 1 of potion with nbt "{Potion:""minecraft:leaping""}"

Use that syntax.
 
Potions need NBT in order to have specific effects.

code_language.skript:
!give player 1 of potion with nbt "{Potion:""minecraft:leaping""}"

Use that syntax.

Not a valid item data
[doublepost=1517526295,1517526229][/doublepost]
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.

Does not work
[doublepost=1517526325][/doublepost]
You can only add text to a list
add "Potion of Leaping" to {potion::normal::*}

Also does not work
 
You need an addon that supports NBT. I tried my effect command ingame and it works.
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.
 
How long ago was this?

1.9 Changelog:

Numeric IDs are no longer used. Instead an NBT "Potion" tag is used, e.g. /give <player> minecraft:emoji_stuck_out_tongue:otion 1 0 {Potion:"minecraft:swiftness"}. See here for the old numeric IDs.
 
Did some testing and it works if you label it as water_bottle:#
so like water_bottle:3 is Fire resistance
 
Did some testing and it works if you label it as water_bottle:#
so like water_bottle:3 is Fire resistance

Thanks, this worked!
[doublepost=1517531982,1517531439][/doublepost]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.
 
Status
Not open for further replies.