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

Page 9 of 10 FirstFirst 12345678910 LastLast
Results 121 to 135 of 145
  1. #121
    Valued Member LordCloud is offline
    MemberRank
    May 2012 Join Date
    131Posts

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

    I have changed now the last query. Here is my result. Maybe someone can check it.
    Code:
     /* old Calculation of the silk amount*/
    	/* 
    	Declare @tMinutes bigint;
    	Declare @Silk int;
    	set @tMinutes = (SELECT [Minutes] from _OnlineOffline WHERE CharID = @CharID)
                   
        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 'Montag' or [WEEKDAYS] like 'Dienstag' or WEEKDAYS like 'Mittwoch' or WEEKDAYS like 'Donnerstag' or WEEKDAYS like 'Freitag' or WEEKDAYS like 'Samstag' or WEEKDAYS like 'Sonntag')
            BEGIN
                UPDATE _OnlineOffline
                SET [eSilk] = [eSilk] + (@Silk*[Silk/Hour])
                WHERE CharID = @CharID
                        
    				exec SRO_VT_ACCOUNT.dbo._extraSilk @CharID, @Silk
            END
        END
    	*/
    	/* new extansion */
    	declare @CharIDSS	 int;
    	Declare @Silk int;
    	declare cur CURSOR for
    		select CharID from _OnlineOffline
    		where Status = 'Online' and [Minutes] >= 60;
    	open cur
    	fetch next from cur into @CharIDSS
    	while @@FETCH_STATUS = 0 
    	BEGIN
    		SET @Silk = CAST(((SELECT [Minutes] FROM _OnlineOffline WHERE CharID = @CharIDSS) / 60) as int)
    		UPDATE _OnlineOffline
    		SET [Minutes] = [Minutes] % 60
    		WHERE CharID = @CharIDSS
    		IF exists (SELECT [WEEKDAYS] FROM [_Silk/Hour-Config] WHERE [WEEKDAYS] like 'Montag' or [WEEKDAYS] like 'Dienstag' or WEEKDAYS like 'Mittwoch' or WEEKDAYS like 'Donnerstag' or WEEKDAYS like 'Freitag' or WEEKDAYS like 'Samstag' or WEEKDAYS like 'Sonntag')
    		BEGIN
    			UPDATE _OnlineOffline
    			SET [eSilk] = [eSilk] + (@Silk*[Silk/Hour])
    			WHERE CharID = @CharIDSS
                        
    			exec SRO_VT_ACCOUNT.dbo._extraSilk @CharIDSS, @Silk
    		END
    	fetch next from cur into @CharIDSS
    	end
    	close cur
    	deallocate cur

  2. #122
    Account Upgraded | Title Enabled! TryToMakeServer is offline
    MemberRank
    Dec 2008 Join Date
    257Posts

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

    Well for me it doesnt work either.
    Time isnt counting, neither "Onhold" doesnt change to "Online".
    Also silk isnt loading, if I manual change "Onhold" to "Online", while the time is counting.
    Im using mssql 2008 r2.

    Thanks in advance, if somebody could help me out here.

  3. #123
    Valued Member LordCloud is offline
    MemberRank
    May 2012 Join Date
    131Posts

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

    You have to restart server to make everything fine.
    Maybe you missed something ?

  4. #124
    Account Upgraded | Title Enabled! TryToMakeServer is offline
    MemberRank
    Dec 2008 Join Date
    257Posts

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

    I had restarted agent, shard and gameserver once.

    I have looked into the txt files more than 8times.

    No idea whats wrong.

    Should I restart the mssql server aswell?

  5. #125
    Account Upgraded | Title Enabled! TryToMakeServer is offline
    MemberRank
    Dec 2008 Join Date
    257Posts

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

    So... I have reinstalled the whole host server.
    Installed a fresh copy of mssql 2008 R2.
    And it still doesnt work.
    I have no clue, I will give up from my side.
    If anyone knows a solution, thx in advance and bye :)

  6. #126
    Apprentice Omar Fouad is offline
    MemberRank
    Jul 2013 Join Date
    AlexLocation
    22Posts

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

    GJ !

    imported , testing right now !

  7. #127
    Proficient Member Royalblade is offline
    MemberRank
    Jan 2013 Join Date
    167Posts

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

    Quote Originally Posted by TryToMakeServer View Post
    Well for me it doesnt work either.
    Time isnt counting, neither "Onhold" doesnt change to "Online".
    Also silk isnt loading, if I manual change "Onhold" to "Online", while the time is counting.
    Im using mssql 2008 r2.

    Thanks in advance, if somebody could help me out here.
    if ur using a GS addon like evangelion or srzor... there is a function called: DisableLogs...
    you have it enabled.
    You NEEED logs for this to work.

  8. #128
    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)

    will someone shares a guide to work 100% please

  9. #129
    Enthusiast stele22 is offline
    MemberRank
    Jun 2013 Join Date
    NYC, NYLocation
    45Posts

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

    Worked like a charm until i deleted all user accounts. Since then it counts minutes and shows online/offline but dun get silk at all. Anyone have fix for that?

    EDIT: Tested on fresh server (110 based server), all queries were ok and it counts minutes and esilk but it dun give silk to chars.
    Last edited by stele22; 14-11-13 at 12:42 AM.

  10. #130
    Account Upgraded | Title Enabled! asianking is offline
    MemberRank
    Aug 2009 Join Date
    273Posts

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

    mines the opposite. i get silk but minute doesnt count. Always stated " You have played 0 hour".

  11. #131
    Enthusiast stele22 is offline
    MemberRank
    Jun 2013 Join Date
    NYC, NYLocation
    45Posts

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

    Quote Originally Posted by asianking View Post
    mines the opposite. i get silk but minute doesnt count. Always stated " You have played 0 hour".
    I get that 2 but still no silks on account. Worked whole night on that and i'm so close of giving u up on that. Reinstalled Server 2008 R2, SQL 2008 R2 and all files twice and it still don't work even tho it counts everything as is it should. No errors. And i don't even know why it worked in the first place, before i deleted all user accounts.

  12. #132
    Member InPanic Kev is offline
    MemberRank
    Oct 2011 Join Date
    GERMANYLocation
    76Posts

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

    Its so easy to make a Online System ..

    Just Log ( Online / Offline ) Players via ( _LogEventChar ) in a Table .. after this Check if the Online Count is >= 60 exec addSilk + Log



    whats the problem ? :P
    Last edited by InPanic Kev; 14-11-13 at 10:15 AM.

  13. #133
    Enthusiast stele22 is offline
    MemberRank
    Jun 2013 Join Date
    NYC, NYLocation
    45Posts

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

    Quote Originally Posted by InPanic Kev View Post
    Its so easy to make a Online System ..

    Just Log ( Online / Offline ) Players via ( _LogEventChar ) in a Table .. after this Check if the Online Count is >= 60 exec addSilk + Log



    whats the problem ? :P
    I've done it all over gain and it works now. I don't wanna touch anything in DB. If it works - dun change it.
    Question: how did you make that "you have earned 1 coin" thing?

    EDIT: Me again :/ Still don't work as it should. It counts esilk for some people and don't count for others. Also on server start everyone got 1 silk but after 1 hour no one got silk. What is wrong now? This sh!t is driving me crazy! I've checked DB like 10000 times and still can't find any errors in tables and sp's.

    Last edited by stele22; 14-11-13 at 12:42 PM.

  14. #134
    Account Upgraded | Title Enabled! asianking is offline
    MemberRank
    Aug 2009 Join Date
    273Posts

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

    if I check on database, I have the minute there... but in game, it doesn't show how many hour I played.

  15. #135
    Enthusiast stele22 is offline
    MemberRank
    Jun 2013 Join Date
    NYC, NYLocation
    45Posts

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

    Worked for 3 weeks and the suddenly stopped after 3 weeks.



    I've look at the logs and checked did anything happen on that time (4th of December at 23:43:44) and nothing happen' then. Is it safe for me to delete all tables related to silk/hour from db and drop them again? Or there is another solution? Forgot to mention that it doesn't count time, doesn't check online or offline... Anyone had problem like this?



Advertisement