Selam, Arkadaşlar.
Elinizde yeni bir Database olabilir ve bu Database'in skillleri istediğiniz gibi olmayabilir.
MAGIC tablolarını aktarırsanız, scrollarınız veya diğer benzeri
itemlerinizde bozulabilir, hatta 1351-1397 ile 1298 arasında tablolarda
farklılık çıkmakta, böyle bir problem yaşayabilirsiniz.
İşte bu gibi bir sıkıntıya girdiğinizde, yardımınıza bu Prosedürüm koşacaktır.
Hatta Ben SexyKo Skill tablolarını 1351 e Update yapmak için kullandım.
Yani belki de kimsenin işine bile yaramaz.
Kendi Database'imi düzenlemek için yaptım, işimi gördü ve paylaşıyorum.
KULLANIMI:
Skilleri güzel olan Database'i yedek adında restore edin ve
BU KODU kn_online Database'nizde çalıştırın.
Elinizde yeni bir Database olabilir ve bu Database'in skillleri istediğiniz gibi olmayabilir.
MAGIC tablolarını aktarırsanız, scrollarınız veya diğer benzeri
itemlerinizde bozulabilir, hatta 1351-1397 ile 1298 arasında tablolarda
farklılık çıkmakta, böyle bir problem yaşayabilirsiniz.
İşte bu gibi bir sıkıntıya girdiğinizde, yardımınıza bu Prosedürüm koşacaktır.
Hatta Ben SexyKo Skill tablolarını 1351 e Update yapmak için kullandım.
Yani belki de kimsenin işine bile yaramaz.
Kendi Database'imi düzenlemek için yaptım, işimi gördü ve paylaşıyorum.
KULLANIMI:
Skilleri güzel olan Database'i yedek adında restore edin ve
BU KODU kn_online Database'nizde çalıştırın.
- Kod:
EXEC SKILL_AKTAR
- Kod:
USE [kn_online]
GO
/****** Object: StoredProcedure [dbo].[SKILL_AKTAR] Script Date: 06/18/2011 21:36:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[SKILL_AKTAR]
AS
/*
YAPAN: AKI
18.06.2011
[url=http://www.pvpke.com/][Linkleri görebilmek için üye olun veya giriş yapın.]
*/
--MAGIC
DECLARE @MagicNum int
DECLARE @EnName char(100)
DECLARE @KrName char(100)
DECLARE @Description char(200)
DECLARE @BeforeAction tinyint
DECLARE @TargetAction tinyint
DECLARE @SelfEffect tinyint
DECLARE @FlyingEffect tinyint
DECLARE @TargetEffect smallint
DECLARE @Moral tinyint
DECLARE @SkillLevel smallint
DECLARE @Skill smallint
DECLARE @Msp smallint
DECLARE @HP smallint
DECLARE @ItemGroup tinyint
DECLARE @UseItem int
DECLARE @CastTime tinyint
DECLARE @ReCastTime tinyint
DECLARE @SuccessRate tinyint
DECLARE @Type1 tinyint
DECLARE @Type2 tinyint
DECLARE @Range smallint
DECLARE @Etc tinyint
DECLARE @Event int
DECLARE @row tinyint
SET @row = 0
DECLARE MAGIC_Cursor CURSOR
FOR
SELECT MagicNum,EnName,KrName,Description,BeforeAction,TargetAction,SelfEffect,FlyingEffect,TargetEffect,Moral,SkillLevel,Skill,Msp,HP,ItemGroup,UseItem,CastTime,ReCastTime,SuccessRate,Type1,Type2,Range,Etc FROM yedek.dbo.MAGIC
OPEN MAGIC_Cursor
FETCH NEXT FROM MAGIC_Cursor INTO @MagicNum,@EnName,@KrName,@Description,@BeforeAction,@TargetAction,@SelfEffect,@FlyingEffect,@TargetEffect,@Moral,@SkillLevel,@Skill,@Msp,@HP,@ItemGroup,@UseItem,@CastTime,@ReCastTime,@SuccessRate,@Type1,@Type2,@Range,@Etc
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC
SET MagicNum=@MagicNum,EnName=@EnName,KrName=@KrName,Description=@Description,BeforeAction=@BeforeAction,TargetAction=@TargetAction,SelfEffect=@SelfEffect,FlyingEffect=@FlyingEffect,TargetEffect=@TargetEffect,Moral=@Moral,SkillLevel=@SkillLevel
,Skill=@Skill,Msp=@Msp,HP=@HP,ItemGroup=@ItemGroup,UseItem=@UseItem,CastTime=@CastTime,ReCastTime=@ReCastTime,SuccessRate=@SuccessRate,Type1=@Type1,Type2=@Type2,Range=@Range,Etc=@Etc
WHERE MagicNum=@MagicNum
END
FETCH NEXT FROM MAGIC_Cursor INTO @MagicNum,@EnName,@KrName,@Description,@BeforeAction,@TargetAction,@SelfEffect,@FlyingEffect,@TargetEffect,@Moral,@SkillLevel,@Skill,@Msp,@HP,@ItemGroup,@UseItem,@CastTime,@ReCastTime,@SuccessRate,@Type1,@Type2,@Range,@Etc
CLOSE MAGIC_Cursor
DEALLOCATE MAGIC_Cursor
--MAGIC_TYPE1
DECLARE @iNum int
DECLARE @Name char(50)
DECLARE @Description1 char(200)
DECLARE @Type tinyint
DECLARE @HitRate smallint
DECLARE @Hit smallint
DECLARE @AddDamage smallint
DECLARE @Delay tinyint
DECLARE @ComboType tinyint
DECLARE @ComboCount tinyint
DECLARE @ComboDamage smallint
DECLARE @Range1 smallint
DECLARE MAGIC1_Cursor CURSOR
FOR
SELECT iNum,Name,Description,Type,HitRate,Hit,AddDamage,Delay,ComboType,ComboCount,ComboDamage,Range FROM yedek.dbo.MAGIC_TYPE1
OPEN MAGIC1_Cursor
FETCH NEXT FROM MAGIC1_Cursor INTO @iNum,@Name,@Description1,@Type,@HitRate,@Hit,@AddDamage,@Delay,@ComboType,@ComboCount,@ComboDamage,@Range1
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE1
SET iNum=@iNum,Name=@Name,Description=@Description1,Type=@Type,HitRate=@HitRate,Hit=@Hit,AddDamage=@AddDamage,Delay=@Delay,ComboType=@ComboType,ComboCount=@ComboCount,ComboDamage=@ComboDamage,Range=@Range1
WHERE iNum=@iNum
END
FETCH NEXT FROM MAGIC1_Cursor INTO @iNum,@Name,@Description1,@Type,@HitRate,@Hit,@AddDamage,@Delay,@ComboType,@ComboCount,@ComboDamage,@Range1
CLOSE MAGIC1_Cursor
DEALLOCATE MAGIC1_Cursor
--MAGIC2
DECLARE @iNum2 int
DECLARE @Name2 char(30)
DECLARE @Description2 char(100)
DECLARE @HitType tinyint
DECLARE @HitRate2 smallint
DECLARE @AddDamage2 smallint
DECLARE @AddRange smallint
DECLARE @NeedArrow tinyint
DECLARE @AddDamagePlus smallint
DECLARE MAGIC2_Cursor CURSOR
FOR
SELECT iNum,Name,Description,HitType,HitRate,AddDamage,AddRange,NeedArrow FROM yedek.dbo.MAGIC_TYPE2
OPEN MAGIC2_Cursor
FETCH NEXT FROM MAGIC2_Cursor INTO @iNum2,@Name2,@Description2,@HitType,@HitRate2,@AddDamage2,@AddRange,@NeedArrow
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE2
SET iNum=@iNum2,Name=@Name2,Description=@Description2,HitType=@HitType,HitRate=@HitRate2,AddDamage=@AddDamage2,AddRange=@AddRange,NeedArrow=@NeedArrow
WHERE iNum=@iNum2
END
FETCH NEXT FROM MAGIC2_Cursor INTO @iNum2,@Name2,@Description2,@HitType,@HitRate2,@AddDamage2,@AddRange,@NeedArrow
CLOSE MAGIC2_Cursor
DEALLOCATE MAGIC2_Cursor
--MAGIC3
DECLARE @iNum3 int
DECLARE @Name3 char(30)
DECLARE @Description3 char(100)
DECLARE @Radius tinyint
DECLARE @Angle smallint
DECLARE @DirectType tinyint
DECLARE @FirstDamage smallint
DECLARE @EndDamage smallint
DECLARE @TimeDamage smallint
DECLARE @Duration tinyint
DECLARE @Attribute tinyint
DECLARE MAGIC3_Cursor CURSOR
FOR
SELECT iNum,Radius,Angle,DirectType,FirstDamage,EndDamage,TimeDamage,Duration,Attribute FROM yedek.dbo.MAGIC_TYPE3
OPEN MAGIC3_Cursor
FETCH NEXT FROM MAGIC3_Cursor INTO @iNum3,@Radius,@Angle,@DirectType,@FirstDamage,@EndDamage,@TimeDamage,@Duration,@Attribute
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE3
SET iNum=@iNum3,Radius=@Radius,Angle=@Angle,DirectType=@DirectType,FirstDamage=@FirstDamage,EndDamage=@EndDamage,TimeDamage=@TimeDamage,Duration=@Duration,Attribute=@Attribute
WHERE iNum=@iNum3
END
FETCH NEXT FROM MAGIC3_Cursor INTO @iNum3,@Radius,@Angle,@DirectType,@FirstDamage,@EndDamage,@TimeDamage,@Duration,@Attribute
CLOSE MAGIC3_Cursor
DEALLOCATE MAGIC3_Cursor
--MAGIC4
DECLARE @iNum4 int
DECLARE @Name4 char(50)
DECLARE @Description4 char(200)
DECLARE @BuffType tinyint
DECLARE @Radius4 tinyint
DECLARE @Duration4 smallint
DECLARE @AttackSpeed tinyint
DECLARE @Speed tinyint
DECLARE @AC smallint
DECLARE @ACPct smallint
DECLARE @Attack tinyint
DECLARE @MagicAttack tinyint
DECLARE @MaxHP smallint
DECLARE @MaxHpPct smallint
DECLARE @MaxMP smallint
DECLARE @MaxMpPct smallint
DECLARE @HitRate4 tinyint
DECLARE @AvoidRate smallint
DECLARE @Str smallint
DECLARE @Sta smallint
DECLARE @Dex smallint
DECLARE @Intel smallint
DECLARE @Cha smallint
DECLARE @FireR tinyint
DECLARE @ColdR tinyint
DECLARE @LightningR tinyint
DECLARE @MagicR tinyint
DECLARE @DiseaseR tinyint
DECLARE @PoisonR tinyint
DECLARE @ExpPct tinyint
DECLARE MAGIC4_Cursor CURSOR
FOR
SELECT iNum,BuffType,Radius,Duration,AttackSpeed,Speed,AC,Attack,MaxHP,HitRate,AvoidRate,Str,Sta,Dex,Intel,Cha,FireR,ColdR,LightningR,MagicR,DiseaseR,PoisonR FROM yedek.dbo.MAGIC_TYPE4
OPEN MAGIC4_Cursor
FETCH NEXT FROM MAGIC4_Cursor INTO @iNum4,@BuffType,@Radius4,@Duration4,@AttackSpeed,@Speed,@AC,@Attack,@MaxHP,@HitRate4,@AvoidRate,@Str,@Sta,@Dex,@Intel,@Cha,@FireR,@ColdR,@LightningR,@MagicR,@DiseaseR,@PoisonR
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE4
SET iNum=@iNum4,BuffType=@BuffType,Radius=@Radius4,Duration=@Duration4,AttackSpeed=@AttackSpeed,Speed=@Speed,AC=@AC,Attack=@Attack,MaxHP=@MaxHP
,HitRate=@HitRate4,AvoidRate=@AvoidRate,Str=@Str,Sta=@Sta,Dex=@Dex,Intel=@Intel,Cha=@Cha,FireR=@FireR,ColdR=@ColdR,LightningR=@LightningR,MagicR=@MagicR,DiseaseR=@DiseaseR,PoisonR=@PoisonR
WHERE iNum=@iNum4
END
FETCH NEXT FROM MAGIC4_Cursor INTO @iNum4,@BuffType,@Radius4,@Duration4,@AttackSpeed,@Speed,@AC,@Attack,@MaxHP,@HitRate4,@AvoidRate,@Str,@Sta,@Dex,@Intel,@Cha,@FireR,@ColdR,@LightningR,@MagicR,@DiseaseR,@PoisonR
CLOSE MAGIC4_Cursor
DEALLOCATE MAGIC4_Cursor
--MAGIC5
DECLARE @iNum5 int
DECLARE @Name5 char(30)
DECLARE @Description5 char(100)
DECLARE @Type5 tinyint
DECLARE @ExpRecover tinyint
DECLARE @NeedStone smallint
DECLARE MAGIC5_Cursor CURSOR
FOR
SELECT iNum,Name,Description,Type,ExpRecover,NeedStone FROM yedek.dbo.MAGIC_TYPE5
OPEN MAGIC5_Cursor
FETCH NEXT FROM MAGIC5_Cursor INTO @iNum5,@Name5,@Description5,@Type5,@ExpRecover,@NeedStone
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE5
SET iNum=@iNum5,Name=@Name5,Description=@Description5,Type=@Type5,ExpRecover=@ExpRecover,NeedStone=@NeedStone
WHERE iNum=@iNum5
END
FETCH NEXT FROM MAGIC5_Cursor INTO @iNum5,@Name5,@Description5,@Type5,@ExpRecover,@NeedStone
CLOSE MAGIC5_Cursor
DEALLOCATE MAGIC5_Cursor
--MAGIC6
DECLARE @iNum6 int
DECLARE @Name6 char(30)
DECLARE @Description6 char(100)
DECLARE @Size smallint
DECLARE @TransformID smallint
DECLARE @Duration6 smallint
DECLARE @MaxHp6 smallint
DECLARE @MaxMp6 smallint
DECLARE @Speed6 tinyint
DECLARE @AttackSpeed6 smallint
DECLARE @TotalHit smallint
DECLARE @TotalAc smallint
DECLARE @TotalHitRate smallint
DECLARE @TotalEvasionRate smallint
DECLARE @TotalFireR smallint
DECLARE @TotalColdR smallint
DECLARE @TotalLightningR smallint
DECLARE @TotalMagicR smallint
DECLARE @TotalDiseaseR smallint
DECLARE @TotalPoisonR smallint
DECLARE @Class smallint
DECLARE @UserSkillUse tinyint
DECLARE @NeedItem tinyint
DECLARE @SkillSuccessRate tinyint
DECLARE @MonsterFriendly tinyint
DECLARE MAGIC6_Cursor CURSOR
FOR
SELECT iNum,Name,Description,Size,TransformID,Duration,MaxHp,MaxMp,Speed,AttackSpeed,TotalHit,TotalAc,TotalHitRate,TotalEvasionRate,TotalFireR,TotalColdR,TotalLightningR,TotalMagicR,TotalDiseaseR,TotalPoisonR,Class,UserSkillUse,NeedItem,SkillSuccessRate,MonsterFriendly FROM yedek.dbo.MAGIC_TYPE6
OPEN MAGIC6_Cursor
FETCH NEXT FROM MAGIC6_Cursor INTO @iNum6,@Name6,@Description6,@Size,@TransformID,@Duration,@MaxHp6,@MaxMp6,@Speed6,@AttackSpeed6,@TotalHit,@TotalAc,@TotalHitRate,@TotalEvasionRate,@TotalFireR,@TotalColdR,@TotalLightningR,@TotalMagicR,@TotalDiseaseR,@TotalPoisonR,@Class,@UserSkillUse,@NeedItem,@SkillSuccessRate,@MonsterFriendly
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE6
SET iNum=@iNum6,Name=@Name6,Description=@Description6,Size=@Size,TransformID=@TransformID,Duration=@Duration6,MaxHp=@MaxHp6,MaxMp=@MaxMp6,Speed=@Speed6,AttackSpeed=@AttackSpeed6,TotalHit=@TotalHit,TotalAc=@TotalAc,TotalHitRate=@TotalHitRate,TotalEvasionRate=@TotalEvasionRate
,TotalFireR=@TotalFireR,TotalColdR=@TotalColdR,TotalLightningR=@TotalLightningR,TotalMagicR=@TotalMagicR,TotalDiseaseR=@TotalDiseaseR,TotalPoisonR=@TotalPoisonR,Class=@Class,UserSkillUse=@UserSkillUse,NeedItem=@NeedItem,SkillSuccessRate=@SkillSuccessRate,MonsterFriendly=@MonsterFriendly
WHERE iNum=@iNum6
END
FETCH NEXT FROM MAGIC6_Cursor INTO @iNum6,@Name6,@Description6,@Size,@TransformID,@Duration,@MaxHp6,@MaxMp6,@Speed6,@AttackSpeed6,@TotalHit,@TotalAc,@TotalHitRate,@TotalEvasionRate,@TotalFireR,@TotalColdR,@TotalLightningR,@TotalMagicR,@TotalDiseaseR,@TotalPoisonR,@Class,@UserSkillUse,@NeedItem,@SkillSuccessRate,@MonsterFriendly
CLOSE MAGIC6_Cursor
DEALLOCATE MAGIC6_Cursor
--MAGIC7
DECLARE @nIndex int
DECLARE @strName char(30)
DECLARE @strNote char(100)
DECLARE @byValidGroup tinyint
DECLARE @byNatoinChange tinyint
DECLARE @shMonsterNum smallint
DECLARE @byTargetChange tinyint
DECLARE @byStateChange tinyint
DECLARE @byRadius tinyint
DECLARE @shHitrate smallint
DECLARE @shDuration smallint
DECLARE @shDamage smallint
DECLARE @byVisoin tinyint
DECLARE @nNeedItem int
DECLARE MAGIC7_Cursor CURSOR
FOR
SELECT nIndex,strName,strNote,byValidGroup,byNatoinChange,shMonsterNum,byTargetChange,byStateChange,byRadius,shHitrate,shDuration,shDamage,byVisoin,nNeedItem FROM yedek.dbo.MAGIC_TYPE7
OPEN MAGIC7_Cursor
FETCH NEXT FROM MAGIC7_Cursor INTO @nIndex,@strName,@strNote,@byValidGroup,@byNatoinChange,@shMonsterNum,@byTargetChange,@byStateChange,@byRadius,@shHitrate,@shDuration,@shDamage,@byVisoin,@nNeedItem
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE7
SET nIndex=@nIndex,strName=@strName,strNote=@strNote,byValidGroup=@byValidGroup,byNatoinChange=@byNatoinChange,shMonsterNum=@shMonsterNum,byTargetChange=@byTargetChange,byStateChange=@byStateChange,byRadius=@byRadius,shHitrate=@shHitrate,shDuration=@shDuration,shDamage=@shDamage,byVisoin=@byVisoin,nNeedItem=@nNeedItem
WHERE nIndex=@nIndex
END
FETCH NEXT FROM MAGIC7_Cursor INTO @nIndex,@strName,@strNote,@byValidGroup,@byNatoinChange,@shMonsterNum,@byTargetChange,@byStateChange,@byRadius,@shHitrate,@shDuration,@shDamage,@byVisoin,@nNeedItem
CLOSE MAGIC7_Cursor
DEALLOCATE MAGIC7_Cursor
--MAGIC8
DECLARE @iNum8 int
DECLARE @Name8 char(30)
DECLARE @Description8 char(100)
DECLARE @Target tinyint
DECLARE @Radius8 smallint
DECLARE @WarpType tinyint
DECLARE @ExpRecover8 smallint
DECLARE MAGIC8_Cursor CURSOR
FOR
SELECT iNum,Name,Description,Target,Radius,WarpType,ExpRecover FROM yedek.dbo.MAGIC_TYPE8
OPEN MAGIC8_Cursor
FETCH NEXT FROM MAGIC8_Cursor INTO @iNum8,@Name8,@Description8,@Target,@Radius8,@WarpType,@ExpRecover8
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE8
SET iNum=@iNum8,Name=@Name8,Description=@Description8,Target=@Target,Radius=@Radius8,WarpType=@WarpType,ExpRecover=@ExpRecover8
WHERE iNum=@iNum8
END
FETCH NEXT FROM MAGIC8_Cursor INTO @iNum8,@Name8,@Description8,@Target,@Radius8,@WarpType,@ExpRecover8
CLOSE MAGIC8_Cursor
DEALLOCATE MAGIC8_Cursor
--MAGIC9
DECLARE @iNum9 int
DECLARE @Name9 char(30)
DECLARE @Description9 char(100)
DECLARE @ValidGroup tinyint
DECLARE @NationChange tinyint
DECLARE @MonsterNum smallint
DECLARE @TargetChange tinyint
DECLARE @StateChange tinyint
DECLARE @Radius9 smallint
DECLARE @Hitrate9 smallint
DECLARE @Duration9 smallint
DECLARE @AddDamage9 smallint
DECLARE @Vision smallint
DECLARE @NeedItem9 int
DECLARE MAGIC9_Cursor CURSOR
FOR
SELECT iNum,Name,Description,ValidGroup,NationChange,MonsterNum,TargetChange,StateChange,Radius,Hitrate,Duration,AddDamage,Vision,NeedItem FROM yedek.dbo.MAGIC_TYPE9
OPEN MAGIC9_Cursor
FETCH NEXT FROM MAGIC9_Cursor INTO @iNum9,@Name9,@Description9,@ValidGroup,@NationChange,@MonsterNum,@TargetChange,@StateChange,@Radius9,@Hitrate9,@Duration9,@AddDamage9,@Vision,@NeedItem9
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE MAGIC_TYPE9
SET iNum=@iNum9,Name=@Name9,Description=@Description9,ValidGroup=@ValidGroup,NationChange=@NationChange,MonsterNum=@MonsterNum,TargetChange=@TargetChange,StateChange=@StateChange,Radius=@Radius9,Hitrate=@Hitrate9,Duration=@Duration9,AddDamage=@AddDamage9,Vision=@Vision,NeedItem=@NeedItem9
WHERE iNum=@iNum9
END
FETCH NEXT FROM MAGIC9_Cursor INTO @iNum9,@Name9,@Description9,@ValidGroup,@NationChange,@MonsterNum,@TargetChange,@StateChange,@Radius9,@Hitrate9,@Duration9,@AddDamage9,@Vision,@NeedItem9
CLOSE MAGIC9_Cursor
DEALLOCATE MAGIC9_Cursor