本文目录一览:
- 1、我的世界命令方块代码 代码大全赶紧收藏
- 2、python简单小游戏代码 怎么用Python制作简单小游戏
- 3、c语言小游戏代码
- 4、求我的世界1.7.10单人游戏代码大全,注意是单人的,服务器用的不要。
- 5、c++编程小游戏代码
- 6、造梦西游3代码大全
我的世界命令方块代码 代码大全赶紧收藏
1、/give 给予人 物品id 数量 - 给予某人物品,如果不写数量则给予数量默认为64
2、/nick ID 名称 -给某人改一个名 ID是加白名单的名字
3、/backup -运行备份命令
4、/fireball -发射一个火球(会破坏方块)
5、/heal name -治疗某人
6、/invsee name -查看某人的包裹
7、/lingtning name -天谴(不填写名字会雷击鼠标指向的地方)
8、/mute name -禁言某人
9、/ping -乒乓
10、/seen name -查看某人最后退出的时间
11、/tp name1 name2 -将人物1传送至人物2身旁
12、/tp name -将自己传送至某人身旁
13、/tphere name -将某人传送至自己身旁
14、/tpall -将服务器内的所有人传送至自己身旁(大传送阵)
15、(上面四个命令需要对方在线,不需要对方同意)
16、/unlimited id -给予自己无限的某物品
17、/weather storm/sun time -改变天气,雷雨或晴天
18、/mmoedit name skname rank -如果安装了MCRPG插件可以用这个命令改变某人的某项技能等级unarmed 【箭术】 - Archery
19、【斧头技能】 - Axes
20、【采矿】- mining
21、【修理】 - Repair
22、/forestgen -在自己身旁形成森林
23、/pumpkins -在自己身旁形成南瓜林(带叶子的南瓜林)
24、/snow -在自己的身旁成为雪后的样子
25、/thaw -融雪(和冰)
26、/butcher -杀死附近的怪物
27、/tree 树形 -生成一棵树(树形不填也可以)
28、树形:big - 大树 ewquoia - 红木 Tall sequoia - 高大的红木
29、Birch - 衫树 Random - 随机
30、/up 高度 - 将自己提升到某高度,脚下用一块可能悬空的玻璃支撑 WorldEdit:
31、手拿木斧,左键一角,右键一角,两角之间的长方体为选择区域:
32、//set id - 将选中的区域变为某物品(如果是不可放置或者没有放置点的物品会成为被扔出的状态)
33、//undo - 还原上一次的WorldEdit行动
34、//redo - 还原上一次的//undo(这个说明可能有误)
35、//move x - 将区域移动x块。移动时需正对着区域与NEWS。
36、//move x up - 将区域向上移动x块
37、//move x down - 将区域向下移动x块
38、替换指令://replace xxx yyy(xxx是原来方块,yyy是替换方块)
39、复制指令//copy(你站在哪里复制的,等一下粘贴也会是相同位置出现)
40、粘贴指令://paste(注意站好位置)
41、输入围墙指令://walls xxx ascend - 把自己提升到上一个平台
42、bind {命令关键字} - 设置一键命令
43、clear - 清空控制台
44、damage - 关闭或者开启伤害 即无敌
45、descend - 把自己移动到下面一个的平台
46、destroy [all] - 破坏当前的东西(背包)
47、defuse [all] - 拆弹(拆除已经点燃了的TNT炸药)
48、diff - X
49、difficulty - 设置游戏难度
50、dropstore - 在身边创建一个储物柜
51、*drops - 开关物品掉落,关闭的话采矿打怪不掉东西。
52、dupe [all] - 复制东西
53、duplicate [all] - 复制手上的东西并丢出来
54、explode [范围] - 设置一个地方爆炸(在自家慎用)
55、extinguish [all] - 熄灭周围所有的火
56、ext [all] - 一样是熄灭火
57、falldamage - 开关高空落下伤害
58、firedamage - 开关火的伤害
59、fly - 飞行模式
60、*freeze - 冻结怪物
61、give [数量] - 给一样物品
62、goto - 去一个地方
63、grow [all] - 让立即小麦成长
64、h [COMMAND] - 命令列表/帮助
65、heal - 补指定的血
66、health - 设置生命值
67、help [COMMAND] - 命令列表/帮助
68、home 回到出生点
69、i [数量] - 刷东西
70、instantmine - 开关即时采矿(采矿无延迟)
71、item [数量] [费用] 给玩家物品, 如果不指定则是最大的数量
72、itemname - 显示当前手上的物品名称
73、itemstack [数量] - 给玩家指定数量的物品
74、kill 自杀不解释
75、jump - 瞬移到鼠标所指的地方
76、killnpc [all] - 杀死周围全部NPC 或者叫 杀了附近所有除自己外的活体生物
77、l - X
78、*light - 把光永久性关闭
79、listwaypoints - 列出所有路径点
80、macro {参数} - 允许运行宏
81、maxstack [物品ID|物品名称|全部] [数量] - 最大的把某物品堆起来
82、*mobdamage - 怪物不会给你伤害
83、msg - 添加一个消息到控制台
84、music [音量] - 播放音乐
85、noclip - 穿墙
86、p - 显示当前坐标
87、pos 现在玩家的坐标
88、reach - 玩家到指定地方
89、return - 传送到之前传送的地方
90、rem - 删除指定路点
91、removedrops [all] - 删掉地上物品
92、*rename - 修改命令名称
93、replenish [all] - X
94、repair [all] - 修复当前物品耐久
95、reset - 恢复默认设置
96、s - Same as /set
97、search - 搜索物品名称
98、set - 在这世界标记一个路径点
99、setjump [JUMP|reset] - 设置跳跃的高度 落地伤害和移动 1:1
100、setspawn [ ] 设置当前位置 X轴 Y轴 Z轴
101、setspeed [速度|重置] - 设置移动速度
102、spawn [QTY] - 产生一个生物
103、spawnstack {NAME|ID|random} - 产生一个合体的怪物NPC
104、*superheat [all] - Turns items which are furnace-able into their furnaced form
105、t - Same as /tele
106、tele - 传送到此坐标
107、time [set|get|day|night [minute|hour|day [TIME]]] - 设置指定时间得到物品
108、timeschedule - 设定一段时间段,让世界永远保持在这段时间之间-
109、unbind - 解除一个命令
110、useportal - 传送到地狱
111、waterdamage - 开关潜水伤害
112、world - 世界情报
113、world load - 加载指定的文件
114、world save - 保存退出游戏
115、world seed [SEED] - 给你看看你世界里有多少个方块
116、world new [FILENAME] [SEED] - 在指定位置创建新地图
117、world exit - 不保存退出游戏
118、world list - 列出所有存档 你可以去这看
python简单小游戏代码 怎么用Python制作简单小游戏
1、Python猜拳小游戏代码:
2、import random #导入随机模块
3、
4、num = 1
5、yin_num = 0
6、shu_num = 0
7、while num 2:
12、 print('不能出大于2的值')
13、 else:
14、 data = ['石头', '剪刀', '布']
15、 com = random.randint(0, 2)
16、 print(您出的是{},电脑出的是{}.format(data[user], data[com]))
17、 if user == com:
18、 print('平局')
19、 continue
20、 elif (user == 0 and com == 1) or (user == 1 and com == 2) or (user == 2 and com == 0):
21、 print('你赢了')
22、 yin_num += 1
23、 else:
24、 print('你输了')
25、 shu_num += 1
26、 num += 1
27、Python数字炸弹小游戏代码:
28、import random
29、import time
30、
31、bomb = random.randint(1, 99)
32、print(bomb)
33、start = 0
34、end = 99
35、while 1 == 1:
36、
37、 people = int(input('请输入{}到{}之间的数:'.format(start, end)))
38、 if people bomb:
39、 print('大了')
40、 end = people
41、 elif people bomb:
42、 print('小了')
43、 start = people
44、 else:
45、 print('BOOM!!!')
46、 break
47、 print('等待电脑了输入{}到{}之间的数:'.format(start, end))
48、 time.sleep(1)
49、 com = random.randint(start + 1, end - 1)
50、 print('电脑输入:{}'.format(com))
51、 if com bomb:
52、 print('大了')
53、 end = com
54、 elif com bomb:
55、 print('小了')
56、 start = com
57、 else:
58、 print('BOOM!!!')
59、 break
c语言小游戏代码
最基础的贪吃蛇的代码
#includestdio.h
#includewindows.h//基本型态定义。支援型态定义函数。使用者界面函数 图形装置界面函数。
#includeconio.h //用户通过按键盘产生的对应操作 (控制台)
#includestdlib.h
#includetime.h //日期和时间头文件
#define LEN 30
#define WID 25
int Snake[LEN][WID] = {0}; //数组的元素代表蛇的各个部位
char Sna_Hea_Dir = 'a';//记录蛇头的移动方向
int Sna_Hea_X, Sna_Hea_Y;//记录蛇头的位置
int Snake_Len = 3;//记录蛇的长度
clock_t Now_Time;//记录当前时间,以便自动移动
int Wait_Time ;//记录自动移动的时间间隔
int Eat_Apple = 1;//吃到苹果表示为1
int Level ;
int All_Score = -1;
int Apple_Num = -1;
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); //获取标准输出的句柄 windows.h
//句柄 :标志应用程序中的不同对象和同类对象中的不同的实例 方便操控,
void gotoxy(int x, int y)//设置光标位置
{
COORD pos = {x,y}; //定义一个字符在控制台屏幕上的坐标POS
SetConsoleCursorPosition(hConsole, pos); //定位光标位置的函数windows.h
}
void Hide_Cursor()//隐藏光标 固定函数
{
CONSOLE_CURSOR_INFO cursor_info = {1, 0};
SetConsoleCursorInfo(hConsole, cursor_info);
}
void SetColor(int color)//设置颜色
{
SetConsoleTextAttribute(hConsole, color);
//是API设置字体颜色和背景色的函数 格式:SetConsoleTextAttribute(句柄,颜色);
}
void Print_Snake()//打印蛇头和蛇的脖子和蛇尾
{
int iy, ix, color;
for(iy = 0; iy WID; ++iy)
for(ix = 0; ix LEN; ++ix)
{
if(Snake[ix][iy] == 1)//蛇头
{
SetColor(0xf); //oxf代表分配的内存地址 setcolor:34行自定义设置颜色的函数
gotoxy(ix*2, iy);
printf("※");
}
if(Snake[ix][iy] == 2)//蛇的脖子
{
color = rand()%15 + 1; //rand()函数是产生随机数的一个随机函数。C语言里还有 srand()函数等。
//头文件:stdlib.h
if(color == 14)
color -= rand() % 13 + 1; //变色
SetColor(color);
gotoxy(ix*2, iy);
printf("■");
}
if(Snake[ix][iy] == Snake_Len)
{
gotoxy(ix*2, iy);
SetColor(0xe);
printf("≈");
}
}
}
void Clear_Snake()//擦除贪吃蛇
{
int iy, ix;
for(iy = 0; iy WID; ++iy)
for(ix = 0; ix LEN; ++ix)
{
gotoxy(ix*2, iy);
if(Snake[ix][iy] == Snake_Len)
printf(" ");
}
}
void Rand_Apple()//随机产生苹果
{
int ix, iy;
do
{
ix = rand() % LEN;
iy = rand() % WID;
}while(Snake[ix][iy]);
Snake[ix][iy] = -1;
gotoxy(ix*2, iy);
printf("⊙");
Eat_Apple = 0;
}
void Game_Over()//蛇死掉了
{
gotoxy(30, 10);
printf("Game Over");
Sleep(3000);
system("pause nul");
exit(0);
}
void Move_Snake()//让蛇动起来
{
int ix, iy;
for(ix = 0; ix LEN; ++ix)//先标记蛇头
for(iy = 0; iy WID; ++iy)
if(Snake[ix][iy] == 1)
{
switch(Sna_Hea_Dir)//根据新的蛇头方向标志蛇头
{
case 'w':
if(iy == 0)
Game_Over();
else
Sna_Hea_Y = iy - 1;
Sna_Hea_X = ix;
break;
case 's':
if(iy == (WID -1))
Game_Over();
else
Sna_Hea_Y = iy + 1;
Sna_Hea_X = ix;
break;
case 'a':
if(ix == 0)
Game_Over();
else
Sna_Hea_X = ix - 1;
Sna_Hea_Y = iy;
break;
case 'd':
if(ix == (LEN - 1))
Game_Over();
else
Sna_Hea_X = ix + 1;
Sna_Hea_Y = iy;
break;
default:
break;
}
}
if(Snake[Sna_Hea_X][Sna_Hea_Y]!=1Snake[Sna_Hea_X][Sna_Hea_Y]!=0Snake[Sna_Hea_X][Sna_Hea_Y]!=-1)
Game_Over();
if(Snake[Sna_Hea_X][Sna_Hea_Y] 0)//吃到苹果
{
++Snake_Len;
Eat_Apple = 1;
}
for(ix = 0; ix LEN; ++ix)//处理蛇尾
for(iy = 0; iy WID; ++iy)
{
if(Snake[ix][iy] 0)
{
if(Snake[ix][iy] != Snake_Len)
Snake[ix][iy] += 1;
else
Snake[ix][iy] = 0;
}
}
Snake[Sna_Hea_X][Sna_Hea_Y] = 1;//处理蛇头
}
void Get_Input()//控制蛇的移动方向
{
if(kbhit())
{
switch(getch())
{
case 87:
Sna_Hea_Dir = 'w';
break;
case 83:
Sna_Hea_Dir = 's';
break;
case 65:
Sna_Hea_Dir = 'a';
break;
case 68:
Sna_Hea_Dir = 'd';
break;
default:
break;
}
}
if(clock() - Now_Time = Wait_Time)//蛇到时间自动行走
{
Clear_Snake();
Move_Snake();
Print_Snake();
Now_Time = clock();
}
}
void Init()//初始化
{
system("title 贪吃毛毛蛇");
system("mode con: cols=80 lines=25");
Hide_Cursor();
gotoxy(61, 4);
printf("You Score:");
gotoxy(61, 6);
printf("You Level:");
gotoxy(61, 8);
printf("The Lenght:");
gotoxy(61, 10);
printf("The Speed:");
gotoxy(61, 12);
printf("Apple Num:");
int i;
for(i = 0; i Snake_Len; ++i)//生成蛇
Snake[10+i][15] = i+1;
int iy, ix;//打印蛇
for(iy = 0; iy WID; ++iy)
for(ix = 0; ix LEN; ++ix)
{
if(Snake[ix][iy])
{
SetColor(Snake[ix][iy]);
gotoxy(ix*2, iy);
printf("■");
}
}
}
void Pri_News()//打印信息
{
SetColor(0xe);
gotoxy(73,4);
All_Score += Level;
printf("%3d", All_Score);
gotoxy(73, 6);
printf("%3d", Level);
gotoxy(73, 8);
printf("%3d",Snake_Len);
gotoxy(73, 10);
printf("0.%3ds", Wait_Time/10);
gotoxy(73, 12);
printf("%d", Apple_Num);
}
void Lev_Sys()//等级系统
{
if(((Apple_Num-1) / 10) == Level)
{
++Level;
if(Wait_Time 50)
Wait_Time -= 50;
else
if(Wait_Time 10)
Wait_Time -= 10;
else
Wait_Time -= 1;
}
}
int main(void)
{
Init();
srand((unsigned)time(NULL));//设置随机数的种子
Now_Time = clock();
int speed1=1000,speed2,a;
printf("\n");
printf("请输入你想要的速度\n");
scanf("%d",speed2);
Level=1;
Wait_Time=speed1-speed2;
printf("请输入你想要的苹果数\n");
scanf("%d",a);
while(a--)
Rand_Apple();
while(1)
{
if(Eat_Apple)
{
++Apple_Num;
Rand_Apple();
Lev_Sys();
Pri_News();
}
Get_Input();
Sleep(10);
}
return 0;
}
求我的世界1.7.10单人游戏代码大全,注意是单人的,服务器用的不要。
ascend - 把自己提升到上一个平台
bind KEYCODE值 命令 {命令关键字} - 设置一键命令
clear - 清空控制台
damage - 关闭或者开启伤害 即无敌
descend - 把自己移动到下面一个的平台
destroy [all] - 破坏当前的东西(背包)
defuse [all] - 拆弹(拆除已经点燃了的TNT炸药)
diff VALUE - X
difficulty VALUE - 设置游戏难度
dropstore - 在身边创建一个储物柜
*drops - 开关物品掉落,关闭的话采矿打怪不掉东西。
dupe [all] - 复制东西
duplicate [all] - 复制手上的东西并丢出来
explode [范围] - 设置一个地方爆炸(在自家慎用)
extinguish [all] - 熄灭周围所有的火
ext [all] - 一样是熄灭火
falldamage - 开关高空落下伤害
firedamage - 开关火的伤害
fly - 飞行模式
*freeze - 冻结怪物
give 物品 [数量] - 给一样物品
goto 名字 - 去一个地方
grow [all] - 让立即小麦成长
h [COMMAND] - 命令列表/帮助
heal HEALTH - 补指定的血
health MIN|MAX|INFINITE - 设置生命值
help [COMMAND] - 命令列表/帮助
home 回到出生点
i 物品代码 [数量] - 刷东西
instantmine - 开关即时采矿(采矿无延迟)
item 物品代码|物品名称 [数量] [费用] 给玩家物品, 如果不指定则是最大的数量
itemname - 显示当前手上的物品名称
itemstack 物品代码 [数量] - 给玩家指定数量的物品
kill 自杀不解释
jump - 瞬移到鼠标所指的地方
killnpc [all] - 杀死周围全部NPC 或者叫 杀了附近所有除自己外的活体生物
l - X
*light - 把光永久性关闭
listwaypoints - 列出所有路径点
macro 文件名 {参数} - 允许运行宏
maxstack [物品ID|物品名称|全部] [数量] - 最大的把某物品堆起来
*mobdamage - 怪物不会给你伤害
msg 消息 - 添加一个消息到控制台
music [音量] - 播放音乐
noclip - 穿墙
p - 显示当前坐标
pos 现在玩家的坐标
reach DISTANCE - 玩家到指定地方
return - 传送到之前传送的地方
rem NAME - 删除指定路点
removedrops [all] - 删掉地上物品
*rename COMMANDNAME NEWNAME - 修改命令名称
replenish [all] - X
repair [all] - 修复当前物品耐久
reset - 恢复默认设置
s 名字 - Same as /set
search 关键词 - 搜索物品名称
set 名字 - 在这世界标记一个路径点
setjump [JUMP|reset] - 设置跳跃的高度 落地伤害和移动 1:1
setspawn [X Y Z] 设置当前位置 X轴 Y轴 Z轴
setspeed [速度|重置] - 设置移动速度
spawn NAME|ID|random|list [QTY] - 产生一个生物
spawnstack NAME|ID|random|list {NAME|ID|random} - 产生一个合体的怪物NPC
*superheat [all] - Turns items which are furnace-able into their furnaced form
t X Y Z - Same as /tele
tele X Y Z - 传送到此坐标
time [set|get|day|night [minute|hour|day [TIME]]] - 设置指定时间得到物品
timeschedule reset | TIME1 TIME2 - 设定一段时间段,让世界永远保持在这段时间之间- - 《凉宫春日漫无止境的八月》
unbind KEYCODE值 - 解除一个命令
useportal - 传送到地狱
waterdamage - 开关潜水伤害
world load|save|seed|new|exit|list - 世界情报
world load FILENAME - 加载指定的文件
world save - 保存退出游戏
world seed [SEED] - 给你看看你世界里有多少个方块
world new [FILENAME] [SEED] - 在指定位置创建新地图
world exit - 不保存退出游戏
world list - 列出所有存档 你可以去这看 ".minecraft/saves"
* = 新命令?
setspawn 设置重生点
c++编程小游戏代码
以下是贪吃蛇源代码:
#includeiostream.h
#includewindows.h
#includetime.h
#includestdlib.h
#includeconio.h
#define N 21
void gotoxy(int x,int y)//位置函数{
COORD pos;
pos.X=2*x;
pos.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
void color(int a)//颜色函数{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void init(int apple[2])//初始化函数(初始化围墙、显示信息、苹果)
{
int i,j;//初始化围墙
int wall[N+2][N+2]={{0}};
for(i=1;i=N;i++)
{
for(j=1;j=N;j++)
wall[i][j]=1;
}
color(11);
for(i=0;iN+2;i++)
{
for(j=0;jN+2;j++)
{
if(wall[i][j])
cout"■";
else cout"□" ;
}
coutendl;
}
gotoxy(N+3,1);//显示信息
color(20);
cout"按 W S A D 移动方向"endl;
gotoxy(N+3,2);
color(20);
cout"按任意键暂停"endl;
gotoxy(N+3,3);
color(20);
cout"得分:"endl;
apple[0]=rand()%N+1;//苹果
apple[1]=rand()%N+1;
gotoxy(apple[0],apple[1]);
color(12);
cout"●"endl;
}
int main()
{
int i,j;
int** snake=NULL;
int apple[2];
int score=0;
int tail[2];
int len=3;
char ch='p';
srand((unsigned)time(NULL));
init(apple);
snake=(int**)realloc(snake,sizeof(int*)*len);
for(i=0;ilen;i++)
snake[i]=(int*)malloc(sizeof(int)*2);
for(i=0;ilen;i++)
{
snake[i][0]=N/2;
snake[i][1]=N/2+i;
gotoxy(snake[i][0],snake[i][1]);
color(14);
cout"★"endl;
}
while(1)//进入消息循环
{
tail[0]=snake[len-1][0];
tail[1]=snake[len-1][1];
gotoxy(tail[0],tail[1]);
color(11);
cout"■"endl;
for(i=len-1;i0;i--)
{
snake[i][0]=snake[i-1][0];
snake[i][1]=snake[i-1][1];
gotoxy(snake[i][0],snake[i][1]);
color(14);
cout"★"endl;
}
if(kbhit())
{
gotoxy(0,N+2);
ch=getche();
}
switch(ch)
{
case 'w':snake[0][1]--;break;
case 's':snake[0][1]++;break;
case 'a':snake[0][0]--;break;
case 'd':snake[0][0]++;break;
default: break;
}
gotoxy(snake[0][0],snake[0][1]);
color(14);
cout"★"endl;
Sleep(abs(200-0.5*score));
if(snake[0][0]==apple[0]snake[0][1]==apple[1])//吃掉苹果后蛇分数加1,蛇长加1
{
score++;
len++;
snake=(int**)realloc(snake,sizeof(int*)*len);
snake[len-1]=(int*)malloc(sizeof(int)*2);
apple[0]=rand()%N+1;
apple[1]=rand()%N+1;
gotoxy(apple[0],apple[1]);
color(12);
cout"●"endl;
gotoxy(N+5,3);
color(20);
coutscoreendl;
}
if(snake[0][1]==0||snake[0][1]==N||snake[0][0]==0||snake[0][0]==N)//撞到围墙后失败
{
gotoxy(N/2,N/2);
color(30);
cout"失败!!!"endl;
for(i=0;ilen;i++)
free(snake[i]);
Sleep(INFINITE);
exit(0);
}
}
return 0;
}
造梦西游3代码大全
3级生命石=sms2
3级防御石=fys2
3级魔法石=mfs2
4级强化石=qhs4
尾火棍制作书=whgzzs
角木铲制作书=jmczzs
壁水袍制作书=bspzzs
氐土凯制作书=dtkzzs
胃土耙制作书=wtpzzs
井木衣制作书=jmyzzs
翼火甲制作书=yhjzzs
银弹金弓制作书=jdygzzs
顽石金刚制作书=wsjgzzs
红皇教莲制作书=hhjlzzs
孟婆药剂=wpmp
幸运符=wpxyf
神恩符=wpbdf
强化石:wpqhs4
游戏设定
在战胜了十殿阎罗的挑战后,悟空等人又打到了天界之上,天界的天兵天将可不同于地府的妖魔鬼怪,攻击力和防御力都更加优秀的敌人着实难以应付,大闹天庭篇对装备和等级的要求更为严格。
4399造梦西游,为玩家构建了一个自由实现自己梦想,施展正义拳脚消灭黑暗邪恶的世界。
人间、地府、天庭这些艰难险阻怎么可能挡住玩家的脚步。看着那些邪恶的boss倒在脚下,英雄披坚执锐屹立山头,俯瞰苍生和平安乐,余愿足矣。
转轮邪魔被藏、空、戒三人合力击败,但是邪魔的计划并没有被终结。天庭之中,一片混乱,玉帝被关押在了天庭最暗之处,托塔天王、太白金星、二郎神、月老都被邪魔所控,镇守中天门。