potion of swiftness 2 name

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

    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!

eiez

New Member
Aug 11, 2024
9
0
1
Hello i need to remove speed potion 2 using skript

every 1 tick:
loop all players:
loop all items in loop-player's inventory:
if loop-item is a potion of swiftness:
remove loop-item from loop-player's inventory

this is my skript but it only removes the normal one (which i want to keep) what is potion of swiftness 2 called and if its not possible how can i make it check the stats off the potion and thatway make it work
 
Hello!
In Skript, there are two types of potions (besides the effect). First is a regular potion, a level 1 potion, which can be called with
code_language.skript:
(normal) potion of %potioneffecttype%
The other type is a level 2 potion, which can be called with
code_language.skript:
potion of (strong|upgraded|level 2) %potioneffecttype%
Here is the changed version of your code that should work:

code_language.skript:
every 1 tick:
    loop all players:
        loop all items in loop-player's inventory:
            if loop-item is a potion of strong swiftness:
                remove loop-item from loop-player's inventory
 
Hello!
In Skript, there are two types of potions (besides the effect). First is a regular potion, a level 1 potion, which can be called with
code_language.skript:
(normal) potion of %potioneffecttype%
The other type is a level 2 potion, which can be called with
code_language.skript:
potion of (strong|upgraded|level 2) %potioneffecttype%
Here is the changed version of your code that should work:

code_language.skript:
every 1 tick:
    loop all players:
        loop all items in loop-player's inventory:
            if loop-item is a potion of strong swiftness:
                remove loop-item from loop-player's inventory
Thank you so much ur a life saver
 
Hello!
In Skript, there are two types of potions (besides the effect). First is a regular potion, a level 1 potion, which can be called with
code_language.skript:
(normal) potion of %potioneffecttype%
The other type is a level 2 potion, which can be called with
code_language.skript:
potion of (strong|upgraded|level 2) %potioneffecttype%
Here is the changed version of your code that should work:

code_language.skript:
every 1 tick:
    loop all players:
        loop all items in loop-player's inventory:
            if loop-item is a potion of strong swiftness:
                remove loop-item from loop-player's inventory
Hello sorry to bother but when doing this for some reason removes every other type of speed potion aswell is there anyway around this?
 
Hello sorry to bother but when doing this for some reason removes every other type of speed potion aswell is there anyway around this?

Strange. I'm not sure why. Try renaming the level 2 potion of swiftness, then doing:


code_language.skript:
every 1 tick:
    loop all players:
        loop all items in loop-player's inventory:
            if loop-item is a potion of strong swiftness named "xxx":
                remove loop-item from loop-player's inventory

This would take away any potions of swiftness named "xxx".
 
I will do that in a moment im restarting my server first as i realised every item apears to be getting removed and therefore i think its not the skripts issue i will fix it then if it still doesnt work try your updated skript thank you!
 
I will do that in a moment im restarting my server first as i realised every item apears to be getting removed and therefore i think its not the skripts issue i will fix it then if it still doesnt work try your updated skript thank you!
 
Strange. I'm not sure why. Try renaming the level 2 potion of swiftness, then doing:


code_language.skript:
every 1 tick:
    loop all players:
        loop all items in loop-player's inventory:
            if loop-item is a potion of strong swiftness named "xxx":
                remove loop-item from loop-player's inventory

This would take away any potions of swiftness named "xxx".
this does work but the main point of the skript is too remove the use of speed 2 on this smp and i cant figure out how to keep the 8 minute and normal ones while removing the speed 2