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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Random Effect each time a golden apple is eaten

Discussion in 'Requests' started by PotteryTNT, Feb 10, 2020.

  1. PotteryTNT

    PotteryTNT Member

    Jul 21, 2017
    Likes Received:
    Category: UHC

    Suggested name: Gapple Roulette

    Spigot/Skript Version: Spigot 1.8.8, Skript 2.2

    What I want:
    A skript that makes it so each time you eat a golden apple, it gives you a random effect with the regeneration still coming though. It could be for example the wither effect + the 4 seconds of regen 2 and 2min absorption.
    It can give you ANY effect in the game, no exceptions.

    Ideas for commands:
    /gappleroulette on/off
    Ideas for permissions:
    When I'd like it by: A week.
  2. JaydenBee

    JaydenBee Member

    Nov 11, 2019
    Likes Received:
    not possible with skript yet as bensku is very slow
  3. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Jan 26, 2017
    Likes Received:
    Why should this not be possible? Maybe 1 or 2 effects might not work didnt check but why should it not work.
    --- Double Post Merged, Mar 5, 2020, Original Post Date: Mar 5, 2020 ---

    Code (Text):
    2. on consume of notch apple:
    3.     set {_effects::*} to all potions
    4.     set {_amount} to 1 #set {_amount} to random integer between 1 and 3
    5.     loop {_amount} times:
    6.         set {_tier} to a random integer from 1 to 5
    7.         set {_time} to random integer from 1 to 120 #seconds
    8.         set {_time} to "%{_time}% seconds" parsed as a time span
    9.         set {_potion} to a random element out of {_effects::*}
    10.         apply potion of {_potion} potion of tier {_tier} to player for {_time}

Share This Page