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.

MundoSK Packets

Discussion in 'Tutorials' started by Tlatoani, Feb 2, 2017.

  1. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    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.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    But if i write 388 or any integer (=to an ID) this code does not work :/


    EDIT:
    i try this :
    Code (Skript):
    1. on packet event play_server_set_cooldown:
    2.     set {_t} to int pnum 0 of event-packet
    3.     set {_2} to int pnum 1 of event-packet
    4.    
    5.     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/PacketWrapper/blob/master/PacketWrapper/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerSetCooldown.java
    but i'm not a Java Dev :/
     
    #102 ShaneBee, Jul 6, 2017
    Last edited by a moderator: Jul 6, 2017
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Try
    Code (Skript):
    1. "item" pinfo 0 of %packet%
     
    • Like Like x 1
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    It's Working ! THX
    Code (Skript):
    1. on sneak toggle:
    2.     if player is sneaking:
    3.         set {_packet} to new play_server_set_cooldown packet
    4.         set "item" pinfo 0 of {_packet} to emerald
    5.         set int pnum 0 of {_packet} to 60
    6.         send player packet {_packet}
     
    • Like Like x 1
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    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 (Skript):
    1. command /test:
    2.     trigger:
    3.         set {_player} to player
    4.         set {_loc} to location of targeted block
    5.         set {_packet} to new PLAY_CLIENT_BLOCK_CHANGE packet
    6.         set location pinfo 0 of {_packet} to {_loc}
    7.         set blockdata pinfo 1 of {_packet} to emerald block
    8.         send {_player} packet {_packet}
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    There is no MundoSK version 1.7.10.
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    I was wrong write. Look again same message.
     
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Try writing the packet name in lowercase.
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Same get same error.

    Which versions of plug-ins should I use to run the PLAY_CLIENT_BLOCK_CHANGE package in version 1.12?
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    These versions should be good for that packet. Do other packets work on your server or not?
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    I used SkQuery for client block change.
    Thanks for everything.
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    set {_packet} to new play_server_entity_metadata packet
    this does not work in 1.12
    ?
     
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    In what way does this not work?
     
  14. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    cant understand condition/effect
     
  15. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    What are your MundoSK and ProtocolLib versions?
     
  16. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Whoops
    ProtocolLib was not in my server. My fault
     
  17. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    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
     
  18. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
  19. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    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/ProtocolLib/blob/master/modules/API/src/main/java/com/comphenix/protocol/PacketType.java
     
  20. z

    zide Active Member

    Joined:
    Aug 23, 2017
    Messages:
    42
    Likes Received:
    1
    Could you write some example?
    Thanks very much!
    Sorry for my bad english.
     
Loading...