大富翁源代码.doc_第1页
大富翁源代码.doc_第2页
大富翁源代码.doc_第3页
大富翁源代码.doc_第4页
大富翁源代码.doc_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

大富翁源代码.txt有没有人像我一样在听到某些歌的时候会忽然想到自己的往事_如果我能回到从前,我会选择不认识你。不是我后悔,是我不能面对没有你的结局。Dim a As Integer, p1 As String, p2 As String, zk As Boolean, kj As Boolean, jz As BooleanDim gongcun1 As Boolean, gongcun2 As Boolean, gongcun3 As Boolean, fakuan As BooleanDim b As Integer, e As Integer, c As Integer, s As IntegerDim land As Integer, police As Integer, shop As Integer, rest As IntegerDim money As Integer, net As Integer, good As Integer, jianyu1 As Integer, jianyu2 As Integer, jianyu3 As Integer, caipiao As IntegerDim suiji As Integer, suiji100 As Integer, suim As IntegerPrivate Sub Command1_Click()p1 = InputBox$(玩家一选择:, 人物选择)p2 = InputBox$(玩家二选择:, 人物选择)Select Case p1 Case Is = 章家骐 Image1(0).Visible = True: Image4(0).Visible = True: Case Is = 科比 Image2(0).Visible = True: Image4(1).Visible = True: Case Is = 打酱油的 Image3(0).Visible = True: Image4(2).Visible = True: Label4(0).Left = 14400: Label4(0).Top = 6720: Label4(1).Left = 14400: Label4(1).Top = 2880End SelectSelect Case p2 Case Is = 章家骐 Image1(0).Visible = True: Image5(0).Visible = True: Label4(0).Left = 14400: Label4(0).Top = 6720: Label4(1).Left = 14400: Label4(1).Top = 2880 Case Is = 科比 Image2(0).Visible = True: Image5(1).Visible = True Case Is = 打酱油的 Image3(0).Visible = True: Image5(2).Visible = TrueEnd SelectIf Image1(0).Visible = True And Image2(0).Visible = True Then gongcun1 = TrueElseIf Image2(0).Visible = True And Image3(0).Visible = True Then gongcun2 = TrueElseIf Image3(0).Visible = True And Image1(0).Visible = True Then gongcun3 = TrueEnd IfCommand2.Visible = TrueCommand1.Visible = FalseEnd SubPrivate Sub Command2_Click()Label1.Visible = Trueagain:Randomizepolice = Int(Rnd * 13) + 1shop = Int(Rnd * 19) + 1caipiao = Int(Rnd * 19) + 1rest = Int(Rnd * 19) + 1 Label2(caipiao).BackColor = &HC0C000: Label2(caipiao).Caption = 随机 Label2(shop).BackColor = vbRed: Label2(shop).Caption = 商店 Label2(police).BackColor = vbBlack: Label2(police).Caption = 警局: Label2(police).ForeColor = vbWhite Label2(rest).BackColor = &H8000000F: Label2(rest).Caption = 休息Command1.Visible = FalseCommand2.Visible = FalseIf gongcun1 = True ThenEnd SubPrivate Sub Form_Load()Command2.Visible = FalseLabel6.Visible = FalseFor i = 0 To 19 Image1(i).Visible = False Image2(i).Visible = False Image3(i).Visible = False Label2(i).BackColor = vbGreen Label2(i).Caption = 空地 Label2(i).FontSize = 30Next iLabel2(0).Caption = 休息站Timer1.Enabled = FalseTimer1.Interval = 10Timer2.Enabled = FalseTimer3.Enabled = FalseLabel1.Visible = Falses = 0: c = 0: jianyu1 = 0: jianyu2 = 0: jianyu3 = 0For i = 0 To 2 Image4(i).Visible = False Image5(i).Visible = False Image6(i).Visible = FalseNext iEnd SubPrivate Sub Label1_Click()If Image1(0).Visible = True And Image2(0).Visible = True Then gongcun1 = TrueElseIf Image2(0).Visible = True And Image3(0).Visible = True Then gongcun2 = TrueElseIf Image3(0).Visible = True And Image1(0).Visible = True Then gongcun3 = TrueEnd IfTimer1.Enabled = Not (Timer1.Enabled) If Timer1.Enabled = False ThenIf Image6(0).Visible = True Then jianyu1 = jianyu1 + 1If Image6(1).Visible = True Then jianyu2 = jianyu2 + 1If Image6(2).Visible = True Then jianyu3 = jianyu3 + 1 If gongcun1 = True Then zjq kobe If zk = False Then b = s + a For i = 0 To 19 If Image1(i).Visible = True Then Image1(i).Visible = False If b 5 Then b = police + a End If End If Next i zk = True Else e = c + a For i = 0 To 19 If Image2(i).Visible = True Then Image2(i).Visible = False If e 5 Then e = police + a End If End If Next i zk = False End Ifkobe jiangyou ElseIf gongcun2 = True Then If kj = False Then b = s + a For i = 0 To 19 If Image3(i).Visible = True Then Image3(i).Visible = False If b 5 Then b = police + a End If End If Next i kj = True Else e = c + a For i = 0 To 19 If Image2(i).Visible = True Then Image2(i).Visible = False If e 5 Then e = police + a End If End If Next i kj = False End Ifjiangyou zjqElseIf gongcun3 = True Then If jz = False Then b = s + a For i = 0 To 19 If Image1(i).Visible = True Then Image1(i).Visible = False If b 5 Then b = police + a End If End If Next i jz = True Else e = c + a For i = 0 To 19 If Image3(i).Visible = True Then Image3(i).Visible = False If e 5 Then e = police + a End If End If Next i jz = False End If End If 游戏功能 罚款项目Timer2.Enabled = True End IfEnd SubPrivate Sub Label6_Click()Label1.Visible = FalseTimer3.Enabled = Not (Timer3.Enabled)If Timer3.Enabled = False Then 随机suim = MsgBox(增加金钱 & suiji100, , 随机) If suim = 1 Then If gongcun1 = True Then If zk = True Then Label4(0).Caption = Label4(0).Caption + suiji100 Else Label4(1).Caption = Label4(1).Caption + suiji100 End If ElseIf gongcun2 = True Then If kj = False Then Label4(0).Caption = Label4(0).Caption + suiji100 Else Label4(1).Caption = Label4(1).Caption + suiji100 End If ElseIf gongcun3 = True Then If jz = True Then Label4(0).Caption = Label4(0).Caption + suiji100 Else Label4(1).Caption = Label4(1).Caption + suiji100 End IfEnd IfEnd IfLabel6.Caption = Label6.Visible = FalseLabel1.Visible = TrueEnd If End SubPrivate Sub Label8_Click() 返回For r = 0 To 19 Image1(r).Visible = False: Image2(r).Visible = False: Image3(r).Visible = False Label2(r).BackColor = vbGreen: Label2(r).FontSize = 30: Label2(r).Caption = 空地: Label2(r).ForeColor = vbBlack Next r For r = 0 To 1 Label4(r).Caption = 12000 Next r For r = 0 To 2 Image4(r).Visible = False Image5(r).Visible = False Image6(r).Visible = False Next r Command1.Visible = True Label1.Caption = Form4.Visible = FalseForm2.Visible = TrueEnd SubPrivate Sub Label9_Click()EndEnd SubPrivate Sub Timer1_Timer()Randomizea = Int(Rnd * 6) + 1Label1.Caption = aEnd SubPrivate Sub Timer2_Timer() 出监狱If jianyu1 5 Then Image1(police + a).Visible = True: Image6(0).Visible = False: jianyu1 = 0If jianyu2 5 Then Image2(police + a).Visible = True: Image6(1).Visible = False: jianyu2 = 0If jianyu3 5 Then Image3(police + a).Visible = True: Image6(2).Visible = False: jianyu3 = 0 If gongcun1 = True ThenIf zk = True Then For i = 1 To 19 If Image1(i).Visible = True Then If Label2(i).BackColor = vbYellow Or Label2(i).BackColor = vbWhite Then 闯民宅 money = MsgBox(私闯民宅- -罚款1000, vbOKOnly, 别人的家) 主人金钱 Label4(0).Caption = Label4(0).Caption - 1000 Label4(1).Caption = Label4(1).Caption + 1000 ElseIf Label2(i).BackColor = vbBlack Then 警局 net = MsgBox(进网吧玩章家骐的游戏,被带到警察局, , 警局) 时间 Image6(0).Visible = True: Image1(police).Visible = False: jianyu = 0 ElseIf Label2(i).BackColor = vbRed Then 商店 good = MsgBox(去商店买东西花费500, , 黑店) Label4(0).Caption = Label4(0).Caption - 500 ElseIf Label2(i).BackColor = &HC0C000 Then Label6.Visible = True 出现随机 End If For j = 1 To 19 土地买卖 If Image1(j).Visible = True Then If Label2(j).BackColor = vbGreen Then land = MsgBox(您要买下这块地吗?金额3000, vbOKCancel, 土地买卖) If land = 1 Then If Image1(j).Visible = True Then Label2(j).BackColor = vbBlue: Label2(j).Caption = 章家骐温馨的小屋: Label2(j).FontSize = 25: Label4(0).Caption = Label4(0).Caption - 3000 If Image2(j).Visible = True Then Label2(j).BackColor = vbYellow: Label2(j).Caption = 科比的别墅: Label2(j).FontSize = 25: Label4(0).Caption = Label4(0).Caption - 3000 If Image3(j).Visible = True Then Label2(j).BackColor = vbWhite: Label2(j).Caption = 酱油屋: Label2(j).FontSize = 30: Label4(0).Caption = Label4(0).Caption - 3000 End If End If End If Next j End If Next iElse For i = 1 To 19 If Image2(i).Visible = True Then If Label2(i).BackColor = vbBlue Or Label2(i).BackColor = vbWhite Then money = MsgBox(私闯民宅- -罚款1000, vbOKOnly, 别人的家) 主人金钱 Label4(1).Caption = Label4(1).Caption - 1000 Label4(0).Caption = Label4(0).Caption + 1000 ElseIf Label2(i).BackColor = vbBlack Then net = MsgBox(进网吧玩章家骐的游戏,被带到警察局, , 警局) 时间 Image6(1).Visible = True: Image2(i).Visible = False ElseIf Label2(i).BackColor = vbRed Then good = MsgBox(去商店买东西花费500, , 黑店) Label4(1).Caption = Label4(1).Caption - 500 ElseIf Label2(i).BackColor = &HC0C000 Then Label6.Visible = True: 随机 If suim = 1 Then Label4(1).Caption = Label4(1).Caption - suiji100 End If For j = 1 To 19 土地买卖 If Image2(j).Visible = True Then If Label2(j).BackColor = vbGreen Then land = MsgBox(您要买下这块地吗?金额3000, vbOKCancel, 土地买卖) If land = 1 Then If Image1(j).Visible = True Then Label2(j).BackColor = vbBlue: Label2(j).Caption = 章家骐温馨的小屋: Label2(j).FontSize = 25: Label4(1).Caption = Label4(1).Caption - 3000 If Image2(j).Visible = True Then Label2(j).BackColor = vbYellow: Label2(j).Caption = 科比的别墅: Label2(j).FontSize = 25: Label4(1).Caption = Label4(1).Caption - 3000 If Image3(j).Visible = True Then Label2(j).BackColor = vbWhite: Label2(j).Caption = 酱油屋: Label2(j).FontSize = 30: Label4(1).Caption = Label4(1).Caption - 3000 End If End If End If Next j End If Next i End If共存2ElseIf gongcun2 = True ThenIf kj = False Then For i = 1 To 19 If Image2(i).Visible = True Then If Label2(i).BackColor = vbWhite Then 闯民宅 money = MsgBox(私闯民宅- -罚款1000, vbOKOnly, 别人的家) 主人金钱 Label4(0).Caption = Label4(0).Caption - 1000 Label4(1).Caption = Label4(1).Caption + 1000 ElseIf Label2(i).BackColor = vbBlack Then 警局 net = MsgBox(进网吧玩章家骐的游戏,被带到警察局, , 警局) 时间 Image6(1).Visible = True: Image2(police).Visible = False: jianyu = 0 ElseIf Label2(i).BackColor = vbRed Then 商店 good = MsgBox(去商店买东西花费500, , 黑店) Label4(0).Caption = Label4(0).Caption - 500 ElseIf Label2(i).BackColor = &HC0C000 Then Label6.Visible = True 出现随机 End If For j = 1 To 19 土地买卖 If Image2(j).Visible = True Then If Label2(j).BackColor = vbGreen Then land = MsgBox(您要买下这块地吗?金额3000, vbOKCancel, 土地买卖) If land = 1 Then If Image1(j).Visible = True Then Label2(j).BackColor = vbBlue: Label2(j).Caption = 章家骐温馨的小屋: Label2(j).FontSize = 25: Label4(0).Caption = Label4(0).Caption - 3000 If Image2(j).Visible = True Then Label2(j).BackColor = vbYellow: Label2(j).Caption = 科比的别墅: Label2(j).FontSize = 25: Label4(0).Caption = Label4(0).Caption - 3000 If Image3(j).Visible = True Then Label2(j).BackColor = vbWhite: Label2(j).Caption = 酱油屋: Label2(j).FontSize = 30: Label4(0).Caption = Label4(0).Caption - 3000 End If End If End If Next j End If Next iElse For i = 1 To 19 If Image3(i).Visible = True Then If Label2(i).BackColor = vbYellow Then money = MsgBox(私闯民宅- -罚款1000, vbOKOnly, 别人的家) 主人金钱 Label4(1).Caption = Label4(1).Caption - 1000 Label4(0).Caption = Label4(0).Caption + 1000 ElseIf Label2(i).BackColor = vbBlack Then net = MsgBox(进网吧玩章家骐的游戏,被带到警察局, , 警局) 时间 Image6(2).Visible = True: Image3(i).Visible = False ElseIf Label2(i).BackColor = vbRed Then good = MsgBox(去商店买东西花费500, , 黑店) Label4(1).Caption = Label4(1).Caption - 500 ElseIf Label2(i).BackColor = &HC0C000 Then Label6.Visible = True: 随机 If suim = 1 Then Label4(1).Caption = Label4(1).Caption - suiji100 End If For j = 1 To 19 土地买卖 If Image3(j).Visible = True Then If Label2(j).BackColor = vbGreen Then land = MsgBox(您要买下这块地吗?金额3000, vbOKCancel, 土地买卖) If land = 1 Then If Image1(j).Visible = True Then Label2(j).BackColor = vbBlue: Label2(j).Caption = 章家骐温馨的小屋: Label2(j).FontSize = 25: Label4(1).Caption = Label4(1).Caption - 3000 If Image2(j).Visible = True Then Label2(j).BackColor = vbYellow: Label2(j).Caption = 科比的别墅: Label2(j).FontSize = 25: Label4(1).Caption = Label4(1).Caption - 3000 If Image3(j).Visible = True Then Label2(j).BackColor = vbWhite: Label2(j).Caption = 酱油屋: Label2(j).FontSize = 30: Label4(1).Caption = Label4(1).Caption - 3000 End If End If End If Next j End If Next i End If 共存3ElseIf gongcun3 = True ThenIf jz = True Then For i = 1 To 19 If Image1(i).Visible = True Then If Label2(i).BackColor = vbWhite Then 闯民宅 money = MsgBox(私闯民宅- -罚款1000, vbOKOnly, 别人的家) 主人金钱 Label4(0).Caption = Label4(0).Caption - 1000 Label4(1).Caption = Label4(1).Caption + 1000 ElseIf Label2(i).BackColor = vbBlack Then 警局 net = MsgBox(进网吧玩章家骐的游戏,被带到警察局, , 警局) 时间 Image6(0).Visible = True: Image1(police).Visible = False: jianyu = 0 ElseIf Label2(i).BackColor = vbRed Then 商店 good = MsgBox(去商店买东西花费500, , 黑店) Label4(0).Caption = Label4(0).Caption - 500 ElseIf Label2(i).BackColor = &HC0C000 Then Label6.Visible = True 出现随机 End If For j = 1 To 19 土地买卖 If Image1(j).Visible = True Then If Label2(j).BackColor = vbGreen Then land = MsgBox(您要买下这块地吗?金额3000, vbOKCancel, 土地买卖) If land = 1 Then If Image1(j).Visible = True Then Label2(j).BackColor = vbBlue: Label2(j).Caption = 章家骐温馨的小屋: Label2(j).FontSize = 25: Label4(0).Caption = Label4(0).Caption - 3000 If Image2(j).Visible = True Then Label2(j).BackColor = vbYellow: Label2(j).Caption = 科比的别墅: Label2(j).FontSize = 25: Label4(0).Caption = Label4(0).Caption - 3000 If Image3(j).Visible = True Then Label2(j).BackColor = vbWhite: Label2(j).Caption = 酱油屋: Label2(j).FontSize = 30: Label4(0).Caption = Label4(0).Caption - 3000 End If End If End If Next j End If Next iElse For i = 1 To 19 If Image3(i).Visible = True Then If Label2(i).BackColor = vbBlue Then money = MsgBox(私闯民宅- -罚款1000, vbOKOnly, 别人的家) 主人金钱 Label4(1).Caption = Label4(1).Caption - 1000 Label4(0).Caption = Label4(0).Caption + 1000 ElseIf Label2(i).BackColor = vbBlack Then net = MsgBox(进网吧玩章家骐的游戏,被带到警察局, , 警局) 时间 Image6(2).Visible = True: Image3(i).Visible = Fa

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论