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 our 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 Problem with players inventories

Discussion in 'Skript' started by couger44, Apr 16, 2019.

  1. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    219
    Likes Received:
    7
    Hello,
    A problem has recently arisen in my server, you will ask "Why do you publish it here?", Well the thing is that almost 80% of my server is based on skripts created by me, well the problem is the following: When a player receives items in the hotbar, he can use them as he wants, no ?. But the problem is when they try to change the inventory items to those of the hotbar, they are returned to where they were. For example, if slot 1 of my inventory has a diamond sword, and in my inventory a stack of cobblestone blocks, when I try to put the cobblestone blocks in slot n ° 1, these are returned to the diamond sword , and the only way to "" solve "" this is to exit and enter the server, which is quite annoying.
     
  2. BaeFell

    BaeFell I'm Poppy
    Admin

    Joined:
    Nov 27, 2016
    Messages:
    412
    Likes Received:
    213
    Have you got any code to show what you're doing? Also, versions of Skript and your server would help.
     
  3. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    907
    Likes Received:
    54
    Medals:
    You could try to see if any of your scripts caused it by disabling them all, or disabling some plugins which could cause that.
     
  4. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    219
    Likes Received:
    7
    Spigot 1.8.8
    Skript dev-36
    So, now i gonna show part of the codes that contains inventories code.

    1. Coins of my server "WorldCoins":

    Code (Skript):
    1.  
    2. command /worldcoins [<text>]:
    3.     trigger:
    4.         arg 1 is not set:
    5.             set {_int} to 27
    6.             open chest with 5 rows named "&e&lWorldCoins" to player
    7.             wait 1 tick
    8.             set slot 10 of player's current inventory to iron ingot named "&eCompra el rango &a[VIP]&e por 500 WorldCoins!" # with lore "&eSi tienes &a500&e WorldCoins puedes comprar el rango &a[VIP]&e ahora mismo!"
    9.             set slot 16 of player's current inventory to diamond chestplate named "&eCompra el &6LEGENDARIO&f &8&l&kii&b&lWorldSet&8&l&kii&e por 150 WorldCoins!"
    10.             set slot 20 of player's current inventory to gold ingot named "&eCompra el rango &a[VIP&6+&a]&e por 1500 WorldCoins!"
    11.             set slot 40 of player's current inventory to chest named "&cCerrar inventario."
    12.             set slot 41 of player's current inventory to emerald named "&eWorldCoins actuales: &a%{worldcoins.%player%}%"
    13.            
    14.         arg 1 is "vip":
    15.             if {worldcoins.%player%} >= 500:
    16.                 send "&bFelicidades!"
    17.                 send "&bCompraste el rango &a[VIP]&b!"
    18.                 execute console command "pex user %player% group set vip"
    19.                 remove 500 from {worldcoins.%player%}
    20.             else:
    21.                 send "&cNo tienes WorldCoins suficientes para comprar el rango &a[VIP]"
    22.                 send "&f"
    23.                 send "&cVe a la tienda para comprar WorldCoins: http://tienda-worldcraft.buycraft.net/category/1296449"
    24.                 stop
    25.            
    26.         arg 1 is "vip+":
    27.             if {worldcoins.%player%} >= 1500:
    28.                 send "&bFelicidades!"
    29.                 send "&bCompraste el rango &a[VIP&6+&a]&b!"
    30.                 execute console command "pex user %player% group set vip+"
    31.                 remove 1500 from {worldcoins.%player%}
    32.             else:
    33.                 send "&cNo tienes WorldCoins suficientes para comprar el rango &a[VIP&6+&a]"
    34.                 send "&f"
    35.                 send "&cVe a la tienda para comprar WorldCoins: http://tienda-worldcraft.buycraft.net/category/1296449"
    36.                 stop
    37.         arg 1 is "worldset":
    38.             if {worldcoins.%player%} >= 150:
    39.                 send "&bFelicidades!"
    40.                 send "&bCompraste el &8&l&ki&b&lWorldSet&8&l&kii&b!"
    41.                 remove 150 from {worldcoins.%player%}
    42.                 add 1 diamond helmet of protection 80, unbreaking 100 named "&8&l&kii&b&lWorldSet&8&l&kii" to player
    43.                 wait 4 ticks
    44.                 add 1 diamond chestplate of protection 80, unbreaking 100 named "&8&l&kii&b&lWorldSet&8&l&kii" to player
    45.                 wait 4 ticks
    46.                 add 1 diamond leggings of protection 80, unbreaking 100 named "&8&l&kii&b&lWorldSet&8&l&kii" to player
    47.                 wait 4 ticks
    48.                 add 1 diamond boots of protection 80, unbreaking 100 named "&8&l&kii&b&lWorldSet&8&l&kii" to player
    49.                 wait 4 ticks
    50.                 add 1 diamond sword of sharpness 20, unbreaking 50, looting 10 named "&8&l&kii&b&lWorldSet&8&l&kii" to player
    51.                 wait 4 ticks
    52.                 add 1 diamond pickaxe of efficiency 200, unbreaking 800, fortune 80 named "&8&l&kii&b&lWorldSet&8&l&kii" to player
    53.             else:
    54.                 send "&cNo tienes WorldCoins suficientes para comprar el &8&l&kii&b&lWorldSet&8&l&kii"
    55.                 send "&f"
    56.                 send "&cVe a la tienda para comprar WorldCoins: http://tienda-worldcraft.buycraft.net/category/1296449"
    57.                 stop
    58.    
    59. on inventory click:
    60.     clicked inventory isn't player's inventory
    61.     if inventory name of player's current inventory is "&e&lWorldCoins":
    62.         if clicked slot is 10:
    63.             close inventory of player
    64.             execute player command "worldcoins vip"
    65.             stop
    66.         else if clicked slot is 16:
    67.             close inventory of player
    68.             execute player command "worldcoins worldset"
    69.             stop
    70.         else if clicked slot is 20:
    71.             close inventory of player
    72.             execute player command "worldcoins vip+"
    73.             stop
    74.         else if clicked slot is 40:
    75.             close inventory of player
    76.             stop
    77.         else if clicked slot is 41:
    78.             close inventory of player
    79.             wait 5 ticks
    80.             execute player command "worldcoins"
    81.             stop
    82.  
    2. A uncompleted sistem of level in skript.
    Code (Skript):
    1.  
    2. on command "premios":
    3.     cancel event
    4.     sender != player:
    5.         send "Comando ejecutable por jugadores." to console
    6.     sender = player:
    7.         open chest with 6 rows named "&e&lPremios por tus WorldEXP!" to player
    8.         wait a tick
    9.    
    10.         set {_cofre.10} to chest named "&6Requiere WorldLevel 2!"
    11.         set line 2 of lore of {_cofre.10} to "&3+10.000 de dinero."
    12.         set line 4 of lore of {_cofre.10} to "&310 de WorldEXP para llegar a este nivel."
    13.         set slot 0 of player's current inventory to {_cofre.10}
    14.    
    15.         set {_cofre.20} to chest named "&6Requiere WorldLevel 3!"
    16.         set line 2 of lore of {_cofre.20} to "&3+20.000 de dinero."
    17.         set line 4 of lore of {_cofre.20} to "&320 de WorldEXP para llegar a este nivel."
    18.         set slot 1 of player's current inventory to {_cofre.20}
    19.    
    20.         set {_cofre.30} to chest named "&6Requiere WorldLevel 4!"
    21.         set line 2 of lore of {_cofre.30} to "&3Booster X2 de una hora."
    22.         set line 4 of lore of {_cofre.30} to "&330 de WorldEXP para llegar a este nivel."
    23.         set slot 2 of player's current inventory to {_cofre.30}
    24.    
    25.         set {_cofre.40} to chest named "&6Requiere WorldLevel 5!"
    26.         set line 2 of lore of {_cofre.40} to "&3+50.000 de dinero."
    27.         set line 4 of lore of {_cofre.40} to "&340 de WorldEXP para llegar a este nivel."
    28.         set slot 3 of player's current inventory to {_cofre.40}
    29.    
    30.         set {_cofre.70} to chest named "&6Requiere WorldLevel 6!"
    31.         set line 2 of lore of {_cofre.70} to "&3+70.000 de dinero."
    32.         set line 4 of lore of {_cofre.70} to "&370 de WorldEXP para llegar a este nivel."
    33.         set slot 4 of player's current inventory to {_cofre.70}
    34.    
    35.         set {_cofre.100} to chest named "&6Requiere WorldLevel 7!"
    36.         set line 2 of lore of {_cofre.100} to "&3+70.000 de dinero."
    37.         set line 4 of lore of {_cofre.100} to "&3100 de WorldEXP para llegar a este nivel."
    38.         set slot 5 of player's current inventory to {_cofre.100}
    39.    
    40.         set {_cofre.120} to chest named "&6Requiere WorldLevel 8!"
    41.         set line 2 of lore of {_cofre.120} to "&3+100.000 de dinero."
    42.         set line 4 of lore of {_cofre.120} to "&3120 de WorldEXP para llegar a este nivel."
    43.         set slot 6 of player's current inventory to {_cofre.120}
    44.    
    45.         set {_cofre.200} to chest named "&6Requiere WorldLevel 9!"
    46.         set line 2 of lore of {_cofre.200} to "&3+120.000 de dinero."
    47.         set line 4 of lore of {_cofre.200} to "&3200 de WorldEXP para llegar a este nivel."
    48.         set slot 7 of player's current inventory to {_cofre.200}
    49.    
    50.         set {_cofre.250} to chest named "&6Requiere WorldLevel 10!"
    51.         set line 2 of lore of {_chest.250} to "&3A los rangos &a[VIP&6+&a]&3 se les dará el &c+&3"
    52.         set line 3 of lore of {_cofre.250} to "&3para su rango."
    53.         set line 5 of lore of {_cofre.250} to "&3250 de WorldEXP para llegar a este nivel."
    54.         set slot 8 of player's current inventory to {_cofre.250}
    55.  
    3. A uncompleted skript kit from my server.
    Code (Skript):
    1.  
    2. command /kit [<text>]:
    3.     trigger:
    4.         arg 1 is not set:
    5.             open chest with 6 rows named "&2&lClases" to player
    6.             set {_c} to "&eClickea aquí para tomar este kit!"
    7.             wait a tick
    8.             set slot 10 of player's current inventory to coal block named "&fKit &8[USER]"
    9.             set slot 19 of player's current inventory to gray stained glass pane named "%{_c}%"
    10.             set slot 11 of player's current inventory to lapis block named "&fKit &7[Nov&8ato]"
    11.             set slot 20 of player's current inventory to blue stained glass pane named "%{_c}%"
    12.             set slot 12 of player's current inventory to redstone block named "&fKit &8[Profe&3sional]"
    13.             set slot 21 of player's current inventory to red stained glass pane named "%{_c}%"
    14.             set slot 13 of player's current inventory to iron block named "&fKit &6[Experto]"
    15.             set slot 22 of player's current inventory to white stained glass pane named "%{_c}%"
    16.             set slot 14 of player's current inventory to gold block named "&fKit &9[Ci&fvil]"
    17.             set slot 23 of player's current inventory to yellow stained glass pane named "%{_c}%"
    18.        
    19.         arg 1 is "user":
    20.             if {kitcd.user.%player%} is true:
    21.                 wait 3 ticks
    22.                 add 1 leather helmet of protection 1 named "&8[USER]" to player
    23.                 wait 3 ticks
    24.                 add 1 leather chestplate of protection 1 named "&8[USER]" to player
    25.                 wait 3 ticks
    26.                 add 1 leather leggings of protection 1 named "&8[USER]" to player
    27.                 wait 3 ticks
    28.                 add 1 leather boots of protection 1 named "&8[USER]" to player
    29.                 wait 3 ticks
    30.                 add 1 wooden sword named "&8[USER]" to player
    31.                 wait 3 ticks
    32.                 add 1 stone pickaxe of efficiency 5, unbreaking 3 named "&8[USER]" to player
    33.                 wait 3 ticks
    34.                 add 1 stone axe of efficiency 5 named "&8[USER]" to player
    35.                 wait 3 ticks
    36.                 add 1 stone shovel of efficiency 5 named "&8[USER]" to player
    37.                 wait 3 ticks
    38.                 add 30 cooked porkchop named "&8[USER]" to player
    39.                 wait 3 ticks
    40.                 add 8 oak wood named "&8[USER]" to player
    41.                 wait 3 ticks
    42.                 send "&2&lWorldCraft &7Recibiste el kit &8[USER]"
    43.                 set {kitcd.user.%player%} to false
    44.                 wait 5 minutes
    45.                 set {kitcd.user.%player%} to true
    46.                 send "&2&lWorldCraft &7Ahora puedes volver a elegir el kit &8[USER]"
    47.                 stop
    48.             else if {kitcd.user.%player%} is false:
    49.                 send "&2&lWorldCraft &7Para tomar de nuevo este kit, debes esperar por lo menos 5 minutos desde su recogida."
    50.                 stop
    51.            
    52.         arg 1 is "novato":
    53.             if player has permission "world.kit.novato":
    54.                 if {kitcd.novato.%player%} is true:
    55.                     wait 3 ticks
    56.                     add 1 leather helmet of protection 2 named "&7[Nov&8ato]" to player
    57.                     wait 3 ticks
    58.                     add 1 chain chestplate of protection 1 named "&7[Nov&8ato]" to player
    59.                     wait 3 ticks
    60.                     add 1 leather leggings of protection 2 named "&7[Nov&8ato]" to player
    61.                     wait 3 ticks
    62.                     add 1 chain boots of protection 1 named "&7[Nov&8ato]" to player
    63.                     wait 3 ticks
    64.                     add 1 stone sword of sharpness 1 named "&7[Nov&8ato]" to player
    65.                     wait 3 ticks
    66.                     add 1 iron pickaxe of efficiency 3, fortune 3, unbreaking 10 named "&7[Nov&8ato]" to player
    67.                     wait 3 ticks
    68.                     add 1 iron axe of efficiency 3 named "&7[Nov&8ato]" to player
    69.                     wait 3 ticks
    70.                     add 1 iron shovel of efficiency 3, unbreaking 3 named "&7[Nov&8ato]" to player
    71.                     wait 3 ticks
    72.                     add 30 cooked porkchop named "&7[Nov&8ato]" to player
    73.                     wait 3 ticks
    74.                     add 8 oak wood named "&7[Nov&8ato]" to player
    75.                     wait 3 ticks
    76.                     add 8 spruce wood named "&7[Nov&8ato]" to player
    77.                     wait 3 ticks
    78.                     send "&2&lWorldCraft&7 Recibiste el kit &7[Nov&8ato]"
    79.                     set {kitcd.novato.%player%} to false
    80.                     wait 10 minutes
    81.                     set {kitcd.novato.%player%} to true
    82.                     send "&2&lWorldCraft &7Ahora puedes volver a elegir el kit &7[Nov&8ato]"
    83.                     stop
    84.                 else if {kitcd.novato.%player%} is false:
    85.                     send "&2&lWorldCraft &7Para tomar de nuevo este kit, debes esperar por lo menos 10 minutos desde su recogida."
    86.                     stop
    87.             else:
    88.                 send "&2&lWorldCraft &7Para tomar este kit tienes que tener rango &7[Nov&8ato]"
    89.                 stop
    90.         arg 1 is "profesional":
    91.             if player has permission "world.kit.profesional":
    92.                 if {kitcd.profesional.%player%} is true:
    93.                     set {_profesional} to "&8[Profe&3sional]"
    94.                     wait 3 ticks
    95.                     add 1 iron helmet of protection 1, unbreaking 1 named "%{_profesional}%" to player
    96.                     wait 3 ticks
    97.                     add 1 iron chestplate of protection 1, unbreaking 1 named "%{_profesional}%" to player
    98.                     wait 3 ticks
    99.                     add 1 iron leggings of protection 1, unbreaking 1 named "%{_profesional}%" to player
    100.                     wait 3 ticks
    101.                     add 1 iron boots of protection 1, unbreaking 1 named "%{_profesional}%" to player
    102.                     wait 3 ticks
    103.                     add 1 iron sword of sharpness 1, unbreaking 1, looting 2 named "%{_profesional}%" to player
    104.                     wait 3 ticks
    105.                     add 1 iron pickaxe of efficiency 5, unbreaking 10, fortune 5 named "%{_profesional}%" to player
    106.                     wait 3 ticks
    107.                     add 1 iron axe of efficiency 5, unbreaking 10 named "%{_profesional}%" to player
    108.                     wait 3 ticks
    109.                     add 1 iron shovel of efficiency 5, unbreaking 10, fortune 5 named "%{_profesional}%" to player
    110.                     wait 3 ticks
    111.                     add 36 cooked porkchop named "%{_profesional}%" to player
    112.                     wait 3 ticks
    113.                     add 16 oak wood named "%{_profesional}%" to player
    114.                     wait 3 ticks
    115.                     add 64 cobblestone named "%{_profesional}%" to player
    116.                     wait 3 ticks
    117.                     send "&2&lWorldCraft &7Recibiste el kit %{_profesional}%"
    118.                     set {kitcd.profesional.%player%} to false
    119.                     wait 20 minutes
    120.                     set {kitcd.profesional.%player%} to true
    121.                     send "&2&lWorldCraft &7Ahora puedes volver a elegir el kit %{_profesional}%"
    122.                     stop
    123.                 else if {kitcd.profesional.%player%} is false:
    124.                     send "&2&lWorldCraft &7Para tomar de nuevo este kit, debes esperar por lo menos 20 minutos desde su recogida."
    125.                     stop
    126.             else:
    127.                 send "&2&lWorldCraft &7Para tomar este kit tienes que tener rango &8[Profe&3sional]"
    128.                 stop
    129.         arg 1 is "experto":
    130.             if player has permission "world.kit.experto":
    131.                 if {kitcd.experto.%player%} is true:
    132.                     set {_experto} to "&6[Experto]"
    133.                     wait 3 ticks
    134.                     add 1 diamond helmet of unbreaking 1 named "%{_experto}%" to player
    135.                     wait 3 ticks
    136.                     add 1 iron chestplate of protection 1, unbreaking 3 named "%{_experto}%" to player
    137.                     wait 3 ticks
    138.                     add 1 diamond leggings of unbreaking 1 named "%{_experto}%" to player
    139.                     wait 3 ticks
    140.                     add 1 iron boots of protection 1, unbreaking 3 named "%{_experto}%" to player
    141.                     wait 3 ticks
    142.                     add 1 iron sword of sharpness 3, unbreaking 3, fire aspect 1, looting 3 named "%{_experto}%" to player
    143.                     wait 3 ticks
    144.                     add 1 diamond pickaxe of efficiency 5, unbreaking 10, fortune 10 named "%{_experto}%" to player
    145.                     wait 3 ticks
    146.                     add 1 diamond axe of efficiency 5, unbreaking 10 named "%{_experto}%" to player
    147.                     wait 3 ticks
    148.                     add 1 diamond shovel of efficiency 5, unbreaking 10, fortune 10 named "%{_experto}%" to player
    149.                     wait 3 ticks
    150.                     add 64 cooked porkchop named "%{_experto}%" to player
    151.                     wait 3 ticks
    152.                     add 32 oak wood named "%{_experto}%" to player
    153.                     wait 3 ticks
    154.                     add 16 spruce wood named "%{_experto}%" to player
    155.                     wait 3 ticks
    156.                     send "&2&lWorldCraft &7Recibiste el kit %{_experto}%"
    157.                     set {kitcd.experto.%player%} to false
    158.                     wait 30 minutes
    159.                     set {kitcd.experto.%player%} to true
    160.                     send "&2&lWorldCraft &7Ahora puedes volver a elegir el kit %{_experto}%"
    161.                     stop
    162.                 else if {kitcd.experto.%player%} is false:
    163.                     send "&2&lWorldCraft &7Para tomar de nuevo este kit, debes esperar por lo menos 30 minutos desde su recogida."
    164.                     stop
    165.             else:
    166.                 send "&2&lWorldCraft &7Para tomar este kit tienes que tener rango &6[Experto]"
    167.                 stop
    168.         arg 1 is "civil":
    169.             if player has permission "world.kit.civil":
    170.                 if {kitcd.civil.%player%} is true:
    171.                     set {_civil} to "&9[Ci&fvil]"
    172.                     wait 3 ticks
    173.                     add 1 iron helmet of protection 3, unbreaking 10 named "%{_civil}%" to player
    174.                     wait 3 ticks
    175.                     add 1 diamond chestplate of protection 3, unbreaking 5 named "%{_civil}%" to player
    176.                     wait 3 ticks
    177.                     add 1 chain leggings of protection 5, unbreaking 20 named "%{_civil}%" to player
    178.                     wait 3 ticks
    179.                     add 1 diamond boots of protection 3, feather falling 3, unbreaking 10 named "%{_civil}%" to player
    180.                     wait 3 ticks
    181.                     add 1 diamond sword of sharpness 3, unbreaking 5, fire aspect 1 named "%{_civil}%" to player
    182.                     wait 3 ticks
    183.                     add 1 diamond pickaxe of efficiency 7, unbreaking 7, fortune 7 named "%{_civil}%" to player
    184.                     wait 3 ticks
    185.                     add 1 diamond axe of efficiency 7, unbreaking 7 named "%{_civil}%" to player
    186.                     wait 3 ticks
    187.                     add 1 diamond shovel of efficiency 7, unbreaking 7 named "%{_civil}%" to player
    188.                     wait 3 ticks
    189.                     add 1 stick of knockback 5 named "%{_civil}%" to player
    190.                     wait 3 ticks
    191.                     add 64 cooked porkchop named "%{_civil}%" to player
    192.                     set {kitcd.civil.%player%} to false
    193.                     send "&2&lWorldCraft&7 Recibiste el kit %{_civil}%"
    194.                     wait 30 minutes
    195.                     set {kitcd.civil.%player%} to true
    196.                     send "&2&lWorldCraft &7Ahora puedes volver a tomar el kit %{_civil}%"
    197.                     stop
    198.                 else if {kitcd.civil.%player%} is false:
    199.                     send "&2&lWorldCraft &7Debes esperar 30 minutos desde la recogida del kit para volverlo a tomar."
    200.                     stop
    201.             else:
    202.                 send "&2&lWorldCraft &7Para tomar este kit tienes que ser rango &9[Ci&fvil]"
    203.                 stop
    204.         arg 1 is "vip":
    205.             if player has permission "world.kit.vip":
    206.                 if {kitcd.vip.%player%} is true:
    207.                     set {_vip} to "&a[VIP]"
    208.                     wait 3 ticks
    209.                     add 1 diamond helmet of protection 471, unbreaking 817 named "%{_vip}%" to player
    210.                     wait 3 ticks
    211.                     add 1 diamond chestplate of protection 391, unbreaking 728, thorns 5 named "%{_vip}%" to player
    212.                     wait 3 ticks
    213.                     add 1 diamond leggings of protection 391, unbreaking 801, thorns 5 named "%{_vip}%" to player
    214.                     wait 3 ticks
    215.                     add 1 diamond boots of protection 500, unbreaking 900 named "%{_vip}%" to player
    216.                     wait 3 ticks
    217.                     add 1 diamond sword of sharpness 41, unbreaking 312, fire aspect 5 named "%{_vip}%" to player
    218.                     wait 3 ticks
    219.                     add 1 diamond pickaxe of efficiency 1122, unbreaking 213, fortune 100 named "%{_vip}%" to player
    220.                     wait 3 ticks
    221.                     add 1 diamond axe of efficiency 1122, unbreaking 213, fortune 50 named "%{_vip}%" to player
    222.                     wait 3 ticks
    223.                     add 1 diamond shovel of efficiency 1122, unbreaking 300, fortune 100 named "%{_vip}%" to player
    224.                     wait 3 ticks
    225.                     add 16 golden apple:1 to player
    226.                     wait 3 ticks
    227.                     add 64 quartz block to player            
    228.            
    229. on inventory click:
    230.     clicked inventory isn't player's inventory
    231.     if inventory name of player's current inventory is "&2&lClases":
    232.         event-slot = air:
    233.             close inventory of player
    234.             wait 3 ticks
    235.             execute player command "kit"
    236.  
    237.         #kit user#
    238.  
    239.         if clicked slot is 10:
    240.             close inventory of player
    241.             stop
    242.         if clicked slot is 19:
    243.             close inventory of player
    244.             execute player command "kit user"
    245.             stop
    246.        
    247.         #kit novato#
    248.    
    249.         if clicked slot is 11:
    250.             close inventory of player
    251.             stop
    252.         if clicked slot is 20:
    253.             close inventory of player
    254.             execute player command "kit novato"
    255.             stop
    256.        
    257.         #kit profesional#
    258.    
    259.         if clicked slot is 12:
    260.             close inventory of player
    261.             stop
    262.         if clicked slot is 21:
    263.             close inventory of player
    264.             execute player command "kit profesional"
    265.             stop
    266.        
    267.         #kit experto#
    268.         if clicked slot is 13:
    269.             close inventory of player
    270.             stop
    271.         if clicked slot is 22:
    272.             close inventory of player
    273.             execute player command "kit experto"
    274.             stop
    275.        
    276.         #kit civil#
    277.         if clicked slot is 14:
    278.             close inventory of player
    279.             stop
    280.         if clicked slot is 23:
    281.             close inventory of player
    282.             execute player command "kit civil"
    283.             stop
    284.  
    4. Profile skript.
    Code (Skript):
    1.  
    2. command /perfil [<offline player>]:
    3.     trigger:
    4.         if arg 1 is not set:
    5.             open chest with 5 rows named "&aTu Perfil" to player
    6.             set {_n} to 0
    7.             loop 10 times:
    8.                 set slot {_n} of player's current inventory to black stained glass pane named "&8"
    9.                 add 1 to {_n}
    10.             set slot 10 of player's current inventory to player's skull named "&eNombre: &6%player%"
    11.             set slot 11 of player's current inventory to paper named "&eRango: &6%coloured player's prefix%"
    12.             if player does not have permission "world.chat.suscrito":
    13.                 set slot 12 of player's current inventory to coal named "&eSuscrito: &4&l✘"
    14.             else:
    15.                 set slot 12 of player's current inventory to diamond named "&eSuscrito: &a&l✓"
    16.             set slot 13 of player's current inventory to stone named "&eBloques minados: &6%{bminados::%player%}%"
    17.             set slot 14 of player's current inventory to iron ore named "&ePuntos de Recompensas: &6%{recompensas.de.bloquesminados.%player%}%"
    18.             set slot 15 of player's current inventory to experience bottle named "&eXP: &6%{worldexp::%player%}%"
    19.             set slot 16 of player's current inventory to grass block named "&eWorld Coins: &6%{worldcoins.%player%}%"
    20.             set slot 17 of player's current inventory to black stained glass pane named "&8"
    21.             set slot 18 of player's current inventory to black stained glass pane named "&8"
    22.             set slot 20 of player's current inventory to gold block named "&eDinero: &6%player's balance%"
    23.             set slot 21 of player's current inventory to 31:2 named "&eAsesinatos: &6%{asesinatos::%player%}%"
    24.             set slot 22 of player's current inventory to 32 named "&eMuertes: &6%{muertes::%player%}%"
    25.             set slot 26 of player's current inventory to black stained glass pane named "&8"
    26.             set {_pene} to 26
    27.             loop 10 times:
    28.                 set slot {_pene} of player's current inventory to black stained glass pane named "&8"
    29.                 add 1 to {_pene}
    30.             set slot 40 of player's current inventory to 166 named "&c&lCierra inventario."
    31.             stop
    32.         else:
    33.             if player has permission "world.perfil":
    34.                 open chest with 5 rows named "&aPerfil de %arg 1%" to player
    35.                 set {_n} to 0
    36.                 loop 10 times:
    37.                     set slot {_n} of player's current inventory to black stained glass pane named "&8"
    38.                     add 1 to {_n}
    39.                 set slot 10 of player's current inventory to arg 1's skull named "&eNombre: &6%arg 1%"
    40.                 set slot 11 of player's current inventory to paper named "&eRango: &6%coloured arg 1's prefix%"
    41.                 if {suscripcion.%arg 1%} = true:
    42.                     set slot 12 of player's current inventory to diamond named "&eSuscrito: &a&l✓"
    43.                 else:
    44.                     set slot 12 of player's current inventory to coal named "&eSuscrito: &4&l✘"
    45.                 set slot 13 of player's current inventory to stone named "&eBloques minados: &6%{bminados::%arg 1%}%"
    46.                 set slot 14 of player's current inventory to iron ore named "&ePuntos de Recompensas: &6%{recompensas.de.bloquesminados.%arg 1%}%"
    47.                 set slot 15 of player's current inventory to experience bottle named "&eXP: &6%{worldexp::%arg 1%}%"
    48.                 set slot 16 of player's current inventory to grass block named "&eWorld Coins: &6%{worldcoins.%arg 1%}%"
    49.                 set slot 17 of player's current inventory to black stained glass pane named "&8"
    50.                 set slot 18 of player's current inventory to black stained glass pane named "&8"
    51.                 set slot 20 of player's current inventory to gold block named "&eDinero: &6%arg 1's balance%"
    52.                 set slot 21 of player's current inventory to 31:2 named "&eAsesinatos: &6%{asesinatos::%arg 1%}%"
    53.                 set slot 22 of player's current inventory to 32 named "&eMuertes: &6%{muertes::%arg 1%}%"
    54.                 set slot 40 of player's current inventory to 166 named "&c&lCierra inventario."
    55.                 set slot 26 of player's current inventory to black stained glass pane named "&8"
    56.                 set {_pene} to 26
    57.                 loop 10 times:
    58.                     set slot {_pene} of player's current inventory to black stained glass pane named "&8"
    59.                     add 1 to {_pene}
    60.                 set slot 40 of player's current inventory to 166 named "&c&lCierra inventario."
    61.                 stop
    62.             else:
    63.                 send "&cRequieres &a[VIP]&c para ejecutar este comando."
    64.                 stop
    65.            
    66. on inventory click:
    67.     clicked inventory isn't player's inventory
    68.     if inventory name of player's current inventory is "&aTu Perfil":
    69.         close player's inventory
    70.         stop
    71.    
    72. on inventory click:
    73.     clicked inventory is not player's inventory
    74.     if inventory name of player's current inventory contains "&aPerfil de":
    75.         close player's inventory
    76.         stop
    77.    
    78.  
    79.  
    5. My skript of rankcolor (Idea taken from the famous hypixel server).
    Code (Skript):
    1.  
    2. on command "/rankcolor":
    3.     cancel event
    4.     if player has permission "world.rankcolor":
    5.         open chest with 5 rows named "&8Cambia de color tu signo ""&6+&8""." to player
    6.         set slot 10 of player's current inventory to orange dye named "&fCambialo a: &a[VIP&6+&a]"
    7.         set slot 11 of player's current inventory to rose red named "&fCambialo a: &a[VIP&c+&a]"
    8.         set slot 12 of player's current inventory to light blue dye named "&fCambialo a: &a[VIP&b+&a]"
    9.         set slot 13 of player's current inventory to yellow dye named "&fCambialo a: &a[VIP&e+&a]"
    10.         set slot 14 of player's current inventory to pink dye named "&fCambialo a: &a[VIP&d+&a]"
    11.         set slot 15 of player's current inventory to white dye named "&fCambialo a: &a[VIP&f+&a]"
    12.         set slot 16 of player's current inventory to blue dye named "&fCambialo a: &a[VIP&9+&a]"
    13.         set slot 19 of player's current inventory to green dye named "&fCambialo a: &a[VIP&2+&a]"
    14.         set slot 20 of player's current inventory to redstone named "&fCambialo a: &a[VIP&4+&a]"
    15.         set slot 21 of player's current inventory to cyan dye named "&fCambialo a: &a[VIP&3+&a]"
    16.         set slot 22 of player's current inventory to purple dye named "&fCambialo a: &a[VIP&5+&a]"
    17.         set slot 23 of player's current inventory to light gray dye named "&fCambialo a: &a[VIP&7+&a]"
    18.         set slot 24 of player's current inventory to gray dye named "&fCambialo a: &a[VIP&8+&a]"
    19.         set slot 25 of player's current inventory to black dye named "&fCambialo a: &a[VIP&0+&a]"
    20.         set slot 39 of player's current inventory to emerald named "&fAhora tienes puesto: &a%coloured player's prefix%"
    21.         set slot 40 of player's current inventory to 166 named "&cCierra inventario."
    22.         set slot 41 of player's current inventory to paper named "&f&lInformación."
    23.     else:
    24.         send "{@p} Este comando solo lo pueden activar los jugadores con rango &a[VIP&6+&a]"
    25.         stop
    26.            
    27.            
    28. on inventory click:
    29.     clicked inventory isn't player's inventory
    30.     if inventory name of player's current inventory is "&8Cambia de color tu signo ""&6+&8"".":
    31.         if clicked slot is 10:
    32.             close inventory of player
    33.             wait 3 ticks
    34.             make player execute command "bminadosrankcolor 6"
    35.             stop
    36.         else if clicked slot is 11:
    37.             close inventory of player
    38.             wait 3 ticks
    39.             make player execute command "bminadosrankcolor c"
    40.             stop
    41.         else if clicked slot is 12:
    42.             close inventory of player
    43.             wait 3 ticks
    44.             make player execute command "bminadosrankcolor b"
    45.             stop
    46.         else if clicked slot is 13:
    47.             close inventory of player
    48.             wait 3 ticks
    49.             make player execute command "bminadosrankcolor e"
    50.             stop
    51.         else if clicked slot is 14:
    52.             close inventory of player
    53.             wait 3 ticks
    54.             make player execute command "bminadosrankcolor d"
    55.             stop
    56.         else if clicked slot is 15:
    57.             close inventory of player
    58.             wait 3 ticks
    59.             make player execute command "bminadosrankcolor f"
    60.             stop
    61.         else if clicked slot is 16:
    62.             close inventory of player
    63.             wait 3 ticks
    64.             make player execute command "bminadosrankcolor 9"
    65.             stop
    66.         else if clicked slot is 19:
    67.             close inventory of player
    68.             wait 3 ticks
    69.             make player execute command "bminadosrankcolor 2"
    70.             stop
    71.         else if clicked slot is 20:
    72.             close inventory of player
    73.             wait 3 ticks
    74.             make player execute command "bminadosrankcolor 4"
    75.             stop
    76.         else if clicked slot is 21:
    77.             close inventory of player
    78.             wait 3 ticks
    79.             make player execute command "bminadosrankcolor 3"
    80.             stop
    81.         else if clicked slot is 22:
    82.             close inventory of player
    83.             wait 3 ticks
    84.             make player execute command "bminadosrankcolor 5"
    85.             stop
    86.         else if clicked slot is 23:
    87.             close inventory of player
    88.             wait 3 ticks
    89.             make player execute command "bminadosrankcolor 7"
    90.             stop
    91.         else if clicked slot is 24:
    92.             close inventory of player
    93.             wait 3 ticks
    94.             make player execute command "bminadosrankcolor 8"
    95.             stop
    96.         else if clicked slot is 25:
    97.             close inventory of player
    98.             wait 3 ticks
    99.             make player execute command "bminadosrankcolor 0"
    100.             stop
    101.        
    102.        
    103.        
    104.        
    105.        
    106.         else if clicked slot is 39:
    107.             close inventory of player
    108.             wait a tick
    109.             make player execute command "rankcolor"
    110.             stop
    111.         else if clicked slot is 40:
    112.             close inventory of player
    113.             send "{@p} Cerrando inventario..."
    114.             stop
    115.         else if clicked slot is 41:
    116.             close inventory of player
    117.             wait a tick
    118.             make player execute command "bminadosrankcolor"
    119.             stop
    120.         event-slot = air:
    121.             close inventory of player
    122.             wait a tick
    123.             make player execute command "rankcolor"
    124.             stop
    125.  
    126.  
    6. Warp GUI skript.
    Code (Skript):
    1.  
    2. on command "/warps":
    3.     cancel event
    4.     execute sender command "warp"
    5.  
    6. command /warp [<text>]:
    7.     trigger:
    8.         arg 1 is not set:
    9.             open chest with 4 rows named "&0&lLista de warps" to player
    10.             set {_n} to 0
    11.             loop 10 times:
    12.                 set slot {_n} of player's current inventory to black stained glass pane named "&8"
    13.                 add 1 to {_n}
    14.             set slot 10 of player's current inventory to stone pickaxe named "&7&lMinas"
    15.             set slot 20 of player's current inventory to stone slab named "&a&lPlots"
    16.             set slot 12 of player's current inventory to grass block named "&2&lSurvival"
    17.             set slot 22 of player's current inventory to diamond sword named "&4&lP&c&lv&4&lP"
    18.             set {_n.2} to 26
    19.             set slot 17 of player's current inventory to black stained glass pane named "&8"
    20.             set slot 18 of player's current inventory to black stained glass pane named "&8"
    21.             loop 10 times:
    22.                 set slot {_n.2} of player's current inventory to black stained glass pane named "&8"
    23.                 add 1 to {_n.2}
    24.             stop
    25.         else if arg 1 is set:
    26.             make console execute command "essentials:ewarp %arg 1% %player%"
    27.             stop
    28.        
    29. command /minas [<text>]:
    30.     trigger:
    31.         arg 1 is not set:
    32.             open chest with 4 rows named "&0&lLista de &6&lMinas" to player
    33.             set {_n} to 0
    34.             loop 10 times:
    35.                 set slot {_n} of player's current inventory to bedrock named "&8"
    36.                 add 1 to {_n}
    37.             set slot 10 of player's current inventory to coal ore named "&8&lMina User"
    38.             set slot 11 of player's current inventory to coal ore named "&8&lMina Novato"
    39.             set slot 12 of player's current inventory to coal ore named "&8&lMina Profesional"
    40.             set slot 13 of player's current inventory to coal ore named "&8&lMina Experto"
    41.             set slot 14 of player's current inventory to iron ore named "&7&lMina Civil"
    42.             set slot 15 of player's current inventory to iron ore named "&7&lMina Prisionero"
    43.             set slot 16 of player's current inventory to iron ore named "&7&lMina Bravucon"
    44.             set slot 17 of player's current inventory to bedrock named "&8"
    45.             set slot 18 of player's current inventory to bedrock named "&8"
    46.             set slot 19 of player's current inventory to iron ore named "&7&lMina Buscado"
    47.             set slot 20 of player's current inventory to iron ore named "&7&lMina Asesino"
    48.             set slot 21 of player's current inventory to gold ore named "&5&lMina Serial"
    49.             set slot 22 of player's current inventory to gold ore named "&2&lMina Narco"
    50.             set {_n} to 26
    51.             loop 4 times:
    52.                 set slot {_n} of player's current inventory to bedrock named "&8"
    53.                 add 1 to {_n}
    54.             set slot 30 of player's current inventory to diamond pickaxe named "&7&lMina&c&lPvP"
    55.             set slot 31 of player's current inventory to arrow named "&eVolver al inventario de warps"
    56.             set slot 32 of player's current inventory to gold pickaxe named "&e&lMinas&6&lVips"
    57.             set slot 33 of player's current inventory to bedrock named "&8"
    58.             set slot 34 of player's current inventory to bedrock named "&8"
    59.             set slot 35 of player's current inventory to 425:10 named "&aSiguiente página"
    60.             send "&aAbriendo lista de minas..."
    61.             stop
    62.         arg 1 is set:
    63.             arg 1 is "2":
    64.                 if player does not have permission "skript.*":
    65.                     send "&cEste lado de las minas no está listo!"
    66.                     stop
    67.                 else:
    68.                     open chest with 4 rows named "&0&lLista de &6&lMinas 2" to player
    69.                     set {_n} to 0
    70.                     loop 10 times:
    71.                         set slot {_n} of player's current inventory to bedrock named "&8"
    72.                         add 1 to {_n}
    73.                     set slot 10 of player's current inventory to coal block named "&8&l&ki&8&lMina Novato P1 &8&l&ki"
    74.                     set slot 11 of player's current inventory to coal block named "&8&l&ki&8&lMina Profesional P1 &8&l&ki"
    75.        
    76.        
    77. on inventory click:
    78.     inventory name of player's current inventory is "&0&lLista de warps":
    79.         event-slot = air:
    80.             close inventory of player
    81.             wait 3 ticks
    82.             execute player command "warp"
    83.         event-slot = black stained glass pane:
    84.             close player's inventory
    85.             wait 3 ticks
    86.             execute player command "warp"
    87.         event-slot != air:
    88.             clicked slot is 10:
    89.                 close inventory of player
    90.                 wait 3 ticks
    91.                 execute player command "minas"
    92.             clicked slot is 20:
    93.                 close inventory of player
    94.                 wait 3 ticks
    95.                 execute player command "warp plots"
    96.             clicked slot is 12:
    97.                 close inventory of player
    98.                 wait 3 ticks
    99.                 execute player command "warp survival"
    100.             clicked slot is 22:
    101.                 close inventory of player
    102.                 wait 3 ticks
    103.                 execute player command "warp pvp"
    104.            
    105.            
    106. on inventory click:
    107.     clicked inventory isn't player's inventory
    108.     inventory name of player's current inventory is "&0&lLista de &6&lMinas":
    109.         event-slot = bedrock:
    110.             close inventory of player
    111.             wait 3 ticks
    112.             execute player command "minas"
    113.         event-slot != bedrock:
    114.             clicked slot is 10:
    115.                 close inventory of player
    116.                 wait 3 ticks
    117.                 execute player command "warp mina"
    118.             clicked slot is 11:
    119.                 close inventory of player
    120.                 wait 3 ticks
    121.                 execute player command "warp novato"
    122.             clicked slot is 12:
    123.                 close inventory of player
    124.                 wait 3 ticks
    125.                 execute player command "warp profesional"
    126.             clicked slot is 13:
    127.                 close inventory of player
    128.                 wait 3 ticks
    129.                 execute player command "warp experto"
    130.             clicked slot is 14:
    131.                 close inventory of player
    132.                 wait 3 ticks
    133.                 execute player command "warp civil"
    134.             clicked slot is 15:
    135.                 close inventory of player
    136.                 wait 3 ticks
    137.                 execute player command "warp prisionero"
    138.             clicked slot is 16:
    139.                 close inventory of player
    140.                 wait 3 ticks
    141.                 execute player command "warp bravucon"
    142.             clicked slot is 19:
    143.                 close inventory of player
    144.                 wait 3 ticks
    145.                 execute player command "warp buscado"
    146.             clicked slot is 20:
    147.                 close inventory of player
    148.                 wait 3 ticks
    149.                 execute player command "warp asesino"
    150.             clicked slot is 21:
    151.                 close inventory of player
    152.                 wait 3 ticks
    153.                 execute player command "warp serial"
    154.             clicked slot is 22:
    155.                 close inventory of player
    156.                 wait 3 ticks
    157.                 execute player command "warp narco"
    158.             clicked slot is 30:
    159.                 close inventory of player
    160.                 wait 3 ticks
    161.                 execute player command "warp minapvp"
    162.             clicked slot is 31:
    163.                 close inventory of player
    164.                 wait 3 ticks
    165.                 execute player command "warp"
    166.             clicked slot is 32:
    167.                 close inventory of player
    168.                 wait 3 ticks
    169.                 execute player command "warp minavip"
    170.             clicked slot is 35:
    171.                 close inventory of player
    172.                 wait 3 ticks
    173.                 execute player command "minas 2"
    174.  
    175.  
    And those are the skript that contain a code regarding the inventory.
    To end, now im gonna show addons that i has on my server:
    - MundoSk
    - Skellett
    - SkQuery
    - SkRayFall
    - skript-mirror
    - SkUtilities
    - TuSKe.
    .
    --- Double Post Merged, Apr 16, 2019, Original Post Date: Apr 16, 2019 ---
    In my server only have 28 plugins.
    And the version of vault plugin from my server is: 1.5.3-b37 (Although I don't know if the version of the vault will help here.)
     
    #4 couger44, Apr 16, 2019
    Last edited: Apr 16, 2019
  5. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    907
    Likes Received:
    54
    Medals:
    Disable all your scripts and see if the problem is still there
     
  6. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    219
    Likes Received:
    7
    Okay, I'll try that.
    --- Double Post Merged, Apr 17, 2019 at 4:43 PM, Original Post Date: Apr 17, 2019 at 4:42 PM ---
    ... but, all the skripts that contain inventory codes? or all the files in the Script folder ??
     
  7. T

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    907
    Likes Received:
    54
    Medals:
  8. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    219
    Likes Received:
    7
    Ok, so im gonna try that
    --- Double Post Merged, Apr 17, 2019 at 5:54 PM, Original Post Date: Apr 17, 2019 at 4:44 PM ---
    Ups, i found the error, thanks for help me:emoji_slight_smile:
     
    • Friendly Friendly x 1
Loading...