Registering a specific item on player's head

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

    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!

DannyDaMannyy

Member
Dec 16, 2023
20
1
3
Hello again! I hope there isnt a limit to how many posts I can make, and I hope Im not bugging anyone by asking for help a few different times in short order. Thank you, Shroob, for helping me out the last two times! So, the problem: I need to make it so when a player with a black banner on their head clicks on a specific block, in the specific flag region, the banner on their head is removed, and a banner placed on the block in the region. However, I cannot get Skript to understand the condition: "If player has 1 of black_banner", or "if inventory of player contains: etc". Ive tried a few different ways of going about this, and while Ive gotten each of them to stop spitting out errors, they still do not work. the script does not continue. Maybe Im missing something simple?
Here is my attempt:



on click:
set {_number} to 1
set {_item} to black_banner
if event-block is gold_block:
if "%region at event-block%" contains "red" and "in world SMP_World":
if player is wearing a helmet named "black_banner": #UGH WORK YOU PIECE OF CRAP! HOW DO I GET THE DANG THING TO REGISTER IF IM WEARING A HELMET?!
set helmet of player to air
set block at location at 12131, 72, 1408 in world "SMP_World" to black banner
send title "" with subtitle "&l&cRED &aTEAM CONTROLS THE FLAG!" to all players
play sound "block.note_block.pling" at volume 1 at pitch 2 to all players


Thanks for any help!
 
Number one, use code blocks, they're very helpful for code readability
Number two, the correct alias for black banner is "black standing banner". You can check the Skript alias for any item by holding it and broadcasting your tool.