Quantcast
Channel: RaGEZONE - MMO Development Forums
Viewing all articles
Browse latest Browse all 15480

[QUERY] Unlink Item like Delete

$
0
0
Well this query unlink X Item from the Char like delete...
Example: If you give santa avatar for xmas only and you need quit or delete from the users this querys will help you...and is usefull :blush:


PD: This query not delete the item from DB Only unlink and the user lost the Item for ever.
i was lazzy to do complete deletion query..

PD2: This query is "INSTANT EXCECUTE" and no need wait like other query that i see..

If item in Grab Pet:

PHP Code:

DECLARE  @Item Varchar(99) -- 99 for who make a item like ITEM_ASKJGFIAUSGFJKASF_asGASGASDAASFASG_asGASGASG_ASGASG_m_1 Xd
SET 
@ITEM 'ITEM_ETC_HP_POTION_05' --<< ITEM TO UNLINK >>
UPDATE dbo._Invcos SET ItemID 0 WHERE ItemID IN (SELECT id64 FROM SHARD_DB.dbo._Items where RefItemID = (SELECT ID from _RefObjCommon where CodeName128 = @ITEM)) 

If item in Inventory:

PHP Code:

DECLARE  @Item Varchar(99) -- 99 for who make a item like ITEM_ASKJGFIAUSGFJKASF_asGASGASDAASFASG_asGASGASG_ASGASG_m_1 Xd
SET 
@ITEM 'ITEM_ETC_HP_POTION_05' --<< ITEM TO UNLINK >>
UPDATE _Inventory SET ItemID 0 WHERE ItemID IN (SELECT id64 FROM SHARD_DB.dbo._Items where RefItemID = (SELECT ID from _RefObjCommon where CodeName128 = @ITEM)) 

If item IS A AVATAR ONLY:

PHP Code:

DECLARE  @Item Varchar(99) -- 99 for who make a item like ITEM_ASKJGFIAUSGFJKASF_asGASGASDAASFASG_asGASGASG_ASGASG_m_1 Xd
SET 
@ITEM 'ITEM_ETC_HP_POTION_05' --<< ITEM TO UNLINK >>
UPDATE _InventoryForAvatar SET ItemID 0  WHERE ItemID IN (SELECT id64 FROM SHARD_DB.dbo._Items where RefItemID = (SELECT ID from _RefObjCommon where CodeName128 = @ITEM)) 

If item is Stored:

PHP Code:

DECLARE  @Item Varchar(99) -- 99 for who make a item like ITEM_ASKJGFIAUSGFJKASF_asGASGASDAASFASG_asGASGASG_ASGASG_m_1 Xd
SET 
@ITEM 'ITEM_ETC_HP_POTION_05' --<< ITEM TO UNLINK >>
UPDATE _Chest SET ItemID 0 WHERE ItemID IN (SELECT id64 FROM SHARD_DB.dbo._Items where RefItemID = (SELECT ID from _RefObjCommon where CodeName128 = @ITEM)) 

If item is in Guild Storage:

PHP Code:

DECLARE  @Item Varchar(99) -- 99 for who make a item like ITEM_ASKJGFIAUSGFJKASF_asGASGASDAASFASG_asGASGASG_ASGASG_m_1 Xd
SET 
@ITEM 'ITEM_ETC_HP_POTION_05' --<< ITEM TO UNLINK >>
UPDATE _GuildChest SET ItemID 0 WHERE ItemID IN (SELECT id64 FROM SHARD_DB.dbo._Items where RefItemID = (SELECT ID from _RefObjCommon where CodeName128 = @ITEM)) 

Like if work for you :D

Viewing all articles
Browse latest Browse all 15480

Latest Images

Trending Articles



Latest Images