TA的每日心情 | 开心 2024-10-29 12:31 |
---|
签到天数: 139 天 [LV.7]常住居民III 鲜花( 5) 鸡蛋( 0)
|
--说明:此SQL脚本专为传奇3(3G)服务器合区而写,以下一区表示合并区,二区表示被合并区
--思路:将二区的ID和角色名全部加符号以示区分,比如我用“2q”。
--提示:1、先在一区的SQL中建立三个数据库account2、game3g2,kingforeiserverbasedata2,
-- 将二区的account和game3g,kingforeiserverbasedata2倒入或者还原到以上两个库中。
--提示:2、然后在下面的@UserID数值输入你想加上的符号,比如@UserID='2q'。@UserName=想加在角色身上的符号
--提示:3、查询一区装备库的最后一个生成物品序列号,并输入到下面的@MakeIndex数值中
--提示:4。下面
--严重提示:合区前请先备份好数据库,否则后果自负
加级SQL命令(替换下面的这一列)
print '正在更新二区角色库...'
UPDATE [game3g2].[dbo].[TBL_ABILITY]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName,FLD_LEVEL=FLD_LEVEL+5 (等级数字)
手动加等级
Update TBL_ABILITY set FLD_LEVEL=FLD_LEVEL+5 (等级数字)
加分SQL命令 (替换下面的这一列)
print '正在更新二区积分库...'
UPDATE [kingforeiserverbasedata2].[dbo].[HL_JiFen]
SET User_ID=rtrim(User_ID)+@UserID,User_JiFen=User_JiFen+5 (积分数字)
手动加积分
Update HL_JiFen set User_JiFen=User_JiFen+5 (积分数字)
;;下面是正式合区命令
DECLARE @UserID varchar(20),@UserName varchar(20),@MakeIndex Int
set @UserID='2q'
set @UserName='☆'
set @MakeIndex=32039528
print '正在更新二区ID库...'
UPDATE [account2].[dbo].[TBL_ACCOUNT]
SET FLD_LOGINID=rtrim(FLD_LOGINID)+@UserID
UPDATE [account2].[dbo].[TBL_ACCOUNTADD]
SET FLD_LOGINID=rtrim(FLD_LOGINID)+@UserID
print '正在更新二区角色库...'
UPDATE [game3g2].[dbo].[TBL_ABILITY]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName
UPDATE [game3g2].[dbo].[TBL_CHARACTER]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName,FLD_USERID=rtrim(FLD_USERID)+@UserID
UPDATE [game3g2].[dbo].[TBL_ITEM]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName,FLD_MAKEINDEX=FLD_MAKEINDEX+@MakeIndex
UPDATE [game3g2].[dbo].[TBL_MAGIC]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName
UPDATE [game3g2].[dbo].[TBL_QUEST]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName
UPDATE [game3g2].[dbo].[TBL_SAVEDITEM]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName,FLD_MAKEINDEX=FLD_MAKEINDEX+@MakeIndex
print '正在更新夫妻数据库...'
Update [game3g].[dbo].[TBL_SUBHUMAN]
Set FLD_SERVER='服务器区名'
Update [game3g2].[dbo].[TBL_SUBHUMAN]
Set FLD_SERVER='服务器区名'
Update [game3g2].[dbo].[TBL_SUBHUMAN]
Set FLD_CHARACTER=Rtrim(FLD_CHARACTER)+@UserName
Update [game3g2].[dbo].[TBL_SUBHUMAN]
Set FLD_SPOUSE=Rtrim(FLD_SPOUSE)+@UserName where FLD_SPOUSE <> ''
print '正在更新二区积分库...'
UPDATE [kingforeiserverbasedata2].[dbo].[HL_JiFen]
SET User_ID=rtrim(User_ID)+@UserID
print '正在更新二区转生库...'
UPDATE [kingforeiserverbasedata2].[dbo].[HL_HumPlus]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@UserName
print '正在合并ID数据库...'
insert into [account].[dbo].[TBL_ACCOUNT]
SELECT * FROM [account2].[dbo].[TBL_ACCOUNT]
INSERT INTO [account].[dbo].[TBL_ACCOUNTADD]
SELECT * FROM [account2].[dbo].[TBL_ACCOUNTADD]
PRINT '正在合并角色数据库...'
INSERT INTO [game3g].[dbo].[TBL_ABILITY]
SELECT * FROM [game3g2].[dbo].[TBL_ABILITY]
INSERT INTO [game3g].[dbo].[TBL_CHARACTER]
SELECT * FROM [game3g2].[dbo].[TBL_CHARACTER]
INSERT INTO [game3g].[dbo].[TBL_ITEM]
SELECT * FROM [game3g2].[dbo].[TBL_ITEM]
INSERT INTO [game3g].[dbo].[TBL_MAGIC]
SELECT * FROM [game3g2].[dbo].[TBL_MAGIC]
INSERT INTO [game3g].[dbo].[TBL_QUEST]
SELECT * FROM [game3g2].[dbo].[TBL_QUEST]
INSERT INTO [game3g].[dbo].[TBL_SAVEDITEM]
SELECT * FROM [game3g2].[dbo].[TBL_SAVEDITEM]
PRINT '正在合并夫妻数据库...'
INSERT INTO [game3g].[dbo].[TBL_SUBHUMAN]
SELECT * FROM [game3g2].[dbo].[TBL_SUBHUMAN]
PRINT '正在合并积分数据库...'
INSERT INTO [kingforeiserverbasedata].[dbo].[HL_JiFen]
SELECT * FROM [kingforeiserverbasedata2].[dbo].[HL_JiFen]
PRINT '正在合并积分转生库...'
INSERT INTO [kingforeiserverbasedata].[dbo].[HL_HumPlus]
SELECT * FROM [kingforeiserverbasedata2].[dbo].[HL_HumPlus]
PRINT '合区工作完毕'
|
|