Hello all this is my first release and it's a remake of a other query in this one allows you only open the 3 tables and find more information of the monster.
and the second one you could edit things like this :
-- desired total count of mobs
-- desired minimum spawn delay
-- desired maximum spawn delay
I did not find one like this and wanted to make it easy for myself.
Since some monsters have 2 Id's this will find that also.
the second one.
I hope you like it
Have a good Day.
and the second one you could edit things like this :
-- desired total count of mobs
-- desired minimum spawn delay
-- desired maximum spawn delay
I did not find one like this and wanted to make it easy for myself.
Since some monsters have 2 Id's this will find that also.
Code:
USE SRO_VT_SHARD;
DECLARE @MOB VARCHAR(64);
DECLARE @NESTID INT;
DECLARE @HiveID INT;
SET @MOB = 'MOB_RM_WINGTRIBE_CLON'; -- mob name
-- Temporary table to hold Tactics IDs
CREATE TABLE #TacticsIDs (dwTacticsID INT);
-- Fetch all Tactics IDs based on MOB
INSERT INTO #TacticsIDs (dwTacticsID)
SELECT dwTacticsID
FROM Tab_RefTactics
WHERE dwObjID = (SELECT ID FROM _RefObjCommon WHERE Codename128 = @MOB);
-- Fetch and display information for each Tactics ID
DECLARE @CurrentTacticsID INT;
DECLARE TacticsCursor CURSOR FOR
SELECT dwTacticsID FROM #TacticsIDs;
OPEN TacticsCursor;
FETCH NEXT FROM TacticsCursor INTO @CurrentTacticsID;
WHILE @@FETCH_STATUS = 0
BEGIN
-- Fetch Nest ID based on Tactics ID
SET @NESTID = (SELECT TOP 1 dwNestID FROM Tab_RefNest WHERE dwTacticsID = @CurrentTacticsID);
-- Fetch Hive ID based on Tactics ID
SET @HiveID = (SELECT TOP 1 dwHiveID FROM Tab_RefNest WHERE dwTacticsID = @CurrentTacticsID);
-- Select detailed information from relevant tables
SELECT * FROM Tab_RefHive WHERE dwHiveID = @HiveID;
SELECT * FROM Tab_RefTactics WHERE dwTacticsID = @CurrentTacticsID;
SELECT * FROM Tab_RefNest WHERE dwTacticsID = @CurrentTacticsID;
FETCH NEXT FROM TacticsCursor INTO @CurrentTacticsID;
END;
CLOSE TacticsCursor;
DEALLOCATE TacticsCursor;
-- Drop temporary table
DROP TABLE #TacticsIDs;
Code:
USE SRO_VT_SHARD;
DECLARE @MOB VARCHAR(64);
DECLARE @NESTID INT;
DECLARE @HiveID INT;
DECLARE @MaxTotalCount INT;
DECLARE @DelayTimeMin INT;
DECLARE @DelayTimeMax INT;
SET @MOB = 'MOB_TK_BONELORD'; -- replace with your specific monster code name
SET @MaxTotalCount = 20; -- desired total count of mobs
SET @DelayTimeMin = 5; -- desired minimum spawn delay
SET @DelayTimeMax = 10; -- desired maximum spawn delay
-- Temporary table to hold Tactics IDs
CREATE TABLE #TacticsIDs (dwTacticsID INT);
-- Fetch all Tactics IDs based on MOB
INSERT INTO #TacticsIDs (dwTacticsID)
SELECT dwTacticsID
FROM Tab_RefTactics
WHERE dwObjID = (SELECT ID FROM _RefObjCommon WHERE Codename128 = @MOB);
-- Fetch and display information for each Tactics ID
DECLARE @CurrentTacticsID INT;
DECLARE TacticsCursor CURSOR FOR
SELECT dwTacticsID FROM #TacticsIDs;
OPEN TacticsCursor;
FETCH NEXT FROM TacticsCursor INTO @CurrentTacticsID;
WHILE @@FETCH_STATUS = 0
BEGIN
-- Fetch Nest ID based on Tactics ID
SET @NESTID = (SELECT TOP 1 dwNestID FROM Tab_RefNest WHERE dwTacticsID = @CurrentTacticsID);
-- Fetch Hive ID based on Tactics ID
SET @HiveID = (SELECT TOP 1 dwHiveID FROM Tab_RefNest WHERE dwTacticsID = @CurrentTacticsID);
-- Select detailed information from relevant tables
SELECT * FROM Tab_RefHive WHERE dwHiveID = @HiveID;
SELECT * FROM Tab_RefTactics WHERE dwTacticsID = @CurrentTacticsID;
SELECT * FROM Tab_RefNest WHERE dwTacticsID = @CurrentTacticsID;
-- Update the dwMaxTotalCount, dwDelayTimeMin, and dwDelayTimeMax fields
UPDATE Tab_RefNest
SET dwMaxTotalCount = @MaxTotalCount, -- Set the new number of mobs
dwDelayTimeMin = @DelayTimeMin, -- Set the new minimum spawn delay
dwDelayTimeMax = @DelayTimeMax -- Set the new maximum spawn delay
WHERE dwTacticsID = @CurrentTacticsID;
FETCH NEXT FROM TacticsCursor INTO @CurrentTacticsID;
END;
CLOSE TacticsCursor;
DEALLOCATE TacticsCursor;
-- Drop temporary table
DROP TABLE #TacticsIDs;
Have a good Day.