Jump to content

birender

Inactive Member
  • Posts

    100
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by birender

  1. I get error.What is needed to add

    0409 16:20:12620 :: 
    networkModule.py(line:200) SetSelectCharacterPhase
    system.py(line:178) __hybrid_import
    system.py(line:143) _process_result
    introSelect.py(line:30) <module>
    system.py(line:178) __hybrid_import
    system.py(line:143) _process_result
    interfaceModule.py(line:15) <module>
    system.py(line:178) __hybrid_import
    system.py(line:143) _process_result
    uiMessenger.py(line:11) <module>
    system.py(line:185) __hybrid_import
    
    networkModule.SetSelectCharacterPhase - <type 'exceptions.ImportError'>:No module named name
    
    0409 16:20:12620 :: ============================================================================================================
    0409 16:20:12620 :: Abort!!!!

     

  2. Here is the Shop Search System for Ken Offline Shop.

    #Link removed

    It has few bugs known to my knowledge

    Problem1-It checks for case sensitive while searching items.It means you have to type the correct name of item as it shows in your inventory.

    Problem2 -The list is not get cleared even when there are no offline shop is in town

    Problem3-The item doesnt show bonus in the list

    Problem4-There is a core crash error which I have shown below

    https://metin2.download/picture/g7gq5Lrc7t9a3C3G0DFDEa3Tvfm46Eb2/.png

    (gdb) bt full
    #0  COfflineShopManager::DestroyOfflineShop (this=0xbfbfbcb4, ch=0x0,
        dwVID=29563, bDestroyAll=false) at offlineshop_manager.cpp:198
            npc = 0x4808e000
            pkOfflineShop = 0x33bfb310
            szQuery3 = "▒\000\000\000\000\000\000\000\000\\▒▒3x▒▒▒\000\000\000\000\0                                                                                           00\000\000\000\024\000\000\000t\005▒(\\▒▒▒\\▒▒▒ذ▒▒▒▒\236(▒\200▒(\\▒▒▒(▒▒▒▒▒\236(     

    If someone can fix these bugs the system will be usable for any server with ken offline shop

  3. I thank you to all the people who have taken effort in solving my issue.

    meneleos special thank to you.

    Its working now

    But another bug

    Th search is case sensitive, it shows the items only when I type the exact word

    For example if I search "Sword" it shows list of swords. A screenshot below

    https://metin2.download/picture/4ZQTFp0QY7JBgzhQfsy5w8Hi6Xz3FNCW/.png

    But If I type "sword" the list doesnt appears

    My search code is here 

    void CInputMain::PrivateSearch(LPCHARACTER ch, const char * data)
    {
    
    	struct packet_private_search * pinfo = (struct packet_private_search *) data;
    	const char* Item_Search = pinfo->item_name; //Nombre Recibido
    	int Item_Gold = pinfo->item_gold;
    
    	if (strlen(Item_Search) == 0){
    		ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] Type any name.");
    		return;
    	}
    	if (Item_Gold < 0){
    		ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] Set a value greater than 0");
    		return;
    	}
    	if (Item_Gold > 2000000000){
    		ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] Place a value less than 2kkk");
    		return;
    	}
    
    
    	int check = 0;
    	int check_0 = 0;
        char szQuery[1024];
    	snprintf(szQuery, sizeof(szQuery),"SELECT * FROM player.offline_shop_item WHERE status=0 and mapIndex=%d",ch->GetMapIndex());
    	std::auto_ptr<SQLMsg> pMsg(DBManager::Instance().DirectQuery(szQuery));
    	std::auto_ptr<SQLMsg> pMsg1(DBManager::Instance().DirectQuery(szQuery));
    
    	if (pMsg->Get()->uiNumRows > 0) 
    	{
    		//Check si no existe ningun item con ese nombre
    		while (MYSQL_ROW row_check = mysql_fetch_row(pMsg1->Get()->pSQLResult))
    		{
    			const char * Item_Totales_0 = row_check[43]; //Nombres Tablas
    			const char * Item_Vnums_0 = row_check[4]; //Vnums Tablas
    			const char * Item_Gold_0 = row_check[41]; //Gold Tablas
    
    		 	DWORD Vnum_Item_0 = 0;
    			str_to_number(Vnum_Item_0, Item_Vnums_0); //Convierte el vnum de string a numero entero
    
    			int Gold_Item_0 = 0;
    			str_to_number(Gold_Item_0, Item_Gold_0); //Convierte el vnum de string a numero entero
    
    			if (strstr(Item_Totales_0, Item_Search)){
    				check++;
    			}
    			if (Item_Gold > 0){
    				if (Gold_Item_0 <= Item_Gold){
    					check_0++;
    				}
    			}
    		}
    		if(check == 0){
    			ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] No item with that name is found.");
    			return;
    		}
    		if (Item_Gold > 0){
    			if(check_0 == 0){
    				ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] There is no item with that value.");
    				return;
    			}
    		}
    
    		while (MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult))
    		{
    			const char * Item_Totales = row[43]; //Nombres Tablas
    			const char * Item_Vnums = row[4]; //Vnums Tablas
    			const char * Item_Gold_1 = row[41]; //Gold Tablas
    
    		 	DWORD Vnum_Item = 0;
    			str_to_number(Vnum_Item, Item_Vnums); //Convierte el vnum de string a numero entero
    
    			int Gold_Item = 0;
    			str_to_number(Gold_Item, Item_Gold_1); //Convierte el vnum de string a numero entero
    
    			if (strstr(Item_Totales, Item_Search)){
    				if (Item_Gold > 0){
    					if (Gold_Item <= Item_Gold){
    						ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_ItemsSearch %d",Vnum_Item);
    						ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_RefreshItems");
    					}
    				}else{
    					ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_ItemsSearch %d",Vnum_Item);
    					ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_RefreshItems");
    				}
    			}
    		}
    	}
    }

     

  4. As you said I checked in entity.h the function is there and its already included in offlineshop_manager.cpp

    To be precide what I am trying to do is.

    I hope my screenshot will help fix this system

    Function location

    https://metin2.download/picture/R99gXIvjEfup4a3dqO8r92vF3E8K9Mh6/.png

     

    What I am trying to do

    https://metin2.download/picture/2F68n0T3JWOgIgmc2cHuG1w4i9lORkXi/.png

     

    When I create offline shop for first in Map1 an entry is made in database mapIndex=1

    https://metin2.download/picture/c3AWOdmjJipy202R2b2aBuq2Cm1Ih9Zc/.png

    https://metin2.download/picture/bv75IQBS1l7V64RS7ve91IPkr64Q0mDs/.png

    But when I use add item menu offline shop menu the entry in mapIndex=0

     

     

     

    • Metin2 Dev 1
  5. I am trying to install offline shop search system on Ken offline shop
    I get a error while compiling.The screenshot is below

    https://metin2.download/picture/LEPdX96xNi77pkeEr4SkwrQyJXXeVLOA/.png

    I cant find where this GetMapIndex function is
    There is a similar function in char.cpp where it doesn't throw error but in offlineshop_manager.cpp it does

    I tried to locate the function where it is in char.cpp but no success

    I am attaching my char.cpp here

    char.cpp

    • Metin2 Dev 1
  6. Hi I have installed shop decoration on Ken Offline Shop System.

    Shop Decoration System works but I get syserror on client.I tried some solutions but it didnt work

    The error is given below.I need help Plz.I have attached my game.py and interfacemodule.py

    0805 19:39:04977 ::   File "game.py", line 2359, in BINARY_OfflineShop_Appear
    
    0805 19:39:04977 ::   File "interfaceModule.py", line 1530, in AppearOfflineShop
    
    0805 19:39:04977 :: UnboundLocalError
    0805 19:39:04977 :: : 
    0805 19:39:04977 :: local variable 'board' referenced before assignment
    0805 19:39:04977 :: 

     

     

    game.py

    interfacemodule.py

  7. Hi I tried to install offlineshop by ken

    I compiled the sever and client source successfully

    But I get error on client source

    	Line 392: 16>PythonNetworkStreamPhaseGame.cpp(4212): warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)
    	Line 392: 16>PythonNetworkStreamPhaseGame.cpp(4212): warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)

    This is my function where I get error

    I tried some fixes which I have commented now but it didn't hep

    		case SHOP_SUBHEADER_GC_CHECK_RESULT:
    		{
    			BYTE bHasOfflineShop;
    			//BYTE bHasOfflineShop = 0;
    			//BYTE bHasOfflineShop! = 0;
    			//BYTE bHasOfflineShop! = NULL;
    			if (!Recv(sizeof(BYTE), &bHasOfflineShop))
    				return false;
    
    			TraceError("OfflineShopResult(%d)", bHasOfflineShop);
    
    			CPythonPlayer::instance().SetHasOfflineShop(bHasOfflineShop);
    			break;
    		}

    Plz help

  8. Hi I have installed shoulder sash system and Vegas Title System.But when I login I get this error.And sash didn't work.

    0520 02:52:36552 ::   File "game.py", line 1603, in OnUpdate
    
    0520 02:52:36552 ::   File "title_system.py", line 983, in OnUpdate
    
    0520 02:52:36552 :: IndexError
    0520 02:52:36552 :: : 
    0520 02:52:36552 :: tuple index out of range
    0520 02:52:36552 :: 

     

    I know the fault is on line 1603 on game.py and line 983 on title_system.py

    what should I change to fix this

    I have attached 2 files

    Plz help

    game.py

    title_system.py

  9. Still same error

    24 minutes ago, WeedHex said:

    Test it, I was just giving info to mask the error. There is need to know everything you did with that packet.

    If you don't need to do something on login break it. But you must understand where did packet come on login.

    Recently I added ingame itemshop and achievement shop

    https://metin2.download/picture/6QrDGNzIxs10U45NNo2y4KOY6y58ctMg/.png

    I guess these button causing problem

    I opened client side packet.h 

    and these line is mentioned

    https://metin2.download/picture/doDegzeiMtj8XbVA7EK736FArwEiQ0OD/.png

    I hope this will shed more light on the issue

     

  10. 5 hours ago, VegaS™ said:

    (1.3) Spamming

    Do not spam in this board. Posting a topic or a question once is enough. If you don't get an answer maybe your question needs more description. Or nobody is able to help you there. Double post aswell as double threads will be punished with an infraction.

     

    By mistake, I posted in C++ section but it was to be posted in general question and answers

    And I did find an option to remove it.

    If you are an admin plz remove the post from C++ section.

  11. I am getting a very very strange error which I have not seen in metin2 history

    My client crashes and when I check in syserr I get this data.

    In my syserr I get a lot of NUL NUL NUL along with unknown packet header. I searched on google but couldn't find anything about this on NUL

    Can anyone explain my syserr on the screenshot below and even I have attached the file.

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    syserr Log below

    This is the hidden content, please

    This is the hidden content, please

  12. I am getting a very very strange error which I have not seen in metin2 history

    My client crashes and when I check in syserr I get this data.

    In my syserr I get a lot of NUL NUL NUL along with unknown packet header. I searched on google but couldn't find anything about this on NUL

    Can anyone explain my syserr on the screenshot below and even I have attached the file.

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    syserr Log below

    syserr2_strange.txt

    syserr4_strange.txt

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.