<%@ LANGUAGE=VBScript%>
<!--#include file="../../showchat.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")
if zhbg_name="" then Response.Redirect "../../error.asp?id=440"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
rs.open "select * from 用户 where 姓名='"&zhbg_name&"'",conn
jifen=rs("allvalue")
if zhbg_jhdj<150 or jifen<1125000 then
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
		Response.Write "<script language=JavaScript>{alert('提示：想转世投胎，战斗等级必须150级以上！');window.close();}</script>"
		response.end
end if
neili=int(jifen*.5)
tili=int(jifen*.5)
wg=int(jifen*.25)
conn.execute "update 用户 set 内力加=内力加+"&neili&",体力加=体力加+"&tili&",武功加=武功加+"&wg&",allvalue=allvalue-1125000,等级=0,转生=转生+1 where 姓名='"&zhbg_name&"'"
conn.execute "insert into l(b,c,d,a,e) values ('" & zhbg_name & "','阎王','人命',now(),'转世投胎')"
zstt=rs("转生")
rs.close
set rs=nothing	
set conn=nothing
says="<font color=green>【转世投胎】<font color=#ff0000>" & zhbg_name & "</b>大侠，你转世投胎好了，内力、体力上限各加"&neili&"点，武功上限加"&wg&"点，继续努力泡点吧！现在是第"&zstt&"次转生</font>"			'聊天数据
says=replace(says,chr(39),"\'")
says=replace(says,chr(34),"\"&chr(34))
call showchat(says)
Response.Write "<script language=JavaScript>{alert('提示：您转世投胎好了，点击确定重新登陆国度！');top.location.href='../../EXIT.ASP';}</script>"
response.end
%>