Advertisement
Guest User

Untitled

a guest
May 26th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports PackageIO
  2. Imports System.IO
  3. Public Class Form1
  4.     Dim Filepath As String
  5.     Dim money As String
  6.     Dim Offset As String = Nothing
  7.  
  8.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  9.         Dim open As New OpenFileDialog
  10.         open.Title = "Open your Save"
  11.         open.ShowDialog()
  12.         Filepath = open.FileName
  13.         ReadFile()
  14.     End Sub
  15.  
  16.     Private Sub ReadFile()
  17.         Try
  18.             Dim reader As New PackageIO.Reader(Filepath, Endian.Little)
  19.             TextBox1.Enabled = True
  20.             Button2.Enabled = True
  21.             reader.Position = &H10
  22.             TextBox1.Text = reader.ReadInt32
  23.             Offset = (reader.ReadInt32 + &HF6292)
  24.             reader.Position = (Offset + &HF6293)
  25.             TextBox2.Text = reader.ReadInt32
  26.  
  27.  
  28.         Catch ex As Exception
  29.             MessageBox.Show("Save Game Is Corrupted or Not A Xenoblade Chronicles 2 Save")
  30.             TextBox1.Enabled = False
  31.             Button2.Enabled = False
  32.         End Try
  33.     End Sub
  34.  
  35.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  36.  
  37.  
  38.     End Sub
  39.  
  40.     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  41.         Try
  42.             Dim Writer As New PackageIO.Writer(Filepath, Endian.Little)
  43.             Writer.WriteInt32(TextBox1.Text)
  44.             Writer.Position = &H10
  45.             Writer.WriteInt32(TextBox1.Text)
  46.             MsgBox("File Successfully Saved Make Sure To Rehash And Resign With The Tool or Horizion")
  47.         Catch ex As Exception
  48.             MsgBox("Saved Game Could Not Be Saved", MsgBoxStyle.OkOnly, "Please Try Again or Try A Diffrent Save")
  49.         End Try
  50.     End Sub
  51.  
  52.     Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
  53.  
  54.     End Sub
  55.  
  56.     Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
  57.  
  58.     End Sub
  59. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement