#EMC Item Exchange

1 messages · Page 1 of 1 (latest)

remote nexus
#

Hello. This might be a difficult question, but I'm looking for a stable way on saving a value for each and every item.
Let's say for example, I assign a stick a value of 1 and an oak plank a value of 2.
Skript will then loop through recepies and see if the ingredients have any value. If so, it adds up all the values of these ingredients and defines the new item a value. Is there anyone able to help with the logic behind this.?

#

I might have delayed responses, sorry for that.

worthy sleet
#

wont nbt work?

#

don't quite understand what you want

remote nexus
#

Let's say i sacrifice a stick, wich adds 1 to my total value. One i have a diamonds worth of value, i can then exchange that for a diamond!

#

Sacrifice a diamond and the value of a diamonds is added to me, that's worth allot of sticks:}

remote nexus
#

Anyone.?

bronze zephyr
#

Well

bronze zephyr
remote nexus
#

O h n o

bronze zephyr
#

but say stick had a value of 1

#

and diamond 10 (just an example)

remote nexus
#

Mhm

bronze zephyr
#
   trigger:
    set {_item} to item in players hand
    if {_item} is stick:
      remove 1 stick from players inventory
      add 1 to {playervalue::%uuid of player%}```
#
  trigger:
    if arg-1 is "diamond":
      if {playervalue::%uuid of player&} >= 10:
        remove 10 from {playervalue::%uuid of player%}
        give player diamond```
#

thats how i would do it

#

because im also sort of new to skript

remote nexus
#

Well the problem is, theres like 1k items or some

bronze zephyr
#

._.

#

hm

remote nexus
#

I think, i have to save each item.

#

{value::diamond} to 10

bronze zephyr
#

hm

remote nexus
#

Then you can dynamicly Exchange them like this with a single algorithm..

#

I just need to have a good and clever way to asign each item a value without spending a week doing that XD

bronze zephyr
#

lol

#

alright well i would love to help more but i have got to go finish my hw

remote nexus
#

Alright, wish you luck man

bronze zephyr
#

thanks lol

remote nexus
#

Take the time you need