Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[SQL] Query to add Unique spot very fast

Initiate Mage
Joined
Sep 29, 2012
Messages
3
Reaction score
0
Msg 8106, Level 16, State 1, Line 25
Table 'Tab_RefTactics' does not have the identity property. Cannot perform SET operation.
 
Newbie Spellweaver
Joined
Dec 20, 2012
Messages
6
Reaction score
1
its also the

Msg 102, Level 15, State 1, Line 9
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 9
Incorrect syntax near 'dwNestID'.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '+'.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '+'.
Msg 137, Level 15, State 2, Line 27
Must declare the scalar variable "@MAXTACTICS".
Msg 137, Level 15, State 2, Line 32
Must declare the scalar variable "@MAXHIVE".
Msg 137, Level 15, State 2, Line 44
Must declare the scalar variable "@MAXNEST".

in my query =(

i looked into all sites but there is no answer to anyone heere
 
Experienced Elementalist
Joined
Nov 22, 2011
Messages
255
Reaction score
111
its also the

Msg 102, Level 15, State 1, Line 9
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 9
Incorrect syntax near 'dwNestID'.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '+'.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '+'.
Msg 137, Level 15, State 2, Line 27
Must declare the scalar variable "@MAXTACTICS".
Msg 137, Level 15, State 2, Line 32
Must declare the scalar variable "@MAXHIVE".
Msg 137, Level 15, State 2, Line 44
Must declare the scalar variable "@MAXNEST".

in my query =(

i looked into all sites but there is no answer to anyone heere

SQL version is 2005 or 2008 R2 ??!!
 
Newbie Spellweaver
Joined
Dec 5, 2012
Messages
14
Reaction score
0
To know all its works only in sql 2008 r2 only

and use your = Brain.exe

its works for me
 
Newbie Spellweaver
Joined
Dec 5, 2012
Messages
14
Reaction score
0
"To Know all" > this including me ?!!!!! :)
1st Best Regards From Me Bro For Share This Query
2nd The One He Cannot Use This is Very Lazy To Follow the Tutorial He Make..
3rd not Including You

You are the Sharing the query

Best Regard From Me
 
Last edited:
Newbie Spellweaver
Joined
Dec 20, 2012
Messages
6
Reaction score
1
Hey Guys,

i edited the Code from Arabianfox a little bit, so it will work for ppl who have SQL2005 or some else.
It isnt complex like his one but it works fine =)


Credits go to Arabianfox for this nice Query !!!!! I only edited !!!

Query 1 To findout Monster ID:
PHP:
/****** Script for Select Object info from RefObjCommon Table by Luuk  ******/
SELECT TOP 1000 [ID]
      ,[CodeName128]
  FROM [SRO_VT_SHARD_INIT].[dbo].[_RefObjCommon]
  WHERE [CodeName128] like '%TIGERWOMAN%'



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

Query 2 to find out TacticsID from Monster with the ID you found with the code below:
PHP:
/****** Script for Select ID`s command from Tactics Table by Luuk  ******/
SELECT TOP 1000 [dwObjID]
      ,[dwTacticsID]
  FROM [SRO_VT_SHARD_INIT].[dbo].[Tab_RefTactics]
  WHERE [dwObjID] like '1954' -- Type in ID of a Monster from _RefObjCommon



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

Dont forget to stay the Character at the place where you want to spawn it and log it out before you do all !!!
Ok, now you got all needed Information.

Lets Start with query 3 (Add the Spot to the game):
PHP:
USE SRO_VT_SHARD_INIT /* Add Unique Spot By Arabianfox */ ----> Updated by Luuk <----

DECLARE @CHARNAME VARCHAR (64) 
DECLARE @mindealy INT 
DECLARE @maxdelay int 
DECLARE @INITRADIUS INT 
DECLARE @RADIUS int
DECLARE @TACTICS int
DECLARE @Amount int 

/* put your settings here */ 
SET @CHARNAME = 'CHARNAME' -- Character name from _Char table you logged off, to get mob position X Y Z 
SET @mindealy = 10800  -- Minimum time before appears in seconds 
SET @maxdelay = 21500  -- Maximum time before appears in seconds 
SET @INITRADIUS = 600  -- Radius around spot unique can generated at 
SET @RADIUS = 700  -- Radius around spot Unique can move in 
SET @Amount = 1	-- XX Times this Unique will appear max (i only checked 1 -20)
SET @TACTICS = 33 -- give in dwTacticsID (You will find it in Tab_RefTactics 33 = TigerWoman) 
/* end of settings area */ 

/* 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)

INSERT INTO Tab_RefNest 
(
dwHiveID,
dwTacticsID,
nRegionDBID,
fLocalPosX,
fLocalPosY,
fLocalPosZ,
wInitialDir,
nRadius,
nGenerateRadius,
nChampionGenPercentage,
dwDelayTimeMin,
dwDelayTimeMax,
dwMaxTotalCount,
btFlag,
btRespawn,
btType
)
VALUES 
(105,@TACTICS,@REGION,@POSX,@POSY,@POSZ,0,@RADIUS,@INITRADIUS,0,@mindealy,@maxdelay,@Amount,0,1,0)

print 'Done! Restart Server and Uniq/Mob will spawn there !'





AGAIN!!!! Credits go to Arabianfox !!!!!!!


I only edited for those who got errors like:
PHP:
Msg 102, Level 15, State 1, Line 9
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 9
Incorrect syntax near 'dwNestID'.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '+'.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '+'.
Msg 137, Level 15, State 2, Line 27
Must declare the scalar variable "@MAXTACTICS".
Msg 137, Level 15, State 2, Line 32
Must declare the scalar variable "@MAXHIVE".
Msg 137, Level 15, State 2, Line 44
Must declare the scalar variable "@MAXNEST".
 
Newbie Spellweaver
Joined
Dec 20, 2012
Messages
6
Reaction score
1
Sorry , was an double Post
 
Last edited:
Newbie Spellweaver
Joined
Mar 1, 2008
Messages
50
Reaction score
0
How to make 3-4 Spawnpoints for ONE unique? Now i got 4 spawnpoints and 4 uniques.
 
Junior Spellweaver
Joined
Jan 14, 2013
Messages
167
Reaction score
59
Nexus2oo7

use the dwhiveid and dwtacticsid from the previous uniques and simply run this crap
PHP:
use SRO_VT_SHARD
declare @charname varchar (50)
set @charname = 'Royalblade'
declare @dwnestID int
set @dwnestID = (select top 1 dwnestID from Tab_RefNest order by dwNestID desc)+1
declare @region  int
declare @curx  int
declare @cury  int
declare @curz int
set @region = (select LatestRegion from _char where charname16 = @Charname)
set @curx = (select posx from _char where charname16 = @Charname)
set @cury = (select posy from _char where charname16 = @Charname)
set @curz = (select posz from _char where charname16 = @Charname)

insert Tab_RefNest (dwNestID, dwHiveID, dwTacticsID, nRegionDBID, fLocalPosX, fLocalPosY, fLocalPosZ, wInitialDir, nRadius, nGenerateRadius, nChampionGenPercentage, dwDelayTimeMin, dwDelayTimeMax, dwMaxTotalCount, btFlag, btRespawn, btType)
values (@dwnestID, YOUR DWHIVEID HERE,your dwtacticsid here, @Region, @curx, @cury, @curz, 1000, 1000, 200, 0, 18000, 23000, 1, 0, 1, 0)
 
Junior Spellweaver
Joined
Sep 24, 2013
Messages
107
Reaction score
0
Is there anything i need add into media ? i added in the unique it stand it has spawn but i cant see any unique there i put the cords o_O
 
Initiate Mage
Joined
Dec 23, 2013
Messages
3
Reaction score
0
ty if i want descent in a specific time hourly every day How can I, for example, every day at 20:00
 
Back
Top