Jump to content

I need help with Auto Compressors vouchers


mhnn

Recommended Posts

I need help with auto compressors with vouchers using skript this is my code without voucher

on mine:
    if player has 1 of brown dye named "&6Wood AutoCompressors":
        set {_a} to amount of oak log in player's inventory
        if {_a} >= 32:
            set {_b} to round({_a} / 32)
            loop {_b} times:
                player has 32 oak log
                remove 32 oak log from player
                give 1 spruce log to player

Link to comment
Share on other sites

On 6/12/2024 at 11:26 PM, mhnn said:

I need help with auto compressors with vouchers using skript this is my code without voucher

on mine:
    if player has 1 of brown dye named "&6Wood AutoCompressors":
        set {_a} to amount of oak log in player's inventory
        if {_a} >= 32:
            set {_b} to round({_a} / 32)
            loop {_b} times:
                player has 32 oak log
                remove 32 oak log from player
                give 1 spruce log to player

What exactly is the problem here?
Anyways, I've gone ahead and redone your code a bit; It's untested but it should work

 

on mine:
    if player has 1 of brown dye named "&6Wood AutoCompressors":
        while amount of oak log in player's inventory >= 32:
            remove 32 oak logs from player's inventory
            add 1 spruce log to player's inventory

 

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...