How can i put a working gui in a gui

Discussion in 'Skript' started by RobinHdgamerpro, Jul 1, 2020 at 12:13 AM.

  1. That is my code:
    Command /Adminshop [<text>]:
    trigger:
    set {_slot} to -1
    open chest with 6 rows named "&8»&f&lAdminShop" to player
    format slot 4 of player with 384 named "&b&lDein Guthaben" with lore "&7Dein Guthaben beträgt||&8〤&e&l➛%player's balance%" to be unstealable
    format slot 19 of player with 272 named "&b&lPvP" with lore "&8〤 &7Kategorie: &ePvP||||&8〤 &7Klicke um dir &6Schwerter &7zu kaufen" to run [make player execute command "g1"]
    format slot 21 of player with 307 named "&b&lRüstung" with lore "&8〤 &7Kategorie: &eRüstung||||&8〤 &7Klicke um dir &6Rüstung &7zu kaufen" to run [make player execute command "g2"]
    format slot 23 of player with 257 named "&b&lWerkzeug" with lore "&8〤 &7Kategorie: &eWerkzeug||||&8〤 &7Klicke um dir &6Werkzeug &7zu kaufen" to be unstealable
    format slot 25 of player with 364 named "&b&lEssen" with lore "&8〤 &7Kategorie: &eEssen||||&8〤 &7Klicke um dir &6Essen &7zu kaufen" to be unstealable
    format slot 29 of player with potion named "&b&lTränke" with lore "&8〤 &7Kategorie: &eTränke||||&8〤 &7Klicke um dir &6Tränke &7zu kaufen" to be unstealable
    format slot 31 of player with book named "&b&lRänge" with lore "&8〤 &7Kategorie: &eRänge||||&8〤 &7Klicke um dir &6Ränge &7zu kaufen" to be unstealable
    format slot 33 of player with paper named "&b&lRechte" with lore "&8〤 &7Kategorie: &eRechte||||&8〤 &7Klicke um dir &6Rechte &7zu kaufen" to be unstealable
    format slot 39 of player with skull of ("MSQL" parsed as an offline player) named "&b&lKöpfe" with lore "&8〤 &7Kategorie: &eKöpfe||||&8〤 &7Klicke um dir &6Köpfe &7zu kaufen" to be unstealable
    format slot 41 of player with dragon egg named "&b&lPerks" with lore "&8〤 &7Kategorie: &ePerks||||&8〤 &7Klicke um dir &6Perks &7zu kaufen" to be unstealable


    command /g1:
    trigger:
    set {_slot} to -1
    open chest with 2 rows named "&8»&f&lPvP" to player
    format slot 4 of player with 384 named "&b&lDein Guthaben" with lore "&7Dein Guthaben beträgt:||&8〤&e&l➛%player's balance%" to be unstealable
    format slot 10 of player with wooden sword named "&8〤 &eHolzschwert" with lore "&8〤 &7Preis||||&8〤 &610 BitCoins" to run [make player execute command "fefggggggggggggddgdrg"]
    format slot 11 of player with stone sword named "&8〤 &eSteinschwert" with lore "&8〤 &7Preis||||&8〤 &630 BitCoins" to run [make player execute command "fefggggggggggggddffffffgdrg"]
    format slot 12 of player with iron sword named "&8〤 &eEisenschwert" with lore "&8〤 &7Preis||||&8〤 &6100 BitCoins" to run [make player execute command "fefggggggggggggddgdrffffffg"]
    format slot 13 of player with diamond sword named "&8〤 &eDiamantschwert" with lore "&8〤 &7Preis||||&8〤 &6200 BitCoins" to run [make player execute command "fefggggggggggggdfffffdgdrg"]
    format slot 14 of player with bow named "&8〤 &eBogen" with lore "&8〤 &7Preis||||&8〤 &670 BitCoins" to run [make player execute command "fefgggggfgggggggdfffffdgdrg"]
    format slot 15 of player with 16 arrow named "&8〤 &ePfeile" with lore "&8〤 &7Preis||||&8〤 &620 BitCoins" to run [make player execute command "fefggfefegggfgggggggdfffffdgdrg"]
    format slot 16 of player with stick named "&8〤 &eStick" with lore "&8〤 &7Preis||||&8〤 &6200 BitCoins" to run [make player execute command "stickefsfsdfaweasvrrrrs"]

    #Holzschwert
    command /fefggggggggggggddgdrg [<text>]:
    trigger:
    if player's balance is more than 9:
    remove 10 from player's balance
    message "&8[&9Shop&8] &7Du hast dir &a&lerfolgreich &7ein &e&lHolzschwert &7gekauft"
    give player wooden sword
    else:
    send "&8[&6&lBitCoins&8] &7Du hast &c&lnicht &7genügend &6&lBitCoins"
    #Stein
    command /fefggggggggggggddffffffgdrg [<text>]:
    trigger:
    if player's balance is more than 29:
    remove 30 from player's balance
    message "&8[&9Shop&8] &7Du hast dir &a&lerfolgreich &7ein &e&lSteinschwert &7gekauft"
    give player stone sword
    else:
    send "&8[&6&lBitCoins&8] &7Du hast &c&lnicht &7genügend &6&lBitCoins"
    #Eisen
    command /fefggggggggggggddgdrffffffg [<text>]:
    trigger:
    if player's balance is more than 99:
    remove 100 from player's balance
    message "&8[&9Shop&8] &7Du hast dir &a&lerfolgreich &7ein &e&lEisenschwert &7gekauft"
    give player iron sword
    else:
    send "&8[&6&lBitCoins&8] &7Du hast &c&lnicht &7genügend &6&lBitCoins"
    #Dia
    command /fefggggggggggggdfffffdgdrg [<text>]:
    trigger:
    if player's balance is more than 199:
    remove 200 from player's balance
    message "&8[&9Shop&8] &7Du hast dir &a&lerfolgreich &7ein &e&lDiamantschwert &7gekauft"
    give player diamond sword
    else:
    send "&8[&6&lBitCoins&8] &7Du hast &c&lnicht &7genügend &6&lBitCoins"
    #Bogen
    command /fefgggggfgggggggdfffffdgdrg [<text>]:
    trigger:
    if player's balance is more than 69:
    remove 70 from player's balance
    message "&8[&9Shop&8] &7Du hast dir &a&lerfolgreich &7einen &e&lBogen &7gekauft"
    give player bow
    else:
    send "&8[&6&lBitCoins&8] &7Du hast &c&lnicht &7genügend &6&lBitCoins"
    #Pfeile
    command /fefggfefegggfgggggggdfffffdgdrg [<text>]:
    trigger:
    if player's balance is more than 19:
    remove 20 from player's balance
    message "&8[&9Shop&8] &7Du hast dir &a&lerfolgreich &e&lPfeile &7gekauft"
    give player 16 arrow
    else:
    send "&8[&6&lBitCoins&8] &7Du hast &c&lnicht &7genügend &6&lBitCoins"
    command /stickefsfsdfaweasvrrrrs [<text>]:
    trigger:
    if player's balance is more than 199:
    remove 200 from player's balance
    message "&8[&9Shop&8] &7Du hast dir &a&lerfolgreich einen &e&lStick &7gekauft"
    give player stick
    else:
    send "&8[&6&lBitCoins&8] &7Du hast &c&lnicht &7genügend &6&lBitCoins"

    I can put the items out of the GUI but why i dont want that :(
    btw my skript is for 1.8 and i have SkRayfall,Tuske, SkQuery
     
  2. don't use format slot, it's really buggy. use vanilla guis instead. your commands do not seem easy to type, maybe don't use commands at all? functions may help here.
     
  3. can u make a example line im to dumb
     
  4. The problem is very simple, you have to delay it when opening a chest
    No its necessario put "set {_slot} to 0
    Code (Text):
    command /g1:
    trigger:
      wait 3 ticks
      open chest with 2 rows named "&8»&f&lPvP" to player
      format slot 4 of player with 384 named "&b&lDein Guthaben" with lore "&7Dein Guthaben beträgt:||&8〤&e&l➛%player's balance%" to be unstealable
     
  5. you don't have to delay it if using vanilla guis