OkMuOnline


NowaHosting


AlphaServers


Resultados 1 a 7 de 7
  1. #1
    Lendário kingrox's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    81
    Thanks Thanks Given 
    74
    Thanks Thanks Received 
    382
    Thanked in
    41 Posts
    Mentioned
    1 Post(s)
    Humor
    Fine
    País
    Brazil

    Post LauncherPZ por kingrox

    Está bem simples, mas ainda estou aprendendo usar python com tkinter

    para aprendizado

    Código:
    from tkinter import *import subprocess
    
    
    # Botão Jogar
    def jogar():
        subprocess.call("main.exe", shell=True)
    
    
    # Botão Salvar
    def salvar():
        subprocess.run("Config.reg", shell=True)
        resol = open('Config.reg', 'w')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"LangSelection"="Por"')
        resol.close()
    
    
    # Botão Resoluções
    def resolu():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:00000000\n')
        resol.close()
    
    
    def resolu1():
        resol = open('Config.reg', 'at')
        resol.write('\nWindows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:00000001')
        resol.close()
    
    
    def resolu2():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:00000002\n')
        resol.close()
    
    
    def resolu3():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:0000003\n')
        resol.close()
    
    
    def resolu4():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:0000004\n')
        resol.close()
    
    
    def resolu5():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:0000005\n')
        resol.close()
    
    
    def resolu6():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:0000006\n')
        resol.close()
    
    
    def resolu7():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:0000007\n')
        resol.close()
    
    
    def resolu8():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"Resolution"=dword:0000008\n')
        resol.close()
    
    
    # Botão Músicas
    def musicaON():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"MusicOnOFF"=dword:00000001\n')
        resol.close()
    
    
    def musicaOFF():
        resol = open('Config.reg', 'at')
        resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"MusicOnOFF"=dword:00000000\n')
        resol.close()
    
    
    # Botão Idiomas
    def linEng():
        lingua = open('Config.reg', 'at')
        lingua.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"LangSelection"="Eng"\n')
        lingua.close()
    
    
    def linPor():
        lingua = open('Config.reg', 'at')
        lingua.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"LangSelection"="Por"\n')
        lingua.close()
    
    
    def linSpn():
        lingua = open('Config.reg', 'at')
        lingua.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"LangSelection"="Spn"\n')
        lingua.close()
    
    
    # Botão Sons
    def sonOff():
        son = open('Config.reg', 'at')
        son.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"SoundOnOFF"=dword:00000000\n "VolumeLevel"=dword:00000000"\n')
        son.close()
    
    
    def sonOn():
        son = open('Config.reg', 'at')
        son.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"SoundOnOFF"=dword:00000001\n "VolumeLevel"=dword:00000001"\n')
        son.close()
    
    
    def janelaOFF():
        windows = open('Config.reg', 'at')
        windows.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"WindowMode"=dword:00000000\n')
        windows.close()
    
    
    def janelaON():
        windows = open('Config.reg', 'at')
        windows.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n"WindowMode"=dword:00000001\n')
        windows.close()
    
    
    # Layout de opções
    menu = Tk()
    menu.geometry('400x600+750+100')
    menu.title('Launcher PerfectZone')
    menu.iconbitmap(default='img\\ico.ico')
    
    #Foto PZ
    logo = PhotoImage(file='img\\logo.png')
    logoposição = Label(menu, image=logo)
    logoposição.place(width=400, height=780, x=0, y=135)
    
    #Credito
    cred = Label(menu, text='By kingrox')
    cred.place(x=330, y=570)
    
    # Campo de nickName
    nick = LabelFrame(menu, text='Nome')
    nick.place(width=140, height=55, x=15, y=10)
    nickN = Label(menu, text='Digite seu nome')
    nickN = Entry(menu)
    nickN.place(width=120, height=20, x=25, y=30)
    ok = Button(menu, text='JOGAR', command=jogar)
    ok.place(width=100, height=40, x=170, y=20)
    cancelar = Button(menu, text='SALVAR', command=salvar)
    cancelar.place(width=100, height=40, x=280, y=20)
    
    # Botão linguagem
    lin = LabelFrame(menu, text='Selecione a Lingua')
    lin.place(width=370, height=65, x=15, y=80)
    linP = Button(menu, text='Português', command=linPor)
    linP.place(width=100, height=30, x=27, y=100)
    linE = Button(menu, text='Espanhol', command=linSpn)
    linE.place(width=100, height=30, x=147, y=100)
    linF = Button(menu, text='Inglês', command=linEng)
    linF.place(width=100, height=30, x=267, y=100)
    
    # Resoluções
    reso = LabelFrame(menu, text='Selecione a resolução!')
    reso.place(width=370, height=85, x=15, y=155)
    reso1 = Button(menu, text='640x480', command=resolu)
    reso1.place(width=70, height=30, x=16, y=175)
    reso2 = Button(menu, text='800x600', command=resolu1)
    reso2.place(width=70, height=30, x=85, y=175)
    reso3 = Button(menu, text='1024x768', command=resolu2)
    reso3.place(width=70, height=30, x=155, y=175)
    reso4 = Button(menu, text='1280x1024', command=resolu3)
    reso4.place(width=70, height=30, x=230, y=175)
    reso5 = Button(menu, text='1360x768', command=resolu4)
    reso5.place(width=70, height=30, x=310, y=175)
    reso6 = Button(menu, text='1440x900', command=resolu5)
    reso6.place(width=70, height=30, x=50, y=205)
    reso7 = Button(menu, text='1600x900', command=resolu6)
    reso7.place(width=70, height=30, x=125, y=205)
    reso8 = Button(menu, text='1680x1050', command=resolu7)
    reso8.place(width=72, height=30, x=200, y=205)
    reso9 = Button(menu, text='1920x1080', command=resolu8)
    reso9.place(width=72, height=30, x=275, y=205)
    
    # Botão de som
    som = LabelFrame(menu, text='Ativar e desativar o som!')
    som.place(width=370, height=65, x=15, y=250)
    somON = Button(menu, text='Ativar som (ON)', command=sonOn)
    somON.place(width=140, height=30, x=45, y=270)
    somOFF = Button(menu, text='Desativar som (OFF)', command=sonOff)
    somOFF.place(width=140, height=30, x=205, y=270)
    
    # Botão de Música
    music = LabelFrame(menu, text='Ativar e desativar a música!')
    music.place(width=370, height=65, x=15, y=325)
    musicON = Button(menu, text='Ativar música (ON)', command=musicaON)
    musicON.place(width=140, height=30, x=45, y=345)
    musicOFF = Button(menu, text='Desativar música (OFF)', command=musicaOFF)
    musicOFF.place(width=140, height=30, x=205, y=345)
    
    # Botão de Janela
    janela = LabelFrame(menu, text='Ativar e desativar a Janela')
    janela.place(width=370, height=65, x=15, y=400)
    janelaON = Button(menu, text='Janela (ON)', command=janelaON)
    janelaON.place(width=140, height=30, x=45, y=425)
    janelaOFF = Button(menu, text='Janela (OFF)', command=janelaOFF)
    janelaOFF.place(width=140, height=30, x=205, y=425)
    
    menu.mainloop()
    Usei o auto-py-to-exe para criar o arquivo executável

  2. The Following 4 Users Say Thank You to kingrox For This Useful Post:


  3. #2
    Fundador PerfectZone Mentor's Avatar




    Data de Ingresso
    Jun 2022
    Posts
    289
    Thanks Thanks Given 
    494
    Thanks Thanks Received 
    1,745
    Thanked in
    121 Posts
    Mentioned
    20 Post(s)
    Humor
    Twisted
    País
    Brazil
    Muito legal

  4. The Following User Says Thank You to Mentor For This Useful Post:


  5. #3
    Iniciante amwdeveloper's Avatar

    Data de Ingresso
    Jul 2022
    Localização
    Wenceslau Braz, Paraná
    Posts
    5
    Thanks Thanks Given 
    3
    Thanks Thanks Received 
    2
    Thanked in
    2 Posts
    Mentioned
    0 Post(s)
    País
    Brazil
    Gostei, ficou show de bolotas.

  6. The Following User Says Thank You to amwdeveloper For This Useful Post:


  7. #4
    Lendário kingrox's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    81
    Thanks Thanks Given 
    74
    Thanks Thanks Received 
    382
    Thanked in
    41 Posts
    Mentioned
    1 Post(s)
    Humor
    Fine
    País
    Brazil
    Atualização do codigo
    link do launcher https://perfectzone.com.br/showthread.php?t=200

    from tkinter import *import subprocess


    # Botão Jogar
    def jogar():
    subprocess.call("main.exe", shell=True)


    # Botão Salvar
    def salvar():
    subprocess.run("Config.reg", shell=True)
    resol = open('Config.reg', 'w')
    resol.write('Windows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\Software\Webzen\Mu\Config]\n')
    resol.close()


    # Botão Nome
    def nome():
    n = nick.get()
    cadastro = open('Config.reg', 'at')
    cadastro.write(f'"ID"="{n}"\n')
    cadastro.close()


    # Botão Músicas
    def musicaON():
    resol = open('Config.reg', 'at')
    resol.write('"MusicOnOFF"=dword:00000001\n')
    resol.close()


    def musicaOFF():
    resol = open('Config.reg', 'at')
    resol.write('"MusicOnOFF"=dword:00000000\n')
    resol.close()
    import os

    # Botão Idiomas
    def linEng():
    lingua = open('Config.reg', 'at')
    lingua.write('"LangSelection"="Eng"\n')
    lingua.close()


    def linPor():
    lingua = open('Config.reg', 'at')
    lingua.write('"LangSelection"="Por"\n')
    lingua.close()


    def linSpn():
    lingua = open('Config.reg', 'at')
    lingua.write('"LangSelection"="Spn"\n')
    lingua.close()


    # Botão Sons
    def sonOff():
    son = open('Config.reg', 'at')
    son.write('"VolumeLevel"=dword:00000000"\n')
    son.close()


    def sonOn():
    son = open('Config.reg', 'at')
    son.write('"VolumeLevel"=dword:00000001"\n')
    son.close()


    def janelaOFF():
    windows = open('Config.reg', 'at')
    windows.write('"WindowMode"=dword:00000000\n')
    windows.close()


    def janelaON():
    windows = open('Config.reg', 'at')
    windows.write('"WindowMode"=dword:00000001\n')
    windows.close()


    # Botão das Resoluções
    def Resoluções():
    vresolução = res.get()
    if vresolução == 0:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000000\n')
    resol.close()

    elif vresolução == 1:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000001\n')
    resol.close()

    elif vresolução == 2:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000002\n')
    resol.close()

    elif vresolução == 3:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000003\n')
    resol.close()

    elif vresolução == 4:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000004\n')
    resol.close()

    elif vresolução == 5:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000005\n')
    resol.close()

    elif vresolução == 6:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000006\n')
    resol.close()

    elif vresolução == 7:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000007\n')
    resol.close()

    else:
    resol = open('Config.reg', 'at')
    resol.write('"Resolution"=dword:00000008\n')
    resol.close()


    # Layout
    menu = Tk()
    menu.geometry('400x600+750+100')
    menu.title('Launcher PerfectZone')
    menu.iconbitmap(default='img\\ico.ico')
    menu.resizable(False, False)

    # Foto PZ
    logo = PhotoImage(file='img\\logo.png')
    logoposição = Label(menu, image=logo).place(width=400, height=780, x=0, y=135)

    # Credito
    cred = Label(menu, text='By kingrox').place(x=330, y=570)

    # Campo de nickName
    LabelFrame(menu, text='Nome').place(width=140, height=55, x=15, y=10)
    nick = Entry(menu)
    nick.place(width=85, height=20, x=25, y=30)
    Button(menu, text='ADD', command=nome).place(width=30, height=20, x=115, y=30)

    # Botão Jogar
    Button(menu, text='JOGAR', command=jogar).place(width=100, height=40, x=170, y=20)

    # Botão Salvar
    Button(menu, text='SALVAR', command=salvar).place(width=100, height=40, x=280, y=20)

    # Botão Idioma
    LabelFrame(menu, text='Selecione o idioma').place(width=370, height=65, x=15, y=80)
    Button(menu, text='Português', command=linPor).place(width=100, height=30, x=27, y=100)
    Button(menu, text='Espanhol', command=linSpn).place(width=100, height=30, x=147, y=100)
    Button(menu, text='Inglês', command=linEng).place(width=100, height=30, x=267, y=100)

    # Resoluções
    res = IntVar()
    LabelFrame(menu, text='Selecione a resolução!').place(width=370, height=85, x=15, y=155)
    r = Radiobutton(menu, text='640x480', value=0, variable=res, command=Resoluções).place(width=70, height=30, x=16, y=175)
    r1 = Radiobutton(menu, text='800x600', value=1, variable=res, command=Resoluções).place(width=70, height=30, x=85, y=175)
    r2 = Radiobutton(menu, text='1024x768', value=2, variable=res, command=Resoluções).place(width=70, height=30, x=155, y=175)
    r3 = Radiobutton(menu, text='1280x1024', value=3, variable=res, command=Resoluções).place(width=70, height=30, x=230, y=175)
    r4 = Radiobutton(menu, text='1360x768', value=4, variable=res, command=Resoluções).place(width=70, height=30, x=310, y=175)
    r5 = Radiobutton(menu, text='1440x900', value=5, variable=res, command=Resoluções).place(width=70, height=30, x=50, y=205)
    r6 = Radiobutton(menu, text='1600x900', value=6, variable=res, command=Resoluções).place(width=70, height=30, x=125, y=205)
    r7 = Radiobutton(menu, text='1680x1050', value=7, variable=res, command=Resoluções).place(width=72, height=30, x=200, y=205)
    r8 = Radiobutton(menu, text='1920x1080', value=8, variable=res, command=Resoluções).place(width=72, height=30, x=275, y=205)

    # Botão de Som
    LabelFrame(menu, text='Ativar e desativar o som!').place(width=370, height=65, x=15, y=250)
    Button(menu, text='Som (ON)', command=sonOn).place(width=140, height=30, x=45, y=270)
    Button(menu, text='Som (OFF)', command=sonOff).place(width=140, height=30, x=205, y=270)

    # Botão de Música
    LabelFrame(menu, text='Ativar e desativar a música!').place(width=370, height=65, x=15, y=325)
    Button(menu, text='Música (ON)', command=musicaON).place(width=140, height=30, x=45, y=345)
    Button(menu, text='Música (OFF)', command=musicaOFF).place(width=140, height=30, x=205, y=345)

    # Botão de Janela
    LabelFrame(menu, text='Ativar e desativar modo janela').place(width=370, height=65, x=15, y=400)
    Button(menu, text='Janela (ON)', command=janelaON).place(width=140, height=30, x=45, y=425)
    Button(menu, text='Janela (OFF)', command=janelaOFF).place(width=140, height=30, x=205, y=425)


    menu.mainloop()
    Last edited by kingrox; 07-21-2022 at 03:48 AM.

  8. #5
    Lendário kingrox's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    81
    Thanks Thanks Given 
    74
    Thanks Thanks Received 
    382
    Thanked in
    41 Posts
    Mentioned
    1 Post(s)
    Humor
    Fine
    País
    Brazil
    Atualização do Launcher

    Foi organizado o código e add o registro direto no windows

    from tkinter import *import subprocess
    from winreg import *


    # Botão Jogar
    def jogar():
    menu.destroy()
    subprocess.call("main.exe", shell=True)


    # Botão Nome
    def nome():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "ID", 0, REG_SZ, nick.get())
    CloseKey(key)


    def musicaON():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "MusicOnOFF", 0, REG_DWORD, 1)
    CloseKey(key)


    def musicaOFF():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "MusicOnOFF", 0, REG_DWORD, 0)
    CloseKey(key)


    def linEng():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "LangSelection", 0, REG_SZ, 'Eng')
    CloseKey(key)


    def linPor():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "LangSelection", 0, REG_SZ, 'Por')
    CloseKey(key)


    def linSpn():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "LangSelection", 0, REG_SZ, 'Spn')
    CloseKey(key)


    def sonOff():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "VolumeLevel", 0, REG_DWORD, 0)
    CloseKey(key)


    def sonOn():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "VolumeLevel", 0, REG_DWORD, 1)
    CloseKey(key)


    def janelaOFF():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, 'WindowMode', 0, REG_DWORD, 0)
    CloseKey(key)


    def janelaON():
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "WindowMode", 0, REG_DWORD, 1)
    CloseKey(key)


    def Resoluções():
    vresolução = res.get()
    if vresolução == 0:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 0)
    CloseKey(key)
    elif vresolução == 1:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 1)
    CloseKey(key)
    elif vresolução == 2:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 2)
    CloseKey(key)
    elif vresolução == 3:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 3)
    CloseKey(key)
    elif vresolução == 4:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 4)
    CloseKey(key)
    elif vresolução == 5:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 5)
    CloseKey(key)
    elif vresolução == 6:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 6)
    CloseKey(key)
    elif vresolução == 7:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 7)
    CloseKey(key)
    else:
    keyVal = r'Software\Webzen\Mu\Config'
    try:
    key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
    except:
    key = CreateKey(HKEY_CURRENT_USER, keyVal)
    SetValueEx(key, "Resolution", 0, REG_DWORD, 8)
    CloseKey(key)


    # Layout
    menu = Tk()
    menu.geometry('400x600+650+150')
    menu.title('Launcher PerfectZone')
    menu.iconbitmap(default='img\\ico.ico')
    menu.resizable(False, False)

    # Foto PZ
    logo = PhotoImage(file='img\\logo.png')
    logoposição = Label(menu, image=logo).place(width=400, height=780, x=0, y=135)

    # Credito
    cred = Label(menu, text='By kingrox').place(x=330, y=570)

    # Campo de nickName
    LabelFrame(menu, text='Nome').place(width=140, height=55, x=15, y=10)
    nick = Entry(menu)
    nick.place(width=80, height=20, x=25, y=30)
    Button(menu, text='Salvar', command=nome).place(width=40, height=25, x=110, y=27)

    # Botão Jogar
    Button(menu, text='JOGAR', command=jogar).place(width=180, height=50, x=190, y=16)


    # Botão Idioma
    LabelFrame(menu, text='Selecione o idioma').place(width=370, height=65, x=15, y=80)
    Button(menu, text='Português', command=linPor).place(width=100, height=30, x=27, y=100)
    Button(menu, text='Espanhol', command=linSpn).place(width=100, height=30, x=147, y=100)
    Button(menu, text='Inglês', command=linEng).place(width=100, height=30, x=267, y=100)

    # Resoluções
    res = IntVar()
    LabelFrame(menu, text='Selecione a resolução!').place(width=370, height=85, x=15, y=155)
    r = Radiobutton(menu, text='640x480', value=0, variable=res, command=Resoluções).place(width=70, height=30, x=16, y=175)
    r1 = Radiobutton(menu, text='800x600', value=1, variable=res, command=Resoluções).place(width=70, height=30, x=85, y=175)
    r2 = Radiobutton(menu, text='1024x768', value=2, variable=res, command=Resoluções).place(width=70, height=30, x=155, y=175)
    r3 = Radiobutton(menu, text='1280x1024', value=3, variable=res, command=Resoluções).place(width=70, height=30, x=230, y=175)
    r4 = Radiobutton(menu, text='1360x768', value=4, variable=res, command=Resoluções).place(width=70, height=30, x=310, y=175)
    r5 = Radiobutton(menu, text='1440x900', value=5, variable=res, command=Resoluções).place(width=70, height=30, x=50, y=205)
    r6 = Radiobutton(menu, text='1600x900', value=6, variable=res, command=Resoluções).place(width=70, height=30, x=125, y=205)
    r7 = Radiobutton(menu, text='1680x1050', value=7, variable=res, command=Resoluções).place(width=72, height=30, x=200, y=205)
    r8 = Radiobutton(menu, text='1920x1080', value=8, variable=res, command=Resoluções).place(width=72, height=30, x=275, y=205)

    # Botão de Som
    LabelFrame(menu, text='Ativar e desativar o som!').place(width=370, height=65, x=15, y=250)
    Button(menu, text='Som (ON)', command=sonOn).place(width=140, height=30, x=45, y=270)
    Button(menu, text='Som (OFF)', command=sonOff).place(width=140, height=30, x=205, y=270)

    # Botão de Música
    LabelFrame(menu, text='Ativar e desativar a música!').place(width=370, height=65, x=15, y=325)
    musicaOn = Button(menu, text='Música (ON)', command=musicaON).place(width=140, height=30, x=45, y=345)
    musicaOff = Button(menu, text='Música (OFF)', command=musicaOFF).place(width=140, height=30, x=205, y=345)

    # Botão de Janela
    LabelFrame(menu, text='Ativar e desativar modo janela').place(width=370, height=65, x=15, y=400)
    Button(menu, text='Janela (ON)', command=janelaON).place(width=140, height=30, x=45, y=425)
    Button(menu, text='Janela (OFF)', command=janelaOFF).place(width=140, height=30, x=205, y=425)


    menu.mainloop()

  9. The Following 2 Users Say Thank You to kingrox For This Useful Post:


  10. #6
    Iniciante manoellgamer's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    1
    Thanks Thanks Given 
    6
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Mentioned
    0 Post(s)
    País
    Ireland
    Muito da hora mano, tem a source no github ? seria bacana para pessoas sugerirem algumas mudanças e sugestões.

  11. The Following User Says Thank You to manoellgamer For This Useful Post:


  12. #7
    Lendário kingrox's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    81
    Thanks Thanks Given 
    74
    Thanks Thanks Received 
    382
    Thanked in
    41 Posts
    Mentioned
    1 Post(s)
    Humor
    Fine
    País
    Brazil
    Citação Originally Posted by manoellgamer Ver Post
    Muito da hora mano, tem a source no github ? seria bacana para pessoas sugerirem algumas mudanças e sugestões.
    não tenho github ainda =D

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • You may not post Resposta(s)
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •