Query, send itens to all

Results 1 to 13 of 13
  1. #1
    Account Upgraded | Title Enabled! magraopb is online now
    MemberRank
    May 2007 Join Date
    BrazilLocation
    742Posts

    note Query, send itens to all

    anyone have that?
    i'm doing a web tool and need this to function, in future i'll release this webtool for all here (queh finish)

    Thanks


  2. #2
    Proficient Member MOT7 is offline
    MemberRank
    Jan 2013 Join Date
    SomewhereLocation
    187Posts

    Re: Query, send itens to all

    i didn't had time to make a fully search on that but i got an idea in the first 5 minutes:

    just use the dbo.cabal_character_table and list all characterIdx in an array/list (what ever you prefer). then use one of the dbo.send_mail procedures and save your itemId and optionId before. after that, send the mail to all characterIdx's listed in your array.
    should work that way.
    not a perfect solution, but it should work and it's easy to implement before you find any better...

    Greetings
    MOT7

  3. #3
    Account Upgraded | Title Enabled! magraopb is online now
    MemberRank
    May 2007 Join Date
    BrazilLocation
    742Posts

    Re: Query, send itens to all

    yes, it's a trick, can works... but ONE account will receive items x Characters, isn't good
    maybe using your idea, we can adapte this under UserNum and not CharacterIdx

  4. #4
    ANTI emi is offline
    MemberRank
    Mar 2009 Join Date
    ZHLocation
    1,378Posts

    Re: Query, send itens to all

    with minimum SQL knowledge you can do this. Google is your friend.

  5. #5
    Account Upgraded | Title Enabled! magraopb is online now
    MemberRank
    May 2007 Join Date
    BrazilLocation
    742Posts

    Re: Query, send itens to all

    thank you for the hypocrite answer

  6. #6
    Proficient Member MOT7 is offline
    MemberRank
    Jan 2013 Join Date
    SomewhereLocation
    187Posts

    Re: Query, send itens to all

    Quote Originally Posted by magraopb View Post
    yes, it's a trick, can works... but ONE account will receive items x Characters, isn't good
    maybe using your idea, we can adapte this under UserNum and not CharacterIdx
    then change the base of your sql statement. don't try to get all characterIdx, just try to get all userNums by using dbo.cabal_auth_table in ACCOUNT database. use this for the array and then maybe use a different procedure to send the mail to all accounts instead of all characters.

    Greetings
    MOT7

  7. #7
    Account Upgraded | Title Enabled! magraopb is online now
    MemberRank
    May 2007 Join Date
    BrazilLocation
    742Posts

    Re: Query, send itens to all

    yes MOT, thanks, i'm looking for this, like i said in above post and incrementing your idea

  8. #8
    Cya nerds PunkS7yle is offline
    MemberRank
    Feb 2010 Join Date
    1,448Posts

    Re: Query, send itens to all

    chumpy posted a sp ages ago, search for it.

  9. #9
    Alpha and Omega Xc0deRed93 is offline
    MemberRank
    Jul 2010 Join Date
    331Posts

    Re: Query, send itens to all

    Made by Chumpy.

    Code:
    USE [CabalCash]
    GO
    /****** Object:  Table [dbo].[FreeItemLog]    Script Date: 12/17/2009 18:35:17 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[FreeItemLog](
        [idx] [bigint] IDENTITY(1,1) NOT NULL,
        [UserNum] [int] NOT NULL,
        [ItemIdx] [int] NOT NULL,
        [ItemOpt] [int] NOT NULL,
        [DurationIdx] [int] NOT NULL,
        [Claimed] [datetime] NOT NULL
    ) ON [PRIMARY]

    Code:
    Purpose: Gives a free item to new chars, but only 1 per account (not 1 per char)
    Author: mrmagoo (chumpy)
    
    
    Installation:
    
    Run the query in "free items db table.txt" on the CabalCash database to add the new table.
    
    Edit cabal_sp_newchar (gamedb->programmability->stored procedures)
    
    
    Find:
            ----------------------------------------------------------------------------------------------
    
            -- ??? 0xA1 ~ 0xA6
            drop table #tempTable
    
    
    Insert after:
    
            -- #### Free items only given once per account ####
            declare @ItemIdx int, @ItemOpt int,@DurationIdx int
    
            -- Configure your free item here
            set @ItemIdx=1
            set @ItemOpt=0
            set @DurationIdx=31
    
            if(not exists (select * from cabalcash.dbo.FreeItemLog where UserNum=@userNum and ItemIdx=@ItemIdx and ItemOpt=@ItemOpt and DurationIdx=@DurationIdx))
            begin
            insert into CabalCash.dbo.MyCashItem ( UserNum, TranNo, ServerIdx, ItemKindIdx, ItemOpt, DurationIdx )
            values (@UserNum, 1, @ServerIdx, @ItemIdx, @ItemOpt, @DurationIdx )
            insert into cabalcash.dbo.FreeItems ( UserNum, ItemIdx, ItemOpt, DurationIdx, Claimed )
            values (@userNum,@ItemIdx,@ItemOpt,@DurationIdx,GetDate())
            end
            -- #### Ends free items ####
    
            
    Uninstallation:
    
    Delete the marked section.

  10. #10
    Account Upgraded | Title Enabled! magraopb is online now
    MemberRank
    May 2007 Join Date
    BrazilLocation
    742Posts

    Re: Query, send itens to all

    @Xc0deRed93

    Thanks for the code, i search but don't found him, i'll try this and return with results
    Thanks!

    EDIT:
    @Xc0deRed93
    This code give item to all "new character, one per account", so, player can do
    an fake account, take the iten how many he want.

    i'm looking for give item ONLY run the query

    i'll try more times here

    Thanks
    Last edited by magraopb; 30-03-13 at 01:34 AM.

  11. #11
    Proficient Member bsitmark is offline
    MemberRank
    Sep 2012 Join Date
    166Posts

    Re: Query, send itens to all

    Quote Originally Posted by magraopb View Post
    @Xc0deRed93

    Thanks for the code, i search but don't found him, i'll try this and return with results
    Thanks!

    EDIT:
    @Xc0deRed93
    This code give item to all "new character, one per account", so, player can do
    an fake account, take the iten how many he want.

    i'm looking for give item ONLY run the query

    i'll try more times here

    Thanks
    i think you could do 1 item per ip? because if you use 1 items per account its obviously abused, at ragnarok we just select the items we give and we put a restricted, like non dropable non tradable in short account binded. and you must select the items you should give, i think the best giveaway on cabal is pet or sets that binded.

  12. #12
    Account Upgraded | Title Enabled! magraopb is online now
    MemberRank
    May 2007 Join Date
    BrazilLocation
    742Posts

    Re: Query, send itens to all

    yes, already think about bind items, but under IP, isn't a good idea because some players are playing in Lan Houses

  13. #13
    Proficient Member bsitmark is offline
    MemberRank
    Sep 2012 Join Date
    166Posts

    Re: Query, send itens to all

    Quote Originally Posted by magraopb View Post
    yes, already think about bind items, but under IP, isn't a good idea because some players are playing in Lan Houses
    then bind items with selected items no op items for freebies...



Advertisement