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.

Help with inventory commands

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

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

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Hi, I hope you're having a good day. Well now I will talk to you this doubt I have had for a few hours.

    A few minutes ago, I did a /report with GUI, I was going to do that by clicking on the item, execute the command "/report% arg 1% fly (or the item that has clicked to report on the hack). What happens is that I was stuck in one part:
    How do I make the executor of the command execute the "report arg 1" command?
    I tried (stupidly from me) to put:
    Code (Skript):
    1.  
    2. clicked slot = 9: #It's the feather, and when I click on the feather, what I want is to have it report to argument 1 previously placed as it has seen it fly.
    3.         close player's inventory
    4.         wait a tick
    5.         execute player command "report %arg 1% fly"
    6.  
    7.  
    Obviously it did not work, and now I have had this question for a long time so I went to the forum. What do I have to do to make it work correctly?
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    The way you did it, is how you do it. So I'm not sure why its not working for you.
     
    • Agree Agree x 1
  3. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    I think you have to set a local variable to arg-1, since the code under run from tuske (if that's what you're using) is ran as a seperate event (I think, I'm not sure). Then use that local variable in your command.
     
  4. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    If you’re using tuske you will have to set a local variable to the arguments before and use that instead. If Ure using inventory click event mixed with Skellett syntax you can’t use aeg-1 since there is no argument
     
  5. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    I'm using the Vanilla inventory.
    --- Double Post Merged, Apr 5, 2019, Original Post Date: Apr 5, 2019 ---
    The full command code is:
    Code (Skript):
    1.  
    2. command /report [<offline player>] [<text>]:
    3.     trigger:
    4.         if arg 1 is not set:
    5.             if arg 2 is not set:
    6.                 send "&c/report <jugador>"
    7.                 stop
    8.         else:
    9.             if arg 2 is not set:
    10.                 open chest with 4 rows named "&cMenú de reportes." to player
    11.                 set slot 0 of player's current inventory to ARG 1'S SKULL named "&cReportar a %arg 1% por:"
    12.                 set slot 9 of player's current inventory to FEATHER named "&fVuela(Fly)"
    13.                 set slot 10 of player's current inventory to DIAMOND SWORD named "&4KillAura(O parecidos)"
    14.                 set slot 11 of player's current inventory to BOW named "&6Aim&fBow &7| &bFast&fBow"
    15.                 set slot 12 of player's current inventory to BRICK BLOCK named "&9AutoBuild"
    16.                 set slot 13 of player's current inventory to DIAMOND HELMET named "&aAuto&fArmor"
    17.                 set slot 14 of player's current inventory to COBWEB named "&fAnti&cKnockback"
    18.                 set slot 15 of player's current inventory to COBBLESTONE named "&7Fast&fBreak"
    19.                 set slot 16 of player's current inventory to BOOK named "&eOtros..."
    20.                 set slot 31 of player's current inventory to 166 named "&c&lCerrar inventario"
    21.                 send "&cSi haces reportes falsos serás advertido 3 veces, cuando sobrepases esa cantidad de advertencias, serás baneado por 1 semana."
    22.                 stop
    23.             else if arg 2 is set:
    24.                 set {_m} to "&aReportado con éxito. Un staff atenderá ese asunto en breves."
    25.                 if arg 2 is "fly":
    26.                     add "fly %arg 1%" to {reportes::*}
    27.                     send {_m}
    28.                     stop
    29.                 else if arg 2 is "killaura":
    30.                     add "killaura %arg 1%" to {reportes::*}
    31.                     send {_m}
    32.                     stop
    33.                 else if arg 2 is "aimbow":
    34.                     add "aimbow %arg 1%" to {reportes::*}
    35.                     send {_m}
    36.                     stop
    37.                 else if arg 2 is "autobuild":
    38.                     add "autobuild %arg 1%" to {reportes::*}
    39.                     send {_m}
    40.                     stop
    41.                 else if arg 2 is "autoarmor":
    42.                     add "autoarmor %arg 1%" to {reportes::*}
    43.                     send {_m}
    44.                     stop
    45.                 else if arg 2 is "antikb":
    46.                     add "antikb %arg 1%" to {reportes::*}
    47.                     send {_m}
    48.                     stop
    49.                 else if arg 2 is "fastbreak":
    50.                     add "fastbreak %arg 1%" to {reportes::*}
    51.                     send {_m}
    52.                     stop
    53.                 else if arg 2 is "otros":
    54.                     add "Hacker %arg 1%" to {reportes::*}
    55.                     send {_m}
    56.                     stop
    57.  
    58.  
     
  6. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    you are mixing 3 different plugins together to achieve this. skquery open inventory, skript slot setting and clicked slot is skellet syntax, not skript
     
  7. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Ohh... really? I did not notice that. I guess it will be because I have many addons on my server.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...