Help for make a script for never 30 day's item

10/27/2015 13:38 Truth1010#16
Honestly, it could be any number of things. The fact that you are unable to actually understand what areas could be having troubles for this to work, means we are pretty much unable to help you.

All the info you are giving us to help is "It's not working" which doesn't help us at all. I suggest learning the systems of the game, and database better until you actually understand the very basics before trying to get things like this working without knowing how it is they actually should work.
10/27/2015 15:58 AxelMac#17
Quote:
Originally Posted by Truth1010 View Post
Honestly, it could be any number of things. The fact that you are unable to actually understand what areas could be having troubles for this to work, means we are pretty much unable to help you.

All the info you are giving us to help is "It's not working" which doesn't help us at all. I suggest learning the systems of the game, and database better until you actually understand the very basics before trying to get things like this working without knowing how it is they actually should work.
i'm no expert, but i know the game and all function that is take, now all problem that all get we can see in log, my log here are right, no have problem, i use sql 2012, ep 5.4 database and client, and use ps_game with itemmallfix

i have test and i have find that only with logout the database updates.
10/31/2015 08:47 wallerus#18
You could create a trigger instead that runs when character JoinDate is changed (login datetime). I remember I had the same issue you had (time is only updated on logout) with that script.
10/31/2015 11:54 nubness#19
I've been thinking of replying on this thread for a few days now, given that I'm still not sure if you guys fixed your issue or not.

Anyway, here's a super simple fix that took less than 10 minutes to code and test and will take care of your issue.

Code:
USE PS_GameData
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE usp_Read_Char_ApplySkills_R
	
	@CharID INT
	
AS
BEGIN
	
	SET NOCOUNT ON
	
	DECLARE @CharApplySkills TABLE
	(
		SkillID SMALLINT,
		SkillLevel TINYINT,
		LeftResetTime INT
	)
	
	INSERT @CharApplySkills
	SELECT SkillID, SkillLevel, LeftResetTime FROM CharApplySkills WHERE CharID = @CharID
	
	IF NOT EXISTS (SELECT 1 FROM @CharApplySkills WHERE SkillID = 286 AND SkillLevel = 3)
		INSERT @CharApplySkills (SkillID, SkillLevel, LeftResetTime) VALUES (286, 3, 2592000)
	ELSE UPDATE @CharApplySkills SET LeftResetTime = 2592000 WHERE SkillID = 286 AND SkillLevel = 3
	
	IF NOT EXISTS (SELECT 1 FROM @CharApplySkills WHERE SkillID = 225 AND SkillLevel = 1)
		INSERT @CharApplySkills (SkillID, SkillLevel, LeftResetTime) VALUES (225, 1, 2592000)
	ELSE UPDATE @CharApplySkills SET LeftResetTime = 2592000 WHERE SkillID = 225 AND SkillLevel = 1
	
	IF NOT EXISTS (SELECT 1 FROM @CharApplySkills WHERE SkillID = 227 AND SkillLevel = 1)
		INSERT @CharApplySkills (SkillID, SkillLevel, LeftResetTime) VALUES (227, 1, 2592000)
	ELSE UPDATE @CharApplySkills SET LeftResetTime = 2592000 WHERE SkillID = 227 AND SkillLevel = 1
	
	SELECT SkillID, SkillLevel, LeftResetTime FROM @CharApplySkills

	SET NOCOUNT OFF
	
END
Thanks to wallerus for the 2592000 value.
10/31/2015 14:50 AxelMac#20

Thanks nubness, but not working :( i don't understand where is the problem, but working after login, not insert when make a char only after update..
10/31/2015 15:00 nubness#21
I don't know what other code you have in there, but get rid of it. The code I submitted in my previous post is enough to get this to work.
11/04/2015 23:00 Big_#22
what he is meaning this is for when the toon logs out then back in it will have the buffs he is wanting it on toon cration witch is what i posted a while back. the one i posted works perfectly and the buffs are on the toon befor it even logs in to game for the first time this is why i added it to the char creation proc
11/04/2015 23:13 AxelMac#23
Quote:
Originally Posted by Big_ View Post
what he is meaning this is for when the toon logs out then back in it will have the buffs he is wanting it on toon cration witch is what i posted a while back. the one i posted works perfectly and the buffs are on the toon befor it even logs in to game for the first time this is why i added it to the char creation proc
yeah, but the proc not write in table charapplyskill, i don't know because, my table is right,where I can see this problem?
11/05/2015 00:15 Truth1010#24
If you have done everything that has been stated here 3 or 4 times now, then it should be working.

For us to guess why your database is mysteriously not working would be next to impossible. You are the one looking at the database, learn what you are doing and you'll be able to sort out your own problem as to why it's not working how you want it to.

Without seeing your database, we can only guess.
11/05/2015 00:22 AxelMac#25
Quote:
Originally Posted by Truth1010 View Post
If you have done everything that has been stated here 3 or 4 times now, then it should be working.

For us to guess why your database is mysteriously not working would be next to impossible. You are the one looking at the database, learn what you are doing and you'll be able to sort out your own problem as to why it's not working how you want it to.

Without seeing your database, we can only guess.
I do not understand why does not work, because it worked before and I had no such problem, no reason I do not work anymore, that's why I do not know what to do, the script that I put myself, before I worked no longer thought it was a problem in the script but instead the problem comes from the database, but do not know where
11/05/2015 00:34 Truth1010#26
Like i said before. Without seeing what is going on in your database, there isn't much we can do to help.

Look at what you recently added/removed/changed, see if you screwed up something somewhere there.

Attach SQL profiler and look at what it tracks for you. There are countless ways to troubleshoot problems like this, and if all else fails, start from scratch with a clean DB and re-add what you want. It takes like time than you've already spent on this thread asking why it doesn't work to set up from nothing.