(Create)
#Proc
PHP Code:
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_ADD_ITEM_SKILL] Script Date: 03/23/2014 08:56:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*##### By Kiro #####*/
/*##### By Kiro #####*/
create proc [dbo].[_ADD_SKILL_MASTERY] /*##### By Kiro #####*/
@ChID int,
@id2 int
as
DECLARE @USERJID int
declare @CharID int
declare @NewUserID varchar
declare @ItemID bigint
declare @RefItemID int
declare @CharName varchar(max)
DECLARE @RefCharID INT
/*##### By Kiro #####*/
/*##### By Kiro #####*/
declare @skilllvl int
set @skilllvl = '80'
if (@id2 = 1)
begin
set @charname = (select CharName16 from _Char where CharID=@ChID)
SELECT @CharID = CharID, @RefCharID = RefObjID FROM [_Char] WHERE CharName16 = @CharName
update _CharSkillMastery set [Level] = @skilllvl where ((MasteryID = 257 ) and CharID = @CharID) --blade
end/*##### By Kiro #####*/
else if (@id2 = 2)
begin
set @charname = (select CharName16 from _Char where CharID=@ChID)
SELECT @CharID = CharID, @RefCharID = RefObjID FROM [_Char] WHERE CharName16 = @CharName
update _CharSkillMastery set [Level] = @skilllvl where ((MasteryID = 258 ) and CharID = @CharID) --glaive
end/*##### By Kiro #####*/
else if (@id2 = 3)
begin
set @charname = (select CharName16 from _Char where CharID=@ChID)
SELECT @CharID = CharID, @RefCharID = RefObjID FROM [_Char] WHERE CharName16 = @CharName
update _CharSkillMastery set [Level] = @skilllvl where ((MasteryID = 259 ) and CharID = @CharID) --bow
end/*##### By Kiro #####*/
else if (@id2 = 4)
begin
set @charname = (select CharName16 from _Char where CharID=@ChID)
SELECT @CharID = CharID, @RefCharID = RefObjID FROM [_Char] WHERE CharName16 = @CharName
update _CharSkillMastery set [Level] = @skilllvl where ((MasteryID = 273 ) and CharID = @CharID) --force recovery
end/*##### By Kiro #####*/
else if (@id2 = 5)
begin
set @charname = (select CharName16 from _Char where CharID=@ChID)
SELECT @CharID = CharID, @RefCharID = RefObjID FROM [_Char] WHERE CharName16 = @CharName
update _CharSkillMastery set [Level] = @skilllvl where ((MasteryID = 274) and CharID = @CharID) --force recovery
end/*##### By Kiro #####*/
else if (@id2 = 6)
begin
set @charname = (select CharName16 from _Char where CharID=@ChID)
SELECT @CharID = CharID, @RefCharID = RefObjID FROM [_Char] WHERE CharName16 = @CharName
update _CharSkillMastery set [Level] = @skilllvl where ((MasteryID = 275 ) and CharID = @CharID) --force recovery
end/*##### By Kiro #####*/
else if (@id2 = 7)
begin
set @charname = (select CharName16 from _Char where CharID=@ChID)
SELECT @CharID = CharID, @RefCharID = RefObjID FROM [_Char] WHERE CharName16 = @CharName
update _CharSkillMastery set [Level] = @skilllvl where ((MasteryID = 276 ) and CharID = @CharID) --recovery
end/*##### By Kiro #####*/
/*##### By Kiro #####*/
/*##### By Kiro #####*/
/*##### By Kiro #####*/
(Old proc)
#AddLogItem (ShardLog) Procedure
PHP Code:
IF (@Operation = 41) -- skill scroll
begin
IF (@ItemRefID = 47374) -- ID ITEM
begin
exec SRO_VT_SHARD.dbo._ADD_ITEM_SKILL @CharID,1
end
IF (@ItemRefID = 47375) -- ID ITEM
begin
exec SRO_VT_SHARD.dbo._ADD_ITEM_SKILL @CharID,2
end
begin
IF (@ItemRefID = 47376) -- ID ITEM
begin
exec SRO_VT_SHARD.dbo._ADD_ITEM_SKILL @CharID,3
end
end
begin
IF (@ItemRefID = 47377) -- ID ITEM
begin
exec SRO_VT_SHARD.dbo._ADD_ITEM_SKILL @CharID,4
end
end
begin
IF (@ItemRefID = 47378) -- ID ITEM
begin
exec SRO_VT_SHARD.dbo._ADD_ITEM_SKILL @CharID,5
end
end
IF (@ItemRefID = 47379) -- ID ITEM
begin
exec SRO_VT_SHARD.dbo._ADD_ITEM_SKILL @CharID,6
end
end
IF (@ItemRefID = 47380) -- ID ITEM
begin
exec SRO_VT_SHARD.dbo._ADD_ITEM_SKILL @CharID,7
end
end
end
Notice Create scroll lines by ur self copy it from