Solved (Help Needed) Potion type as variable

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

Apophis

Member
Feb 21, 2023
3
0
1
28
First post here. I haven't been able to solve this issue on my own so I figured I would come here for some help. It's seemingly something very basic, but I can't find any documentation on it anywhere.

I'm trying to use a string variable for my potion type, such as
set {_potion} to "STRENGTH"
apply {_potion} tier 1 without particles to player for 999 days

The above gives no error but I'm sure it's not working because the potion variable is a string. I do know I can simply just do "apply strength tier 1 to player" and it will work, but my script depends on a string variable being the source of the potion type. I was thinking this would work if I could somehow convert the {_potion} variable to a potion type, but that doesn't seem to exist.

Is there any way to get this to work? Thanks for your time.
 
Could you try {_potion} parsed as effect? Not sure if that works.
 
I tried that and as an item and no luck. That was my initial thought as well. If only it worked.
 
I tried that and as an item and no luck. That was my initial thought as well. If only it worked.

Does parsing as potion effect type work?
upload_2023-2-22_11-42-5.png
 
  • Like
Reactions: Apophis
Status
Not open for further replies.