حفظ بياناتي ؟

1/01/2023

22/05/2024_hema

22/05/2024_hema

END_shaher_01/12/2024

Ahmed_k_nayel_01_12_2024

END_02/12/2024

END 30/12/2024

END 06/12/2024

END 28/12/2024

END 30/12/2024_waiting

END 30/02/2025_Belal

END 06/01/2025

END 12/01/2025

END _14/01/2025_Karuoke

END _14/01/2025_Karuoke

25/01/2022

QueenSro_01_10_2024

Ahmed_k_nayel_01_12_2024

ibrahim_END 07/1212024

END 30/12/2024

END 12/01/2025

END _14/01/2025_Karuoke

 الـجـروب الـرسـمى لـلـمـنـتـدى FaceBook | Official Group 



قسم المواضيع المكررة و المخالفة هنا يتم وضع المواضيع المخالفة والمواضيع المكررة

موضوع مغلق
 
أدوات الموضوع تقييم الموضوع انواع عرض الموضوع
قديم 10-05-2017, 05:14 PM   #1

™Ozoo-Eboda™
عضو مميز



الصورة الرمزية ™Ozoo-Eboda™


• الانـتـسـاب » Jul 2014
• رقـم العـضـويـة » 118046
• المشـــاركـات » 570
• الـدولـة » EGYPT-Tanta
• الـهـوايـة » PingBall/Musice/Smoking
• اسـم الـسـيـرفـر » Private Server
• الـجـنـس » Male
• نقـاط التقييم » 10
™Ozoo-Eboda™ صـاعـد

™Ozoo-Eboda™ غير متواجد حالياً


إرسال رسالة عبر Yahoo إلى ™Ozoo-Eboda™

(30) كل الكويري [Query] اللي هتحتاجة هنا ♥



Add item to char

USE SRO_VT_SHARD
-------------------------------------------------------------------------------------------------
--Usage:
--exec _ADD_ITEM_EXTERN 'CharName','ItemsCodeName',Count,OptLvl
-------------------------------------------------------------------------------------------------
declare @CharName varchar(64)
-------------------------------------------------------------------------------------------------
set @CharName = 'Player' -- Charname Of Player
-------------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EU_TSTAFF_11_SET_B_RARE',1,1
-------------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EU_TSTAFF_11_SET_B_RARE',1,1
-------------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EU_TSTAFF_11_SET_B_RARE',1,1
-------------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EU_TSTAFF_11_SET_B_RARE',1,1
-------------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EU_TSTAFF_11_SET_B_RARE',1,1
-------------------------------------------------------------------------------------------------
********************************
Start Item

Go To

SRO_VT_Shard /Programmability/Stored Procedures /_AddNewChar

Then Add Item


Like

-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E060118_60EXP_HELP',1,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E060118_100EXP_HELP',1,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_SCROLL_RETURN_NEWBIE_01',20,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_REVERSE_RETURN_SCROLL',5,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_E041225_SANTA_WINGS',15,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_HP_SUPERSET_5_BAG',200,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_MP_SUPERSET_5_BAG',200,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_RESURRECTION_100P_SCROLL',5, 1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_REPAIR_HAMMER',2,1
-------------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_COS_P_GOLDPIG_SCROLL',1,1
-------------------------------------------------------------------------------------------
--If You Want Add Silk Add This
-------------------------------------------------------------------------------------------
INSERT INTO SRO_VT_ACCOUNT.dbo.SK_Silk (JID, silk_own, silk_gift, silk_point) VALUES (@UserJID, Add Number of Silk, 0, 0);
********************************
Delete Premium

USE SRO_VT_SHARD
GO
----------------------------------------------------------------------------------
--- You Can Get CharID By SwaggerTools , Search User Information.
----------------------------------------------------------------------------------
DELETE FROM _TimedJob WHERE CharID = 'ID'
-------------------------------------------------------------------
********************************
Edit Char

USE [SRO_VT_SHARD]
GO
-----------------------------------------------------------------------------------
Declare @CharName VarChar(max) --Dont Touch Here
Declare @Level BigInt --Dont Touch Here
-----------------------------------------------------------------------------------
SET @CharName= 'Player' --Type Here Your Charname
-----------------------------------------------------------------------------------
SET @Level = '120' --Level Here You Want Max [140].
-----------------------------------------------------------------------------------
UPDATE [Dbo].[_Char]
-----------------------------------------------------------------------------------
SET InventorySize = '109', --Inventory Size Min 45 max 109
-----------------------------------------------------------------------------------
RemainGold = RemainGold + '1', --GOLD to give
-----------------------------------------------------------------------------------
HwanLevel = '0', --Zerk Level ( 0 to none )
-----------------------------------------------------------------------------------
RemainSkillPoint = RemainSkillPoint + '101000', --SkillPoint to give
-----------------------------------------------------------------------------------
CurLevel = @Level, --Dont Touch Here
MaxLevel = @Level, --Dont Touch Here
-----------------------------------------------------------------------------------
Strength = @Level+19,
Intellect = @Level+19,
-----------------------------------------------------------------------------------
RemainStatPoint = @Level * 3 -3,
-----------------------------------------------------------------------------------
RemainHwanCount = 5, --RemainHwanCount
-----------------------------------------------------------------------------------
ExpOffset = 1-- Exp
-----------------------------------------------------------------------------------
--------------------###### Dont Touch Here ######-----------------
WHERE CharName16 = @CharName
*****************************
Give Item to char

USE SRO_VT_SHARD
GO
-----------------------------------------------------------------------------------------
--Usage:
--exec _ADD_ITEM_EXTERN 'CharName','ItemsCodeName',Count,OptLvl
-----------------------------------------------------------------------------------------
declare @CharName varchar(64)
-----------------------------------------------------------------------------------------
set @CharName = 'Player' --Charname Here
-----------------------------------------------------------------------------------------
exec _ADD_ITEM_EXTERN @CharName,'ITEM_MALL_MOVE_SPEED_UP_100',1000,1
**************************
Search About Item

Use SRO_VT_SHARD
GO

-----------------------------------

Select IT.ID64, IT.OptLevel As Plus, INV.CharID, CH.CharName16, REF.CodeName128 From _RefObjCommon As REF
Right Join _Items As IT On IT.RefItemID = REF.ID
Right Join _Inventory As INV On INV.ItemID = IT.ID64
Right Join _Char as CH On CH.CharID = INV.CharID
-------------------------------------

Where CodeName128 like 'TSWORD_12_C_RARE'
********************************
TP ALL PLayers To Char

USE SRO_VT_SHARD
GO
----------------------------------------------------------------------
DECLARE @CHARNAME Varchar (18)
-----------------------------------------------------------------------
SET @CHARNAME = 'Player' -- Type Charname Here
-----------------------------------------------------------------------
DECLARE @WORLDID INT = (SELECT (WorldID) FROM _Char where CharName16 = @CHARNAME)
DECLARE @REGION2 INT SET @REGION2 = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME)
DECLARE @POSX2 INT SET @POSX2 = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME)
DECLARE @POSY2 INT SET @POSY2 = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME)
DECLARE @POSZ2 INT SET @POSZ2 = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME)
------------------------------------------------------------------------
UPDATE [dbo].[_Char] SET
PosX = @POSX2,
PosY = @POSY2,
PosZ = @POSZ2,
LatestRegion = @REGION2,
WorldID = @WORLDID
********************************
Delete Item From player

USE [SRO_VT_SHARD]
GO
-------------------------------

Exec [Dbo].[_SEEK_N_DESTROY_ITEM] ['ITEM Code Name' ] --Type Here Code Name
***********************
ADD SILK

USE SRO_VT_ACCOUNT;
GO
INSERT INTO SK_SILK
(JID,
silk_own,
silk_gift,
silk_point)
SELECT JID,
'0',
'0',
'0'
FROM TB_User
WHERE not exists (select * from SK_Silk
WHERE SK_SILK.JID = TB_User.JID);
--------------------------------------------------------
UPDATE SK_Silk SET silk_own=silk_own+10 --Change +10 To Amount You Want
***************************
Ban Player

USE [SRO_VT_SHARD]
GO
--------------------------------
DECLARE @ChrID INT;
DECLARE @CharName VARCHAR(64);
DECLARE @AccJID INT;
---------------------------------
SET @CharName = 'CharNameHere' ---type Charname
---------------------------------
SET @ChrID=(SELECT CharID FROM _Char WHERE CharName16=@CharName)
SET @AccJID=(SELECT UserJID FROM _User WHERE CharID=@ChrID)
-----------------------------------------------------------------
USE SRO_VT_ACCOUNT
DECLARE @ID VARCHAR (64)
DECLARE @Reason VARCHAR(128)
DECLARE @Begin DATETIME
DECLARE @End DATETIME
SET @ID = (Select STRuserID FROM TB_User Where JID = @AccJID)

---------------------------------
SET @Reason = 'Ban Reason Here'
SET @Begin = '2012-05-01 00:00:00.000' -- Time Begin --
SET @End = '2040-01-01 00:00:00.000' -- Time End --
---------------------------------
---------------------------

INSERT [dbo].[_Punishment]
(
[UserJID],
[Type],
[Executor],
[Shard],
[CharName],
[CharInfo],
[PosInfo] ,
[Guide],
[Description],
[RaiseTime],
[BlockStartTime],
[BlockEndTime],
[PunishTime],
[Status]
)
VALUES
(
@AccJID,
1,
1,
0,
@CharName,
1,
1,
@Reason,
@Reason,
@Begin,
@Begin,
@End,
@End,
0);
----------------------------------------------------------
DECLARE @ReasonID INT
SET @ReasonID =
(Select SerialNo FROM _Punishment Where UserJID = @AccJID)
----------------------------------------------------------
INSERT [dbo].[_BlockedUser]
(
[UserJID],
[UserID],
[Type],
[SerialNo],
[TimeBegin],
[TimeEnd])
VALUES
(
@AccJID,
@ID,
1,
@ReasonID,
@Begin,
@End);

-----------------------------------------------------------------
SELECT StrUserID FROM TB_User WHERE JID = @AccJID
-----------------------------------------------------------------
**********************
Remove PK

USE [SRO_VT_SHARD]
GO
------------------------------
DECLARE @CharName Varchar(max)
------------------------------
SET @CharName = 'Player' --Type Player Name Here
------------------------------
UPDATE _Char SET
RemainHwanCount = 5,
DailyPK= 0,
TotalPK= 0,
PKPenaltyPoint= 0
WHERE CharName16 = @CharName
***********************
Give 120 Mastry

USE [SRO_VT_SHARD]
GO
Declare @CharName Varchar (64)
-------------------------------------------------
Set @CharName = 'Player' -- Type Player Name Here
-------------------------------------------------
UPDATE [dbo].[_CharSkillMastery]
SET Level= '120' - Change If You Want
WHERE CharID = (SELECT CharID FROM [dbo].[_Char] WHERE CharName16 = @CharName)
******************************
Move all to Janjan

USE [SRO_VT_SHARD]
UPDATE _Char SET LatestRegion= 25000, posX= 982 , posY= -0.421872 ,posZ= 140 ,AppointedTeleport=27754,TelRegion= 0, TelPosX= 0, TelPosY= 0, TelPosZ= 0,
DiedRegion= 0 ,DiedPosX= 0 ,DiedPosY= 0, DiedPosZ= 0, WorldID= 1 WHERE CharID>= 0
****************************
Give Academy Buffs

USE [SRO_VT_SHARD]
DECLARE @CharName Varchar (MAX)
DECLARE @Graduates INT
DECLARE @HonorPoints INT
DECLARE @CharID INT
DECLARE @CampID INT
----------------------------------------------------------------------------------------------------
SET @CharName = 'Player' --Player Name Here
----------------------------------------------------------------------------------------------------
SET @CharID = (Select CharID FROM _Char Where CharName16 = @CharName)
SET @CampID = (Select TOP 1 CampID FROM _TrainingCampBuffStatus Where RecipientCharID = @CharID)
SET @Graduates = '1234[Number Of Graduates] '
SET @HonorPoints= @Graduates * 39

--------------------

UPDATE [Dbo].[_TrainingCamp]
SET GraduateCount = @Graduates
WHERE [Dbo].[_TrainingCamp].[ID] = @CampID
UPDATE [dbo].[_TrainingCampMember]
SET HonorPoint = @HonorPoints
WHERE [dbo].[_TrainingCampMember].[CampID]=@CampID
*******************************
Give title name By Hwan code

USE SRO_VT_SHARD
GO
-------------------------
Update _Char SET HWANLevel = '0' Where Charname16 Like 'Player' --Change Hwan Code And Player Name
***********************
Give inventory Size

USE SRO_VT_SHARD
GO
-----------------------------------------------------------------
Declare @CharName Varchar (64)
Set @CharName = 'Player' --Player Name
-----------------------------------------------------------------
Update(dbo._Char)
InventorySize = 109 /* Number Of Slot Max 109 */
WHERE CharID = (SELECT CharID FROM [dbo].[_Char] WHERE CharName16 = @CharName)
********************************
Open all skills For GM

USE [SRO_VT_SHARD]
DECLARE @CharName varchar(255)
DECLARE @CharID INT
----------------------------------------------------------
SET @CharName='Player' --CharName
----------------------------------------------------------
SELECT @CharID = CharID FROM _Char WHERE CharName16=@CharName
------------------------------------------------------------------
UPDATE _CharSkillMastery SET Level = '120' --Mastry
------------------------------------------------------------------
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)
**********************************
Avatar GM

USE SRO_VT_SHARD

--Usage:
--exec _ADD_ITEM_EXTERN 'CharName','ItemsCodeName',Count,OptLvl
declare @CharName varchar(64)

set @CharName = 'GameMaster Name Char'

exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_AVATAR_M_GM_UNIFORM',1,250
exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_AVATAR_W_GM_UNIFORM',1,250
***********************************
Clean Database Account

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 Database Shard

USE [SRO_VT_SHARD]
GO
truncate table _OpenMarket
print 'Cleaned _OpenMarket'
truncate table _CharSkill
print 'Cleaned _CharSkill'
truncate table _CharSkillMastery
print 'Cleaned _CharSkillMastery'
truncate table _GuildMember
print 'Cleaned _GuildMember'
truncate table _BlockedWhisperers
print 'Cleaned _BlockedWhisperers'
truncate table _Inventory
print 'Cleaned _Inventory'
truncate table _InventoryForAvatar
print 'Cleaned _InventoryForAvatar'
truncate table _InventoryForLinkedStorage
print 'Cleaned _InventoryForLinkedStorage'
truncate table _TrainingCampMember
print 'Cleaned _TrainingCampMember'
truncate table _TrainingCampSubMentorHonorPoint
print 'Cleaned _TrainingCampSubMentorHonorPoint'
update _TrainingCampHonorRank set CampID = NULL, Rank = NULL
print 'Cleaned _TrainingCampHonorRank'
truncate table _TrainingCampBuffStatus
print 'Cleaned _TrainingCampBuffStatus'
delete from _TrainingCamp
print 'Cleaned _TrainingCamp'
truncate table _StaticAvatar
print 'Cleaned _StaticAvatar'
truncate table _User
print 'Cleaned _User'
truncate table _Friend
print 'Cleaned _Friend'
truncate table _Memo
print 'Cleaned _Memo'
truncate table _TimedJob
print 'Cleaned _TimedJob'
truncate table _CharTrijobSafeTrade
print 'Cleaned _CharTrijobSafeTrade'
delete from _CharTrijob
print 'Cleaned _CharTrijob'
truncate table _InvCOS
print 'Cleaned _InvCOS'
delete from _CharCOS where ID > 0
print 'Cleaned _CharCOS'
delete from _Char where charid > 0
print 'Cleaned _Char'
truncate table _Chest
print 'Cleaned _Chest'
truncate table _ChestInfo
print 'Cleaned _ChestInfo'
truncate table _ItemPool
print 'Cleaned _ItemPool'
delete from _Items where ID64 > 0
print 'Cleaned _Items'
delete from _AccountJID
print 'Cleaned _AccountJID'
update _AlliedClans set Ally1 = 0, Ally2 = 0, Ally3 = 0, Ally4 = 0, Ally5 = 0, Ally6 = 0, Ally7 = 0, Ally8 = 0
print 'Cleaned _AlliedClans'
truncate table _GuildWar
print 'Cleaned _GuildWar'
truncate table _CharNameList
print 'Cleaned _CharNameList'
truncate table _CharQuest
print 'Cleaned _CharQuest'
truncate table _ClientConfig
print 'Cleaned _ClientConfig'
truncate table _DeletedChar
print 'Cleaned _DeletedChar'
truncate table _SiegeFortressStoneState
print 'Cleaned _SiegeFortressStoneState'
truncate table _SiegeFortressRequest
print 'Cleaned _SiegeFortressRequest'
truncate table _SiegeFortressObject
print 'Cleaned _SiegeFortressObject'
truncate table _SiegeFortressItemForge
print 'Cleaned _SiegeFortressItemForge'
truncate table _SiegeFortressBattleRecord
print 'Cleaned _SiegeFortressBattleRecord'
update _SiegeFortressStruct SET OwnerGuildID = '0'
print 'Cleaned _SiegeFortressStruct'
UPDATE _SiegeFortress SET GuildID = '0', TaxRatio = '0', Tax = '0', NPCHired = '0', Introduction = NULL, CreatedDungeonTime = NULL, CreatedDungeonCount = NULL
print 'Cleaned _SiegeFortress'
truncate table _CharNickNameList
print 'Cleaned _CharNickNameList'
truncate table _GPHistory
print 'Cleaned _GPHistory'
truncate table _GuildChest
print 'Cleaned _GuildChest'
delete from _Guild where ID > 0
print 'Cleaned _Guild'
delete from _AlliedClans where ID > 0
print 'Cleaned _AlliedClans'
********************************
Clean Database ShardLog

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]
*******************************
Guild/job 0 penalty Time

USE [SRO_VT_SHARD]
GO
/******By Jangan ******/
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,D ata2,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
************************************
Create Guild lvl 5
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_Guild_Create] Script Date: 08/16/2012 23:40:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

--
ALTER PROCEDURE [dbo].[_Guild_Create]
@GuildName varchar(64),
@CreaterID int
as
if (exists (select id from _Guild where Name = @GuildName))
begin
return -1000
end
if (exists (select CharID from _GuildMember where CharID = @CreaterID))
begin
return -1001
end
begin transaction

declare @GuildID int
declare @FoundationDate smalldatetime

set @FoundationDate = GetDate()
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values(@GuildName, 5, 123456, @FoundationDate,0,0)
set @GuildID = @@identity

if (@@error <> 0 or @@rowcount = 0 or @GuildID = 0)
begin
rollback transaction
return -5
end


--???? ???? 0xffffffff !!
declare @rvalue int
exec @rvalue = _Guild_FnAddMember @GuildID, @CreaterID, 0, @FoundationDate,0xffffffff
if (@@error <> 0 or @rvalue <= 0)
begin
rollback transaction
return @rvalue
*************************************
Guild Limit
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_Guild_FnAddMember] Script Date: 15.06.2014 11:08:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO




ALTER PROCEDURE [dbo].[_Guild_FnAddMember]
@guildID int,
@MemberID int,
@MemberClass tinyint,
@joinDate smalldatetime,
@permission int

as
Declare @LiMiT int = '24' -- << Userr Limit Credits by $Apollo
if (exists (select CharID from _GuildMember where CharID = @MemberID))
begin
return -1001
end


declare @MemberName varchar(64)
declare @curLevel tinyint
select @MemberName = CharName16, @curLevel = CurLevel from _Char with (nolock) where CharID = @MemberID
if (@@error <> 0 or @@rowcount = 0)
begin
return -1
end
if (exists (select CharID from _GuildMember with (nolock) where GuildID = @guildID and CharID = @MemberID))
begin
return -2
end

declare @ReFObjID int
select @ReFObjID = RefObjID from _Char with (nolock) where CharID = @MemberID

if (@@error <> 0 or @@rowcount = 0)
begin
return -5
end






declare @siegeAuthority tinyint
set @siegeAuthority = 0


if @MemberClass = 0 -- ±æ¸¶ÀÌ¸é °ø¼º±ÇÇÑÀ» commander·Î ¼¼ÆÃ! ±× ¿Ü´Â ÀÏ¹Ý member·Î ¼¼ÆÃÇÑ´Ù.
begin
set @siegeAuthority = 1
end
Declare @GC int = (Select COUNT(*) from _GuildMember where GuildID = @guildID )
if @GC <= @LiMiT begin
insert _GuildMember values @guildID, @MemberID, @MemberName, @MemberClass, @curLevel, 0, @joinDate @permission, 0, 0, 0, null, @ReFObjID, @siegeAuthority)
end
if (@@error <> 0 or @@rowcount = 0)
begin
return -3
end

if @GC <= @LiMiT begin
update _Char Set GuildID = @guildID where CharID = @MemberID
end
if (@@error <> 0 or @@rowcount = 0)
begin
return -4
end
return 1
******************************
Union Limit

USE [SRO_VT_SHARD]

GO
/****** Object: StoredProcedure [dbo].[_Guild_Create] Script Date: 14.06.2014 16:53:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO




--
ALTER PROCEDURE [dbo].[_Guild_Create]
@guildName varchar(64),
@CreaterID int
as
if (exists (select id from _Guild where Name = @guildName))
begin
return -1000
end
if (exists (select CharID from _GuildMember where CharID = @CreaterID))
begin
return -1001
end
begin transaction

declare @guildID int
declare @FoundationDate smalldatetime

set @FoundationDate = GetDate()
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_1', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_2', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_3', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_4', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_5', 1, 0, @FoundationDate,0,0)


insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName, 5, 0, @FoundationDate,0,0)
set @guildID = @@identity

if (@@error <> 0 or @@rowcount = 0 or @guildID = 0)
****************************
Remove FW From Guilds
USE SRO_VT_SHARD
UPDATE _SiegeFortress SET GuildID = 0
********************************
ADD Drop
USE SRO_VT_SHARD
GO

DECLARE @MonsterID int
DECLARE @ItemID int
DECLARE @DropRatio real



SET @MonsterID = 3810 -------- Mob,Unique ID you want Add Drop in
SET @DropRatio = 1 -------- Item drop rate 1=100% , 0.3 = 30%
SET @ItemID = 24165 -------- ITEM ID You want Add in Drops


INSERT _RefMonster_AssignedItemDrop
(
RefMonsterID,
RefItemID,
DropGroupType,
OptLevel,
DropAmountMin,
DropAmountMax,
DropRatio,
RefMagicOptionID1,
CustomValue1,
RefMagicOptionID2,
CustomValue2,
RefMagicOptionID3,
CustomValue3,
RefMagicOptionID4,
CustomValue4,
RefMagicOptionID5,
CustomValue5,
RefMagicOptionID6,
CustomValue6,
RefMagicOptionID7,
CustomValue7,
RefMagicOptionID8,
CustomValue8,
RefMagicOptionID9,
CustomValue9,
RentCodeName
)
VALUES(@MonsterID , @ItemID, 0, 0, 1, 1, @DropRatio, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 , 0 , 'xxx')
******************************
Find Target ID

Use SRO_VT_SHARD select ID from _RefObjCommon where CodeName128 like 'MOB_SD_ANUBIS'

******************************
Change Uniqe Spot

USE [SRO_VT_SHARD]

DECLARE @OldMOB varchar(128),@NewMOB varchar(128),@OldMOBID varchar(128),@NewMOBID varchar(128)
SET /**/@OldMOB/**/ = 'MOB_CH_MANGNYANG'
SET /**/@NewMOB/**/ = 'MOB_RM_ROC'
SET @OldMOBID = (SELECT [ID] FROM [dbo].[_RefObjCommon] WHERE CodeName128 = @OldMOB)
SET @NewMOBID = (SELECT [ID] FROM [dbo].[_RefObjCommon] WHERE CodeName128 = @NewMOB)
UPDATE [dbo].[Tab_RefTactics]
SET [dwObjID] = @NewMOBID
WHERE [dwObjID] = @OldMOBID
******************************
ADD Spot Uniques

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_JUPITER_YUNO' -- Unique code name from _RefobjCommon table
SET @CHARNAME = 'CHARNAME' -- Character name from _Char table to get mob position X Y Z
SET @mindealy = 60 -- Minimum time before appears in seconds
SET @maxdelay = 120 -- Maximum time before appears in seconds
SET @INITRADIUS = 100 -- Radius around spot unique can generated at
SET @RADIUS = 500 -- 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,btMaxStam inaVariance,nSightRange,btAggressType,AggressData, btChangeTarget,btHelpRequestTo,btHelpResponseTo,bt BattleStyle,BattleStyleData,btDiversionBasis,Diver sionBasisData1,DiversionBasisData2,DiversionBasisD ata3,DiversionBasisData4,DiversionBasisData5,Diver sionBasisData6,DiversionBasisData7,DiversionBasisD ata8,btDiversionKeepBasis,DiversionKeepBasisData1, DiversionKeepBasisData2,DiversionKeepBasisData3,Di versionKeepBasisData4,DiversionKeepBasisData5,Dive rsionKeepBasisData6,DiversionKeepBasisData7,Divers ionKeepBasisData8,btKeepDistance,KeepDistanceData, btTraceType,btTraceBoundary,TraceData,btHomingType ,HomingData,btAggressTypeOnHoming,btFleeType,dwCha mpionTacticsID,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,dwOverwriteMaxTot alCount,fMonsterCountPerPC,dwSpawnSpeedIncreaseRat e,dwMaxIncreaseRate,btFlag,GameWorldID,HatchObjTyp e,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,fLocalP osX,fLocalPosY,fLocalPosZ,wInitialDir,nRadius,nGen erateRadius,nChampionGenPercentage,dwDelayTimeMin, dwDelayTimeMax,dwMaxTotalCount,btFlag,btRespawn,bt Type) 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!'
/**Because query will not work as it with BR files due to the difference between tables so:
******************************
Delete Drop

USE SRO_VT_SHARD
GO
DELETE _RefDropItemAssign
FROM _RefDropItemAssign Drops
LEFT JOIN _RefObjCommon Objects
ON (Drops.RefItemID = Objects.ID)
WHERE CodeName128 like 'ITEMCODENAMEHERE'
******************************
Uniques Time

USE [SRO_VT_SHARD]
GO
UPDATE dbo.Tab_RefNest SET dwmaxtotalcount = 1 where dwdelaytimemax = '21600' ;
******************************
Change Mob lvl

USE SRO_VT_SHARD

Declare @link int, @codename varchar(max), @level int, @newlevel int;

set @codename = 'SN_MOB_SD_HIKE' /* <- from textdata_object.txt */



set @link = (SELECT Link FROM _RefObJCommon WHERE NameStrID128 = @codename)
set @newlevel = (
case
when (SELECT Lvl FROM _RefObjChar WHERE ID = @link)+10 <= 120 THEN (SELECT Lvl FROM _RefObjChar WHERE ID = @link)+10
ELSE 120
end);

UPDATE _RefObjChar SET Lvl = @newlevel WHERE ID = @link
UPDATE _RefObjChar SET ExpToGive = cast(ExpToGive*1.1 as bigint) WHERE ID = @link
UPDATE _RefObjChar SET MaxHP = cast(MaxHP*1.1 as bigint) WHERE ID = @link
******************************
Change Mob To Uniques

USE SRO_VT_SHARD
GO

update _RefObjCommon set Rarity = 3 where CodeName128 = 'Code el mob hna'

Print 'Mob has been changed to unique'
******************************
F1 Problem

USE [SRO_VT_SHARD] -- By Ozoo_DB
GO

DELETE FROM _CharQuest WHERE QuestID = 1

INSERT INTO _CharQuest
SELECT CharID, QuestID = 1, [Status] = 1,AchievementCount = 0, StartTime = GETDATE()-4460, EndTime = GETDATE()-4460, QuestData1 = 0, QuestData2 = 0
FROM _Char
WHERE not exists (SELECT CharID, QuestID FROM _CharQuest WHERE QuestID = 1)

--if problem is still found open _RefCharDefault_Quest Table.
--look at this line : 0 15 3 QEVENT_GUIDE 1
--you need to enable this quest like this : 1 15 3 QEVENT_GUIDE 1
******************************
5 Pages Pet Inventory

USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_AddNewCOS] Script Date: 02/10/2012 11:32:15 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[_AddNewCOS]
@OwnerCharID int,
@RefObjID int,
@Level int,
@HP int,
@MP int,
@HGP int,
@KeeperNPC int,
@State int,
@InventorySize int,
@itemID int,
@PickItemConfig tinyint,
@RentEndTime smalldatetime
as

begin tran

declare @COS_ID int
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- pet_skill_item (&Atilde;&Ouml;¼±&Egrave;£)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

declare @MaxInventorySize tinyint
select @MaxInventorySize = InventorySize
from _RefObjCommon, _RefObjChar
where _RefObjCommon.ID = @RefObjID and _RefObjCommon.Link = _RefObjChar.ID

if( @@rowcount = 0 or @MaxInventorySize < @InventorySize )
begin
rollback tran
return -5
end

insert into _CharCOS values (@OwnerCharID, @RefObjID, @HP, @MP, @KeeperNPC, @State, NULL, @Level, 0, @HGP, @PickItemConfig, @RentEndTime)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
set @COS_ID = @@identity
if (@COS_ID = 0 OR @@error <> 0)
begin
rollback tran
return -1
end

--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- pet_skill_item (&Atilde;&Ouml;¼±&Egrave;£)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
if (@MaxInventorySize > 0)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
begin
declare @Slot int
set @Slot = 0
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- pet_skill_item (&Atilde;&Ouml;¼±&Egrave;£)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
while (@Slot < @MaxInventorySize)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
begin
insert into _InvCOS values(@COS_ID, @Slot, 0)
if (@@error <> 0)
begin
-- &Agrave;&Icirc;&ordm;¥&Aring;&auml;¸® »&yacute;¼&ordm; ½&Ccedil;&AElig;&ETH;!
rollback tran
return -2
end

set @Slot = @Slot + 1
end
end

/* --´&otilde; &Agrave;&Igrave;»&oacute; &Agrave;&Igrave; &Auml;&Atilde;·³&iquest;&iexcl;´&Acirc; µ¥&Agrave;&Igrave;&Aring;&Iacute;¸¦ ³&Ouml;&Aacute;&ouml; ¾&Ecirc;´&Acirc;´&Ugrave;!
UPDATE _Char SET EngagedCOS = @COS_ID WHERE CharID = @OwnerCharID
IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
ROLLBACK TRANSACTION
RETURN -3
END
*/
if( @itemID <> 0 )
begin
update _Items set Data = @COS_ID where ID64 = @itemID
if( @@error <> 0 or @@rowcount = 0 )
begin
rollback transaction
return -4
end

--BEGIN ADDITIONAL 112 SLOT IN GRAB PETS FOR 7684 DAYS
declare @Serial64 bigint
select @Serial64 = Serial64 from _Items where Data = @COS_ID
exec _AddTimedJobForPet @COS_ID,5,22926,1992999999,1111708465,1,112,0,0,0, 0,0,@Serial64
--BEGIN ADDITIONAL 112 SLOT IN GRAB PETS FOR 7684 DAYS

end

commit tran

return @COS_ID
******************************
Honor Rank

USE SRO_VT_SHARD --By Ozoo_DB

TRUNCATE TABLE _TrainingCampHonorRank
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (1)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (2)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (3)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (4)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (5)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (6)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (7)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (8)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (9)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (10)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (11)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (12)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (13)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (14)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (15)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (16)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (17)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (18)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (19)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (20)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (21)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (22)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (23)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (24)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (25)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (26)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (27)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (28)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (29)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (30)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (31)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (32)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (33)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (34)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (35)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (36)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (37)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (38)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (39)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (40)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (41)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (42)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (43)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (44)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (45)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (46)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (47)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (48)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (49)
INSERT INTO _TrainingCampHonorRank(Ranking) VALUES (50)
exec _TRAINING_CAMP_UPDATEHONORRANK
******************************
Add New NPC

USE [SRO_VT_SHARD] --By Swagger1337
GO

DECLARE @CHARNAME VARCHAR (30)
DECLARE @NPCNAME VARCHAR (30)
DECLARE @ADDNEW VARCHAR (30)
DECLARE @GAMEWORDID INT
SET @CHARNAME = 'Swagger1337' --Your Charname to set npc location
SET @NPCNAME = 'SwaggerNPC' --Your New Npc Name
SET @GAMEWORDID = 1 --Leave it 1 if you dont know what you make!
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,OrgObjCodeName1 28,NameStrID128,DescStrID128,CashItem,Bionic,TypeI D1,TypeID2,TypeID3,TypeID4,DecayTime,Country
,Rarity,CanTrade,CanSell,CanBuy,CanBorrow,CanDrop, CanPick,CanRepair,CanRevive,CanUse,CanThrow,Price, CostRepair,CostRevive,CostBorrow,KeepingFee,SellPr ice,ReqLevelType1,ReqLevel1,ReqLevelType2,ReqLevel 2,ReqLevelType3,ReqLevel3,ReqLevelType4,ReqLevel4, MaxContain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Sp eed1,Speed2,Scale,BCHeight,BCRadius
,EventID,AssocFileObj128,AssocFileDrop128,AssocFil eIcon128,AssocFile1_128,AssocFile2_128,Link) VALUES
(1,@MAXCOMMONID,'NPC_'+@NPCNAME,'xxx','xxx','SN_NP C_'+@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_Nobl egirl_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,Resist Frostbite,ResistBurn,ResistEShock,ResistPoison,Res istZombie,ResistSleep,ResistRoot,ResistSlow,Resist Fear
,ResistMyopia,ResistBlood,ResistStone,ResistDark,R esistStun,ResistDisea,ResistChaos,ResistCsePD,Resi stCseMD,ResistCseSTR,ResistCseINT,ResistCseHP,Resi stCseMP,Resist24,ResistBomb,Resist26
,Resist27,Resist28,Resist29,Resist30,Resist31,Resi st32,InventorySize,CanStore_TID1,CanStore_TID2,Can Store_TID3,CanStore_TID4,CanBeVehicle,CanControl,D amagePortion,MaxPassenger,AssocTactics,PD,MD,PAR,M AR,ER,BR,HR,CHR
,ExpToGive,CreepType,Knockdown,KO_RecoverTime,Defa ultSkill_1,DefaultSkill_2,DefaultSkill_3,DefaultSk ill_4,DefaultSkill_5,DefaultSkill_6,DefaultSkill_7 ,DefaultSkill_8,DefaultSkill_9,DefaultSkill_10,Tex tureType,Except_1
,Except_2,Except_3,Except_4,Except_5,Except_6,Exce pt_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_Desc 128,Param2,Param2_Desc128,Param3,Param3_Desc128,Pa ram4,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,Par am1,Param1_Desc128,Param2,Param2_Desc128,Param3,Pa ram3_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_STO RE_'+@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,RefTabGroupCodeNam e,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,@P OSZ,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 Group

USE SRO_VT_SHARD --By Swagger1337
GO

DECLARE @NPCNAME VARCHAR (30)
DECLARE @ADDNEW VARCHAR (30)
DECLARE @GROUPNUMBER VARCHAR (30)
DECLARE @GROUPNEW VARCHAR (30)
SET @NPCNAME = 'STATIC' --U NPC NAME
SET @GROUPNUMBER = 2
SET @ADDNEW = 'GROUP'
--
IF @GROUPNUMBER = 2 SET @GROUPNEW = '_GROUP2'
IF @GROUPNUMBER = 3 SET @GROUPNEW = '_GROUP3'
IF @GROUPNUMBER = 4 SET @GROUPNEW = '_GROUP4'
IF @GROUPNUMBER = 5 SET @GROUPNEW = '_GROUP5'
IF @GROUPNUMBER = 6 SET @GROUPNEW = '_GROUP6'
IF @ADDNEW = 'GROUP' BEGIN
SET IDENTITY_INSERT _RefShopTabGroup ON
DECLARE @ShopTabGroupID VARCHAR (30) SET @ShopTabGroupID = (SELECT MAX (ID) FROM _RefShopTabGroup)+1
INSERT INTO _RefShopTabGroup (Service,Country,ID,CodeName128,StrID128_Group)
VALUES (1,15,@ShopTabGroupID,'STORE_'+@NPCNAME+@GROUPNEW, 'SN_STORE_'+@NPCNAME+@GROUPNEW)
SET IDENTITY_INSERT _RefShopTabGroup OFF
INSERT INTO _RefMappingShopWithTab VALUES (1,15,'STORE_'+@NPCNAME,'STORE_'+@NPCNAME+@GROUPNE W)
PRINT ''
PRINT 'New Group Added Succesfully '
PRINT 'add this new line to refshoptabgroup.txt @ server_dep\silkroad\textdata'
PRINT '1 15 '+@SHOPTABGROUPID+' STORE_'+@NPCNAME+@GROUPNEW+' SN_STORE_'+@NPCNAME+@GROUPNEW
PRINT ''
PRINT 'add this new line to refmappingshopwithtab.txt @ server_dep\silkroad\textdata'
PRINT '1 15 STORE_'+@NPCNAME+' STORE_'+@NPCNAME+@GROUPNEW
END
******************************

Add New Tab

USE [SRO_VT_SHARD] --By Swagger1337
GO

DECLARE @NPCNAME VARCHAR (30)
DECLARE @ADDNEW VARCHAR (30)
DECLARE @TABNAME VARCHAR (30)
DECLARE @TABNUMBER VARCHAR (30)
DECLARE @TABNEW VARCHAR (30)
DECLARE @GROUPNUMBER VARCHAR (30)
DECLARE @GROUPNEW VARCHAR (30)
--
SET @ADDNEW = 'TAB' --Do Not Change Please!
SET @NPCNAME = 'Avatars Mall' --Your NPC name who you need to make tab for it
SET @GROUPNUMBER = 1 --Leave it please!
SET @TABNUMBER = 2 --which tab ? if it 1 type 1 if it 2 type 2 max 4 tabs.
SET @TABNAME = 'Euro' --the new tab name ?
--
IF @TABNUMBER = 2 SET @TABNEW = '_TAB2'
IF @TABNUMBER = 3 SET @TABNEW = '_TAB3'
IF @TABNUMBER = 4 SET @TABNEW = '_TAB4'
IF @GROUPNUMBER = 1 SET @GROUPNEW = '_GROUP1'
IF @GROUPNUMBER = 2 SET @GROUPNEW = '_GROUP2'
IF @GROUPNUMBER = 3 SET @GROUPNEW = '_GROUP3'
IF @GROUPNUMBER = 4 SET @GROUPNEW = '_GROUP4'
IF @GROUPNUMBER = 5 SET @GROUPNEW = '_GROUP5'
IF @GROUPNUMBER = 6 SET @GROUPNEW = '_GROUP6'
IF @ADDNEW = 'TAB' BEGIN
SET IDENTITY_INSERT _RefShopTab ON
DECLARE @ShopTabID VARCHAR (30) SET @ShopTabID = (SELECT MAX (ID) FROM _RefShopTab)+1
INSERT INTO _RefShopTab (Service,Country,ID,CodeName128,RefTabGroupCodeNam e,StrID128_Tab)
VALUES (1,15,@ShopTabID,'STORE_'+@NPCNAME+@TABNEW,'STORE_ '+@NPCNAME+@GROUPNEW,'SN_'+@TABNAME)
SET IDENTITY_INSERT _RefShopTab OFF
PRINT ''
PRINT 'New Tab added Sucessfully add this new line to refshoptab.txt @ server_dep\silkroad\textdata'
PRINT '1 15 '+@SHOPTABID+' STORE_'+@NPCNAME+@TABNEW+' STORE_'+@NPCNAME+@GROUPNEW+' SN_TAB_'+@TABNAME
END
******************************

Add Item To Npc

USE [SRO_VT_SHARD] --By Swagger1337
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 @Gcoin int
DECLARE @Scoin int
DECLARE @Icoin int
DECLARE @Ccoin int
DECLARE @Acoin int
DECLARE @Optlvl 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 = 'CODENAME128' -- Item CodeName in RefObjCommon
SET @Price = 1 -- Set 0 if you don't want to set Gold Price
SET @SilkPrice = 0 -- Set 0 if you don't want to set Silk Price
SET @Gcoin = 0 -- Set 0 if you don't want to set Gold Coin Price
SET @Scoin = 0 -- Set 0 if you don't want to set Silver Coin Price
SET @Icoin = 0 -- set 0 if you don't want to set Iron Coin Price
SET @Ccoin = 0 -- set 0 if you don't want to set Copper Coin Price
SET @Acoin = 15 -- set 0 if you don't want to set Arena Coin Price
SET @Optlvl = 0 -- Item Plus in npc Set 0 if you don't want plus for any item
SET @TAB = 'STORE_SWAGGERNPC_TAB2' -- 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, @Optlvl, 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
/**Gold Price***/
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
/*** Silk Price **/
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
/*****Gold Coin***/
IF (@SkipPricePolicyOfItem = 1 OR @SkipPricePolicyOfItem = 0 AND @Gcoin > 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, 512, 0, @Gcoin, -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 = 512 (Gold Coin)'
END
ELSE
BEGIN
PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...'
END
/***Silver Coin***/
IF (@SkipPricePolicyOfItem = 1 OR @SkipPricePolicyOfItem = 0 AND @Scoin > 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, 256, 0, @Scoin, -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 = 256 (Silver Coin)'
END
ELSE
BEGIN
PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...'
END
/****Iron Coin****/
IF (@SkipPricePolicyOfItem = 1 OR @SkipPricePolicyOfItem = 0 AND @Icoin > 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, 128, 0, @Icoin, -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 = 128 (Iron Coin)'
END
ELSE
BEGIN
PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...'
END
/****Copper Coin**/
IF (@SkipPricePolicyOfItem = 1 OR @SkipPricePolicyOfItem = 0 AND @Ccoin > 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, 64, 0, @Ccoin, -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 = 64 (Copper Coin)'
END
ELSE
BEGIN
PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...'
END
/****Arena Coin***/
IF (@SkipPricePolicyOfItem = 1 OR @SkipPricePolicyOfItem = 0 AND @Acoin > 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, 1024, 0, @Acoin, -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 = 1024 (Arena Coin)'
END
ELSE
BEGIN
PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...'
END
/************** End Prices ***************/
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
******************************
Add New Teleport

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 = 'swagger_area1' -- any name you want ex: PK_ZONE or PVP_ZONE
SET @CHARNAME1 = '[GM]Swagger1337' -- Teleport position
SET @CHARNAME2 = 'Swagger2' -- 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,OrgObjCodeName1 28,NameStrID128,DescStrID128,CashItem,Bionic,TypeI D1,TypeID2,TypeID3,TypeID4,DecayTime,Country,Rarit y,CanTrade,CanSell,CanBuy,CanBorrow,CanDrop,CanPic k,CanRepair,CanRevive,CanUse,CanThrow,Price,CostRe pair,CostRevive,CostBorrow,KeepingFee,SellPrice,Re qLevelType1,ReqLevel1,ReqLevelType2,ReqLevel2,ReqL evelType3,ReqLevel3,ReqLevelType4,ReqLevel4,MaxCon tain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,S peed2,Scale,BCHeight,BCRadius,EventID,AssocFileObj 128,AssocFileDrop128,AssocFileIcon128,AssocFile1_1 28,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','x xx',@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,Ass ocRefObjID,ZoneName128,GenRegionID,GenPos_X,GenPos _Y,GenPos_Z,GenAreaRadius,CanBeResurrectPos,CanGot oResurrectPos,GenWorldID,BindInteractionMask,Fixed Service) VALUES
(1,@MAXTELID,'GATE_'+@Teleport,'STORE_'+@Teleport, @MAXOBJ,'SN_STORE_'+@Teleport,@REGION2,@POSX2,@POS Y2,@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,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,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,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,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,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,Data5_1,Data5_2) VALUES
(1,@OwnTeleport,@MAXTELID,@Fee,0,0,0,1,@RequiredLV L,999,0,0,0,0,0,0,0,0,0,0,0,0)

print ''
******************************
Add DG12/DG13

USE [SRO_VT_SHARD] --By Swagger1337
GO

UPDATE [dbo].[_RefObjCommon]
SET Service = 1
WHERE CodeName128 like '%ITEM_EU%'

UPDATE [dbo].[_RefObjCommon]
SET Service = 1
WHERE CodeName128 like '%ITEM_CH%'

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 8994 AND 9005

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9008 AND 9025

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9028 AND 9045

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9048 AND 9065

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9068 AND 9085

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9088 AND 9105

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9114 AND 9125

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9134 AND 9145

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID BETWEEN 9154 AND 9225

UPDATE dbo._RefObjCommon
SET Service = 0
WHERE ID = 38620
******************************
Add 120 Skills

USE [SRO_VT_SHARD] -- By Swagger1337
GO

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 1 AND 273

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 276 AND 3481

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 3486 AND 3491

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 3493 AND 8321

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 8328 AND 8328

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 8331 AND 12176

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12178 AND 12186

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12188 AND 12196

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12198 AND 12199

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12201 AND 12206


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12210 AND 12216


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12218 AND 12222


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12225 AND 12306


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 12323 AND 20309


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 20311 AND 20501


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 20503 AND 21266


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 21268 AND 29693


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 29696 AND 30897


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 31038 AND 31086


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 31088 AND 31103


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 31105 AND 31181


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 31190 AND 31196


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 31198 AND 31924


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 32088 AND 32874

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 32891 AND 32894

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 32897 AND 32904

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33042 AND 33045

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33072 AND 33073

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33072 AND 33073

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33077 AND 33287


UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33289 AND 33294

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33296 AND 33300

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33302 AND 33307

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33309 AND 33312

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33314 AND 33338

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33340 AND 33347

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33349 AND 33372

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33374 AND 33382

UPDATE dbo._RefSkill
SET Service = 1
WHERE ID BETWEEN 33740 AND 33785

UPDATE dbo._RefSkill
SET Service = 0
WHERE ID BETWEEN 7182 AND 7184

UPDATE dbo._RefSkill
SET Service = 0
WHERE ID BETWEEN 3436 AND 3440

UPDATE dbo._RefSkill
SET Service = 0
WHERE ID BETWEEN 5409 AND 5409
******************************
Move Table From DB To DB

USE SRO_VT_SHARD --By Swagger1337
GO
TRUNCATE TABLE [dbo].[_RefObjItem]
GO
insert into SRO_VT_SHARD.dbo._RefObjItem select * from SRO_VT_SHARD1.dbo._RefObjItem
******************************
Max Stack

USE [SRO_VT_SHARD] --By Swagger1337
GO

UPDATE dbo._RefObjItem
SET MaxStack = 50 --Change 50 to your stack need
WHERE ID BETWEEN 3679 AND 3682

--warning! you need to change it in media.pk2
******************************


توقيع ™Ozoo-Eboda™ :
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]


إعلانات google

قديم 28-09-2018, 04:04 PM   #2

.Gamer.
عضو سوبر



الصورة الرمزية .Gamer.


• الانـتـسـاب » Jul 2015
• رقـم العـضـويـة » 123161
• المشـــاركـات » 2,970
• الـدولـة » https://t.me/pump_upp
• الـهـوايـة » Developer At Private Silkroad
• اسـم الـسـيـرفـر » Private Server
• الـجـنـس » Male
• نقـاط التقييم » 33
.Gamer. صـاعـد

.Gamer. متواجد حالياً


إرسال رسالة عبر ICQ إلى .Gamer. إرسال رسالة عبر AIM إلى .Gamer. إرسال رسالة عبر Yahoo إلى .Gamer.

افتراضي رد: كل الكويري [Query] اللي هتحتاجة هنا ♥



موضوع قديم

يغلق ##


توقيع .Gamer. :
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]


موضوع مغلق


يتصفح الموضوع حالياً : 1 (0 عضو و 1 زائر)
 

ضوابط المشاركة
تستطيع إضافة مواضيع جديدة
تستطيع الرد على المواضيع
تستطيع إرفاق ملفات
تستطيع تعديل مشاركاتك

BB code متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى الردود آخر مشاركة
كل الكويري Query اللي هتحتاجة هنا ♥ ™Ozoo-Eboda™ أرشـيـف الـمـواضـيـع الـمـمـيـزة 20 19-08-2024 11:42 PM
كل الكويري [Query] اللي هتحتاجة هنا ♥ ™Ozoo-Eboda™ قسم المواضيع المكررة و المخالفة 1 28-09-2018 04:04 PM
♥♥♥♥♥♥♥♥♥♥ طريقه جديده للكتابه بالعربي بسرعا ♥♥♥♥♥♥♥♥♥♥ ahmedamin99 بـعـيـدآ عـن سـيـلـك رود 42 28-03-2010 07:41 PM
♥♥♥♥♥♥♥♥ ألـــف لـــيــلـــة و لـــيـــلـــة ( حلقات اذاعية ) ♥♥♥♥♥♥♥♥ HeRoE بـعـيـدآ عـن سـيـلـك رود 6 21-11-2009 06:01 PM


الساعة الآن 11:34 PM.