Insert Buffs (Not Nerver Ending)

07/10/2019 02:11 [GameAdvisor]Finn#1
Hi epvp.
Anyone know how to add Buffs on New Character? (Not Never Ending)
example 30Days CRR only. then after 30days buffs need to use CRR again..

thanks for the answers..
07/10/2019 09:44 nick4ever#2
Try look at table PS_GameData.dbo.charapplyskills

There some fields you should clarify: charid, skillid, skilllevel, leftresettime

Add the insert sql in store procedure create new char.
07/10/2019 13:50 Elessatr#3
07/10/2019 17:42 [GameAdvisor]Finn#4
Quote:
Originally Posted by Elessatr View Post
i already have this sir for never ending 30days buffs
but i need is not never ending..
example : i give free 7 or 30days CRR on new create char then after 7 or 30days . CRR is gone..
by the way thanks for give a time to answer my question
07/10/2019 22:41 SnickQ#5
For new char add it into usp_Create_Char_R procedure
07/12/2019 04:21 Mike__#6
i have not done this but if I am going to do this, i would agree with @[Only registered and activated users can see links. Click Here To Register...], i will go check at SP usp_Create_Char_R.
we put our SP for newly created characters there.

I did this once but through BaseGearsDefs:
- i gave the item to newly created characters and item locked it to their inventory, this way they can use the item anytime they wished to use it. (because some players wish to use it in a later time not UPON creation)

[Only registered and activated users can see links. Click Here To Register...]
07/12/2019 14:40 [GameAdvisor]Finn#7
Quote:
Originally Posted by Mike__ View Post
i have not done this but if I am going to do this, i would agree with @[Only registered and activated users can see links. Click Here To Register...], i will go check at SP usp_Create_Char_R.
we put our SP for newly created characters there.

I did this once but through BaseGearsDefs:
- i gave the item to newly created characters and item locked it to their inventory, this way they can use the item anytime they wished to use it. (because some players wish to use it in a later time not UPON creation)

[Only registered and activated users can see links. Click Here To Register...]
yeah but that way player will make multiple character then trade to other character.. because i want to add custom buffs i made like nos buffs but i want to make it use already when character create so can't trade the free 30days or 7days Nos buffs :)
07/12/2019 15:09 SnickQ#8
Quote:
Originally Posted by [GameAdvisor]Finn View Post
yeah but that way player will make multiple character then trade to other character.. because i want to add custom buffs i made like nos buffs but i want to make it use already when character create so can't trade the free 30days or 7days Nos buffs :)
Then why you not use this to insert buff into CharApplySkills?
07/12/2019 15:32 [GameAdvisor]Finn#9
Quote:
Originally Posted by SnickQ View Post
Then why you not use this to insert buff into CharApplySkills?
SET @[Only registered and activated users can see links. Click Here To Register...]D = IDENT_CURRENT('Chars')
INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES @[Only registered and activated users can see links. Click Here To Register...]D,286,3,2592000)
END

RETURN @[Only registered and activated users can see links. Click Here To Register...]D

SET NOCOUNT OFF

like this sir?
07/12/2019 15:33 Mike__#10
Quote:
Originally Posted by [GameAdvisor]Finn View Post
yeah but that way player will make multiple character then trade to other character.. because i want to add custom buffs i made like nos buffs but i want to make it use already when character create so can't trade the free 30days or 7days Nos buffs :)
Not if the item is locked in the character's inventory. :D
07/13/2019 19:52 [ADMIN]Phreak#11
Programmability > usp_Create_Char_R
The specific SQL code adds a 7-Day Continuous Resurrection Rune to new characters.

All you have to do is change the SkillID, SkillLevel and LeftResetTime to your skill.
Make sure that LeftResetTime is in seconds.

Code:
INSERT INTO PS_GameData.dbo.CharApplySkills
(CharID, SkillID, SkillLevel, LeftResetTime)
VALUES
(@CharID, 286, 1, 604800)
07/14/2019 05:46 [GameAdvisor]Finn#12
Quote:
Originally Posted by [ADMIN]Phreak View Post
Programmability > usp_Create_Char_R
The specific SQL code adds a 7-Day Continuous Resurrection Rune to new characters.

All you have to do is change the SkillID, SkillLevel and LeftResetTime to your skill.
Make sure that LeftResetTime is in seconds.

Code:
INSERT INTO PS_GameData.dbo.CharApplySkills
(CharID, SkillID, SkillLevel, LeftResetTime)
VALUES
(@CharID, 286, 1, 604800)
i already did without restarting the server but not show/work the buffs ..
07/14/2019 11:24 {Skrillex}#13
Quote:
Originally Posted by [GameAdvisor]Finn View Post
i already did without restarting the server but not show/work the buffs ..
Do you add the line from @[Only registered and activated users can see links. Click Here To Register...] under
"SET @[Only registered and activated users can see links. Click Here To Register...]D = IDENT_CURRENT('Chars')" this line?

Btw Check your Logs. Maybe there is a error message.

Regards
07/14/2019 12:31 [GameAdvisor]Finn#14
Quote:
Originally Posted by {Skrillex} View Post
Do you add the line from @[Only registered and activated users can see links. Click Here To Register...] under
"SET @[Only registered and activated users can see links. Click Here To Register...]D = IDENT_CURRENT('Chars')" this line?

Btw Check your Logs. Maybe there is a error message.

Regards
i did like this

Quote:
SET @CharID = IDENT_CURRENT('Chars')
INSERT INTO CharItems
SELECT @CharID AS CharID,ItemID,dbo.ItemUID() AS ItemUID,Type,TypeID,Bag,Slot,Quality,Gem1,Gem2,Gem 3,Gem4,Gem5,Gem6,Craftname,1 AS COUNT,GETDATE() AS Maketime,'S' AS Maketype,0 AS Del
FROM PS_GameDefs.dbo.BaseGearsDefs WHERE Family = @Family AND Job = @Job AND Level = @Level
END

INSERT INTO PS_GameData.dbo.CharApplySkills
(CharID, SkillID, SkillLevel, LeftResetTime)
VALUES
(@CharID, 286, 1, 604800)

SELECT SkillID,MAX(SkillLevel) AS SkillLevel,MAX(Country) AS Country,MAX(Grow) AS Grow,MAX(Attackfighter) AS Attackfighter,MAX(Defensefighter) AS Defensefighter,MAX(Patrolrogue) AS Patrolrogue,MAX(Shootrogue) AS Shootrogue,MAX(Attackmage) AS Attackmage,MAX(Defensemage) AS Defensemage INTO #Skills
FROM PS_GameDefs.dbo.Skills
WHERE ReqLevel <= @Level AND
SkillLevel < 100 AND
TypeShow > 0 AND
(((@Job != 0 OR (Attackfighter = 1)) AND ((@Family != 0 OR (Country IN (6,2,0))) AND (@Family != 3 OR (Country IN (6,5,3)))))
AND ((@Job != 1 OR (Defensefighter = 1)) AND ((@Family != 0 OR (Country IN (6,2,0))) AND (@Family != 3 OR (Country IN (6,5,3)))))
AND ((@Job != 2 OR (Patrolrogue = 1)) AND ((@Family != 1 OR (Country IN (6,2,1))) AND (@Family != 2 OR (Country IN (6,5,4)))))
AND ((@Job != 3 OR (Shootrogue = 1)) AND ((@Family != 1 OR (Country IN (6,2,1))) AND (@Family != 3 OR (Country IN (6,5,3)))))
AND ((@Job != 4 OR (Attackmage = 1)) AND ((@Family != 1 OR (Country IN (6,2,1))) AND (@Family != 2 OR (Country IN (6,5,4)))))
AND ((@Job != 5 OR (Defensemage = 1)) AND ((@Family != 0 OR (Country IN (6,2,0))) AND (@Family != 2 OR (Country IN (6,5,4))))))
GROUP BY SkillID

DECLARE @Count INT = (SELECT COUNT(SkillLevel) FROM #Skills)

WHILE @Count > 0
BEGIN
INSERT INTO CharSkills
SELECT TOP (1) @CharID,SkillID,SkillLevel,@Count,0,GETDATE(),0
FROM #Skills

DELETE TOP (1) FROM #Skills

SET @Count -= 1
END

DROP TABLE #Skills

RETURN @CharID

SET NOCOUNT OFF
07/14/2019 13:12 [ADMIN]Phreak#15
Quote:
Originally Posted by [GameAdvisor]Finn View Post
i already did without restarting the server but not show/work the buffs ..
The specific change doesn't require a restart.
Did you make sure that skill exists on such ID?
Also, did you make a new character or checked on existing one?