Skript Upgrade System

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

Ah, okay I see. I saw that they also had issues with attack damage, which is literally the only thing I can fix. I have no experience with gui's; Sorry. However, I can help with the attack damage.

Here is a way to do this (sorry about the length):

Code:
add "{AttributeModifiers: [{AttributeName:\"\"generic.attackDamage\"\",Name:\"\"generic.attackDamage\"\",Amount:%{damage}%,Operation:0,UUIDLeast:324464,UUIDMost:154531,Slot:\"\"mainhand\"\"}]}" to nbt of player's tool
(Not able to test rn so no guarantee of working)

What I would recommend doing (just in case you don't want to edit the entire skript) is put the variables into a command. For example:

Code:
command /damage [<number>]:
    trigger:
        if arg-1 is set:
            set {damage} to arg-1
        else:
            send "&cMake sure to add a number after the command to set the value!"
Also I tried using the attribute modifier and it didn't work and says it can't understand condition/effect
 
@steve0525 do you want it to just give the player a tool that has more attack and speed or say like they do it on a stone sword so they get a iron sword
 
Also I tried using the attribute modifier and it didn't work and says it can't understand condition/effect
Actually, maybe I'm just stupid. Scrap the attribute modifier, just try this:

Code:
set damage to (integer here)

Or you could combine it with the previous model:

Code:
set damage to {damage}

command /damage <number>:
    trigger:
        if arg-1 is set:
            set {damage} to arg-1

Hopefully this is self-explanatory.
Make sure to clarify the item and all of that. There are several ways for you to do this.
 
Actually, maybe I'm just stupid. Scrap the attribute modifier, just try this:

Code:
set damage to (integer here)

Or you could combine it with the previous model:

Code:
set damage to {damage}

command /damage <number>:
    trigger:
        if arg-1 is set:
            set {damage} to arg-1

Hopefully this is self-explanatory.
in this code you dont need if arg-1 is set as the number argument is REQUIRED
 
hm would the permission message do that tho
Well that would be a permission message, aka if the player doesn't have the right permission. The else: would be called if the person forgot to put an argument, not if they didn't have a permission.
 
Well that would be a permission message, aka if the player doesn't have the right permission. The else: would be called if the person forgot to put an argument, not if they didn't have a permission.
sry i meant the usage:
 
All I have is a gui don't know how to do it other than /ie but that wont work with regular players
Code:
variables:
 {frame} = gray stained glass pane
 {bars} = iron bars

command /upgrade:
    permission: smithing.upgradegui
    permission message: &cYou Can't Do this!
    cooldown: 3 seconds
    cooldown message: &cKill yourself! :)
    trigger:
        set metadata tag "upgradeGUI" of player to chest inventory with 3 rows named "Upgrade"
        set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 10 and 16 and 17 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 and 27 of metadata tag "upgradeGUI" of player to {frame} named "&f"
        set slot 11 and 12 and 14 and 15 of metadata tag "upgradeGUI" of player to {bars} named "&f"
        set slot 13 of metadata tag "upgradeGUI" of player to anvil named "&FUpgrade?"
        set slot 18 of metadata tag "upgradeGUI" of player to barrier named "&f"
        open (metadata tag "upgradeGUI" of player) to player
       
on inventory click:
    if name of event-inventory contains "upgrade":
        cancel event
also, just saying, instead of puting "set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 10 and 16 and 17 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 and 27 of metadata tag "upgradeGUI" of player to {frame} named "&f"", u can just do "set slot 0,1,2,3,4,5,6 etc.. to {frame}"
 
DONE!
Code:
command /upgrade:
    permission: smithing.upgradegui
    permission message: &cYou Can't Do this!
    cooldown: 3 seconds
    cooldown message: &cKill yourself! :)
    executable by: players
    trigger:
        add 0.6 to {level.of.attack.%player's uuid%}

on damage:
    add {level.of.attack.%attacker's uuid%} to the damage

on join:
    if {level.of.attack.%player's uuid%} is not set:
        set {level.of.attack.%player's uuid%} to 0