本文禁止以任何形式转载!仅供参考!
//A是生成数量
async function NPC2(A=5) {
var 随机数=0;
//姓名库
var xingmingku=['言笑','旬邑','洛阳']
//立绘库(可以直接复制到立绘页)
const lihuiku={A1:"$37024769",A2:"$37111957",A3:"$37426859"}
//立绘名(对应立绘库)
var lihuiku2=['A1','A2','A3']
var 当前生成=1;
//循环是生成数值的地方
while (当前生成<A){
//NPC数量必须加在前面避免覆盖
ac.var.NPC数量=ac.var.NPC数量+1;
随机数=await ac.random({ min: 0, max: xingmingku.length-1 });
ac.arr.NPC姓名[ac.var.NPC数量]=xingmingku[随机数];
随机数=await ac.random({ min: 0, max: lihuiku2.length-1 });
ac.arr.NPC立绘[ac.var.NPC数量]=lihuiku2[随机数];
ac.arr.NPC年龄[ac.var.NPC数量]=await ac.random({ min: 16, max: 30 });
当前生成=当前生成+1;
}
//对话框可以删除
await ac.sysDialogOn({roleName:,id: 1082832,hasRoleName: false,hasBg: true,hasRoleAvatar: false,roleAvatarResId: '$1528927',});await ac.sysDialogOff({effect: 'normal',});
}