l2j patcher

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

l2j patcher

Post 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
Image
NyXrB
Posts: 26
Joined: Mon May 18, 2009 6:19 pm

Re: l2j patcher

Post by NyXrB »

Thank you very much B1ggBoss, I'm gonna download Visual and try it ^^
Vader
Posts: 15
Joined: Tue Jun 23, 2009 4:27 am

Re: l2j patcher

Post 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?
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: l2j patcher

Post by BiggBoss »

Image
Vader
Posts: 15
Joined: Tue Jun 23, 2009 4:27 am

Re: l2j patcher

Post by Vader »

Thank you, Boss!
Vader
Posts: 15
Joined: Tue Jun 23, 2009 4:27 am

Re: l2j patcher

Post 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.
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: l2j patcher

Post by BiggBoss »

look, its a windows form application

Image
Image
Vader
Posts: 15
Joined: Tue Jun 23, 2009 4:27 am

Re: l2j patcher

Post by Vader »

Ahhhhhh, Thanks Boss. Appreciate you getting back to me.
icemanrj
Posts: 58
Joined: Wed Dec 26, 2007 1:49 am

Re: l2j patcher

Post by icemanrj »

Boss, i've a little problem here, say: name button is not declared. how can i declared button variable?
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: l2j patcher

Post 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
Image
User avatar
devo
Posts: 798
Joined: Mon Jun 15, 2009 1:19 pm

Re: l2j patcher

Post 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
A hero of war is that what they see...
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: l2j patcher

Post by BiggBoss »

Image
Post Reply