Solved Skript Skellett Packet

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

DrachenfeuerHD

New Member
Jun 19, 2020
7
0
1
35
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:
[doublepost=1592928139,1592602846][/doublepost]thank you for answering...
 
U running mirror bc idk how skellett works with packets but i can do it with mirror tho?

Well if u do:

Code:
import:
    net.minecraft.server.v1_15_R1.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})
 
Last edited:
k thats the plugin i used -> its not working :C
seeing as you are using 1.8, instead of 1.15, you might want to change the
code_language.skript:
import:
    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_language.skript:
import:
    net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange
(1_8_r3 was the closest thing I could find, but it may work)
 
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?
 
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?
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_language.skript:
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})
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.
 
@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_language.skript:
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})
 
Thank you. thats working :emoji_slight_smile:
[doublepost=1593094406,1593094303][/doublepost]i have 1 more questioon: is it possible in that skript to do that for everyone? like loop all players?
@Lego_freak1999
 
Last edited:
Thank you. thats working :emoji_slight_smile:
[doublepost=1593094406,1593094303][/doublepost]i have 1 more questioon: is it possible in that skript to do that for everyone? like loop all players?
@Lego_freak1999
Code:
import:
    net.minecraft.server.v1_8_R3.PacketPlayOutGameStateChange
   
command /demoscreen:
    trigger:
        set {_packet} to new PacketPlayOutGameStateChange(5 and 0)
        loop all players:
            set {_player} to loop-player
            set {_nms.player} to {_player}.getHandle()
            set {_connection} to {_nms.player}.playerConnection!
            {_connection}.sendPacket({_packet})
 
Status
Not open for further replies.