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!

@Tlatoani Thats MundoSK 1.7.4?
Just in case you're blind or lazy to read the overview:
Screenshot_2017-05-26-16-07-00.png
 
  • Like
Reactions: Tlatoani
@Tlatoani It just says random things like
code_language.skript:
{"players":{"max":50,"online":1,"sample":[{"name":"nameHereee32","id":"1237b62705636b5-b126-dc590f047768"}]},"description":"","version":{"protocol":47,"name":"Spigot 1.8.8"}}
I am a big noob with Packets so I don't know what to do next :/

Here is my Vanish script, if that helps.

code_language.skript:
                    add player to {sql_.invis::*}
                    set {_numGlobal} to size of all bungeecord players
                    set {_invis} to size of {sql_.invis::*}
                    broadcast "%{_numGlobal}-{_invis}%"
 
@Tlatoani It just says random things like
code_language.skript:
{"players":{"max":50,"online":1,"sample":[{"name":"nameHereee32","id":"1237b62705636b5-b126-dc590f047768"}]},"description":"","version":{"protocol":47,"name":"Spigot 1.8.8"}}
I am a big noob with Packets so I don't know what to do next :/

Here is my Vanish script, if that helps.

code_language.skript:
                    add player to {sql_.invis::*}
                    set {_numGlobal} to size of all bungeecord players
                    set {_invis} to size of {sql_.invis::*}
                    broadcast "%{_numGlobal}-{_invis}%"
You have to find the correct parts of the json to modify to change what you want to change. Here, you want to change the amount of online players, so you can see that the number matched with "online" is probably the number you want to change. Since the number is matched up with "online" and is in the object (indicated by {}) matched with "players", you need to change the index "players:: online" in your list variable, so
code_language.skript:
set {_server info::players::online} to 50
if you want to show the number of online players as 50.
 
  • Like
Reactions: Adrihun
Is it possible to get the PlayerInfo array yet? I looked on the github and it appears to have been commented out. Here's the packet info for the first packet required to spawn a fake player:
code_language.skript:
[17:21:15] [Server thread/INFO]: [MundoSK] Field 0, Class = class java.util.ArrayList: [PlayerInfoData{latency=0, gameMode=CREATIVE, profile=com.mojang.authlib.GameProfile@7008814f[id=b5555987-25cd-4ddb-9a9d-218aa1141551,name=sky_high,properties={textures=[com.mojang.authlib.properties.Property@21e1a8e]},legacy=false], displayName=null}]
[17:21:15] [Server thread/INFO]: [MundoSK] Packet Info End
The second packet required seems to be good to go already
 
@Tlatoani how do i cancel a player hit sound
i want to make a sound when the victim gets hit and is wearing an enchanted diamond armor, but both player hit sound plays, and my sound
 
@Tlatoani how do i cancel a player hit sound
i want to make a sound when the victim gets hit and is wearing an enchanted diamond armor, but both player hit sound plays, and my sound
You will need to set up a packet event with the right packettype. I believe it is play_server_named_sound_effect, but I am not 100% sure. Then you just cancel the event.
 
can't understand this event: 'if "%string pinfo 0 of event-packet%" is "entity.player.hurt"'
and do you know how to only disable it when the victim has diamond armor enchanted on?
 
i can still hear the sound

help.

i also tried game.player.hurt
I am not sure why you are still hearing the sound, but you can try to further debug the issue:
code_language.skript:
on packet event play_server_named_sound_effect:
    broadcast "%string pinfo 0 of event-packet%"
    if "%string pinfo 0 of event-packet%" is "game.player.hurt":
        broadcast "Sound game.player.hurt detected, cancelling event"
        cancel event
    else:
        broadcast "Not game.player.hurt, not cancelling event"
If you are getting the first broadcast at the same time as game.player.hurt broadcast, then you may have the wrong sound or some similar issue, while if you get the second broadcast at the same time then it's some weirder problem.
 
code_language.skript:
on packet event play_server_named_sound_effect:
    if "%string pinfo 0 of event-packet%" is "game.player.hurt":
        broadcast "&a1"
        cancel event
        broadcast "&a2"
    else:
        broadcast "&c3"

When I hit the player, both 1 and 2 gets broadcasted, but the sound still happens..

I'm using 1.11.2 client on Spigot 1.8.9 could that be the issue
 
code_language.skript:
on packet event play_server_named_sound_effect:
    if "%string pinfo 0 of event-packet%" is "game.player.hurt":
        broadcast "&a1"
        cancel event
        broadcast "&a2"
    else:
        broadcast "&c3"

When I hit the player, both 1 and 2 gets broadcasted, but the sound still happens..

I'm using 1.11.2 client on Spigot 1.8.9 could that be the issue
The different versions could be the issue, but I'm not sure how you would fix that.
 
@Tlatoani maybe skript cant "cancel event"?

Is there a way to make the sound volume 0?

on skUnity docs if you search for sound, RandomSK will pop up on "how to cancel sound", and it says there the plugin isnt cancelling it, just making the volume 0. I tried downloading RandomSK, but it gave me errors.
 
@Tlatoani maybe skript cant "cancel event"?

Is there a way to make the sound volume 0?

on skUnity docs if you search for sound, RandomSK will pop up on "how to cancel sound", and it says there the plugin isnt cancelling it, just making the volume 0. I tried downloading RandomSK, but it gave me errors.
I don't think that is the issue, but if you want, the volume I think is
code_language.skript:
float pnum 0 of event-packet
, so you can set that to 0.