#auto compressor not work

1 messages · Page 1 of 1 (latest)

alpine atlas
#

i looked for working skript for 2hours couldnt find

hot drum
#

in what waay is it not working?

#

error?

#

or just not functioning as intented

#

im pretty sure it doesnt give anymore oak wood because the compressed oak wood is still oak wood

alpine atlas
#

after it gives 1 compressed wood it doesnt give anymore

hot drum
#

im pretty sure it doesnt give anymore oak wood because the compressed oak wood is still oak wood

#

your checking if player has 64 oakwood

#

thaats checking if it is exaactly 64

#

which it wont be you have 65 oak wood

#

because you have the compressed oak

#

you need to check if its over or equl to 64

#

so remove the "plaayer hs 64 ok wood"

alpine atlas
#

and wht to write then?

blissful chasm
#

Oak wood named “xyz”?

hot drum
#

i think it will work then

#

dont replace it with anything

#

you already know that they have over 64 oak wood

alpine atlas
#

ok leemme try

long marsh
#

why round() not floor()??

alpine atlas
#

no idea idk what that means

alpine atlas
#

i tried this: i took 3 stacks of wood and i breaked block and got only 1 compressed

#

i should have got 3

hot drum
#

did you lose all the wood?

alpine atlas
#

yeah

hot drum
#

thats because

#

the compressed oak

#

is still oak

#

make it like concrete powder instead or something

long marsh
long marsh
alpine atlas
#

alright

alpine atlas
long marsh
#

i would

#

then you dont need the loop

#

or the check

hot drum
alpine atlas
#

thank you s much

#

@long marsh @hot drum can someone of you please teach how to use functions

#

what do i write to make this a function?

    if player has brown dye in inventory:
        set {_a} to amount of oak wood in player's inventory
        if {_a} >= 64:
            set {_b} to floor({_a} / 64)
            loop {_b} times:
                remove 64 oak wood from player
                give 1 oak slab named "&e&lCompressed Wood" to player```
hot drum
#

why do you want it to be a function?

alpine atlas
#

just to make it quicker

hot drum
#

a function wont be any quicker

alpine atlas
#

fr?

hot drum
#

no

#

i mean

#

yes

#

it wont make it quicker

alpine atlas
#

you could just do on
pick up:
function(wood)
function(stone)

#

and shi

hot drum
#

oooh

#

i get what you mean

alpine atlas
#

yeah

hot drum
#

so like you want it to make it so you just have an input and thats what it compresses?

alpine atlas
#

wdym

hot drum
#

i think i get what you want

#

youd go like

alpine atlas
#

i just want to write all functions on pickup

hot drum
#

huh

#

i think in that case function wouldent be helpfull

alpine atlas
#

so do i just do for example like this::

    if player has brown dye in inventory:
        set {_a} to amount of oak wood in player's inventory
        if {_a} >= 64:
            set {_b} to floor({_a} / 64)
            loop {_b} times:
                remove 64 oak wood from player
                give 1 oak slab named "&e&lCompressed Wood" to player
    if player has blue dye in inventory:
        set {_a} to amount of diamond in player's inventory
        if {_a} >= 64:
            set {_b} to floor({_a} / 64)
            loop {_b} times:
                remove 64 diamond from player
                give 1 diamond block named "&e&ldiamond block" to player```
hot drum
#

sure

alpine atlas
#

okey

hot drum
#

theres no reason to make those into functions its just more lines of code if you do that

#

its more effecient to not use functions in this case

alpine atlas
#

alright just saw somewhere thought its cool

#

alr alr thanks