
Lv.1
弱小和无知不是生存的障碍,傲慢才是 ——《三体•死神永生》
签名:超新星工作室招人,无门栏~ 目前工作:神岛、图书馆 动态: •创作一个作品冲首页 •图书馆写科幻小说 •神奇代码岛做新地图 *哈利波特迷&三体迷~
在 好消息!Pygame库教程来啦! 中回复
不过这里真的有人连Python语法都不会吗?真的有人看不懂下面那个(开个玩笑)?
user = input('你会Python语法吗?(填“会”或“不会”)')
if(user == '会' or user == '废'):
print('ddd')
elif(user == '不会' or user == '不废'):
print('呃呃呃')
有人不会我服了。
2021-09-24T09:41:48 点赞:2
在 为什么(求助词而已)谁能教我游客来了把它拉进监狱的代码 中回复
你歧视游客,是吧?
不过,我可以告诉你一种方法,监狱的坐标可以自己改:
world.onPlayerJoin(({entity})=>{
if(entity.player.name === startWith('guest')){
entity.position.set(0,0,0)//括号里坐标改成监狱的坐标
}
})
这是我自己创造的一种方法,不知道能不能用。有一种更好的方法是识别码,我不会。
2021-09-24T15:09:03 点赞:2
在 好消息!Pygame库教程来啦! 中回复
发个和Python无关的东西,是@Python-happyyyy让我发的,神奇代码岛JAVAscript代码。下面有部分注释还没写,见谅。
//这是本人的第一个作品的代码,不喜勿喷!
const mms = world.querySelector('#密码锁-1'); //让密码锁-1交互
mms.enableInteract = true;
mms.interactHint = '密码锁';
mms.interactRadius = 4;
mms.onInteract(async({entity})=>{ //当发起交互
const result = await entity.player.dialog({
type: Box3DialogType.SELECT,
title: '门锁',
content: '本作品的作者是?',
options: ['吉吉喵','搬砖喵','名字鬼知道','ExtBLO','橙子nUcg','MC玩家103','木叶龙1342'],
});
if(result.index === 4){ //如果选择正确
world.say(`${entity.player.name}顺利通过第一关!`)
entity.player.directMessage('正确!')
entity.position.set(240,8,248) //逃走
mms.enableInteract = false
}
else{ //否则
entity.hurt(15) //伤害
entity.player.directMessage('错误!')
}
})
const rw = world.querySelector('#人物-1')
rw.enableInteract = true;
rw.interactRadius = 4;
rw.interactHint = `战友`;
rw.interactColor = new Box3RGBColor(1,1,1);//互动字体颜色
rw.onInteract(async({entity}) => {//当发起交互
entity.player.dialog({
type: Box3DialogType.TEXT, // 对话框的类型
title: `战友`, // 对话框标题
content: `${entity.player.name},快去越狱吧!`,
});
})
const mms1 = world.querySelector('#密码锁-2')
mms1.enableInteract = true;
mms1.interactRadius = 4;
mms1.interactHint = `门锁`;
mms1.onInteract(async({entity})=>{
const r1 = await entity.player.dialog({
type:Box3DialogType.SELECT,
title:`门锁`,
content:`月球距离地球?`,
options:['8000千米','38万千米','42万千米','1089亿千米','13500万千米'],
})
if(r1.index === 1){
world.say(`${entity.player.name}顺利通过第二关!`)
entity.player.directMessage(`正确!`)
entity.position.set(219,8,235)
mms1.enableInteract = false
}
else{
entity.hurt(15)
entity.player.directMessage(`错误!`)
}
})
mms2 = world.querySelector('#密码锁-3');
mms2.enableInteract = true;
mms2.interactRadius = 4;
mms2.interactHint = '门锁';
mms2.onInteract(async({entity})=>{
const r2 = await entity.player.dialog({
type:Box3DialogType.SELECT,
title:`门锁`,
content:`圆周率四舍五入保留8位小数是?`,
options:['3.14159269','3.14259269','3.14195238','3.14145235','3.14159265'],
})
if(r2.index === 4){
world.say(`${entity.player.name}顺利通过隔离门!`)
entity.player.directMessage(`正确!`)
entity.position.set(203,8,223)
mms2.enableInteract = false
}
else{
entity.hurt(15)
entity.player.directMessage(`错误!`)
}
})
world.onPlayerJoin(({entity})=>{ //当玩家进入地图
entity.position.set(250,8,246)//出生地
entity.enableDamage = true //允许伤害
entity.things = [] //空物品列表
entity.money = 10
entity.atk = 0 //各种变量
if(entity.player.name === '橙子nUcg'){ //欢迎作者
world.say('欢迎作者橙子nUcg的到来!')
entity.player.canFly = true //能飞
}
else if(entity.player.name === '小小瓢虫'||entity.player.name === '一只小虎喵'||entity.player.name === 'studentNo.1(学员一号)'){ //欢迎合作者
world.say('欢迎合作者'+entity.player.name+'的到来!')
entity.player.canFly = true //也能飞
}
entity.player.dialog({
type:Box3DialogType.TEXT,
content:`你,${entity.player.name},在超时空对决中,被外星人抓到了这个位于月球的监狱。`,
});
entity.player.dialog({
type:Box3DialogType.TEXT,
content:`你暂时只有10元钱。请你凭借智慧,破解门锁,拾取道具,击败外星人,逃回地球!`
});
entity.player.addWearable({
bodyPart:Box3BodyPart.TORSO,
mesh:'mesh/黄喵包.vb',
orientation:new Box3Quaternion(0,1,0,0).rotateY(Math.PI/2),
scale:new Box3Vector3(0.5,0.5,0.5),
offset:new Box3Vector3(0,0,-0.45),
});
});
world.onChat(({entity,message})=>{
if(message==='关闭飞行'){
if(entity.player.name==='橙子nUcg'||entity.player.name==='小小瓢虫'||entity.player.name === '一只小虎喵'||entity.player.name === 'studentNo.1(学员1号)'){
entity.player.canFly = false
world.say('成功!')
}
else{
entity.hurt(5)
entity.player.directMessage('喂,别吵!你又不是作者!')
}
}
else if(message==='开启飞行')
if(entity.player.name==='橙子nUcg'||entity.player.name==='小小瓢虫'||entity.player.name === '一只小虎喵'||entity.player.name === 'studentNo.1(学员1号)'){
entity.player.canFly = true
world.say('成功!')
}
else{
entity.hurt(5)
entity.player.directMessage('呃......')
}
})
world.onPress(async({ button, entity }) => {
if(!entity.isPlayer || entity.player.dead) return;
if(button == 'action1'){
const pl_1=await entity.player.dialog({
type:Box3DialogType.SELECT,
title:entity.player.name+"的状态",
content:entity.player.name+"的状态:\n血量:"+entity.hp+"\n金钱:"+entity.money+"\n攻击力:"+entity.atk,
options:['保存','道具','取消']
});
if(pl_1.index===0){
return;
}
else if(pl_1.index===1){
const pl_2 = await entity.player.dialog({
type:Box3DialogType.SELECT,
title:entity.player.name+'的道具',
options:entity.things,
})
}
else if(pl_1.index===2){
if(entity.player.boxId===''){
entity.player.dialog({
type:Box3DialogType.TEXT,
title:entity.player.name+'的状态',
content:'你是游客,无法保存!',
})
}
else{
//保存,先别动,要用SQL
}
}
}
})2021-09-26T09:11:53 点赞:1
在 月球越狱大冒险招人!速来! 中回复
有没有人会SQL存档啊?如果有谁会SQL存档(要真的会,不是复制粘贴),在我这个贴下面发回帖。
注意:本人今天(28日)下午不上线,明天早上8点30准时上线,有意愿者明天那个时候上线。
PS:本作品将参加国庆创作节,目前人数已够,只招收会SQL的人1名!!!
2021-09-28T16:00:43 点赞:1