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
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.
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 ?
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?
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 :)
Re: [SQL] auto free Silk/Hour based on the Online time (System)
GJ !
imported , testing right now !
Re: [SQL] auto free Silk/Hour based on the Online time (System)
Quote:
Originally Posted by
TryToMakeServer
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.
Re: [SQL] auto free Silk/Hour based on the Online time (System)
will someone shares a guide to work 100% please
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.
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".
Re: [SQL] auto free Silk/Hour based on the Online time (System)
Quote:
Originally Posted by
asianking
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.
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
http://www.jaypac.de/upload/710359crazyshot_3.png
whats the problem ? :P
Re: [SQL] auto free Silk/Hour based on the Online time (System)
Quote:
Originally Posted by
InPanic Kev
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
http://www.jaypac.de/upload/710359crazyshot_3.png
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.
http://i.imgur.com/Xo7VvTc.png
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.
Re: [SQL] auto free Silk/Hour based on the Online time (System)
Worked for 3 weeks and the suddenly stopped after 3 weeks.
http://i.imgur.com/1UCIinB.png
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?