猫史档案馆


【box3】如何让所有人都受到一个选择对话框?在线等!

用户:清蒸鲈鱼清蒸鲈鱼查看:6 回复:3 评论:6 创建时间:2022-08-05T17:57:27


要求:要async和await,能获取选择的选项(就像岛3糖豆人检测挂机一样)


回复

上一页1 页 / 共 1下一页
无极玄天无极玄天

遍历所有实体=>如果此实体为玩家=>该玩家弹个选项框

点赞0


评论


无极玄天无极玄天

emmmm,我想想啊

点赞0


评论


145a145a

!async function(){let dialog;async function f(t=new String){for(const e of world.querySelectorAll("player"))if(e.player.name.startsWith(t))return e}console.clear(),world.say("开始运行"),global.s=world.say,global.cE=world.createEntity,global.run=require,world.createEntity=async function(t){return async function(){const t=world.createEntity;world.createEntity=async function(){t("⚠145地图防火墙拦截了未经授权的实体创建⚠");const t=new Box3Entity;return t.say=async function(){},t},await sleep(500),world.createEntity=t}(),createEntity(t)},world.say=async function(t=""){s(t);const e=world.s;world.say=async function(t=""){s("⚠145地图防火墙拦截了未经授权的世界广播⚠")},await sleep(500),world.say=e},voxels.set=voxels.setVoxel,voxels.setVoxel=async function(t,e,n,a,l=0){return await voxels.set(t,e,n,a,l)},voxels.setVoxelId=voxels.setVoxel,world.onPlayerJoin(async({entity:entity})=>{entity.dl=entity.player.dialog,entity.k=entity.player.kick,entity.l=entity.player.link,entity.c=entity.player.cancelDialogs,entity.player.cancelDialog=async function(){!async function(){const t=entity.player.cancelDialogs;entity.player.dialog=async function(){world.s("⚠145地图防火墙拦截了未经授权的对话框取消⚠")},await sleep(1e3),entity.player.dialog=t}()},entity.player.kick=async function(){s("⚠145地图防火墙拦截了未经授权的踢出玩家⚠")},entity.player.dialog=async function(t=new Object){return async function(){const t=entity.player.dialog;entity.player.dialog=async function(){s("⚠145地图防火墙拦截了未经授权的对话框⚠")},await sleep(500),entity.player.dialog=t}(),entity.dl(t)},entity.player.link=async function(t){return async function(){const t=entity.player.link;entity.player.link=async function(){s("⚠145地图防火墙拦截了未经授权的传送门⚠")},await sleep(5e3),entity.player.link=t}(),await entity.l(t)},await entity.player.dialog({type:Box3DialogType.TEXT,title:"145地图优化大师",content:"免费版 兼容模式\n『聊天区指令』\n发送“scan”进行安全扫描\n『145安全大师』\n全岛首个开源地图插件\n诞生于2022.7.10\n内核版本:4.6\n「更新日志」\n见研究中心",hasArrow:!0}),entity.player.onChat(async({entity:entity,message:message})=>{if("console"==message){if(dialog=await entity.player.dialog({type:"input",title:"控制台",content:"欢迎使用145超级控制台!",confirmText:"执行"}),null==dialog||!dialog)return;let r;s(`~> ${dialog}`);try{r=await eval(dialog)}catch(t){r=t}finally{s(`<~ ${r}`)}}if("scan"==message){s("145安全大师将在10秒后检查此地图安全性,请迅速结束正在进行的工作"),await sleep(1e4),s("代码之力,无限至励。145安全大师正在扫描此地图……");let t=0;world.querySelectorAll("player").forEach(async t=>{t.a喵Tag("k"),await t.player.dialog({type:Box3DialogType.TEXT,title:"145安全大师空气人检测",content:"请继续,不要关闭",hasArrow:!0}),t.removeTag("k")}),await sleep(5e3),world.querySelectorAll(".k").forEach(async e=>{t++,e.k()}),s(`145安全大师完成扫描,耗时5.${Math.floor(4*Math.random())}秒。本次发现并处理了${t}项危险。感谢您使用145安全大师!`)}})}),async function t(){try{if(Math.random(),world.entityQuota(),world.gravity>0||world.gravity<-.2)throw new Error("地图被恶意篡改")}catch(t){s("⚠145安全大师未能正常运行⚠")}return await sleep(500),t()}()}();

点赞1


评论