Skocz do zawartości

Dołącz do społeczności!

👋 Witaj na MPCForum!

Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

  • ✅ Pełny dostęp do działów i ukrytych treści
  • ✅ Możliwość pisania i odpowiadania w tematach
  • ✅ System prywatnych wiadomości
  • ✅ Zbieranie reputacji i rozwijanie swojego profilu
  • ✅ Członkostwo w jednej z największych społeczności graczy

👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

Zarejestruj się teraz

[PROBLEM]Autopatcher ... Błąd Nie Ściąga Plików Do Końca

Rekomendowane odpowiedzi

Opublikowano

Public Class AutoPatcher

   '--------------------------------------------------
   '-------AquaMT2 AutoPatcher------
   '--------------------------------------------------

   '--------------------------------------------------
   '-------------------KONFIGURACJA-------------------
   '--------------------------------------------------

   '--------------------------------------------------
   '------------------Tytuły okienek------------------
   '--------------------------------------------------
   Public Const app_title = "AquaMT2"
   Public Const title_norm = ""
   Public Const title_error = "Błąd"

   '--------------------------------------------------
   '-------------------Nazwy plików-------------------
   '--------------------------------------------------
   Public Const file_client = "AquaMT2.exe"
   Public Const file_config = "config.exe"
   Public Const file_last_update = "last_update.txt"
   Public Const file_update = "update.txt"

   '--------------------------------------------------
   '--------------------Adresy URL--------------------
   '--------------------------------------------------
   Public Const url_patch = "http://94.23.230.210/patch/"
   Public Const url_update = "http://94.23.230.210/patch/update.txt"
   Public Const url_website = "http://www.aquamt2.co.cc"

   '--------------------------------------------------
   '---------------------Przyciski--------------------
   '--------------------------------------------------
   Public Const button_config = ""
   Public Const button_quit = ""
   Public Const button_start = ""
   Public Const button_website = ""

   '--------------------------------------------------
   '---------------------Komunikaty-------------------
   '--------------------------------------------------
   Public Const msg_completed = "Aktualizacja zakończona."
   Public Const msg_confirm = "Na pewno?"
   Public Const msg_failed = "Aktualizacja nie powiodła się."
   Public Const msg_file_not_found = "Nie znaleziono pliku"
   Public Const msg_no_connection = "Brak połączenia z Internetem."
   Public Const msg_nothing_new = "Klient nie wymaga aktualizacji."
   Public Const msg_question = "Pobrać najnowszego patcha?"

   '--------------------------------------------------
   '------------------Opcje pobierania----------------
   '--------------------------------------------------
   Public Const connection_timeout = 300000
   Public Const bIndex = True
   Public Const bBGM = True
   Public Const bEffect = True
   Public Const bETC = True
   Public Const bGuild = True
   Public Const bIcon = True
   Public Const bItem = True
   Public Const bLocale = True
   Public Const bMonster = True
   Public Const bNPC = True
   Public Const bPC = True
   Public Const bProperty = True
   Public Const bPsyco = True
   Public Const bRoot = True
   Public Const bSeason = True
   Public Const bSound = True
   Public Const bTerrain = True
   Public Const bTextureSet = True
   Public Const bTree = True
   Public Const bUILoading = True
   Public Const bUIScript = True
   Public Const bZone = True


   '--------------------------------------------------
   '----------------------ZMIENNE---------------------
   '--------------------------------------------------
   Public msgboxres As Integer
   Public lustring, ustring As String


   '--------------------------------------------------
   '----------------------FUNKCJE---------------------
   '--------------------------------------------------
   Public Function MissingFile(ByVal filename As String) As String
       filename = msg_file_not_found & CStr(Chr(32)) & filename
       Return (filename)
   End Function

   Public Function PackDest(ByVal packname As String, ByVal epk As Boolean) As String
       packname = "pack/" & packname
       If epk = True Then packname = packname & ".epk" Else packname = packname & ".eix"
       Return (packname)
   End Function

   Public Function PackURL(ByVal packname As String, ByVal epk As Boolean) As String
       packname = url_patch & packname
       If epk = True Then packname = packname & ".epk" Else packname = packname & ".eix"
       Return (packname)
   End Function


   '--------------------------------------------------
   '------------------RESZTA PROGRAMU-----------------
   '--------------------------------------------------
   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       If My.Computer.FileSystem.FileExists(file_client) = False Then
           msgboxres = MsgBox(MissingFile(file_client), MsgBoxStyle.Exclamation, title_error)
       ElseIf Shell(file_client, AppWinStyle.NormalFocus) = 0 Then
           msgboxres = MsgBox(MissingFile(file_client), MsgBoxStyle.Exclamation, title_error)
       End If
   End Sub

   Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
       If My.Computer.FileSystem.FileExists(file_config) = False Then
           msgboxres = MsgBox(MissingFile(file_config), MsgBoxStyle.Exclamation, title_error)
       ElseIf Shell(file_config, AppWinStyle.NormalFocus) = 0 Then
           msgboxres = MsgBox(MissingFile(file_config), MsgBoxStyle.Exclamation, title_error)
       End If
   End Sub

   Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
       If My.Computer.Network.IsAvailable() = False Then msgboxres = MsgBox(msg_no_connection, MsgBoxStyle.Exclamation, title_error) Else Process.Start(url_website)
   End Sub

   Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
       If MsgBox(msg_confirm, 36, title_norm) = 6 Then Me.Close()
   End Sub

   Private Sub Launcher_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       If My.Computer.Network.IsAvailable() = False Then
           msgboxres = MsgBox(msg_no_connection, MsgBoxStyle.Exclamation, title_error)
           Me.Close()
       Else
           Me.Text = app_title
           Button1.Text = button_start
           Button2.Text = button_config
           Button3.Text = button_website
           Button4.Text = button_quit
           WebBrowser.Refresh()
           If My.Computer.FileSystem.FileExists(file_last_update) = False Then
               msgboxres = MsgBox(MissingFile(file_last_update), MsgBoxStyle.Exclamation, title_error)
           Else
               My.Computer.Network.DownloadFile(url_update, file_update, "", "", False, connection_timeout, True)
               FileOpen(1, file_update, OpenMode.Input, OpenAccess.Read, OpenShare.LockReadWrite, 8)
               Input(1, ustring)
               FileClose(1)
               FileOpen(2, file_last_update, OpenMode.Input, OpenAccess.Read, OpenShare.LockReadWrite, 8)
               Input(2, lustring)
               FileClose(2)
               If ustring = lustring Then
                   msgboxres = MsgBox(msg_nothing_new, MsgBoxStyle.Information, title_norm)
               ElseIf MsgBox(msg_question, 36, title_norm) = 6 Then
                   If bIndex = True Then My.Computer.Network.DownloadFile((url_patch & "Index"), ("pack/Index"), "", "", False, connection_timeout, True)
                   If bBGM = True Then
                       My.Computer.Network.DownloadFile(PackURL("BGM", True), PackDest("BGM", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("BGM", False), PackDest("BGM", False), "", "", False, connection_timeout, True)
                   End If
                   If bEffect = True Then
                       My.Computer.Network.DownloadFile(PackURL("Effect", True), PackDest("Effect", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Effect", False), PackDest("Effect", False), "", "", False, connection_timeout, True)
                   End If
                   If bETC = True Then
                       My.Computer.Network.DownloadFile(PackURL("ETC", True), PackDest("ETC", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("ETC", False), PackDest("ETC", False), "", "", False, connection_timeout, True)
                   End If
                   If bGuild = True Then
                       My.Computer.Network.DownloadFile(PackURL("guild", True), PackDest("guild", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("guild", False), PackDest("guild", False), "", "", False, connection_timeout, True)
                   End If
                   If bIcon = True Then
                       My.Computer.Network.DownloadFile(PackURL("icon", True), PackDest("icon", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("icon", False), PackDest("icon", False), "", "", False, connection_timeout, True)
                   End If
                   If bItem = True Then
                       My.Computer.Network.DownloadFile(PackURL("item", True), PackDest("item", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("item", False), PackDest("item", False), "", "", False, connection_timeout, True)
                   End If
                   If bLocale = True Then
                       My.Computer.Network.DownloadFile(PackURL("locale_pl", True), PackDest("locale_pl", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("locale_pl", False), PackDest("locale_pl", False), "", "", False, connection_timeout, True)
                   End If
                   If bMonster = True Then
                       My.Computer.Network.DownloadFile(PackURL("Monster", True), PackDest("Monster", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Monster", False), PackDest("Monster", False), "", "", False, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("monster2", True), PackDest("monster2", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("monster2", False), PackDest("monster2", False), "", "", False, connection_timeout, True)
                   End If
                   If bNPC = True Then
                       My.Computer.Network.DownloadFile(PackURL("NPC", True), PackDest("NPC", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("NPC", False), PackDest("NPC", False), "", "", False, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("npc2", True), PackDest("npc2", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("npc2", False), PackDest("npc2", False), "", "", False, connection_timeout, True)
                   End If
                   If bPC = True Then
                       My.Computer.Network.DownloadFile(PackURL("PC", True), PackDest("PC", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("PC", False), PackDest("PC", False), "", "", False, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("pc2", True), PackDest("pc2", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("pc2", False), PackDest("pc2", False), "", "", False, connection_timeout, True)
                   End If
                   If bProperty = True Then
                       My.Computer.Network.DownloadFile(PackURL("Property", True), PackDest("Property", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Property", False), PackDest("Property", False), "", "", False, connection_timeout, True)
                   End If
                   If bPsyco = True Then
                       My.Computer.Network.DownloadFile(PackURL("Psyco", True), PackDest("Psyco", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Psyco", False), PackDest("Psyco", False), "", "", False, connection_timeout, True)
                   End If
                   If bRoot = True Then
                       My.Computer.Network.DownloadFile(PackURL("root", True), PackDest("root", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("root", False), PackDest("root", False), "", "", False, connection_timeout, True)
                   End If
                   If bSeason = True Then
                       My.Computer.Network.DownloadFile(PackURL("season", True), PackDest("season", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("season", False), PackDest("season", False), "", "", False, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("season2", True), PackDest("season2", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("season2", False), PackDest("season2", False), "", "", False, connection_timeout, True)
                   End If
                   If bSound = True Then
                       My.Computer.Network.DownloadFile(PackURL("Sound", True), PackDest("Sound", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Sound", False), PackDest("Sound", False), "", "", False, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("sound2", True), PackDest("sound2", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("sound2", False), PackDest("sound2", False), "", "", False, connection_timeout, True)
                   End If
                   If bTerrain = True Then
                       My.Computer.Network.DownloadFile(PackURL("Terrain", True), PackDest("Terrain", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Terrain", False), PackDest("Terrain", False), "", "", False, connection_timeout, True)
                   End If
                   If bTextureSet = True Then
                       My.Computer.Network.DownloadFile(PackURL("textureset", True), PackDest("textureset", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("textureset", False), PackDest("textureset", False), "", "", False, connection_timeout, True)
                   End If
                   If bTree = True Then
                       My.Computer.Network.DownloadFile(PackURL("Tree", True), PackDest("Tree", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Tree", False), PackDest("Tree", False), "", "", False, connection_timeout, True)
                   End If
                   If bUILoading = True Then
                       My.Computer.Network.DownloadFile(PackURL("uiloading", True), PackDest("uiloading", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("uiloading", False), PackDest("uiloading", False), "", "", False, connection_timeout, True)
                   End If
                   If bUIScript = True Then
                       My.Computer.Network.DownloadFile(PackURL("uiscript", True), PackDest("uiscript", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("uiscript", False), PackDest("uiscript", False), "", "", False, connection_timeout, True)
                   End If
                   If bZone = True Then
                       My.Computer.Network.DownloadFile(PackURL("Zone", True), PackDest("Zone", True), "", "", True, connection_timeout, True)
                       My.Computer.Network.DownloadFile(PackURL("Zone", False), PackDest("Zone", False), "", "", False, connection_timeout, True)
                   End If
                   FileOpen(3, file_last_update, OpenMode.Output, OpenAccess.Write, OpenShare.LockReadWrite, 8)
                   Print(3, ustring)
                   FileClose(3)
                   My.Computer.FileSystem.DeleteFile(file_update)
                   msgboxres = MsgBox(msg_completed, MsgBoxStyle.Information, title_norm)
               End If
           End If
       End If
   End Sub
End Class

 

oto Kod i jak Klikam Pobierz Ściągnie mi Pliki do 3sekund Prosze o Pomoc

393.jpg

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Konto

Nawigacja

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.