Sign in to follow this  
Followers 0
MatheusGM

Need Help! FAST PLZ

2 posts in this topic

Need Help With The "Func Programa()", because I wanna make a script that, verify the INI, with the Variable, then go to another FUNC, then Verify the Other Variable, Then go to the Main FUNC, That is "Programa2"... if someone found the error help me plzzz!

#NoTrayIcon
#Region# Warpper ##
#AutoIt3Wrapper_icon=SwordAxe.ico
#AutoIt3Wrapper_outfile=..\Elfbot NG Patcher By MatheusGM.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Description=Patcher Para ElfBotNG
#AutoIt3Wrapper_Res_Fileversion=2.0
#AutoIt3Wrapper_Res_Language=1046
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;===============================================================================
; Name:         Elf Pacher
; Author:       MatheusGM \\ matheus_laser@hotmail.com
; Description:  ElfBot NG Pacher, Com Configurador
;===============================================================================
; Includes
;===============================================================================
#Region# Configs ##
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;===============================================================================
; Declare constant vars
;===============================================================================
Global Const $ICO_DST = @TempDir & "\~$Ngl"
Global Const $APP_DST = @TempDir & "\~$Ngl"
Global Const $PLAY_MSC = @TempDir & "\~Ngl"
Global Const $ico_app = $ICO_DST & "\SwordAxe.ico"
Global Const $tocar_msc = $PLAY_MSC & "\fundo.mp3"
Global Const $img_fundo = $ICO_DST & "\Background.jpg"
;===============================================================================
; Icon and app
;===============================================================================
DirCreate(@TempDir & "\~$Ngl")
FileInstall("ico\SwordAxe.ico", $ico_app, 1)
FileInstall("msc\fundo.mp3", $tocar_msc, 1)
FileInstall("img\Background.jpg", $img_fundo, 1)
SoundPlay("msc\fundo.mp3", 0)
;===============================================================================
; Key
;===============================================================================
$open_tibia = IniRead(@ScriptDir & "Settings.ini", "Caminhos","$open_tibia", "0")
$open_loader = IniRead(@ScriptDir & "Settings.ini", "Caminhos","$open_loader","0")
$hwid = IniRead(@ScriptDir & "Settings.ini", "Key","$hwid", "0")
$regname = IniRead(@ScriptDir & "Settings.ini", "Key", "$regname", "0")
$regkey = IniRead(@ScriptDir & "Settings.ini", "Key", "$regkey", "0")
$primeira_exec = IniRead(@ScriptDir & "Settings.ini", "Misc", "$primeira_exec", "0")
$usar_trial = IniRead(@ScriptDir & "Settings.ini", "Misc", "$usar_trial", "1")

;$hwid = "1B4DB726"
;regname = "msn@otbr.com.br"
;regkey = "01BKJD-VDUH9D-A9JXA3-A4HQVY-439X47-ME582P-FRAFYF-RC8H9G-RR1C8M-WNJYVK"
#EndRegion

#Region Form
$Form = GUICreate("Elfbot NG Patcher By MatheusGM", 480, 272, 203, 129)
GUISetIcon($ico_app)
$Arquivo_Menu = GUICtrlCreateMenu("Arquivo")
$Exit_Button = GUICtrlCreateMenuItem("Exit", $Arquivo_Menu)
$Trial_Button = GUICtrlCreateMenuItem("Trial Reset", $Arquivo_Menu)
$Configurar_Button = GUICtrlCreateMenuItem("Configurar", $Arquivo_Menu)
$About_Button = GUICtrlCreateMenu("About")
$Sobre_Button = GUICtrlCreateMenuItem("Sobre", $About_Button)
$Versao_Button = GUICtrlCreateMenuItem("Versão", $About_Button)
$Site_Button = GUICtrlCreateMenuItem("Nosso Site", $About_Button)
GUISetBkColor(0x000000)
$StatusBar = _GUICtrlStatusBar_Create($Form)
_GUICtrlStatusBar_SetSimple($StatusBar)
_GUICtrlStatusBar_SetText($StatusBar, "Pronto!")
_GUICtrlStatusBar_SetMinHeight($StatusBar, 20)
$Button_Crack = GUICtrlCreateButton("Iniciar",180, 170, 100, 25, $WS_GROUP)
GUICtrlSetCursor(-1, 0)
$Background = GUICtrlCreatePic($img_fundo, 0, 0, 480, 272, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            ExitLoop

        Case $Exit_Button
            ExitLoop

        Case $Sobre_Button
            About()

        Case $Versao_Button
            Versao()

        Case $Site_Button
            Site()

        Case $Button_Crack
            Programa()

        Case $Trial_Button
            TrialReset()

        Case $Configurar_Button
            Config_ini()

    EndSwitch
WEnd

Func About()
    $About_Form = GUICreate("About", 136, 160, 260, 140, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
    GUISetIcon($ico_app)
    $Group_Criador = GUICtrlCreateGroup("Criador", 11, 8, 115, 50)
    $Text_Criador = GUICtrlCreateLabel("MatheusGM", 25, 32, 92, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group_Sobre = GUICtrlCreateGroup("Sobre", 12, 65, 115, 90)
    $Text_Sobre = GUICtrlCreateLabel("Patcher do Elfbot NG.", 16, 80, 100, 64)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
    GUIDelete($About_Form)
EndFunc

Func Versao()
    $Version_Form = GUICreate("Versão", 101, 51, 192, 124, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
    GUISetIcon($ico_app)
    $Text_Version = GUICtrlCreateLabel("Versão 2.0", 10, 17, 80, 17)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
    GUIDelete($Version_Form)
EndFunc

Func Site()
    $Site_Form = GUICreate("Site", 156, 79, 192, 124, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
    GUISetIcon($ico_app)
    $Group_Visite = GUICtrlCreateGroup("Visite", 2, 0, 153, 73)
    $Text_Site = GUICtrlCreateLabel("Visite Nosso Site", 38, 21, 83, 17)
    $Text_Http = GUICtrlCreateLabel("http://tibiabrbot.com/site/", 7, 40, 144, 17)
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetCursor(-1, 0)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                ExitLoop

            Case $Text_Http
                ShellExecute("http://tibiabrbot.com/site/")
        EndSwitch
    WEnd
    GUIDelete($Site_Form)
EndFunc

Func TrialReset()
    ProcessClose("Trial-Reset.exe")
    Run(@ScriptDir & "\Trial-Reset\Trial-Reset.exe")
    Sleep(1500)
    WinWaitActive("Trial-Reset 3.0 RC9")
    Send("{ALT}")
    Send("{RIGHT 3}")
    Send("{DOWN 3}")
    Send("{RIGHT}")
    Send("{ENTER}")
    Sleep(3000)
    Send("{ALT}")
    Send("{RIGHT 3}")
    Send("{DOWN 3}")
    Send("{RIGHT}")
    Send("{DOWN}")
    Send("{ENTER}")
    ProcessClose("Trial-Reset.exe")
    MsgBox(64, "Done!", "Registros Limpos com Sucesso!" & @CRLF & "         Bom jogo!", 15)
EndFunc

Func TrialReset2()
$var2 = IniRead(@ScriptDir & "Settings.ini", "Misc","$usar_trial", "1")
If  $var2 = 0 Then
Programa2()
Else
TrialReset3()
EndIf
EndFunc


Func TrialReset3()
    ProcessClose("Trial-Reset.exe")
    Run(@ScriptDir & "\Trial-Reset\Trial-Reset.exe")
    Sleep(1500)
    WinWaitActive("Trial-Reset 3.0 RC9")
    Send("{ALT}")
    Send("{RIGHT 3}")
    Send("{DOWN 3}")
    Send("{RIGHT}")
    Send("{ENTER}")
    Sleep(3000)
    Send("{ALT}")
    Send("{RIGHT 3}")
    Send("{DOWN 3}")
    Send("{RIGHT}")
    Send("{DOWN}")
    Send("{ENTER}")
    ProcessClose("Trial-Reset.exe")
    MsgBox(64, "Done!", "Registros Limpos com Sucesso!" & @CRLF & "         Bom jogo!", 15)
EndFunc

Func Programa()
    $varc = IniRead(@ScriptDir & "Settings.ini", "Misc", "$primeira_exec", "0")
If  $varc = 1 Then
   Conf()
Else
    TrialReset2()
    EndIf
    EndFunc


Func Programa2()
    _GUICtrlStatusBar_SetText($StatusBar, "Abra o loader...")
    $open_loader = FileOpenDialog("Selecione o loader.exe do Elfbot!", "D:\Jogos\ElfBot NG\", "loader file (loader.exe)", 1)
    If @error Then
        MsgBox(4096, "Erro!", "Você não selecionou o loader corretamente!")
    Else
    EndIf
        _GUICtrlStatusBar_SetText($StatusBar, "Abra o Tibia...")
    $open_tibia = FileOpenDialog("Selecione o Tibia.exe do Tibia!", "D:\Jogos\Tibia\", "tibia file (tibia.exe)", 1)
        If @error Then
        MsgBox(4096, "Erro!", "Você não selecionou o Tibia corretamente!")
    Else
        _GUICtrlStatusBar_SetText($StatusBar, "Abrindo Tibia...")
    Run($open_tibia)
    Sleep(2000)
        _GUICtrlStatusBar_SetText($StatusBar, "Abrindo o loader...")
    Run($open_loader)
    Sleep(2000)
        _GUICtrlStatusBar_SetText($StatusBar, "Processando...")
    WinWaitActive("Reminder")
    WinActivate("Reminder")
    Sleep(4000)
    Send("{TAB}")
    Send("{ENTER}")
    Run(@ScriptDir & "\Armadillo-Changer-Pro\HWID_Changer_Pro.exe")
    WinWaitActive("Sh4DoVV Armadillo 6.x HWID Changer")
    WinActivate("Sh4DoVV Armadillo 6.x HWID Changer")
    Send($hwid)
    Send("{TAB}")
    Send("{ENTER}")
    Sleep(10000)
    ProcessClose("HWID_Changer_Pro.exe")
    WinExists("Enter Key")
    WinActivate("Enter Key")
    Send($regname & "{TAB}" & $regkey)
    Send("{ENTER}")
    Send("{ENTER}")
    Send("{ENTER}")
        _GUICtrlStatusBar_SetText($StatusBar, "Crackeado com Sucesso!")
    MsgBox(64, "Done!", "Patcheado com Sucesso!" & @CRLF & "         Bom jogo!", 15)
    EndIf
EndFunc

Func IP_Changer()
    _GUICtrlStatusBar_SetText($StatusBar, "Abrindo o IP Changer...")
    Run(@ScriptDir & "\IP-Changer\IP-Changer.exe")
EndFunc

Func Config_ini()
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form = GUICreate("Configurador - Elf Patcher", 480, 272, 203, 129)
GUISetIcon($ico_app)
$Configurar = GUICtrlCreateButton("Configurar!", 168, 232, 81, 25, $WS_GROUP)
$Background = GUICtrlCreatePic($img_fundo, 0, 0, 480, 272, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Configurar
            Conf()

    EndSwitch
WEnd
EndFunc

Func Conf()
        IniWrite(@ScriptDir & "Settings.ini", "Misc","$primeira_exec", "0")
        IniWrite(@ScriptDir & "Settings.ini", "Misc","$usar_trial", "1")
        $open_tibia = FileOpenDialog("Selecione o Tibia.exe do Tibia!", "D:\Jogos\Tibia\", "tibia file (tibia.exe)", 1)
    If @error <> 1 Then
        IniWrite(@ScriptDir & "Settings.ini", "Caminhos","$open_tibia", $open_tibia)
    Else
            MsgBox(4096, "Erro!", "Você não selecionou o Tibia corretamente!")
    EndIf
                $open_loader = FileOpenDialog("Selecione o loader.exe do Elfbot!", "D:\Jogos\ElfBot NG\", "loader file (loader.exe)", 1)
    If @error Then
            MsgBox(4096, "Erro!", "Você não selecionou o loader corretamente!")
    Else
        IniWrite(@ScriptDir & "Settings.ini", "Caminhos","$open_loader", $open_loader)
    EndIf
    $hwid = InputBox( "Configurador - Elf Patcher", "Insira o Harware ID")
        IniWrite(@ScriptDir & "Settings.ini", "Key","$hwid", $hwid)
    $regname = InputBox( "Configurador - Elf Patcher", "Insira o Registration Name")
        IniWrite(@ScriptDir & "Settings.ini", "Key", "$regname", $regname)
    $regkey = InputBox( "Configurador - Elf Patcher", "Insira a Registration Key")
        IniWrite(@ScriptDir & "Settings.ini", "Key", "$regkey", $regkey)
        MsgBox(64, "Configurador - Elf Patcher", "Configurado com Sucesso!" & @CRLF & "         Bom jogo!", 15)
EndFunc

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0