SQL Code: Search who has EXC Full Opts

Page 1 of 2 12 LastLast
Results 1 to 25 of 31
  1. #1
    Valued Member nkerz is offline
    MemberRank
    Dec 2004 Join Date
    Mu TownLocation
    106Posts

    SQL Code: Search who has EXC Full Opts

    This is a code I found in MG forum.

    It searchs for exc full item

    RUN THIS IN QUERY ANALYZER:
    select * from warehouse where (charindex (0xbf, items) %10=8) or (charindex (0xff, items) %10=8) or (charindex (0x7f, items) %10=8) or (charindex (0x3f, items) %10=8)
    select * from character where (charindex (0xbf, inventory) %10=8) or (charindex (0xff, inventory) %10=8) or (charindex (0x7f, inventory) %10=8) or (charindex (0x3f, inventory) %10=8)
    now, if you want to BLOCK char who have those items, u can change it a little bit:

    update character set CtlCode = '1' where (charindex (0xbf, inventory) %10=8) or (charindex (0xff, inventory) %10=8) or (charindex (0x7f, inventory) %10=8) or (charindex (0x3f, inventory) %10=8)
    this one only blocks who have those items in inventory.

    you can play with it a little bit, maybe if you manage some complete code (checking and banning all) you can release it in here


  2. #2
    Valued Member nkerz is offline
    MemberRank
    Dec 2004 Join Date
    Mu TownLocation
    106Posts
    let me correct one this in block code:
    update character set CtlCode = '1' where ((charindex (0xbf, inventory) %10=8) or (charindex (0xff, inventory) %10=8) or (charindex (0x7f, inventory) %10=8) or (charindex (0x3f, inventory) %10=8)) and (CtlCode <> '8')
    now it will block all except GMs
    ;)

  3. #3
    Valued Member nkerz is offline
    MemberRank
    Dec 2004 Join Date
    Mu TownLocation
    106Posts
    Ok, now I managed to code the 0x00000000 serial finder.

    VAULT CODE:
    DECLARE @Acc varchar(10), @Inv BINARY(1200), @ItemSerial BINARY(3), @Item BINARY(10), @cnt INTEGER
    DECLARE LISTA CURSOR LOCAL FOR
    SELECT AccountID FROM warehouse
    OPEN LISTA
    FETCH NEXT FROM LISTA INTO @Acc
    WHILE @@FETCH_STATUS = 0
    BEGIN
    SET @Inv = (SELECT items FROM [warehouse] WHERE (AccountID=@Acc))
    SET @cnt = 1
    WHILE (@cnt <= (LEN(@Inv)/2))
    BEGIN
    SET @Item = SUBSTRING(@Inv,@cnt,10)
    SET @ItemSerial = SUBSTRING(@Item,5,3)

    IF (@ItemSerial = 0x000000)
    BEGIN
    print 'Yep! We got a 0x0 serial!'
    print 'Account: '+@Acc
    print 'Item: '; print @Item
    print '--------------------------'
    END
    SET @cnt = @cnt + 10
    END
    FETCH NEXT FROM LISTA INTO @Acc
    END
    CLOSE LISTA
    DEALLOCATE LISTA
    INVENTORY CODE:
    DECLARE @Acc varchar(10), @Inv BINARY(760), @ItemSerial BINARY(3), @Item BINARY(10), @cnt INTEGER
    DECLARE LISTA CURSOR LOCAL FOR
    SELECT Name FROM Character
    OPEN LISTA
    FETCH NEXT FROM LISTA INTO @Acc
    WHILE @@FETCH_STATUS = 0
    BEGIN
    SET @Inv = (SELECT Inventory FROM [Character] WHERE (Name=@Acc))
    SET @cnt = 1
    WHILE (@cnt <= (LEN(@Inv)/2))
    BEGIN
    SET @Item = SUBSTRING(@Inv,@cnt,10)
    SET @ItemSerial = SUBSTRING(@Item,5,3)

    IF (@ItemSerial = 0x000000)
    BEGIN
    print 'Yep! We got a 0x0 serial!'
    print 'CharName: '+@Acc
    print 'Item: '; print @Item
    print '--------------------------'
    END
    SET @cnt = @cnt + 10
    END
    FETCH NEXT FROM LISTA INTO @Acc
    END
    CLOSE LISTA
    DEALLOCATE LISTA
    maybe later a write something to automatically remove those items from vault/inv.

    cya

  4. #4
    Alpha Member john_d is offline
    MemberRank
    Feb 2004 Join Date
    PhilippinesLocation
    2,868Posts
    actually this is wat i use...
    it will detect all those item that is impossible to be drop in the server...

    select * from warehouse
    where (charindex (0xbf, items) %10=8)
    or (charindex (0xff, items) %10=8)
    or (charindex (0x7f, items) %10=8)
    or (charindex (0x3f, items) %10=8)
    or (charindex (0x9f, items) %10=8)
    or (charindex (0x8f, items) %10=8)
    or (charindex (0x9e, items) %10=8)
    or (charindex (0x9d, items) %10=8)
    or (charindex (0xbd, items) %10=8)
    or (charindex (0xbc, items) %10=8)
    or (charindex (0xba, items) %10=8)
    or (charindex (0xbb, items) %10=8)
    or (charindex (0xb7, items) %10=8)
    or (charindex (0xaf, items) %10=8)
    select * from character
    where (charindex (0xbf, inventory) %10=8)
    or (charindex (0xff, inventory) %10=8)
    or (charindex (0x7f, inventory) %10=8)
    or (charindex (0x3f, inventory) %10=8)
    or (charindex (0x9f, inventory) %10=8)
    or (charindex (0x8f, inventory) %10=8)
    or (charindex (0x9e, inventory) %10=8)
    or (charindex (0x9d, inventory) %10=8)
    or (charindex (0xbd, inventory) %10=8)
    or (charindex (0xbc, inventory) %10=8)
    or (charindex (0xba, inventory) %10=8)
    or (charindex (0xbb, inventory) %10=8)
    or (charindex (0xb7, inventory) %10=8)
    or (charindex (0xaf, inventory) %10=8)

  5. #5
    Account Upgraded | Title Enabled! elche27 is offline
    MemberRank
    Dec 2004 Join Date
    TucumanLocation
    302Posts
    Well can some1 PLEASE explain how it work this line:

    (charindex (0xbf, inventory) %10=8)

    Why (0xbf, inventory)?? this part lead u to where....on SQL
    Why %10=8?

    The codes are erfect but nkerz or john_d, can u explain a little, please? Thank in advance!

  6. #6
    TitansTech / SCFMT bet0x is offline
    MemberRank
    Mar 2004 Join Date
    /dev/nullLocation
    840Posts
    Nice work, very nice querys to all :D

    This is my simple interface to MG Dupe Detector on wharehouses... , its a little noob, but works for get a list and count how many dupes by account and block code status...


    SELECT DISTINCT
    COUNT(CopyLog.copy_acid) AS Dupes, CopyLog.copy_acid AS Existe, MEMB_INFO.bloc_code AS [Estado [Bloqueado 1/0]]],
    MEMB_INFO.memb___id AS Usuario, [Character].Name AS Personaje
    FROM MEMB_INFO INNER JOIN
    CopyLog ON MEMB_INFO.memb___id = CopyLog.copy_acid COLLATE Chinese_PRC_CS_AS INNER JOIN
    [Character] ON CopyLog.copy_acid = [Character].Name
    GROUP BY CopyLog.copy_acid, MEMB_INFO.bloc_code, MEMB_INFO.memb___id, [Character].Name, CopyLog.copy_acid
    ORDER BY CopyLog.copy_acid DESC, COUNT(CopyLog.copy_acid) DESC

  7. #7
    Account Upgraded | Title Enabled! Pinoyrealm is offline
    MemberRank
    Jan 2007 Join Date
    Walter MartLocation
    969Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Just want to ask if somebody made Query that work in Season 2, i mean to find those items greater than 2 options

  8. #8
    Account Upgraded | Title Enabled! themad is offline
    MemberRank
    Dec 2004 Join Date
    BulgariaLocation
    1,018Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Quote Originally Posted by -Jumong- View Post
    Just want to ask if somebody made Query that work in Season 2, i mean to find those items greater than 2 options
    I gues that would be me
    Code:
    select * from warehouse
    where (charindex (0xbf, items) %16=8)
    or (charindex (0xff, items) %16=8)
    or (charindex (0x7f, items) %16=8)
    or (charindex (0x3f, items) %16=8)
    or (charindex (0x9f, items) %16=8)
    or (charindex (0x8f, items) %16=8)
    or (charindex (0x9e, items) %16=8)
    or (charindex (0x9d, items) %16=8)
    or (charindex (0xbd, items) %16=8)
    or (charindex (0xbc, items) %16=8)
    or (charindex (0xba, items) %16=8)
    or (charindex (0xbb, items) %16=8)
    or (charindex (0xb7, items) %16=8)
    or (charindex (0xaf, items) %16=8)
    select * from extwarehouse
    where (charindex (0xbf, items) %16=8)
    or (charindex (0xff, items) %16=8)
    or (charindex (0x7f, items) %16=8)
    or (charindex (0x3f, items) %16=8)
    or (charindex (0x9f, items) %16=8)
    or (charindex (0x8f, items) %16=8)
    or (charindex (0x9e, items) %16=8)
    or (charindex (0x9d, items) %16=8)
    or (charindex (0xbd, items) %16=8)
    or (charindex (0xbc, items) %16=8)
    or (charindex (0xba, items) %16=8)
    or (charindex (0xbb, items) %16=8)
    or (charindex (0xb7, items) %16=8)
    or (charindex (0xaf, items) %16=8)
    select * from character
    where (charindex (0xbf, inventory) %16=8)
    or (charindex (0xff, inventory) %16=8)
    or (charindex (0x7f, inventory) %16=8)
    or (charindex (0x3f, inventory) %16=8)
    or (charindex (0x9f, inventory) %16=8)
    or (charindex (0x8f, inventory) %16=8)
    or (charindex (0x9e, inventory) %16=8)
    or (charindex (0x9d, inventory) %16=8)
    or (charindex (0xbd, inventory) %16=8)
    or (charindex (0xbc, inventory) %16=8)
    or (charindex (0xba, inventory) %16=8)
    or (charindex (0xbb, inventory) %16=8)
    or (charindex (0xb7, inventory) %16=8)
    or (charindex (0xaf, inventory) %16=8)
    njoy

  9. #9
    Valued Member mayojung is offline
    MemberRank
    Oct 2005 Join Date
    THLocation
    103Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    i want script change my COLLATE

    all table do you have ?

    sorry my bad english

  10. #10
    Account Upgraded | Title Enabled! themad is offline
    MemberRank
    Dec 2004 Join Date
    BulgariaLocation
    1,018Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Quote Originally Posted by mayojung View Post
    i want script change my COLLATE

    all table do you have ?

    sorry my bad english
    change the ccollate of what ?? and to what ?

  11. #11
    Account Upgraded | Title Enabled! Pinoyrealm is offline
    MemberRank
    Jan 2007 Join Date
    Walter MartLocation
    969Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Quote Originally Posted by themad View Post
    I gues that would be me
    Code:
    select * from warehouse
    where (charindex (0xbf, items) %16=8)
    or (charindex (0xff, items) %16=8)
    or (charindex (0x7f, items) %16=8)
    or (charindex (0x3f, items) %16=8)
    or (charindex (0x9f, items) %16=8)
    or (charindex (0x8f, items) %16=8)
    or (charindex (0x9e, items) %16=8)
    or (charindex (0x9d, items) %16=8)
    or (charindex (0xbd, items) %16=8)
    or (charindex (0xbc, items) %16=8)
    or (charindex (0xba, items) %16=8)
    or (charindex (0xbb, items) %16=8)
    or (charindex (0xb7, items) %16=8)
    or (charindex (0xaf, items) %16=8)
    select * from extwarehouse
    where (charindex (0xbf, items) %16=8)
    or (charindex (0xff, items) %16=8)
    or (charindex (0x7f, items) %16=8)
    or (charindex (0x3f, items) %16=8)
    or (charindex (0x9f, items) %16=8)
    or (charindex (0x8f, items) %16=8)
    or (charindex (0x9e, items) %16=8)
    or (charindex (0x9d, items) %16=8)
    or (charindex (0xbd, items) %16=8)
    or (charindex (0xbc, items) %16=8)
    or (charindex (0xba, items) %16=8)
    or (charindex (0xbb, items) %16=8)
    or (charindex (0xb7, items) %16=8)
    or (charindex (0xaf, items) %16=8)
    select * from character
    where (charindex (0xbf, inventory) %16=8)
    or (charindex (0xff, inventory) %16=8)
    or (charindex (0x7f, inventory) %16=8)
    or (charindex (0x3f, inventory) %16=8)
    or (charindex (0x9f, inventory) %16=8)
    or (charindex (0x8f, inventory) %16=8)
    or (charindex (0x9e, inventory) %16=8)
    or (charindex (0x9d, inventory) %16=8)
    or (charindex (0xbd, inventory) %16=8)
    or (charindex (0xbc, inventory) %16=8)
    or (charindex (0xba, inventory) %16=8)
    or (charindex (0xbb, inventory) %16=8)
    or (charindex (0xb7, inventory) %16=8)
    or (charindex (0xaf, inventory) %16=8)
    njoy
    Big thanks bro... I LOVE YOU!!!

  12. #12
    Valued Member mayojung is offline
    MemberRank
    Oct 2005 Join Date
    THLocation
    103Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Quote Originally Posted by themad View Post
    change the ccollate of what ?? and to what ?
    i can change to Thai_CI_AS all table

    please help me

  13. #13
    Account Upgraded | Title Enabled! Pinoyrealm is offline
    MemberRank
    Jan 2007 Join Date
    Walter MartLocation
    969Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    I run the query bro, and he gives me so many accounts and characters then i checked them using Czf Editor to see but they are items normal exc i mean not full option or items not greater than 2 option, i was thinking maybe you can fix some to give me accounts with greater than 2 option items

  14. #14
    Account Upgraded | Title Enabled! themad is offline
    MemberRank
    Dec 2004 Join Date
    BulgariaLocation
    1,018Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    try now
    Code:
    select * from warehouse where (charindex (0xff, items)%16=7)or (charindex (0x38, items)%16=7)or (charindex (0x3C, items)%16=7)or (charindex (0x3E, items)%16=7)or (charindex (0x3F, items)%16=7)or (charindex (0x3B, items)%16=7)or (charindex (0x39, items)%16=7)or (charindex (0x2B, items)%16=7)or (charindex (0x0B, items)%16=7)or (charindex (0x29, items)%16=7)or (charindex (0x28, items)%16=7)or (charindex (0x2A, items)%16=7)or (charindex (0x2E, items)%16=7)or (charindex (0x2C, items)%16=7)or (charindex (0x21, items)%16=7)or (charindex (0x07, items)%16=7)or (charindex (0x0F, items)%16=7)or (charindex (0x1E, items)%16=7)or (charindex (0x1D, items)%16=7)or (charindex (0x1C, items)%16=7)or (charindex (0x16, items)%16=7)or (charindex (0x17, items)%16=7)or (charindex (0x19, items)%16=7)or (charindex (0x7F, items)%16=7)
    select * from ExtWarehouse where (charindex (0xff, items)%16=7)or (charindex (0x38, items)%16=7)or (charindex (0x3C, items)%16=7)or (charindex (0x3E, items)%16=7)or (charindex (0x3F, items)%16=7)or (charindex (0x3B, items)%16=7)or (charindex (0x39, items)%16=7)or (charindex (0x2B, items)%16=7)or (charindex (0x0B, items)%16=7)or (charindex (0x29, items)%16=7)or (charindex (0x28, items)%16=7)or (charindex (0x2A, items)%16=7)or (charindex (0x2E, items)%16=7)or (charindex (0x2C, items)%16=7)or (charindex (0x21, items)%16=7)or (charindex (0x07, items)%16=7)or (charindex (0x0F, items)%16=7)or (charindex (0x1E, items)%16=7)or (charindex (0x1D, items)%16=7)or (charindex (0x1C, items)%16=7)or (charindex (0x16, items)%16=7)or (charindex (0x17, items)%16=7)or (charindex (0x19, items)%16=7)or (charindex (0x7F, items)%16=7)
    select * from Character where (charindex (0xff, Inventory)%16=7)or (charindex (0x38, Inventory)%16=7)or (charindex (0x3C, Inventory)%16=7)or (charindex (0x3E, Inventory)%16=7)or (charindex (0x3F, Inventory)%16=7)or (charindex (0x3B, Inventory)%16=7)or (charindex (0x39, Inventory)%16=7)or (charindex (0x2B, Inventory)%16=7)or (charindex (0x0B, Inventory)%16=7)or (charindex (0x29, Inventory)%16=7)or (charindex (0x28, Inventory)%16=7)or (charindex (0x2A, Inventory)%16=7)or (charindex (0x2E, Inventory)%16=7)or (charindex (0x2C, Inventory)%16=7)or (charindex (0x21, Inventory)%16=7)or (charindex (0x07, Inventory)%16=7)or (charindex (0x0F, Inventory)%16=7)or (charindex (0x1E, Inventory)%16=7)or (charindex (0x1D, Inventory)%16=7)or (charindex (0x1C, Inventory)%16=7)or (charindex (0x16, Inventory)%16=7)or (charindex (0x17, Inventory)%16=7)or (charindex (0x19, Inventory)%16=7)or (charindex (0x7F, Inventory)%16=7)
    i will write a better method..but need to finish smh first

  15. #15
    Account Upgraded | Title Enabled! HELL_IN_HEAVEN is offline
    MemberRank
    Apr 2006 Join Date
    BORACAY, PHILIPPINESLocation
    530Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    i tried, this dont work now with 1.02N version,

  16. #16
    Enthusiast progame3 is offline
    MemberRank
    Sep 2006 Join Date
    28Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Can u give me sql script ot program for finding who is bugging boxs with shadow bug ?

  17. #17
    Account Upgraded | Title Enabled! =Ady= is offline
    MemberRank
    Apr 2006 Join Date
    UnderworldLocation
    799Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    so anyone got a cod to search full opt items for 1.02n?

  18. #18
    Account Upgraded | Title Enabled! =Ady= is offline
    MemberRank
    Apr 2006 Join Date
    UnderworldLocation
    799Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    someone?

  19. #19
    Valued Member loberia is offline
    MemberRank
    Jul 2004 Join Date
    VenezuelaLocation
    100Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    nice work :P Work some SQL code work for me

  20. #20
    Valued Member Vengeful is offline
    MemberRank
    Jul 2007 Join Date
    BulgariaLocation
    138Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    a little problem:
    if the item has 16 opt or more this code cant find him...
    can some1 help?
    i want code who can find item full opt and opt+16+

  21. #21
    Account Upgraded | Title Enabled! =Ady= is offline
    MemberRank
    Apr 2006 Join Date
    UnderworldLocation
    799Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    so..anyone?

  22. #22
    Valued Member jim3481 is offline
    MemberRank
    Jul 2004 Join Date
    CaliforniaLocation
    122Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    I need serial finder script for 0.99.88T

  23. #23
    Apprentice xavi321 is offline
    MemberRank
    Dec 2008 Join Date
    22Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Quote Originally Posted by jim3481 View Post
    I need serial finder script for 0.99.88T
    try this for me is 10

    for Inventory
    select * from character where (charindex (0x02020202, Inventory) %16=4)
    for Warehouse
    select * from warehouse where (charindex (0x02020202, items) %10=4)
    where 02020202 is the serial

  24. #24
    Account Upgraded | Title Enabled! alijabari is offline
    MemberRank
    Sep 2006 Join Date
    IranLocation
    345Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    Quote Originally Posted by nkerz View Post
    let me correct one this in block code:


    now it will block all except GMs
    ;)
    1 question , im i the Admin on my server , if i give someone item full option becouse he is VIP in my server ... that mean i will block and that character ?

  25. #25
    The Fearless One Not4You is online now
    Super ModRank
    Oct 1973 Join Date
    3,270Posts

    Re: [Release] SQL Code: Search who has EXC Full Opts

    nice work :P Work some SQL code work
    btw its cool , i like it



Page 1 of 2 12 LastLast

Advertisement