一个在线学魔法的ASP程序
所以一直有玩家抱怨说学习魔法要求智力太变态(打上了ITEM补丁就登陆不了了。超晕。。。)
样式:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<a href=http://www.w3.org/TR/html4/loose.dtd target=_blank>http://www.w3.org/TR/html4/loose.dtd</a>">
<!--#include file="conn.asp" -->
<!--#include file="setup.asp" -->
<%
magicmoney=300000 学魔法所需费用
accountname=request.form("username")
password=request.form("password")
character=request.form("userchr")
if instr(accountname,"")<>0 then response.end
if instr(accountname,"=")<>0 then response.end
if instr(accountname,"%")<>0 then response.end
if instr(accountname,"&")<>0 then response.end
if instr(password,"")<>0 then response.end
if instr(password,"=")<>0 then response.end
if instr(password,"%")<>0 then response.end
if instr(password,"&")<>0 then response.end
if accountname<>"" and password<>"" then dedecms.com
验证人物帐户信息
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from MEMB_INFO where memb___id = "&accountname&" and memb__pwd="&password&""
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write "<script language=javascript>alert(\n\n帐号信息错误,请重新填写!);history.back()</script>"
response.end
else dedecms.com
set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="select * from Character where AccountID="&accountname&" and Name="&character&""
rs1.open sql1,conn,1,3
其他
if rs1("class") = 33 or rs1("class") = 32 or rs1("class") = 16 or rs1("class") = 17 then
response.write "<script language=javascript>alert(\n\n你也想来学习魔法吗?你好象不能用魔法耶!后边排队去 dedecms.com
吧!);history.back()</script>"
response.end
end if
检查智力是否满足学习魔法的条件!
if rs1("Energy") < 220 then
response.write "<script language=javascript>alert(\n\n学魔法需要220智力哦,您的智商太低了,回去买点补品补补再 dedecms.com
来吧!!);history.back()</script>"
response.end
end if
检查人物身上的钱是否足够
if rs1("money") < magicmoney then
response.write "<script language=javascript>alert(\n\n学魔法需要"&rs1("money")&"MU币哦,没钱就别来,再来加重GM
负担就口你10点属性!!);history.back()</script>"
response.end
end if
判断该人物是否是最后退出
set rs3 = Server.CreateObject("ADODB.Recordset")
sql3="select * from AccountCharacter where id = "&accountname&""
rs3.open sql3,conn,1,3
if rs3("gameidc")=rs1("name") then dedecms.com
response.write "<script language=javascript>alert(\n\n转生的人物不能最后退出游戏或在中!);history.back()</script>"
response.end
end if
开始
法师与魔导师
if rs1("class")=0 or rs1("class")=1 then
rs1("money")=rs1("money")-magicmoney
sql="UPDATE character set
MagicList=0x0400000B00000300000200000700000500000800000100000900000C0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000
0FF0000 where name=character"
conn.execute(sql)
response.write "<script language=javascript>alert(\n\n恭喜您〖"&rs1("name")&"〗,学业完成,予以毕
业!);history.back()</script>"
response.end
end if
魔剑士
if rs1("class")=48 then
rs1("money")=rs1("money")-magicmoney
sql="UPDATE character set dedecms.com
MagicList=0x0400000B0000030000020000070000010000050000080000090000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000
0FF0000 where name=character"
conn.execute(sql)
response.write "<script language=javascript>alert(\n\n恭喜您〖"&rs1("name")&"〗,学业完成,予以毕
业!);history.back()</script>"
response.end
end if
end if
else
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="images/mu.css" rel=stylesheet type=text/css>
<title><%=name%></title>
<style type="text/css">
<!--
body {
background-image: url(images/0007.gif);
}
.style1 {
font-size: 24px;
font-weight: bold;
}
-->
</style></head>
<body>
<div align="center">
<FORM method=post name=chgform action="">
<p> </p>
<table width="447" border="0" align="center" cellspacing="0">
<tr>
<td align="center" valign="top"><table width="489" border="0" align="center" cellspacing="0">
<tr>
<td width="487"><div align="center" class="style1">魔法学院</div></td>
</tr>
</table>
<table width="485" border="0" align="center" cellspacing="0">
<tr>
<td height="42" valign="top"><div align="center">
<p>本功能是方便那些使用0.98版登陆游戏人间的玩家<br>可能因为客户端的差异,无法在中直接学习魔法(学习魔法所需智
力超高)<br>
凡在本学院毕业者,颁发人间承认学历!<br>
学业范围:店内所有技能(除本身职业限制不能学以外!)<br>
学费:30W币 入学条件:智商220以上(什么!?你条件不够还来做甚?扁他!)</p>
</div></td>
</tr>
<tr>
<td height="92"><table width="486" border="0" cellspacing="0">
<tr>
<td width="94" height="31"><div align="right">角色:</div></td>
<td width="388" valign="middle">
<INPUT name=userchr type=text class="lanyu" id="ps_person_id" size=18 maxLength=18>
</td>
</tr>
<tr>
<td height="34"><div align="right">帐号:</div></td>
<td valign="middle">
<span class="txt_gray"><INPUT name=username type=text class="lanyu" id="username" size=18 maxLength=16>
</span></td>
</tr>
<tr>
<td><div align="right">密码:</div></td>
<td valign="middle">
<span class="txt_gray"><INPUT name=password type=password class="lanyu" id="username3" size=18 maxLength=16>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center"><span class="bigf"><a href="javascript:document.chgform.submit()"><img border=0
src="http://www.5uwl.net/wyjs/2005/images/bt_confirm.gif"></a> <img src="http://www.5uwl.net/wyjs/2005/images/bt_back.gif" style="cursor:hand"
> </span></div></td>
</tr>
</table>
<p> </p></td>
</tr>
</table>
</div>
</body>
</html>
<%
end if
rs.close
set rs=nothing
rs1.close
set rs1=nothing
%>