Register for your free account! | Forgot your password?

You last visited: Today at 18:42

  • Please register to post and access all features, it's quick, easy and FREE!


Need Query For Add new Npc

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2014
Posts: 200
Received Thanks: 25
Need Query For Add new Npc

i try alot of query and alot of manually added tutorial i loock google regzone all forum epvp and i can.t found good query .
Error is in Tab_Refhive is code on or something like this ... Idk what is , i try solve but no work.

Add manually i add but after restart server gameserver.exe no open ..

I really need query for add new npc if some one know or want hellp me pm me on facebook if want or reply here or in private messaje please

Facebook --> https://m.facebook.com/CostyBaa



seriouscos is offline  
Old 01/12/2016, 16:44   #2
 
elite*gold: 0
Join Date: Jan 2016
Posts: 81
Received Thanks: 15
NPC

PHP Code:
DECLARE @CHARNAME VARCHAR (30
DECLARE @
NPCNAME VARCHAR (30
DECLARE @
ADDNEW VARCHAR (30
DECLARE @
GAMEWORDID INT 
SET 
@CHARNAME 'DW' --U Char Name 
SET 
@NPCNAME '1' --U NPC NAME 
SET 
@GAMEWORDID --IMPORTANTGET GAMEWORLD ID FROM THE LOCALY U WANT ADD THE NPC NORMAL CITYs 
SET 
@ADDNEW 'NPC' 
-- 
IF @
ADDNEW 'NPC' BEGIN 
DECLARE @MAXLINK VARCHAR (30) = (SELECT MAX (IDFROM _RefObjChar)+
DECLARE @MAXCOMMONID VARCHAR (30) = (SELECT MAX (IDFROM _RefObjCommon)+
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,LinkVALUES 
(1,@MAXCOMMONID,'NPC_'[email protected]NPCNAME,'xxx','xxx','SN_NPC_'[email protected]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,LinkVALUES 
(@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 (IDFROM _RefShop)+
INSERT INTO _RefShop 
(Service,Country,ID,CodeName128,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128
VALUES (1,15,@ShopID,'STORE_'[email protected]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 (IDFROM _RefShopGroup)+
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_'[email protected]NPCNAME,'NPC_'[email protected]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 (GROUPIDFROM _RefShopItemGroup)+
INSERT INTO _RefShopItemGroup 
(Service,GroupID,CodeName128,StrID128_Group
VALUES (1,@ShopItemID,'STORE_'[email protected]NPCNAME+'_GROUP1','SN_STORE_'[email protected]NPCNAME+'_GROUP1'
SET IDENTITY_INSERT _RefShopItemGroup OFF 
SET IDENTITY_INSERT _RefShopTab ON 
DECLARE @ShopTabID VARCHAR (30)= (SELECT MAX (IDFROM _RefShopTab)+
INSERT INTO _RefShopTab 
(Service,Country,ID,CodeName128,RefTabGroupCodeName,StrID128_Tab
VALUES (1,15,@ShopTabID,'STORE_'[email protected]NPCNAME+'_TAB1','STORE_'[email protected]NPCNAME+'_GROUP1','SN_TAB_WEAPON'
SET IDENTITY_INSERT _RefShopTab OFF 
SET IDENTITY_INSERT _RefShopTabGroup ON 
DECLARE @ShopTabGroupID VARCHAR (30) = (SELECT MAX (IDFROM _RefShopTabGroup)+
INSERT INTO _RefShopTabGroup 
(Service,Country,ID,CodeName128,StrID128_Group
VALUES (1,15,@ShopTabGroupID,'STORE_'[email protected]NPCNAME+'_GROUP1','SN_STORE_'[email protected]NPCNAME+'_GROUP1'
SET IDENTITY_INSERT _RefShopTabGroup OFF 
INSERT INTO _RefMappingShopGroup VALUES 
(1,15,'GROUP_STORE_'[email protected]NPCNAME,'STORE_'[email protected]NPCNAME
INSERT INTO _RefMappingShopWithTab VALUES (1,15,'STORE_'[email protected]NPCNAME,'STORE_'[email protected]NPCNAME+'_GROUP1'
DECLARE @
TACTICSID INT SET @TACTICSID = (SELECT MAX (dwTacticsIDFROM 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_'[email protected]NPCNAME
BEGIN
DECLARE @HIVEID INT  SET @HIVEID = (SELECT MAX (dwHiveIDFROM Tab_RefHive)+
INSERT INTO Tab_RefHive VALUES 
(@HIVEID,0,0,0,0,0,0,@GAMEWORDID,2,'NPC_'[email protected]NPCNAME
END
BEGIN
DECLARE @REGION VARCHAR (30SET @REGION = (SELECT (LatestRegionFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSX VARCHAR (30SET @POSX = (SELECT (POSXFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSY VARCHAR (30SET @POSY = (SELECT (POSYFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSZ VARCHAR (30SET @POSZ = (SELECT (POSZFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
NESTID INT SET @NESTID = (SELECT MAX (dwNestIDFROM Tab_RefNest)+
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    '[email protected]MAXCOMMONID+'    '[email protected]NPCNAME+'    xxx    xxx    '+'SN_NPC_'[email protected]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    '[email protected]SHOPID+'    '+'STORE_'[email protected]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    '[email protected]SHOPGROUPID+'    '+'GROUP_STORE_'[email protected]NPCNAME+'    '+'NPC_'[email protected]NPCNAME+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx' 
PRINT '' 
PRINT 'Add this line to shopgroupdata.txt @ server_dep\silkroad\textdata' 
PRINT '' 
PRINT '1    '[email protected]SHOPITEMID+'    '+'STORE_'[email protected]NPCNAME+'_GROUP1    '+'SN_STORE_'[email protected]NPCNAME+'_GROUP1' 
PRINT '' 
PRINT 'Add this line to refshoptab.txt @ server_dep\silkroad\textdata' 
PRINT '' 
PRINT '1    15    '[email protected]SHOPTABID+'    '+'STORE_'[email protected]NPCNAME+'_TAB1    '+'STORE_'[email protected]NPCNAME+'_GROUP1     SN_TAB_WEAPONS' 
PRINT '' 
PRINT 'Add this line to refshoptabgroup.txt @ server_dep\silkroad\textdata' 
PRINT '' 
PRINT '1    15    '[email protected]SHOPTABGROUPID+'    '+'STORE_'[email protected]NPCNAME+'_GROUP1    '+'SN_STORE_'[email protected]NPCNAME+'_GROUP1' 
PRINT '' 
PRINT 'Add this line to refmappingshopgroup.txt @ server_dep\silkroad\textdata' 
PRINT '' 
PRINT '1    15    '+'GROUP_STORE_'[email protected]NPCNAME+'    '+'STORE_'[email protected]NPCNAME 
PRINT '' 
PRINT 'Add this line to refmappingshopwithtab.txt @ server_dep\silkroad\textdata' 
PRINT '' 
PRINT '1    15    '+'STORE_'[email protected]NPCNAME+'    '+'STORE_'[email protected]NPCNAME+'_GROUP1' 
PRINT '' 
PRINT 'A New NPC Has ADD Succesfuly Restart U Server and Login in '[email protected]CHARNAME 
END 
F5 or execute it, once u did that, you'll get the lines for media, insert it straightly.


Supportlar is offline  
Old 01/12/2016, 17:15   #3
 
elite*gold: 0
Join Date: May 2014
Posts: 200
Received Thanks: 25
ok and me change just char name and npc name? in this query?
seriouscos is offline  
Reply



« How change STall maxim Gold? | Need Clean Db And Client 110. »

Similar Threads
[Release][Query] Query _InvCOS Items WITH _Char Connection
Ok, so i needed to write this query for a procedure im working on and not many people know how to connect the pet inventory table to the character...
1 Replies - SRO PServer Guides & Releases
NEED QUERY
NEED QUERY DELET UNIQ BY UNIQ NAME ( NOT DELET ALL UNIQ ) DELET FROM SERVER FOR EVER
3 Replies - SRO PServer Ask the Experts
[Suche]Query für "Alteklinge, Reichsklinge" &' Stichdolche NUR QUERY!
Ich weiß ich werd nervig aber ich suche die Query's für Alteklinge, Reichsklinge &' Strichdolche Why? Naya, weil ich in der DB i-wie nur...
1 Replies - Metin2 PServer - Discussions / Questions



All times are GMT +2. The time now is 18:42.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.