Page 1 of 1

l2j patcher

Posted: Sat Jun 06, 2009 4:59 pm
by BiggBoss
Its a little tool that will allow player to patch his hosts to play your server, full reinstall them if he alredy edited them, download a new one from a specific ftp directory (if your ip changes), launch the game, back up his old hosts and restore them. Is writted on Visual Basic, so you will need to download it. The image style is mine. I dont upload it cuz is a waste of time, create your own style is matter of minutes. I upload the script

Image

Code: Select all

Public Class Form1     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load     End Sub     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click        Finalize()    End Sub     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim tooltip As New ToolTip()        tooltip.SetToolTip(Button1, "Click Here to patch you host")        Dim Texto As String         Texto = "127.0.0.1  l2auth.lineage2.com" & vbNewLine & _             "127.0.0.1 l2testauth.lineage2.com" & vbNewLine & _             "216.107.250.194 nprotect.lineage2.com" & vbNewLine & _             "216.107.250.194 update.nProtect.com" & vbNewLine & _             "216.107.250.194 update.nProtect.net" & vbNewLine         My.Computer.FileSystem.WriteAllText("C:\WINDOWS\system32\drivers\etc\HOSTS", Texto, True)        MsgBox("Hosts Pathed")       End Sub     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim tooltip As New ToolTip()        tooltip.SetToolTip(Button2, "Click here to run the Lineage II Game")        Shell("system\L2.exe", 1)        Finalize()     End Sub     Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click        Dim tooltip As New ToolTip()        tooltip.SetToolTip(Button5, "Click here if your hosts are alredy edited and you want to repatch them")        My.Computer.FileSystem.DeleteFile("C:\WINDOWS\system32\drivers\etc\HOSTS", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)        My.Computer.FileSystem.WriteAllText("C:\WINDOWS\system32\drivers\etc\HOSTS", String.Empty, False)         Dim Texto As String         Texto = "127.0.0.1   localhost" & vbNewLine & _       "127.0.0.1   l2auth.lineage2.com" & vbNewLine & _             "127.0.0.1 l2testauth.lineage2.com" & vbNewLine & _             "216.107.250.194 nprotect.lineage2.com" & vbNewLine & _             "216.107.250.194 update.nProtect.com" & vbNewLine & _             "216.107.250.194 update.nProtect.net" & vbNewLine         My.Computer.FileSystem.WriteAllText("C:\WINDOWS\system32\drivers\etc\HOSTS", Texto, True)        MsgBox("Hosts Resets. You are now able to play L2 Dodge")    End Sub     Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click        My.Computer.FileSystem.RenameFile("C:\WINDOWS\system32\drivers\etc\HOSTS", "HOSTS_BACK_UP")        MsgBox("A security copy of your current hosts has been done")    End Sub     Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click        My.Computer.FileSystem.DeleteFile("C:\WINDOWS\system32\drivers\etc\HOSTS", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)        My.Computer.FileSystem.RenameFile("C:\WINDOWS\system32\drivers\etc\HOSTS_BACK_UP", "HOSTS")        MsgBox("Your old hosts has been restored")    End Sub     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click        My.Computer.Network.DownloadFile _    ("http://yourip/dns.here/pathto/HOSTS", _    "C:\WINDOWS\system32\drivers\etc\")        MsgBox("Your Hosts has been updated")     End SubEnd Class 
Credits: BiggBoss

Re: l2j patcher

Posted: Sat Jun 06, 2009 8:10 pm
by NyXrB
Thank you very much B1ggBoss, I'm gonna download Visual and try it ^^

Re: l2j patcher

Posted: Wed Jun 24, 2009 5:50 pm
by Vader
B1ggBoss wrote:It's written on Visual Basic, so you will need to download it.

Where can I get this program so I can use this great hosts tool?

Re: l2j patcher

Posted: Sat Jun 27, 2009 8:24 am
by BiggBoss

Re: l2j patcher

Posted: Mon Jun 29, 2009 6:36 pm
by Vader
Thank you, Boss!

Re: l2j patcher

Posted: Wed Jul 01, 2009 4:30 pm
by Vader
Boss, what format was this saved. Visual offers 4 different projects you can do. I dont know which one to use. I know nothing about VB but I'm trying to learn it. I've been going through their help section. LOL, they say its real easy. Im not sure about that statement yet.

Re: l2j patcher

Posted: Wed Jul 01, 2009 4:35 pm
by BiggBoss
look, its a windows form application

Image

Re: l2j patcher

Posted: Wed Jul 01, 2009 4:47 pm
by Vader
Ahhhhhh, Thanks Boss. Appreciate you getting back to me.

Re: l2j patcher

Posted: Thu Jul 23, 2009 4:25 am
by icemanrj
Boss, i've a little problem here, say: name button is not declared. how can i declared button variable?

Re: l2j patcher

Posted: Thu Jul 23, 2009 11:17 am
by BiggBoss
icemanrj wrote:Boss, i've a little problem here, say: name button is not declared. how can i declared button variable?
if you copied and paste my code, probably the buttons will not be the same. First make each of your Form1 buttons be the same as my Form1.vb buttons (if you dont want to addapt each code to each button).
Then, double click over each button to declare it in the script

Re: l2j patcher

Posted: Sat Aug 15, 2009 1:43 pm
by devo
Can you add some tutorial here :P? I never used Microsoft Visual Basic and I have no idea how to make it working ;d

Re: l2j patcher

Posted: Sat Aug 15, 2009 8:32 pm
by BiggBoss