dim chentitle,action,temp,itemid
chentitle="[雪宠宠物冒险乐园v1.0]·特殊专卖店"
Dv_plus.name="LJRpet"
'Dv_plus.checklogin()
Dvbbs.LoadTemplates("")
Dvbbs.Stats="[雪宠宠物冒险乐园v1.0]·特殊专卖店"
Dvbbs.Nav()
Dvbbs.Head_var 0,"","[雪宠宠物冒险乐园v1.0]·宠物大厅","LJR_pet_index.asp"
if DvBBS.UserId = 0 then
AlarmErrmsg
else
call petdb("")
call petonline(chentitle)
Dim Rs,SQL
dim itemlx
Dim zblvxz,zblvxzs,DEF_PET_szmoney,DEF_PET_skillmoney,DEF_PET_allstonemoney
Dim DEF_PET_lifeupmoney,DEF_PET_powerupmoney,DEF_PET_defupmoney,DEF_PET_pkNPCxzmoney,DEF_PET_pkNPCxzNum
Dim DEF_PET_seeLogmoney,DEF_PET_dbexpmoney,DEF_PET_dbexpNum,DEF_PET_AutoPKnpcmoney,DEF_PET_AutoPKnpcNum
Dim mylink,payuser
mylink=mylink&"http://"&request.ServerVariables("Server_NAME")&request.ServerVariables("SCRIPT_NAME")
if(len(trim(request.ServerVariables("QUERY_STRING")))>0) then
mylink=mylink & "?" & request.ServerVariables("QUERY_STRING")
end if
'response.Write mylink
payuser=request("payuser")
Dim curdate,v_oid,text,v_md5info,userID
'根据系统时间产生订单,格式:YYYYMMDD-v_mid-HMMSS
userID=dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userid").text
curdate=now()
v_oid=year(curdate)&month(curdate)&day(curdate)&"-"&v_mid&"-"&hour(curdate)&minute(curdate)&second(curdate)
text = userID&v_oid
end if '不是DVBBS用户结束
sub main()
action = Checkstr(request("action"))
if action = "" or isNULL(action) then
action = "weaponbox"
end if
select case action
case "weaponbox"
call weaponbox()
case "buyweapon"
itemid=lcase(request("itemid"))
if itemid = "" or isNULL(itemid) then
call showmessage("抱歉,系统找不到此数据!!!","?")
end if
call buyweapon()
case "itembox" call itbox()
case "buyitem"
call buyitem()
case "stone"
call godstone()
case else
call showmessage("抱歉,系统找不到此数据!!!","?")
end select
end sub
sub buyitem()
Response.Write("</table></table>")
dim temp,itemlx,sql,sql2,itmoney,logitt
Dim LJRpet_lifeupXZ,LJRpet_powerupXZ,LJRpet_defupXZ,LJRpet_lifeup,LJRpet_powerup,LJRpet_defup
' 0 1 2 3 4 5
Set rs=connpet.ExeCute("select LJRpet_lifeupXZ,LJRpet_powerupXZ,LJRpet_defupXZ,LJRpet_lifeup,LJRpet_powerup,LJRpet_defup FROM [LJRpet_useritem] WHERE username='"&dvbbs.membername&"'")
LJRpet_lifeupXZ = rs(0)
LJRpet_powerupXZ = rs(1)
LJRpet_defupXZ = rs(2)
LJRpet_lifeup = rs(3)
LJRpet_powerup = rs(4)
LJRpet_defup = rs(5)
itemlx=request("item") '类型
select case itemlx
case "exp"
itmoney=DEF_PET_basicexpmoney
logitt="经验药水"
case "exp2"
itmoney=DEF_PET_basicexpmoney2
logitt="经验圣水"
case "szstone"
itmoney=DEF_PET_szmoney
logitt="素质归元之石"
case "skillstone"
itmoney=DEF_PET_skillmoney
logitt="技能归元之石"
case "allstone"
itmoney=DEF_PET_allstonemoney
logitt="重生药水"
case "LJRpet_lifeup"
If LJRpet_lifeup>=1 Then call showmessage("请您先将之前买的先使用!","LJR_pet_itbox.asp?action=stone")
If LJRpet_lifeupXZ>5 Then call showmessage("您已经超过使用次数!","?action=stone")
If LJRpet_lifeupXZ<1 Then
itmoney=DEF_PET_lifeupmoney
Else
itmoney=DEF_PET_lifeupmoney*LJRpet_lifeupXZ*2
End if
logitt=""&LJRpet_lifeupXZ&"级长春圣水"
case "LJRpet_powerup"
If LJRpet_powerup>=1 Then call showmessage("请您先将之前买的先使用!","LJR_pet_itbox.asp?action=stone")
If LJRpet_powerupXZ>5 Then call showmessage("您已经超过使用次数!","?action=stone")
If LJRpet_powerupXZ<1 Then
itmoney=DEF_PET_powerupmoney
Else
itmoney=DEF_PET_powerupmoney*LJRpet_powerupXZ*2
End if
logitt=""&LJRpet_powerupXZ&"级力量圣水"
case "LJRpet_defup"
If LJRpet_defup>=1 Then call showmessage("请您先将之前买的先使用!","LJR_pet_itbox.asp?action=stone")
If LJRpet_defupXZ>5 Then call showmessage("您已经超过使用次数!","?action=stone")
If LJRpet_defupXZ<1 Then
itmoney=DEF_PET_defupmoney
Else
itmoney=DEF_PET_defupmoney*LJRpet_defupXZ*2
End if
logitt=""&LJRpet_defupXZ&"级体质圣水"
Case "LJRpet_pkNPCxz"
itmoney=DEF_PET_pkNPCxzmoney
logitt="怪兽诱捕卡"
case "LJRpet_seelog"
itmoney=DEF_PET_seeLogmoney
logitt="记录通行证"
case "LJRpet_dbexp"
itmoney=DEF_PET_dbexpmoney
logitt="双倍经验卡"
case "LJRpet_AutoPKnpc"
itmoney=DEF_PET_AutoPKnpcmoney
logitt="自动打怪卡,并获赠双倍经验卡"
case else
call showmessage("抱歉,系统找不到此数据!!!","?")
end select
If itemlx = "LJRpet_AutoPKnpc" Then '提醒您:这是买【自动打怪卡】,送【双倍经验卡】
sql2= "update [LJRpet_useritem] set LJRpet_AutoPKnpc=LJRpet_AutoPKnpc+1,LJRpet_dbexp=LJRpet_dbexp+1 where username='"&DvBBS.MemberName&"'"
else
sql2= "update [LJRpet_useritem] set "&itemlx&"="&itemlx&"+1 where username='"&DvBBS.MemberName&"'"
End If
connpet.ExeCute(sql2)
Dim logTSbuy
logTSbuy=""&DvBBS.MemberName&"使用<a href=http://www1.86zjw.cn/cl/ target=_blank>官方帐号</a>:<font color=blue>"&payuser&"</font>花费"&itmoney&"点卷购买了:<font color=red>"&logitt&"</font>!"
Call AddpetLog(logTSbuy,9)
rs.close
Set rs=nothing
connpet.close
set connpet=Nothing
'call showmessage("你已成功购买"&LJRpet_defup&"!","?action=stone")
Response.redirect "?"
end sub
接下 作者:
xuewuhen 时间: 2006-8-10 16:54 标题: 接上
'提醒您:下面是购买装备
sub buyweapon()
Response.Write("</table></table>")
Call xzitem() '提醒您:这是判断储物箱是否已经满了!
dim temp,temp2,templx,rs,sql,rs2,rs3,sql2,sql3,itmoney
Dim tslv,buyselect
sql="select * from LJRpet_weaponshop where id="&buyselect(0)&""
set rs=connpet.ExeCute(sql,0,1)
temp=Split(rs("itemsm"),"|")
templx=rs("itemlx")
‘提醒您:下面是装备所需转生限制
If templx<>99 then
temp(3)=clng(temp(8)/100)
If temp(3)>1 Then temp(3)=clng(temp(3)-1)*2
Else
If temp(8)<6000 then
temp(3)=clng(temp(8)/2000)
Else
temp(3)=10
End if
End if
if temp(3)<0 then temp(3)=0
rs.close
set rs=Nothing
sql2 = "insert into LJRpet_useritem2 (username,itemsm,itemlx) values ('"&DvBBS.MemberName&"','"&temp2&"','"&templx&"')"
connpet.ExeCute(sql2)
'提醒您:下面是赠送记录
Dim TSitemDJ
If buyselect(3) > 0 then
select case buyselect(3)
case 1
TSitemDJ="<font color=#FF0000><b>黄金</b></font>"
case 2
TSitemDJ="<font color=#9900CC><b>紫色</b></font>"
case 3
TSitemDJ="<font color=#0000FF><b>蓝色</b></font>"
case 4
TSitemDJ="<font color=#000000><b>黑色</b></font>"
end Select
Else
TSitemDJ="普通"
End if
connpet.close
set connpet=Nothing
call showmessage3("你已经购买了一项特殊装备装备!<br><br><a href=LJR_pet_itbox.asp><font color=red>马上去储物箱整理我的装备!</font></a>","?")
end sub
If LJRpet_lifeupXZ<1 Then LJRpet_lifeupXZ=1
If LJRpet_powerupXZ<1 Then LJRpet_powerupXZ=1
If LJRpet_defupXZ<1 Then LJRpet_defupXZ=1
rs.close
Set rs=nothing