#custom farming

1 messages · Page 1 of 1 (latest)

ruby sundial
#

Can someone help me make custom enchants for farming? Like wheat.

wooden mural
#

yeah, people can help you with an issue

#

if you let them know what the issue is

ruby sundial
#

mb for the ping

#

forgot to turn it off

ruby sundial
# still estuary what enchants

like explosion so radius of 3 blocks all aroudn the player and it spawns a tnt but it doesnt do any damage to the blocks and then it gives u the wheat in the inventory

#
on mine:
    if event-block is in the region "wheat":
        if event-block is fully grown wheat plant:
            if gamemode of player is survival:
                cancel drops
                play sound "entity.experience_orb.pickup" with volume 0.1 to the player
                add 1 to {exp::%player's uuid%}
                give player 1 wheat named "&e&lWheat &8[&e✯&8]" with lore "&7Rarity: &a&lCOMMON"
            chance of 10%:
                give player 1 wheat named "&e&lWheat &8[&e✯✯&8]" with lore "&7Rarity: &2&lUNCOMMON"
            chance of 1%:
                give player 1 wheat named "&e&lWheat &8[&e✯✯✯&8]" with lore "&7Rarity: &3&lRARE"
            chance of 0.1%:
                give player 1 wheat named "&e&lWheat &8[&e✯✯✯✯&8]" with lore "&7Rarity: &5&lEPIC"
            chance of 0.01%:
                give player 1 wheat named "&e&lWheat &8[&e✯✯✯✯✯&8]" with lore "&7Rarity: &e&lLEGENDARY"
            chance of 0.001%:
                give player 1 wheat named "&e&lWheat &8[&b✯&e✯✯✯✯&8]" with lore "&7Rarity: &8&lSECRET"
            else:
                wait 1 second
                set event-block to stage 8 wheat plant
#

my custom wheat.

still estuary
#

hmm

#

I think you could make it so

#

when you mine there is a chance that a tnt spawns with a custom metatag and then check for that metatag and if its true then cancel the damage and give the player 9 wheat

still estuary
#

wait

#

u could just disable explosions

#

xD

ruby sundial
#

something like that?

still estuary
#

umm not really

#
    if lore of player's item contains "(name of enchantment)":
     #do stuff```
ruby sundial
#

but what if i want to have more enchants

#

like

#

the max enchant level be 100 for a example

#

and then each time

still estuary
#

wait

#

u want there to be a chance to activate?

ruby sundial
#

ye

#

s

#

please

still estuary
#

hmm

#

I am not that good at skripting

ruby sundial
#
on mine:
    if player's tool is a pickaxe:
        if {jh.level} is not set:
            set {jh.level} to 1
        set {_alllores::*} to lore of player's tool split at "||"
        set {_line} to 0
        loop {_alllores::*}:
            add 1 to {_line}
            if "%loop-value%" contains "Jackhammer":
                set {_jh.line} to line {_line} of lore of player's tool
                set {_jh.line.set} to uncolored {_jh.line}
                replace all " " in {_jh.line.set} with ""
                replace all "Jackhammer" in {_jh.line.set} with ""
                set {jh.level} to {_jh.line.set} parsed as an number
                set {_chance} to 0.00035*{jh.level}
                chance of {_chance}%:
                    set {_y} to y coordinate of event-block
                    loop blocks in radius 100 around event-block:
                        if "%region at loop-block%" contains "mine":
                            if y coordinate of loop-block = {_y}:
                                if {_n} is 750:
                                    set {_n} to 0
                                    wait 15 ticks
                                set {_n} to {_n} + 1
                                give player 1 of loop-block
                                set loop-block to air
                                add 1 to {experince.%{item}%.amount}
                                add 1 to {mined.%{item}%.amount}
                                set {_loc} to location of loop-block
                                drawDot count 1, particle "explosion", XYZ 0, 0, 0, center {_loc}, visibleRange 55, keepFor 0 
#

i seen something like this

#

but

#

idkk

still estuary
#

Neither do I know how to do it xD

#

sorry

#

if there was 1 level it would be easy

#

but like 100 levels

#

the only way I can think of is to use

#

on break:
#check for lore in players item
#do stuff

#

and do that 100 times

ruby sundial
#

i see

still estuary
ruby sundial
wooden mural
#

add 1 to {_line}
If you are on 2.8+ you can use loop-iteration

#

same for {_n}

#

that else is going to trigger after the last chance, not the first if.

#

theres also a lot of repetition there, you can narrow it down to like 4 lines