only
发表于 2012-12-12 17:03:50
存储
CREATEprocedure .
(@strOldUserId varchar(30),@StrNewUserId varchar(30))
AS
DECLARE @strCheckOldUserID varchar(30),@strCheckNewUserID varchar(30)
BEGIN TRAN
SELECT @strCheckOldUserID = Count(strUserId) FROM USERDATA WHERE strUserId = @strOldUserId
IF @strCheckOldUserID = 0
BEGIN
PRINT 'Veritaban?nda ' + @strOldUserId + ' Ad?nda Karakter Bulunamad?.'
END
ELSE
BEGIN
SELECT @strCheckNewUserID = Count(strUserId) FROM USERDATA WHERE strUserId = @StrNewUserId
IF @strCheckNewUserID = 0
BEGIN
UPDATE ACCOUNT_CHAR set strCharID1 = @StrNewUserId WHERE strCharID1 = @strOldUserId
UPDATE ACCOUNT_CHAR set strCharID2 = @StrNewUserId WHERE strCharID2 = @strOldUserId
UPDATE ACCOUNT_CHAR set strCharID3 = @StrNewUserId WHERE strCharID3 = @strOldUserId
UPDATE USERDATA SET strUserId = @StrNewUserId WHERE strUserId = @strOldUserId
UPDATE KNIGHTS_USER SET strUserId = @StrNewUserId WHERE strUserId = @strOldUserId
UPDATE KNIGHTS SET Chief = @StrNewUserId WHERE Chief = @strOldUserId
UPDATE KNIGHTS SET ViceChief_1 = @StrNewUserId WHERE ViceChief_1 = @strOldUserId
UPDATE KNIGHTS SET ViceChief_2 = @StrNewUserId WHERE ViceChief_2 = @strOldUserId
UPDATE KNIGHTS SET ViceChief_3 = @StrNewUserId WHERE ViceChief_3 = @strOldUserId
UPDATE KING_SYSTEM SET strKingName = @StrNewUserId WHERE strKingName = @strOldUserId
UPDATE KING_ELECTION_LIST SET strName = @StrNewUserId WHERE strName = @strOldUserId
PRINT @strOldUserId + ' Olan Karakter Ad? ' + @strNewUserId + ' Olarak De?i?tirilmi?tir.'
END
ELSE
BEGIN
PRINT @StrNewUserId + ' Karakter Ad? Kullan?mdad?r, Lütfen Ba?ka Bir Karakter Ad? Yaz?n?z.'
END
END
COMMIT
GO
only
发表于 2012-12-12 17:06:25
在发个邮件发送装备的网页
<!--#include file="config.asp"-->
<%
action=trim(request("action"))
if action="send" then
strUserID=trim(CheckStr(request.form("strname")))
smethod=trim(CheckStr(request.form("smethod")))
If strUserID<>"" Then
dwid=Trim(request("dwid"))
dur=Trim(request("dur"))
amount=Trim(request("amount"))
strnote=Trim(request("strnote"))
If dwid="" Or dur="" Or amount="" Or Not IsNumeric(dwid) Or Not IsNumeric(dur) Or Not IsNumeric(amount) or strnote="" Then
msg="需要输入装东西的理由;或者输入了错误的参数,只能输入数字!"
Else
Set rs=ConnGame.execute("select strUserID from USERDATA where strUserID='" & strUserID & "'")
if not rs.eof then
If smethod<>"" Then
ConnGame.execute("Insert Into "&GameDB&".dbo.MAIL_BOX(strSendUserID,strRecvUserID,strSubject,strMail,bItemState,nSendItemID,sCount,tUpdateDate) Values('管理员','"&strUserID&"','商品发放','商品发放','2',"&dwid&",1,'"&Date()&"')")
msg="在线发送成功 - 时间:"&now()&"!"
else
Set rs1=ConnAccount.execute("select strCharID from CURRENTUSER where strCharID='" & strUserID & "'")
If rs1.eof Then
If sendItem(dwid,dur,amount,strUserID)=0 Then
msg="离线发送成功 - 时间:"&now()&"!"
Else
msg="发送失败!"
End If
Else
msg="人物在线,无法发送!"
End If
rs1.close:Set rs1=nothing
end if
else
msg="未找到相应的角色!"
End If
'rs.close:set rs=nothing
End if
else
msg="需要输入人物名"
End if
'response.write("<script>parent.document.getElementById('strnote').value='';</script>")
response.write("<script>parent.document.getElementById('sendresult').innerHTML='"&msg&"';</script>")
response.write("<script>alert('"&msg&"');</script>")
response.end
end if
if action="search" then
strname1=trim(request("strname1"))
strname2=trim(request("strname2"))
strnum=trim(request("strnum"))
stype=trim(request("stype"))
result=""
if stype="bynum" then
if strnum<>"" and isnumeric(strnum) then
set rs=ConnGame.execute("select top 1 * from ITEM where num="&strnum)
if not rs.eof then
result="物品代码:"&rs("num")&" / 物品名称:"&rs("strname")
else
result="未找到相关物品!"
end if
rs.close:set rs=nothing
else
result="代码填写有误!"
end if
response.write("<script>parent.document.getElementById('result2').innerHTML='"&result&"';</script>")
else
if strname1<>"" and strname2<>"" then
set rs=ConnGame.execute("select top 1 * from ITEM where strname like '%"&strname1&"%' and strname like '%"&strname2&"%'")
elseif strname1<>"" then
set rs=ConnGame.execute("select top 1 * from ITEM where strname like '%"&strname1&"%'")
else
set rs=ConnGame.execute("select top 1 * from ITEM where num=379156000")
end if
if not rs.eof then
result="物品代码:"&rs("num")&" / 物品名称:"&rs("strname")
else
result="未找到相关物品!"
end if
rs.close:set rs=nothing
response.write("<script>parent.document.getElementById('result1').innerHTML='"&result&"';</script>")
end if
response.end
end if
Function sendItem(dwid,dur,amount,strUserID)
sendItem=0
if dwid<>0 then
dim i
dim j
dim EqItem(2,41)
i = 0
j = 0
Do While j < 42
Sql = "select cast(cast(substring(cast(strItem as varbinary(400))," & i + 4 & ", 1)+substring(cast(strItem as varbinary(400)), " & i + 3 & ", 1)+substring(cast(strItem as varbinary(400)), " & i + 2 & ", 1)+substring(cast(strItem as varbinary(400))," & i + 1 & ", 1) as varbinary(4)) as int(4)) as id,cast(cast(substring(cast(strItem as varbinary(400))," & i + 6 & ", 1)+substring(cast(strItem as varbinary(400)), " & i + 5 & ", 1) as varbinary(2)) as smallint(2)) as dur,cast(cast(substring(cast(strItem as varbinary(400))," & i + 8 & ", 1)+substring(cast(strItem as varbinary(400)), " & i + 7 & ", 1) as varbinary(2)) as smallint(2)) as Count from USERDATA where strUserId='" & strUserID & "'"
set rs= Server.CreateObject("ADODB.Recordset")
Rs.Open Sql, ConnGame, 1, 1
If Rs("Id") >= 0 Then
EqItem(0, j) = Rs("Id")
EqItem(1, j) = Rs("Dur")
EqItem(2, j) = Rs("Count")
End If
j = j + 1
i = i + 8
Rs.Close
Loop
dim flag
flag=false
for i=0 to 41
if EqItem(2,i)=0 and i>13 then
flag=true
exit for
end if
next
if flag=false then
sendItem=1'没有空位了
Exit function
end if
EqItem(0,i)=dwid
EqItem(1,i)=dur
EqItem(2,i)=amount
i = 0
j = 0
Do While j < 42
Sql = "update USERDATA set strItem=cast(substring(cast(strItem as varbinary(400)),1," & i & ")+"
Sql = Sql + "substring(cast(" & EqItem(0, j) & " as varbinary(4)),4,1)+"
Sql = Sql + "substring(cast(" & EqItem(0, j) & " as varbinary(4)),3,1)+"
Sql = Sql + "substring(cast(" & EqItem(0, j) & " as varbinary(4)),2,1)+"
Sql = Sql + "substring(cast(" & EqItem(0, j) & " as varbinary(4)),1,1)+"
Sql = Sql + "substring(cast(" & EqItem(1, j) & " as varbinary(2)),2,1)+"
Sql = Sql + "substring(cast(" & EqItem(1, j) & " as varbinary(2)),1,1)+"
Sql = Sql + "substring(cast(" & EqItem(2, j) & " as varbinary(2)),2,1)+"
Sql = Sql + "substring(cast(" & EqItem(2, j) & " as varbinary(2)),1,1) as varbinary(400)) where strUserId='" & strUserID & "'"
ConnGame.Execute Sql
j = j + 1
i = i + 8
Loop
End if
End Function
function getitemname(num)
set gis=conngame.execute("select num,strname from item where num="&num)
if not gis.eof then
getitemname=gis("strname")
else
getitemname=num
end if
gis.close:set gis=nothing
end function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="style.css" rel="Stylesheet" type="text/css" />
</head>
<body id="content">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="introTbl">
<tr>
<td colspan="2" class="t" height="25">装备发送</td>
</tr>
<tr>
<td height="25" width="50" align="right"> </td>
<td align="left">
<form id="searchFrm" name="searchFrm" method="POST" action="fzb.asp?action=send" style="margin:5px;" target="postFrm">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<tdheight="25">理由:</td>
<td align="left"><input name="strnote" type="text" class="input" id="strnote" style="width:200px;" value="GM赠送物品" readonly="readonly" /></td>
</tr>
<tr>
<td height="25" width="70">角色名:</td>
<td align="left"><input type="text" name="strName" class="input" style="width:200px;"/></td>
</tr>
<tr>
<tdheight="25">物品ID:</td>
<td align="left"><input type="text" name="dwid" class="input" style="width:200px;" value="1" /></td>
</tr>
<tr>
<tdheight="25">耐久:</td>
<td align="left"><input name="dur" type="text" class="input" style="width:200px;" value="1" readonly="readonly" /></td>
</tr>
<tr>
<tdheight="25">数量:</td>
<td align="left"><input name="amount" type="text" class="input" style="width:200px;" value="1" readonly="readonly" /></td>
</tr>
<tr>
<tdheight="25">方式:</td>
<td align="left"><input name="smethod" type="checkbox" value="1" checked="checked" />
打勾即为在线发送。</td>
</tr>
<tr>
<td height="35"> </td>
<td align="left"><input type="submit" class="btns" value="发送" /></td>
</tr>
<tr>
<td height="25"> </td>
<td id="sendresult" align="left" style="color:green;font-weight:bold;"> </td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td colspan="2" class="t" height="25">按名称搜代码</td>
</tr>
<tr>
<td height="25" width="50" align="right"> </td>
<td align="left">
<form id="searchFrm" name="searchFrm" method="POST" target="postFrm" action="fzb.asp?action=search" style="margin:5px;">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="25" width="70">字符一:</td>
<td align="left"><input type="text" name="strName1" class="input" style="width:200px;" /> *</td>
</tr>
<tr>
<td height="25" width="70">字符二:</td>
<td align="left"><input type="text" name="strName2" class="input" style="width:200px;" /></td>
</tr>
<tr>
<td height="25"> </td>
<td align="left"><input type="submit" class="btns" value="搜索" /></td>
</tr>
<tr>
<td height="25"> </td>
<td id="result1" align="left" style="color:green;font-weight:bold;"> </td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td colspan="2" class="t" height="25">按代码搜名称</td>
</tr>
<tr>
<td height="25" width="50" align="right"> </td>
<td align="left">
<form id="searchFrm" name="searchFrm" method="POST" target="postFrm" action="fzb.asp" style="margin:5px;">
<input type="hidden" name="action" value="search" />
<input type="hidden" name="stype" value="bynum" />
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="25" width="70">代码:</td>
<td align="left"><input type="text" name="strnum" class="input" style="width:200px;" /> *</td>
</tr>
<tr>
<td height="25"> </td>
<td align="left"><input type="submit" class="btns" value="搜索" /></td>
</tr>
<tr>
<td height="25"> </td>
<td id="result2" align="left" style="color:green;font-weight:bold;"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<iframe id="postFtm" name="postFrm" height="0" width="0" scrolling="no" frameborder="0" src="about:blank"></iframe>
</body>
</html>
<%closeconn()%>
only
发表于 2012-12-12 17:31:18
在发个 商城系统 BUG提交的某些人老认为 是你写的 今天我就发出来。要点B脸
商城
http://pan.baidu.com/share/link?shareid=137388&uk=304814469
only
发表于 2012-12-12 17:35:22
功能 3角色读取toto你那B 下载看看是你写的不 狗杂种
only
发表于 2012-12-12 17:45:38
在发一个 网页刷新贡献的储存 和脚本
CREATE PROCEDURE imbacodermyst AS
BEGIN TRAN
delete knights_user where struserid not in (select struserid from userdata)
exec RANK_KNIGHTS
exec UPDATE_PERSONAL_RANK
exec USER_KNIGHTS_RATING_UPDATE
COMMIT TRAN
GO
存储
only
发表于 2012-12-12 17:46:45
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="style.css" rel="Stylesheet" type="text/css" />
</head>
<body id="content">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="introTbl">
<tr>
<td colspan="2" class="t" height="25">操作说明</td>
</tr>
<%
action=trim(request("action"))
if action="flush" then
set rs=connGame.execute("exec imbacodermyst")
%>
<tr>
<td height="25"> </td>
<td align="left"><font color=green>贡献刷新成功!</font></td>
</tr>
<%
set rs=nothing
end if
%>
<tr>
<td height="25"> </td>
<td align="left">提示:可能耗时较长。</td>
</tr>
<tr>
<td colspan="2" height="25"></td>
</tr>
<tr>
<td colspan="2" class="t" height="25">贡献刷新操作</td>
</tr>
<tr>
<td height="25" width="100" align="right">操作:</td>
<td align="left">
<form name="olcharSearch" id="olcharSearch" method="post" action="?action=flush">
<input type="submit" id="submit" value="开始刷新贡献数据" />
</form>
</td>
</tr>
<tr>
<td height="25"> </td>
<td align="left">提示:可能时间较长,请不要重复刷新。</td>
</tr>
<tr>
<td colspan="2" height="25"></td>
</tr>
</table>
</body>
</html>
<%closeconn()%>
only
发表于 2012-12-12 17:47:22
少发了一个这个
<!--#include file="config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
ctgwglzc
发表于 2012-12-12 20:13:59
有登陆器没,一起分享呗,让大家都开服
only
发表于 2012-12-12 21:06:28
GB发了登陆器 改下版本就行了
343238654
发表于 2012-12-13 02:18:31
哥们辛苦了,现在国内除了一个稳定的消耗服,PK服基本2月就没人了,开马甲服的也开始搞消耗服坑人了,你这样发出来,不是又要多一批垃圾服了,╮(╯▽╰)╭