Big Problem(about New Char Trigger)

Newbie Spellweaver
Joined
Jun 14, 2008
Messages
15
Reaction score
0
hi guys,im really new to this RAN server. i made mine by following the instructions on this forum...but my biggest problem is, when my players relog, they get the same remaining stats, even if they already pumped it up...now, my server is a bit imbalanced due the overpumped stats of my players caused by this bug...pls help me...here is the script that i used:

USE [RanGame1]
GO
/****** Object: Trigger [dbo].[NewChar_Level] Script Date: 06/26/2008 18:15:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- ================================================== ====
-- Author: IaNz
-- Create date: --,--,--
-- Description: Starting Character Level,Skill and Stat Points
-- Dex,Pow,Int,Vit,Stm and Money
-- Note : If you have existing trigger replace CREATE TRIGGER
-- to ALTER TRIGGER
-- ================================================== ====

CREATE TRIGGER [dbo].[NewChar_Level] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaLevel=100
From Inserted
Where Inserted.ChaLevel = 1 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaSkillPoint=1000
From Inserted
Where Inserted.ChaSkillPoint = 1000 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaStRemain=10000
From Inserted
Where Inserted.ChaStRemain = 0 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaMoney=100000000
From Inserted
Where Inserted.ChaMoney = 0 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

END
 
i think there is no problem about your trigger just change the lvl insted of 100 change it to lvl 1 then put in the stat only 2 or 5 it defend in your default class char then presto you fix it
 
Upvote 0
CREATE TRIGGER [dbo].[NewChar_Level] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaLevel=1
From Inserted
Where Inserted.ChaLevel = 1 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaSkillPoint=2
From Inserted
Where Inserted.ChaSkillPoint = 2
and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaStRemain=2
From Inserted
Where Inserted.ChaStRemain = 2
and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaMoney=100000000
From Inserted
Where Inserted.ChaMoney = 0 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

END
 
Upvote 0
hi guys,im really new to this RAN server. i made mine by following the instructions on this forum...but my biggest problem is, when my players relog, they get the same remaining stats, even if they already pumped it up...now, my server is a bit imbalanced due the overpumped stats of my players caused by this bug...pls help me...here is the script that i used:

USE [RanGame1]
GO
/****** Object: Trigger [dbo].[NewChar_Level] Script Date: 06/26/2008 18:15:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- ================================================== ====
-- Author: IaNz
-- Create date: --,--,--
-- Description: Starting Character Level,Skill and Stat Points
-- Dex,Pow,Int,Vit,Stm and Money
-- Note : If you have existing trigger replace CREATE TRIGGER
-- to ALTER TRIGGER
-- ================================================== ====

CREATE TRIGGER [dbo].[NewChar_Level] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaLevel=100
From Inserted
Where Inserted.ChaLevel = 1 and
[ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaSkillPoint=1000
From Inserted
Where Inserted.ChaSkillPoint = 1000 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaStRemain=10000
From Inserted
Where Inserted.ChaStRemain = 0 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaMoney=100000000
From Inserted
Where Inserted.ChaMoney = 0 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

END

^
^ That's because of the bug on the red fonts above. [If u use all your stats and becomes 0, then after that you'll get again a 10000 stats points if u relogin.]

Please replaced that with this:

Update [ChaInfo] set [ChaInfo].ChaStRemain=10000
From Inserted
Where Inserted.ChaLevel = 1
and
[ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum
 
Last edited:
Upvote 0
^
^ That's because of the bug on the red fonts above. [If u use all your stats and becomes 0, then after that you'll get again a 10000 stats points if u recon.]

Please replaced that with this:

Update [ChaInfo] set [ChaInfo].ChaStRemain=10000
From Inserted
Where Inserted.ChaLevel = 1
and
[ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

well i also tried placing a positive value on that field, but what my players did was leave some stats corresponding to that number...for example, if i put 3 on that field, they will just leave 3 stat point and relog....then they get another additional 1k stat points....does anyone know how to fix this?
 
Upvote 0
I suggest you guys, don't use that trigger by ian, coz as what smarkies said there are bugs on that trigger. Just a suggestion guys, but its up to you if you use that trigger.
 
Upvote 0
well i also tried placing a positive value on that field, but what my players did was leave some stats corresponding to that number...for example, if i put 3 on that field, they will just leave 3 stat point and relog....then they get another additional 1k stat points....does anyone know how to fix this?

=================================================================================================
As i told u earlier. Please use this script and replaced your old one. Just try it... [The Blue FONTS is the modified that replacing your present starting StatRemain bug.]

Note: If there's an error encounter when u execute, just replaced the CREATE TRIGGER with ALTER TRIGGER.


USE [RanGame1]
GO
/****** Object: Trigger [dbo].[NewChar_Level] Script Date: 06/26/2008 18:15:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- ================================================== ====
-- Author: IaNz
-- Create date: --,--,--
-- Description: Starting Character Level,Skill and Stat Points
-- Dex,Pow,Int,Vit,Stm and Money
-- Note : If you have existing trigger replace CREATE TRIGGER
-- to ALTER TRIGGER
-- ================================================== ====

CREATE TRIGGER [dbo].[NewChar_Level] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaLevel=100
From Inserted
Where Inserted.ChaLevel = 1 and
[ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaSkillPoint=1000
From Inserted
Where Inserted.ChaSkillPoint = 1000 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

Update [ChaInfo] set [ChaInfo].ChaStRemain=10000
From Inserted
Where Inserted.ChaLevel = 1
and
[ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum


Update [ChaInfo] set [ChaInfo].ChaMoney=100000000
From Inserted
Where Inserted.ChaMoney = 0 and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum

END
 
Upvote 0
Back