Premium Galet 510 Posted June 13, 2014 Premium Share Posted June 13, 2014 All working but constantly 0 mds. It's because coin column named cash ? I modified that quest, but it is the same... Modified quest : Version 1 : quest mds begin state start begin when login begin loop_timer("carga_mds", 10) end when carga_mds.timer begin local coins = mysql_query("SELECT cash from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1] cmdchat("Mds "..coins) end end end Version 2 : quest mds begin state start begin when login begin loop_timer("carga_mds", 10) end when carga_mds.timer begin local coins = mysql_query("SELECT cash from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1] cmdchat("Mds "..cash) end end end I doesn't have the mysql module, someone can give me a link for this ? Solved, it's about mysql module. Link to comment Share on other sites More sharing options...
Splash 0 Posted June 17, 2014 Share Posted June 17, 2014 (edited) Hello can everyone pls help me ? How i can change that : the main content was longer that the inventory slots above and mds under the slots Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
LykosRuleZ 3 Posted June 27, 2014 Share Posted June 27, 2014 Someone can help me to find where i fail? :l Client crash when i'm trying to enter on select player windows.. here the file with syserr and log, and file .py too https://mega.co.nz/#F!K9w0GSxD!o3jEJGsVu49NCuftwAzwnA 1 1 1 Link to comment Share on other sites More sharing options...
Premium SirGath 1 Posted July 10, 2014 Premium Share Posted July 10, 2014 0710 23:33:22988 :: File " 0710 23:33:22988 :: <string> 0710 23:33:22988 :: ", line 0710 23:33:22988 :: 2070 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: constInfo.mds = int(coins) 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: ^ 0710 23:33:22988 :: SyntaxError 0710 23:33:22988 :: : 0710 23:33:22988 :: invalid syntax 0710 23:33:22988 :: How resolve it? Link to comment Share on other sites More sharing options...
Toxic 11 Posted July 10, 2014 Share Posted July 10, 2014 0710 23:33:22988 :: File " 0710 23:33:22988 :: <string> 0710 23:33:22988 :: ", line 0710 23:33:22988 :: 2070 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: constInfo.mds = int(coins) 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: 0710 23:33:22988 :: ^ 0710 23:33:22988 :: SyntaxError 0710 23:33:22988 :: : 0710 23:33:22988 :: invalid syntax 0710 23:33:22988 :: How resolve it? What about lom? Anyway you've done something wrong..."Invalid syntax" Link to comment Share on other sites More sharing options...
Mr.Blue 3 Posted July 11, 2014 Share Posted July 11, 2014 nice release its rly usefull so I will ask can I make a NPC shop with coins like silkroad? if no it will be useless ><" Link to comment Share on other sites More sharing options...
Minion 74 Posted July 11, 2014 Share Posted July 11, 2014 All working but constantly 0 mds. It's because coin column named cash ? I modified that quest, but it is the same... Modified quest : Version 1 : quest mds begin state start begin when login begin loop_timer("carga_mds", 10) end when carga_mds.timer begin local coins = mysql_query("SELECT cash from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1] cmdchat("Mds "..coins) end end end Version 2 : quest mds begin state start begin when login begin loop_timer("carga_mds", 10) end when carga_mds.timer begin local coins = mysql_query("SELECT cash from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1] cmdchat("Mds "..cash) end end end I doesn't have the mysql module, someone can give me a link for this ? Solved, it's about mysql module. when carga_mds.timer begin local cash = mysql_query("SELECT cash from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1] cmdchat("Mds "..cash) 1 Link to comment Share on other sites More sharing options...
Premium SirGath 1 Posted July 11, 2014 Premium Share Posted July 11, 2014 0711 19:26:40246 :: Traceback (most recent call last): 0711 19:26:40246 :: File "networkModule.py", line 237, in SetGamePhase 0711 19:26:40246 :: File "system.py", line 130, in __pack_import 0711 19:26:40246 :: File " 0711 19:26:40246 :: <string> 0711 19:26:40246 :: ", line 0711 19:26:40246 :: 68 0711 19:26:40246 :: 0711 19:26:40246 :: 0711 19:26:40246 :: SCREENSHOT_DIR = "YT2W" 0711 19:26:40246 :: 0711 19:26:40246 :: ^ 0711 19:26:40246 :: SyntaxError 0711 19:26:40246 :: : 0711 19:26:40246 :: invalid syntax 0711 19:26:40247 :: Link to comment Share on other sites More sharing options...
Sober 37 Posted July 11, 2014 Share Posted July 11, 2014 all the noobs that try to copy it without knowing python they forget the TABS!!! Link to comment Share on other sites More sharing options...
Ken 904 Posted July 11, 2014 Share Posted July 11, 2014 C+ Form Add this function in input_login.cpp static void _send_coins(LPCHARACTER ch) { if (ch) { SQLMsg * pMsg = DBManager::instance().DirectQuery("select coins from account%s WHERE id = %u", get_table_postfix(), ch->GetAID()); if (pMsg->Get()->uiNumRows > 0) { MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult); ch->ChatPacket(CHAT_TYPE_COMMAND, "BINARY_Update_Coins %s", row[0]); delete pMsg; } } } And search ; _send_bonus_info(ch); Add this under that _send_coins(ch); Part of Python ; Add this command under "mall" "mall" : self.__InGameShop_Show, "BINARY_Update_Coins" : self.Binary_Update_Coins like this Add this function in game.py def Binary_Update_Coins(self,coins): self.wndMds.SetText(str(coins)) €dit : why is not work these commands? Open char_change_empire.cpp file and find this DWORD CHARACTER::GetAID() const { char szQuery[1024+1]; DWORD dwAID = 0; snprintf(szQuery, sizeof(szQuery), "SELECT id FROM player_index%s WHERE pid1=%u OR pid2=%u OR pid3=%u OR pid4=%u AND empire=%u", get_table_postfix(), GetPlayerID(), GetPlayerID(), GetPlayerID(), GetPlayerID(), GetEmpire()); SQLMsg* pMsg = DBManager::instance().DirectQuery(szQuery); if (pMsg != NULL) { if (pMsg->Get()->uiNumRows == 0) { M2_DELETE(pMsg); return 0; } MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult); str_to_number(dwAID, row[0]); M2_DELETE(pMsg); return dwAID; } else { return 0; } } change via this DWORD CHARACTER::GetAID() const { const TAccountTable pAccountTable = GetDesc()->GetAccountTable(); if (pAccountTable.id) return pAccountTable.id; } Meanwhile add this on top. #include "desc.h" Best Regards Zerelth ~ Ellie 6 Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Premium SirGath 1 Posted July 12, 2014 Premium Share Posted July 12, 2014 Ok now it found, but when i make in navicat coins or cash > 0 in game it was always 0.. i have the quest on winscp. and i have this error on putty: mysql: ambiguous option '--e=SELECT coins from account.account WHERE id=3 LIMIT 1;' (enable_cleartext_plugin, execute) Link to comment Share on other sites More sharing options...
Dennis 167 Posted August 19, 2014 Share Posted August 19, 2014 can I make a NPC shop with coins ? here in the forum but was once a guide or not? Link to comment Share on other sites More sharing options...
Valenza 14 Posted December 24, 2014 Share Posted December 24, 2014 (edited) Not working for 55k maxmi :/ Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted December 28, 2014 Former Staff Share Posted December 28, 2014 I've solved it Link to comment Share on other sites More sharing options...
Ken 904 Posted January 1, 2015 Share Posted January 1, 2015 #Updated post. Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted January 3, 2015 Former Staff Share Posted January 3, 2015 €dit : why is not work these commands? if you make it look like this it will work SQLMsg * pMsg = DBManager::instance().DirectQuery("select coins from account.account WHERE id = %d",ch->GetDesc()->GetAccountTable().id); Link to comment Share on other sites More sharing options...
Ken 904 Posted January 3, 2015 Share Posted January 3, 2015 €dit : why is not work these commands? if you make it look like this it will work SQLMsg * pMsg = DBManager::instance().DirectQuery("select coins from account.account WHERE id = %d",ch->GetDesc()->GetAccountTable().id); GetAID() function is already exist in source. Why you want to choice long way? Kind Regards Zerelth ~ Ellie Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Premium Sanchez 2469 Posted January 3, 2015 Premium Share Posted January 3, 2015 In default GetAID() runs a direct query which is unnecessary in this case. 2 Link to comment Share on other sites More sharing options...
Life 13 Posted January 3, 2015 Share Posted January 3, 2015 Ok now it found, but when i make in navicat coins or cash > 0 in game it was always 0.. i have the quest on winscp. and i have this error on putty: mysql: ambiguous option '--e=SELECT coins from account.account WHERE id=3 LIMIT 1;' (enable_cleartext_plugin, execute) If your using invoice or 34k replace mysql function with this one http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2059867-r-mysql-function.html 1 Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted January 3, 2015 Former Staff Share Posted January 3, 2015 €dit : why is not work these commands? if you make it look like this it will work SQLMsg * pMsg = DBManager::instance().DirectQuery("select coins from account.account WHERE id = %d",ch->GetDesc()->GetAccountTable().id); GetAID() function is already exist in source. Why you want to choice long way? Kind Regards Zerelth ~ Ellie In default GetAID() runs a direct query which is unnecessary in this case. mmm i'm still noob butthis works for me till now i got other important things to do at the moment so I'll not focus on this right now thanks anyway Link to comment Share on other sites More sharing options...
kubasiek221 0 Posted January 11, 2015 Share Posted January 11, 2015 System works great! My screen: http://scr.hu/1wsp/tjc3s Link to comment Share on other sites More sharing options...
Aurora 46 Posted January 25, 2015 Share Posted January 25, 2015 I have a error 0125 09:55:47724 :: Traceback (most recent call last): 0125 09:55:47724 :: File "networkModule.py", line 237, in SetGamePhase 0125 09:55:47725 :: File "system.py", line 130, in __pack_import 0125 09:55:47725 :: File " 0125 09:55:47725 :: game.py 0125 09:55:47725 :: ", line 0125 09:55:47725 :: 2398 0125 09:55:47725 :: 0125 09:55:47725 :: 0125 09:55:47725 :: def __Mds(self, coins): 0125 09:55:47725 :: 0125 09:55:47725 :: 0125 09:55:47725 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47726 :: 0125 09:55:47727 :: 0125 09:55:47727 :: ^ 0125 09:55:47727 :: IndentationError 0125 09:55:47727 :: : 0125 09:55:47727 :: unindent does not match any outer indentation level 0125 09:55:47727 :: I will upload my game.py https://mega.co.nz/#!tkMQRRbZ!8JeVdgylZ0mMOkqRfcljhmxv2fwAinwG3HdaayebNpQ I hope somebody can help me! 1 Link to comment Share on other sites More sharing options...
Premium Sanchez 2469 Posted January 25, 2015 Premium Share Posted January 25, 2015 You have syntax errors everywhere, in python you have to use [TAB] instead of [sPACE] Link to comment Share on other sites More sharing options...
Aurora 46 Posted January 25, 2015 Share Posted January 25, 2015 You have syntax errors everywhere, in python you have to use [TAB] instead of [sPACE] I only had this problem when i add this system? Link to comment Share on other sites More sharing options...
Premium Sanchez 2469 Posted January 25, 2015 Premium Share Posted January 25, 2015 Yes, because you just copied everything to game.py without replacing the spaces with tabs. Search for "mds" and insert the correct tabs. 1 Link to comment Share on other sites More sharing options...
Recommended Posts