[SQL] auto free Silk/Hour based on the Online time (System)

Page 8 of 10 FirstFirst 12345678910 LastLast
Results 106 to 120 of 145
  1. #106
    Valued Member Hex1337 is offline
    MemberRank
    Sep 2012 Join Date
    100Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    thnx so helpfull

  2. #107
    Apprentice qalli is offline
    MemberRank
    Mar 2012 Join Date
    11Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)


    Little help ?

  3. #108
    SilkRoad loveme is offline
    MemberRank
    Sep 2011 Join Date
    JanganLocation
    498Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    where change 1 h > 5 h give

    and 1 sılk change 20 sılk ?

  4. #109
    Novice Nohduen is offline
    MemberRank
    Mar 2013 Join Date
    4Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    Can someone Tell me how I can make an Maximum amount of Silks, Like if some have 350 Silks thats the Script dont give him more

    I think i can change it Here:
    WHEN @totalMinutes >= (SELECT [Step3Silk] FROM [_Silk/Hour-Config] WHERE [Desc] like 'Requirements')
    THEN (SELECT [Step3Silk] FROM [_Silk/Hour-Config] WHERE [Desc] like 'Rates')
    WHEN @totalMinutes >= (SELECT [Step2Silk] FROM [_Silk/Hour-Config] WHERE [Desc] like 'Requirements')
    THEN (SELECT [Step2Silk] FROM [_Silk/Hour-Config] WHERE [Desc] like 'Rates')
    WHEN @totalMinutes >= (SELECT [Step1Silk] FROM [_Silk/Hour-Config] WHERE [Desc] like 'Requirements')
    THEN (SELECT [Step1Silk] FROM [_Silk/Hour-Config] WHERE [Desc] like 'Rates')
    ELSE (SELECT DefaultSilk FROM [_Silk/Hour-Config] WHERE [Desc] like 'Rates')
    END
    I tried a declare with IF ELSE, but i failed, can some one Help me :P ?
    Last edited by Nohduen; 22-05-13 at 03:20 AM.

  5. #110
    Member heeysam is offline
    MemberRank
    May 2013 Join Date
    71Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    I did everything like in the toturial, and I see in the OnlineOffline table that I should have 4 silk now but I just don't get the silk. also, the Randomplayer&date always is the same person. Please help.

  6. #111
    Enthusiast Abdo Ahmed is offline
    MemberRank
    Jun 2013 Join Date
    44Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    on executing :sp_AddLogChar
    i get this message..

    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 18
    Incorrect syntax near ')'.

  7. #112
    Account Upgraded | Title Enabled! infor is offline
    MemberRank
    Mar 2011 Join Date
    277Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    how to do to claim the silk obtained by hours online user

  8. #113
    Valued Member LordCloud is offline
    MemberRank
    May 2012 Join Date
    131Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    For some unknown reason it dont work. I did everything like you said. Time wen higher than 300min and no reset and no silk ammount. Sometimes it works and time change to 0 but no silk adding.

  9. #114
    Proficient Member pr0xy1337 is offline
    MemberRank
    Aug 2012 Join Date
    182Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    It works like charm, for sure something wrong in ur SPs, check everywhere database names. They are not only in the beginning

    "USE SRO_VT_*******"

  10. #115
    Valued Member LordCloud is offline
    MemberRank
    May 2012 Join Date
    131Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    I checked everything also the databse names but no changes.

  11. #116
    Proficient Member pr0xy1337 is offline
    MemberRank
    Aug 2012 Join Date
    182Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    If it work for everybody else why you think it doesn't work for you ?

  12. #117
    Valued Member LordCloud is offline
    MemberRank
    May 2012 Join Date
    131Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    Maybe it doesnt work with mssql 2012

  13. #118
    Proficient Member pr0xy1337 is offline
    MemberRank
    Aug 2012 Join Date
    182Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    Well can't give opinion here, tested on 2008 R2 only... Try installing it and test :)

  14. #119
    Valued Member LordCloud is offline
    MemberRank
    May 2012 Join Date
    131Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    Always the same result :*(
    hope that someone can help.
    SQL-Version 2012
    I already have checked every sinngle statement and i dont find an error.

    PHP Code:
    Date    Minutes    tMinutes    eSilk    mOnline
    2013
    -07-13 23:05:14.280    80    80    0    80 minute(sOnline
    2013
    -07-13 23:05:20.890    80    80    0    80 minute(sOnline
    2013
    -07-13 23:05:30.353    80    80    0    80 minute(sOnline 

  15. #120
    Valued Member LordCloud is offline
    MemberRank
    May 2012 Join Date
    131Posts

    Re: [SQL] auto free Silk/Hour based on the Online time (System)

    Ok script is working.
    The script runs normaly. The Minutes, tMinutes, mOnline and stillOnline is updated nearly every second.
    But first after teleport of character the procedure runs into this part:
    (The first line at tablesnippet is not portet till now and the second portet some times)
    Code:
    Minutes	tMinutes	eSilk	mOnline			stillOnline@
    673	673		0	673 minute(s) Online	2013-07-15 10:40:10.617
    13	673		11	673 minute(s) Online	2013-07-15 10:40:10.617
    Code:
    /*Calculation of the silk amount*/
        Declare @tMinutes bigint = (SELECT [Minutes] from _OnlineOffline WHERE CharID = @CharID), @Silk int;
        
            IF (@tMinutes >= 60)
                BEGIN
                    SET @Silk = CAST(((SELECT [Minutes] FROM _OnlineOffline WHERE CharID = @CharID) / 60) as int)
                    UPDATE _OnlineOffline
                    SET [Minutes] = [Minutes] % 60
                    WHERE CharID = @CharID
                    
                IF exists (SELECT [WEEKDAYS] FROM [_Silk/Hour-Config] WHERE [WEEKDAYS] like DATENAME(WEEKDAY, GETDATE()))
                    BEGIN
                        UPDATE _OnlineOffline
                        SET [eSilk] = [eSilk] + (@Silk*[Silk/Hour])
                        WHERE CharID = @CharID
                        
                        exec SRO_VT_ACCOUNT.dbo._extraSilk @CharID, @Silk
                    END
                END
        /*!Calc*/
    Ok the script is correct. I did more analyses. At the moment when the procedure runs and the char still is online the charID isn't set. That's why he don't jumps into that part. Because he can't set tMinutes.
    The Other query which runs before is just updating all result where status = "Online". That's why this works normaly and the if(@tMinutes >= 60) part not.
    Maybe i can rewrite it a bit so it always check if the time is greater that 60 minutes.
    Than it should be correct display of the rewarded silk after 1 port and not 2.
    Last edited by LordCloud; 15-07-13 at 03:28 PM.



Advertisement