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!

steve0525

New Member
Sep 4, 2023
7
0
1
24
So i'm trying to make a way to upgrade your sword or other equipment by using an item and add attack dmg to the item I have item edit installed and also vault installed. I made a gui but can't figure out how to add the item so that you can upgrade and also add attack dmg to the sword any help? I will install any skript plugin if needed btw
 
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
 
If you are talking about the command, you clearly have a permission and permission message. If this is not your concern, please elaborate.

...Nevermind, I'm blind. If you want to add attack damage, your best bet would to be editing attributes with the sword.
 
Last edited:
If you are talking about the command, you clearly have a permission and permission message. If this is not your concern, please elaborate.
? wdym also you dont need to do anything as i am working to help this dude cause im just editing his script
 
? wdym also you dont need to do anything as i am working to help this dude cause im just editing his script
Maybe so, but does that mean I am not allowed to help? Also at least explain how to do it. Don't spoonfeed.
 
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
are you ok if i remove the gui and replace it?
 
make it so when you do a command it opens a gui and then when you press a certain item in that gui it upgrades the players tool
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!"
 
Last edited: