本帖最后由 魔法巨猫 于 2022-5-29 16:31 编辑
问题是只要有这个物品就可以越数售卖,我要如何限制? A:
update: 5
display:
mats: rabbit
name: '&3[&f生兔肉&3]'
nbt:
fuel: 15000
lore:
- '&7&m '
- '&8[&3▪&8] &7普通的兔肉'
- ''
- '&8[&e▪&8] &7价格: &f&n10'
- ''
- '&8[&2▪&8] &7出售 &9[&f点击&9]'
actions:
all:
- 'close'
- catcher:
1:
type: CHAT
start:
- 'tell: &6&m '
- 'tell: &6[&2▪&6] &7请输入出售数量......'
- 'tell: &6[&2▪&6] &7输入&f"cancel"&7可取消操作...'
- 'tell: &6&m '
cancel: 'tell: &6[&e▪&6] &7已取消操作.....'
end:
- condition: 'item *material:rabbit,amount:%trmenu_meta_input-1%'
actions:
- 'close'
- 'take-item: material:rabbit,amount:%trmenu_meta_input-1%'
- 'tell: &6[&e▪&6] &7出售成功,共获得&e %math_{trmenu_meta_input-1}*10[precision:0]% &7金币....'
- 'console: money grant %player_name% %math_{trmenu_meta_input-1}*10[precision:0]%'
deny:
- 'close'
- 'tell: &6[&e▪&6] &7货物不足,出售失败.....'
问题是只要有这个物品就可以越数售卖,我要如何限制? A:
update: 5
display:
mats: rabbit
name: '&3[&f生兔肉&3]'
nbt:
fuel: 15000
lore:
- '&7&m '
- '&8[&3▪&8] &7普通的兔肉'
- ''
- '&8[&e▪&8] &7价格: &f&n10'
- ''
- '&8[&2▪&8] &7出售 &9[&f点击&9]'
actions:
all:
- 'close'
- catcher:
1:
type: CHAT
start:
- 'tell: &6&m '
- 'tell: &6[&2▪&6] &7请输入出售数量......'
- 'tell: &6[&2▪&6] &7输入&f"cancel"&7可取消操作...'
- 'tell: &6&m '
cancel: 'tell: &6[&e▪&6] &7已取消操作.....'
end:
- condition: 'item *material:rabbit,amount:%trmenu_meta_input-1%'
actions:
- 'close'
- 'take-item: material:rabbit,amount:%trmenu_meta_input-1%'
- 'tell: &6[&e▪&6] &7出售成功,共获得&e %math_{trmenu_meta_input-1}*10[precision:0]% &7金币....'
- 'console: money grant %player_name% %math_{trmenu_meta_input-1}*10[precision:0]%'
deny:
- 'close'
- 'tell: &6[&e▪&6] &7货物不足,出售失败.....'
已自行解决。
方案:
papi 拓展: checkitem
方案:
papi 拓展: checkitem