if(@JobID= '90022') --Remove Premium--
begin
declare @RemovePrem1 int
declare @RemovePrem2 int
declare @RemovePrem3 int
declare @RemovePrem4 int
declare @RemovePrem5 int
declare @RemovePrem6 int
declare @RemovePrem7 int
declare @RemovePrem8 int
DECLARE @REMOVEPREM9 INT
SET @RemovePrem1 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3847)
SET @RemovePrem2 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3783)
SET @RemovePrem3 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3769)
SET @RemovePrem4 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3795)
SET @RemovePrem5 = (Select ID From _TimedJob Where CharID=@CharID and Data2=10800)
SET @RemovePrem6 = (Select ID From _TimedJob Where CharID=@CharID and Data2=224)
SET @RemovePrem7 = (Select ID From _TimedJob Where CharID=@CharID and Data2=1)
SET @RemovePrem8 = (Select ID From _TimedJob Where CharID=@CharID and Data2=2)
SET @REMOVEPREM9 = (SELECT ID FROM _TIMEDJOB WHERE CharID=@CharID AND Data2=707799600)
delete from _TimedJob WHERE ID=@RemovePrem1
delete from _TimedJob WHERE ID=@RemovePrem2
delete from _TimedJob WHERE ID=@RemovePrem3
delete from _TimedJob WHERE ID=@RemovePrem4
delete from _TimedJob WHERE ID=@RemovePrem5
delete from _TimedJob WHERE ID=@RemovePrem6
delete from _TimedJob WHERE ID=@RemovePrem7
delete from _TimedJob WHERE ID=@RemovePrem8
delete from _TimedJob WHERE ID=@REMOVEPREM9
end
Reset Stats
كود PHP:
f(@JobID = '90019') -- Remove stats
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
Remove skills
كود PHP:
if(@JobID= '90020') -- Remove skills
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+@TotalS PMastery+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,115 26,10625)
UPDATE _CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '130'
end
Change name
كود PHP:
if(@JobID = '91720') --Change Name--
begin
declare @CharName16 varchar(64)
Select @CharName16=CharName16 from _Char where CharID = @CharID
Update _Char Set CharName16 = '@'+ @CharName16 Where CharID = @CharID
end
Remover Adv
كود PHP:
if(@JobID = '90015') -- Adv Remove
begin
DECLARE @ItemID varchar (64)
SELECT @ItemID=ItemID from _Inventory where CharID = @CharID AND Slot = '13'
DELETE FROM _BindingOptionWithItem where nItemDBID IN (SELECT ItemID FROM _Inventory WHERE Slot = '13' AND CharID=@CharID) and bOptType=2
end
Remove Blue Avatar
كود PHP:
if(@JobID= '34038') ---Remove Avatar Blue---
begin
Update _Items Set MagParamNum = 0, MagParam1 = NULL, MagParam2 = NULL, MagParam3 = NULL, MagParam4 = NULL, MagParam5 = NULL, MagParam6 = NULL, MagParam7 = NULL, MagParam8 = NULL, MagParam9 = NULL, MagParam10 = NULL, MagParam11 = NULL, MagParam12 = NULL where ID64 in (select ItemID from _Inventoryforavatar where CharID = @CharID and Slot between 0 and 2 and ItemID>0)
end
Remove Maximum
كود PHP:
if(@JobID= '787880') ---Remove Maximum---
begin
Update _Items
Set MagParamNum = 0 , MagParam1 = NULL, MagParam2 = NULL, MagParam3 = NULL, MagParam4 = NULL, MagParam5 = NULL, MagParam6 = NULL, MagParam7 = NULL, MagParam8 = NULL, MagParam9 = NULL, MagParam10 = NULL, MagParam11 = NULL, MagParam12 = NULL where ID64 in (select ItemID from _Inventory where CharID = @CharID and Slot between 0 and 12 and ItemID Between 1 AND 999999999)
end
Remove PK
كود PHP:
if(@JobID = '34005')---Remove PK---
begin
Update _Char Set DailyPK = 0 Where CharID = @CharID
Update _Char Set TotalPK = 0 Where CharID = @CharID
Update _Char Set PKPenaltyPoint = 0 Where CharID = @CharID
end
التعديل الأخير تم بواسطة Mr.Viper ; 21-10-2014 الساعة 11:49 PM
if(@JobID= '90022') --Remove Premium--
begin
declare @RemovePrem1 int
declare @RemovePrem2 int
declare @RemovePrem3 int
declare @RemovePrem4 int
declare @RemovePrem5 int
declare @RemovePrem6 int
declare @RemovePrem7 int
declare @RemovePrem8 int
DECLARE @REMOVEPREM9 INT
SET @RemovePrem1 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3847)
SET @RemovePrem2 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3783)
SET @RemovePrem3 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3769)
SET @RemovePrem4 = (Select ID From _TimedJob Where CharID=@CharID and Data2=3795)
SET @RemovePrem5 = (Select ID From _TimedJob Where CharID=@CharID and Data2=10800)
SET @RemovePrem6 = (Select ID From _TimedJob Where CharID=@CharID and Data2=224)
SET @RemovePrem7 = (Select ID From _TimedJob Where CharID=@CharID and Data2=1)
SET @RemovePrem8 = (Select ID From _TimedJob Where CharID=@CharID and Data2=2)
SET @REMOVEPREM9 = (SELECT ID FROM _TIMEDJOB WHERE CharID=@CharID AND Data2=707799600)
delete from _TimedJob WHERE ID=@RemovePrem1
delete from _TimedJob WHERE ID=@RemovePrem2
delete from _TimedJob WHERE ID=@RemovePrem3
delete from _TimedJob WHERE ID=@RemovePrem4
delete from _TimedJob WHERE ID=@RemovePrem5
delete from _TimedJob WHERE ID=@RemovePrem6
delete from _TimedJob WHERE ID=@RemovePrem7
delete from _TimedJob WHERE ID=@RemovePrem8
delete from _TimedJob WHERE ID=@REMOVEPREM9
end
Reset Stats
كود PHP:
f(@JobID = '90019') -- Remove stats
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
Remove skills
كود PHP:
if(@JobID= '90020') -- Remove skills
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+@TotalS PMastery+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,115 26,10625)
UPDATE _CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '130'
end
Change name
كود PHP:
if(@JobID = '91720') --Change Name--
begin
declare @CharName16 varchar(64)
Select @CharName16=CharName16 from _Char where CharID = @CharID
Update _Char Set CharName16 = '@'+ @CharName16 Where CharID = @CharID
end
Remover Adv
كود PHP:
if(@JobID = '90015') -- Adv Remove
begin
DECLARE @ItemID varchar (64)
SELECT @ItemID=ItemID from _Inventory where CharID = @CharID AND Slot = '13'
DELETE FROM _BindingOptionWithItem where nItemDBID IN (SELECT ItemID FROM _Inventory WHERE Slot = '13' AND CharID=@CharID) and bOptType=2
end
Remove Blue Avatar
كود PHP:
if(@JobID= '34038') ---Remove Avatar Blue---
begin
Update _Items Set MagParamNum = 0, MagParam1 = NULL, MagParam2 = NULL, MagParam3 = NULL, MagParam4 = NULL, MagParam5 = NULL, MagParam6 = NULL, MagParam7 = NULL, MagParam8 = NULL, MagParam9 = NULL, MagParam10 = NULL, MagParam11 = NULL, MagParam12 = NULL where ID64 in (select ItemID from _Inventoryforavatar where CharID = @CharID and Slot between 0 and 2 and ItemID>0)
end
Remove Maximum
كود PHP:
if(@JobID= '787880') ---Remove Maximum---
begin
Update _Items
Set MagParamNum = 0 , MagParam1 = NULL, MagParam2 = NULL, MagParam3 = NULL, MagParam4 = NULL, MagParam5 = NULL, MagParam6 = NULL, MagParam7 = NULL, MagParam8 = NULL, MagParam9 = NULL, MagParam10 = NULL, MagParam11 = NULL, MagParam12 = NULL where ID64 in (select ItemID from _Inventory where CharID = @CharID and Slot between 0 and 12 and ItemID Between 1 AND 999999999)
end
Remove PK
كود PHP:
if(@JobID = '34005')---Remove PK---
begin
Update _Char Set DailyPK = 0 Where CharID = @CharID
Update _Char Set TotalPK = 0 Where CharID = @CharID
Update _Char Set PKPenaltyPoint = 0 Where CharID = @CharID
end