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 Skript Skellett Packet

Discussion in 'Skript' started by DrachenfeuerHD, Jun 19, 2020.

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

    DrachenfeuerHD New Member

    Joined:
    Jun 19, 2020
    Messages:
    7
    Likes Received:
    0
    Hello i wanna make a Demo Screen troll in Skript. My problem is: what is the demo packet called? My Skript until now is:

    command /test:
    trigger:
    set {_packet} to new DemoScreen packet
    send player packet {_packet}

    Can somebody help me? Thanks :emoji_slight_smile:
    --- Double Post Merged, Jun 23, 2020, Original Post Date: Jun 19, 2020 ---
    thank you for answering...

     
  2. Best Answer:
    Post #13 by Lego_freak1999, Jun 25, 2020
  3. rick_Kraut

    rick_Kraut Member

    Joined:
    Feb 20, 2020
    Messages:
    12
    Likes Received:
    1
  4. DrachenfeuerHD

    DrachenfeuerHD New Member

    Joined:
    Jun 19, 2020
    Messages:
    7
    Likes Received:
    0
    There is a packet but idk how to use it
     
  5. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    U running mirror bc idk how skellett works with packets but i can do it with mirror tho?

    Well if u do:

    Code (Text):
    1. import:
    2.     net.minecraft.server.v1_15_R1.PacketPlayOutGameStateChange
    3.  
    4. command /demoscreen <player=%player%>:
    5.     trigger:
    6.         set {_player} to arg 1
    7.         set {_nms.player} to {_player}.getHandle()
    8.         set {_connection} to {_nms.player}.playerConnection
    9.         set {_packet} to new PacketPlayOutGameStateChange(5 and 0)
    10.         {_connection}.sendPacket({_packet})
     
    #4 Lego_freak1999, Jun 24, 2020
    Last edited: Jun 24, 2020
  6. DrachenfeuerHD

    DrachenfeuerHD New Member

    Joined:
    Jun 19, 2020
    Messages:
    7
    Likes Received:
    0
    https://prnt.sc/t5or18 ugh which Plugin / extension are you using? pls send a link
    --- Double Post Merged, Jun 24, 2020, Original Post Date: Jun 24, 2020 ---
    btw: im playing in version 1.8.9
     
  7. rick_Kraut

    rick_Kraut Member

    Joined:
    Feb 20, 2020
    Messages:
    12
    Likes Received:
    1
    he used https://forums.skunity.com/resources/skript-mirror.254/ skript-mirror
    I don't know if it has a dependency (as there is none listed), but I remember people saying there is a mirror plugin, but you should see if it works without said plugin first as I could not find said plugin.
     
  8. DrachenfeuerHD

    DrachenfeuerHD New Member

    Joined:
    Jun 19, 2020
    Messages:
    7
    Likes Received:
    0
    k thats the plugin i used -> its not working :C
     
  9. rick_Kraut

    rick_Kraut Member

    Joined:
    Feb 20, 2020
    Messages:
    12
    Likes Received:
    1
    seeing as you are using 1.8, instead of 1.15, you might want to change the
    Code (Skript):
    1.  
    2. import:
    3.     net.minecraft.server.v1_15_R1.PacketPlayOutGameStateChange
    part of your code to reflect 1.8.9
    example; (idk if this is the correct version, but its worth trying
    Code (Skript):
    1.  
    2. import:
    3.     net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange
    (1_8_r3 was the closest thing I could find, but it may work)
     
  10. DrachenfeuerHD

    DrachenfeuerHD New Member

    Joined:
    Jun 19, 2020
    Messages:
    7
    Likes Received:
    0
    Thanks, now only this 1 error: https://prnt.sc/t5u7vr
    and my script:

    import:
    net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange
    command /demoscreen <player=%player%>:
    trigger:
    set {_player} to arg 1
    set {_nms.player} to {_player}.getHandle()
    set {_connection} to {_nms.player}.playerConnection
    set {_packet} to new PacketPlayOutGameStateChange(5 and 0)
    {_connection}.sendPacket({_packet})


    btw: how do i format that as code?
     
  11. rick_Kraut

    rick_Kraut Member

    Joined:
    Feb 20, 2020
    Messages:
    12
    Likes Received:
    1
    hit the plus at the top bar, should be about just right of center, (if you want to be even cooler, because for what ever reason the code selection drop down doesnt work,
    (replace the the curly brackets with square brackets; {code=skript}{/code}
    should look like this
    Code (Skript):
    1. import:
    2.     net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange
    3. command /demoscreen <player=%player%>:
    4.     trigger:
    5.         set {_player} to arg 1
    6.         set {_nms.player} to {_player}.getHandle()
    7.         set {_connection} to {_nms.player}.playerConnection
    8.         set {_packet} to new PacketPlayOutGameStateChange(5 and 0)
    9.         {_connection}.sendPacket({_packet})
    I have no experience with mirror, so @Lego_freak1999 I redirect this back to you, as it is the code you posted.
    Catchup; line 7 (set {_connection} to {_nms.player}.playerConnection) gets an error, refer to post above's image, for more details.
     
  12. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    @DrachenfeuerHD
    @rick_Kraut

    Ahh didn't know ur where on 1.8.

    There is a snapshot version of skript-mirror wich can be downloaded here: https://skripttools.net/dl/skript-mirror+2.0.0-SNAPSHOT.jar
    The code is made in that version although i am not shure the 2.0 will run on 1.8

    Otherwise this is the code for the old skript-mirror:

    Code (Skript):
    1. import:
    2.     net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange
    3. command /demoscreen <player=%player%>:
    4.     trigger:
    5.         set {_player} to arg 1
    6.         set {_nms.player} to {_player}.getHandle()
    7.         set {_connection} to {_nms.player}.playerConnection!
    8.         set {_packet} to new PacketPlayOutGameStateChange(5 and 0)
    9.         {_connection}.sendPacket({_packet})
     
    • Useful Useful x 1
  13. DrachenfeuerHD

    DrachenfeuerHD New Member

    Joined:
    Jun 19, 2020
    Messages:
    7
    Likes Received:
    0
    Thank you. thats working :emoji_slight_smile:
    --- Double Post Merged, Jun 25, 2020, Original Post Date: Jun 25, 2020 ---
    i have 1 more questioon: is it possible in that skript to do that for everyone? like loop all players?
    @Lego_freak1999
     
    #12 DrachenfeuerHD, Jun 25, 2020
    Last edited: Jun 25, 2020
  14. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    Code (Text):
    1. import:
    2.     net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange
    3.    
    4. command /demoscreen:
    5.     trigger:
    6.         set {_packet} to new PacketPlayOutGameStateChange(5 and 0)
    7.         loop all players:
    8.             set {_player} to loop-player
    9.             set {_nms.player} to {_player}.getHandle()
    10.             set {_connection} to {_nms.player}.playerConnection!
    11.             {_connection}.sendPacket({_packet})
     
    • Useful Useful x 1
  15. DrachenfeuerHD

    DrachenfeuerHD New Member

    Joined:
    Jun 19, 2020
    Messages:
    7
    Likes Received:
    0
    thank you so much <3
     
Thread Status:
Not open for further replies.

Share This Page

Loading...