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!

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

Please help me fix this

Discussion in 'Requests' started by kaposzta99, Aug 13, 2020.

  1. kaposzta99

    kaposzta99 Member

    Aug 13, 2020
    Likes Received:
    Im trying to make a crate opening skript.
    The code:
    {lada:1} = 322 8
    {lada:2} = 373:8201
    {lada:3} = 322:1
    {lada:4} = 332 12

    on right click with 131:
    if clicked block is end portal frame:
    cancel event
    remove 1 of player's tool from player
    set {_cucc33} to random element out of {lada::*}
    execute console command "/give %player% %{_cucc33}%"

    What is my problem:
    When I open the crate nothing happens.

    When I open the console I see this:
    [17:07:36] [Server thread/INFO]: CONSOLE issued server command: /give noob123
    [17:07:36] [Server thread/INFO]: Hiba: Ismeretlen tárgy név: .

    Server version: spigot 1.8.8
    Skript plugins: Skript 2.2, skript-mirror, skUtilities, SkQuery, TuSKe, SkQuery
  2. xL8jNor

    xL8jNor Member

    Jul 28, 2020
    Likes Received:
    You may want to register your variables with "variables:" not "options:" and you should stop using id based item. (+ you can actually give item with Skript so I replaced the /give line)
    Here is the fixed code:
    Code (Text):
    1. variables:
    2.     {lada::1} = 8 Golden Apple
    3.     {lada::2} = Potion of Strength
    4.     {lada::3} = Enchanted Golden Apple
    5.     {lada::4} = 12 Snowball
    7. on rightclick:
    8.     player's tool is Tripwire Hook
    9.     clicked block is End Portal Frame
    10.     cancel event
    11.     remove 1 Tripwire Hook from player
    12.     set {_cucc33} to random element out of {lada::*}
    13.     give {_cucc33} to player
  3. kaposzta99

    kaposzta99 Member

    Aug 13, 2020
    Likes Received:
    It is using execute console command for a reason...

    You can't really do this with skript's give mechanic:
    {lada::5} = 425:14 1 fortune:10 name:&8»_&d&lJobb_Klikk!_&8« lore:_&8»_&7Kit_lehívás|_&8»_&6&lVenom itemflags:HIDE_ATTRIBUTES,HIDE_ENCHANTS

Share This Page