MDIForm1.frm
资源名称:vbmcrisrc.rar [点击查看]
上传用户:pcw2004
上传日期:2022-02-02
资源大小:743k
文件大小:3k
源码类别:
DirextX编程
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.MDIForm MDIForm1
- BackColor = &H8000000C&
- Caption = "VB传奇服务器"
- ClientHeight = 6075
- ClientLeft = 165
- ClientTop = 825
- ClientWidth = 9810
- LinkTopic = "MDIForm1"
- StartUpPosition = 3 '窗口缺省
- Begin VB.Menu mGame
- Caption = "游戏(&G)"
- Begin VB.Menu mONServer
- Caption = "启动服务器(&O)"
- Shortcut = {F2}
- End
- End
- Begin VB.Menu mEdit
- Caption = "控制"
- Begin VB.Menu mLoadNpc
- Caption = "重新加载NPC"
- End
- Begin VB.Menu mLoadMonGen
- Caption = "重新加载刷怪配置"
- End
- End
- Begin VB.Menu mVideoFrm
- Caption = "窗口(&V)"
- Begin VB.Menu mVideoGameFrm
- Caption = "游戏服务器窗口"
- End
- End
- End
- Attribute VB_Name = "MDIForm1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- Dim i As Integer, j As Integer
- Open App.Path & "saveplayerplayerlist.txt" For Output As #1
- Write #1, RegPlayerCount
- For i = 1 To RegPlayerCount
- Write #1, RegPlayer(i).Id;
- Write #1, RegPlayer(i).SelNum;
- Write #1, RegPlayer(i).SavePlayerCount;
- If RegPlayer(i).SavePlayerCount > 0 Then
- For j = 1 To RegPlayer(i).SavePlayerCount
- Write #1, RegPlayer(i).mPlayer(j).PlayerName;
- Write #1, RegPlayer(i).mPlayer(j).Level;
- Write #1, RegPlayer(i).mPlayer(j).Job;
- If j = RegPlayer(i).SavePlayerCount Then
- Write #1, RegPlayer(i).mPlayer(j).Sex
- Else
- Write #1, RegPlayer(i).mPlayer(j).Sex;
- End If
- Next
- End If
- Next
- Close #1
- mStart = False
- End Sub
- Private Sub mLoadMonGen_Click()
- LoadMonGen
- FrmMain.Text.Text = "重新加载刷怪配置成功..." & vbCrLf
- End Sub
- Private Sub mLoadNpc_Click()
- Dim i As Integer, j As Integer
- LoadNPCInfo
- For i = 1 To playercount
- If Player(i).Connected = True Then
- FrmMain.Server(i).SendData MAPNPCCOUNTINFO & KONGDATA & NpcCount & NETKONGDATA
- For j = 1 To UBound(NPCInfo)
- FrmMain.Server(i).SendData MAPNPCINFO & KONGDATA & j & KONGDATA & NPCInfo(j).X & KONGDATA & NPCInfo(j).Y & KONGDATA & NPCInfo(j).Name_名称 & KONGDATA & NPCInfo(j).Image & NETKONGDATA
- Next
- End If
- Next
- FrmMain.Text.Text = FrmMain.Text.Text & "重新加载NPC数据成功......" & vbCrLf
- End Sub
- Private Sub mONServer_Click()
- FrmMain.Show
- End Sub
- Private Sub mVideoGameFrm_Click()
- FrmMain.Show
- End Sub