thnx so helpfull
thnx so helpfull
Little help ?
where change 1 h > 5 h give
and 1 sılk change 20 sılk ?
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:
I tried a declare with IF ELSE, but i failed, can some one Help me :P ?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
Last edited by Nohduen; 22-05-13 at 03:20 AM.
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.
on executing :sp_AddLogChar
i get this message..
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 18
Incorrect syntax near ')'.
how to do to claim the silk obtained by hours online user
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.
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_*******"
I checked everything also the databse names but no changes.
If it work for everybody else why you think it doesn't work for you ?
Maybe it doesnt work with mssql 2012
Well can't give opinion here, tested on 2008 R2 only... Try installing it and test :)
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(s) Online
2013-07-13 23:05:20.890 80 80 0 80 minute(s) Online
2013-07-13 23:05:30.353 80 80 0 80 minute(s) Online
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.617Ok 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.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*/
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.