Jump to content

tuske GUI running skript when you press the item


Nd_

Recommended Posts

Code:

on right click:
      if player is holding a nether star named "&5Potion Menu" with lore "&5Get your potions":
            player is in world "ul_KitPVP":
                  open virtual chest inventory with size 1 named "&5Potions" to player
                  format gui slot 1 of player with splash potion of harming named "Splash Potion Of Harming" with lore "&5You have: %{%player's uuid%.splashpotionofharming}% Splash Potions Of Harming" to run :
      if {%player's uuid%.splashpotionofharming} is less than 1:
            message "&4You don't have any Splash Potions Of Harming"
      else:
            give a splash potion of harming to the player
            subtract 1 from {%player's uuid%.splashpotionofharming}
            close player's inventory
                

Errors:

image.png.a71abdc11c93c8a5aed7cb626cf80d29.png

Link to comment
Share on other sites

3 hours ago, Nd_ said:

Code:


on right click:
      if player is holding a nether star named "&5Potion Menu" with lore "&5Get your potions":
            player is in world "ul_KitPVP":
                  open virtual chest inventory with size 1 named "&5Potions" to player
                  format gui slot 1 of player with splash potion of harming named "Splash Potion Of Harming" with lore "&5You have: %{%player's uuid%.splashpotionofharming}% Splash Potions Of Harming" to run :
      if {%player's uuid%.splashpotionofharming} is less than 1:
            message "&4You don't have any Splash Potions Of Harming"
      else:
            give a splash potion of harming to the player
            subtract 1 from {%player's uuid%.splashpotionofharming}
            close player's inventory
                

Errors:

image.png.a71abdc11c93c8a5aed7cb626cf80d29.png

it is like this:
format gui slot 1 of player with any item named "name" with lore  "item lore" to run:
    *your code here. After 4 spaces*

command /giveinfo:
    trigger:
        send "--------------------------------------------"
        send "IGN:
crazymarty"
        send "I am a
decent skripter."                                     
        send "Discord: 
crazymarty#1802"
        send "--------------------------------------------"

Link to comment
Share on other sites

  • 8 months later...
on right click:
      if player is holding a nether star named "&5Potion Menu" with lore "&5Get your potions":
            player is in world "ul_KitPVP":
                  open virtual chest inventory with size 1 named "&5Potions" to player
                  format gui slot 1 of player with splash potion of harming named "Splash Potion Of Harming" with lore "&5You have: %{%player's uuid%.splashpotionofharming}% Splash Potions Of Harming" to run :
                      if {%player's uuid%.splashpotionofharming} is less than 1:
                          message "&4You don't have any Splash Potions Of Harming"
                      else:
                          give a splash potion of harming to the player
                          subtract 1 from {%player's uuid%.splashpotionofharming}
                          close player's inventory
                               

Edited by server5484
Link to comment
Share on other sites

  • zKoro locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...