Mining - Fortune + exploding

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

Kondii

Member
Jun 29, 2017
17
1
3
25
Skript version: 2.1.2
Skript addons: SkQuery (3.22.1) , WildSkript (1.8), SkRayFall (1.9.7), PirateSk (0.4.1)

Hi so i want to make a exploding skript. Is there a way that the fortune works on ores when you are mining with exploding. Is there a way that the block gets breaked and the ore gets mined with fortune? My code is:
Code:
On Break:
    if player can build at targeted block:
        if lore of player's tool is "&8[&6&lSprægning Lvl 1&8]":
            loop blocks in radius 1.8 around the targeted block:
                if loop-block is stone:
                    give player 1 stone   
                    set loop-block to air
                if loop-block is coal ore:
                    give player 3 coal
                    set loop-block to air
                if loop-block is iron ore:
                    give player 3 iron ingot
                    set loop-block to air
 
It works almost and breaks the blocks around. But it doesn't drop anything. Only the block that you break? Do i need to add the ores to players inventory or on the ground?
Try making it drop the item about a second after the explosion happens.
 
U can try:
code_language.skript:
On Break:
    if player can build at targeted block:
        if lore of player's tool is "&8[&6&lSprægning Lvl 1&8]":
            create a fake explosion at targeted block
            loop blocks in radius 1.8 around the targeted block:
                if loop-block is stone:
                    drop 1 of loop-block
                    set loop-block to air
                if loop-block is coal ore:
                    drop 3 of loop-block
                    set loop-block to air
                if loop-block is iron ore:
                    drop 3 of loop-block
                    set loop-block to air
 
Status
Not open for further replies.