So i have FINALLY figured out how to do this upgrading system thing like finally god XD.
But now here is the thing with this.
Could this be made in easier and shorter code?
Best regards, WiebeHero.
Code:
But now here is the thing with this.
Could this be made in easier and shorter code?
Best regards, WiebeHero.
Code:
Code:
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 0 / 2":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 1 / 2"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 1 / 2":
cancel the event
set cursor of player to air
remove clicked item from player's inventory
give player a unbreakable glowing stone hoe with nbt "{AttributeModifiers:[{AttributeName:""generic.attackDamage"",Name:""generic.attackDamage"",Amount:10.0,Operation:0,UUIDLeast:324464,UUIDMost:154531,Slot:""mainhand""},{AttributeName:""generic.attackSpeed"",Name:""generic.attackSpeed"",Amount:-3.6,Operation:0,UUIDLeast:8055,UUIDMost:772149,Slot:""mainhand""}]}" named "&7Stone Club [Lv 2]" with lore "&7Confusion II||&7---------------------||&7Attack Damage: 10||&7Attack Speed: 0.4||&7---------------------||&7Upgrade Progress: 0 / 4||&7Rarity: Common"
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 0 / 4":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 1 / 4"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 1 / 4":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 2 / 4"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 2 / 4":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 3 / 4"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 3 / 4":
cancel the event
set cursor of player to air
remove clicked item from player's inventory
give player a unbreakable glowing stone hoe with nbt "{AttributeModifiers:[{AttributeName:""generic.attackDamage"",Name:""generic.attackDamage"",Amount:8.5,Operation:0,UUIDLeast:324464,UUIDMost:154531,Slot:""mainhand""},{AttributeName:""generic.attackSpeed"",Name:""generic.attackSpeed"",Amount:-3.4,Operation:0,UUIDLeast:8055,UUIDMost:772149,Slot:""mainhand""}]}" named "&7Stone Club [Lv 3]" with lore "&7Confusion III||&7---------------------||&7Attack Damage: 8.5||&7Attack Speed: 0.6||&7---------------------||&7Upgrade Progress: 0 / 10||&7Rarity: Common"
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 0 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 1 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 1 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 2 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 2 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 3 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 3 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 4 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 4 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 5 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 5 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 6 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 6 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 7 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 7 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 8 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 8 / 10":
cancel the event
set the 6th line of lore of clicked item to "&7Upgrade Progress: 9 / 10"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 9 / 10":
cancel the event
set cursor of player to air
remove clicked item from player's inventory
give player a unbreakable glowing stone hoe with nbt "{AttributeModifiers:[{AttributeName:""generic.attackDamage"",Name:""generic.attackDamage"",Amount:10,Operation:0,UUIDLeast:324464,UUIDMost:154531,Slot:""mainhand""},{AttributeName:""generic.attackSpeed"",Name:""generic.attackSpeed"",Amount:-3.4,Operation:0,UUIDLeast:8055,UUIDMost:772149,Slot:""mainhand""}]}" named "&7Stone Club [Lv 4]" with lore "&7Confusion IV||&7Blast I||&7---------------------||&7Attack Damage: 10||&7Attack Speed: 0.6||&7---------------------||&7Upgrade Progress: 0 / 20||&7Rarity: Common"
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 0 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 1 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 1 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 2 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 2 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 3 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 3 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 4 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 4 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 5 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 5 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 6 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 6 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 7 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 7 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 8 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 8 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 9 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 9 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 10 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 10 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 11 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 11 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 12 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 12 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 13 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 13 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 14 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 14 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 15 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 15 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 16 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 16 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 17 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 17 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 18 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 18 / 20":
cancel the event
set the 7th line of lore of clicked item to "&7Upgrade Progress: 19 / 20"
set cursor of player to air
on inventory click:
if cursor slot of player is stone hoe:
if lore of cursor slot of player contains "&7Upgrade Progress: 0 / 2":
if lore of clicked item contains "&7Upgrade Progress: 19 / 20":
cancel the event
set cursor of player to air
remove clicked item from player's inventory
give player a unbreakable glowing stone hoe with nbt "{AttributeModifiers:[{AttributeName:""generic.attackDamage"",Name:""generic.attackDamage"",Amount:12,Operation:0,UUIDLeast:324464,UUIDMost:154531,Slot:""mainhand""},{AttributeName:""generic.attackSpeed"",Name:""generic.attackSpeed"",Amount:-3.4,Operation:0,UUIDLeast:8055,UUIDMost:772149,Slot:""mainhand""}]}" named "&7Stone Club [Lv 5]" with lore "&7Confusion IV||&7Blast II||&7---------------------||&7Attack Damage: 12||&7Attack Speed: 0.6||&7---------------------||&7Upgrade Progress: 0 / 50||&7Rarity: Common"