Making a Magic Feather

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

Kranity

Member
Nov 19, 2019
1
0
1
22
Hi guys, I'm currently making a Magic Feather. The means of this type of skript is mainly for a 'new' way to break blocks. I've gotten alot of help from this site obviously from other threads. But this problem i can't seem to find anywhere...

First Problem:

I simply cannot rename a specific item in the players inventory. I know that i can set the name of player's held item to a specific name. Tho my problem is that, the player can quickly change slot, and the wrong item would be rename...

Heres my skript (don't know how to make it nice and neat.)

Code:
on rightclick:
    if held item is a feather:
        if name of held item contains "&7Magisk Fjer &f(":
            if {uses.%player%} is less than or equal to 2:
                loop {Lumber.Mines.oak::*}:
                    if {Lumber.Mines.oak::%loop-index%} is equal to location of event-block:
                        add 1 to {uses.%player%}
                        set name of player's tool to "&7Magisk Fjer &f(%{uses.%player%}% / 3)"
                        loop 10 times:
                            show block break stage loop-number at event-block
                            wait 10 ticks
                        set event-block to air
                        remove 1 from {uses.%player%}
                        set name of player's tool to "&7Magisk Fjer &f(%{uses.%player%}% / 3)"
                        wait 1 minute
                        set event-block to oak log

Second Problem:

I can't seem to find a way, to simulate a block breaking. I've used someone's code:
Code:
loop 10 times:
                            show block break stage loop-number at event-block
                            wait 10 ticks
                        set event-block to air

Dosen't exactly work, there's no errors when reloading, either in console. But it just dosen't work.
Code:
loop 10 times:
                            show block break stage loop-number at event-block
                            wait 10 ticks
                        set event-block to air
 
Last edited:
Hi guys, I'm currently making a Magic Feather. The means of this type of skript is mainly for a 'new' way to break blocks. I've gotten alot of help from this site obviously from other threads. But this problem i can't seem to find anywhere...

First Problem:

I simply cannot rename a specific item in the players inventory. I know that i can set the name of player's held item to a specific name. Tho my problem is that, the player can quickly change slot, and the wrong item would be rename...



Code:
on rightclick:
    if held item is a feather:
        if name of held item contains "&7Magisk Fjer &f(":
            if {uses.%player%} is less than or equal to 2:
                loop {Lumber.Mines.oak::*}:
                    if {Lumber.Mines.oak::%loop-index%} is equal to location of event-block:
                        add 1 to {uses.%player%}
                        set name of player's tool to "&7Magisk Fjer &f(%{uses.%player%}% / 3)"
                        loop 10 times:
                            show block break stage loop-number at event-block
                            wait 10 ticks
                        set event-block to air
                        remove 1 from {uses.%player%}
                        set name of player's tool to "&7Magisk Fjer &f(%{uses.%player%}% / 3)"
                        wait 1 minute
                        set event-block to oak log

Second Problem:

I can't seem to find a way, to simulate a block breaking. I've used someone's code:
Code:
loop 10 times:
                            show block break stage loop-number at event-block
                            wait 10 ticks
                        set event-block to air

Dosen't exactly work, there's no errors when reloading, either in console. But it just dosen't work.
Code:
loop 10 times:
                            show block break stage loop-number at event-block
                            wait 10 ticks
                        set event-block to air
The first problem can be solved by the hotbar slot expression, along with slot X of player. Before any delays, set a variable to the hotbar slot. Then use the slot X expression after delays. For the second issue, you could use packets if the addons aren't working.
 
Status
Not open for further replies.