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.

Solved Regen From Experience Levels

Discussion in 'Requests' started by PotteryTNT, Jan 3, 2020.

  1. PotteryTNT

    PotteryTNT Member

    Joined:
    Jul 21, 2017
    Messages:
    41
    Likes Received:
    0
    Category: UHC

    Suggested name: Level Health

    Spigot/Skript Version: PaperSpigot 1.8.8, Skript 2.2 (yes just 2.2)

    What I want:
    There is 4 different stages of health you can use experience for which are:

    Low - 5xp - 3s Regen

    Medium - 10xp - 5s Regen

    High - 15xp - 8s Regen

    Overpowered - 25xp - 12s Regen


    Infinite amount of uses as long as they have enough experience for it.


    Ideas for commands:
    /lvh on, /lvh off, /lvh toggle

    /lvh low

    /lvh medium

    /lvh high

    /lvh op


    Ideas for permissions: idk, lvh.uhc

    When I'd like it by: Possibly by next week


     
  2. Best Answer:
    Post #4 by Zabrid, Jan 6, 2020
  3. Zabrid

    Supporter

    Joined:
    Mar 2, 2019
    Messages:
    54
    Likes Received:
    1
    So if I'm currect you basically want a xp shop, and if you have a certain amout of xp you can type a command, it'll take the xp then give you regeneration? what would the /lvh on, /lvh off, and /lvh toggle do? also do you mean xp levels or points?
     
  4. PotteryTNT

    PotteryTNT Member

    Joined:
    Jul 21, 2017
    Messages:
    41
    Likes Received:
    0
    Well as it will be used for a UHC, I would need a way of enabling this so it allows all this and a way to disable it so no one can use this at all unless it is enabled. But yeah your description is correct, even if it was a GUI of some sort it could work.
     
  5. Zabrid

    Supporter

    Joined:
    Mar 2, 2019
    Messages:
    54
    Likes Received:
    1
    Code (Text):
    1.  
    2. options:
    3.     #Prefix to this skript.
    4.     prefix: &8[&c&lZABRID&8]
    5.  
    6.  
    7. on load:
    8.     if {lvh.toggle} is not set:
    9.         set {lvh.toggle} to true
    10. command /levelhealth [<text>]:
    11.     aliases: /lvh, /lvlhealth, /levelh
    12.     trigger:
    13.         if arg 1 is "toggle":
    14.             if sender has permission "lvh.admin":
    15.                 if {lvh.toggle} is true:
    16.                     set {lvh.toggle} to false
    17.                     message "{@prefix} &7Level-Health has been disabled."
    18.                 if {lvh.toggle} is false:
    19.                     set {lvh.toggle} to true
    20.                     message "{@prefix} &7Level-Health has been enabled."
    21.             else:
    22.                 message "{@prefix} &cNo Permission."
    23.         if arg 1 is "on":
    24.             if sender has permission "lvh.admin":
    25.                 set {lvh.toggle} to true
    26.                 message "{@prefix} &7Level-Health has been enabled."
    27.             else:
    28.                 message "{@prefix} &cNo Permission."
    29.         if arg 1 is "off":
    30.             if sender has permission "lvh.admin":
    31.                 set {lvh.toggle} to false
    32.                 message "{@prefix} &7Level-Health has been disabled."
    33.             else:
    34.                 message "{@prefix} &cNo Permission."
    35.         if arg 1 is "low":
    36.             if {lvh.toggle} is true:
    37.                 if player's level < 5:
    38.                     send "{@prefix} &cInsufficient xp level."
    39.                     send "{@prefix} &4(Required Level: 5)"
    40.                     stop
    41.                 else:
    42.                     remove 5 from player's level
    43.                     apply regeneration 1 to player for 3 seconds
    44.                     send "{@prefix} &7You have been given &cRegeneration 1 &7for &c3 &7seconds."
    45.                     stop
    46.             else:
    47.                 message "{@prefix} &cThis feature has been disabled."
    48.         if arg 1 is "medium":
    49.             if {lvh.toggle} is true:
    50.                 if player's level < 10:
    51.                     send "{@prefix} &cInsufficient xp level."
    52.                     send "{@prefix} &4(Required Level: 10)"
    53.                     stop
    54.                 else:
    55.                     remove 10 from player's level
    56.                     apply regeneration 1 to player for 5 seconds
    57.                     send "{@prefix} &7You have been given &cRegeneration 1 &7for &c5 &7seconds."
    58.                     stop
    59.             else:
    60.                 message "{@prefix} &cThis feature has been disabled."
    61.         if arg 1 is "high":
    62.             if {lvh.toggle} is true:
    63.                 if player's level < 15:
    64.                     send "{@prefix} &cInsufficient xp level."
    65.                     send "{@prefix} &4(Required Level: 15)"
    66.                     stop
    67.                 else:
    68.                     remove 15 from player's level
    69.                     apply regeneration 1 to player for 8 seconds
    70.                     send "{@prefix} &7You have been given &cRegeneration 1 &7for &c8 &7seconds."
    71.                     stop
    72.             else:
    73.                 message "{@prefix} &cThis feature has been disabled."
    74.         if arg 1 is "op":
    75.             if {lvh.toggle} is true:
    76.                 if player's level < 25:
    77.                     send "{@prefix} &cInsufficient xp level."
    78.                     send "{@prefix} &4(Required Level: 25)"
    79.                     stop
    80.                 else:
    81.                     remove 25 from player's level
    82.                     apply regeneration 1 to player for 12 seconds
    83.                     send "{@prefix} &7You have been given &cRegeneration 1 &7for &c12 &7seconds."
    84.                     stop
    85.             else:
    86.                 message "{@prefix} &cThis feature has been disabled."
    87.  
    I made this for 1.8 tho it should work in other versions (you may need skquery but not 100% sure

    also didn't test so lmk of any errors
    Also the Admin permission is lvh.admin (this perm allows you to turn on and off lvh)
     
    #4 Zabrid, Jan 6, 2020
    Last edited: Jan 7, 2020
  6. PotteryTNT

    PotteryTNT Member

    Joined:
    Jul 21, 2017
    Messages:
    41
    Likes Received:
    0

Share This Page

Loading...