Solved Looting with Custom mob drops

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

_Jeeper_Creeper_

New Member
Jun 24, 2019
6
0
0
23
I was trying to add custom mob drops that were affected by the amount of looting a sword had. this is my skript

Code:
on death:
    if victim is pig:
        if colored name of victim is "&7Pig &8(&c1&8)":
            clear drops
            remove all xp from drops
            chance of 15%:
                drop 1 exp at victim's location
                exit
            set {_looting} to level of looting of player's tool + 1
            drop {_looting} raw porkchop named "&f&lRaw Pork" with lore "" and "&8Rarity:&7 Common" at victim's location

the error is in the line below

Code:
drop {_looting} raw porkchop named "&f&lRaw Pork" with lore "" and "&8Rarity:&7 Common" at victim's location
 
Last edited:
1) I don't see an error, I see a line of code.
2) you need to add "of" like "drop 1 of blah blah"
I added the "to" part, but it will only drop one. for example if my looting level is 3, it should drop 4, but 1 is dropped instead.
[doublepost=1578265723,1578113468][/doublepost]bump
 
Status
Not open for further replies.