<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="npc_chat.asp"-->
<!--#include file="../const2.asp"-->
<!--#include file="../wzconfig.asp"-->
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
zhbg_name=Session("zhbg_name")
zhbg_grade=Session("zhbg_grade")
zhbg_jhdj=Session("zhbg_jhdj")
nowinroom=session("nowinroom")
zhbg_roominfo=split(Application("zhbg_room"),";")
chatinfo=split(zhbg_roominfo(nowinroom),"|")
if zhbg_name="" then Response.Redirect "../error.asp?id=440"
http = Request.ServerVariables("HTTP_REFERER") 
if InStr(http,"chat")=0 then 
	Response.Write "<script language=javascript>{alert('对不起，程序拒绝您的操作！！！\n     按确定返回！');}</script>" 
	Response.End 
end if
if Application("zhbg_yjdh")=1 then
zhbg_sid=trim(request.cookies("zhbg")("zhbg_sid")) 
if (zhbg_sid="" or  zhbg_sid<>session.sessionid) and Session("zhbg_grade")<6 then
Response.Write "<script language=javascript>{top.location.href='chaterr.asp?id=003';alert('您一台计算机上了多个帐号，被系统请出！');}</script>"
Response.End 
end if
end if
allhttp=LCase(Request.ServerVariables("ALL_HTTP"))
if Application("zhbg_disproxy")=1 then
if Instr(allhttp,"proxy")<>0 or Instr(allhttp,"http_via")<>0 or Instr(allhttp,"http_pragma")<>0 then 
	Session.Abandon
	Response.Write "<script language=JavaScript>{alert('提示：禁止使用代理！');location.href = 'javascript:history.go(-1)';}</script>"
	response.end
end if
end if
'#####房间处理#####
zhbg_roominfo=split(Application("zhbg_room"),";")
chatinfo=split(zhbg_roominfo(nowinroom),"|")
useronlinename=Application("zhbg_useronlinename"&nowinroom)
if Instr(LCase(useronlinename),LCase(" "&zhbg_name&" "))=0 then 
	Session("zhbg_inthechat")="0" 
	Response.Redirect "chaterr.asp?id=001" 
end if 
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=s & ":" & f & ":" & m
if DateDiff("n",Session("zhbg_savetime"),now())>=15 then
	Response.Write "<script Language=Javascript>parent.f3.location.href='savevalue.asp';</script>"
end if
sj2=n & "-" & y & "-" & r & " " & sj
if DateDiff("s",Session("zhbg_lasttime"),sj2)<2 then
Response.Write "<script language=JavaScript>{alert('有话慢慢说，别噎着哦！');}</script>"
Response.End
end if
t="<font class=t>(" & sj & ")</font>"
'是否被点穴
Application.Lock
if Instr(LCase(application("zhbg_dianxuename")),LCase(zhbg_name))>0 then
dianxue=split(application("zhbg_dianxuename"),";")
dxdx=0
for x=0 to UBound(dianxue)-1
dxname=split(dianxue(x),"|")
if dxname(0)=zhbg_name then
	if DateDiff("s",dxname(1),sj2)<60 then
		Response.Write "<script Language=Javascript>alert('你已被哑穴，不能做任何事啊！还剩" & 60-DateDiff("s",dxname(1),sj2) & "秒自动解开!');</script>"
		erase dianxue
		erase dxname
		response.end
	else
		application("zhbg_dianxuename")=replace(application("zhbg_dianxuename"),dianxue(x)&";","")
		Response.Write "<script Language=Javascript>alert('时间到了，你的哑穴自动解开了!');</script>"
		erase dianxue
		erase dxname
		response.end
	end if
end if
erase dxname
next
erase dianxue
end if
Application.UnLock
towho=Trim(Request.Form("towho"))
says=Trim(Request.Form("sy"))
if Instr("/屏蔽$/发招$/投掷$/下毒$/用卡$",left(says,4))=0 and zhbg_grade<6 then
 if Instr(LCase(application("qzld_pingbi")),LCase(";"&zhbg_name&"|"&towho&";"))>0 then
   Response.Write "<script Language=javascript>alert('您已经把人家屏蔽了，要对人家说话请先把人家从屏蔽名单中删除！');</script>"
  response.end
 elseif Instr(LCase(application("qzld_pingbi")),LCase(";"&towho&"|"&zhbg_name&";"))>0 then
   Response.Write "<script Language=javascript>alert('你的说话对象已经把你屏蔽了，你不能再对人家说话了！');</script>"
  response.end
 end if
end if
'是否暂离
'判断自己说话
if Instr(LCase(application("zhbg_zanli")),LCase("!"&zhbg_name&"!"))>0 and zhbg_grade<9 then
	Response.Write "<script Language=Javascript>alert('您正在“暂离”状态中，请使用“我回来啦”功能解除！');</script>"
	response.end
end if
'判断对方操作
if Instr(LCase(application("zhbg_zanli")),LCase("!"&towho&"!"))>0 and left(says,4)<>"/用卡$" and zhbg_grade<9 then
	zhbg_zanli=split(application("zhbg_zanli"),";")
	for x=0 to UBound(zhbg_zanli)
		dxname=split(zhbg_zanli(x),"|")
	if dxname(0)="!"&towho&"!" then
		Response.Write "<script Language=Javascript>alert('"&towho&"说："&dxname(1)&"');</script>"
		erase dxname
		erase zhbg_zanli
		response.end
	end if
	erase dxname
	next
	erase zhbg_zanli
end if
if towho="" then towho="大家"
if len(towho)>10 then towho=Left(towho,10)
if Not(towho=Application("zhbg_automanname") or towho=Application("figo") or towho="大家" or Instr(useronlinename," "&towho&" ")<>0) then
Response.Write "<script Language=Javascript>alert('“" & towho & "”不在聊天室中，不能对其发言。');parent.f2.document.af.towho.value='大家';parent.f2.document.af.towho.text='大家';parent.m.location.reload();</script>"
Response.end
end if
act=0
towhoway=Request.Form("towhoway")
if towhoway<>1 then towhoway=0
addwordcolor=Request.Form("addwordcolor")
saycolor=Request.Form("saycolor")
addsays=Request.Form("addsays")
'聊天室中发标题的等级72级。
if towho="大家" or towho=zhbg_name then towhoway=0
if instr("," & Application("zhbg_admin") & ",","," & towho & ",")<>0 or towho=Application("zhbg_automanname") or towho=Application("figo") then towhoway=1
if len(says)>150 then says=Left(says,150)
if (says="" or says="//") then Response.End
if InStr(says,"□")<>0 or InStr(says,"&#63736")<>0 then Response.End
says=Replace(says,"&amp;","&")
says=lcase(says)
says=Replace(says,"&amp;","&")
'私聊等级默认为7
says=lcase(says)
says=replace(says,"\","")
if zhbg_grade<9 then
says=replace(says,"&#","")
says=replace(says,"..","")
says=replace(says,"'","\'")
says=replace(says,chr(34),"\"&chr(34))
says=replace(says,chr(32),"")
says=replace(says,"　","")
says=Replace(says,"<"," ")
says=Replace(says,">"," ")
says=Replace(says,"\x3c"," ")
says=Replace(says,"\x3e"," ")
says=Replace(says,"\074"," ")
says=Replace(says,"\74"," ")
says=Replace(says,"\75"," ")
says=Replace(says,"\76"," ")
says=Replace(says,"&lt"," ")
says=Replace(says,"&gt"," ")
says=Replace(says,"\076"," ")
says=Replace(LCase(says),LCase("con"),"f2uck")
says=Replace(LCase(says),LCase("or"),"ｏｒ")
says=Replace(LCase(says),LCase("java"),"f2uck")
says=Replace(LCase(says),LCase("www"),"f2uck")
says=Replace(LCase(says),LCase("org"),"f2uck")
says=Replace(LCase(says),LCase("com"),"f2uck")
says=Replace(LCase(says),LCase("net"),"f2uck")
says=Replace(says,"qq","f2uck")
says=Replace(says,"pp","f2uck")
says=Replace(says,"200.","f2uck")
says=Replace(says,"ＷＷＷ","f2uck")
says=Replace(says,"ｗｗｗ","f2uck")
says=Replace(says,"asp","f2uck")
says=Replace(says,"jh","f2uck")
says=Replace(says,"去了可以当","f2uck")
says=Replace(says,"去了可以作","f2uck")
says=Replace(says,"有一个好国度","f2uck")
says=Replace(says,"加入腾讯","f2uck")
says=Replace(says,"加我qq给你好处","f2uck")
says=Replace(says,"家我qq给你好处","f2uck")
says=Replace(says,"加我q给你好处","f2uck")
says=Replace(says,"家我q给你好处","f2uck")
says=Replace(says,"国度","f2uck")
says=Replace(says,"江胡","f2uck")
says=Replace(says,"我是站长","f2uck")
says=Replace(LCase(says),LCase("http"),"f2uck")
maren=instr(says,"f2uck")
if maren<>0 then
Response.Write "<script Language=Javascript>location.href='autokick.asp';</script>"
Response.end
end if
end if
if zhbg_jhdj<10 then
if InStr(says,"q")<>0 then Response.End
if InStr(says,"Q")<>0 then Response.End
if InStr(says,"ｑ")<>0 then Response.End
if InStr(says,"加我")<>0 then Response.End
end if
'文字秀
Zshow=request("Zshow")
if Zshow="1" then
show=zhbg_Zshow
says=Plus_ChkPicWords(says)
Function Plus_ChkPicWords(strText)
	If IsNull(StrText) Then Exit Function
        StrText=Ucase(StrText)
        StrText=replace(StrText,chr(32),"")
        if left(StrText,5)="[IMG]" then
           Response.Write "<script Language=Javascript>alert('使用贴图请先关闭文字秀功能！');parent.f2.document.af.sytemp.value='';</script>"
           Response.end
        end if
        if len(StrText)>35 then
           Response.Write "<script Language=Javascript>alert('为了国度运行速度，文字秀不得超出35个！');parent.f2.document.af.sytemp.value='';</script>"
           Response.end
        end if
	Dim PicWords,i
	PicWords = Split(show,"|")
	For i = 0 To Ubound(PicWords)
	   StrText = Replace(trim(StrText),PicWords(i),"[img]../picwords/"&picwords(i)&".gif[/img]")
	Next
	Plus_ChkPicWords = StrText
End Function
end if
'文字秀
'是否战斗等级大于18才可以贴图
if zhbg_jhdj>10 and Instr(says," ")=0 and Instr(says,"[img]")<>0 then
if Instr(says,"[img]")<>0 then
if instr(says,"width")<>0 or instr(says,"height")<>0 then Response.End	
gsz=0
Do While Instr(says,"[img]")<>0
says=Replace(says,"[img]","<img src=pic/",1,1)
gsz=gsz+1
Loop
gsy=0
Do While Instr(says,"[/img]")<>0
says=Replace(says,"[/img]",">",1,1)
gsy=gsy+1
Loop
if gsz>gsy then says=says&">"
end if
end if
zj="<a href=javascript:parent.sw('[" & zhbg_name & "]'); target=f2><font color="&addwordcolor&">"& zhbg_name & "</font></a>"
br="<a href=javascript:parent.sw('[" & towho & "]'); target=f2><font color="&addwordcolor&">"& towho & "</font></a>"
if Left(says,2)="//" then
	says=Replace(says,"##",zj,1,3,1)
	says=Replace(says,"%%",br,1,3,1)
	says="<font color=" & sayscolor & ">" & zj & Trim(mid(says,3,len(says)-2)) & "</font>"
	act=1
end if
'删除了原来的表情
addsays=addsays
Session("zhbg_lasttime")=sj2
says=Replace(says,"\","\\")
says=Replace(says,"/","\/")
says=Replace(says,chr(34),"\"&chr(34))
if chatinfo(6)=0 then
'开始随机事件
randomize()
rnd1=int(rnd*300)+1
sayyq=""
npccls=""
'NPC每小时自动发放
if chatinfo(0)="聊天大厅" and Application("zhbg_npc"&nowinroom)="" then
	Application("zhbg_zznpc")="yes"
else
	Application("zhbg_zznpc")="no"
end if
if Application("zhbg_zznpc")="yes" then
	Application("zhbg_zznpc")="no"
	Set conn=Server.CreateObject("ADODB.CONNECTION")
	Set rs=Server.CreateObject("ADODB.RecordSet")
	conn.open Application("zhbg_usermdb")
	rs.open "select * from npc order by id desc",conn,3,3
        sl=rs.recordcount
        randomize()
        npcid=int(rnd*(sl))
        rs.move npcid
        zdnpc_name=rs("n姓名")
        zdnpc_id=rs("id")
        zdnpc_sex=rs("n性别")
        zdnpc_jhtx=rs("n图片")
        zdnpc_nccc=rs("n出场词")
        zdnpc_j=int(sqr(int(rs("n经验")/50)))
        conn.execute  "update npc set n出现率=n出现率+1,n主人='无',n敌人='无',n攻击="&zdnpc_j*100&",n复活时间='"&now()&"',n防御="&zdnpc_j*150&",n武功="&zdnpc_j*800&",n体力="&zdnpc_j*5000&",n内力="&zdnpc_j*150&",n银两="&zdnpc_j*150000&",n攻击时间='"&now()&"' where n姓名='"&zdnpc_name&"'"
        myonline =zdnpc_name& "|" &zdnpc_sex& "|NPC|专杀高手|" &zdnpc_jhtx& "|" &zdnpc_j& "|"&zdnpc_id&"|0|1|"&"正常"
        rs.close
        call addnpc(zdnpc_name)
        sayyq="<bgsound src=readonly/cd.mid loop=1><font color=black>【NPC自动进入】" & zdnpc_name &"</a></font>"&zdnpc_nccc
	npccls="parent.f2.document.af.npc.value='"&Application("zhbg_npc")&"';parent.m.location.reload();"
end if
'NPC每小时自动发放
'NPC每小时自动退出
if Application("zhbg_npc"&nowinroom)<>"" then
  npc_room=split(Application("zhbg_npc"&nowinroom),"|")
  npc_inroom=ubound(npc_room)
  Set conn=Server.CreateObject("ADODB.CONNECTION")
  Set rs=Server.CreateObject("ADODB.RecordSet")
  conn.open Application("zhbg_usermdb")
  for i=0 to npc_inroom-1
	nl1=npc_room(nl)
	nl2=split(nl1,";")
	nl_name=trim(nl2(1))
        sql="select * from npc where n姓名='"&nl_name&"'"
        rs.open sql,conn,1,1
        sj=DateDiff("n",rs("n攻击时间"),now())
        if sj>15 then
	call delnpc(nl_name)
		sayyq= "<bgsound src=wav/gf.wav loop=1><font color=black>【NPC自动退出】</font>NPC人物["&nl_name&"]晃来晃去，没找到好吃的东西，跑了几圈国度，渐渐地消失了..."
		npccls="parent.f2.document.af.npc.value='"&Application("zhbg_npc")&"';parent.m.location.reload();"
        end if
        rs.close
  next
end if
'NPC每小时自动退出
'每小时15分可以发金币
if  f=00 or f=10 then
       	sayyq="<bgsound src=wav/ling.wav loop=5><font size=2 color=red><b>国度自助领取金币系统</b><img src='img/jinbi.gif'>,现在是" & sj & ",大家快点领取啊！！！</font><input type=button value='领取'  onClick=javascript:tongyi"&regjm&".disabled=1;tongyi"&regjm&".disabled=1;window.open('sjfunc/JBLQ.ASP','d') name=tongyi"&regjm&">"
end if
end if
if Minute(time())>50  then
if Application("zhbg_zzfafang1")<>""  then
      zzfff=Application("zhbg_zzfafang1")
       fffdata=split(zzfff,"|")
        ffsl=abs(int(clng(fffdata(0))))
        ffsj=fffdata(1)
       erase fffdata
    end if 
 if DateDiff("s",ffsj,now())<52 then
   sayyq="<br><font color=red size='2'>【自动发放】每小时第29分钟发放武功，请需要的人来拿，时效60秒，不领取的属于自动放弃。</font><input  type=button value='领取武功！' onClick=javascript:zsdzff"&rnd1&".disabled=1;window.open('sjfunc/zdff1.asp','d') name=zsdzff"&rnd1&">"
      Application.Lock
      Application("zhbg_zzfafang1")="1|"&now()
      application("zhbg_zzffjl1")=""
      Application.UnLock
 end if
end if

if Minute(time())>30  then
if Application("zhbg_zzfafang2")<>""  then
      zzfff=Application("zhbg_zzfafang2")
       fffdata=split(zzfff,"|")
        ffsl=abs(int(clng(fffdata(0))))
        ffsj=fffdata(1)
       erase fffdata
    end if 
 if DateDiff("s",ffsj,now())<32 then
   sayyq="<br><font color=red size='2'>【自动发放】每小时第42分钟发放存点，请需要的人来拿，时效60秒，不领取的属于自动放弃。</font><input  type=button value='领取存点！' onClick=javascript:zsdzff"&rnd1&".disabled=1;window.open('sjfunc/zdff2.asp','d') name=zsdzff"&rnd1&">"
      Application.Lock
      Application("zhbg_zzfafang2")="1|"&now()
      application("zhbg_zzffjl2")=""
      Application.UnLock
 end if
end if
if Minute(time())>20  then
if Application("zhbg_zzfafang3")<>""  then
      zzfff=Application("zhbg_zzfafang3")
       fffdata=split(zzfff,"|")
        ffsl=abs(int(clng(fffdata(0))))
        ffsj=fffdata(1)
       erase fffdata
    end if 
 if DateDiff("s",ffsj,now())<22 then
   sayyq="<br><font color=red size='2'>【自动发放】每小时第15分钟发放银两，请需要的人来拿，时效60秒，不领取的属于自动放弃。</font><input  type=button value='点我发财！' onClick=javascript:zsdzff"&rnd3&".disabled=1;window.open('sjfunc/zdff3.asp','d') name=zsdzff"&rnd3&">"
      Application.Lock
      Application("zhbg_zzfafang3")="1|"&now()
      application("zhbg_zzffjl3")=""
      Application.UnLock
 end if
'以下是设置运气
if rnd1=16 then
	chance=array("体力","内力","攻击","防御","武功","银两","魅力","道德","体力","内力","攻击","防御","武功","银两","魅力","道德")
	chancetxtgood=array("遇少林达摩禅师开坛讲法，##体力增加","武当百岁真人张三丰提拨后进，##内力增加","见血河卫悲回重回人间，突有领悟，##攻击增加","在梦里见到嫦娥舞袖，领悟到神妙步法，##防御增加","##喝醉了酒，却意外见到侠客岛赏善罚恶二使见赐腊八粥，武功增加","##正在街上行走，观赏MM，却不料有人硬塞给银两","##正在华山后挖蚯蚓，做梦也想不到会见到传说中的剑侠风清扬，魅力因此而增加","在风波亭北拜谒岳王墓，##道德增加","遇少林达摩禅师开坛讲法，##体力增加","武当百岁真人张三丰提拨后进，##内力增加","见血河卫悲回重回人间，突有领悟，##攻击增加","在梦里见到嫦娥舞袖，领悟到神妙步法，##防御增加","##喝醉了酒，却意外见到侠客岛赏善罚恶二使见赐腊八粥，武功增加","##正在街上行走，观赏MM，却不料有人硬塞给银两","##正在华山后挖蚯蚓，做梦也想不到会见到传说中的剑侠风清扬，魅力因此而增加","在风波亭北拜谒岳王墓，##道德增加")
	chancetxtbad=array("##长时间熬战国度,以致精力不济，走路也摔跤,体力因此而下降了","##在路上见到了一个美丽的小姑娘，顿起不良之心，不料却被阿紫偷偷地化去了内力","##闭关苦练躺尸剑法，却不得要领，攻击只此而减少","可笑##没事想学学荆无命的自残剑法，最后只落得满身伤疤，防御因此而减少","##闲来无事逛了逛翠花楼，结果可想而知，武功下降了","##交友不慎,银两被骗去了","##在练武场认识了薛蟠，大谈武道，魅力因此而减少了","##途见空空儿，苦心拜师学艺，不料功夫没有学到，道德却下降了","##长时间熬战国度,以致精力不济，走路也摔跤,体力因此而下降了","##在路上见到了一个美丽的小姑娘，顿起不良之心，不料却被阿紫偷偷地化去了内力","##闭关苦练躺尸剑法，却不得要领，攻击只此而减少","可笑##没事想学学荆无命的自残剑法，最后只落得满身伤疤，防御因此而减少","##闲来无事逛了逛翠花楼，结果可想而知，武功下降了","##交友不慎,银两被骗去了","##在练武场认识了薛蟠，大谈武道，魅力因此而减少了","##途见空空儿，苦心拜师学艺，不料功夫没有学到，道德却下降了")
	rnd2=int(rnd*400)-100
	if rnd2=16 then
		rndtxt=chancetxtgood(rnd1)&"<font color=#FF8800><b>+"& abs(rnd2) & "</b></font>"
	else
		rnd2=rnd2-1
		rndtxt=chancetxtbad(rnd1)&"<font color=#FF8800><b>-"&abs(rnd2)&"</b></font>"
	end if	
	Set conn=Server.CreateObject("ADODB.CONNECTION")
	conn.open Application("zhbg_usermdb")
	conn.execute "update 用户 set "&chance(rnd1)&"="&chance(rnd1)&"+"&rnd2&" where 姓名='" & zhbg_name &"'"
	conn.close
	set conn=nothing
	zj="<font color="&addwordcolor&">"& zhbg_name & "</font>"
	sayyq="<font color=FF0000>【传闻】"&Replace(rndtxt,"##",zj,1,3,1)&"</font><font class=t>("&time&")</font>"
else
select case rnd1
case 1 
Application("yx8_mhjh_klt1")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<strong>神鹿</strong>来到国度<font color=#0000FF>" & zhbg_name & "</font>吸取神鹿体力"&Application("yx8_mhjh_klt1")*50&"</font><bgsound src=wav/Ye150.wav loop=1>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力+"&Application("yx8_mhjh_klt1")*50&" where 姓名='" & zhbg_name & "'")
case 2
Application("yx8_mhjh_klt6")=r
	sayyq="<font color=red>【运气】</font><font color=red>一股热浪突袭国度，<strong>火龙</strong>闯入一群弱女子当中，见人就咬，<font color=#0000FF>" & zhbg_name & "</font>见义勇为,被咬伤体力"&Application("yx8_mhjh_klt6")*10&"点！</font><bgsound src=wav/Ye150.wav loop=1>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力-"&Application("yx8_mhjh_klt6")*10&" where 姓名='" & zhbg_name & "'")
case 3
Application("yx8_mhjh_klt3")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只庞大的恐怖飞兽闯进国度，杀伤<font color=blue>" & zhbg_name & "</font>体力"&Application("yx8_mhjh_klt3")*20&"！</font><bgsound src=wav/Ye150.wav loop=1>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力-"&Application("yx8_mhjh_klt3")*20&" where 姓名='" & zhbg_name & "'")
case 4
Application("yx8_mhjh_klt27")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>超级肯德鸭</font>闯进国度,咬伤<font color=blue>" & zhbg_name & "</font>体力"&Application("yx8_mhjh_klt27")*20&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力-"&Application("yx8_mhjh_klt27")*20&" where 姓名='" & zhbg_name & "'")
case 5
Application("yx8_mhjh_klt4")=r
	sayyq="<font color=red>【运气】</font><font color=red>聊天室突然一阵震荡，一只巨大的<strong>尸王</strong>蹒跚而来，吸取<font color=#0000FF>" & zhbg_name & "</font>内力"&Application("yx8_mhjh_klt4")*10&"！</font><bgsound src=wav/Ye150.wav loop=1>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 内力=内力-"&Application("yx8_mhjh_klt4")*10&" where 姓名='" & zhbg_name & "'")
case 6
Application("yx8_mhjh_klt4")=r
	sayyq="<font color=red>【运气】</font><font color=red>一阵祥和的风儿吹来，一只修炼千年的<strong>神灯</strong>翩然而至，给<font color=#0000FF>" & zhbg_name & "</font>增加积分"&Application("yx8_mhjh_klt4")*10&"！</font><bgsound src=wav/Ye150.wav loop=1>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set allvalue=allvalue+"&Application("yx8_mhjh_klt4")*10&" where 姓名='" & zhbg_name & "'")
case 7
Application("yx8_mhjh_klt6")=r
	sayyq="<font color=red>【运气】</font><font color=red>一股凄厉的寒风横扫国度，<strong>寒冰卡比</strong>横行肆虐，大侠<font color=#0000FF>" & zhbg_name & "</font>杀伤他增加"&Application("yx8_mhjh_klt6")*10&"点防御！</font>"
	conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 防御=防御+"&Application("yx8_mhjh_klt6")*10&" where 姓名='" & zhbg_name & "'")
case 8
	jstl=int(rnd*30)
		Application.Lock
		Application("zhbg_kl")=jstl
	Application.UnLock
	abc="<a href='fafang/DABIAN.ASP?tl="&Application("zhbg_kl")&"' target='d'><img src='img/ying1.gif' border='0'></a>"
    fafang="<bgsound src=wav/niao.wav loop=2><font color=red>【消息】</font>一只<strong>怪鸟</strong>从冥王星飞临国度聊天室，太空鸟啊，一定会有好东西的，大家快打啊!怪鸟体力"&jstl&"<br><marquee width=100%  scrollamount=38>"&abc&"</marquee>"
case 9
	jstl=int(rnd*30)
		Application.Lock
		Application("zhbg_kl")=jstl
	Application.UnLock
	abc="<a href='fafang/wn.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/wn.GIF' border='0'></a>"
	fafang="<bgsound src=wav/tw.wav loop=2><font color=red>【消息】国度为女孩子们带来了最帅的领舞先生，举起你们的双手“摇起来~~~~~~”，舞男体力："&jstl&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 10
Application("yx8_mhjh_klt8")=r
	sayyq="<font color=red>【运气】</font><font color=red>梦凡在莫塔秘洞苦心修炼，一股剑气伤了自己<font color=#0000FF>" & zhbg_name & "</font>帮他疗伤,法力增加"&Application("yx8_mhjh_klt8")*10&"点！</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 法力=法力+"&Application("yx8_mhjh_klt8")*10&" where 姓名='" & zhbg_name & "'")
case 11
		jstl=int(rnd*10000)
                nl=int(jstl/4)
                wg=int(jstl/3)
		Application.Lock
		Application("zhbg_kl")=jstl
		Application.UnLock
		abc="<a href='fafang/ws.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/bt.GIF' border='0'></a>"
		sayyq="<font color=red>哇！【非凡国度】来了一个武士，要找大家比武。武士体力："&jstl&",内力："&nl&"，武功："&wg&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 12
		jstl=int(rnd*10000)+1000
		Application.Lock
		Application("zhbg_kl")=jstl
		Application.UnLock
		abc="<a href='fafang/kl.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/cins.GIF' border='0' width='60' height='80'></a>"
		sayyq="<font color=red>突然间阴风陈陈……“僵尸呀！”一女子尖叫，一头僵尸闯进聊天室，僵尸体力：+"&jstl&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 13
Application("yx8_mhjh_klt11")=r
	sayyq="<font color=red>【运气】</font><font color=red>一只百年不遇的国度之宝梦精灵突然出现在聊天室内，送给<font color=#0000FF>" & zhbg_name & "</font>体力"&Application("yx8_mhjh_klt11")*40&"点！</font><bgsound src=wav/Ye150.wav loop=1>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力+"&Application("yx8_mhjh_klt11")*40&" where 姓名='" & zhbg_name & "'")
case 14
Application("yx8_mhjh_klt12")=r
	sayyq="<font color=red>【运气】</font>一只火史莱姆蹦蹦跳跳闯进非凡国度，<font color=#0000FF>" & zhbg_name & "</font>杀伤他吸取内力"&Application("yx8_mhjh_klt12")*10&"点！"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 内力=内力+"&Application("yx8_mhjh_klt12")*10&" where 姓名='" & zhbg_name & "'")
case 15
Application("yx8_mhjh_klt13")=r
	sayyq="<font color=red>【走火入魔】</font>大侠<font color=#0000FF>" & zhbg_name & "</font>修炼内功时不小心走火入魔，被刺球宝宝的魂灵附着到身上，损失"&Application("yx8_mhjh_klt13")*40&"点！"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力-"&Application("yx8_mhjh_klt13")*40&" where 姓名='" & zhbg_name & "'")
case 16
Application("yx8_mhjh_klt14")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只怪物闯进聊天室!撞伤<font color=blue>" & zhbg_name & "</font>体力"&Application("yx8_mhjh_klt14")*10&"点！</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力-"&Application("yx8_mhjh_klt14")*30&" where 姓名='" & zhbg_name & "'")
case 17
Application("yx8_mhjh_klt15")=r
	sayyq="<font color=red>【运气】</font><font color=red>好漂亮啊~~~~一个不知道什么东西变的舞男翩跹起舞,兴奋中丢失了一个银币,被" & zhbg_name & "得到！</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 银币=银币+1 where 姓名='" & zhbg_name & "'")
case 18
Application("yx8_mhjh_klt16")=r
	sayyq="<font color=red>【运气】</font><font color=red>好漂亮啊！一个不知道什么东西变的舞男翩跹起舞,兴奋中丢失了一个金币,被" & zhbg_name & "得到！</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 金币=金币+1 where 姓名='" & zhbg_name & "'")
case 19
Application("yx8_mhjh_klt17")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来," & zhbg_name & "吸取他内力"&Application("yx8_mhjh_klt17")*20&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 内力=内力+"&Application("yx8_mhjh_klt17")*20&" where 姓名='" & zhbg_name & "'")
case 20
Application("yx8_mhjh_klt18")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来," & zhbg_name & "杀伤他增加攻击"&Application("yx8_mhjh_klt18")*10&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 攻击=攻击+"&Application("yx8_mhjh_klt18")*10&" where 姓名='" & zhbg_name & "'")
case 21
Application("yx8_mhjh_klt19")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来,看见" & zhbg_name & "在吃大蒜,吓的跑了,于是" & zhbg_name & "防御增加"&Application("yx8_mhjh_klt19")*10&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 防御=防御+"&Application("yx8_mhjh_klt19")*10&" where 姓名='" & zhbg_name & "'")
case 21
Application("yx8_mhjh_klt20")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来,抢" & zhbg_name & "杀伤他增加银两"&Application("yx8_mhjh_klt20")*10&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 银两=银两+"&Application("yx8_mhjh_klt20")*10&" where 姓名='" & zhbg_name & "'")
case 22
Application("yx8_mhjh_klt21")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来送给" & zhbg_name & "积分"&Application("yx8_mhjh_klt21")*3&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set allvalue=allvalue+"&Application("yx8_mhjh_klt21")*3&" where 姓名='" & zhbg_name & "'")
case 23
Application("yx8_mhjh_klt22")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来," & zhbg_name & "打死怪物,道德增加"&Application("yx8_mhjh_klt22")*20&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 道德=道德+"&Application("yx8_mhjh_klt22")*20&" where 姓名='" & zhbg_name & "'")
case 24
Application("yx8_mhjh_klt23")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来," & zhbg_name & "杀伤他增加体力"&Application("yx8_mhjh_klt23")*20&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力+"&Application("yx8_mhjh_klt23")*20&" where 姓名='" & zhbg_name & "'")
case 25
Application("yx8_mhjh_klt24")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来,杀死后" & zhbg_name & "补充体力"&Application("yx8_mhjh_klt24")*12&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力+"&Application("yx8_mhjh_klt24")*12&" where 姓名='" & zhbg_name & "'")
case 26
Application("yx8_mhjh_klt25")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来,杀" & zhbg_name & "补充体力"&Application("yx8_mhjh_klt25")*12&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力+"&Application("yx8_mhjh_klt25")*12&" where 姓名='" & zhbg_name & "'")
case 27
Application("yx8_mhjh_klt26")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>怪物</font>闯进来,杀伤后补充" & zhbg_name & "体力"&Application("yx8_mhjh_klt26")*14&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力+"&Application("yx8_mhjh_klt26")*14&" where 姓名='" & zhbg_name & "'")
case 28
Application("yx8_mhjh_klt27")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>肯德鸡</font>闯进来,补充" & zhbg_name & "体力"&Application("yx8_mhjh_klt27")*11&"点</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 体力=体力+"&Application("yx8_mhjh_klt27")*11&" where 姓名='" & zhbg_name & "'")
case 29
Application("yx8_mhjh_klt28")=r
	sayyq="<font color=red>【运气】</font><font color=red>突然一只<font color=#0000FF>金龟</font>闯进来,送给" & zhbg_name & "银两"&Application("yx8_mhjh_klt28")*30&"两</font>"
Set conn=server.CreateObject("adodb.connection")
conn.open Application("zhbg_usermdb")
set rst = server.createobject("adodb.recordset") 
    conn.execute("update 用户 set 银两=银两+"&Application("yx8_mhjh_klt28")*30&" where 姓名='" & zhbg_name & "'")
case 18
banner="本站国度采用非凡国度最新版本2005智能版,想体验一下站长的生活，请去官方站购买最新国度程序!; 一个最公平的国度,在我们的国度绝对不会乱调状态,为大家创造一个良好的休闲环境; 本站官府尽职尽责，如果有不满意的地方，请去论坛站务管理处投拆或发表意见！"
banners=Split(Trim(banner),";",-1)
total=UBound(banners)
randomize timer
x=int(rnd*(total+1))
sayyq="<bgsound src=wav/luo.wav loop=3><table align=center><td><table border=0 cellpadding=0 cellspacing=0 ><tr><td><img src=f2/img/rightct3.gif></td><td background=f2/img/rightct4.gif></td><td><img  src=f2/img/rightct1.gif></td></tr><tr><td background=f2/img/rightct8.gif ></td><td valign=center align=center><table align=center border=0 cellpadding=1 cellspacing=0 ><tr><td valign=center align=center><font style='font-size:9pt;color:red'>========官府公告========</font></td></tr><tr><td valign=center align=center><font style='font-size:9pt;color:green'>"&banners(x)&"</td></tr></table></td><td background=f2/img/rightct08.gif></td></tr><tr><td><img src=f2/img/rightct9.gif></td><td background=f2/img/rightct10.gif></td><td><img src=f2/img/rightct11.gif></td></tr></table></td></table>"
case 20,25
	useronlinename=Application("zhbg_useronlinename"&nowinroom)
	online=Split(Trim(useronlinename)," ",-1)
	x=UBound(online)
	Set conn=Server.CreateObject("ADODB.CONNECTION")
	conn.open Application("zhbg_usermdb")
        randomize timer
        rnd22=int(rnd*4)+1
        select case rnd22
        case 1
			randomize timer
			s=int(rnd*10000)
			for i=0 to x
				conn.Execute "update 用户 set 银两=银两+" & s & " where 姓名='" & online(i) & "'"
			next
			sayyq="<bgsound src=wav/zt.mid loop=1><font color=green>【系统发钱】</font><font color=#ff0000>考虑到灾民过多,官府决定开仓放粮,向聊天室的每个人发了"& s &"两解决灾情！</font>"
        case 2
			for i=0 to x
				conn.Execute "update 用户 set 金币=金币+1 where 姓名='" & online(i) & "'"
			next
			sayyq="<bgsound src=wav/zt.mid loop=1><font color=green>【系统金币】</font><font color=#ff0000>站长今天中了大奖,心中高兴，特为聊天室的每个人发了金币1个！</font>"
        case 3
			mm=50
			for i=0 to x
				conn.Execute "update 用户 set allvalue=allvalue+" & mm & " where 姓名='" & online(i) & "'"
			next
			sayyq="<bgsound src=wav/zt.mid loop=1><font color=green>【系统经验】</font><font color=#ff0000>站长路过此地，不忍看到各位大小虾如此苦练，特为聊天室的每个人发放经验" & mm & "点！</font>"
        case 4
			randomize timer
			s=int(rnd*15)
			for i=0 to x
				conn.Execute "update 用户 set 泡豆点数=泡豆点数+" & s & " where 姓名='" & online(i) & "'"
			next
			sayyq="<bgsound src=wav/zt.mid loop=1><font color=green>【捡豆子】</font><font color=#ff0000>不知谁的袋子漏了，豆子撒了一地，在坐的各位每人捡到了" & s & "点！</font>"
        end select
case 27,30
	s=int(rnd*20000)
	Application.Lock
	Application("zhbg_dalie")="老虎"
	Application.UnLock
	sayyq="<bgsound src=wav/hu.wav loop=1><font color=red>【消息】</font><font color=red>突然一只野兽<img src=img/laohu.gif>窜入国度中伤人，请高手们快去打猎啊。</font>"
case 35,39
	s=int(rnd*2000)
	Application.Lock
	Application("zhbg_jx")=s+170
	Application.UnLock
	abc="<a href='fafang/jx.asp?tl="&Application("zhbg_jx")&"' target='d'><img src='img/jx.gif' border='0'></a>"
	sayyq="【消息】一只百年巨蝎修练成精，跑下山来伤人。大家快打呀......巨蝎体力："&s+170&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 41,43
	s=int(rnd*2000)
	Application.Lock
	Application("zhbg_hx")=s+100
	Application.UnLock
	abc="<a href='fafang/hx.asp?tl="&Application("zhbg_hx")&"' target='d'><img src='img/hx.gif' border='0'></a>"
	sayyq="【消息】动物园饲养员玩忽职守，忘了关熊圈，一只<font color=red>黑熊</font>跑出了熊圈，大家快抓呀。黑熊生命力：</font>"&s+100&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 48,55
		jstl=int(rnd*2000)+100
		Application.Lock
		Application("zhbg_kl")=jstl
		Application.UnLock
		abc="<a href='fafang/kl.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/gui.GIF' border='0'></a>"
		sayyq="<font color=red>【消息】突然间阴风陈陈……“僵尸呀！”一女子尖叫，一头僵尸闯进聊天室，僵尸体力：+"&jstl&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 60,66,70
		Application.Lock
		Application("zhbg_dalie")="老虎"
		Application.UnLock
		sayyq="<font color=red>【消息】</font><font color=red>突然一只野兽<img src=img/laohu.gif>窜入国度中伤人，请高手们快去打猎啊。</font>"
case 75
                r=int(rnd*30)+1
Application.Lock
		Application("zhbg_klt1")=r
Application.UnLock
abc="<a href='fafang/cz.asp?tl="&Application("zhbg_cz")&"' target='d'><img src='img/cz.GIF' border='0' width='80' height='70'></a>"
	        sayyq="<font color=green>【怪物偷袭】</font><font color=red>突然一只[木怪]来偷袭<font color=#0000FF>" &zhbg_name& "</font>,吸取<font color=#0000FF>" &zhbg_name& "</font>体力"&Application("zhbg_klt1")*20&"</font>。都先打了在说但掌门不能打喔，木妖内力："&s+500&"</font><br><marquee width=100% behavior=alternate scrollamount=25>"&abc&"</marquee><bgsound src=../mid/Ye150.wav loop=3>"
               Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
               conn.execute("update 用户 set 体力=体力-"&Application("zhbg_klt1")*20&" where 姓名='" &zhbg_name& "'")
case 76
         r=int(rnd*30)+1
Application.Lock
        Application("zhbg_klt3")=r
Application.UnLock
abc="<a href='fafang/coco.asp?tl="&Application("zhbg_coco")&"' target='d'><img src='img/co.GIF' border='0' width='80' height='70'></a>"
	sayyq="<font color=green>【怪物偷袭】</font><font color=red>突然一只美丽的[人妖]闯进国度，咬伤" &zhbg_name& "内力"&Application("zhbg_klt3")*20&"！</font>都先打了在说但掌门不能打喔，人妖内力："&s+500&"</font><br><marquee width=100% behavior=alternate scrollamount=25>"&abc&"</marquee><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 内力=内力-"&Application("zhbg_klt3")*20&" where 姓名='" &zhbg_name& "'")
case 77
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt6")=r
Application.UnLock
abc="<a href='fafang/wy.asp?tl="&Application("zhbg_wy")&"' target='d'><img src='img/wy.GIF' border='0' width='80' height='70'></a>"
	sayyq="<font color=green>【怪物偷袭】</font><font color=red>一股凄厉的寒风横扫国度，[风清扬]横行肆虐，大侠<font color=#0000FF>" &zhbg_name& "</font>被咬去"&Application("zhbg_klt6")*10&"点防御！</font>都先打了在说但掌门不能打喔，桶妖内力："&s+500&"</font><br><marquee width=100% behavior=alternate scrollamount=25>"&abc&"</marquee><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 防御=防御-"&Application("zhbg_klt6")*10&" where 姓名='" &zhbg_name& "'")
case 78
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt10")=r
Application.UnLock
abc="<a href='fafang/shu.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/shu.gif' border='0'></a>"
	sayyq="<font color=green>【怪物偷袭】</font><font color=red>哇~~~好酷的一只家伙!真是林子大了，什么鸟都有，一只[酷鼠]跑进国度，偷了<font color=#0000FF>" &zhbg_name& "</font>白银"&Application("zhbg_klt10")*20&"点！</font>饿鼠体力："&s&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 银两=银两-"&Application("zhbg_klt10")*20&" where 姓名='" &zhbg_name& "'")
case 79
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt11")=r
Application.UnLock
	sayyq="<font color=green>【怪物偷袭】</font><font color=red>[邪恶黑龙]突然冲进非凡国度，一道霹雳把<font color=#0000FF>" &zhbg_name& "</font>打得浑身黑糊糊的，并夺取积分"&Application("zhbg_klt11")*10&"点！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set allvalue=allvalue-"&Application("zhbg_klt11")*10&" where 姓名='" &zhbg_name& "'")
case 80
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt9")=r
Application.UnLock
	sayyq="<font color=green>【怪物偷袭】</font><font color=red>[黑社会老大]在哥特山顶苦心修炼，一股剑气伤了<font color=#0000FF>" &zhbg_name& "</font>魅力"&Application("zhbg_klt9")*10&"点！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 魅力=魅力-"&Application("zhbg_klt9")*10&" where 姓名='" &zhbg_name& "'")
case 81
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt4")=r
Application.UnLock
	sayyq="<font color=green>【怪物呈祥】</font><font color=red>一阵祥和的风儿吹来，一只修炼千年的[剑仙]翩然而至，给<font color=#0000FF>" &zhbg_name& "</font>增加积分"&Application("zhbg_klt4")*20&"！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set allvalue=allvalue+"&Application("zhbg_klt4")*20&" where 姓名='" &zhbg_name& "'")
case 82
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt5")=r
Application.UnLock
	sayyq="<font color=green>【怪物呈祥】</font><font color=red>一阵祥和的风儿吹来，一只修炼千年的[赤月恶魔]翩然而至，给<font color=#0000FF>" & username & "</font>增加积分"&Application("zhbg_klt5")*20&"！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set allvalue=allvalue+"&Application("zhbg_klt5")*20&" where 姓名='" & username & "'")
case 83
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt12")=r
Application.UnLock
	sayyq="<font color=green>【怪物呈祥】</font><font color=red>一只百年不遇的国度之[桃实仙]突然出现在聊天室内，送给<font color=#0000FF>" &zhbg_name& "</font>体力"&Application("zhbg_klt12")*24&"点！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 体力=体力+"&Application("zhbg_klt12")*24&" where 姓名='" &zhbg_name& "'")
case 84
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt7")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>一股热浪突袭国度，[邀月公主]闯入一群若女子当中，见人就咬，<font color=#0000FF>" &zhbg_name& "</font>被咬伤体力"&Application("zhbg_klt7")*20&"点！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 体力=体力-"&Application("zhbg_klt7")*20&" where 姓名='" &zhbg_name& "'")
case 85
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt13")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>一只[桃花仙]蹦蹦跳跳闯进国度，向<font color=#0000FF>" &zhbg_name& "</font>挑衅似的吸取内力"&Application("zhbg_klt13")*10&"点！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 内力=内力-"&Application("zhbg_klt13")*10&" where 姓名='" &zhbg_name& "'")
case 86
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt14")=r
Application.UnLock
	sayyq="<font color=green>【鬼魂附体】</font><font color=red>大侠<font color=#0000FF>" &zhbg_name& "</font>修炼内功时不小心走火入魔，被[巨嘴蓝鸟]的魂灵附着到身上，被咬伤"&Application("zhbg_klt14")*21&"点！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 体力=体力-"&Application("zhbg_klt14")*21&" where 姓名='" &zhbg_name& "'")
case 87
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt15")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>突然一只<font color=#0000FF>[蓝翼]</font>闯进来,吸取" &zhbg_name& "内力"&Application("zhbg_klt15")*22&"点</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 内力=内力-"&Application("zhbg_klt15")*22&" where 姓名='" &zhbg_name& "'")
case 88
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt16")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>突然一只<font color=#0000FF>[火翼]</font>闯进来,打掉" &zhbg_name& "攻击"&Application("zhbg_klt16")*12&"点</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 攻击=攻击-"&Application("zhbg_klt16")*12&" where 姓名='" &zhbg_name& "'")
case 89
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt17")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>突然一只<font color=#0000FF>[毒龙]</font>闯进来,打掉" &zhbg_name& "防御"&Application("zhbg_klt17")*10&"点</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 防御=防御-"&Application("zhbg_klt17")*10&" where 姓名='" &zhbg_name& "'")
case 90
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt18")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>突然一只<font color=#0000FF>[神鼠]</font>闯进来,偷走" &zhbg_name& "积分"&Application("zhbg_klt18")*5&"点</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb") 
    conn.execute("update 用户 set allvalue=allvalue-"&Application("zhbg_klt18")*5&" where 姓名='" &zhbg_name& "'")
case 91
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt19")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>突然一只<font color=#0000FF>[恶龙]</font>闯进来,降低" &zhbg_name& "道德"&Application("zhbg_klt19")*10&"点</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 道德=道德-"&Application("zhbg_klt19")*10&" where 姓名='" &zhbg_name& "'")
case 92
r=int(rnd*30)+1
Application.Lock
Application("zhbg_klt8")=r
Application.UnLock
	sayyq="<font color=green>【怪物袭击】</font><font color=red>[夜魔]在深山被一股野火驱赶下山，游荡进非凡国度，饥不择食，吸收<font color=#0000FF>" &zhbg_name& "</font>内力"&Application("zhbg_klt8")*10&"点！</font><bgsound src=../mid/Ye150.wav loop=3>"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
    conn.execute("update 用户 set 内力=内力-"&Application("zhbg_klt8")*10&" where 姓名='" &zhbg_name& "'")
case 93,95,98,120
		jstl=int(rnd*500)+100
		Application.Lock
		Application("zhbg_yb")=jstl
		Application.UnLock
		abc="<a href='fafang/yb.asp?tl="&Application("zhbg_yb")&"' target='d'><img src='img/251.GIF' border='0'></a>"
		sayyq="<font color=red>【消息】今天是什么日子，突然间从天上掉下来一个大元宝，价值：+"&jstl&"两!</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 130,135
		jstl=int(rnd*500)+100
		Application.Lock
		Application("zhbg_yb")=jstl
		Application.UnLock
		abc="<a href='fafang/yb.asp?tl="&Application("zhbg_yb")&"' target='d'><img src='img/251.GIF' border='0'></a>"
		sayyq="<font color=red>【消息】今天真是好日子，"&Application("zhbg_user")&"中了国度风采头等奖，500万呀！给聊天室兄弟们一个大红包，价值：+"&jstl&"两!</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 160,170
		jstl=int(rnd*500)+100
		Application.Lock
		Application("zhbg_kl")=jstl
		Application.UnLock
		abc="<a href='fafang/boy.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/p42.gif' border='0'></a>"
		sayyq="<font color=red>【消息】一个衰哥听说这个国度的美女特别多，跑到国度想泡美女，大家准备好棒子打呀。打跑了官府有奖。。衰哥体力：+"&jstl&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 180,182
		jstl=int(rnd*500)+1000
		Application.Lock
		Application("zhbg_qi")=jstl
		Application.UnLock
		abc="<a href='fafang/qi.asp?tl="&Application("zhbg_qi")&"' target='d'><img src='img/tank.gif' border='0'></a>"
		sayyq="<font color=red>【消息】一把精制手枪闯进国度，国度人士看了目瞪口呆，也不知道这是什么东西。都先打了在说。。精制手枪体力：+"&jstl&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 190
		rftl=int(rnd*500)+100
		Application.Lock
		Application("zhbg_kl")=rftl
		Application.UnLock
		abc="<a href='fafang/rf.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/rf.GIF' border='0'></a>"
		sayyq="<font color=#FF6600>【国度任务】捉拿人贩子:叶三娘(ye sanniang)：“可恶的人贩子，把我那可怜的孩儿拐到哪里去啦？要是再找不到的话，我就见一个孩子杀一个。”人贩子体力：+"&rftl&"</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 200
		piaoke=int(rnd*500)+100
		Application.Lock
		Application("zhbg_kl")=piaoke
		Application.UnLock
		abc="<a href='fafang/piaoke.asp?tl="&Application("zhbg_kl")&"' target='d'><img src='img/piaoke.GIF' border='0'></a>"
		sayyq="<bgsound src=wav/FAQIAN.wav loop=1><font color=#FF6600>【国度任务】抓小偷任务开始：这年头国度也不平静啊！居然有位贼头贼脑的小偷闯入国度，谁把他逮住必有重谢！”</font><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 230
if Application("zhbg_baowu")>0 and zhbg_grade<6 then 
   Set conn=Server.CreateObject("ADODB.CONNECTION") 
   Set rs=Server.CreateObject("ADODB.RecordSet") 
   conn.open Application("zhbg_usermdb") 
   rs.open "select id,姓名,宝物,等级,门派,身份 from 用户 where 宝物='" & Application("zhbg_baowuname") & "'",conn 
   if rs.eof or rs.bof  then 
    rs.close 
    rs.open "select 门派 from 用户 where 姓名='"&zhbg_name&"'" 
    if rs("门派")="出家" then 
     sayyq1="[国度消息]：##在国度道上偶然见到了国度至宝<img src=img/z1.gif><font color=red>"& Application("zhbg_baowuname")&"</font>，但由于自己是个出家人，出家人戒贪，只好看了一眼宝物，悻悻然而去~~~！" 
     sayyq=Replace(sayyq1,"##",zj,1,3,1)  
    else 
     conn.execute  "update 用户 set 保护=false,宝物修练=0,宝物='"& Application("zhbg_baowuname") &"' where 姓名='" & zhbg_name &"'" 
     sayyq1="[国度消息]：##现在拥有国度至宝<img src=img/z1.gif><font color=red>"& Application("zhbg_baowuname")&"</font>" & Application("zhbg_baowusm") &"各位侠士互相争夺！" 
     sayyq=Replace(sayyq1,"##",zj,1,3,1)  
    end if 
   else 
    baouser=rs("姓名") 
    baowuid=rs("id") 
    if Instr(LCase(Application("zhbg_useronlinename"&nowinroom))," "&LCase(baouser)&" ")=0 then 
     conn.execute  "update 用户 set 宝物='无',宝物修练=0 where 姓名='"& baouser &"'" 
    else 
     sayyq1="[国度消息]：国度宝物<img src=img/z1.gif><font color=red>"& Application("zhbg_baowuname")&"</font>已被["&rs("门派")&"]"&rs("身份")&baouser&"夺走，各位大侠还不去抢..." 
     sayyq=Replace(sayyq1,"##",zj)  
    end if 
   end if 
   rs.close 
   set rs=nothing 
   conn.close 
   set conn=nothing 
  end if
case 233,235,238,250
'取国度笑话
Set Conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
'取笑话的记录条数
sql="select count(id) from jokelist"
set rs=Conn.execute(sql)
jokecount=rs(0)
randomize
rand=Int(jokecount * Rnd +1 )
sql="select * from jokelist where id=" & rand & ""
set rs=Conn.execute(sql)
joke=rs("类型")&":"&rs("题目")&":"&rs("文章")
rs.close
set rs=nothing
conn.close
set conn=nothing
joke=replace(joke,chr(13),"")
joke=replace(joke,chr(10),"")
                Application.Lock
                Application("zhbg_joke")=joke
                Application.UnLock
                sayyq="<bgsound src=wav/haha.wav loop=1><img src=img/joke.GIF><font color=009933>〖开心一笑〗</font><img src=img/jokepic.GIF><font color=666666>" & Application("zhbg_joke") & "</font>"			'聊天数据
case 265,270
		jstl=int(rnd*2)+1
		Application.Lock
		Application("zhbg_jinbi")=jstl
		Application.UnLock
		abc="<a href='fafang/bxinshou.asp?tl="&Application("zhbg_jinbi")&"' target='d'><img src='img/xinshou.GIF' border='0'></a>"
		sayyq="<bgsound src=wav/xinshou.wav loop=1><font color=#000000>【照顾新手】</font><b><font color=red>有新朋友来国度了，站长说：介绍朋友来、照顾新人者奖:+"&jstl&"个金币!</font></b><br><marquee width=100% behavior=alternate scrollamount=15>"&abc&"</marquee>"
case 280,289,295,305
'自动出题开始
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
'取题库记录数
sql="select count(id) from QuestLib "
set rs=Conn.execute(sql)
askcount=rs(0)
randomize
rand=Int(askcount * Rnd +1 )
sql="select * from QuestLib where id=" & rand & ""
set rs=Conn.execute(sql)
ask=rs("类型")&":"&rs("问题")
reply=rs("回答")
rs.close
set rs=nothing
conn.close
set conn=nothing
ask=replace(ask,chr(13),"")
ask=replace(ask,chr(10),"")
                Application.Lock
                Application("zhbg_ask")=ask
                Application("zhbg_reply")=reply
                Application("zhbg_askuser")="机器人"
                Application("zhbg_asksilver")=int(rnd*9999)+100000
                Application.UnLock
                sayyq="<bgsound src=wav/zhanfa.wav loop=1>【系统出题】<font color=blue>"& zhbg_name &"</font>制造的聊天传闻：<font color=balck>" & Application("zhbg_ask") & "？ </font>正确答案是什么？[提问人]:<font color=red>["&Application("zhbg_askuser")&"]</font><font color=green>奖励："&Application("zhbg_asksilver")&"两!</font>"
case 49,55,90
'=====================npc自动攻击
npc_room=split(Application("zhbg_npc"&nowinroom),"|")
npc_inroom=ubound(npc_room)
if npc_inroom>=1 then
Set conn=Server.CreateObject("ADODB.CONNECTION") 
Set rs=Server.CreateObject("ADODB.RecordSet") 
conn.open Application("zhbg_usermdb")
randomize timer
nl=int(rnd*npc_inroom)
nl1=npc_room(nl)
nl2=split(nl1,";")
nl_name=trim(nl2(1))
sql="select * from npc where n姓名='"&nl_name&"'"
rs.open sql,conn,2,2
if not rs.eof then
  n_zhuren=rs("n主人")
end if
rs.close
if n_zhuren<>zhbg_name then
sql="select * from 用户 where 姓名='"&zhbg_name&"'"
rs.open sql,conn,2,2
if rs("保护")=false and rs("门派")<>"出家" and rs("等级")>21 then
sayyq="<bgsound src=wav/dgjj0.wav loop=1>【NPC自动攻击】<font color=balck>"&zhbg_name&"正在国度行走中<img src=xx/gif/WG7.GIF>突然被NPC["&nl_name&"]咬了一口，伤得不轻，体力下降500点，内力下降200点，大家可要小心了，离"&nl_name&"远点!</font>"
conn.execute  "update 用户 set 体力=体力-500,内力=内力-200 where 姓名='"&zhbg_name &"'"
conn.execute  "update npc set n攻击率=n攻击率+1 where n姓名='"&nl_name&"'" 
end if
end if
end if
'=======================npc自动攻击
end select			
end if
end if
if sayyq<>"" then
	sayyq=replace(sayyq,"'","\'")
	sayyq=replace(sayyq,chr(34),"\"&chr(34))
	act="运气"
	saystr="<"&"script>parent.sh("& chr(39) & addwordcolor & chr(39) &","& chr(39) & saycolor & chr(39) &","& chr(39) & act & chr(39) &","& chr(39) & zhbg_name & chr(39) &","& chr(39) & addsays & chr(39) &","& chr(39) & towho & chr(39) &"," & chr(39) & sayyq & chr(39) &",0," & nowinroom & ");<"&"/script>"
	AddMsg SayStr
end if
act="正常"
says=replace(says,chr(39),"\'")
says=replace(says,chr(34),"\"&chr(34))
says=says&t
saystr="<"&"script>parent.sh("& chr(39) & addwordcolor & chr(39) &","& chr(39) & saycolor & chr(39) &","& chr(39) & act & chr(39) &","& chr(39) & zhbg_name & chr(39) &","& chr(39) & addsays & chr(39) &","& chr(39) & towho & chr(39) &"," & chr(39) & says & chr(39) &"," & towhoway & "," & nowinroom & ");"&npccls&"<"&"/script>"
AddMsg SayStr
For i = 1 to Application("SayCount")-Session("SayCount")
	Response.Write Application("SayStr"&YuShu((Session("SayCount")+i)))
Next
session("SayCount")=Application("SayCount")
Response.Write "<script Language=JavaScript>"
Response.Write "parent.f1.scrollWindow();"
Response.Write "</script>"
Function Yushu(a)
	Yushu=(a and 31)
End Function
Sub AddMsg(Str)
	Application.Lock()
	Application("SayCount")=Application("SayCount")+1
	i="SayStr"&YuShu(Application("SayCount"))
	Application(i)=Str
	Application.UnLock()
End Sub
%>