请教,如果通过smd传送门限制某职业去某地图的数量。
请教,如果通过smd传送门限制某职业去某地图的数量 ---------如果人法师>=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
别人发的,你借鉴下。 哈哈,用个简单办法,用NPC转送。 在FS号上放一个专用传送之石哈哈,就可以进国战。 国战限制职业进入,最好在程序中写入
页:
[1]