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!
As I explained on discord, yes it isHello, i'm trying to create a citizen with per players skin, it's possible with packets?
As I explained on discord, yes it is
As I explained on discord, yes it is
https://gist.github.com/Pikachu920/f1d68b93bc2a182084cf08d9b42c26a8Where at? I'm interested lol
You can find some lists of packets at the end of the tutorial under the title “Helpful Resources”. I can’t seem to find forum threads talking about the bug you are describing so it would be good if you could send some links to these threads so I can help you further.Hello! Nice addon!
Im trying to solve a java bug on the 1.10.2, the problem is in the ride effect. When a player make a entity ride him it doesn't shown for the client. But for the others users shows. I read some forums and the problem can be solved in the packets that the server sends. But i dont find out wich packet i have to use and how. Im pretty new in this -packets stuff-.Could you help me? Thanks!
This should be approximately what you need:Hello I need Help... I am Trying to make the player getting a demo screen... Its a
Change Game State packet with reason 5. How do i write this in skript?
set {_packet} to new play_server_game_state_change packet
set int pnum 0 of {_packet} to 7 #This might be byte instead of int, not sure
set float pnum 0 of {_packet} to 0 #There are other possible values depending on what you want to show [URL]http://wiki.vg/Protocol#Change_Game_State[/URL]
send {_packet} to {_player}
set {_team_add} to new play_server_scoreboard_team packet
set int pnum 1 of {_team_add} to 0 # mode = team create
set string pinfo 0 of {_team_add} to "%attacker%" # team name
send packet {_team_add} to attacker
set {_team_option} to new play_server_scoreboard_team packet
set int pnum 1 of {_team_option} to 2 # team update
set string pinfo 0 of {_team_option} to "%attacker%" # team name
set int pnum 2 of {_team_option} to 2 # seeFriendlyInvisibles
send packet {_team_option} to attacker
set {_team_remove} to new play_server_scoreboard_team packet
set int pnum 1 of {_team_remove} to 1 # mode = team remove
set string pinfo 0 of {_team_remove} to "%player%" # team name
send packet {_team_remove} to player
on packet event play_server_scoreboard_team:
broadcast "%int pnum 0 of event-packet%"
This is the packet you want:Hello everyone I need help with my script.
What I need: send following packets to player
- scoreboard team created
- scoreboard option showFriendlyInvisibles
- scoreboard team join of attacker (event player)
- scoreboard team join of victim by uuid or id (can be other player or mob)
- potion effect of invisibility applied to victim
- scoreboard team remove
Why packets?
I've created script that allows players to pick up and throw mobs at each other. I want to make mobs half-transparent like ghosts for player that holds mob. Visible to other players so they be aware that this player might attack them, but half-transparent to current player, so he could aim better. And ghost so he doesn't forget that he holds someone. So I think I should use packets for this reason. Another reason, when using actual scoreboard team entities won't attack friendly player. In the end it should look like this:
What I got so far?
Thanks to help of Tlatoani, I've managed to make this parts of script which should work okay:
Scoreboard team create
code_language.skript:set {_team_add} to new play_server_scoreboard_team packet set int pnum 1 of {_team_add} to 0 # mode = team create set string pinfo 0 of {_team_add} to "%attacker%" # team name send packet {_team_add} to attacker
Scoreboard team option - seeFriendlyInvisibles
this is the relevant wiki.vgcode_language.skript:set {_team_option} to new play_server_scoreboard_team packet set int pnum 1 of {_team_option} to 2 # team update set string pinfo 0 of {_team_option} to "%attacker%" # team name set int pnum 2 of {_team_option} to 2 # seeFriendlyInvisibles send packet {_team_option} to attacker
Scoreboard team remove
code_language.skript:set {_team_remove} to new play_server_scoreboard_team packet set int pnum 1 of {_team_remove} to 1 # mode = team remove set string pinfo 0 of {_team_remove} to "%player%" # team name send packet {_team_remove} to player
What I'm failing at?
Scoreboard team join of entity by uuid. You see, I got code above by tracking actual scoreboards, using things like:
I matched every value and field with table from packetwrapper, to know what I send to player. But I can not find uuids or ids of entities being added to team. I assume it should be like "something array pinfo 0 of event-packet" to track it, since it's ListString, but how exactly to put it - I can't understand.code_language.skript:on packet event play_server_scoreboard_team: broadcast "%int pnum 0 of event-packet%"
Also, how do I add and remove potion effect from another entity?
Okay, I think it is, but how do I put it?This is the packet you want:
it's the string array.
like wiki.vg says, for players its the player nameOkay, I think it is, but how do I put it?
set string array pinfo 0 of event-packet to "%attacker%" ? Or attackers uuid, or json something?
Yea, this part I get, player name or uuid of entity, but is this proper way?like wiki.vg says, for players its the player name
set {_team_join_a} to new play_server_scoreboard_team packet
set int pnum 1 of {_team_join_a} to 3 # team add players
set string pinfo 0 of {_team_join_a} to "%attacker%" # team name
set string array pinfo 0 of {_team_join_a} to "%attacker%" # player to add
send packet {_team_join_a} to attacker
set {_team_join_v} to new play_server_scoreboard_team packet
set int pnum 1 of {_team_join_v} to 3 # team add players
set string pinfo 0 of {_team_join_v} to "%attacker%" # team name
set string array pinfo 0 of {_team_join_v} to "%entity uuid of victim%" # entity to add
send packet {_team_join_v} to attacker
Nowhere does it say player name or uuid of entity, it says player name for players and uuid for other entitiesYea, this part I get, player name or uuid of entity, but is this proper way?
code_language.skript:set {_team_join_a} to new play_server_scoreboard_team packet set int pnum 1 of {_team_join_a} to 3 # team add players set string pinfo 0 of {_team_join_a} to "%attacker%" # team name set string array pinfo 0 of {_team_join_a} to "%attacker%" # player to add send packet {_team_join_a} to attacker set {_team_join_v} to new play_server_scoreboard_team packet set int pnum 1 of {_team_join_v} to 3 # team add players set string pinfo 0 of {_team_join_v} to "%attacker%" # team name set string array pinfo 0 of {_team_join_v} to "%entity uuid of victim%" # entity to add send packet {_team_join_v} to attacker
As I see no effect in game. And packet tracker shows packets fields being sent - mode of packet (create team, remove team, add entities) but <none> in string array pinfo 0 of event-packet, no uuids or ids or names.
Hm.. In this script there is check that attacker is always player, and by writing "%attacker%" I'm telling player's name. "%entity uuid of victim%" is skellett's expression, and in my tests I'm hitting sheeps and cows, so it should work, as it is working with regular scoreboards via "execute console command..." (my video). So is my code correct, assuming it's always name for player and always uuid for mobs? Coz I see no effect (regular potion effect applied to mob, and since packet is telling that we are in same team, it should be ghost?)Nowhere does it say player name or uuid of entity, it says player name for players and uuid for other entities
You're passing the string array the wrong info. read the notes for it or read what i said aboveHm.. In this script there is check that attacker is always player, and by writing "%attacker%" I'm telling player's name. "%entity uuid of victim%" is skellett's expression, and in my tests I'm hitting sheeps and cows, so it should work, as it is working with regular scoreboards via "execute console command..." (my video). So is my code correct, assuming it's always name for player and always uuid for mobs? Coz I see no effect (regular potion effect applied to mob, and since packet is telling that we are in same team, it should be ghost?)
I could find no examples of working with string arrays and this is the very first time I need it, as I'm no java programmer or something. Do I need to pay you to get exact working code? How about, I put 5USD on your paypal and you give me code that I can copy-paste which would (1) add player and mob-entity to same team, (2) give mob-entity invisibility for given time so it can be seen as ghost only for event-player (and normal to others), (3) then remove team and (4) remove effect from entity?You're passing the string array the wrong info. read the notes for it or read what i said above
I'm good. You don't need to know Java either. As far as I can tell the only issue is your passing the wrong thing. You can ignore the fact it's a string array because that isn't relevant, you're just putting into the wrong input. if you look at the wiki.vg description it explains the input you need (I'm assuming the victim is a player).I could find no examples of working with string arrays and this is the very first time I need it, as I'm no java programmer or something. Do I need to pay you to get exact working code? How about, I put 5USD on your paypal and you give me code that I can copy-paste which would (1) add player and mob-entity to same team, (2) give mob-entity invisibility for given time so it can be seen as ghost only for event-player (and normal to others), (3) then remove team and (4) remove effect from entity?
I'm trying to understand, how exactly I should write this line, what field to modify (for example string pinfo 0 of {_packet}), how is it called and what to feed into it, should it be plain text, or list varible or some kind of json.I'm good. You don't need to know Java either. As far as I can tell the only issue is your passing the wrong thing. You can ignore the fact it's a string array because that isn't relevant, you're just putting into the wrong input. if you look at the wiki.vg description it explains the input you need (I'm assuming the victim is a player).
set {_team_join} to new play_server_scoreboard_team packet
set int pnum 1 of {_team_join} to 3 # team add players
set string pinfo 0 of {_team_join} to "%{_teamname}%"
set collection array pinfo 0 of {_team_join} to "%attacker%", "%entity uuid of victim%"
send packet {_team_join} to attacker