用户:dyingfish查看:0 回复:3 评论:0 创建时间:2020-09-04T19:03:36
【作品展示】

【作品介绍】
额
【作品源代码】
print('欢迎来到mc指令编辑库,输入效果自动弹出mc指令')
print('由烈然lr工作室出品', '如果发现错误,请加烈然战队xiaomo或狱然yuran好友,只支持中国版')
print('本作品正在更新...')
print('<>或[]之内可自己填写')
print('#号后是意思')
print('效果大全')
print('跳跃增强')
print('荆棘+保护胸甲')
print('锋利钻石剑')
print('增加经验值')
print('获得命令方块')
print('新手版')
print('玩家收到/不收到消息')
open_ = input()
if (open_ == '荆棘+保护胸甲'):
print('/give @p diamond_chestplate 1 0 {Unbreakable:1b,ench:[{id:0,lvl:},{id:7,lvl:}]}')
if (open_ == '锋利钻石剑'):
print('/give @a minecraft:diamond_sword 1 0 {ench:[{id:16,lvl:}]}')
if (open_ == '增加经验值'):
print('/xp ')
if (open_ == '获得命令方块'):
print('/give @p command_block')
if (open_ == '玩家收到/不收到消息'):
print('/commandBlockOutput ')
if (open_ == '新手版'):
print('欢迎打开新手版,以下是新手指令')
print('传送')
print('清除玩家物品')
New_ = input()
if (New_ == '传送'):
print('/tp ', '第二个括号可以填坐标', '#将XXX传送至XXX')
if (New_ == '清除玩家物品'):
print('/clear [玩家] [数量] [物品名]', '可以直接输入/clear #直接清除所有物品', '可以不输[玩家]之后的 #如果输入[数量],就必须写[物品名]')
if (open_ == '效果大全'):
print('欢迎来到效果大全')
print('速度')
print('缓慢')
print('挖掘效率')
Num_ = input()
if (Num_ == '速度'):
print('/effect Speed [效果强度(最高255)] [维持时间]')
if (Num_ == '缓慢'):
print('/effect Slowness [效果强度(最高255)] [维持时间]')
if (Num_ == '挖掘效率'):
print('/effect Haste [效果强度(最高255)] [维持时间]')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cnimport tkinter as __gui_tk
from tkinter import ttk as __gui_ttk
from tkinter.messagebox import showinfo as __gui_showstring_orig
# 实现函数
def __gui_showstring(*values, title='', sep='', end='', file=None, flush=False):
output = sep.join(values) + end
if file == None:
__gui_showstring_orig(title, output)
else:
file.write(output)
if flush:
file.flush()
def __gui_askstring(title, prompt, initialvalue=None, parent=None):
def cancel(event=None):
nonlocal result
result = initialvalue
top.destroy()
def ok(event=None):
value = entry.get()
if value == '':
value = initialvalue
nonlocal result
result = value
top.destroy()
result = None
top = __gui_tk.Toplevel(parent)
top.title(title)
screen_width = top.winfo_screenwidth()
screen_height = top.winfo_screenheight()
top.geometry('+%d+%d' % ((screen_width) / 2 - 110,(screen_height) / 2 - 50))
__gui_ttk.Label(top, text=prompt, font=(None, 13)).grid(column=0, row=0, padx=3, pady=3)
entry = __gui_ttk.Entry(top, show=None)
entry.grid(column=0, row=1, padx=10, columnspan=3)
entry.focus()
btn1 = __gui_ttk.Button(top, text='取消', command=cancel, default='active')
btn2 = __gui_ttk.Button(top, text='确定', command=ok)
btn1.grid(column=0, row=2, padx=10)
btn2.grid(column=2, row=2, padx=10)
top.protocol("WM_DELETE_WINDOW", cancel)
top.bind("<Return>", ok)
top.bind("<Escape>", cancel)
top.wait_window(top)
return result
# 常量定义
GUI_TITLE = '提示'
GUI_PROMPT = '请输入:'
GUI_WINDOW = __gui_tk.Tk()
GUI_WINDOW.withdraw()
# 以下是用户实现
__gui_showstring('欢迎来到mc指令编辑库,输入效果自动弹出mc指令', title=GUI_TITLE)
__gui_showstring('由烈然lr工作室出品', '如果发现错误,请加烈然战队xiaomo或狱然yuran好友,只支持中国版', title=GUI_TITLE)
__gui_showstring('本作品正在更新...', title=GUI_TITLE)
__gui_showstring('<>或[]之内可自己填写', title=GUI_TITLE)
__gui_showstring('#号后是意思', title=GUI_TITLE)
__gui_showstring('效果大全', title=GUI_TITLE)
__gui_showstring('跳跃增强', title=GUI_TITLE)
__gui_showstring('荆棘+保护胸甲', title=GUI_TITLE)
__gui_showstring('锋利钻石剑', title=GUI_TITLE)
__gui_showstring('增加经验值', title=GUI_TITLE)
__gui_showstring('获得命令方块', title=GUI_TITLE)
__gui_showstring('新手版', title=GUI_TITLE)
__gui_showstring('玩家收到/不收到消息', title=GUI_TITLE)
open_ = __gui_askstring(prompt='', title=GUI_TITLE, parent=GUI_WINDOW, initialvalue='')
if (open_ == '荆棘+保护胸甲'):
__gui_showstring('/give @p diamond_chestplate 1 0 {Unbreakable:1b,e喵h:[{id:0,lvl:<强度(超过1000000作废)>},{id:7,lvl:<强度(超过1000000作废)>}]}', title=GUI_TITLE)
if (open_ == '锋利钻石剑'):
__gui_showstring('/give @a minecraft:diamond_sword 1 0 {e喵h:[{id:16,lvl:<强度(超过1000000作废)>}]}', title=GUI_TITLE)
if (open_ == '增加经验值'):
__gui_showstring('/xp <数量> <玩家名>', title=GUI_TITLE)
if (open_ == '获得命令方块'):
__gui_showstring('/give @p command_block', title=GUI_TITLE)
if (open_ == '玩家收到/不收到消息'):
__gui_showstring('/commandBlockOutput ', title=GUI_TITLE)
if (open_ == '新手版'):
__gui_showstring('欢迎打开新手版,以下是新手指令', title=GUI_TITLE)
__gui_showstring('传送', title=GUI_TITLE)
__gui_showstring('清除玩家物品', title=GUI_TITLE)
New_ = __gui_askstring(prompt='', title=GUI_TITLE, parent=GUI_WINDOW, initialvalue='')
if (New_ == '传送'):
__gui_showstring('/tp <玩家1> <玩家2>', '第二个括号可以填坐标', '#将XXX传送至XXX', title=GUI_TITLE)
if (New_ == '清除玩家物品'):
__gui_showstring('/clear [玩家] [数量] [物品名]', '可以直接输入/clear #直接清除所有物品', '可以不输[玩家]之后的 #如果输入[数量],就必须写[物品名]', title=GUI_TITLE)
if (open_ == '效果大全'):
__gui_showstring('欢迎来到效果大全', title=GUI_TITLE)
__gui_showstring('速度', title=GUI_TITLE)
__gui_showstring('缓慢', title=GUI_TITLE)
__gui_showstring('挖掘效率', title=GUI_TITLE)
Num_ = __gui_askstring(prompt='', title=GUI_TITLE, parent=GUI_WINDOW, initialvalue='')
if (Num_ == '速度'):
__gui_showstring('/effect Speed [效果强度(最高255)] [维持时间]', title=GUI_TITLE)
if (Num_ == '缓慢'):
__gui_showstring('/effect Slowness [效果强度(最高255)] [维持时间]', title=GUI_TITLE)
if (Num_ == '挖掘效率'):
__gui_showstring('/effect Haste [效果强度(最高255)] [维持时间]', title=GUI_TITLE)
改成GUI了,
预告:文字游戏GUI转换器即将推出……
点赞0
评论