
Lv.1
在 【python实战】鼠标连点器 中回复
文章链接:https:// t.csdn.cn/Kzcsw 文件下载链接:https:// download.csdn.net/download/m0_66728742/86189477?spm=1001.2014.3001.5503 把链接的空格去掉就可以下载和复制代码了!
2022-07-14T22:51:56 点赞:1
在 【绝地求生】 开发日志 中回复
2022-10-14T19:00:38 点赞:0
在 【绝地求生】 开发日志 中回复
2022-10-14T19:01:08 点赞:0
在 [box3]创建连点器 中回复
2022-10-16T18:35:08 点赞:0
在 [box3]创建连点器 中回复
代码注释版(大佬勿喷):
(async function main() {//不加用不了await
while(1){ //一直监测
world.querySelectorAll('player').forEach((x)=>{//遍历所有玩家
if(["必有用"].includes(x.player.name)&&x.player.walkState=='crouch'){//[]里面填写使用连点的人,当玩家可以用连点并且玩家蹲下
var raycast=world.raycast(x.position,new Box3Vector3(x.player.facingDirection.x,x.player.cameraPitch*-1,x.player.facingDirection.z),{ignoreSelector:`.${x.player.name}`})//记住就行了,就是创建射线
if(raycast.hit&&raycast.hitEntity){ //如果射线射到人
var hitEntity=raycast.hitEntity//不用管
var direction=raycast.direction//不用管
var 喵 = 2;//伤害保留小数
var damage=Math.ceil(Math.random()*(10**喵))/(10**喵)//不用管
hitEntity.hurt(damage,{attacker:x})//给予玩家伤害
if(x.player.walkState!='crouch'){//如果要打的玩家没用下蹲
hitEntity.velocity.x+=direction.x*1.5
hitEntity.velocity.y+=0.2
hitEntity.velocity.z+=direction.z*1.5//以上为击退代码
}else{//否则
hitEntity.velocity.x+=direction.x
hitEntity.velocity.y+=0.1
hitEntity.velocity.z+=direction.z//以上为击退代码
}
}
}
})
await sleep(100);//等待100毫秒继续下一轮监测
}
})();2022-10-16T18:35:29 点赞:0
在 摔落伤害怎么弄? 中回复
楼上会有bug,就是碰到墙壁也会有伤害,不建议使用,建议用fml米粒的. 链接: //shequ.codemao.cn/community/457519
2022-10-16T18:45:38 点赞:0