Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 12:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Make a simply autopatcher!

Discussion on Make a simply autopatcher! within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2011
Posts: 33
Received Thanks: 1
Make a simply autopatcher!

Hello!How i can to make a metin2 simpli autopatcher so she download file?I want to make this autopatcher:

I give ++ thanks!

If you can give my the source of this autopatcher..
AslTracker is offline  
Old 02/23/2012, 10:31   #2





 
Marcoly's Avatar
 
elite*gold: 440
The Black Market: 1196/3/0
Join Date: May 2011
Posts: 10,932
Received Thanks: 11,778
Simple autopatcher source:

PHP Code:
#Include <File.au3>
#Include <GuiConstants.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#NoTrayIcon
Global $m2ordner = @ScriptDir
Global $ScriptDir = @ScriptDir
Global $TempDir = @TempDir
Global $url FileReadLine($ScriptDir "\patch.ini"1)
Global 
$adurl FileReadLine ($ScriptDir "\patch.ini",2)
Global 
$fensterurl FileReadLine ($ScriptDir "\patch.ini",3)
Global 
$buttonurl FileReadLine ($ScriptDir "\patch.ini",4)
FileInstall("C:\Users\iMer\Pictures\metin2start.bmp", @Tempdir&"\metin2start.bmp",1)
FileInstall("D:\Games\longjuyt2.de\patchskin\btn_startgame_up.bmp", @Tempdir&"\btn_startgame_up.bmp",1)
FileInstall("D:\Games\longjuyt2.de\patchskin\btn_settings_up.bmp", @Tempdir&"\btn_settings_up.bmp",1)
FileInstall("D:\Games\longjuyt2.de\patchskin\btn_newaccount_up.bmp", @Tempdir&"\btn_newaccount_up.bmp",1)
FileInstall("D:\Games\longjuyt2.de\patchskin\btn_idpwd_up.bmp", @Tempdir&"\btn_idpwd_up.bmp",1)
FileInstall("D:\Games\longjuyt2.de\patchskin\btn_quit_up.bmp", @Tempdir&"\btn_quit_up.bmp",1)
;
GUI######################################################
Opt("GUIOnEventMode"1)
$Form1 GUICreate("Metin2 Patcher by iMer"373541193125)
GUISetOnEvent($GUI_EVENT_CLOSE"_close")
$stat GUICtrlCreateEdit(""168337281)
GUICtrlSetData(-1"((`~Patcher by iMer~´))"&@CRLF&"Dateiüberprüfung wird gestartet...")
$cancel GUICtrlCreateButton("Cancel"28849675250)
GUICtrlSetOnEvent($cancel"_close")

$Progress1 GUICtrlCreateProgress(1646433417)
;
1631234013
$oIE 
_IECreateEmbedded()
$oIE_ctrl GUICtrlCreateObj($oIE16312336136)
GUISetState(@SW_SHOW)
_IENavigate($oIE$adurl
$Form2 GUICreate("*~Metin2 Patcher by iMer~*"595385328160)
GUISetOnEvent($GUI_EVENT_CLOSE"_close")
$Pic1 GUICtrlCreatePic(@Tempdir&"\metin2start.bmp"00593382$BS_BITMAP)
$start GUICtrlCreateButton("(Not allowed)"4644012741$BS_BITMAP)
GUICtrlSetImage(-1, @Tempdir&"\btn_startgame_up.bmp"1)
GUICtrlSetOnEvent($start"start")
$config GUICtrlCreateButton("(Not allowed)"4649612725$BS_BITMAP)
GUICtrlSetOnEvent($config"config")
GUICtrlSetImage(-1, @Tempdir&"\btn_settings_up.bmp"1)
$seite1 GUICtrlCreateButton("(Not allowed)"46418412725$BS_BITMAP)
GUICtrlSetImage(-1, @Tempdir&"\btn_newaccount_up.bmp"1)
GUICtrlSetOnEvent($seite1"seite")
$seite2 GUICtrlCreateButton("(Not allowed)"46416012925$BS_BITMAP)
GUICtrlSetImage(-1,  @Tempdir&"\btn_idpwd_up.bmp"1)
GUICtrlSetOnEvent($seite2"seite")
$ende GUICtrlCreateButton("(Not allowed)"46435212725$BS_BITMAP)
GUICtrlSetImage(-1,  @Tempdir&"\btn_quit_up.bmp"1)
GUICtrlSetOnEvent($ende"_close")
$oIE1 _IECreateEmbedded()
$oIE_ctrl1 GUICtrlCreateObj($oIE188456376)
_IENavigate($oIE1$fensterurl)

GUISetState(@SW_HIDE)
;
gui#####################################################
Func seite ()
    
_IECreate($buttonurl)
EndFunc

func start 
()
    
run($Scriptdir&"/metin2.bin")
    Exit
EndFunc

Func config 
()
    
Run($ScriptDir&"\config.exe")
EndFunc


func _close 
()
    Exit
EndFunc
Sleep 
(500)
patch ()


func patch ()
    
$file = @TempDir&"\files.txt"
    
InetGet$url&"\files.txt" $file)
    
$lines _FileCountLines($file)
    If 
$lines 0 Then
        MsgBox
(48,"Fehler","Fehler beim übertragen der Patchlist!")
        Exit
    EndIf
    
DirCreate("pack")
    
DirCreate("BGM")
    
DirCreate("lib")
    
DirCreate("mark")
    
DirCreate("miles")
    
DirCreate("screenshot")
    
DirCreate("upload")
    While (
$lines >= 1
        
$datei FileReadLine($file,$lines)
        
GUICtrlSetData($stat,"Überprüfung von: "$datei & @CRLF GUICtrlRead($stat))
        
$size_inet InetGetSize($url&"\"&$datei)
        If FileExists(
$ScriptDir&""&$datei) Then        
            If @error Then
                MsgBox(16 , "
Fehler", @error)
            EndIf
            
$size_ordner = FileGetSize( $ScriptDir&""&$datei)
            If 
$size_inet <> $size_ordner Then
                GUICtrlSetData(
$stat,"Download von"& $datei & @CRLF & GUICtrlRead($stat))
                InetGet(
$url&$datei , $ScriptDir& "" & $datei , 1 , 1)
                while 1
                    
$hFileSize = FileGetSize($ScriptDir & "" & $datei) ;Wie viel wurde schon geladen.
                    
$iPercent = round ( @InetGetBytesRead / $size_inet   *100) ;Rechen Operation ? O.O
                    GUICtrlSetData(
$Progress1$iPercent) ;Progressbar einstellen
                If 
$hFileSize = $size_inet Then 
                GUICtrlSetData(
$Progress1, 100)
                ExitLoop
            EndIf
            sleep (50)
        WEnd
        Else
            GUICtrlSetData(
$stat,"Überspringen der Datei"& $datei & @CRLF & GUICtrlRead($stat))
            EndIf
        Else
            InetGet(
$url&$datei,$ScriptDir&""&$datei,1,1)
            GUICtrlSetData(
$stat, "Download von"& $datei& @CRLF & GUICtrlRead($stat))
            while 1
                
$hFileSize = FileGetSize($ScriptDir & "" & $datei) ;Wie viel wurde schon geladen.

                
$iPercent = round ( @InetGetBytesRead / $size_inet   *100) ;Rechen Operation ? O.O

                GUICtrlSetData(
$Progress1$iPercent) ;Progressbar einstellen

            If 
$hFileSize = $size_inet Then 
                GUICtrlSetData(
$Progress1, 100)
                ExitLoop
            EndIf
            sleep (50)
        WEnd
        EndIf
        sleep (500)
        
$lines = $lines-1
    WEnd
    FileDelete(
$TempDir&"files.txt")
    GUISetState(@SW_HIDE,
$Form1)
    GUISetState(@SW_SHOW,
$Form2)
while 1
    Sleep(100)
WEnd
EndFunc 
Thread:
Marcoly is offline  
Thanks
1 User
Old 02/25/2012, 20:52   #3
 
elite*gold: 0
Join Date: Mar 2011
Posts: 33
Received Thanks: 1
I cand make this patcher she give error in Vb can help my?
AslTracker is offline  
Old 02/25/2012, 21:24   #4





 
Marcoly's Avatar
 
elite*gold: 440
The Black Market: 1196/3/0
Join Date: May 2011
Posts: 10,932
Received Thanks: 11,778
Quote:
Originally Posted by AslTracker View Post
I cand make this patcher she give error in Vb can help my?
That's a AutoIT-Code, not Virtual Basic.
Marcoly is offline  
Old 03/30/2012, 10:14   #5
 
elite*gold: 0
Join Date: Mar 2011
Posts: 33
Received Thanks: 1
Quote:
Originally Posted by Marco_A View Post
That's a AutoIT-Code, not Virtual Basic.
Cand give my any metin2patcher?thanks
AslTracker is offline  
Old 03/30/2012, 10:23   #6





 
Marcoly's Avatar
 
elite*gold: 440
The Black Market: 1196/3/0
Join Date: May 2011
Posts: 10,932
Received Thanks: 11,778
Quote:
Originally Posted by AslTracker View Post
Cand give my any metin2patcher?thanks
That's a very simpel autopatcher:

Marcoly is offline  
Reply


Similar Threads Similar Threads
Autopatcher
09/29/2011 - CO2 Private Server - 4 Replies
So I coded an autopatcher, not sure if it will work or what. Haven't tested it yet as I'm in college, but if someone would look my coder over and tell me what I could do better or if there is something wrong? Thanks :D int CurrentVersion = 1001; string loc = ""; public Form1() { InitializeComponent();
[AutoPatcher]
07/20/2010 - CO2 Private Server - 3 Replies
I was trying to make an autopatcher, but im kinda stucked with reading from host. I tried: (changed IPHERE to ip) Ini Configg = new Ini(System.Windows.Forms.Application.StartupPath + @"\IPHERE\autopatcher\Config.ini"); string ThePath = Configg.ReadValue("Config", "Patch"); didnt work, anybody got a solution how i can read it from the host? The autopatcher folder is in AppServ\www folder
[HELP]AutoPatcher
02/28/2010 - CO2 Private Server - 0 Replies
I get an error when I launch the program it throws this error: System.ArgumentException: Item has already been added. Key in dictionary: 'IniParser+SectionPair' Key being added: 'IniParser+SectionPair' at IniParser..ctor(String iniPath) at CoPinoyPatcher.frmPatcher.Completed(Object sender, AsyncCompletedEventArgs e) at System.Net.WebClient.OnDownloadFileCompleted(Async CompletedEventArgs e) at System.Net.WebClient.DownloadFileOperationComplete d(Object arg) But when I click Continue...
autopatcher help
01/18/2010 - EO PServer Hosting - 17 Replies
im trying to put an autopatcher on our server, im using the one Forcer and FunHacker released (right on its on my personal computer not the server)... i need to know how to put a directory on our site.
how to simply make an itemtype ?
08/16/2009 - CO2 Programming - 6 Replies
i got tired from downloadng itemtypes everytime newpatch is made . can anyone tell me simplyhow to make it . i will be greatful . (i know my english is not ex but i learn fast):p



All times are GMT +2. The time now is 12:05.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.