1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved GUI acting weird issue.

Discussion in 'Skript' started by FallingCatus, Jun 30, 2017.

Thread Status:
Not open for further replies.
  1. FallingCatus

    FallingCatus Member

    Joined:
    Jun 29, 2017
    Messages:
    38
    Likes Received:
    0
    Hey all, New to skript so I am probably missing something obvious but i have built a punish gui the links to other pages and that all works fine but when myself or staff click items in our inventory it affects the gui and from time to time the items from the gui end up in staff inventories. You can see what i mean in the picture can someone point out the problem in the skript? would be very helpful.

    Picture: http://imgur.com/a/vFIDa (would not show on thread for some reason, sorry)

    Code (Skript):
    1. command /ban [<offline player>] [<text>]:
    2.     permission: smpban.use
    3.     permission message: &c&lSMP&f&lAdmin &8> &aNice try! &7Only our staff have this permission.
    4.  
    5.     trigger:
    6.         wait 2 ticks
    7.         if arg-1 is not set:
    8.             send "&c&lSMP&f&lAdmin &8> &6Command &7<player>"
    9.         if arg-1 is set:
    10.             open chest with 3 rows named "&c&lSMP&f&lAdmin&7&l: &r&a%arg-1%" to player
    11.             wait 1 tick
    12.             format slot 11 of player with yellow glass pane named "&e&lTemp Ban: &7%arg-1%" with lore "" to close then run [execute player command "/skript:smpadmintempban %arg-1%"]
    13.             format slot 15 of player with red glass pane named "&c&lPerm Ban: &7%arg-1%" with lore " " to close then run [execute player command "/skript:smpadminban %arg-1%"]
    14.  
    15. command /smpadminban [<offline player>] [<text>]:
    16.     permission: smpban.use
    17.     permission message: &c&lSMP&f&lAdmin &8> &aNice try! &7Only our staff have this permission.
    18.     trigger:
    19.         wait 2 ticks
    20.         if arg-1 is not set:
    21.             send "&c&lSMP&f&lAdmin &8> &6/ban &7<player>"
    22.         if arg-1 is set:
    23.             open chest with 3 rows named "&c&lSMP&f&lAdmin &c&lPerm: &r&a%arg-1%" to player
    24.             wait 2 tick
    25.             format slot 9 of player with iron sword named "&aPvP/Kill Aura Hacks" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% PvP/Kill Aura Hacks"]
    26.             format slot 10 of player with feather named "&aFly/Speed/Water Hacking" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% Fly/Speed/Water Hacking"]
    27.             format slot 11 of player with diamond named "&aX-Ray" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% X-Ray"]
    28.             format slot 12 of player with compass named "&aAdvertising" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% Advertising"]
    29.             format slot 13 of player with creeper head named "&aStaff Impersonation/Disrespect" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% Staff Impersonation/Disrespect"]
    30.             format slot 14 of player with book named "&aSpam/Racism/Harassment/Sexism/Threats/KYS" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% Spam/Racism/Harassment/Sexism/Threats/KYS"]
    31.             format slot 15 of player with tnt named "&aGriefing" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% Griefing"]
    32.             format slot 16 of player with ender chest named "&aExploiting &7(Please remove items/money)" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% Exploiting"]
    33.             format slot 17 of player with cobweb named "&aOther/Unspecified" with lore "" to close then run [make player execute command "/advancedban:ban %arg-1% Other/Unspecified"]
    34.  
    35. command /smpadmintempban [<offline player>] [<text>]:
    36.     permission: smpban.use
    37.     permission message: &c&lSMP&f&lAdmin &8> &aNice try! &7Only our staff have this permission.
    38.     trigger:
    39.         wait 2 tick
    40.         if arg-1 is not set:
    41.             send "&c&lSMP&f&lAdmin &r&8> &6/tempban &7<player>"
    42.         if arg-1 is set:
    43.             open chest with 5 rows named "&c&lSMP&f&lAdmin &6&lTemp: &r&a%arg-1%" to player
    44.             wait 1 tick
    45.             format slot 9 of player with iron sword named "&aPvP/Kill Aura Hacks &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d PvP/Kill Aura Hacks"]
    46.             format slot 10 of player with feather named "&aFly/Speed/Water Hacking &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d Fly/Speed/Water Hacking"]
    47.             format slot 11 of player with diamond named "&aX-Ray &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d X-Ray"]
    48.             format slot 12 of player with compass named "&aAdvertising &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d Advertising"]
    49.             format slot 13 of player with creeper head named "&aStaff Impersonation/Disrespect &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d Staff Impersonation/Disrespect"]
    50.             format slot 14 of player with book named "&aSpam/Racism/Harassment/Sexism/Threats/KYS &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d Spam/Racism/Harassment/Sexism/Threats/KYS"]
    51.             format slot 15 of player with tnt named "&aGriefing &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d Griefing"]
    52.             format slot 16 of player with ender chest named "&aExploiting  &67d &7(Please remove items/money)" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d Exploiting"]
    53.             format slot 17 of player with cobweb named "&aOther/Unspecified &67d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 7d Other/Unspecified"]
    54.             format slot 27 of player with iron sword named "&aPvP/Kill Aura Hacks &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d PvP/Kill Aura Hacks"]
    55.             format slot 28 of player with feather named "&aFly/Speed/Water Hacking &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d Fly/Speed/Water Hacking"]
    56.             format slot 29 of player with diamond named "&aX-Ray &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d X-Ray"]
    57.             format slot 30 of player with compass named "&aAdvertising &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d Advertising"]
    58.             format slot 31 of player with creeper head named "&aStaff Impersonation/Disrespect &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d Staff Impersonation/Disrespect"]
    59.             format slot 32 of player with book named "&aSpam/Racism/Harassment/Sexism/Threats/KYS &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d Spam/Racism/Harassment/Sexism/Threats/KYS"]
    60.             format slot 33 of player with tnt named "&aGriefing &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d Griefing"]
    61.             format slot 34 of player with ender chest named "&aExploiting &614d &7(Please remove items/money)" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d Exploiting"]
    62.             format slot 35 of player with cobweb named "&aOther/Unspecified &614d" with lore "" to close then run [make player execute command "/advancedban:tempban %arg-1% 14d Other/Unspecified"]


     
  2. Best Answer:
    Post #4 by ShaneBee, Jun 30, 2017
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    Instead of "slot whatever of player" try "slot whatever of player's current inventory"

    In general though, format slot isn't very reliable and you should use tuske GUIs or set slot + on inventory click
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    Thanks for the reply Donut, sadly that did not work and just returned errors as for "Tuske" i will look into it, I am very new to this and i am just working from what i learn through old videos on Youtube as their does not seem to be anything new teaching this.
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    • Informative Informative x 1
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    Thanks for pointing me to this, I have started converting to this new format, much faster to type and fixed the issue, I am new to this so tips like this helps alot, Thank you!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...