
Lv.1
hhhhhh,随便写
签名:个人网站:http://site-673550-3478-5397.mysxl.cn/
在 【Box3超级干货帖】输入玩家姓名将其关监狱功能怎么做! 中回复
2020-05-11T10:59:31 点赞:0
在 小镇之战,代码备份。 中回复
world.say('去看看吧,谁是全场MVP')
//一个简单的射击PvP
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast: { hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
hitEntity.velocity.x += direction.x;
hitEntity.velocity.y += 0.5;
world.say('砰!!!')
hitEntity.velocity.z += direction.z;
hitEntity.hurt(10), {
attacker: entity,
};
});
});
world.querySelectorAll('.x').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say('有人因为犯法进了监狱,快去看看吧。')//世界广播“滋滋滋”
other.player.directMessage('温馨提示:请不要fan fa');//被点到的玩家私信
})
})
world.onDie(async({entity})=>{
await sleep(5000);//等待5秒
entity.player.forceRespawn();//强制重生,这里需要设好出生点,不然会从天上掉下来
})2020-05-11T15:49:52 点赞:0
在 小镇之战,代码备份。 中回复
world.querySelectorAll('.炮').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say('滋滋滋')//世界广播“滋滋滋”
other.player.directMessage('温馨提示:不要碰镭射电磁炮');//被点到的玩家私信
})
})
world.querySelectorAll('.x').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say('有人因为犯法进了监狱,快去看看吧。')//世界广播“滋滋滋”
other.player.directMessage('温馨提示:请不要犯法');//被点到的玩家私信
})
})
world.say('去看看吧,谁是全场MVP')
//一个简单的射击PvP
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast: { hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
hitEntity.velocity.x += direction.x;
hitEntity.velocity.y += 0.5;
world.say('砰!!!')
hitEntity.velocity.z += direction.z;
hitEntity.hurt(10), {
attacker: entity,
};
});
});
world.onChat(async ({entity,message})=>{ if(entity.player){ if(entity.player.name == "SGS编CHENG"){ entity.player.mess=message; var name = entity.player.mess.slice(3); world.querySelectorAll('player').forEach((x) => { if (x.player.name == name){ x.position.x = 56; x.position.y = 100; x.position.z = 73; } }) } else{ world.say(" ") } }})2020-05-11T16:11:53 点赞:0
在 小镇之战,代码备份。 中回复
world.querySelectorAll('.炮').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say('滋滋滋')//世界广播“滋滋滋”
other.player.directMessage('温馨提示:不要碰镭射电磁炮');//被点到的玩家私信
})
})
world.querySelectorAll('.x').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say('有人因为犯法进了监狱,快去看看吧。')//世界广播“滋滋滋”
other.player.directMessage('温馨提示:请不要犯法');//被点到的玩家私信
})
})
world.say('去看看吧,谁是全场MVP')
//一个简单的射击PvP
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast: { hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
hitEntity.velocity.x += direction.x;
hitEntity.velocity.y += 0.5;
world.say('砰!!!')
hitEntity.velocity.z += direction.z;
hitEntity.hurt(10), {
attacker: entity,
};
});
});
world.onChat(async ({entity,message})=>{ if(entity.player){ if(entity.player.name == "SGS编CHENG"){ entity.player.mess=message; var name = entity.player.mess.slice(3); world.querySelectorAll('player').forEach((x) => { if (x.player.name == name){ x.position.x = 56; x.position.y = 102; x.position.z = 73; } }) } else{ world.say(" ") } }})2020-05-11T16:31:17 点赞:0
在 小镇之战,代码备份。 中回复
world.querySelectorAll('.炮').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say("发生车祸啦!")
other.player.directMessage("你被车撞了")
})
})
world.onTick(async({tick})=>{//重复执行!!!
world.querySelectorAll('.动车').forEach((e)=>{//如果实体标签为“动车”
e.position.z+=3//z轴持续+3
if(e.position.z>123){//假如超过一定范围
e.position.z=0//把它抓回去!!
}
})//别忘了框架哦
})
world.querySelectorAll('.x').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say('有人因为犯法进了监狱,快去看看吧。')//世界广播“滋滋滋”
other.player.directMessage('温馨提示:请不要犯法');//被点到的玩家私信
function sjs(){this.getEntityByName=function(l){if(v={res:null,name:l},world.querySelectorAll("player").forEach(l=>{l.player.name==v.name&&(v.res=l)}),v.res)return v.res;this.enabledWarning&&console.warn('警告:无法找到玩家名为 "'+l+'" 的玩家')},this.replaceBlock=function(l,t){for(count=0,x=0;x<128;x++)for(z=0;z<128;z++)for(y=0;y<喵;y++)voxels.getVoxel(x,y,z)==l&&(voxels.setVoxel(x,y,z,t),count+=1);this.enabledInfo&&console.log("已替换"+count+"个方块")},this.enabledWarning=!0,this.enabledInfo=!0,this.initFallDamage=function(){this.fallDamageCount=1,this.minFallHeight=3,world.onPlayerJoin(({entity:l})=>{l.fallStart=-999,l.enableDamage=!0,l.showHealthBar=!0}),world.onTick(()=>{world.querySelectorAll("player").forEach(l=>{l.velocity.y>=0&&(l.fallStart-l.position.y>this.minFallHeight&&l.hurt((l.fallStart-l.position.y)*this.fallDamageCount),l.fallStart=-999),l.velocity.y<=0&&-999==l.fallStart&&(l.fallStart=l.position.y)})})}}$=new sjs,world.$=$;
(async function(){
await sleep(3000);
other.position=new Box3Vector3(55,100,72);
})();
})
})
world.say('去看看吧,谁是全场MVP')
//一个简单的射击PvP
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast: { hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
hitEntity.velocity.x += direction.x;
hitEntity.velocity.y += 0.5;
world.say('砰!!!')
hitEntity.velocity.z += direction.z;
hitEntity.hurt(10), {
attacker: entity,
};
});
});
world.querySelectorAll('.p').forEach((e)=>{//这里需要给大炮设置好“炮”的标签
e.onEntityContact(({entity,other})=>{
other.hurt(1000)//伤害代码
world.say('有人去银行抢劫。现在已被打')//世界广播“滋滋滋”
function sjs(){this.getEntityByName=function(l){if(v={res:null,name:l},world.querySelectorAll("player").forEach(l=>{l.player.name==v.name&&(v.res=l)}),v.res)return v.res;this.enabledWarning&&console.warn('警告:无法找到玩家名为 "'+l+'" 的玩家')},this.replaceBlock=function(l,t){for(count=0,x=0;x<128;x++)for(z=0;z<128;z++)for(y=0;y<喵;y++)voxels.getVoxel(x,y,z)==l&&(voxels.setVoxel(x,y,z,t),count+=1);this.enabledInfo&&console.log("已替换"+count+"个方块")},this.enabledWarning=!0,this.enabledInfo=!0,this.initFallDamage=function(){this.fallDamageCount=1,this.minFallHeight=3,world.onPlayerJoin(({entity:l})=>{l.fallStart=-999,l.enableDamage=!0,l.showHealthBar=!0}),world.onTick(()=>{world.querySelectorAll("player").forEach(l=>{l.velocity.y>=0&&(l.fallStart-l.position.y>this.minFallHeight&&l.hurt((l.fallStart-l.position.y)*this.fallDamageCount),l.fallStart=-999),l.velocity.y<=0&&-999==l.fallStart&&(l.fallStart=l.position.y)})})}}$=new sjs,world.$=$;
(async function(){
await sleep(3000);
other.position=new Box3Vector3(55,100,72);
})();
other.player.directMessage('温馨提示:你已被银行抓获');//被点到的玩家私信
})
})2020-05-11T19:42:47 点赞:0
在 门槛2000浏览00赞以上 中回复
啊,我觉得不用那么高,有没有人数限制,再说,我们是一起交流学习,不是赞少的就不可以,只要热爱编程,,有5个作品以上,就可以
2020-05-20T23:52:46 点赞:0
在 box3喵教程,明天更新 中回复
移动代码
$.getEntityByName('你要坑的人').position=new Box3Vector3(0,0,0);
})();2020-05-22T17:25:53 点赞:0
在 呜呜呜,又一个图被毁了................. 中回复
2020-05-22T19:54:57 点赞:0