搜索
 找回密码
 加入

请教,如果通过smd传送门限制某职业去某地图的数量。

lz2006 2013-7-14 22:30:29 1190
请教,如果通过smd传送门限制某职业去某地图的数量
随机推荐

4 回复

343238654
2013-7-13 08:45:37
点击查看详情
---------如果人法师>=8,更新所有人法师角色不能上线,如果人法师<8,更新所有人法师角色可以上线
DECLARE @ren int
select @ren =count(*)  from knight.dbo.userdata where struserid in (select strcharid from Knight_Account.dbo.CURRENTUSER ) and class=210
if @ren>=8
BEGIN

        update knight.dbo.userdata set nServerIndex=2 where class=210 and struserid not in (select strcharid from Knight_Account.dbo.CURRENTUSER )
        RETURN
END

select @ren =count(*)  from knight.dbo.userdata where struserid in (select strcharid from Knight_Account.dbo.CURRENTUSER ) and class=210
if @ren<8
BEGIN
        update knight.dbo.userdata set nServerIndex=1 where class=210 and struserid not in (select strcharid from Knight_Account.dbo.CURRENTUSER )and nServerIndex<>1
        RETURN

END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
别人发的,你借鉴下。
骑士疯子
2013-7-14 22:29:27
哈哈,用个简单办法,用NPC转送。
骑士疯子
2013-7-14 22:30:01
在FS号上放一个专用传送之石哈哈,就可以进国战。
骑士疯子
2013-7-14 22:30:29
国战限制职业进入,最好在程序中写入
高级模式
游客