DECLARE @lvl varchar(5),
@titlech varchar(100),
@titleeu varchar(100)
SET @lvl = 7
WHILE (@lvl < 255)
BEGIN
SET @titlech = 'UIO_SECOND_HWAN_CH_NAME_LEVEL_' + @lvl
SET @titleeu = 'UIO_SECOND_HWAN_EU_NAME_LEVEL_' + @lvl
INSERT INTO _RefHwanLevel (HwanLevel, ParamFourcc1, ParamValue1, ParamFourcc2, ParamValue2, ParamFourcc3, ParamValue3, ParamFourcc4, ParamValue4, ParamFourcc5, ParamValue5, AssocFileObj128, Title_CH70, Title_EU70)
VALUES (@lvl, 1397769301, 200, 1145127506, 35,0,0,0,0,0,0,'xxx',@titlech,@titleeu)
SET @lvl = @lvl + 1
END
Item to mob drop
Code:
DECLARE @RefMonsterID INT,
@RefItemID INT,
@DropMin INT,
@DropMax INT,
@DropRatio INT,
@MobCodeName varchar(128),
@ItemCodeName varchar(128);
-- SETTINGS --
SET @MobCodeName = 'MonsterCodeName' --Which monster will drop the item
SET @ItemCodeName = 'ItemCodeName' --Which item you want to be dropped
SET @DropMin = 0 --Minimum items if it has to drop how many of them they will be
SET @DropMax = 0 --Maximum items if it has to drop how many of them they can be
SET @DropRatio = 1 -- Drop rate (based on % success/fail if it will drop or not the item that is added) 1 = 100% / 0.05 = 5% / 0.5 = 50%
-- SETTINGS --
SELECT @RefMonsterID = ID FROM _RefObjCommon with(NOLOCK) where CodeName128 = @MobCodeName
SELECT @RefItemID = ID FROM _RefObjCommon with(NOLOCK) where codename128 = @ItemCodeName
INSERT INTO _RefMonster_AssignedItemDrop (RefMonsterID,RefItemID,DropGroupType,OptLevel,DropAmountMin,DropAmountMax,DropRatio,RefMagicOptionID1,CustomValue1,RefMagicOptionID2,CustomValue2,RefMagicOptionID3,CustomValue3,RefMagicOptionID4,CustomValue4,RefMagicOptionID5,CustomValue5,RefMagicOptionID6,CustomValue6,RefMagicOptionID7,CustomValue7,RefMagicOptionID8,CustomValue8,RefMagicOptionID9,CustomValue9,RentCodeName) VALUES
(@RefMonsterID,@RefItemID,0,0,@DropMin,@DropMax,@DropRatio,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'xxx')
i need query remove spaw mobs from jupiter etc city please help
delete from Tab_refnest where dwTacticsID in (SELECT dwTacticsID FROM Tab_Reftactics where dwobjid in (select ID from _refobjcommon where codename128 like 'MOB_ARABIA%'))
this should work, if we assume that all the arabian mobs start with MOB_ARABIA
i need query remove spaw mobs from jupiter etc city please help
PHP Code:
Use this to remove anyshit from RefNest
USE SRO_VT_SHARD DECLARE @RefID int SELECT @RefID = R.dwTacticsID FROM Tab_RefTactics R JOIN _RefObjCommon O ON O.ID = R.dwObjID WHERE O.CodeName128 LIKE 'CodeName128'
DELETE FROM Tab_RefNest WHERE dwTacticsID = @RefID
Use this to remove anyshit from RefNest
USE SRO_VT_SHARD
DECLARE @RefID int
SELECT @RefID = R.dwTacticsID
FROM Tab_RefTactics R
JOIN _RefObjCommon O
ON O.ID = R.dwObjID
WHERE O.CodeName128 LIKE 'CodeName128'
DELETE FROM Tab_RefNest WHERE dwTacticsID = @RefID
never used DELETE and JOIN in 1 statement?
Code:
DECLARE @CodeName VARCHAR(129) = 'INSERT_CODENAME_HERE'
DELETE TRN
FROM Tab_RefTactics TRT
JOIN _RefObjCommon ROC
ON TRT.dwObjID = ROC.ID
JOIN Tab_RefNest TRN
ON TRT.dwTacticsID = TRN.dwTacticsID
WHERE ROC.CodeName128 LIKE @CodeName
DECLARE @CodeName VARCHAR(129) = 'INSERT_CODENAME_HERE'
DELETE TRN
FROM Tab_RefTactics TRT
JOIN _RefObjCommon ROC
ON TRT.dwObjID = ROC.ID
JOIN Tab_RefNest TRN
ON TRT.dwTacticsID = TRN.dwTacticsID
WHERE ROC.CodeName128 LIKE @CodeName
***** please -_- , since there's only 1 ID for every codename there's no problem in using it..
if i place something like MOB_CH% your query will give a error
smt like "a variable can only contain one value"
Okay then use = instead of like [problem solved] wasn't meant to be used for more than a value, why like? cuz I didn't remember any npc code so i used it @ mine while testing cuz i had a npc with smth like ;****; so i used LIKE '%****%', laziness ftw!
[Release] Useful queries for some people (Part I) 08/31/2013 - SRO PServer Guides & Releases - 14 Replies If you want certain character's mastery's at a certain level.. Input their name here, and set their skill level you desire.
USE
GO
--by Evo
Declare @CharName Varchar (64)
Set @CharName = 'BlackBerry'
[Release] Einige SQL Queries 06/30/2012 - Flyff PServer Guides & Releases - 6 Replies So Release hier mal paar queries die ich aus langeweile mal gemacht hatte.
Feedback und http://www.elitepvpers.com/forum/images/elitepvper s/buttons/post_thanks.gif gern gesehen^^
Items finden (per Item-ID bzw. Unique-ID)
DECLARE @item VARCHAR(32)
SET @item = '21'
---------------------------------
-- AB HIER NICHTS MEHR ÄNDERN! --
[Release]2010/11er Queries 09/18/2011 - Metin2 PServer Guides & Strategies - 4 Replies Moin :)
Da in letzter oft die Frage kommt "Warum funktionieren die Queries von den Reittieren / Korea Metins bei mir nicht?" habe ich fertige & funktionierende Queries gemacht.
Was war der Fehler?
Die Queries wurden auf 2007er Files gemacht & 2007er Files haben 6 Spalten weniger als 2010/11er Files.
Korea Metins