Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Net
- Imports System.IO
- Public Class AddHacks
- ''' Define Public Variable
- Dim swfok As Boolean
- Dim exists As Boolean
- Dim Current As String = Date.Today
- Dim Today As String = Current.Replace("/", "-")
- Dim Length(13) As String
- Dim LinesAndFiles As String = Application.StartupPath & "\LinesAndFiles_" & Today & ".txt"
- Dim Info As StreamWriter
- Dim Quote As String = """"
- Dim Folder As String = Application.StartupPath & "\AddHacks"
- Dim arytext() As String
- Dim FILE_NAME As String
- Dim Hacks As Integer = 23
- ' Create a check for Success
- Dim Success(Hacks) As Boolean
- '' For the parts of each hack
- Dim TempSuccess(5) As Boolean
- Dim Version As String
- ' Load
- Private Sub Load_Event(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
- ' Form Loading Event
- ' Create a Clients folder for the completed client
- If My.Computer.FileSystem.DirectoryExists(Application.StartupPath & "\Clients") Then
- Else
- My.Computer.FileSystem.CreateDirectory(Application.StartupPath & "\Clients")
- End If
- Button1.Enabled = False
- Button15.Enabled = False
- swfok = False
- exists = False
- ' Initialize Success And MOD Arrays
- For i = 1 To Hacks
- Success(i) = False
- Next
- For i = 1 To 5
- Success(i) = False
- Next
- End Sub
- ' File Selector Dialog
- Private Sub File_Selector(sender As System.Object, e As System.EventArgs) Handles Button7.Click
- Dim fd As OpenFileDialog = New OpenFileDialog()
- Dim strFileName As String
- fd.Title = "Open File Dialog"
- fd.InitialDirectory = Application.StartupPath & "\Clients"
- fd.Filter = "Shockwave Flash Objects (*.swf)|*.*"
- fd.FilterIndex = 2
- fd.RestoreDirectory = True
- If fd.ShowDialog() = DialogResult.OK Then
- strFileName = fd.FileName
- If InStr(strFileName, ".swf") <> 0 Then
- TextBox2.Text = strFileName
- swfok = True
- Else
- MessageBox.Show("You have to pick a .swf silly...")
- End If
- End If
- End Sub
- ' Back Button
- Private Sub Back_Button(sender As System.Object, e As System.EventArgs) Handles Button8.Click
- ItemSelect.Show()
- Me.Close()
- End Sub
- ' Check to see if an swf is selected and RABCDasm exists
- Private Sub RABCDASM_Exists(sender As System.Object, e As System.EventArgs) Handles Button2.Click
- ' Check to See if RABCDasm Exists
- If My.Computer.FileSystem.DirectoryExists(Application.StartupPath & "\RABCDasm") Then
- exists = True
- RabLBL.Text = "Yes"
- RabLBL.ForeColor = Color.Black
- Else
- MsgBox("Make sure you have the entire RABCDasm folder in the same directory as the application. Click help if you dont understand!", MsgBoxStyle.Critical)
- RabLBL.ForeColor = Color.Red
- RabLBL.Text = "No"
- End If
- ' Check to see if the file is a .swf
- If swfok = False Then
- MessageBox.Show("You have to pick a .swf silly...")
- End If
- If exists = True And swfok = True Then
- Button15.Enabled = True
- End If
- End Sub
- ' Add Hacks Button
- Private Sub Add_Hacks(sender As System.Object, e As System.EventArgs) Handles Button15.Click
- ' Create a Temporary Folder to build the hacks in
- If TextBox2.Text = "" Then
- MessageBox.Show("You have to pick a .swf silly...")
- Else
- ' Create Folder and copy over RABCDasm
- If My.Computer.FileSystem.DirectoryExists(Folder) Then
- My.Computer.FileSystem.DeleteDirectory(Folder, FileIO.DeleteDirectoryOption.DeleteAllContents)
- End If
- Dim fullPath As String = Application.StartupPath
- My.Computer.FileSystem.CopyDirectory(fullPath & "\RABCDasm", Folder)
- My.Computer.FileSystem.CopyFile(TextBox2.Text, Folder & "\client.swf", True)
- ' Create a batchfile for decompile process
- Decompile()
- ' Get Version Number
- GetVersion()
- ' Create a new string with all of the Hack lines and files2mod
- File.Create(LinesAndFiles).Dispose()
- ' Add Hacks
- Prod()
- ForceLQ()
- QuestDelay()
- FPS()
- LavaWalls()
- Numeric()
- Autonexus()
- Confuse()
- Drunk()
- Blind()
- Hallucinating()
- Unstable()
- Darkness()
- SWTile()
- NecroPart()
- HPBars()
- SWSlow()
- SwSpeed()
- OdomSW()
- RemLoad()
- SpamNot()
- AllyProj()
- TrimJitter()
- ' Recompile SWF
- Recompile()
- ' Clean up Directory
- My.Computer.FileSystem.CopyFile(Folder & "\client.swf", fullPath & "\Clients\" & Version & "_AIOtool.swf", True)
- My.Computer.FileSystem.DeleteDirectory(Folder, FileIO.DeleteDirectoryOption.DeleteAllContents)
- ' Display Messages
- MessageBox.Show("Client is named: " & Version & "_AIOtool.swf" & Environment.NewLine & "It contains all the hacks you selected")
- Button1.Enabled = True
- For i = 1 To Hacks
- If Success(i) = False And ListBox1.GetSelected(i - 1) = True Then
- MessageBox.Show("Hack: " & ListBox1.Items(i - 1).ToString & "-> needs to be done manually")
- End If
- Next
- End If
- End Sub
- ' Decompile
- Private Sub Decompile()
- Dim FILE_NAME As String = Folder & "\decompile.bat"
- Dim aryText(4) As String
- aryText(0) = "cd " & Folder
- aryText(1) = "swfdecompress client.swf"
- aryText(2) = "abcexport client.swf"
- aryText(3) = "rabcdasm client-1.abc"
- Create_Batch(aryText, FILE_NAME)
- End Sub
- ' Get File Version
- Private Sub GetVersion()
- Dim VersionLine As String = ""
- Dim VersionFile As String = Folder & "\client-1\com\company\assembleegameclient\parameters\Parameters.class.asasm"
- Dim VersionCheck As Boolean = False
- Using sr As StreamReader = New StreamReader(VersionFile)
- VersionLine = sr.ReadLine
- Do While (Not VersionLine Is Nothing)
- If VersionLine.Contains("/init") Then
- VersionCheck = True
- End If
- If VersionLine.Contains("pushstring") And VersionCheck = True Then
- Version = VersionLine
- Exit Do
- End If
- VersionLine = sr.ReadLine
- Loop
- End Using
- Version = Version.Split("""")(1)
- End Sub
- ' Connect to Production
- Private Sub Prod()
- If ListBox1.GetSelected(0) = True Then
- Try
- FILE_NAME = Folder & "\production.bat"
- Array.Resize(arytext, 4)
- arytext(0) = "cd " & Folder
- arytext(1) = "findstr /s /m " & Quote & "Desktop" & Quote & " *class.asasm >results1.txt"
- arytext(2) = "findstr /m /f:results1.txt " & Quote & "Production" & Quote & " *class.asasm >results2.txt"
- arytext(3) = "findstr /m /f:results2.txt " & Quote & "Capabilities" & Quote & " *class.asasm >results3.txt"
- Create_Batch(arytext, FILE_NAME)
- Dim MyFile As String = File.ReadAllText(Folder & "\results3.txt")
- MyFile = MyFile.Replace(Environment.NewLine, "")
- Dim NewFile As String = Folder & "\Production.class.asasm"
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim RetVal As Integer = 0
- 'Read for the last instance of returnvalue before Capabilities
- Using sr As StreamReader = New StreamReader(Folder & "\" & MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Capabilities") Then
- Exit Do
- End If
- If CurrentLine.Contains("returnvalue") Then
- RetVal = Count
- TempSuccess(2) = True
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- ' Write The Hack lines in
- Using sr As StreamReader = New StreamReader(Folder & "/" & MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = RetVal Then
- sw.WriteLine(" pop")
- sw.WriteLine(" pushtrue")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Copy the temporary class file back into the clients-1 folder
- If MyFile <> "" Then
- TempSuccess(1) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(1) = True
- My.Computer.FileSystem.CopyFile(NewFile, Folder & "/" & MyFile, True)
- End If
- ' Write the updated code information
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Connect to Production:")
- Info.WriteLine("Line: " & RetVal - 1)
- MyFile = MyFile.Replace("client-1\", "")
- Info.WriteLine(MyFile)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Force Low Quality
- Private Sub ForceLQ()
- If ListBox1.GetSelected(1) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\WebMain.class.asasm"
- Dim NewFile As String = Folder & "\LowQ.class.asasm"
- Dim forcelq As String = File.ReadAllText(Folder & "\forcelq.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim Setup As Integer = 0
- Dim RetVoid As Integer = 0
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("/setup") Then
- Setup = Count
- End If
- If CurrentLine.Contains("returnvoid") Then
- If Setup <> 0 Then
- RetVoid = Count
- Exit Do
- End If
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = RetVoid - 1 Then
- sw.WriteLine(forcelq)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If MyFile <> "" Then
- TempSuccess(1) = True
- End If
- If RetVoid <> 1 Then
- TempSuccess(2) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(2) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Force Low Quality:")
- Info.WriteLine("Line: " & RetVoid - 1)
- Info.WriteLine("WebMain.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' No Quest Delay
- Private Sub QuestDelay()
- If ListBox1.GetSelected(2) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\map\Quest.class.asasm"
- Dim NewFile As String = Folder & "\QNote.class.asasm"
- Dim LineNum As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim GetObj As Integer = 0
- Dim Line As Integer = 0
- Dim PushScope As Integer = 0
- Dim Method As String = ""
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("/getObject") Then
- GetObj = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains(":") And CurrentLine.IndexOf("L") = 0 Then
- If Count > GetObj Then
- LineNum = CurrentLine
- TempSuccess(1) = True
- End If
- End If
- If Count > GetObj Then
- If CurrentLine.Contains("end") Then
- Exit Do
- End If
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- LineNum = LineNum.Replace(":", "")
- LineNum = " jump " & LineNum
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count > GetObj Then
- If CurrentLine.Contains("pushscope") Then
- PushScope = Count
- Exit Do
- End If
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = PushScope + 1 Then
- sw.WriteLine(LineNum)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check for Success
- If PushScope <> 1 Then
- TempSuccess(2) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(3) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("No Quest Delay:")
- Info.WriteLine("Line: " & PushScope)
- Info.WriteLine("com\company\assembleegameclient\map\Quest.class.asasm")
- Info.WriteLine("")
- Info.WriteLine("Updated Code:")
- Info.WriteLine(LineNum)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' FPS Cap to 60
- Private Sub FPS()
- If ListBox1.GetSelected(3) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\WebMain.class.asasm"
- Dim NewFile As String = Folder & "\60fps.class.asasm"
- Dim forcelq As String = File.ReadAllText(Folder & "\60fps.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim Setup As Integer = 0
- Dim RetVoid As Integer = 0
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("/setup") Then
- Setup = Count
- End If
- If CurrentLine.Contains("returnvoid") Then
- If Setup <> 0 Then
- RetVoid = Count
- Exit Do
- End If
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = RetVoid - 1 Then
- sw.WriteLine(forcelq)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check for Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If MyFile <> "" Then
- TempSuccess(1) = True
- End If
- If RetVoid <> 1 Then
- TempSuccess(2) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(4) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Change FPS Cap to 60fps:")
- If ListBox1.GetSelected(2) = True Then
- RetVoid = RetVoid - 4
- End If
- Info.WriteLine("Line: " & RetVoid - 1)
- Info.WriteLine("WebMain.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Jnoobs LavaWalls V2
- Private Sub LavaWalls()
- If ListBox1.GetSelected(4) = True Then
- Try
- Dim FILE_NAME As String = Folder & "\LavaWalls.bat"
- Array.Resize(arytext, 3)
- arytext(0) = "cd " & Folder
- arytext(1) = "findstr /s /m " & Quote & "useAltWeapon" & Quote & " *class.asasm >results10.txt"
- arytext(2) = "findstr /m /f:results10.txt onMouseDown *class.asasm >results11.txt"
- Create_Batch(arytext, FILE_NAME)
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\Player.class.asasm"
- Dim NewFile As String = Folder & "\LavaWalls.class.asasm"
- Dim LavaWalls As String = File.ReadAllText(Folder & "\lavawalls.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim GetSquare As Integer = 0
- Dim Check As Boolean = False
- Dim OnMouseDown As String = File.ReadAllText(Folder & "\results11.txt")
- OnMouseDown = OnMouseDown.Replace(Environment.NewLine, "")
- Dim MouseClass As String = OnMouseDown
- Dim Clicked As String = ""
- OnMouseDown = OnMouseDown.Split("\")(5).Replace(".class.asasm", "")
- Using sr As StreamReader = New StreamReader(Folder & "\" & MouseClass)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("/onMouseDown") Then
- Check = True
- End If
- If Check = True And CurrentLine.Contains("initproperty") Then
- Clicked = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Clicked.Split(","c)(2).TrimStart(" """.ToCharArray)
- Clicked = Temp.Substring(0, Temp.IndexOf(""""c))
- LavaWalls = LavaWalls.Replace("Change1", OnMouseDown)
- LavaWalls = LavaWalls.Replace("Change2", Clicked)
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("getSquare") Then
- GetSquare = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = GetSquare + 3 Then
- sw.WriteLine(LavaWalls)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If MyFile <> "" Then
- TempSuccess(1) = True
- End If
- If GetSquare <> 1 Then
- TempSuccess(2) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(5) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("LavaWalls Hack V2:")
- Info.WriteLine("Line: " & GetSquare + 3)
- Info.WriteLine("com\company\assembleegameclient\objects\Player.class.asasm")
- Info.WriteLine("")
- Info.WriteLine("Code Added:")
- Info.WriteLine("#set mouseClass com.company.assembleegameclient.game:" & OnMouseDown)
- Info.WriteLine("#set mouseClicked " & Clicked)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Numerical HP/MP/Fame
- Private Sub Numeric()
- If ListBox1.GetSelected(5) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\ui\StatusBar.class.asasm"
- Dim NewFile As String = Folder & "\Numeric.class.asasm"
- Dim Numeric As String = File.ReadAllText(Folder & "\numericHpMp.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim Line As Integer = 0
- Dim Fal As Integer = 0
- Dim Method As String = ""
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("False()") Then
- Method = CurrentLine
- Fal = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Method.Split(","c)(2).TrimStart(" """.ToCharArray)
- Method = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains(Method) Then
- If Count > Fal Then
- Line = Count
- Exit Do
- End If
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Line + 1 Then
- sw.WriteLine(Numeric)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check for Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If MyFile <> "" Then
- TempSuccess(1) = True
- End If
- If Line <> 1 Then
- TempSuccess(2) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(6) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Numerical HP/MP/Fame:")
- Info.WriteLine("Line: " & Line)
- Info.WriteLine("com\company\assembleegameclient\ui\StatusBar.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' AutoNexus
- Private Sub Autonexus()
- If ListBox1.GetSelected(6) = True Then
- Try
- Dim GameObj As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\Player.class.asasm"
- Dim NewFile As String = Folder & "\AutoNexus.class.asasm"
- Dim Nexus As String = File.ReadAllText(Folder & "\autoNexus.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim CharHP As Integer = 0
- Dim MethodHP As String = ""
- Dim CharMaxHP As Integer = 0
- Dim MethodMaxHP As String = ""
- Dim LastDam As Integer = 0
- Dim RetVal As Integer = 0
- ' Find Method for Current Player HP
- Using sr As StreamReader = New StreamReader(GameObj)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Integer(200)") Then
- MethodHP = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- ' Find Player Max HP
- Using sr As StreamReader = New StreamReader(GameObj)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Integer(200)") Then
- MethodMaxHP = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- ' Trim All but Method Name
- Dim Temp As String = MethodHP.Split(","c)(2).TrimStart(" """.ToCharArray)
- MethodHP = Temp.Substring(0, Temp.IndexOf(""""c))
- Temp = MethodMaxHP.Split(","c)(2).TrimStart(" """.ToCharArray)
- MethodMaxHP = Temp.Substring(0, Temp.IndexOf(""""c))
- ' Replace Methods into code
- Nexus = Nexus.Replace("CHANGE1", MethodHP)
- Nexus = Nexus.Replace("CHANGE2", MethodMaxHP)
- ' Check to see if replacements were made
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If Nexus.Contains("CHANGE") Then
- Else
- TempSuccess(1) = True
- End If
- Count = 1
- ' Find Line number
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("lastDamage_") Then
- LastDam = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- ' Find Line number
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("returnvalue") Then
- If Count >= LastDam Then
- RetVal = Count
- Exit Do
- End If
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = RetVal Then
- sw.WriteLine(Nexus)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- If MyFile <> "" Then
- TempSuccess(2) = True
- End If
- If RetVal <> 1 Then
- TempSuccess(3) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True And TempSuccess(3) = True Then
- Success(7) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("AutoNexus:")
- If ListBox1.GetSelected(4) = True Then
- RetVal = RetVal - 42
- End If
- Info.WriteLine("Line: " & RetVal - 1)
- Info.WriteLine("com\company\assembleegameclient\objects\Player.class.asasm")
- Info.WriteLine("")
- Info.WriteLine("Updated Code:")
- Info.WriteLine("charHp: " & MethodHP)
- Info.WriteLine("charMaxHp: " & MethodMaxHP)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Confuse
- Private Sub Confuse()
- If ListBox1.GetSelected(7) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim CondEff As String = Folder & "\client-1\com\company\assembleegameclient\util\ConditionEffect.class.asasm"
- Dim NewFile As String = Folder & "\Confuse.class.asasm"
- Dim Confuse As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim ConfLine As Integer = 0
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Confused") Then
- ConfLine = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count = ConfLine + 1 Then
- Confuse = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Confuse.Split(","c)(2).TrimStart(" """.ToCharArray)
- Confuse = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("code") Then
- Code = Count
- End If
- If CurrentLine.Contains(Confuse) Then
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine("pushfalse")
- sw.WriteLine("returnvalue")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If Confuse.Contains("_-") Then
- Success(8) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Confuse:")
- Info.WriteLine("Line: " & Code)
- Info.WriteLine("com\company\assembleegameclient\objects\GameObject.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Drunk
- Private Sub Drunk()
- If ListBox1.GetSelected(8) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim CondEff As String = Folder & "\client-1\com\company\assembleegameclient\util\ConditionEffect.class.asasm"
- Dim NewFile As String = Folder & "\Drunk.class.asasm"
- Dim Effect As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim effLine As Integer = 0
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Drunk") Then
- effLine = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count = effLine + 1 Then
- Effect = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Effect.Split(","c)(2).TrimStart(" """.ToCharArray)
- Effect = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("code") Then
- Code = Count
- End If
- If CurrentLine.Contains(Effect) Then
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine("pushfalse")
- sw.WriteLine("returnvalue")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If Effect.Contains("_-") Then
- Success(9) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Drunk:")
- Info.WriteLine("Line: " & Code)
- Info.WriteLine("com\company\assembleegameclient\objects\GameObject.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Blind
- Private Sub Blind()
- If ListBox1.GetSelected(9) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim CondEff As String = Folder & "\client-1\com\company\assembleegameclient\util\ConditionEffect.class.asasm"
- Dim NewFile As String = Folder & "\Blind.class.asasm"
- Dim Effect As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim effLine As Integer = 0
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Blind") Then
- effLine = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count = effLine + 1 Then
- Effect = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Effect.Split(","c)(2).TrimStart(" """.ToCharArray)
- Effect = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("code") Then
- Code = Count
- End If
- If CurrentLine.Contains(Effect) Then
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine("pushfalse")
- sw.WriteLine("returnvalue")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If Effect.Contains("_-") Then
- Success(10) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Blind:")
- Info.WriteLine("Line: " & Code)
- Info.WriteLine("com\company\assembleegameclient\objects\GameObject.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Hallucinating
- Private Sub Hallucinating()
- If ListBox1.GetSelected(10) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim CondEff As String = Folder & "\client-1\com\company\assembleegameclient\util\ConditionEffect.class.asasm"
- Dim NewFile As String = Folder & "\Hallucinating.class.asasm"
- Dim Effect As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim effLine As Integer = 0
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Hallucinating") Then
- effLine = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count = effLine + 1 Then
- Effect = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Effect.Split(","c)(2).TrimStart(" """.ToCharArray)
- Effect = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("code") Then
- Code = Count
- End If
- If CurrentLine.Contains(Effect) Then
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine("pushfalse")
- sw.WriteLine("returnvalue")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If Effect.Contains("_-") Then
- Success(11) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Hallucinating:")
- If ListBox1.GetSelected(7) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(8) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(9) = True Then
- Code = Code - 2
- End If
- Info.WriteLine("Line: " & Code)
- Info.WriteLine("com\company\assembleegameclient\objects\GameObject.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Unstable
- Private Sub Unstable()
- If ListBox1.GetSelected(11) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim CondEff As String = Folder & "\client-1\com\company\assembleegameclient\util\ConditionEffect.class.asasm"
- Dim NewFile As String = Folder & "\Unstable.class.asasm"
- Dim Effect As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim effLine As Integer = 0
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Unstable") Then
- effLine = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count = effLine + 1 Then
- Effect = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Effect.Split(","c)(2).TrimStart(" """.ToCharArray)
- Effect = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("code") Then
- Code = Count
- End If
- If CurrentLine.Contains(Effect) Then
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine("pushfalse")
- sw.WriteLine("returnvalue")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If Effect.Contains("_-") Then
- Success(12) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Unstable:")
- If ListBox1.GetSelected(7) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(8) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(9) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(10) = True Then
- Code = Code - 2
- End If
- Info.WriteLine("Line: " & Code)
- Info.WriteLine("com\company\assembleegameclient\objects\GameObject.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Darkness
- Private Sub Darkness()
- If ListBox1.GetSelected(12) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim CondEff As String = Folder & "\client-1\com\company\assembleegameclient\util\ConditionEffect.class.asasm"
- Dim NewFile As String = Folder & "\Darkness.class.asasm"
- Dim Effect As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim effLine As Integer = 0
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Darkness") Then
- effLine = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count = effLine + 1 Then
- Effect = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Effect.Split(","c)(2).TrimStart(" """.ToCharArray)
- Effect = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("code") Then
- Code = Count
- End If
- If CurrentLine.Contains(Effect) Then
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine("pushfalse")
- sw.WriteLine("returnvalue")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If Effect.Contains("_-") Then
- Success(13) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Darkness:")
- If ListBox1.GetSelected(7) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(8) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(9) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(10) = True Then
- Code = Code - 2
- End If
- If ListBox1.GetSelected(11) = True Then
- Code = Code - 2
- End If
- Info.WriteLine("Line: " & Code)
- Info.WriteLine("com\company\assembleegameclient\objects\GameObject.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' SW Tile Hack
- Private Sub SWTile()
- If ListBox1.GetSelected(13) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\Player.class.asasm"
- Dim NewFile As String = Folder & "\SWTile.class.asasm"
- Dim Tile As String = File.ReadAllText(Folder & "\tileHack.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim push As Integer = 0
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("push_") Then
- ' Check Success
- Success(14) = True
- push = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = push + 1 Then
- sw.WriteLine(Tile)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- 'Check Success
- If Success(14) = True Then
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("SW Tile Hack:")
- If ListBox1.GetSelected(4) = True Then
- push = push - 42
- End If
- Info.WriteLine("Line: " & push)
- Info.WriteLine("com\company\assembleegameclient\objects\Player.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Necromancer Particles
- Private Sub NecroPart()
- If ListBox1.GetSelected(14) = True Then
- Try
- FILE_NAME = Folder & "\NoLagro.bat"
- Array.Resize(arytext, 2)
- arytext(0) = "cd " & Folder
- arytext(1) = "findstr /s /m " & Quote & "serverName" & Quote & " *class.asasm >results4.txt"
- Create_Batch(arytext, FILE_NAME)
- Dim MyFile As String = File.ReadAllText(Folder & "\results4.txt")
- MyFile = MyFile.Replace(Environment.NewLine, "")
- Dim NewFile As String = Folder & "\NoLagro.class.asasm"
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim Label As Integer = 0
- ' Initialize Success Array
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- Using sr As StreamReader = New StreamReader(Folder & "\" & MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("FlowEffect") Then
- TempSuccess(1) = True
- Exit Do
- End If
- If CurrentLine.Contains("label") Then
- Label = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Folder & "/" & MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Label + 1 Then
- sw.WriteLine(" returnvoid")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- If MyFile <> "" Then
- TempSuccess(2) = True
- End If
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(15) = True
- My.Computer.FileSystem.CopyFile(NewFile, Folder & "/" & MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("No Necromancer Particles:")
- Info.WriteLine("Line: " & Label)
- MyFile = MyFile.Replace("client-1\", "")
- Info.WriteLine(MyFile)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' HP Bars
- Private Sub HPBars()
- If ListBox1.GetSelected(15) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\Character.class.asasm"
- Dim NewFile As String = Folder & "\HPBars.class.asasm"
- Dim HPBars As String = File.ReadAllText(Folder & "\hpBar.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim CharNS As String = ""
- Dim spnsGameObject As String = ""
- Dim spnsBasicObject As String = ""
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("ProtectedNamespace") Then
- CharNS = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = CharNS.Split("(")(1).TrimStart("""")
- CharNS = Temp.Substring(0, Temp.IndexOf(""""))
- HPBars = HPBars.Replace("Change01", CharNS)
- Count = 1
- Using sr As StreamReader = New StreamReader(Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm")
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("ProtectedNamespace") Then
- spnsGameObject = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Temp = spnsGameObject.Split("(")(1).TrimStart("""")
- spnsGameObject = Temp.Substring(0, Temp.IndexOf(""""))
- HPBars = HPBars.Replace("Change02", spnsGameObject)
- Count = 1
- Using sr As StreamReader = New StreamReader(Folder & "\client-1\com\company\assembleegameclient\objects\BasicObject.class.asasm")
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("ProtectedNamespace") Then
- spnsBasicObject = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Temp = spnsBasicObject.Split("(")(1).TrimStart("""")
- spnsBasicObject = Temp.Substring(0, Temp.IndexOf(""""))
- HPBars = HPBars.Replace("Change03", spnsBasicObject)
- Count = 1
- FILE_NAME = Folder & "\Util.bat"
- Array.Resize(arytext, 2)
- arytext(0) = "cd " & Folder & "\client-1\com\company\util"
- arytext(1) = "findstr /s /m " & Quote & "MOVE_TO" & Quote & " *class.asasm >results5.txt"
- Create_Batch(arytext, FILE_NAME)
- My.Computer.FileSystem.MoveFile(Folder & "\client-1\com\company\util\results5.txt", Folder & "\results5.txt", True)
- Dim Util As String = File.ReadAllText(Folder & "\results5.txt")
- Util = Util.Replace(Environment.NewLine, "")
- Dim Utilshort As String = Util.Split(".")(0)
- HPBars = HPBars.Replace("Change04", Utilshort)
- Dim graphicUtilsCommands As String = ""
- Count = 1
- Using sr As StreamReader = New StreamReader(Folder & "\client-1\com\company\util\" & Util)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("slotid 2") Then
- graphicUtilsCommands = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Temp = graphicUtilsCommands.Split(",")(2).TrimStart(" """.ToCharArray)
- graphicUtilsCommands = Temp.Substring(0, Temp.IndexOf(""""))
- HPBars = HPBars.Replace("Change05", graphicUtilsCommands)
- Count = 1
- Dim charPos As String = ""
- Using sr As StreamReader = New StreamReader(Folder & "\client-1\com\company\assembleegameclient\objects\BasicObject.class.asasm")
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("sortVal_") Then
- Exit Do
- End If
- charPos = CurrentLine
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Temp = charPos.Split(",")(2).TrimStart(" """.ToCharArray)
- charPos = Temp.Substring(0, Temp.IndexOf(""""))
- HPBars = HPBars.Replace("Change06", charPos)
- Count = 1
- Dim GameObj As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim Player As String = Folder & "\client-1\com\company\assembleegameclient\objects\Player.class.asasm"
- Dim MethodHP As String = ""
- Dim MethodMaxHP As String = ""
- ' Find Method for Current Player HP
- Using sr As StreamReader = New StreamReader(GameObj)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Integer(200)") Then
- MethodHP = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- ' Find Player Max HP
- Using sr As StreamReader = New StreamReader(GameObj)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Integer(200)") Then
- MethodMaxHP = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- ' Trim All but Method Name
- Temp = MethodHP.Split(","c)(2).TrimStart(" """.ToCharArray)
- MethodHP = Temp.Substring(0, Temp.IndexOf(""""c))
- Temp = MethodMaxHP.Split(","c)(2).TrimStart(" """.ToCharArray)
- MethodMaxHP = Temp.Substring(0, Temp.IndexOf(""""c))
- ' Replace Methods into code
- HPBars = HPBars.Replace("Change07", MethodHP)
- HPBars = HPBars.Replace("Change08", MethodMaxHP)
- Count = 1
- Dim PlayerMana As String = ""
- Dim PlayerMaxMana As String = ""
- Dim Breath As Boolean = False
- Using sr As StreamReader = New StreamReader(Player)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("breath_") Then
- Breath = True
- End If
- If CurrentLine.Contains("Integer(0)") And Breath = True Then
- PlayerMana = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Breath = False
- Using sr As StreamReader = New StreamReader(Player)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("breath_") Then
- Breath = True
- End If
- If CurrentLine.Contains("Integer(200)") And Breath = True Then
- PlayerMaxMana = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Temp = PlayerMana.Split(",")(2).TrimStart(" """.ToCharArray)
- PlayerMana = Temp.Substring(0, Temp.IndexOf(""""))
- Temp = PlayerMaxMana.Split(",")(2).TrimStart(" """.ToCharArray)
- PlayerMaxMana = Temp.Substring(0, Temp.IndexOf(""""))
- HPBars = HPBars.Replace("Change09", PlayerMana)
- HPBars = HPBars.Replace("Change10", PlayerMaxMana)
- Count = 1
- Dim Draw As Boolean = False
- Dim GameBoard As String = ""
- Using sr As StreamReader = New StreamReader(GameObj)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("/draw") Then
- Draw = True
- End If
- If CurrentLine.Contains("map") And Draw = True Then
- GameBoard = CurrentLine
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Temp = GameBoard.Split(",")(1).TrimStart(" """.ToCharArray)
- GameBoard = Temp.Substring(0, Temp.IndexOf(""""))
- HPBars = HPBars.Replace("Change11", GameBoard)
- 'Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If HPBars.Contains("Change") Then
- Else
- Success(16) = True
- End If
- Count = 1
- Dim Slot As Integer = 0
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("trait slot") Then
- Slot = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Slot + 1 Then
- sw.WriteLine(HPBars)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- If Success(16) = True Then
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("HP Bars:")
- Info.WriteLine("Line: " & Slot)
- Info.WriteLine("com/company/assembleegameclient/objects/Character.class.asasm")
- Info.WriteLine("")
- Info.WriteLine("Updated Code: ")
- Dim Check As Boolean = False
- Using sr As StreamReader = New StreamReader(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If CurrentLine.Contains("#set") And Check = True Then
- Info.WriteLine(CurrentLine)
- End If
- If CurrentLine.Contains(" Guild Hall") Then
- Check = True
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' SW Slow
- Private Sub SWSlow()
- If ListBox1.GetSelected(16) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\GameObject.class.asasm"
- Dim CondEff As String = Folder & "\client-1\com\company\assembleegameclient\util\ConditionEffect.class.asasm"
- Dim NewFile As String = Folder & "\SWSlow.class.asasm"
- Dim Effect As String = ""
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim effLine As Integer = 0
- Dim Code As Integer = 0
- Dim SWSlow As String = File.ReadAllText(Folder & "\swNoSlow.txt")
- ' Initialize Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("Slow") Then
- TempSuccess(1) = True
- effLine = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(CondEff)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count = effLine + 1 Then
- Effect = CurrentLine
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = Effect.Split(","c)(2).TrimStart(" """.ToCharArray)
- Effect = Temp.Substring(0, Temp.IndexOf(""""c))
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("pushscope") Then
- Code = Count
- End If
- If CurrentLine.Contains(Effect) Then
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine(SWSlow)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- 'Check Success
- If TempSuccess(1) = True Then
- Success(17) = True
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Disable SW Slow Effect:")
- Info.WriteLine("Line: " & Code)
- Info.WriteLine("com\company\assembleegameclient\objects\GameObject.class.asasm")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' SW Speed Multiplier
- Private Sub SwSpeed()
- If ListBox1.GetSelected(17) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\Player.class.asasm"
- Dim NewFile As String = Folder & "\SWSpeed.class.asasm"
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim PreviousLine As String = ""
- Dim Check As Boolean = False
- Dim Init As String = ""
- Dim Props As String = ""
- Dim Speed As String = ""
- Dim SWSpeed As String = File.ReadAllText(Folder & "\swSpeed.txt")
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("speed_") And PreviousLine.Contains("props_") Then
- Check = True
- End If
- If CurrentLine.Contains("initproperty") And Check = True Then
- Init = CurrentLine
- Exit Do
- End If
- PreviousLine = CurrentLine
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Dim Temp As String = Init.Split("(")(2).TrimStart("""".ToCharArray)
- Props = Temp.Substring(0, Temp.IndexOf(""""c))
- SWSpeed = SWSpeed.Replace("Change1", Props)
- Temp = Init.Split(","c)(1).TrimStart(" """.ToCharArray)
- Speed = Temp.Substring(0, Temp.IndexOf(""""c))
- SWSpeed = SWSpeed.Replace("Change2", Speed)
- ' Check Success
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- If SWSpeed.Contains("Change") Then
- Else
- Success(18) = True
- End If
- Count = 1
- Check = False
- Dim Line As Integer = 0
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("dy_") Then
- Line = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Dim NewLine As Integer = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Count > Line And CurrentLine.Contains("update") Then
- Exit Do
- End If
- If Count > Line And CurrentLine.Contains("multiply") Then
- NewLine = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = NewLine + 1 Then
- sw.WriteLine(SWSpeed)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- If ListBox1.GetSelected(4) = True Then
- NewLine = NewLine - 42
- End If
- If ListBox1.GetSelected(13) = True Then
- NewLine = NewLine - 2
- End If
- If Success(18) = True Then
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Modify Speed in SW:")
- Info.WriteLine("Line: " & NewLine)
- Info.WriteLine("com\company\assembleegameclient\objects\Player.class.asasm")
- Info.WriteLine("")
- Info.WriteLine("Update Code:")
- Info.WriteLine("#set Props " & Props)
- Info.WriteLine("#set Speed " & Speed)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Odom Style SW
- Private Sub OdomSW()
- If ListBox1.GetSelected(18) = True Then
- Try
- Dim CurrentLine As String = ""
- Dim Trees As String = Folder & "\client-30.bin"
- Dim NewTrees As String = Folder & "\Trees.bin"
- FILE_NAME = Folder & "\XML.bat"
- Array.Resize(arytext, 4)
- arytext(0) = "cd " & Folder
- arytext(1) = "swfdecompress client.swf"
- arytext(2) = "swfbinexport client.swf"
- arytext(3) = "rabcdasm client-1.abc"
- Create_Batch(arytext, FILE_NAME)
- Dim Count As Integer = 1
- Dim Line1 As Integer = 1
- Dim Line2 As Integer = 1
- Dim Line3 As Integer = 1
- Dim Line4 As Integer = 1
- Dim Line5 As Integer = 1
- Dim Line6 As Integer = 1
- Dim Obj As Integer = 1
- ' Initialize Success Array
- For i = 1 To 5
- TempSuccess(i) = False
- Next
- Using sr As StreamReader = New StreamReader(Trees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Line1 <> 1 And CurrentLine.Contains("</Object>") Then
- Obj = Count
- Exit Do
- End If
- If CurrentLine.Contains("White Sprite Tree") Then
- TempSuccess(1) = True
- Line1 = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- Using sw As StreamWriter = New StreamWriter(NewTrees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count >= Line1 And Count <= Obj Then
- If CurrentLine.Contains("<Static/>") Then
- ElseIf CurrentLine.Contains("<Enemy/>") Then
- ElseIf CurrentLine.Contains("<File>") Then
- sw.WriteLine(" <File>lofiChar28x8</File>")
- ElseIf CurrentLine.Contains("<Index>") Then
- sw.WriteLine(" <Index>0x1a</Index>")
- ElseIf CurrentLine.Contains("<Size>") Then
- sw.WriteLine(" <Size>40</Size>")
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewTrees, Trees, True)
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Line2 > 1 And CurrentLine.Contains("</Object>") Then
- Obj = Count
- Exit Do
- End If
- If CurrentLine.Contains("Green Sprite Tree") Then
- Line2 = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- Using sw As StreamWriter = New StreamWriter(NewTrees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count >= Line2 And Count <= Obj Then
- If CurrentLine.Contains("<Static/>") Then
- ElseIf CurrentLine.Contains("<Enemy/>") Then
- ElseIf CurrentLine.Contains("<File>") Then
- sw.WriteLine(" <File>lofiChar28x8</File>")
- ElseIf CurrentLine.Contains("<Index>") Then
- sw.WriteLine(" <Index>0x1a</Index>")
- ElseIf CurrentLine.Contains("<Size>") Then
- sw.WriteLine(" <Size>40</Size>")
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewTrees, Trees, True)
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Line3 > 1 And CurrentLine.Contains("</Object>") Then
- Obj = Count
- Exit Do
- End If
- If CurrentLine.Contains("Yellow Sprite Tree") Then
- Line3 = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- Using sw As StreamWriter = New StreamWriter(NewTrees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count >= Line3 And Count <= Obj Then
- If CurrentLine.Contains("<Static/>") Then
- ElseIf CurrentLine.Contains("<Enemy/>") Then
- ElseIf CurrentLine.Contains("<File>") Then
- sw.WriteLine(" <File>lofiChar28x8</File>")
- ElseIf CurrentLine.Contains("<Index>") Then
- sw.WriteLine(" <Index>0x1a</Index>")
- ElseIf CurrentLine.Contains("<Size>") Then
- sw.WriteLine(" <Size>40</Size>")
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewTrees, Trees, True)
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Line4 > 1 And CurrentLine.Contains("</Object>") Then
- Obj = Count
- Exit Do
- End If
- If CurrentLine.Contains("Purple Sprite Tree") Then
- Line4 = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- Using sw As StreamWriter = New StreamWriter(NewTrees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count >= Line4 And Count <= Obj Then
- If CurrentLine.Contains("<Static/>") Then
- ElseIf CurrentLine.Contains("<Enemy/>") Then
- ElseIf CurrentLine.Contains("<File>") Then
- sw.WriteLine(" <File>lofiChar28x8</File>")
- ElseIf CurrentLine.Contains("<Index>") Then
- sw.WriteLine(" <Index>0x1a</Index>")
- ElseIf CurrentLine.Contains("<Size>") Then
- sw.WriteLine(" <Size>40</Size>")
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewTrees, Trees, True)
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Line5 > 1 And CurrentLine.Contains("</Object>") Then
- Obj = Count
- Exit Do
- End If
- If CurrentLine.Contains("Red Sprite Tree") Then
- Line5 = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- Using sw As StreamWriter = New StreamWriter(NewTrees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count >= Line5 And Count <= Obj Then
- If CurrentLine.Contains("<Static/>") Then
- ElseIf CurrentLine.Contains("<Enemy/>") Then
- ElseIf CurrentLine.Contains("<File>") Then
- sw.WriteLine(" <File>lofiChar28x8</File>")
- ElseIf CurrentLine.Contains("<Index>") Then
- sw.WriteLine(" <Index>0x1a</Index>")
- ElseIf CurrentLine.Contains("<Size>") Then
- sw.WriteLine(" <Size>40</Size>")
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewTrees, Trees, True)
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Line6 > 1 And CurrentLine.Contains("</Object>") Then
- Obj = Count
- Exit Do
- End If
- If CurrentLine.Contains("Blue Sprite Tree") Then
- Line6 = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Trees)
- Using sw As StreamWriter = New StreamWriter(NewTrees)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count >= Line6 And Count <= Obj Then
- If CurrentLine.Contains("<Static/>") Then
- ElseIf CurrentLine.Contains("<Enemy/>") Then
- ElseIf CurrentLine.Contains("<File>") Then
- sw.WriteLine(" <File>lofiChar28x8</File>")
- ElseIf CurrentLine.Contains("<Index>") Then
- sw.WriteLine(" <Index>0x1a</Index>")
- ElseIf CurrentLine.Contains("<Size>") Then
- sw.WriteLine(" <Size>40</Size>")
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewTrees, Trees, True)
- Dim Tiles As String = Folder & "\client-27.bin"
- Dim NewTiles As String = Folder & "\NewTiles.bin"
- Dim Check As Boolean = False
- Count = 1
- Using sr As StreamReader = New StreamReader(Tiles)
- Using sw As StreamWriter = New StreamWriter(NewTiles)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If CurrentLine.Contains("White Alpha Square") Then
- TempSuccess(2) = True
- Check = True
- End If
- If Check = True And CurrentLine.Contains("<Index>0x31</Index>") Then
- sw.WriteLine(" <Index>0x30</Index>")
- ElseIf Check = True And CurrentLine.Contains("<Index>0x32</Index>") Then
- sw.WriteLine(" <Index>0x30</Index>")
- ElseIf Check = True And CurrentLine.Contains("<Index>0x33</Index>") Then
- sw.WriteLine(" <Index>0x30</Index>")
- ElseIf Check = True And CurrentLine.Contains("<Index>0x34</Index>") Then
- sw.WriteLine(" <Index>0x30</Index>")
- ElseIf Check = True And CurrentLine.Contains("<Index>0x35</Index>") Then
- sw.WriteLine(" <Index>0x30</Index>")
- ElseIf Check = True And CurrentLine.Contains("</Animate>") Then
- ' Do nothing and skip line
- ElseIf CurrentLine.Contains("0xad") Then
- sw.WriteLine(CurrentLine)
- Check = False
- Else
- sw.WriteLine(LinetoWrite)
- End If
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewTiles, Tiles, True)
- FILE_NAME = Folder & "\XML_Recompile.bat"
- Array.Resize(arytext, 3)
- arytext(0) = "cd " & Folder
- arytext(1) = "swfbinreplace client.swf 30 client-30.bin"
- arytext(2) = "swfbinreplace client.swf 27 client-27.bin"
- Create_Batch(arytext, FILE_NAME)
- If TempSuccess(1) = True And TempSuccess(2) = True Then
- Success(19) = True
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("All Tiles SW Tiles are White and the trees have been replaced with Valentines")
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- End If
- Catch
- End Try
- End If
- End Sub
- ' Remove Loading Screen
- Private Sub RemLoad()
- If ListBox1.GetSelected(19) = True Then
- Try
- FILE_NAME = Folder & "\NoLoading.bat"
- Array.Resize(arytext, 2)
- arytext(0) = "cd " & Folder
- arytext(1) = "findstr /s /m " & Quote & "indicator_" & Quote & " *class.asasm >results6.txt"
- Create_Batch(arytext, FILE_NAME)
- Dim MyFile As String = File.ReadAllText(Folder & "\results6.txt")
- MyFile = MyFile.Replace(Environment.NewLine, "")
- Dim NewFile As String = Folder & "\NoLoading.class.asasm"
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim TraitMethod As Boolean = False
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(Folder & "\" & MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("trait method") Then
- TraitMethod = True
- End If
- If CurrentLine.Contains("pushfalse") And TraitMethod = True Then
- Code = Count
- Exit Do
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Folder & "/" & MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 1 Then
- sw.WriteLine("")
- sw.WriteLine(" returnvoid")
- sw.WriteLine("")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- ' Check Success
- If MyFile <> "" Then
- Success(20) = True
- My.Computer.FileSystem.CopyFile(NewFile, Folder & "/" & MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Remove Loading Screen:")
- Info.WriteLine("Line: " & Code)
- MyFile = MyFile.Replace("client-1\", "")
- Info.WriteLine(MyFile)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Allow Spammable Notifications
- Private Sub SpamNot()
- If ListBox1.GetSelected(20) = True Then
- Try
- FILE_NAME = Folder & "\SpamNot.bat"
- Array.Resize(arytext, 3)
- arytext(0) = "cd " & Folder & "/client-1"
- arytext(1) = "findstr /s /m addQueuedText *class.asasm >results7.txt"
- arytext(2) = "findstr /m /f:results7.txt addStatusText *class.asasm >results8.txt"
- Create_Batch(arytext, FILE_NAME)
- My.Computer.FileSystem.CopyFile(Folder & "\client-1\results8.txt", Folder & "\results8.txt", True)
- Dim MyFile As String = File.ReadAllText(Folder & "\results8.txt")
- MyFile = MyFile.Replace(Environment.NewLine, "")
- Dim NewFile As String = Folder & "\SpamNot.class.asasm"
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim AddQued As Boolean = False
- Dim Code As Integer = 0
- Using sr As StreamReader = New StreamReader(Folder & "\client-1\" & MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("/addQueuedText") Then
- Success(21) = True
- AddQued = True
- End If
- If CurrentLine.Contains("inclocal_i") And AddQued = True Then
- If CurrentLine.Contains("5") Then
- Code = Count
- Exit Do
- End If
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Folder & "/client-1/" & MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Code + 2 Then
- sw.WriteLine(" pop")
- sw.WriteLine(" pushfalse")
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- If Success(21) = True Then
- My.Computer.FileSystem.CopyFile(NewFile, Folder & "/client-1/" & MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Allow Spammable Notifications:")
- Info.WriteLine("Line: " & Code + 2)
- MyFile = MyFile.Replace("client-1\", "")
- Info.WriteLine(MyFile)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Disable Ally Projectiles
- Private Sub AllyProj()
- If ListBox1.GetSelected(21) = True Then
- Try
- Dim MyFile As String = Folder & "\client-1\com\company\assembleegameclient\objects\Projectile.class.asasm"
- Dim NewFile As String = Folder & "\AllyProj.class.asasm"
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim ownBullet As String = ""
- Dim Check As Boolean = False
- Dim noAlly As String = File.ReadAllText(Folder & "\noAlly.txt")
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Check = True Then
- ownBullet = CurrentLine
- Exit Do
- End If
- If CurrentLine.Contains("bulletType_") Then
- Check = True
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Dim Temp As String = ownBullet.Split(",")(2).TrimStart(" """.ToCharArray)
- ownBullet = Temp.Substring(0, Temp.IndexOf(""""))
- noAlly = noAlly.Replace("Change1", ownBullet)
- If noAlly.Contains("Change") Then
- Else
- Success(22) = True
- End If
- Count = 1
- Check = False
- Dim Draw As Integer = 1
- Dim DrawShadow As Integer = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Check = True And CurrentLine.Contains("pushscope") Then
- Draw = Count
- Exit Do
- End If
- If CurrentLine.Contains("/draw" & Quote) Then
- Check = True
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = Draw + 2 Then
- sw.WriteLine(noAlly)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- Check = False
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If Check = True And CurrentLine.Contains("pushscope") Then
- DrawShadow = Count
- Exit Do
- End If
- If CurrentLine.Contains("/drawShadow" & Quote) Then
- Check = True
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = DrawShadow + 2 Then
- sw.WriteLine(noAlly)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- If Success(22) = True Then
- My.Computer.FileSystem.CopyFile(NewFile, MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("No Ally Projectiles:")
- Info.WriteLine("Line: " & Draw + 1)
- Info.WriteLine("Line: " & DrawShadow - 17)
- Info.WriteLine("com\company\assembleegameclient\objects\Projectile.class.asasm")
- Info.WriteLine("")
- Info.WriteLine("Updated Code: ")
- Info.WriteLine("#set ownBullet " & ownBullet)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Trim Net Jitter
- Private Sub TrimJitter()
- If ListBox1.GetSelected(22) = True Then
- Try
- FILE_NAME = Folder & "\Jitter.bat"
- Array.Resize(arytext, 2)
- arytext(0) = "cd " & Folder
- arytext(1) = "findstr /s /m :JitterWatcher *class.asasm >results9.txt"
- Create_Batch(arytext, FILE_NAME)
- Dim MyFile As String = File.ReadAllText(Folder & "\results9.txt")
- MyFile = MyFile.Replace(Environment.NewLine, "")
- Dim NewFile As String = Folder & "\Jitter.class.asasm"
- Dim Roundjitter As String = File.ReadAllText(Folder & "\Roundjitter.txt")
- Dim Count As Integer = 1
- Dim CurrentLine As String = ""
- Dim jitter As Boolean = False
- Dim RetVal As Integer = 1
- Using sr As StreamReader = New StreamReader(Folder & "\" & MyFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- If CurrentLine.Contains("/cinit") Then
- Exit Do
- End If
- If CurrentLine.Contains("/jitter") Then
- Success(23) = True
- jitter = True
- End If
- If CurrentLine.Contains("returnvalue") And jitter = True Then
- RetVal = Count
- End If
- CurrentLine = sr.ReadLine
- Count = Count + 1
- Loop
- End Using
- Count = 1
- Using sr As StreamReader = New StreamReader(Folder & "\" & MyFile)
- Using sw As StreamWriter = New StreamWriter(NewFile)
- CurrentLine = sr.ReadLine
- Do While (Not CurrentLine Is Nothing)
- Dim LinetoWrite = CurrentLine
- If Count = RetVal Then
- sw.WriteLine(Roundjitter)
- End If
- sw.WriteLine(LinetoWrite)
- Count = Count + 1
- CurrentLine = sr.ReadLine
- Loop
- End Using
- End Using
- If Success(23) = True Then
- My.Computer.FileSystem.CopyFile(NewFile, Folder & "\" & MyFile, True)
- End If
- Dim Info As StreamWriter
- Info = File.AppendText(LinesAndFiles)
- Info.WriteLine("Round Net Jitter:")
- Info.WriteLine("Line: " & RetVal - 1)
- MyFile = MyFile.Replace("client-1\", "")
- Info.WriteLine(MyFile)
- Info.WriteLine("")
- Info.Flush()
- Info.Close()
- Catch
- End Try
- End If
- End Sub
- ' Recompile SWF
- Private Sub Recompile()
- Dim FILE_NAME As String = Folder & "\recompile.bat"
- Dim aryText(3) As String
- aryText(0) = "cd " & Folder
- aryText(1) = "rabcasm client-1\client-1.main.asasm"
- aryText(2) = "abcreplace client.swf 1 client-1\client-1.main.abc"
- Create_Batch(aryText, FILE_NAME)
- End Sub
- ' Create And Run Batch Files
- Public Sub Create_Batch(aryText() As String, FileName As String)
- Dim objWriter As New System.IO.StreamWriter(FileName, False)
- For i = 0 To aryText.Length - 1
- objWriter.WriteLine(aryText(i))
- Next
- objWriter.Close()
- Dim Process As New Process
- Dim ps As New ProcessStartInfo(FileName)
- ps.RedirectStandardError = True
- ps.RedirectStandardOutput = True
- ps.CreateNoWindow = False
- ps.WindowStyle = ProcessWindowStyle.Hidden
- ps.UseShellExecute = False
- Process.StartInfo = ps
- Process.Start()
- Process.WaitForExit()
- End Sub
- 'Show Code Updates
- Private Sub Code_Updates(sender As System.Object, e As System.EventArgs) Handles Button1.Click
- Process.Start(LinesAndFiles)
- End Sub
- End Class
Add Comment
Please, Sign In to add comment