Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 18:15

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

Advertisement



[Release] Query Change NPC Location With Charname | Easy,Fast,Controlled

Discussion on [Release] Query Change NPC Location With Charname | Easy,Fast,Controlled within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2016
Posts: 652
Received Thanks: 342
[Release] Query Change NPC Location With Charname | Easy,Fast,Controlled

straightly go,
1. Open _RefObjCommon, get the Code of the NPC.
2. Open Character ingame and go where you need the new location of the NPC, and Logout,
3. Open New Query,
PHP Code:
USE [SRO_VT_SHARD]
/*哈野浅哈.*/
DECLARE @NPCODE VARCHAR (129)
DECLARE @
CHARNAME VARCHAR (64)
DECLARE @
Z_X_Y_LOCATION INT
-->
/*West = -32767
South = -16384
Earth = 0
North = +16384*/
SET @NPCODE 'NPC_CodeName128' ----- Your Npc Name
SET 
@CHARNAME 'CharName16' ----- Charactar name where you Want to set npc ]
SET @Z_X_Y_LOCATION '-32767' -- West
Declare @AS1 int SET @AS1 = (SELECT ID FROM _RefObjCommon WHERE CodeName128 = @NPCODE)
Declare @
AS2 int SET @AS2 = (SELECT dwTacticsID FROM Tab_RefTactics WHERE dwObjID = @AS1)
Declare @
AS3 int SET @AS3 = (SELECT dwNestID FROM Tab_RefNest WHERE dwTacticsID = @AS2)
Declare @
ASpos1 int SET @ASpos1 = (SELECT latestregion FROM _char WHERE charname16 = @CHARNAME)
Declare @
ASpos2 int SET @ASpos2 = (SELECT posx FROM _char WHERE charname16 = @CHARNAME)
Declare @
ASpos3 int SET @ASpos3 = (SELECT posy FROM _char WHERE charname16 = @CHARNAME)
Declare @
ASpos4 int SET @ASpos4 = (SELECT posz FROM _char WHERE charname16 = @CHARNAME)
UPDATE Tab_RefNest
SET nregiondbid 
= @ASpos1,
flocalposx = @ASpos2,
flocalposy = @ASpos3,
flocalposz = @ASpos4,
wInitialDir = @Z_X_Y_LOCATION
WHERE dwnestid 
= @AS3 and dwtacticsid = @AS2 
EdwardTeach+- is offline  
Thanks
4 Users
Old 08/10/2016, 20:54   #2
 
X_Shadow's Avatar
 
elite*gold: 0
Join Date: Jan 2016
Posts: 42
Received Thanks: 6
Tnx
X_Shadow is offline  
Old 08/11/2016, 20:56   #3
 
Cosmic Pulse's Avatar
 
elite*gold: 0
Join Date: Aug 2016
Posts: 24
Received Thanks: 4
thanks for sharing but it's a little bit old
Cosmic Pulse is offline  
Old 08/11/2016, 22:27   #4
 
elite*gold: 0
Join Date: Feb 2016
Posts: 652
Received Thanks: 342
Quote:
Originally Posted by Cosmic Pulse View Post
thanks for sharing but it's a little bit old
well, if u check the query, a lil deeper, you 'll find it's modified
EdwardTeach+- is offline  
Old 01/26/2018, 11:44   #5
 
elite*gold: 0
Join Date: Sep 2017
Posts: 73
Received Thanks: 3
(0 row(s) affected)
pvperz ll is offline  
Old 04/16/2019, 23:57   #6
 
iAmAndrew's Avatar
 
elite*gold: 45
Join Date: Nov 2014
Posts: 239
Received Thanks: 46
Quote:
Originally Posted by EdwardTeach+- View Post
straightly go,
1. Open _RefObjCommon, get the Code of the NPC.
2. Open Character ingame and go where you need the new location of the NPC, and Logout,
3. Open New Query,
PHP Code:
USE [SRO_VT_SHARD]
/*哈野浅哈.*/
DECLARE @NPCODE VARCHAR (129)
DECLARE @
CHARNAME VARCHAR (64)
DECLARE @
Z_X_Y_LOCATION INT
-->
/*West = -32767
South = -16384
Earth = 0
North = +16384*/
SET @NPCODE 'NPC_CodeName128' ----- Your Npc Name
SET 
@CHARNAME 'CharName16' ----- Charactar name where you Want to set npc ]
SET @Z_X_Y_LOCATION '-32767' -- West
Declare @AS1 int SET @AS1 = (SELECT ID FROM _RefObjCommon WHERE CodeName128 = @NPCODE)
Declare @
AS2 int SET @AS2 = (SELECT dwTacticsID FROM Tab_RefTactics WHERE dwObjID = @AS1)
Declare @
AS3 int SET @AS3 = (SELECT dwNestID FROM Tab_RefNest WHERE dwTacticsID = @AS2)
Declare @
ASpos1 int SET @ASpos1 = (SELECT latestregion FROM _char WHERE charname16 = @CHARNAME)
Declare @
ASpos2 int SET @ASpos2 = (SELECT posx FROM _char WHERE charname16 = @CHARNAME)
Declare @
ASpos3 int SET @ASpos3 = (SELECT posy FROM _char WHERE charname16 = @CHARNAME)
Declare @
ASpos4 int SET @ASpos4 = (SELECT posz FROM _char WHERE charname16 = @CHARNAME)
UPDATE Tab_RefNest
SET nregiondbid 
= @ASpos1,
flocalposx = @ASpos2,
flocalposy = @ASpos3,
flocalposz = @ASpos4,
wInitialDir = @Z_X_Y_LOCATION
WHERE dwnestid 
= @AS3 and dwtacticsid = @AS2 

hey mate, i have use that query and works perfect, but dont know why some npcs i use that query appear this error

'' Msg 512, Level 16, State 1, Line 16
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

(0 row(s) affected) ''


any sugestion ?
iAmAndrew is offline  
Old 10/19/2019, 10:45   #7
 
elite*gold: 0
Join Date: Jun 2018
Posts: 43
Received Thanks: 7
Quote:
Originally Posted by iAmAndrew View Post
hey mate, i have use that query and works perfect, but dont know why some npcs i use that query appear this error

'' Msg 512, Level 16, State 1, Line 16
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

(0 row(s) affected) ''


any sugestion ?
contact
ServerSro is offline  
Reply


Similar Threads Similar Threads
[RELEASE] GCPH Fast 4th job change + easy journal hunting
01/12/2010 - Grand Chase Hacks, Bots, Cheats & Exploits - 86 Replies
Guys eto na hinihintay nyong fan_map para mapadali ang pagpa2 job nyo Note: kay craymel02 poh to dinagdagan ko lng .. so most of the credits goes to him.. features: all of craymel's fan_map features are here plus i added something to make journal hunting a lot easier. guys most of you pagkatapos mag quest hunting ay pumupunta sa trial forest para tapusin ang mga natitirang journal. It will took about 30 seconds using SD to completely finished the run. Kaya naman naisip...



All times are GMT +1. The time now is 18:15.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.