#ok I have a few questions

1 messages · Page 1 of 1 (latest)

weak siren
#

Hello, I am creating a prison server, and I have a few questions.

  1. How do I make it so when giving a player a pickaxes it comes already with efficiency?

  2. Let’s say that {enchants::fortune::%player’s uuid%} = 0

And {enchants:💣:player’s uuid%} = 5

How would I put on a pickaxe the enchantments of bomb and fortune, as long as they’re > 0?

For example:
Only

Bomb 5

urban anvil
#

Well bomb is not an enchant
for fortune you can use the enchant effect from Skript

weak siren
#

So how would I make a enchant to resemble bomb and how would that work

urban anvil
#

You want to make a custom enchant?

weak siren
#

Well I want them to display as a lore

urban anvil
#

Then add it to the item's lore

weak siren
#

But how do I not have it if it’s 0?

#

I want it to display only above 0

urban anvil
#

use a condition
a simple if check

#
    # do stuff
weak siren
#

Yeah but how do I add it to the lore though

urban anvil
weak siren
#

I’m so confused

#

I’ll send my code here in a bit

weak siren
#
    set slot 0 of {_P}'s inventory to air
    wait 1 tick
    set slot 0 of {_P}'s inventory to unbreakable diamond pickaxe named "&b%{_P}%'s Pickaxe" with lore "&aBlocks Mined: &7%{blocks::mined::%{_P}'s uuid%}%" and "" and "&6Enchantments:" and "&8➲ &bFortune %{pick::enchants::fortune::%{_P}'s uuid%}%" and "&8➲ &bEfficiency 100"```
#

so

#

for the enchants

#

how do I make it so they dont appear if they are > 0

weak siren
#

@urban anvil

urban anvil
#

set the slot to the pickaxe without any lore
and then on the next line do a condition if {pick::enchants::fortune::%{_P}'s uuid%} is more than 0 to add "&8➲ &bFortune %{pick::enchants::fortune::%{_P}'s uuid%}%" to the item's lore
quite basic

weak siren
#

also

#

how would I do that in a function

placid tinsel
#

Exactly the same way, except with the parameters you use in the function

weak siren
#

bc i cant find it

velvet copper
#

Are you talking about a single type of pickaxe or will this be something player's can scale up to better picks?

weak siren
#

so basically

#
    set slot 0 of {_P}'s inventory to air
    wait 1 tick
    set slot 0 of {_P}'s inventory to unbreakable diamond pickaxe of efficiency 100 named "&b%{_P}%'s Pickaxe" with nbt compound from "{HideFlags:61}"
    add "" to {_P}'s item's lore
    add "&bEnchants" to {_P}'s item's lore
    if {pick::enchants::explosion::%{_P}'s uuid%} >= 1:
        add "&b&l| &fExplosion %{pick::enchants::explosion::%{_P}'s uuid%}%" to {_P}'s item's lore
    if {pick::enchants::fortune::%{_P}'s uuid%} >= 1:
        add "&b&l| &fFortune %{pick::enchants::fortune::%{_P}'s uuid%}%" to event-item
    add "" to {_P}'s item's lore```
#

this is what I was trying to make

#

but idk how to make it add it to it

#

the lore in a function

velvet copper
#

Set the pickaxe with everything it should have first. It can be a single line

weak siren
#
    set slot 0 of {_P}'s inventory to air
    wait 1 tick
    set slot 0 of {_P}'s inventory to unbreakable diamond pickaxe of efficiency 100 named "&b%{_P}%'s Pickaxe" with lore "" and "&bEnchants" with nbt compound from "{HideFlags:61}"
    if {pick::enchants::explosion::%{_P}'s uuid%} >= 1:
        add "&b&l| &fExplosion %{pick::enchants::explosion::%{_P}'s uuid%}%"
    if {pick::enchants::fortune::%{_P}'s uuid%} >= 1:
        add "&b&l| &fFortune %{pick::enchants::fortune::%{_P}'s uuid%}%"```
velvet copper
#
set {-pickvar} to diamond pickaxe named "whatever" with lore "something", "something else" and "something entirely different" with nbt compound from "{whatever:you, need:to, have:tagged}" 
weak siren
#

yeah but i want it to make it so it checks if an enchantment variable is above 0, it puts it into the lore

velvet copper
#

in the function?

#

okok so {pick::enchants::fortune::%{_P}'s uuid%} is something players can scale ?

weak siren
weak siren
#

I set the variable to a number

velvet copper
#

And player's can make that variable go higher?

weak siren
#

yes

velvet copper
#

ok

#

So basicly if player has {pick::enchants::fortune::%{_P}'s uuid%} set to 3. Their pick should have fortune 3?

#

Also why are you setting the slot to air first? Can you send the command or whatever triggers your function?

weak siren
#

and I set it to air so it resets it

velvet copper
#

You can dm me too if u want

weak siren
velvet copper
#

U got SkBee?

weak siren
#

yes

velvet copper
#

U should check for nbt compound tags instead of name of item

#

ok lines 56 and 28 of ur file. What are you trying to add those strings to?

#

lore?

weak siren
#

lore

#

yes

#

@velvet copper

velvet copper
#
function pick(p: player):
    set slot 0 of {_P}'s inventory to air
    wait 1 tick
    set {_pick} to unbreakable diamond pickaxe of efficiency 100 named "&b%{_P}%'s Pickaxe" with lore "" and "&bEnchants" with nbt compound from "{HideFlags:61, doNotDrop:true}"
    set slot 0 of {_P}'s inventory to {_pick}
    if {pick::enchants::explosion::%{_P}'s uuid%} is more than 0:
        add "&b&l| &fExplosion %{pick::enchants::explosion::%{_P}'s uuid%}%" to lore of slot 0 of {_P}'s inventory
    if {pick::enchants::fortune::%{_P}'s uuid%} is more than 0:
        add "&b&l| &fFortune %{pick::enchants::fortune::%{_P}'s uuid%}%" to lore of slot 0 of {_P}'s inventory

on break:
    if player's gamemode = survival:
        if tag "doNotDrop" of nbt item compound of player's tool is 1:
            cancel drops

on right click:
    if tag "doNotDrop" of nbt item compound of player's tool is 1:
        enchantMenu(player)

on drop:
    if tag "doNotDrop" of nbt item compound of event-item is 1:
        cancel event

Here are some suggestions

#

@weak siren

#

forgot the on drop

#

updated it

weak siren
#

omg thanks @velvet copper

burnt hatch
#

@weak siren Please Mark Solved