DECLARE @CHARNAME VARCHAR (30) DECLARE @NPCNAME VARCHAR (30) DECLARE @ADDNEW VARCHAR (30) DECLARE @GROUPNUMBER VARCHAR (30) DECLARE @GROUPNEW VARCHAR (30) SET @CHARNAME = '[GM] TIEKO' --U Char Name 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+@GROUPNEW) 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