I need help

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

rangseo

Member
Apr 12, 2025
1
0
1
variables:
{좀기사드랍템} = 1
{좀기사드랍랜박수} = 1

on death of a zombie:
if name of victim is "&6좀비 기사":
clear drops
set {좀기사드랍템} to random integer between 1 and 100
if {좀기사드랍템} is between 1 and 10:
drop 1 netherite sword of sharpness 5 smite 5 looting 3 sweeping 3 fire aspect 2 of unbreakable named "&c좀비 기사의 검" with lore "&f타격 시 나약함과 허기를 부여한다." at victim
broadcast "&6좀비 기사의 검이 드롭되었습니다!!"
execute console command "/playsound minecraft:ui.toast.challenge_complete master @a ~ ~ ~ 100 1 1"

if {좀기사드랍템} is between 11 and 100:
set {좀기사드랍랜박수} to random integer between 1 and 10
drop {좀기사드랍랜박수} chest named "&6광물 랜덤박스" with lore "&f우클릭 시 랜덤 광물이 지급된다." with nbt from "{max_stack_size:1}" at victim

on damage:
if attacker's tool is netherite sword named "&c좀비 기사의 검":
apply hunger 20 to victim for 2 seconds
apply weakness 3 to victim for 2 seconds

* korean is just text.

I don't know why this script doesn't work and I'm Korean so I'm not good at English. Please understand.
 
this should work
Code:
variables:
    {좀기사드랍랜박수} = 1

on death of a zombie:
    if name of victim is "&6좀비 기사":
        clear drops

        chance of 10%:
            drop 1 netherite sword named "&c좀비 기사의 검"
            with lore "&f타격 시 나약함과 허기를 부여한다."
            of sharpness 5, smite 5, looting 3, sweeping edge 3, fire aspect 2
            and unbreakable at victim
            broadcast "&6좀비 기사의 검이 드롭되었습니다!!"
            execute console command "/playsound minecraft:ui.toast.challenge_complete master @a ~ ~ ~ 100 1 1"

        else:
            set {좀기사드랍랜박수} to a random integer between 1 and 10
            drop {좀기사드랍랜박수} chest named "&6광물 랜덤박스"
            with lore "&f우클릭 시 랜덤 광물이 지급된다."
            with nbt "{max_stack_size:1}" at victim

on damage:
    if attacker's tool is netherite sword named "&c좀비 기사의 검":
        apply hunger 20 to victim for 2 seconds
        apply weakness 3 to victim for 2 seconds