Premium Iηfιηιт²⁴ᵏ 33 Posted May 8, 2016 Premium Share Posted May 8, 2016 How do I make pass the time of new pet system even if they are not activated Link to comment Share on other sites More sharing options...
Premium Iηfιηιт²⁴ᵏ 33 Posted May 11, 2016 Author Premium Share Posted May 11, 2016 up! Link to comment Share on other sites More sharing options...
.Incredible™ 8 Posted November 18, 2016 Share Posted November 18, 2016 need this too Link to comment Share on other sites More sharing options...
VegaS 1087 Posted November 18, 2016 Share Posted November 18, 2016 You can not do this because of pet time that you use that system by saving time is used by data type int value what was saved on storage mysql. You need to make a takeover increment in real time server and decrease in all columns baseline - 1 second. Which means you will have to do a query directly query that look like to do a check which consists if time is > 0, then you need a query and update query as noted above. Or you can do an event which is running throughout the game (as long as it receives no crash or other strokes), and through that event can decrease the time of each column of the table in mysql in real time. Here you have 50% of ideea what i was say, for rest you need to use your brain or leave this method. //@set_global_time //Small checks for formate a idea about what i was want to say. std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT duration FROM user.table")); MYSQL_ROW row; int resLine = 0; for(int i = 0; (row = mysql_fetch_row(pMsg->Get()->pSQLResult)) != NULL; ++i) { str_to_number(resLine, row[0]); } if (resLine > 0) { char sqQuery[QUERY_MAX_LEN + 1]; snprintf(sqQuery, sizeof(sqQuery), "UPDATE user.table SET duration = duration - 1"); std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery(sqQuery)); } You can create and a one vector like: std::vector<int> listDuration; and save all data from storage mysql with all duration and after that to check with one special pointer each and decrease duration. But anyway, these methods are crap and are not recommended, can not be too familiar with the subject because I do not know how the system works very well your pet so I can't pronounce to something more better on this information. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now