⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmbattle.frm

📁 Title:Newlegacy RPG Game Description:This is a VB RPG Game.Just use Standard VB Objests.No use Pain
💻 FRM
📖 第 1 页 / 共 5 页
字号:
If g > lblpower Then
g = lblpower
End If
End Sub


Private Sub lblGod_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblatt.BackColor = vbBlack
lblfire.BackColor = vbBlack
lbldemi.BackColor = vbBlack
lblso.BackColor = vbBlack
lblGod.BackColor = &H808080
End Sub

Private Sub lblheronam_Click()
mp = mp + 4000
power = power + 4000
life = life + 4000
defense = defense + 300
End Sub

Private Sub lblrun_Click()
On Error Resume Next
If beach = True Then
frmbattle.MMControl1.Command = "Close"
frmstat.MMControl1.Command = "Close"
frmstat.MMControl1.FileName = (App.Path & "\i.mid")
frmstat.MMControl1.Command = "Open"
frmstat.MMControl1.Command = "Play"
End If
If frmplain.imgsup.Visible = False And beach = False Then
frmbattle.MMControl1.Command = "Close"
frmstat.MMControl1.Command = "Close"
frmstat.MMControl1.FileName = (App.Path & "\h.mid")
frmstat.MMControl1.Command = "Open"
frmstat.MMControl1.Command = "Play"
End If
If frmplain.imgsup.Visible = True Then
frmbattle.MMControl1.Command = "Close"
frmstat.MMControl1.Command = "Close"
frmstat.MMControl1.FileName = (App.Path & "\frog.mid")
frmstat.MMControl1.Command = "Open"
frmstat.MMControl1.Command = "Play"
End If
j = 0
s = 0
lblist.Visible = False
lblatt.Visible = False
lblfire.Visible = False
lblGod.Visible = False
lbldemi.Visible = False
Line9.Visible = False
Line10.Visible = False
Line11.Visible = False
Line12.Visible = False
If frmntown.imgfl.Visible = False And beach = False Then
Unload frmbattle
frmbeach.Show
frmstat.Show
frmbeach.SetFocus
End If
If beach = True Then
Unload frmbattle
frmntown2.Show
frmstat.Show
frmntown2.SetFocus
End If
If frmplain.imgsup.Visible = False And frmntown.imgfl.Visible = True Then
Unload frmbattle
frmntown.Show
frmstat.Show
frmntown.SetFocus
End If
If frmrpg.imgdrag.Visible = False And frmplain.imgsup.Visible = True Then
Unload frmbattle
frmplain.Show
frmstat.Show
frmplain.SetFocus
End If
If frmrpg.imgdrag.Visible = True And sam1 = False Then
Unload frmbattle
frmrpg.Show
frmstat.Show
frmrpg.SetFocus
End If
End Sub

Private Sub lblrun_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblrun.BackColor = &H808080
lblattack.BackColor = vbBlack
End Sub

Private Sub lblso_Click()
If mp < 350 Then
MsgBox "Not Enough Mp"
Else
tmrson.Enabled = True
g = Int(lblpower * 2)
lbldam.Caption = g
mp = mp - 350
lblmp = mp
End If
End Sub

Private Sub lblso_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblatt.BackColor = vbBlack
lblfire.BackColor = vbBlack
lbldemi.BackColor = vbBlack
lblGod.BackColor = vbBlack
lblso.BackColor = &H808080
End Sub

Private Sub lbluse_Click()
tmrover.Enabled = True
lblpower = lblpower + 9000
lo.X2 = 1440
ov = 0
End Sub

Private Sub timergo_Timer()
j = j + 1
j1 = j1 + 1
If j = 6 Then j = 0
imgo1.Visible = True
imgo1.Picture = imgod(j).Picture
If j1 = 6 Then
timergo.Enabled = False
imgo1.Visible = False
j1 = 0
j = 0
End If
End Sub

Private Sub tmrbasic_Timer()
Randomize
lbldemi.Enabled = False
lblatt.Enabled = False
lblfire.Enabled = False
lblso.Enabled = False
lblGod.Enabled = False
basic = basic + 1
If basic = 1 Then
imgfx.Visible = True
imgfx2(0).Visible = False
End If
If basic = 2 Then
imgfx.Visible = False
End If
If basic = 3 Then
tmrbasic.Interval = 40
imgfx2(0).Picture = imgsl(s).Picture
imgfx2(0).Visible = True
s = s + 1
End If
If basic = 4 Then
imgfx2(0).Picture = imgsl(s).Picture
s = s + 1
End If
If basic = 5 Then
imgfx2(0).Picture = imgsl(s).Picture
tmrbasic.Interval = 200
End If
If basic = 6 Then
tmrd.Enabled = True
End If
If basic = 8 Then
s = 0
lbldam.Caption = g
lblfoel = lblfoel - g
imgfx2(0).Visible = False
basic = 0
tmrbasic.Enabled = False
tmrfoe.Enabled = True
End If
If lblfoel <= 0 Then
s = 0
lblfoel = 0
If boss = True Then
imgfoe.Picture = imgbdead.Picture
End If
tmrfoe.Enabled = False
lblrun.Enabled = False
lo.X2 = lo.X2 + 100
If lo.X2 >= 2520 Then
lo.X2 = 2520
End If
cmdcon.Enabled = True
lblatt.Enabled = False
lbldemi.Enabled = False
lblattack.Enabled = False
lblkill.Visible = True
lblmon.Visible = True
lblexp.Visible = True
lblfire.Enabled = False
End If
End Sub

Private Sub tmrblue_Timer()
'3120
Randomize
lblatt.Enabled = False
lblfire.Enabled = False
lbldemi.Enabled = False
lblGod.Enabled = False
lblso.Enabled = False
If imgfire1.Left <= 3120 Then
imgfire1.Visible = True
wi = wi + 1
If wi <= 1 Then
imghero.Picture = imgsh.Picture
End If
If tmrover.Enabled = False Then
If wi >= 2 Then
imghero.Picture = imgo.Picture
End If
End If
imgfire1.Left = imgfire1.Left + 200
ElseIf fire <= 6 And imgfire1.Left >= 3120 Then
tmrblue.Interval = 200
fire = fire + 1
imgfire1.Visible = False
imgfire.Picture = imgfire2(num).Picture
num = num + 1
imgfire.Visible = True
End If
If fire = 7 Then
tmrd.Enabled = True
End If
If fire >= 10 Then
num = 0
fire = 0
wi = 0
lbldam.Caption = g
lblfoel = lblfoel - g
imgfire1.Left = 360
imgfire1.Visible = False
imgfire.Visible = False
tmrblue.Enabled = False
tmrfoe.Enabled = True
End If
If lblfoel <= 0 Then
lblfoel = 0
If boss = True Then
imgfoe.Picture = imgbdead.Picture
End If
tmrfoe.Enabled = False
lblkill.Visible = True
lblmon.Visible = True
lblexp.Visible = True
lblrun.Enabled = False
lo.X2 = lo.X2 + 100
'2520
If lo.X2 >= 2520 Then
lo.X2 = 2520
End If
cmdcon.Enabled = True
lblatt.Enabled = False
lbldemi.Enabled = False
lblattack.Enabled = False
lblfire.Enabled = False
End If
End Sub


Private Sub tmrbo_Timer()
bos = bos + 1
If bos >= 3 Then
imgfoe.Picture = imgp(0).Picture
tmrbo.Enabled = False
End If
If bos <= 3 Then
imgfoe.Picture = imgp(bos).Picture
End If
End Sub

Private Sub tmrco_Timer()
'2520
lbluse.ForeColor = RGB(255 * Rnd, 255 * Rnd, 255 * Rnd)
If lo.X2 >= 2520 Then
lbluse.Visible = True
Else
lbluse.Visible = False
End If
End Sub

Private Sub tmrd_Timer()
d = d + 1
lbldam.Visible = True
lbldam.Top = lbldam.Top - 10
If d = 20 Then
If dem = True Then
If lblfoel >= 1 Then
tmrfoe.Enabled = True
dem = False
End If
End If
lbldam.Visible = False
fire = 10
tmrd.Enabled = False
lbldam.Caption = "0"
lbldam.Top = 720
d = 0
End If
End Sub

Private Sub tmrd2_Timer()
d = d + 1
lbldam1.Visible = True
lbldam1.Top = lbldam1.Top - 10
If d = 20 Then
lbldam1.Visible = False
tmrd2.Enabled = False
lbldam1.Caption = "0"
lbldam1.Top = 840
d = 0
End If
End Sub

Private Sub tmrfoe_Timer()
lblist.Visible = False
lblatt.Visible = False
lblGod.Visible = False
lbldemi.Visible = False
lblfire.Visible = False
lblso.Visible = False
Line9.Visible = False
Line10.Visible = False
Line11.Visible = False
Line12.Visible = False
foe = foe + 1
If foe = 1 Then
sh = (Int(lblfoep * Rnd) + 1) - (Int(lbldefense * Rnd))
If sh <= 0 Then
sh = 1
End If
If talon = True Then
sh = sh + Int(lblpower / 3)
End If
lbldam1.Caption = sh
If boss = False Then
imgfxf.Visible = True
End If
lbllife = lbllife - sh
If lbllife <= 0 Then
imghero.Stretch = False
lbllife = 0
imghero.Picture = imgdead.Picture
imghero.Top = imghero.Top + 200
lblkill1.Visible = True
cmdover.Visible = True
lblrun.Enabled = False
lblattack.Enabled = False
cmdcon.Enabled = False
tmrfoe.Enabled = False
End If
End If
If boss = True Then
'bos = 0
tmrbo.Enabled = True
End If
If foe = 3 Then
imgfxf.Visible = False
tmrd2.Enabled = True
End If
If foe >= 5 Then
lbldemi.Enabled = True
lblatt.Enabled = True
lblfire.Enabled = True
lblso.Enabled = True
foe = 0
tmrfoe.Enabled = False
End If
End Sub


Private Sub tmrover_Timer()
ov = ov + 1
If ov = 3 Then ov = 0
imghero.Picture = imgover(ov).Picture
End Sub

Private Sub tmrson_Timer()
Dim son2 As Integer
On Error Resume Next
lbldemi.Enabled = False
lblatt.Enabled = False
lblfire.Enabled = False
lblso.Enabled = False
lblGod.Enabled = False
If sonic <= 6 Then
imgbo(sonic - 1).Visible = False
imgbo(sonic).Visible = True
sonic = sonic + 1
End If
If sonic > 6 Then
sonic = 0
tmrd.Enabled = True
lbldam.Caption = g
lblfoel = lblfoel - g
tmrfoe.Enabled = True
tmrson.Enabled = False
End If
If lblfoel <= 0 Then
lblfoel = 0
If boss = True Then
imgfoe.Picture = imgbdead.Picture
End If
tmrfoe.Enabled = False
lblrun.Enabled = False
tmrson.Enabled = False
lo.X2 = lo.X2 + 400
If lo.X2 >= 2520 Then
lo.X2 = 2520
tmrson.Enabled = False
End If
cmdcon.Enabled = True
lblatt.Enabled = False
lbldemi.Enabled = False
lblattack.Enabled = False
lblkill.Visible = True
lblmon.Visible = True
lblexp.Visible = True
lblfire.Enabled = False
End If
End Sub

Private Sub tmrtor_Timer()
j = j + 1
j1 = j1 + 1
If j = 9 Then j = 0
imgo2.Visible = True
imgo2.Picture = imgtor(j).Picture
If j = 2 Then
tmrtor.Interval = 500
End If
If j = 5 Then
tmrtor.Interval = 100
End If
If j1 = 9 Then
lblfoel.Caption = lblfoel.Caption - g
lbldam = g
If lblfoel <= 0 Then
tmrfoe.Enabled = False
If boss = True Then
imgfoe.Picture = imgbdead.Picture
End If
lblfoel.Caption = "0"
tmrfoe.Enabled = False
lblrun.Enabled = False
lo.X2 = lo.X2 + 100
If lo.X2 >= 2520 Then
lo.X2 = 2520
End If
cmdcon.Enabled = True
lblatt.Enabled = False
lbldemi.Enabled = False
lblso.Enabled = False
lblattack.Enabled = False
lblkill.Visible = True
lblmon.Visible = True
lblexp.Visible = True
lblfire.Enabled = False
End If
tmrd.Enabled = True
tmrtor.Enabled = False
imgo2.Visible = False
If lblfoel.Caption >= 1 Then
tmrfoe.Enabled = True
End If
j1 = 0
j = 0
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -