|
You last visited: Today at 16:12
Advertisement
Insert Buffs (Not Nerver Ending)
Discussion on Insert Buffs (Not Nerver Ending) within the Shaiya PServer Development forum part of the Shaiya Private Server category.
07/10/2019, 02:11
|
#1
|
elite*gold: 0
Join Date: Sep 2016
Posts: 171
Received Thanks: 106
|
Insert Buffs (Not Nerver Ending)
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
|
#2
|
elite*gold: 0
Join Date: Oct 2012
Posts: 173
Received Thanks: 28
|
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
|
#3
|
elite*gold: 0
Join Date: May 2019
Posts: 2
Received Thanks: 0
|
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
|
|
|
07/10/2019, 17:42
|
#4
|
elite*gold: 0
Join Date: Sep 2016
Posts: 171
Received Thanks: 106
|
Quote:
Originally Posted by Elessatr
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
|
|
|
07/10/2019, 22:41
|
#5
|
elite*gold: 260
Join Date: Sep 2011
Posts: 487
Received Thanks: 359
|
For new char add it into usp_Create_Char_R procedure
|
|
|
07/12/2019, 04:21
|
#6
|
elite*gold: 0
Join Date: Oct 2018
Posts: 67
Received Thanks: 28
|
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)
|
|
|
07/12/2019, 14:40
|
#7
|
elite*gold: 0
Join Date: Sep 2016
Posts: 171
Received Thanks: 106
|
Quote:
Originally Posted by Mike__
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
|
|
|
07/12/2019, 15:09
|
#8
|
elite*gold: 260
Join Date: Sep 2011
Posts: 487
Received Thanks: 359
|
Quote:
Originally Posted by [GameAdvisor]Finn
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
|
#9
|
elite*gold: 0
Join Date: Sep 2016
Posts: 171
Received Thanks: 106
|
Quote:
Originally Posted by SnickQ
Then why you not use this to insert buff into CharApplySkills?
|
SET @ D = IDENT_CURRENT('Chars') INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES @ D,286,3,2592000)
END
RETURN @ D
SET NOCOUNT OFF
like this sir?
|
|
|
07/12/2019, 15:33
|
#10
|
elite*gold: 0
Join Date: Oct 2018
Posts: 67
Received Thanks: 28
|
Quote:
Originally Posted by [GameAdvisor]Finn
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.
|
|
|
07/13/2019, 19:52
|
#11
|
elite*gold: 0
Join Date: Apr 2016
Posts: 256
Received Thanks: 143
|
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
|
#12
|
elite*gold: 0
Join Date: Sep 2016
Posts: 171
Received Thanks: 106
|
Quote:
Originally Posted by [ADMIN]Phreak
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
|
#13
|
elite*gold: 0
Join Date: Mar 2013
Posts: 849
Received Thanks: 407
|
Quote:
Originally Posted by [GameAdvisor]Finn
i already did without restarting the server but not show/work the buffs ..
|
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
|
|
|
07/14/2019, 12:31
|
#14
|
elite*gold: 0
Join Date: Sep 2016
Posts: 171
Received Thanks: 106
|
Quote:
Originally Posted by {Skrillex}
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
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
|
#15
|
elite*gold: 0
Join Date: Apr 2016
Posts: 256
Received Thanks: 143
|
Quote:
Originally Posted by [GameAdvisor]Finn
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?
|
|
|
Similar Threads
|
[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
|
All times are GMT +2. The time now is 16:12.
|
|