Originally Posted by Tommy
Thank your for your time Tommy, and i really appreciate your help. The problem is that i made a mistake, i thought that the time stored in evento_gurubashi_lastspawn was the timer decreasing to 0, and when it was 0 you can spawn another theme again. It is not like that, the time stored in the 'time' column of that table, is the UNIX_TIMESTAMP value converted to timestamp (UNIX_TIMESTAMP = 0000-00-00 00:00:00 // timestamp = 000000000). [The time that is stored on the table is the exact day/year/hour in timestamp when you selected the theme.]
I tried this:
but it just didn't work. This was an attempt to make a global server announce 1 minute after you selected the theme desired to be spawned in the NPC.
void alertServer(const char * name, int msg)
result = WorldDatabase.PQuery("SELECT `time` FROM `evento_gurubashi_lastspawn`"); // 350000 in miliseconds = 5 minutes
Field* fields = result->Fetch();
sWorld->SendGlobalText("Try fix.", NULL);
To get the timestamp value of UNIX_TIMESTAMP(0000-00-00 00:00:00) use this query. (On the MySQL database. I just added it, it could help)
Any ideas/help please?
SELECT UNIX_TIMESTAMP('2013-01-07 15:01:00');