xxx30xxx 0 Posted December 10, 2016 Share Posted December 10, 2016 (edited) hi dev i want ask how i use this https://metin2.download/picture/4mVBBJsAS2F1VIrh67b5yvyTLrrKKs52/.png like add 7 day for player if he use 40004 Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted December 10, 2016 Active Member Share Posted December 10, 2016 Use mysql_query function, i recommend to get it from wom2 src(c++) or search one on the forum 1 https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
xxx30xxx 0 Posted December 10, 2016 Author Share Posted December 10, 2016 how i use this mysql_query i'm not developer now he work with my soruce but i don't now how i use it Link to comment Share on other sites More sharing options...
metin2team 766 Posted December 10, 2016 Share Posted December 10, 2016 You need to add this to your source. and then start using it mysql_direct_query("UPDATE account.account SET gold_expire=_DATE_, silver_expire=_DATE_ WHERE id=_ID_") LINK !!! http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/3327940-release-mysql_direct_query-get_table_postfix-mysql_escape_string-written-c-lua.html 1 Link to comment Share on other sites More sharing options...
Silver Sonitex 1438 Posted December 10, 2016 Silver Share Posted December 10, 2016 Here has the following functions in C ++ mysql.querymysql.direct_querymysql.updatemysql.real_escape_stringmysql.get_table_postfix go to game / src open queslua.cpp under RegisterDragonSoulFunctionTable(); add RegisterMysqlFunctionTable(); open queslua.h under extern void RegisterDragonSoulFunctionTable(); add extern void RegisterMysqlFunctionTable(); add in the makefile questlua_mysql.cpp Download the file This is the hidden content, please Sign In or Sign Up Taken from here: 1 2 2 Link to comment Share on other sites More sharing options...
xxx30xxx 0 Posted December 10, 2016 Author Share Posted December 10, 2016 guys i'm sorry but i mean how i use date in this function mysql_direct_query("UPDATE account.account SET gold_expire=_DATE_, silver_expire=_DATE_ WHERE id=_ID_") I need to add 7 days to one of the accounts If he are using this tool 40004 I'm sorry, I'm not good in English Thank you everyone Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted December 10, 2016 Active Member Share Posted December 10, 2016 Try DATE() + "..(get_time() + 7*60*60*24).." http://www.w3schools.com/sql/sql_dates.asp https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
xxx30xxx 0 Posted December 10, 2016 Author Share Posted December 10, 2016 Exygo i mean how add 7 day in date just this i'm very sorry Because I don't know how to use them Link to comment Share on other sites More sharing options...
xxx30xxx 0 Posted December 10, 2016 Author Share Posted December 10, 2016 guys i do this but not work quest point_add begin state start begin function exp_point_add(x) mysql_direct_query("UPDATE account.account SET gold_expire=DATE() + "..(get_time() + x*60*60*24).." WHERE id='"..pc.get_account_id().."") end when 40004.use begin point_add.exp_point_add(7) say(" add 7 days gold ") end end end can anyone help me? Link to comment Share on other sites More sharing options...
MichaelM 40 Posted December 10, 2016 Share Posted December 10, 2016 Try set gold_expire = NOW() + INTERVAL x DAY instead of: gold_expire=DATE() + "..(get_time() + x*60*60*24).." Link to comment Share on other sites More sharing options...
xxx30xxx 0 Posted December 11, 2016 Author Share Posted December 11, 2016 not work Link to comment Share on other sites More sharing options...
CameFromHell 2 Posted December 11, 2016 Share Posted December 11, 2016 quest gold_expire_update begin state start begin when 40004.use begin --- vnum item used for update gold_expire local c,query = mysql_direct_query("SELECT * FROM account.account WHERE id = '"..pc.get_account_id().."' LIMIT 1;") if query[1].gold_expire == '0000-00-00 00:00:00' then mysql_direct_query("UPDATE account.account SET gold_expire = ADDDATE(NOW(), 7) WHERE id = '"..pc.get_account_id().."';") else mysql_direct_query("UPDATE account.account SET gold_expire = ADDDATE(gold_expire, 7) WHERE id = '"..pc.get_account_id().."';") end pc.remove_item(40004, 1) end end end 2 Link to comment Share on other sites More sharing options...
xxx30xxx 0 Posted December 11, 2016 Author Share Posted December 11, 2016 thank you man you are amazing now he work closed 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