|
You last visited: Today at 14:23
Advertisement
[Release] 2 small queries
Discussion on [Release] 2 small queries within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
12/12/2014, 07:46
|
#1
|
elite*gold: 0
Join Date: May 2013
Posts: 1,447
Received Thanks: 1,044
|
[Release] 2 small queries
Adding total 254 lines in _RefHWANLevel
Code:
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')
Might add more later..
|
|
|
12/13/2014, 03:06
|
#2
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,310
Received Thanks: 6,470
|
#Approved
|
|
|
12/14/2014, 16:15
|
#3
|
elite*gold: 46
Join Date: Dec 2013
Posts: 1,273
Received Thanks: 860
|
krall release bro keep going till you hit the wall tralalala
love you menz MUAAAAAA
hahahaha :P
|
|
|
12/14/2014, 17:50
|
#4
|
elite*gold: 480
Join Date: Jan 2012
Posts: 655
Received Thanks: 579
|
Quote:
Originally Posted by Kaizen_
krall release bro keep going till you hit the wall tralalala
love you menz MUAAAAAA
hahahaha :P
|
qay.
|
|
|
12/15/2014, 22:52
|
#5
|
elite*gold: 0
Join Date: May 2013
Posts: 1,447
Received Thanks: 1,044
|
Trolls.. I am trying here to help the "community". But dats hopeless I swear.. :/
|
|
|
12/15/2014, 23:30
|
#6
|
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,654
|
wow the code bbcode is updated while i wasnt here
|
|
|
12/16/2014, 12:02
|
#7
|
elite*gold: 0
Join Date: May 2013
Posts: 1,447
Received Thanks: 1,044
|
Quote:
Originally Posted by sarkoplata
wow the code bbcode is updated while i wasnt here
|
Glad you are back WB
|
|
|
12/17/2014, 02:36
|
#8
|
elite*gold: 0
Join Date: Jul 2010
Posts: 206
Received Thanks: 23
|
i need query remove spaw mobs from jupiter etc city please help
|
|
|
12/17/2014, 13:15
|
#9
|
elite*gold: 0
Join Date: May 2013
Posts: 1,447
Received Thanks: 1,044
|
Quote:
Originally Posted by jhoan3d
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
|
|
|
12/17/2014, 15:14
|
#10
|
elite*gold: 0
Join Date: May 2014
Posts: 21
Received Thanks: 0
|
Great
|
|
|
12/17/2014, 23:06
|
#11
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
|
Quote:
Originally Posted by jhoan3d
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
|
|
|
12/17/2014, 23:30
|
#12
|
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
|
Quote:
Originally Posted by xExorcist
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
|
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
|
|
|
12/17/2014, 23:37
|
#13
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
|
Quote:
Originally Posted by Syloxx
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
|
***** please -_- , since there's only 1 ID for every codename there's no problem in using it..
|
|
|
12/17/2014, 23:39
|
#14
|
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
|
Quote:
Originally Posted by xExorcist
***** please -_- , since there's only 1 ID for every codename there's no problem in using it..
|
yes but why u use like then?
if i place something like MOB_CH% your query will give a error
smt like "a variable can only contain one value"
|
|
|
12/17/2014, 23:45
|
#15
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
|
Quote:
Originally Posted by Syloxx
yes but why u use like then?
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!
|
|
|
|
|
Similar Threads
|
[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
|
[ePic-ReLeAsE] Mob Queries ( 359 )
08/14/2009 - CO2 PServer Guides & Releases - 9 Replies
i aint releasing anything anymore,
|
All times are GMT +2. The time now is 14:23.
|
|