MundoSK Packets

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

hey i try to do this:
code_language.skript:
command /re:
    trigger:
        set {_packet} to new play_server_set_cooldown packet
        set int pnum 0 of {_packet} to 351:11 # and 388
        set int pnum 1 of {_packet} to 10
        send player packet {_packet}

like in this thread https://www.spigotmc.org/threads/utilizing-white-cooldown-overlay-from-1-9.155942/
http://wiki.vg/Protocol#Set_Cooldown
Can you help me please?
For this I don't think you can have the :11, so you have to make 351:11 into just 351, and for 388 you can make another packet.
 
For this I don't think you can have the :11, so you have to make 351:11 into just 351, and for 388 you can make another packet.

But if i write 388 or any integer (=to an ID) this code does not work :/


EDIT:
i try this :
code_language.skript:
on packet event play_server_set_cooldown:
    set {_t} to int pnum 0 of event-packet
    set {_2} to int pnum 1 of event-packet
   
    broadcast "%{_t}% %{_2}%"

and {_t} is the cooldown in ticks (tested with an enderpearl), but {_2} is <none>, so i need to find the material syntax

I have found this https://github.com/dmulloy2/PacketW...cketwrapper/WrapperPlayServerSetCooldown.java
but i'm not a Java Dev :/
 
Last edited by a moderator:
But if i write 388 or any integer (=to an ID) this code does not work :/


EDIT:
i try this :
code_language.skript:
on packet event play_server_set_cooldown:
    set {_t} to int pnum 0 of event-packet
    set {_2} to int pnum 1 of event-packet
 
    broadcast "%{_t}% %{_2}%"

and {_t} is the cooldown in ticks (tested with an enderpearl), but {_2} is <none>, so i need to find the material syntax

I have found this https://github.com/dmulloy2/PacketW...cketwrapper/WrapperPlayServerSetCooldown.java
but i'm not a Java Dev :/
Try
code_language.skript:
"item" pinfo 0 of %packet%
 
  • Like
Reactions: aeim
Try
code_language.skript:
"item" pinfo 0 of %packet%
It's Working ! THX
code_language.skript:
on sneak toggle:
    if player is sneaking:
        set {_packet} to new play_server_set_cooldown packet
        set "item" pinfo 0 of {_packet} to emerald
        set int pnum 0 of {_packet} to 60
        send player packet {_packet}
 
  • Like
Reactions: Tlatoani
I get error!
http://imgur.com/2NqtHFf

Spigot version is 1.12
ProtocolLib version is 4.3.0
MundoSK version is 1.7.5-BETA.8.41

code_language.skript:
command /test:
    trigger:
        set {_player} to player
        set {_loc} to location of targeted block
        set {_packet} to new PLAY_CLIENT_BLOCK_CHANGE packet
        set location pinfo 0 of {_packet} to {_loc}
        set blockdata pinfo 1 of {_packet} to emerald block
        send {_player} packet {_packet}
 
I get error!
http://imgur.com/2NqtHFf

Spigot version is 1.12
ProtocolLib version is 4.3.0
MundoSK version is 1.7.10

code_language.skript:
command /test:
    trigger:
        set {_player} to player
        set {_loc} to location of targeted block
        set {_packet} to new PLAY_CLIENT_BLOCK_CHANGE packet
        set location pinfo 0 of {_packet} to {_loc}
        set blockdata pinfo 1 of {_packet} to emerald block
        send {_player} packet {_packet}
There is no MundoSK version 1.7.10.
 
I have a question that I was told has to do with packets: I want the damage sound to be changed to the "CLICK" sound. I want it changed to that, or removed and playing that sound to the attacker. I have no clue how to use packets as I am totally confused after reading the tutorial. If someone can help me here, that would be great. Thanks
 
hi i need help how i can use the event
START_DESTROY_BLOCK
i try to do
on packet event Play_server_START_DESTROY_BLOCK:
broadcast "BLOCK_DIG"
and
on packet event START_DESTROY_BLOCK:
broadcast "BLOCK_DIG"

the dont work

the event at
https://github.com/aadnk/ProtocolLi...comphenix/protocol/wrappers/EnumWrappers.java
The EnumWrappers class is a list of enums that a packet can contain, not of packettypes themselves. For the list of packettypes you need to go to the PacketType class: https://github.com/aadnk/ProtocolLi...n/java/com/comphenix/protocol/PacketType.java