Insert Buffs (Not Nerver Ending)

07/14/2019 13:26 [GameAdvisor]Finn#16
Quote:
Originally Posted by [ADMIN]Phreak View Post
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?
after i insert that i test of course on new create character but no buffs show
07/15/2019 01:55 sominus#17
-Try relogin that char to see if the buffs show
-Check CharApplySkills table to see if the new record is there
-Try inserting the buff with a manual query in a new Char, to see if there is any script error, as some coding errors won't show up in server Logs.

Also you should make a separate Proc to apply those buffs, and call that proc Eg: 'EXEC PS_GameData.dbo.ApplyMyBuffs @[Only registered and activated users can see links. Click Here To Register...]D'
It's more easy to mantain, and is better not to mix different stuff in just one Proc, because it could lead to bugs.

Finally, you could create a new separate ResRune skill, to use for that buff, so you don't use the same skill as the ResRune item (again, to avoid posible bugs).

Anyway, resrune is something that should be free. Players loosing a Char for dying without Rune, won't be willing to keep playing.
07/31/2019 01:01 [GameAdvisor]Finn#18
Quote:
Originally Posted by sominus View Post
-Try relogin that char to see if the buffs show
-Check CharApplySkills table to see if the new record is there
-Try inserting the buff with a manual query in a new Char, to see if there is any script error, as some coding errors won't show up in server Logs.

Also you should make a separate Proc to apply those buffs, and call that proc Eg: 'EXEC PS_GameData.dbo.ApplyMyBuffs @[Only registered and activated users can see links. Click Here To Register...]D'
It's more easy to mantain, and is better not to mix different stuff in just one Proc, because it could lead to bugs.

Finally, you could create a new separate ResRune skill, to use for that buff, so you don't use the same skill as the ResRune item (again, to avoid posible bugs).

Anyway, resrune is something that should be free. Players loosing a Char for dying without Rune, won't be willing to keep playing.
using Create_Char_R
INSERT INTO PS_GameData.dbo.CharApplySkills
(CharID, SkillID, SkillLevel, LeftResetTime) VALUES (@CharID, 194, 2, 604800)

on my first Execute and create new character its show but when a try again to create multiple times.. its not show even i relog.. only show if i relog the Never Ending Buffs..

can you give me the script of EXEC PS_GameData.dbo.ApplyMyBuffs ?
Thank you in advance.. :)
07/31/2019 20:21 sominus#19
'ApplyMyBuffs' doesn't exist, is just a name I made up as an example.

Anyway, the one you're using should work ok:

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

You should check if the script is having an error somewhere, may be some logic problem, some invalid value, etc. Also make sure the skill 194 level 2, has a correct definition.

Does the buff disappear after a while? or immediately after relog? Does is countdown when the player is offline?
08/01/2019 04:27 [GameAdvisor]Finn#20
Quote:
Originally Posted by sominus View Post
'ApplyMyBuffs' doesn't exist, is just a name I made up as an example.

Anyway, the one you're using should work ok:

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

You should check if the script is having an error somewhere, may be some logic problem, some invalid value, etc. Also make sure the skill 194 level 2, has a correct definition.

Does the buff disappear after a while? or immediately after relog? Does is countdown when the player is offline?
yes i know sir doesnt exist.. if you have that scripts only :)

194 skill id the 2 is 7days because they have 1hr in 1 and 2 for 7days and when i execute no error then when i try to create new character .. it show but the 2nd , 3rd ,4th 5th time that i create.. not show.. even i relog..
08/02/2019 16:09 SnickQ#21
Have you tried to add other buffs in this way?
09/22/2021 05:04 X-Shield#22
Quote:
Originally Posted by Elessatr View Post
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[usp_Read_Char_ApplySkills_R] Script Date: 10.07.2019 14:49:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


ALTER Proc [dbo].[usp_Read_Char_ApplySkills_R]

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

AS

SET NOCOUNT ON

---Ress 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charid = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=225 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=225
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=225)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @[Only registered and activated users can see links. Click Here To Register...]D, 225,1,2592000)
end


---Resist endurance 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=227 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=227
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=227)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @[Only registered and activated users can see links. Click Here To Register...]D, 227,1,2592000)
end

---Red Phoenx amulet 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @[Only registered and activated users can see links. Click Here To Register...]D, 233,1,2592000)
end

---RFU
if exists ( select skillID from charapplyskills with (nolock) where charID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=286 and skilllevel=3)
begin
update charapplyskills set LeftResettime=2592000 where CharID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=286
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = @[Only registered and activated users can see links. Click Here To Register...]D and skillid=286)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @[Only registered and activated users can see links. Click Here To Register...]D, 286,3,2592000)
end
SELECT SkillID,SkillLevel,LeftResetTime FROM CharApplySkills WHERE CharID = @[Only registered and activated users can see links. Click Here To Register...]D

SET NOCOUNT OFF
01/30/2022 13:36 defproject#23
Code:
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[usp_Read_Char_ApplySkills_R] Script Date: 10.07.2019 14:49:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


ALTER Proc [dbo].[usp_Read_Char_ApplySkills_R]

 [MENTION=395373]Chari[/MENTION]D int

AS

SET NOCOUNT ON

---Ress 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charid = [MENTION=395373]Chari[/MENTION]D and skillid=225 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID = [MENTION=395373]Chari[/MENTION]D and skillid=225
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = [MENTION=395373]Chari[/MENTION]D and skillid=225)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values ( [MENTION=395373]Chari[/MENTION]D, 225,1,2592000)
end


---Resist endurance 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID = [MENTION=395373]Chari[/MENTION]D and skillid=227 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID = [MENTION=395373]Chari[/MENTION]D and skillid=227
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = [MENTION=395373]Chari[/MENTION]D and skillid=227)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values  [MENTION=395373]Chari[/MENTION]D, 227,1,2592000)
end

---Red Phoenx amulet 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID = [MENTION=395373]Chari[/MENTION]D and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID = [MENTION=395373]Chari[/MENTION]D and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = [MENTION=395373]Chari[/MENTION]D and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values ( [MENTION=395373]Chari[/MENTION]D, 233,1,2592000)
end

---RFU
if exists ( select skillID from charapplyskills with (nolock) where charID = [MENTION=395373]Chari[/MENTION]D and skillid=286 and skilllevel=3)
begin
update charapplyskills set LeftResettime=2592000 where CharID = [MENTION=395373]Chari[/MENTION]D and skillid=286
end
if not exists ( select skillID from charapplyskills with (nolock) where charID = [MENTION=395373]Chari[/MENTION]D and skillid=286)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values  [MENTION=395373]Chari[/MENTION]D, 286,3,2592000)
end
SELECT SkillID,SkillLevel,LeftResetTime FROM CharApplySkills WHERE CharID = [MENTION=395373]Chari[/MENTION]D

SET NOCOUNT OFF
08/31/2022 07:28 lolodh#24
How would it be so that it does not restart Buff once it has expired?