#Autocompressor item same as compressed item

1 messages · Page 1 of 1 (latest)

heavy urchin
#

I am trying to make it so the item u get from the auto compressor stacks with the item from the villager that trades it. It has the exact same enchantments , flags , name and everything but it wont stack. Does Anyone Know How To Fix it?
Code:

 if player's inventory contains a dispenser named "&7Nether Auto Compressor":
  if event-block is netherrack:
   if player's inventory contains 64 of plain netherrack:
    remove 64 of plain netherrack from player's inventory
    give player 1 of unbreakable netherrack of mending named "&4Compressed Netherrack" with hidden enchants flag```
final cradle
#

Save the item in a var and give that var in the trade and in this code

heavy urchin
#

wym by that

#

I dont know how to use variables

#

u mean set {.item} to netherrack named "'

#

amd then give {_item} to player?

final cradle
#

.item and _item aren’t the same

heavy urchin
#

oh -

#

so its like

#

wait now I am confused

umbral thistle
#

dont use _ if ur not trying to use local variables and if u wanna create a variable then set {item] xxxxxxx

heavy urchin
#

well ok but that doesnt help with the issue

#

I dont get what variables have to do with it

umbral thistle
#

u want to save the items in a var if u wanna continue

#

a local var would be better tho in this case

#

so add a _

heavy urchin
#

wait

#

so u like want me to make a diffrent skript

#

which says like
set {_item} to netherrack named "&cNetherrack"

#

I am planning to make over 120 auto compressors

#

I dont think thats efficient at all

#

because u have to change the {_item} each time to something else

umbral thistle
#

thats for normal vars. without _

#

ur using a local var

#

a local var "disappears" after

heavy urchin
#

so like
set {item} to 1 of unbreakable netherrack of mending named "&cCompressed Netherrack" With Enchants Flag Hidden

#

Basically This?

 if player's inventory contains a dispenser named "&7Nether Auto Compressor":
  if event-block is netherrack:
   if player's inventory contains 64 of plain netherrack:
    remove 64 of plain netherrack from player's inventory
    set {_item} to unbreakable netherrack of mending named "&4Compressed Netherrack" with hidden enchants flag
    give player 1 of {_item}```
ember spire
#

No, do it with an _ in the variable

#

Var

heavy urchin
#

Doesnt work tho

#

The Skript Works And It Gives The Netherrack But It Doesnt Stack With The Other Version If It That Seems The Same But Doesnt Stack For Some Reason

safe coyote
#

hm

heavy urchin
#

This Is The Old Version Of The Compressed:

safe coyote
#

so

heavy urchin
#

And This Is The New One:

#

They Dont Stack-

safe coyote
#

did u apply every flag

heavy urchin
#

yeah they are the exact same

#

same name

ember spire
#

Just remove 1 of when you're setting the variable maybe?

heavy urchin
#

same flags

ember spire
#

Cause you were giving 1 of 1 of item

heavy urchin
ember spire
#

Look at where you set the variable

safe coyote
ember spire
#

remove 1 of where you set the local var

safe coyote
#

u can get a mod called ibe editor

#

and check nbt of both item

#

or

#

make like a command which send the nbt

heavy urchin
#

This @ember spire
on mine:
if player's inventory contains a dispenser named "&7Nether Auto Compressor":
if event-block is netherrack:
if player's inventory contains 64 of plain netherrack:
remove 64 of plain netherrack from player's inventory
set {_item} to unbreakable netherrack of mending named "&4Compressed Netherrack" with hidden enchants flag
give player 1 of {_item}

ember spire
#

bor

#

can you stop pinging me please?

heavy urchin
heavy urchin
ember spire
#

... you're still doing it

heavy urchin
#

oh yeah ./:

safe coyote
heavy urchin
#

it works

#

but it stacks with the new one

#

I want it to stack with the old one

ember spire
#

wdym

heavy urchin
#

which has diffrent nbt ig

ember spire
#

I don't think you can

heavy urchin
ember spire
#

Just make it only the new one

heavy urchin
#

its gonna take 2 years to remake 120 mines of compressed stuff and change everything that u trade them for

ember spire
#

fine you can do it

#

this

#

lemme help

#

So, make a command to set a variable (say {items::netherrack}) to your tool. Then, in the autocomp skript, you can give the player that variable and it'll give that item.

heavy urchin
#

wait

#

I got the nbt of both items

#

if this will help

ember spire
#

I don't think you need it

heavy urchin
#

Old version:

ember spire
#

You can do what I said

#

It'll let you stack them I think

heavy urchin
#

so a command that saves an item to a variable

#

and then give the item?

ember spire
#

yes

#

oui

heavy urchin
#

so like

    trigger:
     save {items::netherrack} to player's too```
ember spire
#

probably set a permission

#

Also you forgot a : on the first line

#

and also it's set not save I think

heavy urchin
#

hmm ok

safe coyote
#

any progress?

heavy urchin
#

it keeps saying to me to make everything in the same line

    permission:
    trigger:
     save {items::netherrack} to player's tool```
and then it says it doesnt understand the condition command /saveitem , it doesnt understand the condition trigger:
heavy urchin
safe coyote
#

mhm

ember spire
#

It's its

#

own

#

event

#

No indentation

heavy urchin
#

now I am confused 💀

heavy urchin
#
    permission:
    trigger:
     save {items::netherrack} to player's tool```
Is the exact same like how it says in the link?
safe coyote
# heavy urchin now I am confused 💀
    permission: op
    trigger:
        send "%nbt of player's tool%"```

yo listen put snippet in ur server run the command while holding the items send a screen shot of nbt then compare both nbt
ember spire
#

you need a permission

#

okay whatever lmao

#

I'll just let you do what you want...

safe coyote
#

bro they re just new to skript i think

heavy urchin
#

I have the nbt of both items?

#

I can send

safe coyote
#

yes send

ember spire
heavy urchin
#

Old Version Is:

#

New Version:

safe coyote
#

bro there so much difference

ember spire
#

ypu

#

yup

heavy urchin
#

wait

#

one is hideflags: 1

safe coyote
#

yes

#

then

ember spire
#

It's because you hid all flags using itemedit

#

and you didn't with skript

heavy urchin
#

I used an item generator for nether because I didnt know how to use itemedit

#

its not even itemedit its item generator xD

ember spire
#

use itemedit???

heavy urchin
#

Now I do

#

back then I didnt

#

thats the issue

safe coyote
#

well now ur only option is to replace all trades

#

u cant make the same item using skript

heavy urchin
#

gosh

safe coyote
heavy urchin
#

I am gonna have a real nice time

ember spire
#

Well, you could

#

with the way I said, I'm pretty sure...

heavy urchin
#
    permission:
    trigger:
     save {items::netherrack} to player's tool```
the command doesnt work tho?
#

let me try to fix

ember spire
#

You need to change it to

#

set instead of save

#

you need to set a permission, such as op

heavy urchin
#

fixed

ember spire
#

alr

#

fr

heavy urchin
#

the new version is:

command /saveitem:
 permission: op
 trigger:
  set {items::netherrack} to player's tool```
#

now I ma try the command

heavy urchin
#

wait let me make it send a message so I know it worked :Skull:

ember spire
#

well, that's now setting only one item

#

with a general cmd

#

but that's fine for now ig

heavy urchin
#

ok I did it

#

now do I have to make it like

ember spire
#

alright now later in the skript give them 1 of the variable

heavy urchin
#

give {item::netherrack} to player

#

?

ember spire
#

(You can save the variable to the old netherrack)

#

yes

#

do that

heavy urchin
#

hmm

#

The skript sais no errors

ember spire
#

send code

heavy urchin
#

but when I reach 64 netherrack

#

it takes it from inv

#

and I get nothing

ember spire
#

remove 64 of plain netherrack

heavy urchin
#
 if player's inventory contains a dispenser named "&7Overworld Auto Compressor":
  if event-block is netherrack:
   if player's inventory contains 64 of plain netherrack:
    remove 64 of plain netherrack from player's inventory
    give player 1 of {item::netherrack}```
ember spire
#

???

#

ohhh

#

remove the 1 of

#

I think

heavy urchin
#

ok

ember spire
#

And then also set the variable again

heavy urchin
#

hmm still nothing

ember spire
#

send full code

heavy urchin
#

u mean do the /saveitem command again

ember spire
#

yes

heavy urchin
#
 if player's inventory contains a dispenser named "&7Overworld Auto Compressor":
  if event-block is netherrack:
   if player's inventory contains 64 of plain netherrack:
    remove 64 of plain netherrack from player's inventory
    give player {item::netherrack}```
#
command /saveitem:
 permission: op
 trigger:
  set {items::netherrack} to player's tool
  send message "&7Saved The Item" To Player```
ember spire
#

hmmmm

#

it's items

#

not item

#

you messed up

heavy urchin
#

in which part of what code

#
 if player's inventory contains a dispenser named "&7Overworld Auto Compressor":
  if event-block is netherrack:
   if player's inventory contains 64 of plain netherrack:
    remove 64 of plain netherrack from player's inventory
    give player {items::netherrack}```
#

?

#

this fixes it?

#

IT WORKED

#

I GOT THE OLD ITEM

#

YEESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

safe coyote
#

W

heavy urchin
#

tysm u dont know how much time this saves xD

#

ty both

#

now I am gonna put it to solved

#

wait

#

before I put to solved

#

I have a question

#

if I want to save something else like quartz

#

do I have to delete the command

ember spire
#

Not yet

heavy urchin
#

and remake it to {items::quartz}

#

?

ember spire
#

I’ll help with that 1 moment

heavy urchin
#

ok

ember spire
#

back

heavy urchin
#

ok

ember spire
#

alright, so {items::*} is the list so we can set different items in that list to different things

heavy urchin
#

so like

#

I delete the command

#

and remake it to

#
 permission: op
 trigger:
  set {items::quartz} to player's tool
  send message "&7Saved The Item" To Player```
ember spire
#

no

#

you can use arguments in the command

#

to make it

heavy urchin
#

like arg-1 and arg-2

ember spire
heavy urchin
#

wait

#

so like

ember spire
#

<text>

heavy urchin
#
 permission: op
 trigger:
  set {items::list} to player's tool
  send message "&7Saved The Item" To Player```
#

?

ember spire
#

wait what

#

wtf

#

wtf am I thinking

#

what

#

am

#

i

#

doing

heavy urchin
#

xD

ember spire
#

<text>

ember spire
#

I just read something on "temperature" and I was thinking about that

#

<text> not <item>

heavy urchin
ember spire
#

what is {items::list}

heavy urchin
#

idk

#

an item list

ember spire
#

you need to set {items::%arg%}

heavy urchin
#

I saw it somewhere and used it

#

💀

#
 permission: op
 trigger:
  set {items::%arg-1%} to player's tool
  send message "&7Saved The %arg-1%" To Player```
#

this???

ember spire
#

you can just used %arg% but sure

#

because there's one argument in this command

#

But anyway, now you can check each of themn

#

just now remember NOT to make ANY typos when saving the variable

heavy urchin
#

wait

heavy urchin
#

if I want to use this in a auto compressor skript

ember spire
#

That saves an item in the list

heavy urchin
#

do I have to make it like

ember spire
#

wait 1 moment

heavy urchin
#

give {items::%arg%}

ember spire
#

nono

#

%arg% refers to what the player typed

#

so if I typed

#

/save netherrack it would save {items::netherrack}

heavy urchin
#

ooooh

#

so if I do /save quartz

ember spire
#

Yes

#

it would save

heavy urchin
#

I can use the {items::quartz}

#

?

ember spire
#

items::quartz yes

#

it would

#

That's how it works

heavy urchin
#

hmm ok

#

this will save me so much time

#

tysm

ember spire
#

alright, just don't make any typos

#

when you do it

heavy urchin
#

xD

#

hope I dont

#

but wait

#

should I use %arg% or %arg-1%

#

Its the same right?

ember spire
#

same thing

#

ONLY if you are using 1 arg in the cmd

#

if you're using 2 like

#

/vanish <player> <text> or sumn

#

then you have to refer to them with numbers

heavy urchin
#

ok

#

I understand a bit more about skript now

ember spire
#

:)

heavy urchin
#

its actually unbelievable how there are so many possibilities in a game

#

tbh

heavy urchin
#

wait

#

if I want to save an item thats 2 words

#

do I have to do /save nether-quartz

#

or just /save nether quartz

ember spire
#

wait

#

./save quartz

#

just use quartz

heavy urchin
#

but its named nether quartz

ember spire
#

It's JUST the variable

#

That doesn't effect the item name

#

or anything

heavy urchin
#

btw

#

I Dont remember where to search for things like

#

on block break:

#

and it gives me examples ect

ember spire
#

dosc

#

docs

heavy urchin
#

found it ty

#

so like

#

if I want to /save an item

#

I can use a part of its name

ember spire
#

you don'tt need to even use a part of the name

heavy urchin
#

I need to hold it?

ember spire
#

Yes

heavy urchin
#

I am confused xD

ember spire
#

That's all

heavy urchin
#

so I just do /save and hold it

#

right?

ember spire
#

just hold the item and do /save whateveryouwanttocallit

#

yes

heavy urchin
#

ok

#

ty

heavy urchin
#

well

#

I did something and it doesnt work now

#

code:

#
on mine:
 if player's inventory contains a dispenser named "&7Overworld Auto Compressor":
  if event-block is nether quartz:
   if player's inventory contains 64 of plain nether quartz:
    remove 64 of plain nether quartz from player's inventory
    give player {items::quartz}
#

I might have saved it too many times

#

@ember spire pls help

ember spire
#

?

heavy urchin
#

I did something wrong with the /save

ember spire
#

The block is nether quartz ore

#

probably

heavy urchin
#

oh

#

dont tell me its that

ember spire
#

lmfao

heavy urchin
#

hmm

#

it works but I dont receive anything

#

I must have done something wrong with the /save command

#

and then I re did the command /save quartz 5 times

#

.....

ember spire
#

It's fine

#

that sholud works still

heavy urchin
#

is there a way to remove saved items

ember spire
#

lemme see

heavy urchin
#

for some reason it doesnt

ember spire
#

Try setting it once again

#

and then try again

heavy urchin
#

I did

#

doesnt work

#

it removes the 64 quartz but doesnt give the compressed . it either has to do with the saved items , the items not being removed correctly or me being stupid

#

I am gonna resend the codes just in chance tho

ember spire
#

Do you want me to join and help test?

heavy urchin
#

Codes:

on mine:
 if player's inventory contains a dispenser named "&7Overworld Auto Compressor":
  if event-block is nether quartz:
   if player's inventory contains 64 of plain nether quartz:
    remove 64 of plain nether quartz from player's inventory
    give player {items::quartz}

command /save <text>:
 permission: op
 trigger:
  set {items::%arg-1%} to player's tool
  send message "&7Saved The %arg-1%" To Player
#

join where?

#

the server?

ember spire
#

wait

#

lets see

#

hmmmm

#

Try adding this cmd

heavy urchin
#

I need a way to remove the saved items

#

by name not everything tho

#

so like

ember spire
#
  permission: op
  trigger:
    delete {items::%arg%}```
heavy urchin
#

oh

#

When I tried it deleted the item

#

xD

#

it doesnt work at all

#

it just removes the 64 quartz from the inv

#

but doesnt give anything

ember spire
#

Can I try helping in game?

heavy urchin
#

I did /delsaved quartz 5 times

heavy urchin
#

it isnt on maintence

ember spire
#

ah

heavy urchin
#

GOD DAMN IT

#

do you want to know what the issue was

#

I fixed it

#

I had made it

#

give {item::quartz}

#

not give {items::quartz}

#

how cringe is that

ember spire
#

lollll

heavy urchin
#

that always happens