دلواقتي في اسكرولة انا عاوز اول ميضربها يكتبله في الشات تحت Succsecfly مثلا او اي حاجة انا اخترها
بمعني
انا دلواقتي اسكرولة Reset skills اول ميضربها و الاسكلات ترجع يكتبله تحت في الشات private يكتبله رسالة
زي كدة موضوع mastery skills لو حد جبلي الكويري ده هفرح اووي والله :] علشان محتاجه اووي
ديه مثلا اهم 3 كويرهات اسكرولات عاوز احطلهم السيستم ده اعمل ايه
ديه في addtimedjob
كود PHP:
if(@JobID= '*****')
begin
declare @TotalSP int
declare @TotalSPMastery int
SELECT @TotalSP = SUM(_RefSkill.ReqLearn_SP) FROM _RefSkill, _CharSkill WHERE _RefSkill.ID=_CharSkill.SkillID AND _CharSkill.CharID=@CharID AND _RefSkill.ReqCommon_MasteryLevel1 <= '130'
SELECT @TotalSPMastery = SUM(_RefLevel.Exp_M) FROM _CharSkillMastery, _RefLevel WHERE _RefLevel.Lvl=_CharSkillMastery.Level AND _CharSkillMastery.CharID=@CharID AND _CharSkillMastery.Level <= '130'
UPDATE _Char SET RemainSkillPoint=RemainSkillPoint+@TotalSP+@TotalSPMastery+200000 WHERE CharID=@CharID
DELETE _CharSkill FROM _RefSkill, _CharSkill WHERE _RefSkill.ID=_CharSkill.SkillID AND _CharSkill.CharID=@CharID AND _RefSkill.ReqCommon_MasteryLevel1 <= '130' AND _RefSkill.ID NOT IN (1,70,40,2,8421,9354,9355,11162,9944,8419,8420,11526,10625)
UPDATE _CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '110'
end
timed job
كود PHP:
if(@JobID = '*****')
begin
declare @Strength int
declare @Intellect int
declare @MaxLevel int
declare @RemainStatPoint int
select @MaxLevel = MaxLevel from _Char where CharID = @CharID
set @RemainStatPoint = (@MaxLevel*3)-3
set @MaxLevel = @MaxLevel+19
UPDATE _Char SET Strength=@MaxLevel, Intellect=@MaxLevel, RemainStatPoint=@RemainStatPoint WHERE CharID=@CharID
end
addlogitem
كود PHP:
--Gender
IF (@Operation = 41) -- If item used!
Begin
IF (@ItemRefID = *****) -- RefObjCommon ID
Begin
Declare @InvID INT = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0)
Declare @RefItemID INT = (Select RefItemID From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @InvID)
IF @RefItemID in (24414,24972,24974,24976,24978,24406,24408,24410,24412) -- IF found your Devil is Male
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24413',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24414 --@Devil B Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24971',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24972 --@Devil A Red Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24973',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24974 --@Devil A Yellow Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24975',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24976 --@Devil A Blue Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24977',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24978 --@Devil S Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24405',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24406 --@Devil A Red Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24407',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24408 --@Devil A Yellow Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24409',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24410 --@Devil A Blue Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24411',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24412 --@Devil S Mall
End
ELSE IF @RefItemID in (24413,24971,24973,24975,24977,24405,24407,24409,24411) -- IF found your Devil is Female
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24414',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24413 --@Devil B Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24972',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24971 --@Devil A Red Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24974',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24973 --@Devil A Yellow Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24976',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24975 --@Devil A Blue Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24978',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24977 --@Devil S Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24406',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24405 --@Devil A Red Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24408',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24407 --@Devil A Yellow Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24410',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24409 --@Devil A Blue Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24412',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24411 --@Devil S Mall
End
End
End
التعديل الأخير تم بواسطة Mohamed ElKersh ; 13-03-2016 الساعة 05:49 PM
IF (@Operation = 41 and @ItemRefID = 42091) -- Scroll Skills recall begin declare @TotalSP int declare @TotalSPMastery int SELECT @TotalSP = SUM(SRO_VT_SHARD.dbo._RefSkill.ReqLearn_SP) FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120' SELECT @TotalSPMastery = SUM(SRO_VT_SHARD.dbo._RefLevel.Exp_M) FROM SRO_VT_SHARD.dbo._CharSkillMastery, SRO_VT_SHARD.dbo._RefLevel WHERE SRO_VT_SHARD.dbo._RefLevel.Lvl=SRO_VT_SHARD.dbo._CharSkillMastery.Level AND SRO_VT_SHARD.dbo._CharSkillMastery.CharID=@CharID AND SRO_VT_SHARD.dbo._CharSkillMastery.Level <= '120' UPDATE SRO_VT_SHARD.dbo._Char SET RemainSkillPoint=RemainSkillPoint+@TotalSP+@TotalSPMastery+200000 WHERE CharID=@CharID DELETE SRO_VT_SHARD.dbo._CharSkill FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120' and SRO_VT_SHARD.dbo._RefSkill.ID NOT IN (1,70,40,2,8421,9354,9355,11162,9944,8419,8420,11526,10625) UPDATE SRO_VT_SHARD.dbo._CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '120' Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
Scroll Rest Stats
addlogitem
كود PHP:
IF (@Operation = 41) and (@ItemRefID = 42078) begin declare @Strength int declare @Intellect int declare @MaxLevel int declare @RemainStatPoint int select @MaxLevel = MaxLevel from SRO_VT_SHARD.dbo._Char where CharID = @CharID set @RemainStatPoint = (@MaxLevel*3)-3 set @MaxLevel = @MaxLevel+19 UPDATE SRO_VT_SHARD.dbo._Char SET Strength=@MaxLevel, Intellect=@MaxLevel, RemainStatPoint=@RemainStatPoint WHERE CharID=@CharID Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate()) end
Scroll Devils Gender Switch Tool
addlogitem
كود PHP:
IF (@Operation = 41) -- If item used Scroll Devils Gender Switch Tool Begin IF (@ItemRefID = 42087) -- RefObjCommon ID Begin Declare @InvID INT = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) Set @RefItemID = (Select RefItemID From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @InvID) IF @RefItemID in (24414,24972,24974,24976,24978,24406,24408,24410,24412,41816,41818,41819) -- IF found your Devil is Male Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24413',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24414 --@Devil B Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24971',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24972 --@Devil A Red Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24973',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24974 --@Devil A Yellow Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24975',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24976 --@Devil A Blue Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24977',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24978 --@Devil S Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24405',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24406 --@Devil A Red Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24407',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24408 --@Devil A Yellow Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24409',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24410 --@Devil A Blue Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24411',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24412 --@Devil S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41817',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41818 --@Angel S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41814',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41819 --@Angle S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41815',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41816 --@Angel S Mall Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
End ELSE IF @RefItemID in (24413,24971,24973,24975,24977,24405,24407,24409,24411,41815,41814,41817) -- IF found your Devil is Female Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24414',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24413 --@Devil B Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24972',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24971 --@Devil A Red Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24974',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24973 --@Devil A Yellow Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24976',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24975 --@Devil A Blue Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24978',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24977 --@Devil S Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24406',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24405 --@Devil A Red Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24408',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24407 --@Devil A Yellow Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24410',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24409 --@Devil A Blue Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24412',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24411 --@Devil S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41816',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41815 --@Angel S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41818',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41817 --@Angel S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41819',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41814 --@Angel S Mall Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate()) End End End
حتغير 'Your Message here ' بي اللي انت عايزه
التعديل الأخير تم بواسطة HLP ; 14-03-2016 الساعة 03:03 PM
المشاركة الأصلية كتبت بواسطة HLP
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
اتفضل
Scroll Skills recall
addlogitem
كود PHP:
IF (@Operation = 41 and @ItemRefID = 42091) -- Scroll Skills recall
begin
declare @TotalSP int
declare @TotalSPMastery int
SELECT @TotalSP = SUM(SRO_VT_SHARD.dbo._RefSkill.ReqLearn_SP) FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120'
SELECT @TotalSPMastery = SUM(SRO_VT_SHARD.dbo._RefLevel.Exp_M) FROM SRO_VT_SHARD.dbo._CharSkillMastery, SRO_VT_SHARD.dbo._RefLevel WHERE SRO_VT_SHARD.dbo._RefLevel.Lvl=SRO_VT_SHARD.dbo._CharSkillMastery.Level AND SRO_VT_SHARD.dbo._CharSkillMastery.CharID=@CharID AND SRO_VT_SHARD.dbo._CharSkillMastery.Level <= '120'
UPDATE SRO_VT_SHARD.dbo._Char SET RemainSkillPoint=RemainSkillPoint+@TotalSP+@TotalSPMastery+200000 WHERE CharID=@CharID
DELETE SRO_VT_SHARD.dbo._CharSkill FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120' and SRO_VT_SHARD.dbo._RefSkill.ID NOT IN (1,70,40,2,8421,9354,9355,11162,9944,8419,8420,11526,10625)
UPDATE SRO_VT_SHARD.dbo._CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '120'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
Scroll Rest Stats
addlogitem
كود PHP:
IF (@Operation = 41) and (@ItemRefID = 42078)
begin
declare @Strength int
declare @Intellect int
declare @MaxLevel int
declare @RemainStatPoint int
select @MaxLevel = MaxLevel from SRO_VT_SHARD.dbo._Char where CharID = @CharID
set @RemainStatPoint = (@MaxLevel*3)-3
set @MaxLevel = @MaxLevel+19
UPDATE SRO_VT_SHARD.dbo._Char SET Strength=@MaxLevel, Intellect=@MaxLevel, RemainStatPoint=@RemainStatPoint WHERE CharID=@CharID
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
end
Scroll Devils Gender Switch Tool
addlogitem
كود PHP:
IF (@Operation = 41) -- If item used Scroll Devils Gender Switch Tool
Begin
IF (@ItemRefID = 42087) -- RefObjCommon ID
Begin
Declare @InvID INT = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0)
Set @RefItemID = (Select RefItemID From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @InvID)
IF @RefItemID in (24414,24972,24974,24976,24978,24406,24408,24410,24412,41816,41818,41819) -- IF found your Devil is Male
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24413',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24414 --@Devil B Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24971',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24972 --@Devil A Red Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24973',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24974 --@Devil A Yellow Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24975',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24976 --@Devil A Blue Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24977',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24978 --@Devil S Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24405',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24406 --@Devil A Red Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24407',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24408 --@Devil A Yellow Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24409',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24410 --@Devil A Blue Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24411',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24412 --@Devil S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41817',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41818 --@Angel S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41814',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41819 --@Angle S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41815',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41816 --@Angel S Mall
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
End
ELSE IF @RefItemID in (24413,24971,24973,24975,24977,24405,24407,24409,24411,41815,41814,41817) -- IF found your Devil is Female
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24414',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24413 --@Devil B Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24972',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24971 --@Devil A Red Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24974',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24973 --@Devil A Yellow Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24976',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24975 --@Devil A Blue Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24978',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24977 --@Devil S Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24406',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24405 --@Devil A Red Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24408',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24407 --@Devil A Yellow Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24410',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24409 --@Devil A Blue Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24412',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24411 --@Devil S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41816',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41815 --@Angel S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41818',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41817 --@Angel S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41819',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41814 --@Angel S Mall
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
End
End
End
Msg 137, Level 15, State 2, Procedure _AddLogItem, Line 120 Must declare the scalar variable "@CharName". Msg 137, Level 15, State 2, Procedure _AddLogItem, Line 134 Must declare the scalar variable "@CharName".
ههههههههههه
يا حبيبي مش بايظ
ده عايز Declare ل ChaName
اتفضل
كود PHP:
Declare @Charname varchar (68) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @Charid)
IF (@Operation = 41 and @ItemRefID = 42091) -- Scroll Skills recall begin declare @TotalSP int declare @TotalSPMastery int SELECT @TotalSP = SUM(SRO_VT_SHARD.dbo._RefSkill.ReqLearn_SP) FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120' SELECT @TotalSPMastery = SUM(SRO_VT_SHARD.dbo._RefLevel.Exp_M) FROM SRO_VT_SHARD.dbo._CharSkillMastery, SRO_VT_SHARD.dbo._RefLevel WHERE SRO_VT_SHARD.dbo._RefLevel.Lvl=SRO_VT_SHARD.dbo._CharSkillMastery.Level AND SRO_VT_SHARD.dbo._CharSkillMastery.CharID=@CharID AND SRO_VT_SHARD.dbo._CharSkillMastery.Level <= '120' UPDATE SRO_VT_SHARD.dbo._Char SET RemainSkillPoint=RemainSkillPoint+@TotalSP+@TotalSPMastery+200000 WHERE CharID=@CharID DELETE SRO_VT_SHARD.dbo._CharSkill FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120' and SRO_VT_SHARD.dbo._RefSkill.ID NOT IN (1,70,40,2,8421,9354,9355,11162,9944,8419,8420,11526,10625) UPDATE SRO_VT_SHARD.dbo._CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '120' Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate()) END
IF (@Operation = 41) and (@ItemRefID = 42078) begin declare @Strength int declare @Intellect int declare @MaxLevel int declare @RemainStatPoint int select @MaxLevel = MaxLevel from SRO_VT_SHARD.dbo._Char where CharID = @CharID set @RemainStatPoint = (@MaxLevel*3)-3 set @MaxLevel = @MaxLevel+19 UPDATE SRO_VT_SHARD.dbo._Char SET Strength=@MaxLevel, Intellect=@MaxLevel, RemainStatPoint=@RemainStatPoint WHERE CharID=@CharID Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate()) end
IF (@Operation = 41) -- If item used Scroll Devils Gender Switch Tool Begin IF (@ItemRefID = 42087) -- RefObjCommon ID Begin Declare @InvID INT = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) Set @RefItemID = (Select RefItemID From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @InvID) IF @RefItemID in (24414,24972,24974,24976,24978,24406,24408,24410,24412,41816,41818,41819) -- IF found your Devil is Male Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24413',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24414 --@Devil B Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24971',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24972 --@Devil A Red Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24973',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24974 --@Devil A Yellow Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24975',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24976 --@Devil A Blue Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24977',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24978 --@Devil S Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24405',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24406 --@Devil A Red Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24407',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24408 --@Devil A Yellow Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24409',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24410 --@Devil A Blue Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24411',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24412 --@Devil S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41817',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41818 --@Angel S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41814',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41819 --@Angle S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41815',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41816 --@Angel S Mall Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
End ELSE IF @RefItemID in (24413,24971,24973,24975,24977,24405,24407,24409,24411,41815,41814,41817) -- IF found your Devil is Female Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24414',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24413 --@Devil B Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24972',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24971 --@Devil A Red Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24974',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24973 --@Devil A Yellow Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24976',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24975 --@Devil A Blue Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24978',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24977 --@Devil S Event Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24406',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24405 --@Devil A Red Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24408',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24407 --@Devil A Yellow Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24410',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24409 --@Devil A Blue Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24412',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24411 --@Devil S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41816',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41815 --@Angel S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41818',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41817 --@Angel S Mall Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41819',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41814 --@Angel S Mall Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate()) End End End
المشاركة الأصلية كتبت بواسطة HLP
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
ههههههههههه
يا حبيبي مش بايظ
ده عايز Declare ل ChaName
اتفضل
كود PHP:
Declare @Charname varchar (68) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @Charid)
IF (@Operation = 41 and @ItemRefID = 42091) -- Scroll Skills recall
begin
declare @TotalSP int
declare @TotalSPMastery int
SELECT @TotalSP = SUM(SRO_VT_SHARD.dbo._RefSkill.ReqLearn_SP) FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120'
SELECT @TotalSPMastery = SUM(SRO_VT_SHARD.dbo._RefLevel.Exp_M) FROM SRO_VT_SHARD.dbo._CharSkillMastery, SRO_VT_SHARD.dbo._RefLevel WHERE SRO_VT_SHARD.dbo._RefLevel.Lvl=SRO_VT_SHARD.dbo._CharSkillMastery.Level AND SRO_VT_SHARD.dbo._CharSkillMastery.CharID=@CharID AND SRO_VT_SHARD.dbo._CharSkillMastery.Level <= '120'
UPDATE SRO_VT_SHARD.dbo._Char SET RemainSkillPoint=RemainSkillPoint+@TotalSP+@TotalSPMastery+200000 WHERE CharID=@CharID
DELETE SRO_VT_SHARD.dbo._CharSkill FROM SRO_VT_SHARD.dbo._RefSkill, SRO_VT_SHARD.dbo._CharSkill WHERE SRO_VT_SHARD.dbo._RefSkill.ID=SRO_VT_SHARD.dbo._CharSkill.SkillID AND SRO_VT_SHARD.dbo._CharSkill.CharID=@CharID AND SRO_VT_SHARD.dbo._RefSkill.ReqCommon_MasteryLevel1 <= '120' and SRO_VT_SHARD.dbo._RefSkill.ID NOT IN (1,70,40,2,8421,9354,9355,11162,9944,8419,8420,11526,10625)
UPDATE SRO_VT_SHARD.dbo._CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '120'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
END
IF (@Operation = 41) and (@ItemRefID = 42078)
begin
declare @Strength int
declare @Intellect int
declare @MaxLevel int
declare @RemainStatPoint int
select @MaxLevel = MaxLevel from SRO_VT_SHARD.dbo._Char where CharID = @CharID
set @RemainStatPoint = (@MaxLevel*3)-3
set @MaxLevel = @MaxLevel+19
UPDATE SRO_VT_SHARD.dbo._Char SET Strength=@MaxLevel, Intellect=@MaxLevel, RemainStatPoint=@RemainStatPoint WHERE CharID=@CharID
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
end
IF (@Operation = 41) -- If item used Scroll Devils Gender Switch Tool
Begin
IF (@ItemRefID = 42087) -- RefObjCommon ID
Begin
Declare @InvID INT = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0)
Set @RefItemID = (Select RefItemID From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @InvID)
IF @RefItemID in (24414,24972,24974,24976,24978,24406,24408,24410,24412,41816,41818,41819) -- IF found your Devil is Male
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24413',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24414 --@Devil B Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24971',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24972 --@Devil A Red Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24973',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24974 --@Devil A Yellow Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24975',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24976 --@Devil A Blue Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24977',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24978 --@Devil S Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24405',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24406 --@Devil A Red Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24407',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24408 --@Devil A Yellow Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24409',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24410 --@Devil A Blue Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24411',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24412 --@Devil S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41817',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41818 --@Angel S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41814',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41819 --@Angle S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41815',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41816 --@Angel S Mall
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
End
ELSE IF @RefItemID in (24413,24971,24973,24975,24977,24405,24407,24409,24411,41815,41814,41817) -- IF found your Devil is Female
Begin
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24414',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24413 --@Devil B Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24972',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24971 --@Devil A Red Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24974',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24973 --@Devil A Yellow Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24976',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24975 --@Devil A Blue Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24978',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24977 --@Devil S Event
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24406',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24405 --@Devil A Red Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24408',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24407 --@Devil A Yellow Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24410',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24409 --@Devil A Blue Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='24412',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 24411 --@Devil S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41816',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41815 --@Angel S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41818',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41817 --@Angel S Mall
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID='41819',CreaterName='iLegend' Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = '13' and ItemID > 0) and RefItemID = 41814 --@Angel S Mall
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Your Message here ',Getdate())
End
End
End