#Fully Virtual Crates using (advanced crates)

1 messages · Page 1 of 1 (latest)

red nest
#

Atm this setup opens the crate and gives the reward regardless if you have the virtual key or not. I want it to deny if you dont have the virtual key. Any help is greatly appreciated.

hollow estuary
#

please send pastes of text, not images

#

can't copy from an image

stray owlBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

hollow estuary
#

you'll have to add a left_click_requirement that checks the value of %advancedcrates_virtual_keys_total%

red nest
red nest
#
open_command: menu
size: 9

items:
  'island_chest_upgrade':
    material: CHEST_MINECART
    data: 0
    amount: 1
    slot: 1
    priority: 1
    enchantments:
    - arrow_damage;1
    hide_enchantments: true
    left_click_requirement:
      requirements:
        has_item:
          type: has item
          name: §x§F§B§0§0§0§0§n[§x§F§B§2§0§2§0§nK§x§F§C§3§F§3§F§nO§x§F§C§5§F§5§F§nT§x§F§C§7§F§7§F§nH§x§F§C§9§E§9§E§nK§x§F§D§B§E§B§E§nE§x§F§D§D§D§D§D§nY§x§F§D§F§D§F§D§n]
          name_contains: boolean
          material: TRIPWIRE_HOOK
          amount: 1
      deny_commands:
        - '[message] &cYou don''t have a koth key'
    display_name: '&8&l[&3ISLAND CHEST UPGRADE&8&L]'
    lore: 
        - '&6&l>&5get your chest upgrades here !!!!!!!!!!.' 
    left_click_commands: 
        - '[player] ac open %player_name% KOTHCRATE 1'
    update: true```
#
Material: SHULKER_BOX
Damage: 0
Glow: true
Amount: 1
Name: §d§l*§5§l*§d§l* §d§lKOTH §d§lCRATE §d§l*§5§l*§d§l*
OnlyPlaceable: false
RewardsDontRepeat: true
Enchanted: false
CommandOnCratePlace: []
MessagesToPlayer: []
RewardHologram:
- '&4&LKOTH'
Final_Message:
- '&d&lZEROBIT &7&l� &d{player_name} &7has opened a &4&l[KOTH CRATE]&7:'
- '&5&lRewards:'
- '&d1) &f{ColoredReward:1}'
FinalMessageToOpener: []
ShiftInstantlyOpen: true
Size: 1
PrizeSize: 0
KeyCrate:
  Material: TRIPWIRE_HOOK
  Damage: 0
  Glow: true
  Amount: 1
  Name: §x§F§B§0§0§0§0§n[§x§F§B§2§0§2§0§nK§x§F§C§3§F§3§F§nO§x§F§C§5§F§5§F§nT§x§F§C§7§F§7§F§nH
    §x§F§C§9§E§9§E§nK§x§F§D§B§E§B§E§nE§x§F§D§D§D§D§D§nY§x§F§D§F§D§F§D§n]
  Lores: []
ClosedCrateText:
- '&x&f&b&0&0&0&0&n[&x&f&b&1&9&1&9&nK&x&f&b&3&3&3&3&nO&x&f&c&4&c&4&c&nT&x&f&c&6&5&6&5&nH
  &x&f&c&7&f&7&f&nC&x&f&c&9&8&9&8&nR&x&f&c&b&1&b&1&nA&x&f&d&c&a&c&a&nT&x&f&d&e&4&e&4&nE&x&f&d&f&d&f&d&n]'
- ''
- '&x&f&b&0&0&0&0V&x&f&b&1&7&1&7I&x&f&b&2&e&2&eR&x&f&c&4&5&4&5T&x&f&c&5&c&5&cU&x&f&c&7&3&7&3A&x&f&c&8&a&8&aL
  &x&f&c&a&1&a&1K&x&f&c&b&8&b&8E&x&f&d&c&f&c&fY&x&f&d&e&6&e&6S &x&f&d&f&d&f&d> %virtualkeys_available%'
- ''
- ''```
#

So this is a example menu to try to left click to open the virtual crate and also to try to deny it being opened if you dont have the virtualkey

hollow estuary
#

I thought you were comparing the %advancedcrates_virtual_keys_total% placeholder value

#

but you want to check an item?

#

btw: name_contains: boolean means it should be name_contains: false or name_contains: true

#

if you don't include it at all, it's false by default

#

so it checks if it equals

#

Can you hold the item and type /data get entity @s SelectedItem

#

send a screenshot of the response here

red nest
#

this is the physical key

hollow estuary
#

nice

#

you can use nbt via checkitem expansion

#

?checkitem-nbt

stray owlBOT
#
FAQ Answer:

CheckItem NBT Tutorial
Check out [this tutorial](#1071634786310967296 message) for information on how to check and remove items
with specific nbt data from a player via the CheckItem Expansion

hollow estuary
#

if you follow this tutorial it should guide you pretty much through the steps

#

I would recommend using the AC.Crate tag

red nest
#

what about if its just a virtual key ?

hollow estuary
#

is that the placeholder?

#

%advancedcrates_virtual_keys_total%

#

or well

#

%advancedcrates_virtual_keys_KothCrate%

#

?

#

you can have physical and virtual keys?

red nest
#

yeah there are these

#

yeah you can set it either physical or virtual, or both

hollow estuary
#

and you want both?

#

in 1 slot?

#

hmmmmmmmmmm

red nest
#

this is the physical display

#

but going to make it fully virtual

hollow estuary
#

but you will have physical and virtual keys still?

#

or just virtual

#

I just need to know the gameplan before I can come up with a system that works

red nest
#

im trying to see if i can just make it all virtual, no physical

hollow estuary
#

In that case, just check the value of %advancedcrates_virtual_keys_KothCrate% in a comparator requirement

#
    left_click_requirement:
      requirements:
        has_item:
          type: '>='
          input: '%advancedcrates_virtual_keys_KothCrate%'
          output: '1'
          deny_commands:
          - '[message] no keys, get some'
#

type /papi parse me %advancedcrates_virtual_keys_KothCrate% to make sure that is the correct placeholder fyi

#

presumably you know the correct one

#

but idrk

red nest
#

comes up with 192

hollow estuary
#

nice

#

that should be about it

red nest
#

ok well it opens it but does not take the virtual key

#
open_command: menu
size: 9

items:
  'island_chest_upgrade':
    material: CHEST_MINECART
    data: 0
    amount: 1
    slot: 1
    priority: 1
    enchantments:
    - arrow_damage;1
    hide_enchantments: true
    left_click_requirement:
      requirements:
        has_item:
          type: '>='
          input: '%advancedcrates_virtual_keys_KothCrate%'
          output: '1'
          name_contains: true
          material: TRIPWIRE_HOOK
      deny_commands:
        - '[message] &cYou don''t have a koth key'
    display_name: '&8&l[&3ISLAND CHEST UPGRADE&8&L]'
    lore: 
        - '&6&l>&5get your chest upgrades here !!!!!!!!!!.' 
    left_click_commands: 
        - '[player] ac open %player_name% KOTHCRATE 1'
    update: true```
hollow estuary
#

is that what ac open does?

#

also by the way

#

you're running that as a player command

#

not a console command

#

[player] means the player clicking it is running the command ac open

#

which works for you

#

not for regular users

#

also, delete

          material: TRIPWIRE_HOOK```
red nest
hollow estuary
red nest
#

no , let me try again

#

nah it doesnt

hollow estuary
#

i'm asking you what it does

red nest
#

it closes the gui and opens the crate in front of you

hollow estuary
#

there is a ac virtualkey set command

#

hmm

#

are there admin commands that aren't on the wiki?

#

i don't see /ac open on the wiki

#

weird

red nest
#

its not on there

#

the wiki is outdated

hollow estuary
#

right

#

is there any virtualkey remove command?

#

or nah

#

weird the wiki says

#

Sets player's specified crates virtual keys to a specific amount (can be given/removed/reset this way)

#

but doesn't say how

#

we can use the math expansion though

#

if there is no remove command

red nest
#

i dont see a remove command

hollow estuary
#

[console] ac virtualkey set %player_name% KothCrate %math_0:_{advancedcrates_virtual_keys_KothCrate}-1%

#

make sure to use [console] for ac open and ac virtualkey set

red nest
#

hmm how would i set the virtual key to koth crate tho

#

well it takes the virtual key

hollow estuary
#

the math is subtracting 1 from their current value

red nest
#

ok i think i got it 1 sec

#

ok i think that worked for that part

#

ill put a clip up

#

i will try for no crate placed animation for instant reward

rigid lance
red nest
rigid lance
#

was there anything else you needed help with

hollow estuary
#

glad its all workin

red nest
rigid lance
#

what crates plugin are you using

red nest
#

advanced crates

rigid lance
#

you should be able to disable it somewhere there

red nest
#

yeah looking

#

there is a instant crate which i may have to switch to as i dont believe there is a part to remove existing crate animation, which makes sense

rigid lance
#

You can

#

Animation: NoAnimation

#

should work

red nest
#

yes

#

ok ggs guys thanks for your help

#

works smoothly