自动踢号_MU-GM游戏官网-奇迹商业服务端丨奇迹商业服务端架设教程丨奇迹MU定制
1656351178
当前位置:主页 > 新闻资讯 > 技术动态 >

自动踢号

发布日期:2024-04-29 浏览次数:

游戏运行过程中,有可能会遇到卡号或是玩家使用外挂的情况,我们通常需要帮忙调整以及封号,对于使用了青云断线重连的GM而言,玩家踢下线了还会自动重新连接进入游戏,所以我们可以直接使用数据库代码进行移动玩家账号以及封号。

 
--//**********************************
--//** 登陆存储过程(增加自动T 使用中帐号,罗兰卡号,魔炼卡号,狼魂卡号)
--//********************************
CREATE    PROCEDURE WZ_CONNECT_MEMB 
@uid varchar(10),
@server varchar(20),
@uip varchar(20)
AS
 
Begin
 
BEGIN TRANSACTION
 
SET NOCOUNT ON 
 
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED) WHERE memb___id = @uid )
Begin 
    UPDATE MEMB_STAT
        SET ip = @uip , connectstat = 1 , servername = @server , ConnectTM = (getdate())
        WHERE memb___id = @uid
End
ELSE
Begin
    INSERT INTO MEMB_STAT ( memb___id,ip,connectstat,servername) 
        valueS (@uid,@uip,1,@server ) 
End 
IF(@@Error <> 0 )
    ROLLBACK TRANSACTION
ELSE 
    COMMIT TRANSACTION
 
--写入登录记录
IF EXISTS ( SELECT UserID FROM UserLogin WITH (READUNCOMMITTED) WHERE UserID = @uid )
Begin 
    UPDATE UserLogin
        SET LoginIP=@uip,Server=@server,LoginTM = (getdate()),OnlineSec=0,GiveMoney=0,logoutTM=null
        WHERE UserID = @uid
End
ELSE
Begin
    INSERT INTO UserLogin (UserID,LoginIP,Server,LoginTM,OnlineSec,GiveMoney)
        values (@uid,@uip,@server,getdate(),0,0) 
End 
--自动封服务器不准进入的人物
declare @SmallestZS int
declare @LargestZS int
declare @Type int
select @Type=Type from SetServerList where ServerName=@server
 
if (@Type>0) begin
 
    select @SmallestZS=Smallest_ZS from SetServerList where ServerName=@server
    select @LargestZS=Largest_ZS from SetServerList where ServerName=@server
 
    if not (@SmallestZS is null) begin 
    update character set ctlcode=(ctlcode | 0x81) where [name] not in
    (
        SELECT NAME FROM WEB_ZS WHERE (ACC = @uid) AND (ZSCS >= @LargestZS) AND (ZSCS <= @SmallestZS) 
     ) AND (AccountID = @uid) 
    end
end
DELETE FROM MEMB_STAT_GJ WHERE (memb___id = @uid  and servername=@server)
update character set ctlcode=(ctlcode | 0x81) where [name]  in
(
SELECT name FROM MEMB_STAT_GJ WHERE (memb___id = @uid)
) AND (AccountID = @uid)
 
-- 把卡在线的玩家T下线
Declare @Map int
Select @Map=MapNumber from Character Where AccountID = @uid
if (@Map=30)
begin
    UPDATE [MEMB_STAT] Set ConnectStat=0 where memb___id=@uid
end 
else
if (@Map=31)
begin
    UPDATE [MEMB_STAT] Set ConnectStat=0 where memb___id=@uid
end 
else
if (@Map=34)
begin
    UPDATE [MEMB_STAT] Set ConnectStat=0 where memb___id=@uid
end 
-- 把卡在罗兰的帐号移动回勇者大陆
UPDATE [Character] SET MapNumber = 0, MapPosX = 130, MapPosY = 130 WHERE (MapNumber = 30) AND (AccountID = @uid) OR (MapNumber = 31) AND (AccountID = @uid) OR (MapNumber = 32) AND (AccountID = @uid) OR (MapNumber = 34) AND (AccountID = @uid) OR (MapNumber = 9) AND (AccountID = @uid) OR (MapNumber = 10) AND (AccountID = @uid) OR (MapNumber = 11) AND (AccountID = @uid) OR (MapNumber = 12) AND (AccountID = @uid) OR (MapNumber = 13) AND (AccountID = @uid) OR (MapNumber = 14) AND (AccountID = @uid) OR (MapNumber = 15) AND (AccountID = @uid) OR (MapNumber = 16) AND (AccountID = @uid) OR (MapNumber = 17) AND (AccountID = @uid) OR (MapNumber = 18) AND (AccountID = @uid) OR (MapNumber = 19) AND (AccountID = @uid) OR (MapNumber = 20) AND (AccountID = @uid) OR (MapNumber = 21) AND (AccountID = @uid) OR (MapNumber = 22) AND (AccountID = @uid) OR (MapNumber = 23) AND (AccountID = @uid) OR (MapNumber = 52) AND (AccountID = @uid) OR (MapNumber = 53) AND (AccountID = @uid)
 
SET NOCOUNT OFF 
End
GO

clear up By:MU-GM   QQ:1656351178  网站:www.mu-gm.com
 

在线咨询

点击这里给我发消息 1656351178

点击这里给我发消息 1656351178

在线咨询

手机通话

咨询时间:09:00-21:00

请输入您的联系电话,座机请加区号

手机通话

微信扫一扫

微信二维码

微信联系
返回顶部