Change NPC Place

01/19/2015 07:17 Little Messi#1
as title said, how can i change NPC Place
maybe a query by char name, or manually
some one can help me with it ?!
01/19/2015 09:22 PlantiX#2
1. Open _RefObjCommon, get the ID of the NPC.
2. Open _RefTactics -> paste the ID of the NPC and copy the Nest ID
3. Open RefNest -> change the coordinates

Done, gl
01/19/2015 10:17 Crue*#3
or just use that query

PHP Code:
declare @npcname varchar(128)
DECLARE @
CHARNAME VARCHAR (64
set @npcname 'CODENAMENPC'
SET @CHARNAME 'test' -- Character name from _Char table to get mob position X Y Z 
DECLARE @REGION INT SET @REGION = (SELECT (LatestRegionFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSX INT SET @POSX = (SELECT (POSXFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSY INT SET @POSY = (SELECT (POSYFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSZ INT SET @POSZ = (SELECT (POSZFROM _Char WHERE CharName16 = @CHARNAME
UPDATE Tab_RefNest set nRegionDBID = @REGIONfLocalPosX = @posxfLocalPosY = @posyfLocalPosZ = @posz where dwTacticsID = (select dwTacticsID from Tab_RefTactics where dwObjID = (select ID from _RefObjCommon where CodeName128 = @npcname )) 
01/19/2015 17:54 Little Messi#4
Quote:
Originally Posted by Crue* View Post
or just use that query

PHP Code:
declare @npcname varchar(128)
DECLARE @
CHARNAME VARCHAR (64
set @npcname 'CODENAMENPC'
SET @CHARNAME 'test' -- Character name from _Char table to get mob position X Y Z 
DECLARE @REGION INT SET @REGION = (SELECT (LatestRegionFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSX INT SET @POSX = (SELECT (POSXFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSY INT SET @POSY = (SELECT (POSYFROM _Char WHERE CharName16 = @CHARNAME
DECLARE @
POSZ INT SET @POSZ = (SELECT (POSZFROM _Char WHERE CharName16 = @CHARNAME
UPDATE Tab_RefNest set nRegionDBID = @REGIONfLocalPosX = @posxfLocalPosY = @posyfLocalPosZ = @posz where dwTacticsID = (select dwTacticsID from Tab_RefTactics where dwObjID = (select ID from _RefObjCommon where CodeName128 = @npcname )) 
that's the query result ..

[Only registered and activated users can see links. Click Here To Register...]
01/19/2015 17:56 WickedNite.#5
Queries....just do it manually like PlantiX said.
01/19/2015 18:02 Crue*#6
Quote:
Originally Posted by Little Messi View Post
that's the query result ..

[Only registered and activated users can see links. Click Here To Register...]
change it from STORE to NPC

Quote:
Originally Posted by TheWickedNite View Post
Queries....just do it manually like PlantiX said.
Queries always do most of the work :D
01/19/2015 18:41 MissinGDeaTh#7
Quote:
Originally Posted by Crue* View Post
change it from STORE to NPC



Queries always do most of the work :D

same thing

[Only registered and activated users can see links. Click Here To Register...]
01/19/2015 19:05 Little Messi#8
Quote:
Originally Posted by PlantiX View Post
1. Open _RefObjCommon, get the ID of the NPC.
2. Open _RefTactics -> paste the ID of the NPC and copy the Nest ID
3. Open RefNest -> change the coordinates

Done, gl
i'm a little lost here, Paste the ID of NPC where exactly :S

Quote:
Originally Posted by MissinGDeaTh View Post
same thing

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
01/19/2015 20:17 Crue*#9
are you sure that the codename in refobjcommon ?
01/19/2015 20:24 Little Messi#10
Quote:
Originally Posted by Crue* View Post
are you sure that the codename in refobjcommon ?
i did searched for it and here's the result

[Only registered and activated users can see links. Click Here To Register...]
01/19/2015 20:33 Crue*#11
Quote:
Originally Posted by Little Messi View Post
i did searched for it and here's the result

[Only registered and activated users can see links. Click Here To Register...]
so try this one,

PHP Code:
Declare @trcid as varchar (MAX)
Declare @
NPC as varchar (200)
Declare @
ref as varchar (250)
Declare @
as varchar (250)
Declare @
as varchar (250)
Declare @
as varchar (250)
Declare @
region as varchar (250)
Declare @
app as varchar (250)
Declare @
char as varchar (MAX)

Set @char 'xxx'      
Set @NPC 'NPC_LEGENDKNIGHT10' 
-----------------------------------------------------------------------------------
Set @= (Select PosX From _Char Where CharName16 = @char)
Set @= (Select PosY From _Char Where CharName16 = @char)
Set @= (Select PosZ From _Char Where CharName16 = @char)
Set @region = (Select LatestRegion From _Char Where CharName16 = @char)
Set @app = (Select AppointedTeleport From _Char Where CharName16 = @char)
set @trcid = (Select dwTacticsID from Tab_RefTactics where dwObjID = (Select ID from _RefObjCommon where CodeName128 = @NPC ))
UPDATE Tab_RefNest set fLocalPosX = @fLocalPosY = @fLocalPosZ = @nRegionDBID = @region ,wInitialDir = @app where dwTacticsID = @trcid 
01/19/2015 20:42 Little Messi#12
Quote:
Originally Posted by Crue* View Post
so try this one,

PHP Code:
Declare @trcid as varchar (MAX)
Declare @
NPC as varchar (200)
Declare @
ref as varchar (250)
Declare @
as varchar (250)
Declare @
as varchar (250)
Declare @
as varchar (250)
Declare @
region as varchar (250)
Declare @
app as varchar (250)
Declare @
char as varchar (MAX)

Set @char 'xxx'      
Set @NPC 'NPC_LEGENDKNIGHT10' 
-----------------------------------------------------------------------------------
Set @= (Select PosX From _Char Where CharName16 = @char)
Set @= (Select PosY From _Char Where CharName16 = @char)
Set @= (Select PosZ From _Char Where CharName16 = @char)
Set @region = (Select LatestRegion From _Char Where CharName16 = @char)
Set @app = (Select AppointedTeleport From _Char Where CharName16 = @char)
set @trcid = (Select dwTacticsID from Tab_RefTactics where dwObjID = (Select ID from _RefObjCommon where CodeName128 = @NPC ))
UPDATE Tab_RefNest set fLocalPosX = @fLocalPosY = @fLocalPosZ = @nRegionDBID = @region ,wInitialDir = @app where dwTacticsID = @trcid 
i rly appreciate that you are helping me, and am sorry for your waste of time. take a look at this :/

[Only registered and activated users can see links. Click Here To Register...]
01/19/2015 20:51 Crue*#13
it was working before change the npc spot ?
01/19/2015 20:54 Little Messi#14
Quote:
Originally Posted by Crue* View Post
it was working before change the npc spot ?
ye it was working, but don't worry about that i alrdy got a back up and i restore it, but query didn't worked yet :/
01/19/2015 21:01 Crue*#15
Quote:
Originally Posted by Little Messi View Post
ye it was working, but don't worry about that i alrdy got a back up and i restore it, but query didn't worked yet :/
so you've to do it manually