【神奇代码岛】【JAVA script】门禁代码教程
!注意事项 !
1.以下说明及代码仅适用于神奇代码岛的代码编辑器。
2.代码中的某些内容可根据需要进行更改。
3.本人对代码产生错误所造成的事故与损失概不负责。
const npc = world.querySelector('#此段文字可更改');
npc.enableInteract = true;
npc.interactRadius = 2;
npc.interactHint = `此段文字可更改`;
npc.interactColor = new Box3RGBColor(1,1,1);
npc.onInteract(async({entity}) => {const result = await entity.player.dialog({type: Box3DialogType.INPUT,title: '此段文字可更改',titleTextColor: new Box3RGBAColor(1, 1, 1, 1),titleBackgroundColor: new Box3RGBAColor(0, 0, 0, 0.98),content: `${entity.player.name},此段文字可更改`,confirmText: '此段文字可更改', placeholder: '此段文字可更改', contentTextColor: new Box3RGBAColor(1, 1, 1, 1),contentBackgroundColor: new Box3RGBAColor(0, 0, 0, 0.98),lookEye: entity.position.add(entity.player.facingDirection.scale(5)),lookTarget: entity,});if(!result || result === null){ entity.player.directMessage('此段文字可更改');return; }const surprise = ['684785']if(surprise.includes(result)){entity.player.directMessage(`此段文字可更改` );npc.collides = falsenpc.meshInvisible = trueawait sleep(2000)npc.collides = truenpc.meshInvisible = false}
});
console.clear()
以上就是神奇代码岛门禁教程啦,你学会了吗? 更多详情见box3.codemao.cn

本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
