Well, as i know, in RIP Extreme Server, there are no limit for us to add new character, i mean using new character card, that was what i thought. But the owner had clarify :
Originally Posted by geger009
the truth is..it has a limit..base on source code the limit is 16 for one account..
Still, if you want to limit it again, so user can only have a few number of character under 1 account, you can exec this query :
PHP Code:
USE [RanUser] GO /****** Object: StoredProcedure [dbo].[UpdateChaNumIncrease] Script Date: 10/26/2012 03:29:39 ******/
/*
edited by akuila
*/ SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[UpdateChaNumIncrease]
@nUserNum int,
@nReturn int OUTPUT AS
DECLARE
@error_var int,
@rowcount_var int,
@curchar int,
@remain int
SET NOCOUNT ON
SET @nReturn = 0
select @curchar = COUNT(1) from RanGame1.dbo.ChaInfo where UserNum = @nUserNum and ChaDeleted = 0
select @remain = ChaRemain from UserInfo where UserNum = @nUserNum
if(@curchar + @remain + 1 <= 12) -- change the number 12 to your maximum character allowed in 1 account
begin
UPDATE UserInfo
SET ChaRemain=ChaRemain+1
WHERE UserNum=@nUserNum
SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
end
-- this part, i was trying to give a warning to user that they already have a maximum number of allowed character but not working, you can remove it if you want.
-- well, if somebody know about this, please tell me :)
else
begin
SET @nReturn = -1
SET NOCOUNT OFF
RETURN @nReturn
end
on this point, i believe you know what to do, right ?
known bugs :
- there are no error message to user in game when they already reached the maximum number of allowed character, so the new character card will always useable but will not increased the ChaRemain.
akuila
Ragezone