Get active potions of player

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

Binkie

Member
Nov 20, 2020
21
2
3
16
Hello this is my code and i want someone to tell me how to know the active potions of player

Code:
loop active potion effects of player:
    if potion type of loop-potion effect is not speed:
 
Hello this is my code and i want someone to tell me how to know the active potions of player

Code:
loop active potion effects of player:
    if potion type of loop-potion effect is not speed:
To do it you need QuarSk. And i think it's easier to check the potion effects the player has, not the ones he don't.
code_language.skript:
loop active potion effects of player:
    if potion type of loop-potion effect is (potion effect):
       #do...
 
To do it you need QuarSk. And i think it's easier to check the potion effects the player has, not the ones he don't.
code_language.skript:
loop active potion effects of player:
    if potion type of loop-potion effect is (potion effect):
       #do...
didn't work
 
What is your server version? QuarSk only works for 1.8 - 1.11.
1.8
[doublepost=1614461556,1614461521][/doublepost]
upload_2021-2-27_23-32-24.png



Thats what i get
 
1.8
[doublepost=1614461556,1614461521][/doublepost]View attachment 5811


Thats what i get
Well... have you tried using this instead?
code_language.skript:
command /test:
    trigger:
        set {_potions::*} to all of the active potion effects on player
        loop {_potions::*}:
            loop-value contains "speed":
                send "&aSpeed effect on you!" to player
Its need Skellett
 
Well... have you tried using this instead?
code_language.skript:
command /test:
    trigger:
        set {_potions::*} to all of the active potion effects on player
        loop {_potions::*}:
            loop-value contains "speed":
                send "&aSpeed effect on you!" to player
Its need Skellett


Thank you but can i see the tier of this potion?
 
Thank you but can i see the tier of this potion?
In Skellett i think no. But in Skript 2.5.2 can do this without addons:
code_language.skript:
        if "%player's potion effects%" contains "speed of tier 1":
            send "&aSpeed I"
        else if "%player's potion effects%" contains "speed of tier 2":
            send "&aSpeed II"
[doublepost=1614463826,1614463786][/doublepost]But as you said, your server version is 1.8 so isn't compatible with this skript version.
[doublepost=1614464048][/doublepost]Wait no... you can do this:

code_language.skript:
       set {_potions::*} to all of the active potion effects on player
        if "%{_potions::*}%" is "SPEED":
            send "&aSpeed I"
        else if "%{_potions::*}%" is "SPEED 1":
            send "&aSpeed II"
 
Status
Not open for further replies.