Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 14:52

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

Advertisement



Hanashi Patcher V2 Problem VB .Net

Discussion on Hanashi Patcher V2 Problem VB .Net within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
Du.ke's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 271
Received Thanks: 61
Hanashi Patcher V2 Problem VB .Net

Hallo Liebe Com,

Ich habe folgendes Problem.

Da bei dem Patcher Source von Hanashi´s Patcher V2 ein Patchlister für den WebSpace dabei ist und er mir immer eine Leere List datei auswirft wollte ich mittels VB.Net einen Lister erstellen.

Das Problem dabei ist das der Lister von mir nicht genauso listet wie der von Hanashi bitte Helft mir Thanks.

Code zum erstellen der xml Liste:


Code:
 Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
        If BackgroundWorker1.CancellationPending = True Then
            BackgroundWorker1.CancelAsync()
        End If
        Dim Files As List(Of String) = GetFiles(My.Computer.FileSystem.CurrentDirectory & "\", True)

        Dim XmlDoc As New XmlDocument

        'Write down the XML declaration
        Dim XmlDeclaration As XmlDeclaration = XmlDoc.CreateXmlDeclaration("1.0", "UTF-8", Nothing)

        'Create the root element
        Dim RootNode As XmlElement = XmlDoc.CreateElement("PatchList")
        XmlDoc.InsertBefore(XmlDeclaration, XmlDoc.DocumentElement)
        XmlDoc.AppendChild(RootNode)

        'Create a new <Category> element and add it to the root node
        Dim ParentNode As XmlElement = XmlDoc.CreateElement("PatchFiles")

        'Set attribute name and value!


        XmlDoc.DocumentElement.PrependChild(ParentNode)

        'Create the required nodes


        For Each File In Files
            If File.Contains(Process.GetCurrentProcess.MainModule.FileName) Then

            Else

                Dim Checksum As String = MD5FileHash(File)
                Dim Dateiname As String = File.Replace(My.Computer.FileSystem.CurrentDirectory & "\", "")

                Label1.Text = "Aktuelle Datei: " & Dateiname
                Dim FirstElement As XmlElement = XmlDoc.CreateElement("Name")
                Dim SecondElement As XmlElement = XmlDoc.CreateElement("Hash")


                'retrieve the text
                Dim FirstTextElement As XmlText = XmlDoc.CreateTextNode(Dateiname)
                Dim SecondTextElement As XmlText = XmlDoc.CreateTextNode(Checksum)

                'append the nodes to the parentNode without the value
                ParentNode.AppendChild(FirstElement)
                ParentNode.AppendChild(SecondElement)


                'save the value of the fields into the nodes
                FirstElement.AppendChild(FirstTextElement)
                SecondElement.AppendChild(SecondTextElement)

            End If
        Next
        Label1.Text = "Erstellt!"
        'Save to the XML file
        XmlDoc.Save("demo.xml")

    End Sub

So sieht sie dann aus:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<PatchList>
  <PatchFiles>
    <Name>Mt2-Patchlistgenerator.pdb</Name>
    <Hash>C6722CC9358A4CE878DEEE212FFBC2DD</Hash>
    <Name>Mt2-Patchlistgenerator.vshost.exe</Name>
    <Hash>5A96850B84A268CA84018F1A9F6BB59</Hash>
    <Name>Mt2-Patchlistgenerator.vshost.exe.manifest</Name>
    <Hash>A19A2658BA69006AC9D11FD7D7E3C1</Hash>
    <Name>Mt2-Patchlistgenerator.xml</Name>
    <Hash>C1576D0781684F96BD2889DB09F876B</Hash>
    <Name>Patchlistgenerator by Kryter.exe</Name>
    <Hash>F34B16A592FA3D74F17EA62A48C09CF8</Hash>
    <Name>Patchlistgenerator by Kryter.pdb</Name>
    <Hash>7E5E0A11CCF1056D2FDC9B9EFF5E138</Hash>
    <Name>Patchlistgenerator by Kryter.xml</Name>
    <Hash>08E100ED60010140EDB81FABE7A9</Hash>
  </PatchFiles>
</PatchList>
Aussehen soll Sie aber so:

Code:
<?xml version="1.0" encoding="utf-8"?>
<PatchList>
  <PatchFiles>
    <PatchFile>
      <Name>local.eix</Name>
      <Hash>b83e83a8169acfe9b7a43191da2a7b3c</Hash>
    </PatchFile>
    <PatchFile>
      <Name>local.epk</Name>
      <Hash>b83e83a8169acfe9b7a43191da2a7b3c</Hash>
    </PatchFile>
    <PatchFile>
      <Name>pack\root.eix</Name>
      <Hash>1970e1498315995be5233bccc8042b4d</Hash>
    </PatchFile>
    <PatchFile>
      <Name>pack\root.epk</Name>
      <Hash>b83e83a8169acfe9b7a43191da2a7b3c</Hash>
    </PatchFile>
  </PatchFiles>
</PatchList>
Bitte Helft mir :/ Nutze den Source von Kryter und habe versucht ihn um zu scripten.
Du.ke is offline  
Old 11/06/2015, 11:35   #2
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358


Das ist dir nicht zufällig über den Weg gelaufen, als du diesen Thread erstellt hast, oder..?
Mi4uric3 is offline  
Old 11/06/2015, 11:56   #3
 
Du.ke's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 271
Received Thanks: 61
oh sry >.< einfach durchgeklickt..
Du.ke is offline  
Old 11/06/2015, 12:09   #4

 
Jinbei's Avatar
 
elite*gold: 101
Join Date: Mar 2013
Posts: 13,366
Received Thanks: 2,748
Arrow Metin2 PServer Guides & Strategies -> Metin2 PServer - …

#moved…
Jinbei is offline  
Old 11/06/2015, 14:56   #5
 
jubox123's Avatar
 
elite*gold: 56
Join Date: Sep 2011
Posts: 777
Received Thanks: 365
Guck dir doch einfach mal auf Google an wie XML in VB geht.
Und warum XML, geht auch einfacher und kleiner ohne XML. z.B so:
pack/test.eix|b83e83a8169acfe9b7a43191da2a7b3c
pack/test.epk|A19A2658BA69006AC9D11FD7D7E3C1
jubox123 is offline  
Reply


Similar Threads Similar Threads
Hanashi Patcher Problem
10/07/2014 - Metin2 Private Server - 0 Replies
Guten Tag liebe Com. Ich habe auf der seite von Hanashi einen patcher erstellt. Als patchserver url habe ich die richtige url eingetragen (im browser wird sie geöffnet). Aber beim starten des patchers kommt: Can't parse the patchlist. Is the host reachable? (Die generate php habe ich ausgeführt und die patchlist ist im ordner auf der webspace) Habe schon mehrmals mit htttp, https und ohne versucht aber nichts hat geholfen. Danke für die hilfe
Patcher v2 by hanashi
07/12/2014 - Metin2 Private Server - 1 Replies
da ich reichlich wenig c# / c++ kenntnisse hab richte ich mich mal an euch: hab mal den debug gestartet um den fehler auszulesen, hier der screen: http://abload.de/img/fehlerfsski.jpg hier nochmal die zeilen zum kopieren: WebClient DLPatcher = new WebClient(); DLPatcher.Proxy = null;



All times are GMT +1. The time now is 14:54.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.