|
我的转生文件(30-57级用玛亚,58以后用创造) 呵呵,先说明,本人是菜鸟,这是我根据别人的改的,改了很久了,怕大家笑所以一直没放上来,今天有朋友说想看,所以就放了上来,本人试用了一个多月了,应该是没有问题的,有不正确的地方大家请指教 <!--#include file="conn.asp" --> <!--#include file="top.asp" --> <% lifedbnames="life.mdb" lifeneedlevel=340 转生需要多少级 lifedonelevel=1 转生后多少级 lifedoneexp=0 转生后经验多少 lifemoney=15000000 需要多少钱 levelmoney=10000000 30级转生以上根据级别多加的钱 lifeItems=143 高级转生需要的物品代码,214是创造,208是生命(实际上就是十六进制的物品代码转为十进制后的数字) lifeItemsb=214 Itemsname="玛亚宝石" 高级转生需要的物品名称 Itemsnum=5 高级转生需要的物品基数,设为0就是没有基数 levelItems=2 高级转生每多转1次需要多增加的物品数量 totalcount=70 允许转生的lifecount 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 connstrs = "DBQ="+server.mappath(lifedbnames)+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" Set connlife = Server.CreateObject("ADODB.Connection") connlife.Open connstrs set rslife = Server.CreateObject("ADODB.Recordset") sqllife="select * from life where character="&character&"" rslife.open sqllife,connlife,1,3 if rslife.eof or rslife.bof then else if rslife("lifecount")>=totalcount then response.write "<script language=javascript>alert(\n\n对不起,目前只提供转生"&totalcount&"次!);history.back()</script>" response.end end if end if 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 set rs1 = Server.CreateObject("ADODB.Recordset") sql1="select * from Character where AccountID="&accountname&" and Name="&character&" and cLevel>="&lifeneedlevel rs1.open sql1,conn,1,3 if rs1.eof or rs1.bof then %> <script language=javascript>alert(\n\n<%=lifeneedlevel%>级才可以转生,下去好好修炼修炼吧!);history.back()</script> <% response.end end if if rs1("money")<lifemoney then response.write "<script language=javascript>alert(\n\n身上没钱就不要来这里,你以为我白忙活啊!);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 response.write "<script language=javascript>alert(\n\n转生的人物不能最后退出游戏或在游戏中!);history.back()</script>" response.end end if if rslife.eof or rslife.bof then rslife.addnew rslife("character")=rs1("name") rslife("level")=rs1("cLevel") rslife("time")=now() rslife("lifecount")=rslife("lifecount")+1 else rslife("lifecount")=rslife("lifecount")+1 rslife("time")=now() rslife.update end if newlife=rslife("lifecount") if newlife >= 30 and newlife < 58 then dim bshnum bshnum=0 for i=121 to 760 Step 10 if ascB(midb(rs1("Inventory"),i,1))=lifeItems then bshnum=bshnum+1 end if Next if bshnum < (newlife-30)*levelItems+Itemsnum then rslife("lifecount")=rslife("lifecount")-1 rslife.update response.write "<script language=javascript>alert(\n\n你现在是"&newlife&"转,需要"&(newlife-30)*levelItems+Itemsnum&"个"&Itemsname&",你现在只有"&bshnum&"个,数清楚了没有!);history.back()</script>" response.end end if end if if newlife >=58 then dim bshnumb bshnumb=0 for i=121 to 760 Step 10 if ascB(midb(rs1("Inventory"),i,1))=lifeItemsb then bshnumb=bshnumb+1 end if Next if bshnumb < (newlife-58)*levelItems+Itemsnum then rslife("lifecount")=rslife("lifecount")-1 rslife.update response.write "<script language=javascript>alert(\n\n你现在是"&newlife&"转,需要"&(newlife-58)*levelItems+Itemsnum&"个创造宝石,你现在只有"&bshnumb&"个,数清楚了没有!);history.back()</script>" response.end end if end if if rs1("class")=0 or rs1("class")=1 then 计算公式 currentlevel=rs1("cLevel") getpoint=currentlevel rslife("getpoint")=rslife("getpoint")+getpoint rslife.update getpoint=rslife("getpoint") rs1("money")=rs1("money")-lifemoney rs1("cLevel")=lifedonelevel rs1("Experience")=lifedoneexp rs1("LevelUpPoint")=getpoint
rs1("Strength")=18 rs1("Dexterity")=18 rs1("Vitality")=15 rs1("Energy")=30 rs1("Inventory")=null rs1("Life")=60 rs1("MaxLife")=60 rs1("Mana")=60 rs1("MaxMana")=60 rs1("MapNumber")=0 rs1("MapPosX")=119 rs1("MapPosY")=113 rs1("Pklevel")=3 rs1("pktime")=0 rs1("pkcount")=0 rs1.update
if rs1("class")=1 then %> <center><br><font color=white>【<%=rs1("name")%>】 恭喜你的〖魔导师〗已经<%=rslife("lifecount")%>转成功,你现在已经有<%=getpoint%>自由分配点了,转生费:<%=lifemoney%>MU币!<br></font></center> <!--#include file="copyright.asp" --> <% response.end end if %> <center><br><font color=white>【<%=rs1("name")%>】 恭喜你的〖法师〗已经<%=rslife("lifecount")%>转成功,你现在已经有<%=getpoint%>自由分配点了,转生费:<%=lifemoney%>MU币!<br></font></center> <!--#include file="copyright.asp" --> <% response.end end if if rs1("class")=16 or rs1("class")=17 then 计算公式 currentlevel=rs1("cLevel") getpoint=currentlevel rslife("getpoint")=rslife("getpoint")+getpoint rslife.update getpoint=rslife("getpoint")
rs1("money")=rs1("money")-lifemoney rs1("cLevel")=lifedonelevel rs1("Experience")=lifedoneexp rs1("LevelUpPoint")=getpoint rs1("Strength")=28 本文章共5页,当前在第1页 1 2 3 4 5
 |
频道声明:本频道的文章除部分特别声明禁止转载的专稿外,可以自由转载.但请务必注明出出处和原始作者 文章版权归本频道与文章作者所有.对于被频道转载文章的个人和网站,我们表示深深的谢意。
| 原始作者:佚名 |
录入时间:2007-3-31 3:57:17 |
| 信息来源:不详 |
投稿信箱:itqoo@126.com |
|
|
 |
|