My Skript isn't working.. Can anyone 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 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.

RkAdventures

Member
Jun 27, 2022
1
0
1
17
I'm working on an rpg server and I'm trying to make wolves that drop one bone when killed, this works. But I'm making a weapon that when killing them puts the items straight into the players inventory. My Code:

if attacker's held item is iron shovel named "&7Bone Drill":

stop

else:

on death:

victim is wolf:

set {_drop} to bone named "&8Wolf Bone"

drop {_drop} at victim's location

This is my first time trying conditions, the if and stop work but its saying it doesn't understand else and doesn't understand the iron shovel bit (I attached a photo of the error message)

Here is the other part of the code that drops the 2x items and is ment to put it into your inventory:

on death:

victim is wolf:

if attacker's held item is iron shovel named "&7Bone Drill":

give attacker 2 bones named "&8Wolf Bone"

If anyone has any idea what's going wrong and how I can fix it I would be grateful. Thanks! :emoji_slight_smile:
upload_2022-6-27_1-3-23.png
upload_2022-6-27_1-3-43.png
upload_2022-6-27_1-3-52.png
 

Attachments

  • upload_2022-6-27_1-3-6.png
    upload_2022-6-27_1-3-6.png
    1.6 KB · Views: 78
You can't put on death in an if/else statement

Haven't tested it but does this work?
Code:
on death:
    victim is wolf:
        if attacker's held item is iron shovel named "&7Bone Drill":
            give attacker 2 bones named "&8Wolf Bone"
            stop

        set {_drop} to bone named "&8Wolf Bone"
        drop {_drop} at victim's location
 
Status
Not open for further replies.