Most visitors online was 8830 , on 6 Feb 2024
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!Alpha, can you release Xor Keys to ROW files???
I can open, npcscript.mcf of 1753 and 2240 version, but i cant open the same file of ROW.
Public Shared Sub sharedDataOverWrite(ByVal file As String)
Dim lines As String() = {}
If Not IO.File.Exists(file) Then Return
Try
lines = IO.File.ReadAllLines(file)
Catch ex As Exception
Return
End Try
For Each line As String In lines
Try
line = line.Trim()
If line <> String.Empty AndAlso Not line.StartsWith("//") Then
Dim splice1 As String() = line.Split("=")
Dim splice2 As String() = splice1(0).Trim().Split(".")
Dim type As String = splice2(0)
Dim fileType As String = splice2(1)
Dim index As Integer = 0
If UBound(splice2) > 1 Then index = splice2(2)
Dim data As String = splice1(1).Trim()
Select Case fileType
Case "mcf"
If type = "xor" Then
CMcfCoder.xorKey = parseByteArray(data)
End If
Case "gcmds"
If type = "xor" Then
CGcmdsCoder.key = parseByteArray(data)
End If
Case "gcmds-batch-in"
If type = "xor" Then
CGcmdsCoder.batchinkey = parseByteArray(data)
End If
Case "gcmds-batch-out"
If type = "xor" Then
CGcmdsCoder.batchoutkey = parseByteArray(data)
End If
Case "gsf"
If type = "xor" Then
CGsfCoder.xorDat(index) = data
ElseIf type = "off" Then
CGsfCoder.typeCodes(index) = data
End If
Case "global"
If type = "usageNotice" Then
If Not data = "1" AndAlso Not data = "0" Then Throw New ArgumentException("Value can be 1 or 0")
frmNpcEdit.enableServerNotice = (data = "1")
ElseIf type = "syntaxHighlight" Then
If Not data = "1" AndAlso Not data = "0" Then Throw New ArgumentException("Value can be 1 or 0")
frmNpcEdit.syntaxHighlightEnabled = (data = "1")
End If
End Select
End If
Catch ex As Exception
Dim sw As IO.StreamWriter = IO.File.AppendText(file)
sw.WriteLine("//" & Date.Now.ToString())
sw.WriteLine("//" & vbTab & "Line: " & line)
sw.WriteLine("//" & vbTab & "Exception: " & ex.Message)
sw.WriteLine("//" & vbTab & "Source: " & ex.StackTrace.Replace(vbNewLine, vbNewLine & "//" & vbTab & vbTab))
sw.Flush()
sw.Close()
End Try
Next
End Sub
Public Class CGcmdsCoder
#Region "Data"
Friend Shared key As Byte() = {&H5A, &H5F, &H61, &H6C, &H6C, &H5F, &H41, &H5F, &H33, &H44}
Friend Shared batchinkey As Byte() = {&H5A, &H5F, &H61, &H6C, &H6C, &H5F, &H41, &H5F, &H33, &H44}
Friend Shared batchoutkey As Byte() = {&H52, &H4F, &H57, &H47, &H6C, &H6F, &H62, &H61, &H6C, &H4B, &H65, &H79}
#End Region
Private Sub btnBatch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBatch.Click
Me.btnBatch.Enabled = False
Me.lblStatus.Text = "Batch Converting... Please wait a moment"
' ## - Get Dir Paths In and Out (no trailing slash) - ##
Dim dirIn As String
Dim dirOut As String
dirIn = Me.txtFileIn.Text()
dirOut = Me.txtFileOut.Text()
If dirIn = "" Or Not My.Computer.FileSystem.DirectoryExists(dirIn) Then Exit Sub
If dirOut = "" Then dirOut = dirIn
If Not My.Computer.FileSystem.DirectoryExists(dirOut) Then Exit Sub
' ## - End - Get Dir Paths In and Out (no trailing slash) - ##
' Get Existing GCMDS key so we can change it back to this when were done
Dim tmpKey As Byte()
tmpKey = CGcmdsCoder.key
' Loop through all the files in the dir in path
Dim x As Integer
For x = 0 To (My.Computer.FileSystem.GetFiles(dirIn).Count - 1)
Dim fIn As IO.FileStream
Dim fileName As String
Dim filePath As String
Dim fileExt As String
fileName = IO.Path.GetFileName(My.Computer.FileSystem.GetFiles(dirIn).Item(x))
filePath = My.Computer.FileSystem.GetFiles(dirIn).Item(x)
fileExt = UCase(IO.Path.GetExtension(fileName))
If fileExt = ".GCMDS" Or fileExt = ".SKEY" Then
' ## - Read RAW GCMDS Data into Byte Array - ##
fIn = My.Computer.FileSystem.GetFileInfo(filePath).OpenRead()
Dim fInData(fIn.Length - 1) As Byte
fIn.Read(fInData, 0, fIn.Length)
fIn.Close()
' ## - End - Read RAW GCMDS Data into Byte Array - ##
' Setup output file
Dim fOut As IO.FileStream
fOut = My.Computer.FileSystem.GetFileInfo(dirOut & "\" & fileName).OpenWrite()
fOut.SetLength(0)
' Switch GCMDS Key to "xor.gcmds-batch-in" (Import Mode)
CGcmdsCoder.key = CGcmdsCoder.batchinkey
' Decode RAW GCMDS Data from Byte Array to String using "xor.gcmds-batch-in" key
Dim sOut As String
sOut = CGcmdsCoder.Decode(fInData)
' Switch GCMDS Key to "xor.gcmds-batch-out" (Export Mode)
CGcmdsCoder.key = CGcmdsCoder.batchoutkey
' Re-Encode PlainText String file into GCMDS Data Structure using "xor.gcmds-batch-out" key
Dim bOut As Byte() = {}
bOut = CGcmdsCoder.Encode(Split(sOut, vbNewLine))
fOut.Write(bOut, 0, bOut.Length)
fOut.Close()
End If
Next
' Reset GCMDS Key to what is was before we started converting
CGcmdsCoder.key = tmpKey
Me.btnBatch.Enabled = True
Me.lblStatus.Text = "Batch Convert Complete."
End Sub
i have some error like this
can u help me to make it running??
recompile wrapper class
Already here, if bother to use 'Search'. Tyfix have shared them.
recompile wrapper class