Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Remove Drop in Monster

Newbie Spellweaver
Joined
Oct 14, 2011
Messages
75
Reaction score
26
Release ? nice joke thats just a "low query" and why you need 2 Querys ? just SET the CodeName and done ...

Code:
USE SRO_VT_SHARD 

declare @ItemID int ,  [USER=12100]codename[/USER] varchar(128)

SET  [USER=12100]codename[/USER] = 'xxx' -- Item CodeName
SET @ItemID = (SELECT ID from _RefObjCommon where CodeName128 =  [USER=12100]codename[/USER])
-- Delete the select Item from all Monsters !!!
DELETE FROM _RefMonster_AssignedItemDrop where RefitemID = @ItemID

Mods should remove so unless threads .... :wink:
 
Newbie Spellweaver
Joined
Jan 30, 2013
Messages
20
Reaction score
1
Release ? nice joke thats just a "low query" and why you need 2 Querys ? just SET the CodeName and done ...

Code:
USE SRO_VT_SHARD 

declare @ItemID int ,  @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I] varchar(128)

SET  @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I] = 'xxx' -- Item CodeNam
SET @ItemID = (SELECT ID from _RefObjCommon where CodeName128 =  @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I])
-- Delete the select Item from all Monsters !!!
DELETE FROM _RefMonster_AssignedItemDrop where RefitemID = @ItemID

Mods should remove so unless threads .... :wink:

i love it if people say "hey u a noob" and release a query with the same skilllevel

Code:
USE sro_tw_shard

DECLARE @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I] varchar(129) = 'xxx', --Enter Item / Monster Codename
        @[I][B][URL="http://forum.ragezone.com/members/1333375725.html"]Type[/URL][/B][/I] tinyint = 1, --Set Type (1 = Item , 2 = Monster)
        @[I][B][URL="http://forum.ragezone.com/members/18171.html"]ReF[/URL][/B][/I]ID INT

    SELECT @[I][B][URL="http://forum.ragezone.com/members/18171.html"]ReF[/URL][/B][/I]ID = ID FROM _RefObjCommon WHERE CodeName128 = @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I]
    IF @[I][B][URL="http://forum.ragezone.com/members/1333375725.html"]Type[/URL][/B][/I] BETWEEN 1 AND 2
    BEGIN
        --########################################
        --Delete Item Drops (Type 1)
        --########################################
        IF @[I][B][URL="http://forum.ragezone.com/members/1333375725.html"]Type[/URL][/B][/I]=1
        BEGIN
        UPDATE _RefDropItemAssign SET Service=0 WHERE RefItemID @[I][B][URL="http://forum.ragezone.com/members/18171.html"]ReF[/URL][/B][/I]ID
        DELETE FROM _RefMonster_AssignedItemDrop WHERE RefItemID = [USER=18171]ReF[/USER]ID
        PRINT 'Selected item deleted from all monsters!'
        END
    
        --########################################
        --Delete Item Drops (Type 2)
        --########################################
        IF @[I][B][URL="http://forum.ragezone.com/members/1333375725.html"]Type[/URL][/B][/I] = 2
        BEGIN
        DELETE FROM _RefMonster_AssignedItemDrop WHERE RefMonsterID @[I][B][URL="http://forum.ragezone.com/members/18171.html"]ReF[/URL][/B][/I]ID
        PRINT 'All items from selected monster deleted!'
        END
    END
    
    ELSE
    BEGIN
    PRINT 'Please select a valid Type:'
    PRINT 'Type 1 = Delete selected item from all Monsters'
    PRINT 'Type 2 = Delete all items from selected Monster'
    END
@InPanic Kev: ich würde mich schämen sowas zu "releasen"
 
Last edited:
Newbie Spellweaver
Joined
Oct 14, 2011
Messages
75
Reaction score
26
@yxc001

Ich glaube ich muss dir hier nix beweissen oder sonstiges es geht hier nur darum das das hier kein Release ist ... und gelöscht gehört , den Query welchen ich gepostet habe macht genau das gleiche was auch oben steht nur in einem ....

Was du da aber gepostet hast ist 1. ein fehlerhafter Query sowie löscht er alles aus : _RefMonster_AssignedItemDrop , und wenn du schon so cool machst warum muss man dann den Type selbst setzen ? geht auch Automatisch wenn man will ... also was willst du eigentlich ? hier solltest wohl eher du dich schämen ;)

LG Kev
 
Newbie Spellweaver
Joined
Jan 30, 2013
Messages
20
Reaction score
1
@yxc001

Ich glaube ich muss dir hier nix beweissen oder sonstiges es geht hier nur darum das das hier kein Release ist ... und gelöscht gehört , den Query welchen ich gepostet habe macht genau das gleiche was auch oben steht nur in einem ....

Was du da aber gepostet hast ist 1. ein fehlerhafter Query sowie löscht er alles aus : _RefMonster_AssignedItemDrop , und wenn du schon so cool machst warum muss man dann den Type selbst setzen ? geht auch Automatisch wenn man will ... also was willst du eigentlich ? hier solltest wohl eher du dich schämen ;)

LG Kev

sure its possible to make it without type:

SELECT @TypeID = TypeID1 FROM _RefObjCommon WHERE CodeName128 = @codename

IF @TypeID = 1 --Monster
BEGIN

END

IF @TypeID = 3 --Items
BEGIN

END

ELSE --Incorrect Codename
BEGIN

END

and btw my query is the query which delete all items u entered, if u wanna remove for example a D11 Nova Items u can only find it in _RefDropItemAssign so my query is correct ;)

and jup it delete all from _RefMonster_AssignedItemDrop just forgot the WHERE clause


;)
this cant happen if i wont waste too much time to write a queriy for release

but your query is the perfect example that you leave it if it works

Code:
DECLARE @[I][B][URL="http://forum.ragezone.com/members/1333445324.html"]vari[/URL][/B][/I]able1 INT
SET @[I][B][URL="http://forum.ragezone.com/members/1333445324.html"]vari[/URL][/B][/I]able1 = 0

--now mine

DECLARE @[I][B][URL="http://forum.ragezone.com/members/1333414472.html"]Var[/URL][/B][/I]iable1 INT = 0

--or

SET @[I][B][URL="http://forum.ragezone.com/members/1333445324.html"]vari[/URL][/B][/I]able1 = (SELECT Variable FROM _Table)

--vs

SELECT @[I][B][URL="http://forum.ragezone.com/members/1333445324.html"]vari[/URL][/B][/I]able1 = Variable FROM _Table

this is not important here but if u write more complex queries its everytime better to keep the query slim

example SELECT * FROM SRO_VT_ACCOUNT.DBO.TB_User vs SELECT * FROM SRO_VT_ACCOUNT..TB_User

SET RemainGold=RemainGold+100 | SET RemainGold+=100

this is all think to make the query slim, clear, and if u have only 1 Schema in SRO_VT_ACCOUNT..TB_User then its faster
 
Last edited:
Newbie Spellweaver
Joined
Feb 20, 2014
Messages
22
Reaction score
3
Release ? nice joke thats just a "low query" and why you need 2 Querys ? just SET the CodeName and done ...

Code:
USE SRO_VT_SHARD 

declare @ItemID int ,  @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I] varchar(128)

SET  @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I] = 'xxx' -- Item CodeName
SET @ItemID = (SELECT ID from _RefObjCommon where CodeName128 =  @[I][B][URL="http://forum.ragezone.com/members/12100.html"]codename[/URL][/B][/I])
-- Delete the select Item from all Monsters !!!
DELETE FROM _RefMonster_AssignedItemDrop where RefitemID = @ItemID

Mods should remove so unless threads .... :wink:

Lol why should i use this long query , look at mine it's better and easier
DELETE FROM _RefMonster_AssignedItemDrop where RefitemID Like (select id from _refobjcommon where codename128 like 'ITEM_CODE')
 
Back
Top