cvcocvc
如题,在指定坐标放置一个箱子,打开后GUI名字是自定义的,谢谢

LobbyTech
command /setchest <string> <string> <string> <world> <string>:
        permission: sk.admin
        trigger:
                set {_guichestloc} to the location at {%argument-1%}, {%argument-2%}, {%argument-3%} of the world {%world-argument%}
                set the block at {_guichestloc} to a chest named {%argument-5%}

cvcocvc
本帖最后由 cvcocvc 于 2021-3-23 10:12 编辑
LobbyTech 发表于 2021-3-22 19:43
command /setchest     :
        permission: sk.admin
        trigger:

不行啊,什么反应都没有,好像block不能直接设置name吧?

LobbyTech
cvcocvc 发表于 2021-3-23 10:04
不行啊,什么反应都没有,好像block不能直接设置name吧?

command /setchest <number> <number> <number> <world> <string>:
        permission: sk.admin
        trigger:
                set {_customchest} to a chest named "%string-argument%"
                set {_guichestloc} to the location at arg-1, arg-2, arg-3 of the world world-argument
                set the block at {_guichestloc} to {_customchest}

cvcocvc
本帖最后由 cvcocvc 于 2021-3-23 21:25 编辑
LobbyTech 发表于 2021-3-23 17:43
command /setchest     :
        permission: sk.admin
        trigger:

不行啊,提示:the 5th argument is already a text, so you should not put it in one (e.g. the 5th argument instead of "%the 5th argument%") (测试.sk, line 238: set {_customchest} to a chest named "%string-argument%"')

我把set {_customchest} to a chest named "%string-argument%"改成具体的set {_customchest} to a chest named "箱子名字"  也是不行的,虽然不报错了,但是还是显示原版的名称,loop-block我也试过了也不行........

LobbyTech
本帖最后由 LobbyTech 于 2021-3-24 21:03 编辑
cvcocvc 发表于 2021-3-23 21:22
不行啊,提示:the 5th argument is already a text, so you should not put it in one (e.g. the 5th arg ...

1.用最新版skript
2.箱子可以放置
3.如果硬要gui名字的话,现在可能只能用on right click实现了,就得把地点存储在一个数据库,比较繁琐
4.理论上箱子名字跟gui名字一样的,但是skript的setblock设置的方块是原版方块不带名字,也可以考虑其他插件设置方块,改下命令就可以5.你这个一定用skript放置箱子吗,如果箱子是固定位置那很好办,类似这种:
on load:
        set {loc2} to the location at 703.5, 109.5, 507.5 of the world "worldzc"
        set {loc3} to the location at 691.5, 109.5, 507.5 of the world "worldzc"
        set {loc4} to the location at 697.5, 109.5, 509.5 of the world "worldzc"
        set {loc5} to the location at 694.5, 109.5, 508.5 of the world "worldzc"
on rightclick:
        if block's location is {loc2}:
                player command "rtp world world"
        if block's location is {loc3}:
                player command "rtp world world_the_end"
        if block's location is {loc4}:
                console command "dm open xslb %event-player%"
        if block's location is {loc5}:
                console command "skgive zcd %event-player%"
只要把触发事件改成l类似这种:
open chest inventory with 1 row named "test" to player

这样:
on load:
        set {chest} to the location at 703.5, 109.5, 507.5 of the world "world"
on rightclick:
        if block's location is {chest}:
                cancel event
                open chest inventory named "test" to player




第一页 上一页 下一页 最后一页