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]
@D int
AS
SET NOCOUNT ON
---Ress 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=225 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=225
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=225)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 225,1,2592000)
end
---Resist endurance 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=227 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=227
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=227)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 227,1,2592000)
end
---Red Phoenx amulet 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 233,1,2592000)
end
---RFU
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=286 and skilllevel=3)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=286
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=286)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 286,3,2592000)
end
SELECT SkillID,SkillLevel,LeftResetTime FROM CharApplySkills WHERE CharID @D
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]
@D int
AS
SET NOCOUNT ON
---Ress 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=225 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=225
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=225)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 225,1,2592000)
end
---Resist endurance 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=227 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=227
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=227)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 227,1,2592000)
end
---Red Phoenx amulet 30 days
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 233,1,2592000)
end
---RFU
if exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=286 and skilllevel=3)
begin
update charapplyskills set LeftResettime=2592000 where CharID @D and skillid=286
end
if not exists ( select skillID from charapplyskills with (nolock) where charID @D and skillid=286)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values @D, 286,3,2592000)
end
SELECT SkillID,SkillLevel,LeftResetTime FROM CharApplySkills WHERE CharID @D
SET NOCOUNT OFF
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
i have not done this but if I am going to do this, i would agree with @, 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)
i have not done this but if I am going to do this, i would agree with @, 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)
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
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?
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.
Do you add the line from @ under
"SET @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
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
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?
[Root Vorstellung]Memoria-you ´il nerver walk alone! 04/25/2011 - Metin2 PServer Advertising - 544 Replies Hallo liebe E*PvP Community.
Hiermit stelle ich euch den neuen Server Memoria vor.
Features von Memoria:
•2010er Files
•2010er Client
•Permanente Lv. Anzeige
•Max. Lv. 150
•Drachenraum
"Nerver" 03/07/2010 - Off Topic - 1 Replies Hallo,
Es gibt so einen "Nerver" (.exe) wenn man das öffnet dann spielt das CD Laufwerk verrückt. D.h. es geht immer auf und wieder zu und erst nach einem neustart hört dies auf.Wo kriegt man den??? Ich habe schon so etwas ähnliches als batch programmiert aber so kriegt man das Laufwerk net mehr Zu^^
Freue mich vor allem über einen Link ;)
MFG
28daniel28