www.pudn.com > wap-wscs.rar > fight.asp, change:2014-08-10,size:1875b


<!--#include file="conn.asp"--> 
<% 
uid=int(request.querystring("id"))'获取对手ID 
				Set usinfo=New userinfo 
				userid=usinfo.usinfo(gsid,"userid")'玩家自己的ID 
				mytz=usinfo.usinfo(gsid,"tz")'玩家是否可以挑战 
				usname=usinfo.uinfo(uid,"nickname")'对方名字 
				mylvl=usinfo.usinfo(gsid,"lvl")'玩家等级 
				uslvl=usinfo.uinfo(uid,"lvl")'对方等级 
				ft=usinfo.uinfo(uid,"ft")'对方战斗状态 
				If usname="err" Then  
				Call myhead("挑战出错") 
				Call echo("没有这个玩家",1) 
				Call echo(urlencode("../index.asp","返回首页"),1) 
				Call myend() 
				End If  
				Set usinfo=Nothing  
				 
Call myhead("与["&usname&"]的战斗") 
If userid=uid Then 
Call echo("自己不能挑战自己!",1) 
ElseIf (mylvl-uslvl)>6 Then 
Call echo("不要欺负小孩子哦。。",1) 
ElseIf uslvl=1 Then  
Call echo("对方处于1级保护期 免疫一切挑战",1) 
ElseIf mylvl=1 Then  
Call echo("你现在才1级呢,先升级吧",1) 
ElseIf (uslvl-mylvl)>10 Then 
Call echo("额。。等级差太大了,目测你会被秒,先升级吧",1) 
ElseIf (datediff("s",session("pktime"),now()))<10 Then  
Call echo("你刚刚经历过一场战斗,先休息10秒吧",1) 
Call echo("<!--"&(datediff("s",session("pktime"),now()))&"-->",0) 
session("pktime")=now() 
ElseIf mytz Then  
Call echo("你被禁止挑战,人品太差被管理黑了吧...",1) 
ElseIf ft=1 Then  
Call echo("对方正在战斗中",1) 
Else  
Call echo("<div style=""background:#F5F5DC; border-top:1px solid #ccc; border-bottom:1px solid #ccc;"">",0) 
Call echo("挑战开始!",1) 
Call echo("</div>",0) 
Call chinfo(uid,"ft",1) 
Call chinfo(userid,"ft",1) 
Call pk(uid,userid,p1hp,p2hp,"",fmsg,0,0)'对手ID 本人ID 
Call chinfo(uid,"ft",0) 
Call chinfo(userid,"ft",0) 
End If  
Call echo(urlencode("../index.asp","返回首页"),1) 
Call myend() 
%>