Sub Wxzs()
Name=replace(lib.GetQueryField("name"),"'","&")
if(Lib.ChkInvaildWord(Name)) then
'myLib.msg("请不要输入非法字符")
end if
if Name="" then myLib.msg("非法操作")
if zs=1 then myLib.msg("对不起,无限转生功能目前关闭中!")
sql = "select * from MEMB_INFO where memb___id='"&username&"'"
set rs = GameLib.execute(sql,false)
if rs.eof or rs.bof then
rs.close
myLib.msg("对不起,找不到该帐号")
else
MyMember = rs(MemberName)
StopTime = rs("StopTime")
JF=rs("jf")
if JF<zsjf then myLib.msg("对不起,您帐号的积分达不到转生需要积分,不能进行转生")
rs.close
end if
sql="select * from Character where AccountID='"&username&"' and Name='"&Name&"'"
set rs = GameLib.execute1(sql,true)
if rs.eof or rs.bof then
myLib.msg("对不起,没有找到您的角色")
else
ZsClass=rs("Class")
ZsShu=rs(serTime)
if isnull(ZsShu) then ZsShu = 0
ZsShu=ZsShu+1
ZsTimes = split(ZsTime, ",")
for i = 0 to Ubound(ZsTimes)
ZsTimes(i) = int(ZsTimes(i))
next
ZsTime=ZsTimes(0)
ZsaLevels = split(ZsaLevel, ",")
for i = 0 to Ubound(ZsaLevels)
ZsaLevels(i) = int(ZsaLevels(i))
next
ZsaLevel=ZsaLevels(0)
Zspoints = split(Zspoint, ",")
for i = 0 to Ubound(Zspoints)
Zspoints(i) = int(Zspoints(i))
next
Zspoint=Zspoints(0)
ZsxrZss = split(ZsxrZs, ",")
for i = 0 to Ubound(ZsxrZss)
ZsxrZss(i) = int(ZsxrZss(i))
next
ZsxrZs=ZsxrZss(0)
MyMembers = split(Members, ",")
for i = 0 to Ubound(MyMembers)
if MyMember&"" = MyMembers(i) then
ZsTime=ZsTimes(i)
Zspoint=Zspoints(i)
ZsxrZs=ZsxrZss(i)
ZsaLevel=ZsaLevels(i)
exit for
end if
next
if datediff("s",now(), DateAdd("n",ZsTime,StopTime)) >= 0 then myLib.msg("对不起,还不到时间领取,请" & DateAdd("n",ZsTime,StopTime) & "再来!")
if ZsShu=1 then
if rs("Clevel")<ZsxrLevel then myLib.msg("对不起,等级必须达到" & ZsxrLevel & "级才可以继续!")
else
if rs("Clevel")<Zsalevel then myLib.msg("对不起,等级必须达到" & Zsalevel & "级才可以继续!")
end if
if rs("Money")<zsmoney then myLib.msg("对不起,您MU币不够转生需要的!")
if ZsShu > ZsbType then myLib.msg("您的转生次数已经达到最高转了,不能在转了!")
if ZsaType = 0 then
for i=1 to 192 step 16
itemdbs=Hex(ascB(midb(rs("Inventory"),i,1)))
if itemdbs <> "FF" then myLib.msg("\n\n人物身上装备没有卸下来哟,我可是好心提醒您别怪我罗嗦!")
next
end if
if ZsShu=1 then
ZsShu=ZsShu + ZsxrZs
end if
Zspoint=Zspoint*ZsShu+ZsBasePoint
dim sqls(2)
if ZsQuest=0 then
if ZsClass=3 or ZsClass=19 or ZsClass=35 or ZsClass=83 then
ZsClass=ZsClass-3
elseif ZsClass=50 or ZsClass=66 or ZsClass=98 then
ZsClass=ZsClass-2
elseif ZsClass=1 or ZsClass=17 or ZsClass=33 or ZsClass=81 then
ZsClass=ZsClass-1
end if
quest = ",Quest=null,Class=" & ZsClass
else
quest=""
end if
sqls(0)="Update [Character] set MapNumber=0,MapPosX=148,MapPosY=138,Money=Money-"&zsmoney&",Clevel="&ZsbLevel&",Experience=" & myLib.GetExp(ZsbLevel) & ",LevelUpPoint="&Zspoint&",Strength="&ZsaPoint&",Dexterity="&ZsaPoint&",Vitality="&ZsaPoint&",Energy="&ZsaPoint&"," & serTime & "=" & ZsShu & quest & " where AccountID='"&username&"' and Name='"&Name&"'"
sqls(1)="Update [MEMB_INFO] set StopTime='" & now() & "',jf=jf-"&zsjf&" where memb___id='"&username&"'"
if myLib.GameTranExec1(myLib.GetConnStr(AcSqlName,AcSqlPass,AcSqlData,AcSqlIp), sqls) then
lib.msg2 "恭喜您的角色〖"&Name&"〗转生成功,您现在已经到达"&ZsShu&"次转生了!","User.asp"
else
lib.msg2 "操作失败,请保证数据的正确性!","User.asp"
end if
end if
End Sub