- 好友
- 6
- 在线时间
- 0 小时
- 最后登录
- 2024-11-13
骑士
- UID
- 3398051
- 第纳尔
- 1841
- 精华
- 0
- 互助
- 48
- 荣誉
- 5
- 贡献
- 10
- 魅力
- 341
- 注册时间
- 2022-8-13
鲜花( 57) 鸡蛋( 0)
|
楼主 |
发表于 2024-2-19 14:26:04
|
显示全部楼层
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "BlooyMount&blade"
ClientHeight = 4860
ClientLeft = 45
ClientTop = 330
ClientWidth = 6750
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4860
ScaleWidth = 6750
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "添加"
Enabled = 0 'False
Height = 495
Left = 4320
TabIndex = 3
Top = 1560
Width = 2415
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 0
Locked = -1 'True
TabIndex = 2
Top = 840
Width = 4335
End
Begin VB.CommandButton Command1
Caption = "选择模组文件夹"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4320
TabIndex = 0
Top = 840
Width = 2415
End
Begin VB.Label Label3
Caption = "由ggfgfgf制作"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000080&
Height = 375
Left = 4920
TabIndex = 5
Top = 0
Width = 2415
End
Begin VB.Image Image2
Height = 1095
Left = 5400
Picture = "Form1.frx":030A
Stretch = -1 'True
Top = 3600
Width = 1215
End
Begin VB.Label Label1
Caption = "关于"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 615
Left = 4440
TabIndex = 4
Top = 3840
Width = 1575
End
Begin VB.Image Image1
Height = 3330
Left = 0
Picture = "Form1.frx":0614
Stretch = -1 'True
Top = 1440
Width = 4050
End
Begin VB.Label Label2
Caption = "模组文件夹:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 1
Top = 600
Width = 2055
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim re As New RegExp
Dim retest As Boolean
Dim Sencep As Long
Const Sencestr As String = "10808639105"
Const Sencenum As Long = 68919039
Dim str As String
Dim i As Long
Private Sub Command1_Click()
str = GetFolder(Me.hWnd, "浏览module文件夹")
If str <> "" Then
Text1.Text = str
If Dir(str & "\module.ini", vbArchive) <> "" Then 'module.ini
Command2.Enabled = True
If Dir(str & "\bloodybackup", vbDirectory) <> "" Then
Command2.Caption = "退回"
Else
Command2.Caption = "添加"
End If
Else
MsgBox "文件夹错误!", vbCritical
Command2.Enabled = False
End If
End If
End Sub
Private Sub Command2_Click()
On Error Resume Next
If Command2.Caption = "添加" Then
Command2.Enabled = False
MkDir (str & "\bloodybackup")
MkDir (str & "\bloodybackup\Resource")
MkDir (str & "\bloodybackup\Textures")
CreateObject("scripting.filesystemobject").copyfolder str & "\Resource", str & "\bloodybackup\Resource"
CreateObject("scripting.filesystemobject").copyfolder str & "\Textures", str & "\bloodybackup\Textures"
CreateObject("scripting.filesystemobject").copyfolder App.Path & "\Resource", str & "\Resource"
CreateObject("scripting.filesystemobject").copyfolder App.Path & "\Textures", str & "\Textures"
CreateObject("scripting.filesystemobject").copyfile str & "\module.ini", str & "\bloodybackup\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\scene_props.txt", str & "\bloodybackup\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\mission_templates.txt", str & "\bloodybackup\", 1
Open str & "\module.ini" For Append As #1
Print #1,
Print #1, "load_mod_resource = blood"
Close #1
Dim m As String
Dim linenum As Long
Open str & "\scene_props.txt" For Input As #1
Open str & "\scene_props2.txt" For Append As #2
Line Input #1, m
Print #2, m
Line Input #1, m
Sencep = CInt(m)
linenum = CInt(m) + 5
Print #2, linenum
Do While Not EOF(1)
Line Input #1, m
Print #2, m
Loop
Print #2,
Print #2, "spr_blood1 0 0 blood_spray1 0 0"
Print #2,
Print #2,
Print #2, "spr_blood2 0 0 blood_spray2 0 0"
Print #2,
Print #2,
Print #2, "spr_blood3 0 0 blood_spray3 0 0"
Print #2,
Print #2,
Print #2, "spr_blood_hit 0 0 blood_spray 0 0"
Print #2,
Print #2,
Print #2, "spr_blood_hit2 0 0 blood_spray_2 0 0"
Print #2,
Print #2,
Close #2
Close #1
Kill str & "\scene_props.txt"
Name str & "\scene_props2.txt" As str & "\scene_props.txt"
Open str & "\mission_templates.txt" For Input As #1
Open str & "\mission_templates2.txt" For Append As #2
Do While Not EOF(1)
Line Input #1, m
m = Trim(m)
If m = "You_lead_your_men_to_battle." Or m = "Alley_fight" Or m = "Town_Fight" Then '开始ms过程
retest = True
Do While retest
Print #2, m
Line Input #1, m
retest = Not RegExpnum(m)
Loop
linenum = CInt(m) + 2
Print #2, CStr(linenum)
For i = 1 To linenum - 2
Line Input #1, m
Print #2, m
Next i
Print #2, "-28.000000 0.000000 0.000000 0 53 2071 1 1224979098644774912 2073 1 1224979098644774913 2124 1 100 1710 2 0 1224979098644774912 2136 3 1224979098644774914 -135 135 725 2 0 1224979098644774914 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 738 2 0 1224979098644774917 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 ";
Print #2, "201 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 739 2 0 1224979098644774917 791 1 0 722 2 0 10 3 0 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 201 4 0 33 3 1224979098644774913 10 30 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 4) & " 5 0 32 2 1224979098644774913 10 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 4) & " 3 0 3 0 "
Print #2, "-26.000000 0.000000 0.000000 0 61 2071 1 1224979098644774912 2073 1 1224979098644774913 2124 1 100 31 2 1224979098644774913 0 1710 2 0 1224979098644774912 2136 3 1224979098644774914 -135 135 725 2 0 1224979098644774914 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 738 2 0 1224979098644774917 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 201 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 722 2 1 -50 722 2 2 -50 791 1 1 791 1 2 728 2 1224979098644774915 1 728 2 1224979098644774916 2 2106 2 1224979098644774915 1224979098644774916 2108 2 1224979098644774915 2 2142 2 1224979098644774917 1224979098644774915 739 2 0 1224979098644774917 791 1 0 722 2 0 10 3 0 2136 3 1224979098644774914 1 3 4 0 2113 1 1224979098644774915 33 3 1224979098644774915 -201 201 ";
Print #2, "4 0 31 2 1224979098644774914 1 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 1) & " 3 0 4 0 31 2 1224979098644774914 2 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 2) & " 3 0 4 0 31 2 1224979098644774914 3 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 3) & " 3 0 3 0 "
' Print #2, "-28.000000 0.000000 0.000000 0 45 2071 1 1224979098644774912 2073 1 1224979098644774913 1710 2 0 1224979098644774912 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 738 2 0 1224979098644774916 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 739 2 0 1224979098644774916 722 2 0 7 3 0 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 4 0 33 3 1224979098644774913 10 30 1970 1 0 1974 1 ";
' Print #2, Sencestr & CStr(Sencep + Sencenum + 4) & " 5 0 32 2 1224979098644774913 10 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 5) & " 3 0 3 0 "
' Print #2, "-26.000000 0.000000 0.000000 0 53 2071 1 1224979098644774912 2073 1 1224979098644774913 31 2 1224979098644774913 0 1710 2 0 1224979098644774912 700 2 1 0 700 2 2 0 721 2 1 100 721 2 2 -100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 738 2 0 1224979098644774916 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 721 2 1 -100 721 2 2 100 720 2 1 -100 720 2 2 100 791 1 1 791 1 2 728 2 1224979098644774914 1 728 2 1224979098644774915 2 2106 2 1224979098644774914 1224979098644774915 2108 2 1224979098644774914 2 2142 2 1224979098644774916 1224979098644774914 739 2 0 1224979098644774916 722 2 0 10 3 0 2136 3 1224979098644774917 1 3 4 0 2113 1 1224979098644774914 2147483678 2 1224979098644774914 400 4 0 31 2 1224979098644774917 1 1970 1 0 1974 1 ";
' Print #2, Sencestr & CStr(Sencep + Sencenum + 1) & " 3 0 4 0 31 2 1224979098644774917 2 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 2) & " 3 0 4 0 31 2 1224979098644774917 3 1970 1 0 1974 1 " & Sencestr & CStr(Sencep + Sencenum + 3) & " 3 0 3 0 "
Else
Print #2, m
End If
Loop
Close #2
Close #1
Kill str & "\mission_templates.txt"
Name str & "\mission_templates2.txt" As str & "\mission_templates.txt"
Command2.Caption = "退回"
Command2.Enabled = True
Else
Command2.Enabled = False
CreateObject("scripting.filesystemobject").deletefolder str & "\Resource"
CreateObject("scripting.filesystemobject").deletefolder str & "\Textures"
CreateObject("scripting.filesystemobject").copyfolder str & "\bloodybackup\Resource", str & "\Resource", 1
CreateObject("scripting.filesystemobject").copyfolder str & "\bloodybackup\Textures", str & "\Textures", 1
CreateObject("scripting.filesystemobject").copyfile str & "\bloodybackup\module.ini", str & "\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\bloodybackup\scene_props.txt", str & "\", 1
CreateObject("scripting.filesystemobject").copyfile str & "\bloodybackup\mission_templates.txt", str & "\", 1
CreateObject("scripting.filesystemobject").deletefolder str & "\bloodybackup"
Command2.Caption = "添加"
Command2.Enabled = True
End If
End Sub
Function RegExpnum(restr As String) As Boolean
With re
RegExpnum = .Test(restr)
End With
End Function
Private Sub Form_Load()
With re
.Global = True
.IgnoreCase = False
.MultiLine = False
.Pattern = "(^\d[0-9]*$)"
End With
End Sub
Private Sub Image2_Click()
MsgBox "由ggfgfgf制作,为你的mount&blade模组添加地面血迹效果.感谢幼道和阿格兰的指导."
End Sub
Private Sub Label1_Click()
MsgBox "由ggfgfgf制作,为你的mount&blade模组添加地面血迹效果.感谢幼道和阿格兰的指导."
End Sub
|
|