sub attacking() call ptynew if pty<=realpty then ehp=ehp-attack end if showehp=Cstr(ehp) end sub sub eattacking() call eptynew if epty<=erealpty then hp=hp-eattack end if showhp=Cstr(hp) end sub sub fighting0() erealpty=int(Rnd*99+1) if erealpty<25 then erealpty=int(realpty*0.99) end if showerealpty=cstr(erealpty) eattack=int(attack*Rnd) if eattack=0 then eattack=int(attack*0.9) else end if showeattack=Cstr(eattack) ehp=int(hp*Rnd) if ehp=0 then ehp=int(hp*1.1) end if showehp=Cstr(ehp) msgbox "对手实力如下如下:"+hh+"血量="+showehp+hh+"攻击力="+showeattack+hh+"命中率="+showerealpty,64,"剑圣" msgbox "开战!",64,"剑圣" do until hp<=0 or ehp<=0 call attacking call eattacking msgbox "你的血量="+showhp+hh+"对方的血量="+showehp,64,"战斗中" loop if hp<=0 then msgbox "胜败兵家常事,大侠重新来过",64,"失败" money=money-50-showehp*0.2 hp=fullhp else msgbox "在战斗中取胜!",64,"胜利" money=money+50+hp*0.2-ehp*0.2 killing=killing+1 showmoney=Cstr(money) showkilling=Cstr(killing) hp=fullhp Set f=fso.opentextfile("剑圣存档.dat",2,True) f.WriteLine (showlevel) f.writeline (showmoney) '钱数 f.writeline (showattack) '攻击 f.writeline (showfullhp) '血量 f.writeline (showrealpty) '命中率 f.writeline (showkilling) '杀怪数 f.close end if call manu end sub sub shop() msgbox "欢迎来到商店!",64,"商店" shopping=inputbox("请选择购物项目:"+hh+"A:剑 B:衣甲 C: 饰品 D:杂物 ","商店") if shopping="a" then Item=inputbox("请选择购物内容:"+hh+"A: 木剑 攻击+10% 命中率+5% 1300G B:石剑 攻击+15% 命中率+10% 2950G C:铁剑 攻击+20% 命中率+16% 7985G"+hh+"D: 金剑 攻击-70% 命中率+40% 32000G E:钻石剑 攻击+30% 命中率+22% 356400G"+hh+"F:EX咖喱棒 攻击+58% 命中率+40% 生命-45% 购买本武器后有特殊剧情 1001011G ","商店") if Item="a" then if money<weapon1 then msgbox "您钱不够!",64,"商店" else money=money-weapon1 showmoney=Cstr(money) increaseattack=attack*0.1 attack=attack+increaseattack 'mark realpty=realpty+5 showrealpty=Cstr(realpty) showattack=Cstr(attack) end if elseif Item="b" then if money<weapon2 then msgbox "您钱不够!",64,"商店" else money=money-weapon2 showmoney=Cstr(money) attack=20 showattack=Cstr(attack) realpty=50 showrealpty=Cstr(realpty) end if elseif Item="c" then if money<weapon3 then msgbox "您钱不够!",64,"商店" else money=money-weapon3 showmoney=Cstr(money) attack=100 showattack=Cstr(attack) realpty=80 showrealpty=Cstr(realpty) end if end if elseif shopping="b" then Item=inputbox("请选择购物内容:"+hh+"A:钢甲 血量+1000 500$ B:高级护甲 血量+2000 1,000$ C:电镀盔甲 血量+4000 5,000$","商店") if Item="a" then if money<weapon1 then msgbox "您钱不够!",64,"商店" else money=money-weapon1 showmoney=Cstr(money) fullhp=1000 showfullhp=Cstr(fullhp) end if elseif Item="b" then if money<weapon2 then msgbox "您钱不够!",64,"商店" else money=money-weapon2 showmoney=Cstr(money) fullhp=2000 showfullhp=Cstr(fullhp) end if elseif Item="c" then if money<weapon3 then msgbox "您钱不够!",64,"商店" else money=money-weapon3 showmoney=Cstr(money) fullhp=10000 showfullhp=Cstr(fullhp) end if end if end if Set f=fso.opentextfile("剑圣存档.dat",2,True) f.WriteLine (showlevel) f.writeline (showmoney) '钱数 f.writeline (showattack) '攻击 f.writeline (showfullhp) '血量 f.writeline (showrealpty) '命中率 f.writeline (showkilling) '杀怪数 f.Close Set ff=ffso.opentextfile("剑圣银行账户.dat",2,True) ff.writeline (showstored) '存款 ff.writeline (showborrowed) '欠款 ff.close call manu end sub call manu