• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Add new Item Drop

Experienced Elementalist
Joined
Jul 1, 2012
Messages
215
Reaction score
83
Credits to Hean
PHP:
SET @DropRatio		=	0.9
USE '' . '' NOT USE '' , '' in ' 0.9 '


PHP:
USE/**/[SRO_VT_SHARD]/**/
--Credits to Hean
/*Edited By nukertube*/
GO
DECLARE @Mob VarChar(MAX),@Item VarChar(MAX),@MonsterID iNt,@ItemID iNt,@DropRatio ReaL, @DropAmountMin INT, @DropAmountMax INT
--------------------------------------------------------------------------
SET @Mob			=	'MOB_TQ_WHITESNAKE'/*Monster Code*/
SET @Item			=	'ITEM_MALL_GLOBAL_CHATTING'/*Item Code*/
SET @DropAmountMin	=	10 /*Drop Min*/
SET @DropAmountMax	=	50 /*Drop Max*/
SET @DropRatio		=	0.9 /*0.5 = '50%' */
--------------------------------------------------------------------------
SET @MonsterID	=	(SELECT ID FROM [dbo].[_RefObjCommon] WHERE CodeName128 = @Mob)/**/
SET @ItemID		=	(SELECT ID FROM [dbo].[_RefObjCommon] WHERE CodeName128 = @Item)/**/
INSERT [dbo].[_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(@MonsterID,@ItemID,0,0,@DropAmountMin,@DropAmountMax,@DropRatio,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'xxx')/**/
 
Experienced Elementalist
Joined
Aug 7, 2009
Messages
257
Reaction score
12
Very useful query. Thanks to Hean I came up with a check before update. If record exist; update value rate; else add new record.

Code:
 USE SRO_VT_SHARD
GO

DECLARE @MonsterID int
DECLARE @ItemID int
DECLARE @DropRatio real

SET @MonsterID = XX
SET @DropRatio = XX
SET @ItemID = XX

If exists(select * from _RefMonster_AssignedItemDrop where RefMonsterID = @MonsterID and RefItemID = @ItemID)
update _RefMonster_AssignedItemDrop set DropRatio = @DropRatio where RefMonsterID = @MonsterID and RefItemID = @ItemID

else

INSERT _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(@MonsterID , @ItemID, 0, 0, 1, 1, @DropRatio, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 , 0 , 'xxx')
 
Master Summoner
Joined
Nov 9, 2009
Messages
579
Reaction score
238
took long enough for someone to release a query for it but you could have used the CodeName128 of mobs and items also i would suggest to use _RefMonster_AssignedItemRndDrop along with _RefDropItemGroup if you want to add d13 drops for example
 
Initiate Mage
Joined
Feb 21, 2014
Messages
1
Reaction score
0
esto sirve para mob y únicos Normales pero lo intente para HAROEIS, SHET, Y ROC y no parecen estar ligados a esas tablas...
Alguien podría ayudar con una consulta para ellos o donde están las tablas de drop para esos mob...

This only serves to mob and try to Normal but Haroeis, SHET, and ROC and not appear to be linked to those tables ...
Someone could help with a query for them or where to drop these tables are mob ...
 
Newbie Spellweaver
Joined
Oct 31, 2013
Messages
8
Reaction score
0
about adding an item to a mob can anyone please explain how and what i should open step by step in SQL and like SRO_VT_SHARD_INIT
GO where should i open this and how can i add something like this

SET @MonsterID = 24082 -- You can find Monster ID's at RefObjCommon
SET DropRatio = 0.00004 -- 100% = 1 / 50% = 0.5 / 0% = 0 of course
SET @ItemID = 3851 -- You can find Item ID'
s at RefObjCommon

i am new with this so please need some help here
 
Back
Top