commit
322a8f101a
19
jc.py
Normal file
19
jc.py
Normal file
@ -0,0 +1,19 @@
|
||||
import os
|
||||
import sys
|
||||
from time import sleep
|
||||
|
||||
import shelve
|
||||
|
||||
print('版本:V1.0.1')
|
||||
print('正在初始化...')
|
||||
|
||||
with shelve.open('main') as db:
|
||||
db['startgame'] = False
|
||||
# db['vape_run'] = False
|
||||
db.close()
|
||||
|
||||
|
||||
print('初始化已完成!')
|
||||
sleep(1.5)
|
||||
os.startfile('pmcl_main.exe')
|
||||
sys.exit()
|
16
kg.py
16
kg.py
@ -1,10 +1,18 @@
|
||||
import os
|
||||
import shelve
|
||||
import sys
|
||||
|
||||
from time import sleep
|
||||
|
||||
DIR = os.getcwd()
|
||||
print(DIR)
|
||||
|
||||
|
||||
os.startfile('fix.bat')
|
||||
os.startfile('start.bat')
|
||||
with shelve.open('main') as db:
|
||||
startgame = db.get('startgame')
|
||||
if startgame == False:
|
||||
print("没有检测到运行我的世界")
|
||||
print('请在启动器里启动后在注入!!')
|
||||
sleep(3)
|
||||
sys.exit()
|
||||
else:
|
||||
os.startfile('fix.bat')
|
||||
os.system('start vape\lite\start.bat')
|
||||
|
57
pmcl.py
57
pmcl.py
@ -8,14 +8,17 @@
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
import sys
|
||||
import os
|
||||
import shelve
|
||||
import sys
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
|
||||
|
||||
class Ui_MainWindow(QtWidgets.QMainWindow):
|
||||
def __init__(self):
|
||||
super(Ui_MainWindow,self).__init__()
|
||||
super(Ui_MainWindow, self).__init__()
|
||||
self.setupUi(self)
|
||||
|
||||
def setupUi(self, MainWindow):
|
||||
@ -76,58 +79,66 @@ class Ui_MainWindow(QtWidgets.QMainWindow):
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
# def
|
||||
|
||||
def run(self):
|
||||
maxmb = self.maxmb_t.text()
|
||||
username_text = self.username.text()
|
||||
version = self.game_c.currentText()
|
||||
with open("username.txt", "w") as file:
|
||||
file.write(username_text)
|
||||
pass
|
||||
with open('maxmb.txt', 'w') as maxmb_f:
|
||||
maxmb_f.write(maxmb)
|
||||
version = self.game_c.currentText()
|
||||
print(maxmb, username_text,version)
|
||||
with open('version.txt', 'w') as version_f:
|
||||
version_f.write(version)
|
||||
print(maxmb, username_text, version)
|
||||
if version == '1.8.9 Forge':
|
||||
if maxmb < '1024':
|
||||
QMessageBox.critical(self, 'ERROR', '请输入大于1024的数!', QMessageBox.Ok)
|
||||
else:
|
||||
try:
|
||||
os.startfile('start_1_8_9.bat')
|
||||
except:
|
||||
QMessageBox.critical(self, 'ERROR', '无法启动游戏,请尝试重新安装。')
|
||||
|
||||
version = 'vapeV4.04'
|
||||
with open('version.txt', 'w') as version_f:
|
||||
version_f.write(version)
|
||||
try:
|
||||
with shelve.open('main') as db:
|
||||
db['startgame'] = True
|
||||
db.close()
|
||||
os.startfile('start_game.bat')
|
||||
except:
|
||||
QMessageBox.critical(self, 'ERROR', '无法启动游戏,请尝试重新安装。')
|
||||
|
||||
else:
|
||||
QMessageBox.critical(self, 'ERROR', '暂未做完......', QMessageBox.Close)
|
||||
return 0
|
||||
|
||||
def kg(self):
|
||||
# run
|
||||
QMessageBox.information(self, 'warning', '启动后请不要关闭server.exe这个程序!!!!', QMessageBox.Ok)
|
||||
QMessageBox.warning(self, '注意!', '可能有病毒,请小心使用!!')
|
||||
try:
|
||||
os.startfile('kg.exe')
|
||||
except:
|
||||
QMessageBox.critical(self, 'ERROR', '无法启动', QMessageBox.Ok)
|
||||
|
||||
|
||||
|
||||
QMessageBox.critical(self, 'ERROR', '无法启动,请尝试重新安装!', QMessageBox.Ok)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Pmcl 1.0.0"))
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Pmcl 1.0.1"))
|
||||
self.label_4.setText(_translate("MainWindow", "最大内存:"))
|
||||
self.maxmb_t.setText(_translate("MainWindow", "1145"))
|
||||
self.pushButton.setText(_translate("MainWindow", "开vape"))
|
||||
self.label.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:18pt; font-weight:600; color:#1c33fe;\">python minecraft launcher v1.0.0</span></p></body></html>"))
|
||||
self.label.setText(_translate("MainWindow",
|
||||
"<html><head/><body><p><span style=\" font-size:18pt; font-weight:600; color:#1c33fe;\">Python minecraft launcher V1.0.1</span></p></body></html>"))
|
||||
self.label_3.setText(_translate("MainWindow", "游戏姓名:"))
|
||||
self.username.setText(_translate("MainWindow", "sb001"))
|
||||
self.label_2.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">游戏版本:</span></p></body></html>"))
|
||||
self.label_2.setText(_translate("MainWindow",
|
||||
"<html><head/><body><p><span style=\" font-size:11pt;\">游戏版本:</span></p></body></html>"))
|
||||
self.game_c.setItemText(0, _translate("MainWindow", "1.8.9 Forge"))
|
||||
self.game_c.setItemText(1, _translate("MainWindow", "1.12.2 Forge"))
|
||||
self.run_game.setText(_translate("MainWindow", "开始游戏"))
|
||||
self.pushButton.clicked.connect(self.kg)
|
||||
self.run_game.clicked.connect(self.run)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
mainloop = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(mainloop)
|
||||
mainloop.show()
|
||||
sys.exit(app.exec_())
|
||||
sys.exit(app.exec_())
|
||||
|
16
start_game.bat
Normal file
16
start_game.bat
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user