تجميعة كويرى مهمة (الباشمبرمج)

NESTA3

V.I.P
SQL Developer
عضو
2 فبراير 2017
318
2
142
244
Egypt

المستوي:

اهلا و مرحبأ بكم



حصريـــا علي منتدي الباشمبرمج


>>> أكبر مكتبة SQL- Query <<<


Clean
( SRO_VT_ACCOUNT )

PHP:
USE SRO_VT_ACCOUNT  
GO 
TRUNCATE TABLE dbo.TB_User 
TRUNCATE TABLE dbo.TB_User_Bak 
TRUNCATE TABLE dbo.SK_CharRenameLog 
TRUNCATE TABLE dbo._Punishment 
TRUNCATE TABLE dbo._ServiceManagerLog 
TRUNCATE TABLE dbo.Test_HN 
TRUNCATE TABLE dbo._BlockedUser 
TRUNCATE TABLE dbo._CasGMChatLog 
TRUNCATE TABLE dbo._Notice 
TRUNCATE TABLE dbo._SMCLog 
TRUNCATE TABLE dbo.QuaySoEpoint 
TRUNCATE TABLE dbo.SK_ITEM_GuardLog 
TRUNCATE TABLE dbo.SK_ItemSaleLog 
TRUNCATE TABLE dbo.SK_PackageItemSaleLog 
TRUNCATE TABLE dbo.SK_PK_UpdateLog 
TRUNCATE TABLE dbo.SK_ResetSkillLog 
TRUNCATE TABLE dbo.SK_Silk 
TRUNCATE TABLE dbo.SK_SilkBuyList 
TRUNCATE TABLE dbo.SK_SilkGoods 
TRUNCATE TABLE dbo.SK_SubtractSilk_VAS 
TRUNCATE TABLE dbo.SR_ShardCharNames 
TRUNCATE TABLE dbo.TB_Net2e 
TRUNCATE TABLE dbo.TB_Net2e_Bak 
TRUNCATE TABLE dbo.tb_paygate_trans

Clean
( SRO_VT_SHARD )

PHP:
USE SRO_VT_SHARD 
GO 
truncate table _CharSkill 
truncate table _CharSkillMastery 
truncate table _GuildMember 
truncate table _BlockedWhisperers 
truncate table _Inventory 
truncate table _InventoryForAvatar 
truncate table _InventoryForLinkedStorage 
truncate table _TrainingCampMember 
truncate table _TrainingCampSubMentorHonorPoint 
truncate table _TrainingCampHonorRank 
truncate table _TrainingCampBuffStatus 
delete from _TrainingCamp 
truncate table _StaticAvatar 
truncate table _User 
truncate table _Friend 
truncate table _Memo 
truncate table _TimedJob 
truncate table _CharTrijobSafeTrade 
delete from _CharTrijob 
truncate table _InvCOS 
delete from _CharCOS where ID > 0 
delete from _Char where charid > 0 
truncate table _Chest 
truncate table _ChestInfo 
truncate table _ItemPool 
delete from _Items where ID64 > 0 
delete from _AccountJID 
truncate table _GuildChest 
update _AlliedClans set Ally1 = 0, Ally2 = 0, Ally3 = 0, Ally4 = 0, Ally5 = 0, Ally6 = 0, Ally7 = 0, Ally8 = 0 
truncate table _GuildWar 
delete from _Guild where ID > 0 
delete from _AlliedClans where ID > 0 
truncate table _CharNameList 
truncate table _CharQuest 
truncate table _ClientConfig 
truncate table _DeletedChar 
truncate table _SiegeFortressStruct 
truncate table _SiegeFortressStoneState 
truncate table _SiegeFortressRequest 
truncate table _SiegeFortressObject 
truncate table _SiegeFortressItemForge 
truncate table _SiegeFortressBattleRecord 
delete from _SiegeFortress 
truncate table _OpenMarket

Clean

( SRO_VT_SHARDLOG )

PHP:
USE SRO_VT_SHARDLOG
GO 
TRUNCATE TABLE dbo._LogCashItem 
TRUNCATE TABLE dbo._LogEventChar 
TRUNCATE TABLE dbo._LogEventItem 
TRUNCATE TABLE dbo._LogEventSiegeFortress 
TRUNCATE TABLE dbo._LogSchedule 
TRUNCATE TABLE dbo._LogServerEvent

ADD ITEM in NPC

PHP:
USE SRO_VT_SHARD 
GO 
DECLARE @ID int 
DECLARE @INDEX int 
DECLARE @CodeName varchar(128) 
DECLARE @PackageName varchar(128) 
DECLARE @DescSTRID varchar(128) 
DECLARE @File varchar(128) 
DECLARE @Price int 
DECLARE @SilkPrice int 
DECLARE @Slot tinyint 
DECLARE @TAB varchar(128) 
DECLARE @Data int 
DECLARE @SkipScrapOfPackageItem int = 0 
DECLARE @SkipPackageItem int = 0 
DECLARE @SkipPricePolicyOfItem int = 0 
--- Set Variables 
SET @CodeName = 'ITEM_EU_SHIELD_08_C_RARE' -- Item CodeName in RefObjCommon 
SET @Price = 5000000 -- Set 0 if you don't want to set Gold Price 
SET @SilkPrice = 256 -- Set 0 if you don't want to set Silk Price 
SET @TAB = 'STORE_Honor_TAB1' -- Tab name in NPC, For _RefShopGoods 
SET @PackageName = 'PACKAGE_'+@CodeName -- Do not edit if you don't know what are you doing. 
--- you don't need to touch here... 
IF (@CodeName = '') 
BEGIN 
    PRINT 'You have to edit CodeName..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF ((SELECT COUNT(ID) FROM _RefObjCommon WHERE CodeName128 = @CodeName) < 1) 
BEGIN 
    PRINT 'There is no item with this CodeName..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF (@Price < 0) 
BEGIN 
    PRINT 'Price is not VALID..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF (@SilkPrice < 0) 
BEGIN 
    PRINT 'Silk Price is not VALID..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF ((SELECT COUNT(ID) FROM _RefShopTab WHERE CodeName128 = @TAB) < 1) 
BEGIN 
    PRINT 'TAB VALUE IS NOT VALID..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF ((SELECT COUNT (RefPackageItemCodeName) FROM _RefShopGoods WHERE RefPackageItemCodeName = @PackageName AND RefTabCodeName = @TAB) > 0) 
BEGIN 
    PRINT 'There is already same item in same tab..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF ((SELECT COUNT (RefPackageItemCodeName) FROM _RefScrapOfPackageItem WHERE RefPackageItemCodeName = @PackageName) > 0) 
BEGIN 
    PRINT 'There is already an entry for this item, skipping @_RefScrapOfPackageItem table..!' 
    SET @SkipScrapOfPackageItem = 1 
END 
IF ((SELECT COUNT (CodeName128) FROM _RefPackageItem WHERE CodeName128 = @PackageName) > 0) 
BEGIN 
    PRINT 'There is already an entry for this item, skipping @_RefPackageItem table..!' 
    SET @SkipPackageItem = 1 
END 
IF ((SELECT COUNT (PaymentDevice) FROM _RefPricePolicyOfItem WHERE RefPackageItemCodeName = @PackageName AND PaymentDevice = '1') > 0) 
BEGIN 
    PRINT 'There is already an entry for this item with same PaymentDevice, skipping @_RefPricePolicyOfItem table..! (Gold)' 
    SET @SkipPricePolicyOfItem = 1 
END 
IF ((SELECT COUNT (PaymentDevice) FROM _RefPricePolicyOfItem WHERE RefPackageItemCodeName = @PackageName AND PaymentDevice = '2') > 0) 
BEGIN 
    PRINT 'There is already an entry for this item with same PaymentDevice, skipping @_RefPricePolicyOfItem table..! (Silk)' 
    IF (@SkipPricePolicyOfItem = 1) 
    BEGIN 
        SET @SkipPricePolicyOfItem = 3 
    END 
    ELSE 
    BEGIN 
        SET @SkipPricePolicyOfItem = 2 
    END 
END 
IF (@SilkPrice = 0) AND (@Price = 0) 
BEGIN 
    PRINT 'You need to set a price, at least one !' 
    PRINT 'FAILED.' 
    RETURN 
END 
SELECT TOP 1 @ID = ID FROM _RefPackageItem ORDER BY ID DESC 
SET @ID = @ID + 1 
SELECT TOP 1 @INDEX = [Index] FROM _RefScrapOfPackageItem ORDER BY [Index] DESC 
SET @INDEX = @INDEX + 1 
SELECT TOP 1 @Slot = SlotIndex FROM _RefShopGoods WHERE RefTabCodeName = @TAB ORDER BY SlotIndex DESC 
IF (@Slot = 0) 
BEGIN 
    SET @Slot = @Slot + 1 
END 
ELSE IF (@Slot > 0) 
BEGIN 
    SET @Slot = @Slot + 1 
END 
ELSE 
BEGIN 
    SET @Slot = 0 
END 
SET @DescSTRID = 'SN_' + @CodeName + '_TT_DESC' 
SELECT @File = AssocFileIcon128 FROM _RefObjCommon WHERE CodeName128 = @CodeName 
IF (@CodeName LIKE '%RING%' OR @CodeName LIKE '%NECKLACE%' OR @CodeName LIKE '%ARCHEMY%') 
BEGIN 
    SET @Data = 1 
END 
ELSE 
BEGIN 
    SELECT @Data = Dur_U FROM _RefObjItem WHERE ID = (SELECT Link FROM _RefObjCommon WHERE CodeName128 = @CodeName) 
END 
BEGIN TRANSACTION 
IF (@SkipPackageItem = 0) 
BEGIN 
    --SET IDENTITY_INSERT _RefPackageItem ON 
    INSERT _RefPackageItem ([Service], Country, ID, CodeName128, SaleTag, ExpandTerm, NameStrID, DescStrID, AssocFileIcon, Param1, Param1_Desc128, Param2, Param2_Desc128, Param3, Param3_Desc128, Param4, Param4_Desc128) VALUES (1, 15, @ID, @PackageName, 0, 'EXPAND_TERM_ALL', 'SN_'+@CodeName, @DescSTRID, @File, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx') 
        IF (@@ERROR <> 0)   
        BEGIN 
            PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPackageItem, Rolling back...' 
            ROLLBACK TRANSACTION 
            RETURN 
        END 
    PRINT 'Added to _RefPackageItem !' 
    --SET IDENTITY_INSERT _RefPackageItem OFF 
END 
IF (@SkipScrapOfPackageItem = 0) 
BEGIN 
    INSERT _RefScrapOfPackageItem (Service, Country, RefPackageItemCodeName, RefItemCodeName, OptLevel, Variance, Data, MagParamNum, MagParam1, MagParam2, MagParam3, MagParam4, MagParam5, MagParam6, MagParam7, MagParam8, MagParam9, MagParam10, MagParam11, MagParam12, Param1, Param1_Desc128, Param2, Param2_Desc128, Param3, Param3_Desc128, Param4, Param4_Desc128, [Index]) VALUES (1, 15, @PackageName, @CodeName, 0, 0, @Data, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx', @INDEX) 
        IF (@@ERROR <> 0)   
        BEGIN 
            PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefScrapOfPackageItem, Rolling back...' 
            ROLLBACK TRANSACTION 
            RETURN 
        END 
    PRINT 'Added to _RefScrapOfPackageItem !' 
END 
IF (@SkipPricePolicyOfItem = 2 OR @SkipPricePolicyOfItem = 0 AND @Price > 0) 
BEGIN 
    INSERT _RefPricePolicyOfItem (Service, Country, RefPackageItemCodeName, PaymentDevice, PreviousCost, Cost, Param1, Param1_Desc128, Param2, Param2_Desc128, Param3, Param3_Desc128, Param4, Param4_Desc128) VALUES (1, 15, @PackageName, 1, 0, @Price, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx') 
        IF (@@ERROR <> 0)   
        BEGIN 
            PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPricePolicyOfItem, Rolling back...' 
            ROLLBACK TRANSACTION 
            RETURN 
        END 
    PRINT 'Added to _RefPricePolicyOfItem, PaymentDevice = 1 (Gold)' 
END 
IF (@SkipPricePolicyOfItem = 1 OR @SkipPricePolicyOfItem = 0 AND @SilkPrice > 0) 
BEGIN 
    INSERT _RefPricePolicyOfItem (Service, Country, RefPackageItemCodeName, PaymentDevice, PreviousCost, Cost, Param1, Param1_Desc128, Param2, Param2_Desc128, Param3, Param3_Desc128, Param4, Param4_Desc128) VALUES (1, 15, @PackageName, 2, 0, @SilkPrice, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx') 
        IF (@@ERROR <> 0)   
        BEGIN 
            PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPricePolicyOfItem, Rolling back...' 
            ROLLBACK TRANSACTION 
            RETURN 
        END 
    PRINT 'Added to _RefPricePolicyOfItem, PaymentDevice = 2 (Silk)' 
END 
ELSE 
BEGIN 
    PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...' 
END 
INSERT _RefShopGoods (Service, Country, RefTabCodeName, RefPackageItemCodeName, SlotIndex, Param1, Param1_Desc128, Param2, Param2_Desc128, Param3, Param3_Desc128, Param4, Param4_Desc128) VALUES (1, 15, @TAB, @PackageName, @Slot, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx') 
    IF (@@ERROR <> 0)   
    BEGIN 
        PRINT 'An error happened while adding to _RefShopGoods table' 
        PRINT 'FAILED.' 
        ROLLBACK TRANSACTION 
        RETURN 
    END 
    PRINT 'Added to _RefShopGoods, DONE!' 
COMMIT TRANSACTION  
 
_____________________________________________DECLARE @CHARNAME VARCHAR (30)  
DECLARE @NPCNAME VARCHAR (30)  
DECLARE @ADDNEW VARCHAR (30)  
DECLARE @GAMEWORDID INT  
SET @CHARNAME = 'DaD' --U Char Name  
SET @NPCNAME = 'DAD' --U NPC NAME  
SET @GAMEWORDID = 1 --IMPORTANT! GET GAMEWORLD ID FROM THE LOCALY U WANT ADD THE NPC NORMAL CITYs = 1  
SET @ADDNEW = 'NPC'  
--  
IF @ADDNEW = 'NPC' BEGIN  
DECLARE @MAXLINK VARCHAR (30) = (SELECT MAX (ID) FROM _RefObjChar)+1  
DECLARE @MAXCOMMONID VARCHAR (30) = (SELECT MAX (ID) FROM _RefObjCommon)+1  
SET IDENTITY_INSERT _RefObjCommon ON  
INSERT INTO _RefObjCommon (Service,ID,CodeName128,ObjName128,OrgObjCodeName128,NameStrID128,DescStrID128,CashItem,Bionic,TypeID1,TypeID2,TypeID3,TypeID4,DecayTime,Country  
,Rarity,CanTrade,CanSell,CanBuy,CanBorrow,CanDrop,CanPick,CanRepair,CanRevive,CanUse,CanThrow,Price,CostRepair,CostRevive,CostBorrow,KeepingFee,SellPrice,ReqLevelType1,ReqLevel1,ReqLevelType2,ReqLevel2,ReqLevelType3,ReqLevel3,ReqLevelType4,ReqLevel4,MaxContain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,Speed2,Scale,BCHeight,BCRadius  
,EventID,AssocFileObj128,AssocFileDrop128,AssocFileIcon128,AssocFile1_128,AssocFile2_128,Link) VALUES  
(1,@MAXCOMMONID,'NPC_'+@NPCNAME,'xxx','xxx','SN_NPC_'+@NPCNAME,'xxx',0,1,1,2,2,0,5000,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,-1,0,-1,0,-1,0,0,0,0,0,0,0,100,0,0,0,'npc\npc\chinawoman_Noblegirl_event.bsr','xxx','xxx','xxx','xxx',@MAXLINK)  
SET IDENTITY_INSERT _RefObjCommon OFF  
SET IDENTITY_INSERT _RefObjChar ON  
INSERT INTO _RefObjChar (ID,Lvl,CharGender,MaxHP,MaxMP,ResistFrozen,ResistFrostbite,ResistBurn,ResistEShock,ResistPoison,ResistZombie,ResistSleep,ResistRoot,ResistSlow,ResistFear  
,ResistMyopia,ResistBlood,ResistStone,ResistDark,ResistStun,ResistDisea,ResistChaos,ResistCsePD,ResistCseMD,ResistCseSTR,ResistCseINT,ResistCseHP,ResistCseMP,Resist24,ResistBomb,Resist26  
,Resist27,Resist28,Resist29,Resist30,Resist31,Resist32,InventorySize,CanStore_TID1,CanStore_TID2,CanStore_TID3,CanStore_TID4,CanBeVehicle,CanControl,DamagePortion,MaxPassenger,AssocTactics,PD,MD,PAR,MAR,ER,BR,HR,CHR  
,ExpToGive,CreepType,Knockdown,KO_RecoverTime,DefaultSkill_1,DefaultSkill_2,DefaultSkill_3,DefaultSkill_4,DefaultSkill_5,DefaultSkill_6,DefaultSkill_7,DefaultSkill_8,DefaultSkill_9,DefaultSkill_10,TextureType,Except_1  
,Except_2,Except_3,Except_4,Except_5,Except_6,Except_7,Except_8,Except_9,Except_10,Link) VALUES  
(@MAXLINK,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,336860180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)  
SET IDENTITY_INSERT _RefObjChar OFF  
SET IDENTITY_INSERT _RefShop ON  
DECLARE @ShopID VARCHAR (30) = (SELECT MAX (ID) FROM _RefShop)+1  
INSERT INTO _RefShop (Service,Country,ID,CodeName128,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128)  
VALUES (1,15,@ShopID,'STORE_'+@NPCNAME,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')  
SET IDENTITY_INSERT _RefShop OFF  
SET IDENTITY_INSERT _RefShopGroup ON  
DECLARE @ShopGroupID VARCHAR (30) = (SELECT MAX (ID) FROM _RefShopGroup)+1  
INSERT INTO _RefShopGroup (Service,Country,ID,CodeName128,RefNPCCodeName,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128)  
VALUES (1,15,@ShopGroupID,'GROUP_STORE_'+@NPCNAME,'NPC_'+@NPCNAME,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')  
SET IDENTITY_INSERT _RefShopGroup OFF  
SET IDENTITY_INSERT _RefShopItemGroup ON  
DECLARE @ShopItemID VARCHAR (30) = (SELECT MAX (GROUPID) FROM _RefShopItemGroup)+1  
INSERT INTO _RefShopItemGroup (Service,GroupID,CodeName128,StrID128_Group)  
VALUES (1,@ShopItemID,'STORE_'+@NPCNAME+'_GROUP1','SN_STORE_'+@NPCNAME+'_GROUP1')  
SET IDENTITY_INSERT _RefShopItemGroup OFF  
SET IDENTITY_INSERT _RefShopTab ON  
DECLARE @ShopTabID VARCHAR (30)= (SELECT MAX (ID) FROM _RefShopTab)+1  
INSERT INTO _RefShopTab (Service,Country,ID,CodeName128,RefTabGroupCodeName,StrID128_Tab)  
VALUES (1,15,@ShopTabID,'STORE_'+@NPCNAME+'_TAB1','STORE_'+@NPCNAME+'_GROUP1','SN_TAB_Stones')  
SET IDENTITY_INSERT _RefShopTab OFF  
SET IDENTITY_INSERT _RefShopTabGroup ON  
DECLARE @ShopTabGroupID VARCHAR (30) = (SELECT MAX (ID) FROM _RefShopTabGroup)+1  
INSERT INTO _RefShopTabGroup (Service,Country,ID,CodeName128,StrID128_Group)  
VALUES (1,15,@ShopTabGroupID,'STORE_'+@NPCNAME+'_GROUP1','SN_STORE_'+@NPCNAME+'_GROUP1')  
SET IDENTITY_INSERT _RefShopTabGroup OFF  
INSERT INTO _RefMappingShopGroup VALUES (1,15,'GROUP_STORE_'+@NPCNAME,'STORE_'+@NPCNAME)  
INSERT INTO _RefMappingShopWithTab VALUES (1,15,'STORE_'+@NPCNAME,'STORE_'+@NPCNAME+'_GROUP1')  
DECLARE @TACTICSID INT SET @TACTICSID = (SELECT MAX (dwTacticsID) FROM Tab_RefTactics)+10  
INSERT INTO Tab_RefTactics VALUES  
(@TACTICSID,@MAXCOMMONID,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'NPC_'+@NPCNAME)  
BEGIN 
DECLARE @HIVEID INT  SET @HIVEID = (SELECT MAX (dwHiveID) FROM Tab_RefHive)+1  
INSERT INTO Tab_RefHive VALUES  
(@HIVEID,0,0,0,0,0,0,@GAMEWORDID,2,'NPC_'+@NPCNAME)  
END 
BEGIN 
DECLARE @REGION VARCHAR (30) SET @REGION = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @POSX VARCHAR (30) SET @POSX = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @POSY VARCHAR (30) SET @POSY = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @POSZ VARCHAR (30) SET @POSZ = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @NESTID INT SET @NESTID = (SELECT MAX (dwNestID) FROM Tab_RefNest)+1  
INSERT INTO Tab_RefNest VALUES  
(@NESTID,@HIVEID,@TACTICSID,@REGION,@POSX,@POSY,@POSZ,0,0,0,0,0,0,1,0,1,0)  
END 
PRINT 'add this line to characterdata_45000 @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    '+@MAXCOMMONID+'    '+@NPCNAME+'    xxx    xxx    '+'SN_NPC_'+@NPCNAME+'    xxx    0    1    1    2    2    0    5000    3    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    -1    0    -1    0    -1    0    -1    0    -1    0    0    0    0    0    0    0    100    0    0    0    npc\npc\chinawoman_Noblegirl_event.bsr    xxx    xxx    xxx    xxx    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    336860180    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0'  
PRINT ''  
PRINT 'Add this line to refshop.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPID+'    '+'STORE_'+@NPCNAME+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx'  
PRINT ''  
PRINT 'Add this line to refshopgroup.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPGROUPID+'    '+'GROUP_STORE_'+@NPCNAME+'    '+'NPC_'+@NPCNAME+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx'  
PRINT ''  
PRINT 'Add this line to shopgroupdata.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    '+@SHOPITEMID+'    '+'STORE_'+@NPCNAME+'_GROUP1    '+'SN_STORE_'+@NPCNAME+'_GROUP1'  
PRINT ''  
PRINT 'Add this line to refshoptab.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPTABID+'    '+'STORE_'+@NPCNAME+'_TAB1    '+'STORE_'+@NPCNAME+'_GROUP1     SN_TAB_Stones'  
PRINT ''  
PRINT 'Add this line to refshoptabgroup.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPTABGROUPID+'    '+'STORE_'+@NPCNAME+'_GROUP1    '+'SN_STORE_'+@NPCNAME+'_GROUP1'  
PRINT ''  
PRINT 'Add this line to refmappingshopgroup.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+'GROUP_STORE_'+@NPCNAME+'    '+'STORE_'+@NPCNAME  
PRINT ''  
PRINT 'Add this line to refmappingshopwithtab.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+'STORE_'+@NPCNAME+'    '+'STORE_'+@NPCNAME+'_GROUP1'  
PRINT ''  
PRINT 'A New NPC Has ADD Succesfuly Restart U Server and Login in '+@CHARNAME  
END

ADD new NPC

PHP:
DECLARE @CHARNAME VARCHAR (30)  
DECLARE @NPCNAME VARCHAR (30)  
DECLARE @ADDNEW VARCHAR (30)  
DECLARE @GAMEWORDID INT  
SET @CHARNAME = 'DaD' --U Char Name  
SET @NPCNAME = 'DAD' --U NPC NAME  
SET @GAMEWORDID = 1 --IMPORTANT! GET GAMEWORLD ID FROM THE LOCALY U WANT ADD THE NPC NORMAL CITYs = 1  
SET @ADDNEW = 'NPC'  
--  
IF @ADDNEW = 'NPC' BEGIN  
DECLARE @MAXLINK VARCHAR (30) = (SELECT MAX (ID) FROM _RefObjChar)+1  
DECLARE @MAXCOMMONID VARCHAR (30) = (SELECT MAX (ID) FROM _RefObjCommon)+1  
SET IDENTITY_INSERT _RefObjCommon ON  
INSERT INTO _RefObjCommon (Service,ID,CodeName128,ObjName128,OrgObjCodeName128,NameStrID128,DescStrID128,CashItem,Bionic,TypeID1,TypeID2,TypeID3,TypeID4,DecayTime,Country  
,Rarity,CanTrade,CanSell,CanBuy,CanBorrow,CanDrop,CanPick,CanRepair,CanRevive,CanUse,CanThrow,Price,CostRepair,CostRevive,CostBorrow,KeepingFee,SellPrice,ReqLevelType1,ReqLevel1,ReqLevelType2,ReqLevel2,ReqLevelType3,ReqLevel3,ReqLevelType4,ReqLevel4,MaxContain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,Speed2,Scale,BCHeight,BCRadius  
,EventID,AssocFileObj128,AssocFileDrop128,AssocFileIcon128,AssocFile1_128,AssocFile2_128,Link) VALUES  
(1,@MAXCOMMONID,'NPC_'+@NPCNAME,'xxx','xxx','SN_NPC_'+@NPCNAME,'xxx',0,1,1,2,2,0,5000,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,-1,0,-1,0,-1,0,0,0,0,0,0,0,100,0,0,0,'npc\npc\chinawoman_Noblegirl_event.bsr','xxx','xxx','xxx','xxx',@MAXLINK)  
SET IDENTITY_INSERT _RefObjCommon OFF  
SET IDENTITY_INSERT _RefObjChar ON  
INSERT INTO _RefObjChar (ID,Lvl,CharGender,MaxHP,MaxMP,ResistFrozen,ResistFrostbite,ResistBurn,ResistEShock,ResistPoison,ResistZombie,ResistSleep,ResistRoot,ResistSlow,ResistFear  
,ResistMyopia,ResistBlood,ResistStone,ResistDark,ResistStun,ResistDisea,ResistChaos,ResistCsePD,ResistCseMD,ResistCseSTR,ResistCseINT,ResistCseHP,ResistCseMP,Resist24,ResistBomb,Resist26  
,Resist27,Resist28,Resist29,Resist30,Resist31,Resist32,InventorySize,CanStore_TID1,CanStore_TID2,CanStore_TID3,CanStore_TID4,CanBeVehicle,CanControl,DamagePortion,MaxPassenger,AssocTactics,PD,MD,PAR,MAR,ER,BR,HR,CHR  
,ExpToGive,CreepType,Knockdown,KO_RecoverTime,DefaultSkill_1,DefaultSkill_2,DefaultSkill_3,DefaultSkill_4,DefaultSkill_5,DefaultSkill_6,DefaultSkill_7,DefaultSkill_8,DefaultSkill_9,DefaultSkill_10,TextureType,Except_1  
,Except_2,Except_3,Except_4,Except_5,Except_6,Except_7,Except_8,Except_9,Except_10,Link) VALUES  
(@MAXLINK,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,336860180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)  
SET IDENTITY_INSERT _RefObjChar OFF  
SET IDENTITY_INSERT _RefShop ON  
DECLARE @ShopID VARCHAR (30) = (SELECT MAX (ID) FROM _RefShop)+1  
INSERT INTO _RefShop (Service,Country,ID,CodeName128,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128)  
VALUES (1,15,@ShopID,'STORE_'+@NPCNAME,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')  
SET IDENTITY_INSERT _RefShop OFF  
SET IDENTITY_INSERT _RefShopGroup ON  
DECLARE @ShopGroupID VARCHAR (30) = (SELECT MAX (ID) FROM _RefShopGroup)+1  
INSERT INTO _RefShopGroup (Service,Country,ID,CodeName128,RefNPCCodeName,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128)  
VALUES (1,15,@ShopGroupID,'GROUP_STORE_'+@NPCNAME,'NPC_'+@NPCNAME,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')  
SET IDENTITY_INSERT _RefShopGroup OFF  
SET IDENTITY_INSERT _RefShopItemGroup ON  
DECLARE @ShopItemID VARCHAR (30) = (SELECT MAX (GROUPID) FROM _RefShopItemGroup)+1  
INSERT INTO _RefShopItemGroup (Service,GroupID,CodeName128,StrID128_Group)  
VALUES (1,@ShopItemID,'STORE_'+@NPCNAME+'_GROUP1','SN_STORE_'+@NPCNAME+'_GROUP1')  
SET IDENTITY_INSERT _RefShopItemGroup OFF  
SET IDENTITY_INSERT _RefShopTab ON  
DECLARE @ShopTabID VARCHAR (30)= (SELECT MAX (ID) FROM _RefShopTab)+1  
INSERT INTO _RefShopTab (Service,Country,ID,CodeName128,RefTabGroupCodeName,StrID128_Tab)  
VALUES (1,15,@ShopTabID,'STORE_'+@NPCNAME+'_TAB1','STORE_'+@NPCNAME+'_GROUP1','SN_TAB_Stones')  
SET IDENTITY_INSERT _RefShopTab OFF  
SET IDENTITY_INSERT _RefShopTabGroup ON  
DECLARE @ShopTabGroupID VARCHAR (30) = (SELECT MAX (ID) FROM _RefShopTabGroup)+1  
INSERT INTO _RefShopTabGroup (Service,Country,ID,CodeName128,StrID128_Group)  
VALUES (1,15,@ShopTabGroupID,'STORE_'+@NPCNAME+'_GROUP1','SN_STORE_'+@NPCNAME+'_GROUP1')  
SET IDENTITY_INSERT _RefShopTabGroup OFF  
INSERT INTO _RefMappingShopGroup VALUES (1,15,'GROUP_STORE_'+@NPCNAME,'STORE_'+@NPCNAME)  
INSERT INTO _RefMappingShopWithTab VALUES (1,15,'STORE_'+@NPCNAME,'STORE_'+@NPCNAME+'_GROUP1')  
DECLARE @TACTICSID INT SET @TACTICSID = (SELECT MAX (dwTacticsID) FROM Tab_RefTactics)+10  
INSERT INTO Tab_RefTactics VALUES  
(@TACTICSID,@MAXCOMMONID,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'NPC_'+@NPCNAME)  
BEGIN 
DECLARE @HIVEID INT  SET @HIVEID = (SELECT MAX (dwHiveID) FROM Tab_RefHive)+1  
INSERT INTO Tab_RefHive VALUES  
(@HIVEID,0,0,0,0,0,0,@GAMEWORDID,2,'NPC_'+@NPCNAME)  
END 
BEGIN 
DECLARE @REGION VARCHAR (30) SET @REGION = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @POSX VARCHAR (30) SET @POSX = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @POSY VARCHAR (30) SET @POSY = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @POSZ VARCHAR (30) SET @POSZ = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME)  
DECLARE @NESTID INT SET @NESTID = (SELECT MAX (dwNestID) FROM Tab_RefNest)+1  
INSERT INTO Tab_RefNest VALUES  
(@NESTID,@HIVEID,@TACTICSID,@REGION,@POSX,@POSY,@POSZ,0,0,0,0,0,0,1,0,1,0)  
END 
PRINT 'add this line to characterdata_45000 @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    '+@MAXCOMMONID+'    '+@NPCNAME+'    xxx    xxx    '+'SN_NPC_'+@NPCNAME+'    xxx    0    1    1    2    2    0    5000    3    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    -1    0    -1    0    -1    0    -1    0    -1    0    0    0    0    0    0    0    100    0    0    0    npc\npc\chinawoman_Noblegirl_event.bsr    xxx    xxx    xxx    xxx    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    336860180    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0'  
PRINT ''  
PRINT 'Add this line to refshop.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPID+'    '+'STORE_'+@NPCNAME+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx'  
PRINT ''  
PRINT 'Add this line to refshopgroup.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPGROUPID+'    '+'GROUP_STORE_'+@NPCNAME+'    '+'NPC_'+@NPCNAME+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx'  
PRINT ''  
PRINT 'Add this line to shopgroupdata.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    '+@SHOPITEMID+'    '+'STORE_'+@NPCNAME+'_GROUP1    '+'SN_STORE_'+@NPCNAME+'_GROUP1'  
PRINT ''  
PRINT 'Add this line to refshoptab.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPTABID+'    '+'STORE_'+@NPCNAME+'_TAB1    '+'STORE_'+@NPCNAME+'_GROUP1     SN_TAB_Stones'  
PRINT ''  
PRINT 'Add this line to refshoptabgroup.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+@SHOPTABGROUPID+'    '+'STORE_'+@NPCNAME+'_GROUP1    '+'SN_STORE_'+@NPCNAME+'_GROUP1'  
PRINT ''  
PRINT 'Add this line to refmappingshopgroup.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+'GROUP_STORE_'+@NPCNAME+'    '+'STORE_'+@NPCNAME  
PRINT ''  
PRINT 'Add this line to refmappingshopwithtab.txt @ server_dep\silkroad\textdata'  
PRINT ''  
PRINT '1    15    '+'STORE_'+@NPCNAME+'    '+'STORE_'+@NPCNAME+'_GROUP1'  
PRINT ''  
PRINT 'A New NPC Has ADD Succesfuly Restart U Server and Login in '+@CHARNAME  
END

ADD new Teleport

PHP:
USE SRO_VT_SHARD 

DECLARE @Teleport VARCHAR (64)  
DECLARE @CHARNAME1 VARCHAR (30)  
DECLARE @CHARNAME2 VARCHAR (30)  
DECLARE @OwnTeleport INT  
DECLARE @Fee INT  
DECLARE @RequiredLVL INT  

/* Put your settings here */  
SET @Teleport = 'unique_area1' -- any name you want ex: PK_ZONE or PVP_ZONE  
SET @CHARNAME1 = '[GM]WildOne' -- Teleport position  
SET @CHARNAME2 = 'Road' -- Spawn position after teleport  
SET @OwnTeleport = 1  -- Target teleport ID ex: 1 for Jangan - 5 for Hotan - 20 for Constantinople  
SET @Fee = 50000  -- Gold amount to Pass the teleport  
SET @RequiredLVL = 0  -- minimum level required to teleport 0 for no restriction - ex:90 lvl 90 and higher can teleport  
/* settings area end here */  

IF EXISTS (SELECT CodeName128 FROM _RefObjCommon WHERE CodeName128 = 'STORE_'+@Teleport)  
 BEGIN  
  raiserror('The stated teleportname of %s is already exist!',11,1,@Teleport);  
  RETURN;  
 END  
      
    DECLARE @MAXOBJ INT = (SELECT MAX (ID) FROM _RefObjCommon)+1  
    DECLARE @REGION1 INT SET @REGION1 = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME1)  
    DECLARE @POSX1 INT SET @POSX1 = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME1)  
    DECLARE @POSY1 INT SET @POSY1 = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME1)  
    DECLARE @POSZ1 INT SET @POSZ1 = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME1)  
    DECLARE @LINK INT = (SELECT MAX (ID) FROM _RefObjStruct)+1  
       
    SET IDENTITY_INSERT _RefObjCommon ON  
    INSERT INTO _RefObjCommon (Service,ID,CodeName128,ObjName128,OrgObjCodeName128,NameStrID128,DescStrID128,CashItem,Bionic,TypeID1,TypeID2,TypeID3,TypeID4,DecayTime,Country,Rarity,CanTrade,CanSell,CanBuy,CanBorrow,CanDrop,CanPick,CanRepair,CanRevive,CanUse,CanThrow,Price,CostRepair,CostRevive,CostBorrow,KeepingFee,SellPrice,ReqLevelType1,ReqLevel1,ReqLevelType2,ReqLevel2,ReqLevelType3,ReqLevel3,ReqLevelType4,ReqLevel4,MaxContain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,Speed2,Scale,BCHeight,BCRadius,EventID,AssocFileObj128,AssocFileDrop128,AssocFileIcon128,AssocFile1_128,AssocFile2_128,Link) VALUES  
    (1,@MAXOBJ,'STORE_'+@Teleport,@Teleport,'xxx','SN_STORE_'+@Teleport,'xxx',0,0,4,1,1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,-1,0,-1,0,-1,@REGION1,0,@POSX1,@POSY1,@POSZ1,0,0,50,50,30,0,'quest\ins_quest_teleport.bsr','xxx','xxx','xxx','xxx',@link)  
    SET IDENTITY_INSERT _RefObjCommon OFF  
      
    print ''  
    print 'Add the following line to teleportbuilding.txt @server_dep\silkroad\textdata folder'  
    print '1    '+CONVERT(varchar(max),@MAXOBJ)+'    '+'STORE_'+@Teleport+'    '+@Teleport+'    xxx    '+'SN_STORE_'+@Teleport+'    xxx    0    0    4    1    1    0    0    3    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    -1    0    -1    0    -1    0    -1    0    -1    '+CONVERT(varchar(max),@REGION1)+'    0    '+CONVERT(varchar(max),@POSX1)+'    '+CONVERT(varchar(max),@POSY1)+'    '+CONVERT(varchar(max),@POSZ1)+'    0    0    50    50    30    0    quest\teleport01.bsr    xxx    xxx    xxx    xxx    '+CONVERT(varchar(max),@link)  
    print ''  
    print 'Add the following line to textdata_object.txt @server_dep\silkroad\textdata folder'  
    print ''  
    print '1    '+'SN_STORE_'+@Teleport+'                                '+@Teleport  
    print ''  
      print ''  

  SET IDENTITY_INSERT _RefObjStruct ON  
  INSERT INTO _RefObjStruct (ID,Dummy_Data) VALUES  
  (@LINK,0)  
  SET IDENTITY_INSERT _RefObjStruct OFF  
    
  DECLARE @MAXTELID INT = (SELECT MAX (ID) FROM _RefTeleport)+1  
  DECLARE @WORLDID INT = (SELECT (WorldID) FROM _Char where CharName16 = @CHARNAME2)  
  DECLARE @REGION2 INT SET @REGION2 = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME2)  
  DECLARE @POSX2 INT SET @POSX2 = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME2)  
  DECLARE @POSY2 INT SET @POSY2 = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME2)  
  DECLARE @POSZ2 INT SET @POSZ2 = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME2)  

  INSERT INTO _RefTeleport (Service,ID,CodeName128,AssocRefObjCodeName128,AssocRefObjID,ZoneName128,GenRegionID,GenPos_X,GenPos_Y,GenPos_Z,GenAreaRadius,CanBeResurrectPos,CanGotoResurrectPos,GenWorldID,BindInteractionMask,FixedService) VALUES  
  (1,@MAXTELID,'GATE_'+@Teleport,'STORE_'+@Teleport,@MAXOBJ,'SN_STORE_'+@Teleport,@REGION2,@POSX2,@POSY2,@POSZ2,30,0,0,@WORLDID,1,0)  
    
  print ''  
  print 'Add the following line to teleportdata.txt @server_dep\silkroad\textdata folder'  
  print '1    '+CONVERT(varchar(max),@MAXTELID)+'    '+'GATE_'+@Teleport+'    '+CONVERT(varchar(max),@MAXOBJ)+'    '+'SN_STORE_'+@Teleport+'    '+CONVERT(varchar(max),@REGION2)+'    '+CONVERT(varchar(max),@POSX2)+'    '+CONVERT(varchar(max),@POSY2)+'    '+CONVERT(varchar(max),@POSZ2)+'    30    0    0    '+CONVERT(varchar(max),@WORLDID)+'    1    0'  
  print ''  
  print ''  

  IF @RequiredLVL = 0  
  BEGIN  
    INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,RestrictBindMethod,RunTimeTeleportMethod,CheckResult,Restrict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Restrict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,Restrict5,Data5_1,Data5_2) VALUES  
    (1,@OwnTeleport,@MAXTELID,@Fee,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)  
    INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,RestrictBindMethod,RunTimeTeleportMethod,CheckResult,Restrict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Restrict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,Restrict5,Data5_1,Data5_2) VALUES  
    (1,@MAXTELID,@OwnTeleport,@Fee,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)  
      
print ''  
    print 'Add the following lines to teleportlink.txt @server_dep\silkroad\textdata folder'  
    print '1    '+CONVERT(varchar(max),@OwnTeleport)+'    '+CONVERT(varchar(max),@MAXTELID)+'    '+CONVERT(varchar(max),@Fee)+'    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0'  
    print '1    '+CONVERT(varchar(max),@MAXTELID)+'    '+CONVERT(varchar(max),@OwnTeleport)+'    '+CONVERT(varchar(max),@Fee)+'    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0'  
    print ''  
  END  
  ELSE BEGIN  
    INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,RestrictBindMethod,RunTimeTeleportMethod,CheckResult,Restrict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Restrict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,Restrict5,Data5_1,Data5_2) VALUES  
    (1,@OwnTeleport,@MAXTELID,@Fee,0,0,0,1,@RequiredLVL,999,0,0,0,0,0,0,0,0,0,0,0,0)  
      
    print ''  
    print ''  
    print 'Add the following line to teleportlink.txt @server_dep\silkroad\textdata folder'  
    print '1    '+CONVERT(varchar(max),@OwnTeleport)+'    '+CONVERT(varchar(max),@MAXTELID)+'    '+CONVERT(varchar(max),@Fee)+'    0    0    0    1    '+CONVERT(varchar(max),@RequiredLVL)+'    999    0    0    0    0    0    0    0    0    0    0    0    0'  
    print ''  

  END  

print ''  
print 'Done!'

Job Guild 0 Penalty Time

PHP:
USE [SRO_VT_SHARD]   
GO   

SET ANSI_NULLS ON   
GO   
SET QUOTED_IDENTIFIER ON   
GO   

ALTER   procedure [dbo].[_AddTimedJob]   
@CharID            int,   
@Category        tinyint,   
@JobID            int,   
@TimeToKeep    int,   
@Data1            int,   
@Data2            int,   
--##begin due to develop composite item   
@Data3            int,   
@Data4            int,   
@Data5            int,   
@Data6            int,   
@Data7            int,   
@Data8            int,   
@Serial64        bigint,   
@JID            int   
--##end due to develop composite item   
as   
    if (not exists (select CharID from _Char with (nolock) where CharID = @CharID))   
                return -1   
            if (@TimeToKeep <= 0)   
                return -2   
            declare @NewJobID int   
            set @NewJobID = 0   

            --##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader   
            --##If you want to only have one not both, then just modify the line below!   
            if (@JobID = 1 or @JobID = 2)   
            BEGIN   
                return -1   
            END   
            ELSE   
            BEGIN   
            --##begin due to develop composite item   
            insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID)   
            values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)   
            END   
            --##end due to develop composite item   
            set @NewJobID = @@identity   
            if (@@error <> 0 or @@rowcount = 0)   
                   
                return -3   
     return @NewJobID

Open All skills For Gm

PHP:
USE [SRO_VT_SHARD]  
DECLARE @CharName varchar(255)  
DECLARE @CharID INT  
SET @CharName='Name Char'  
SELECT @CharID = CharID FROM _Char WHERE CharName16=@CharName  
UPDATE _CharSkillMastery SET Level = '120' WHERE CharID=@CharID  
INSERT INTO _CharSkill VALUES (@CharID,1,1)  
INSERT INTO _CharSkill VALUES (@CharID,2,1)  
INSERT INTO _CharSkill VALUES (@CharID,40,1)  
INSERT INTO _CharSkill VALUES (@CharID,70,1)  
INSERT INTO _CharSkill VALUES (@CharID,298,1)  
INSERT INTO _CharSkill VALUES (@CharID,306,1)  
INSERT INTO _CharSkill VALUES (@CharID,314,1)  
INSERT INTO _CharSkill VALUES (@CharID,322,1)  
INSERT INTO _CharSkill VALUES (@CharID,346,1)  
INSERT INTO _CharSkill VALUES (@CharID,378,1)  
INSERT INTO _CharSkill VALUES (@CharID,418,1)  
INSERT INTO _CharSkill VALUES (@CharID,463,1)  
INSERT INTO _CharSkill VALUES (@CharID,558,1)  
INSERT INTO _CharSkill VALUES (@CharID,569,1)  
INSERT INTO _CharSkill VALUES (@CharID,580,1)  
INSERT INTO _CharSkill VALUES (@CharID,588,1)  
INSERT INTO _CharSkill VALUES (@CharID,596,1)  
INSERT INTO _CharSkill VALUES (@CharID,604,1)  
INSERT INTO _CharSkill VALUES (@CharID,647,1)  
INSERT INTO _CharSkill VALUES (@CharID,655,1)  
INSERT INTO _CharSkill VALUES (@CharID,672,1)  
INSERT INTO _CharSkill VALUES (@CharID,689,1)  
INSERT INTO _CharSkill VALUES (@CharID,699,1)  
INSERT INTO _CharSkill VALUES (@CharID,708,1)  
INSERT INTO _CharSkill VALUES (@CharID,716,1)  
INSERT INTO _CharSkill VALUES (@CharID,724,1)  
INSERT INTO _CharSkill VALUES (@CharID,735,1)  
INSERT INTO _CharSkill VALUES (@CharID,746,1)  
INSERT INTO _CharSkill VALUES (@CharID,757,1)  
INSERT INTO _CharSkill VALUES (@CharID,765,1)  
INSERT INTO _CharSkill VALUES (@CharID,773,1)  
INSERT INTO _CharSkill VALUES (@CharID,781,1)  
INSERT INTO _CharSkill VALUES (@CharID,789,1)  
INSERT INTO _CharSkill VALUES (@CharID,797,1)  
INSERT INTO _CharSkill VALUES (@CharID,805,1)  
INSERT INTO _CharSkill VALUES (@CharID,813,1)  
INSERT INTO _CharSkill VALUES (@CharID,821,1)  
INSERT INTO _CharSkill VALUES (@CharID,829,1)  
INSERT INTO _CharSkill VALUES (@CharID,853,1)  
INSERT INTO _CharSkill VALUES (@CharID,885,1)  
INSERT INTO _CharSkill VALUES (@CharID,925,1)  
INSERT INTO _CharSkill VALUES (@CharID,933,1)  
INSERT INTO _CharSkill VALUES (@CharID,943,1)  
INSERT INTO _CharSkill VALUES (@CharID,952,1)  
INSERT INTO _CharSkill VALUES (@CharID,960,1)  
INSERT INTO _CharSkill VALUES (@CharID,968,1)  
INSERT INTO _CharSkill VALUES (@CharID,976,1)  
INSERT INTO _CharSkill VALUES (@CharID,984,1)  
INSERT INTO _CharSkill VALUES (@CharID,992,1)  
INSERT INTO _CharSkill VALUES (@CharID,1003,1)  
INSERT INTO _CharSkill VALUES (@CharID,1014,1)  
INSERT INTO _CharSkill VALUES (@CharID,1025,1)  
INSERT INTO _CharSkill VALUES (@CharID,1033,1)  
INSERT INTO _CharSkill VALUES (@CharID,1041,1)  
INSERT INTO _CharSkill VALUES (@CharID,1049,1)  
INSERT INTO _CharSkill VALUES (@CharID,1053,1)  
INSERT INTO _CharSkill VALUES (@CharID,1057,1)  
INSERT INTO _CharSkill VALUES (@CharID,1065,1)  
INSERT INTO _CharSkill VALUES (@CharID,1073,1)  
INSERT INTO _CharSkill VALUES (@CharID,1081,1)  
INSERT INTO _CharSkill VALUES (@CharID,1089,1)  
INSERT INTO _CharSkill VALUES (@CharID,1099,1)  
INSERT INTO _CharSkill VALUES (@CharID,1108,1)  
INSERT INTO _CharSkill VALUES (@CharID,1116,1)  
INSERT INTO _CharSkill VALUES (@CharID,1124,1)  
INSERT INTO _CharSkill VALUES (@CharID,1132,1)  
INSERT INTO _CharSkill VALUES (@CharID,1140,1)  
INSERT INTO _CharSkill VALUES (@CharID,1148,1)  
INSERT INTO _CharSkill VALUES (@CharID,1153,1)  
INSERT INTO _CharSkill VALUES (@CharID,1158,1)  
INSERT INTO _CharSkill VALUES (@CharID,1163,1)  
INSERT INTO _CharSkill VALUES (@CharID,1168,1)  
INSERT INTO _CharSkill VALUES (@CharID,1173,1)  
INSERT INTO _CharSkill VALUES (@CharID,1178,1)  
INSERT INTO _CharSkill VALUES (@CharID,1189,1)  
INSERT INTO _CharSkill VALUES (@CharID,1200,1)  
INSERT INTO _CharSkill VALUES (@CharID,1217,1)  
INSERT INTO _CharSkill VALUES (@CharID,1234,1)  
INSERT INTO _CharSkill VALUES (@CharID,1244,1)  
INSERT INTO _CharSkill VALUES (@CharID,1253,1)  
INSERT INTO _CharSkill VALUES (@CharID,1261,1)  
INSERT INTO _CharSkill VALUES (@CharID,1269,1)  
INSERT INTO _CharSkill VALUES (@CharID,1271,1)  
INSERT INTO _CharSkill VALUES (@CharID,1273,1)  
INSERT INTO _CharSkill VALUES (@CharID,1275,1)  
INSERT INTO _CharSkill VALUES (@CharID,1286,1)  
INSERT INTO _CharSkill VALUES (@CharID,1297,1)  
INSERT INTO _CharSkill VALUES (@CharID,1308,1)  
INSERT INTO _CharSkill VALUES (@CharID,1316,1)  
INSERT INTO _CharSkill VALUES (@CharID,1324,1)  
INSERT INTO _CharSkill VALUES (@CharID,1332,1)  
INSERT INTO _CharSkill VALUES (@CharID,1337,1)  
INSERT INTO _CharSkill VALUES (@CharID,1342,1)  
INSERT INTO _CharSkill VALUES (@CharID,1350,1)  
INSERT INTO _CharSkill VALUES (@CharID,1358,1)  
INSERT INTO _CharSkill VALUES (@CharID,1368,1)  
INSERT INTO _CharSkill VALUES (@CharID,1377,1)  
INSERT INTO _CharSkill VALUES (@CharID,1385,1)  
INSERT INTO _CharSkill VALUES (@CharID,1393,1)  
INSERT INTO _CharSkill VALUES (@CharID,1398,1)  
INSERT INTO _CharSkill VALUES (@CharID,1403,1)  
INSERT INTO _CharSkill VALUES (@CharID,1408,1)  
INSERT INTO _CharSkill VALUES (@CharID,1410,1)  
INSERT INTO _CharSkill VALUES (@CharID,1412,1)  
INSERT INTO _CharSkill VALUES (@CharID,1414,1)  
INSERT INTO _CharSkill VALUES (@CharID,1422,1)  
INSERT INTO _CharSkill VALUES (@CharID,1430,1)  
INSERT INTO _CharSkill VALUES (@CharID,1438,1)  
INSERT INTO _CharSkill VALUES (@CharID,1443,1)  
INSERT INTO _CharSkill VALUES (@CharID,1448,1)  
INSERT INTO _CharSkill VALUES (@CharID,1465,1)  
INSERT INTO _CharSkill VALUES (@CharID,1482,1)  
INSERT INTO _CharSkill VALUES (@CharID,1499,1)  
INSERT INTO _CharSkill VALUES (@CharID,1509,1)  
INSERT INTO _CharSkill VALUES (@CharID,1518,1)  
INSERT INTO _CharSkill VALUES (@CharID,1526,1)  
INSERT INTO _CharSkill VALUES (@CharID,1534,1)  
INSERT INTO _CharSkill VALUES (@CharID,1539,1)  
INSERT INTO _CharSkill VALUES (@CharID,1544,1)  
INSERT INTO _CharSkill VALUES (@CharID,1549,1)  
INSERT INTO _CharSkill VALUES (@CharID,1557,1)  
INSERT INTO _CharSkill VALUES (@CharID,1565,1)  
INSERT INTO _CharSkill VALUES (@CharID,1573,1)  
INSERT INTO _CharSkill VALUES (@CharID,1578,1)  
INSERT INTO _CharSkill VALUES (@CharID,1583,1)  
INSERT INTO _CharSkill VALUES (@CharID,1588,1)  
INSERT INTO _CharSkill VALUES (@CharID,1593,1)  
INSERT INTO _CharSkill VALUES (@CharID,1598,1)  
INSERT INTO _CharSkill VALUES (@CharID,1609,1)  
INSERT INTO _CharSkill VALUES (@CharID,1617,1)  
INSERT INTO _CharSkill VALUES (@CharID,1628,1)  
INSERT INTO _CharSkill VALUES (@CharID,3149,1)  
INSERT INTO _CharSkill VALUES (@CharID,3167,1)  
INSERT INTO _CharSkill VALUES (@CharID,3176,1)  
INSERT INTO _CharSkill VALUES (@CharID,3224,1)  
INSERT INTO _CharSkill VALUES (@CharID,3340,1)  
INSERT INTO _CharSkill VALUES (@CharID,3349,1)  
INSERT INTO _CharSkill VALUES (@CharID,3364,1)  
INSERT INTO _CharSkill VALUES (@CharID,3379,1)  
INSERT INTO _CharSkill VALUES (@CharID,3391,1)  
INSERT INTO _CharSkill VALUES (@CharID,3406,1)  
INSERT INTO _CharSkill VALUES (@CharID,3409,1)  
INSERT INTO _CharSkill VALUES (@CharID,3415,1)  
INSERT INTO _CharSkill VALUES (@CharID,3430,1)  
INSERT INTO _CharSkill VALUES (@CharID,3431,1)  
INSERT INTO _CharSkill VALUES (@CharID,3446,1)  
INSERT INTO _CharSkill VALUES (@CharID,3461,1)  
INSERT INTO _CharSkill VALUES (@CharID,3467,1)  
INSERT INTO _CharSkill VALUES (@CharID,3473,1)  
INSERT INTO _CharSkill VALUES (@CharID,7139,1)  
INSERT INTO _CharSkill VALUES (@CharID,7159,1)  
INSERT INTO _CharSkill VALUES (@CharID,7203,1)  
INSERT INTO _CharSkill VALUES (@CharID,7322,1)  
INSERT INTO _CharSkill VALUES (@CharID,7385,1)  
INSERT INTO _CharSkill VALUES (@CharID,7390,1)  
INSERT INTO _CharSkill VALUES (@CharID,7392,1)  
INSERT INTO _CharSkill VALUES (@CharID,7404,1)  
INSERT INTO _CharSkill VALUES (@CharID,7418,1)  
INSERT INTO _CharSkill VALUES (@CharID,7474,1)  
INSERT INTO _CharSkill VALUES (@CharID,7484,1)  
INSERT INTO _CharSkill VALUES (@CharID,7513,1)  
INSERT INTO _CharSkill VALUES (@CharID,7520,1)  
INSERT INTO _CharSkill VALUES (@CharID,7536,1)  
INSERT INTO _CharSkill VALUES (@CharID,7554,1)  
INSERT INTO _CharSkill VALUES (@CharID,7577,1)  
INSERT INTO _CharSkill VALUES (@CharID,7582,1)  
INSERT INTO _CharSkill VALUES (@CharID,7584,1)  
INSERT INTO _CharSkill VALUES (@CharID,7596,1)  
INSERT INTO _CharSkill VALUES (@CharID,7612,1)  
INSERT INTO _CharSkill VALUES (@CharID,7637,1)  
INSERT INTO _CharSkill VALUES (@CharID,7651,1)  
INSERT INTO _CharSkill VALUES (@CharID,7672,1)  
INSERT INTO _CharSkill VALUES (@CharID,7675,1)  
INSERT INTO _CharSkill VALUES (@CharID,7688,1)  
INSERT INTO _CharSkill VALUES (@CharID,7798,1)  
INSERT INTO _CharSkill VALUES (@CharID,7805,1)  
INSERT INTO _CharSkill VALUES (@CharID,7829,1)  
INSERT INTO _CharSkill VALUES (@CharID,7838,1)  
INSERT INTO _CharSkill VALUES (@CharID,7839,1)  
INSERT INTO _CharSkill VALUES (@CharID,7853,1)  
INSERT INTO _CharSkill VALUES (@CharID,7862,1)  
INSERT INTO _CharSkill VALUES (@CharID,7877,1)  
INSERT INTO _CharSkill VALUES (@CharID,7881,1)  
INSERT INTO _CharSkill VALUES (@CharID,7894,1)  
INSERT INTO _CharSkill VALUES (@CharID,7899,1)  
INSERT INTO _CharSkill VALUES (@CharID,7907,1)  
INSERT INTO _CharSkill VALUES (@CharID,7919,1)  
INSERT INTO _CharSkill VALUES (@CharID,7931,1)  
INSERT INTO _CharSkill VALUES (@CharID,7938,1)  
INSERT INTO _CharSkill VALUES (@CharID,7947,1)  
INSERT INTO _CharSkill VALUES (@CharID,7953,1)  
INSERT INTO _CharSkill VALUES (@CharID,7959,1)  
INSERT INTO _CharSkill VALUES (@CharID,7962,1)  
INSERT INTO _CharSkill VALUES (@CharID,7972,1)  
INSERT INTO _CharSkill VALUES (@CharID,7980,1)  
INSERT INTO _CharSkill VALUES (@CharID,7995,1)  
INSERT INTO _CharSkill VALUES (@CharID,7997,1)  
INSERT INTO _CharSkill VALUES (@CharID,8010,1)  
INSERT INTO _CharSkill VALUES (@CharID,8024,1)  
INSERT INTO _CharSkill VALUES (@CharID,8050,1)  
INSERT INTO _CharSkill VALUES (@CharID,8084,1)  
INSERT INTO _CharSkill VALUES (@CharID,8097,1)  
INSERT INTO _CharSkill VALUES (@CharID,8103,1)  
INSERT INTO _CharSkill VALUES (@CharID,8109,1)  
INSERT INTO _CharSkill VALUES (@CharID,8115,1)  
INSERT INTO _CharSkill VALUES (@CharID,8119,1)  
INSERT INTO _CharSkill VALUES (@CharID,8129,1)  
INSERT INTO _CharSkill VALUES (@CharID,8133,1)  
INSERT INTO _CharSkill VALUES (@CharID,8142,1)  
INSERT INTO _CharSkill VALUES (@CharID,8150,1)  
INSERT INTO _CharSkill VALUES (@CharID,8164,1)  
INSERT INTO _CharSkill VALUES (@CharID,8171,1)  
INSERT INTO _CharSkill VALUES (@CharID,8183,1)  
INSERT INTO _CharSkill VALUES (@CharID,8195,1)  
INSERT INTO _CharSkill VALUES (@CharID,8204,1)  
INSERT INTO _CharSkill VALUES (@CharID,8214,1)  
INSERT INTO _CharSkill VALUES (@CharID,8220,1)  
INSERT INTO _CharSkill VALUES (@CharID,8221,1)  
INSERT INTO _CharSkill VALUES (@CharID,8238,1)  
INSERT INTO _CharSkill VALUES (@CharID,8239,1)  
INSERT INTO _CharSkill VALUES (@CharID,8250,1)  
INSERT INTO _CharSkill VALUES (@CharID,8253,1)  
INSERT INTO _CharSkill VALUES (@CharID,8276,1)  
INSERT INTO _CharSkill VALUES (@CharID,8291,1)  
INSERT INTO _CharSkill VALUES (@CharID,8304,1)  
INSERT INTO _CharSkill VALUES (@CharID,8316,1)  
INSERT INTO _CharSkill VALUES (@CharID,8320,1)  
INSERT INTO _CharSkill VALUES (@CharID,8338,1)  
INSERT INTO _CharSkill VALUES (@CharID,8347,1)  
INSERT INTO _CharSkill VALUES (@CharID,8348,1)  
INSERT INTO _CharSkill VALUES (@CharID,8361,1)  
INSERT INTO _CharSkill VALUES (@CharID,8370,1)  
INSERT INTO _CharSkill VALUES (@CharID,8379,1)  
INSERT INTO _CharSkill VALUES (@CharID,8383,1)  
INSERT INTO _CharSkill VALUES (@CharID,8390,1)  
INSERT INTO _CharSkill VALUES (@CharID,8399,1)  
INSERT INTO _CharSkill VALUES (@CharID,8405,1)  
INSERT INTO _CharSkill VALUES (@CharID,8410,1)  
INSERT INTO _CharSkill VALUES (@CharID,8414,1)  
INSERT INTO _CharSkill VALUES (@CharID,8416,1)  
INSERT INTO _CharSkill VALUES (@CharID,20494,1)  
INSERT INTO _CharSkill VALUES (@CharID,20497,1)  
INSERT INTO _CharSkill VALUES (@CharID,20500,1)  
INSERT INTO _CharSkill VALUES (@CharID,21215,1)  
INSERT INTO _CharSkill VALUES (@CharID,21217,1)  
INSERT INTO _CharSkill VALUES (@CharID,30578,1)  
INSERT INTO _CharSkill VALUES (@CharID,30584,1)  
INSERT INTO _CharSkill VALUES (@CharID,30590,1)  
INSERT INTO _CharSkill VALUES (@CharID,30596,1)  
INSERT INTO _CharSkill VALUES (@CharID,30600,1)

change SQL password

PHP:
USE [master] 

GO 
ALTER LOGIN [sa] WITH PASSWORD=N'New Password', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF 

GO

Reset Skills to All Char

PHP:
USE [SRO_VT_SHARD]
GO

-- edit by InPanic Kev --
update _ClientConfig
set Data = '0'
-- edit by InPanic Kev --

DELETE FROM [dbo].[_CharSkill]
      WHERE  SKillID NOT LIKE '1' and  SKillID NOT LIKE '2' and  SKillID NOT LIKE '40'
      and  SKillID NOT LIKE '70' and  SKillID NOT LIKE '8421' and  SKillID NOT LIKE '8419'
      and  SKillID NOT LIKE '8420' and  SKillID NOT LIKE '9354' and  SKillID NOT LIKE '9355'
      and  SKillID NOT LIKE '9944' and  SKillID NOT LIKE '10625' and  SKillID NOT LIKE '11162'
      and  SKillID NOT LIKE '11526'
GO 

UPDATE [dbo].[_CharSkillMastery]
   SET 
      [Level] = '0'

Change Character Name

PHP:
[USE SRO_VT_SHARD ] 
GO 

/**edit there**/ 
 Declare @Oldcharname varchar(max) = 'OLDCHAR-Name' 
 Declare @Newcharname varchar(max) = 'NEWCHAR-Name' 
 /**donteditbellow**/ 

 declare @charid varchar(max) = (select CHARID from _Char where CharName16 = @oldcharname) 
 Update _CharNameList 
 Set CharName16 = @newcharname where CharID = @charid 
 Update _Char 
 Set Charname16 = @newcharname where charname16 = @oldcharname 
 Update _GuildMember 
 Set CharName = @newcharname where CharName = @oldcharname 
 Update _Friend 
 Set FriendCharName = @newcharname where FriendCharName = @oldcharname 


 Print @oldcharname+' changed to '+@newcharname

Add new unique spot

PHP:
USE SRO_VT_SHARD  

DECLARE @UNIQUE VARCHAR (129) 
DECLARE @CHARNAME VARCHAR (64) 
DECLARE @mindealy INT 
DECLARE @maxdelay int 
DECLARE @INITRADIUS INT 
DECLARE @RADIUS int 
DECLARE @MAXNEST int = (SELECT MAX (dwNestID) FROM Tab_RefNest)+1 
DECLARE @MAXHIVE int = (SELECT MAX (dwHiveID) FROM Tab_RefHive)+1 
DECLARE @MAXTACTICS int = (SELECT MAX (dwTacticsID) FROM Tab_RefTactics)+1 

/* put your settings here */ 
SET @UNIQUE = 'MOB_CH_TIGERWOMAN_L2' -- Unique code name from _RefobjCommon table 
SET @CHARNAME = 'WildOne' -- Character name from _Char table to get mob position X Y Z 
SET @mindealy = 1  -- Minimum time before appears in seconds 
SET @maxdelay = 5  -- Maximum time before appears in seconds 
SET @INITRADIUS = 100  -- Radius around spot unique can generated at 
SET @RADIUS = 200  -- Radius around spot Unique can move in 
/* end of settings area */ 

/* get ID of mob by code name */ 
Declare @MOBID int SET @MOBID = (SELECT ID FROM _RefObjCommon WHERE CodeName128 = @UNIQUE) 

--SET IDENTITY_INSERT Tab_RefTactics ON 
INSERT INTO Tab_RefTactics (dwTacticsID,dwObjID,btAIQoS,nMaxStamina,btMaxStaminaVariance,nSightRange,btAggressType,AggressData,btChangeTarget,btHelpRequestTo,btHelpResponseTo,btBattleStyle,BattleStyleData,btDiversionBasis,DiversionBasisData1,DiversionBasisData2,DiversionBasisData3,DiversionBasisData4,DiversionBasisData5,DiversionBasisData6,DiversionBasisData7,DiversionBasisData8,btDiversionKeepBasis,DiversionKeepBasisData1,DiversionKeepBasisData2,DiversionKeepBasisData3,DiversionKeepBasisData4,DiversionKeepBasisData5,DiversionKeepBasisData6,DiversionKeepBasisData7,DiversionKeepBasisData8,btKeepDistance,KeepDistanceData,btTraceType,btTraceBoundary,TraceData,btHomingType,HomingData,btAggressTypeOnHoming,btFleeType,dwChampionTacticsID,AdditionOptionFlag,szDescString128) VALUES 
(@MAXTACTICS,@MOBID,0,500,50,200,0,0,2,2,2,0,0,5,0,0,0,0,0,30,0,0,4,0,0,0,0,0,0,0,0,0,0,0,1,500,0,0,2,0,0,112,@UNIQUE) 
--SET IDENTITY_INSERT Tab_RefTactics OFF 

--SET IDENTITY_INSERT Tab_RefHive ON 
INSERT INTO Tab_RefHive (dwHiveID,btKeepMonsterCountType,dwOverwriteMaxTotalCount,fMonsterCountPerPC,dwSpawnSpeedIncreaseRate,dwMaxIncreaseRate,btFlag,GameWorldID,HatchObjType,szDescString128) VALUES 
(@MAXHIVE,0,1,0,0,0,0,1,1,@UNIQUE) 
--SET IDENTITY_INSERT Tab_RefHive OFF 

/* get position coordinates of your character */ 

DECLARE @REGION INT SET @REGION = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME) 
DECLARE @POSX INT SET @POSX = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME) 
DECLARE @POSY INT SET @POSY = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME) 
DECLARE @POSZ INT SET @POSZ = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME) 

--SET IDENTITY_INSERT Tab_RefNest ON 
INSERT INTO Tab_RefNest (dwNestID,dwHiveID,dwTacticsID,nRegionDBID,fLocalPosX,fLocalPosY,fLocalPosZ,wInitialDir,nRadius,nGenerateRadius,nChampionGenPercentage,dwDelayTimeMin,dwDelayTimeMax,dwMaxTotalCount,btFlag,btRespawn,btType) VALUES 
(@MAXNEST,@MAXHIVE,@MAXTACTICS,@REGION,@POSX,@POSY,@POSZ,0,@RADIUS,@INITRADIUS,0,@mindealy,@maxdelay,1,0,1,0) 
--SET IDENTITY_INSERT Tab_RefNest OFF 


print '' 
print '' 
print 'Done!'

Change character title by charname

PHP:
use SRO_VT_SHARD 
Update _Char 
set HwanLevel = 'Title Num' 
where CharName16 = 'Cher Name'

Change inventory size by charname

PHP:
USE([SRO_VT_SHARD]) 
GO() 

Declare @CharName Varchar (64) 
Set @CharName    =    'Kira'/* Char Name */ 

Update(dbo._Char) 
InventorySize = 109 /* Number Of Slot Max 109 */ 
WHERE CharID = (SELECT CharID FROM [dbo].[_Char] WHERE CharName16 = @CharName)

Fixed Fortress war Unique

PHP:
use SRO_VT_SHARD 
UPDATE _RefObjCommon SET TypeID3=1, TypeID4=1, Rarity=3 
WHERE     (CodeName128 LIKE 'MOB_FW_KYKLOPES_%') OR 
                      (CodeName128 LIKE 'MOB_FW_WHITETIGER_%') OR 
                      (CodeName128 LIKE 'MOB_FW_DARKEAGLE%') OR 
                      (CodeName128 LIKE 'MOB_FW_HAGIAZO%') OR 
                      (CodeName128 LIKE 'MOB_FW_BIGSPIDER_%') OR 
                      (CodeName128 LIKE 'MOB_FW_HANGA%')

Fix Purification Pill Bug

PHP:
UPDATE _RefObjItem SET Param4='20000', Desc4_128='COOLTIME:0x000000C8' WHERE ID BETWEEN 5861 and 5864

الموضوع متجدد باستمرار


في حفظ الله