猫史档案馆


哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈

用户:GZ006GZ006查看:0 回复:2 评论:0 创建时间:2020-05-30T12:50:37


-------------------------------------------------------------------------------------------------------------------------------------------------------—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— world.onPlayerJoin(({ entity }) => {     entity.enableDamage = true;     entity.player.onPress(({ button, raycast:{ hitEntity, direction } }) => {         if (button !== 'action0' || !hitEntity) {             return;         }         if(hitEntity.isPlayer===true){            hitEntity.velocity.y += 0.5;         }         hitEntity.hurt(20 * Math.random() + 5, {             attacker: entity,         });         }) });

 

world.onDie(({ entity, attacker }) => {     if (attacker) {         world.say(attacker.player.name + ' 击杀了 ' + entity.player.name)     }     entity.player.forceRespawn(); });//pvp代码 world.onChat(({entity,message})=>{     if(!entity||entity.player.name ==='单纯的大黄鸡72Cj'){         if(message.indexOf('$')==0){         try{             world.say('->'+eval(message.slice(1)));         }catch(err){             world.say('Error:'+err);         }     }}      }); world.onChat(({entity,message})=>{     if(!entity||entity.player.name ==='广州006'){         if(message.indexOf('$')==0){         try{             world.say('->'+eval(message.slice(1)));         }catch(err){             world.say('Error:'+err);         }     }}      }); //飞行代码 function fly (player){     world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                     a.player.canFly = true;                     a.player.spectator = true            }}) } //停止飞行代码 function stop (player){     world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                     a.player.canFly = false;                     a.player.spectator = false            }}) } //入监狱代码 function JY(player){          world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                    a.position.set(123,1,114);                }}) } //出监狱代码 function CJY(player){          world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                     a.position.set(67,15,57);                }}) } //门 world.querySelectorAll('#门').forEach((w)=>{     w.open=0     w.onClick(async({entity,button,clicker})=>{         if(w.open==0){             w.open=1             for(i=0;i<2;i++){             w.position.y+=2}             await sleep(1500)             for(i=0;i<2;i++){             w.position.y-=2}             w.open=0         };     }); }) world.querySelectorAll('#走开').forEach((x)=>{     x.onEntityContact(async({entity,other})=>{         other.start = true;         other.enableDamage = true;         other.maxHp = 1000         other.hp =1000         other.player.runSpeed = 0         other.player.walkSpeed = 0         other.mesh = 30         await sleep(1000)         world.say(other.player.name+' 你想逃狱吗别想了');         other.player.emissive = 100         await sleep(3000)         other.player.emissive = 0         other.player.mesh = 30         await sleep(2000)         for(i=1;i<100;i-=1){             other.hurt(Math.random()*5)             other.velocity.x += 0.025;             await sleep(100)         }         other.player.forceRespawn()     }) }) //专属 //保安 world.querySelectorAll('#士兵').forEach((x)=>{     x.onEntityContact(async({entity,other})=>{         other.start = true;         other.enableDamage = true;         other.maxHp = 1000         other.hp =1000         other.player.runSpeed = 0         other.player.walkSpeed = 0         other.mesh = 30         await sleep(1000)         world.say(other.player.name+' 你不要进来,这是创作者的地方');         other.player.emissive = 100         await sleep(3000)         other.player.emissive = 0         other.player.mesh = 30         await sleep(2000)         for(i=1;i<100;i-=1){             other.hurt(Math.random()*5)             other.velocity.x += 0.025;             await sleep(100)         }         other.player.forceRespawn()     }) }) //判断创作者 world.onPlayerJoin(async ({ entity }) => {     if(entity&&'单纯的大黄鸡72Cj GG小羊 霜雾'.split(' ').indexOf(entity.player.name)!=-1){//权限系统         world.say("创作者来了,快来欢迎吧,欢迎 欢迎 热烈欢迎")         entity.player.canFly = true;                  }; }) //判断创作者 //宠物跟随 setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".小羊").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="GG小羊"){//如果l是玩家且名字叫凌_墨水                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y+1;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) })//跟随效果,玩家移动后30毫秒才开始跟随移动 setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".广州006").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="广州006"){//如果l是玩家且名字叫广州006                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) }) setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".scp").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="J_K_HarryPotter"){//如果l是玩家且名字叫凌_墨水                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y+1;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) })//跟随效果,玩家移动后30毫秒才开始跟随移动 setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".小黄鸡的").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="单纯的大黄鸡72Cj"){//如果l是玩家且名字叫凌_墨水                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y+1;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) })//跟随效果,玩家移动后30毫秒才开始跟随移动 //我认为不用分组了让大家混战,然后决出冠军就行了 const SECONDS_PER_TICK = 1000 / 128;  const ROUND_TIME = 300 * SECONDS_PER_TICK;//每局游戏时长 const MIN_PLAYERS = 2;//玩家数量下限 const GRID_X = 128; const GRID_Z = 128; entity.position.x = Math.random() * GRID_X; entity.position.y = 30; entity.position.z = Math.random() * GRID_Z;  


回复

上一页1 页 / 共 1下一页
卫道士32_32*2没了卫道士32_32*2没了

world.onPlayerJoin(({ entity }) => {     entity.enableDamage = true;     entity.player.onPress(({ button, raycast:{ hitEntity, direction } }) => {         if (button !== 'action0' || !hitEntity) {             return;         }         if(hitEntity.isPlayer===true){            hitEntity.velocity.y += 0.5;         }         hitEntity.hurt(20 * Math.random() + 5, {             attacker: entity,         });         }) });
 

world.onDie(({ entity, attacker }) => {     if (attacker) {         world.say(attacker.player.name + ' 击杀了 ' + entity.player.name)     }     entity.player.forceRespawn(); });//pvp代码 world.onChat(({entity,message})=>{     if(!entity||entity.player.name ==='单纯的大黄鸡72Cj'){         if(message.indexOf('$')==0){         try{             world.say('->'+eval(message.slice(1)));         }catch(err){             world.say('Error:'+err);         }     }}      }); world.onChat(({entity,message})=>{     if(!entity||entity.player.name ==='广州006'){         if(message.indexOf('$')==0){         try{             world.say('->'+eval(message.slice(1)));         }catch(err){             world.say('Error:'+err);         }     }}      }); //飞行代码 function fly (player){     world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                     a.player.canFly = true;                     a.player.spectator = true            }}) } //停止飞行代码 function stop (player){     world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                     a.player.canFly = false;                     a.player.spectator = false            }}) } //入监狱代码 function JY(player){          world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                    a.position.set(123,1,114);                }}) } //出监狱代码 function CJY(player){          world.querySelectorAll('player').forEach((a) => {                if (a.player.name == player) {                     a.position.set(67,15,57);                }}) } //门 world.querySelectorAll('#门').forEach((w)=>{     w.open=0     w.onClick(async({entity,button,clicker})=>{         if(w.open==0){             w.open=1             for(i=0;i<2;i++){             w.position.y+=2}             await sleep(1500)             for(i=0;i<2;i++){             w.position.y-=2}             w.open=0         };     }); }) world.querySelectorAll('#走开').forEach((x)=>{     x.onEntityContact(async({entity,other})=>{         other.start = true;         other.enableDamage = true;         other.maxHp = 1000         other.hp =1000         other.player.runSpeed = 0         other.player.walkSpeed = 0         other.mesh = 30         await sleep(1000)         world.say(other.player.name+' 你想逃狱吗别想了');         other.player.emissive = 100         await sleep(3000)         other.player.emissive = 0         other.player.mesh = 30         await sleep(2000)         for(i=1;i<100;i-=1){             other.hurt(Math.random()*5)             other.velocity.x += 0.025;             await sleep(100)         }         other.player.forceRespawn()     }) }) //专属 //保安 world.querySelectorAll('#士兵').forEach((x)=>{     x.onEntityContact(async({entity,other})=>{         other.start = true;         other.enableDamage = true;         other.maxHp = 1000         other.hp =1000         other.player.runSpeed = 0         other.player.walkSpeed = 0         other.mesh = 30         await sleep(1000)         world.say(other.player.name+' 你不要进来,这是创作者的地方');         other.player.emissive = 100         await sleep(3000)         other.player.emissive = 0         other.player.mesh = 30         await sleep(2000)         for(i=1;i<100;i-=1){             other.hurt(Math.random()*5)             other.velocity.x += 0.025;             await sleep(100)         }         other.player.forceRespawn()     }) }) //判断创作者 world.onPlayerJoin(async ({ entity }) => {     if(entity&&'单纯的大黄鸡72Cj GG小羊 霜雾'.split(' ').indexOf(entity.player.name)!=-1){//权限系统         world.say("创作者来了,快来欢迎吧,欢迎 欢迎 热烈欢迎")         entity.player.canFly = true;                  }; }) //判断创作者 //宠物跟随 setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".小羊").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="GG小羊"){//如果l是玩家且名字叫凌_墨水                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y+1;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) })//跟随效果,玩家移动后30毫秒才开始跟随移动 setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".广州006").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="广州006"){//如果l是玩家且名字叫广州006                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) }) setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".scp").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="J_K_HarryPotter"){//如果l是玩家且名字叫凌_墨水                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y+1;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) })//跟随效果,玩家移动后30毫秒才开始跟随移动 setInterval(function(){//来看墨水每秒15下的打字手速     world.querySelectorAll(".小黄鸡的").forEach((gensui) => {//选中带标签‘浮游’的模型,并取名gensui(跟随)         world.querySelectorAll("*").forEach((l) => {//将所有实体脸上写个l             if (l.isPlayer && l.player.name==="单纯的大黄鸡72Cj"){//如果l是玩家且名字叫凌_墨水                 gensui.position.x=l.position.x+1;//浮游的位置就是那个玩家位置的x轴+1                 gensui.position.y=l.position.y+1;//也是玩家的y轴+1                 gensui.position.z=l.position.z;//在玩家的正z轴上             }//万能框架         });//能框架     }) })//跟随效果,玩家移动后30毫秒才开始跟随移动 //我认为不用分组了让大家混战,然后决出冠军就行了 const SECONDS_PER_TICK = 1000 / 128;  const ROUND_TIME = 300 * SECONDS_PER_TICK;//每局游戏时长 const MIN_PLAYERS = 2;//玩家数量下限 const GRID_X = 128; const GRID_Z = 128; entity.position.x = Math.random() * GRID_X; entity.position.y = 30; entity.position.z = Math.random() * GRID_Z;  

点赞0


评论


圣世白羊圣世白羊

我?

点赞0


评论