Jump to content

Recommended Posts

  • Active+ Member

Hi guys,

i have a problem with item selling glass. ID of item is: 71113. When I use this glass to see the item in chat, glass not removing.

Thank you for your asnwers!

KInd Regards ReFresh

  • Love 1

I'll be always helpful!  😉

Link to comment
https://metin2.dev/topic/12678-item-selling-glass-not-removing/
Share on other sites

input_main.cpp

 

replace ProcessTextTag function by:

 

	int ProcessTextTag(LPCHARACTER ch, const char * c_pszText, size_t len)
{
    //2012.05.17 ±čżëżí
    //0 : Á¤»óŔűŔ¸·Î »çżë
    //1 : ±Ý°­°ć şÎÁ·
    //2 : ±Ý°­°ćŔĚ ŔÖŔ¸łŞ, °łŔλóÁˇżˇĽ­ »çżëÁß
    //3 : ±łČŻÁß
    //4 : żˇ·Ż
    int hyperlinks;
    bool colored;
    
    GetTextTagInfo(c_pszText, len, hyperlinks, colored);
	    if (colored == true && hyperlinks == 0)
        return 4;
	    if (ch->GetExchange())
    {
        if (hyperlinks == 0)
            return 0;
        else
            return 3;
    }
	    if(!glass_enable)
        return 0;
	    int nPrismCount = ch->CountSpecifyItem(ITEM_PRISM);
	    if (nPrismCount < hyperlinks && glass_needed)
        return 1;
	
    if (!ch->GetMyShop())
    {
        if(glass_needed)
            ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
        return 0;
    } else
    {
        int sellingNumber = ch->GetMyShop()->GetNumberByVnum(ITEM_PRISM);
        if(nPrismCount - sellingNumber < hyperlinks)
        {
            return 2;
        } else
        {
            if(glass_needed)
                ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
            return 0;
        }
    }
    
    return 4;
}

  • Active+ Member
16 minutes ago, takbardzo said:

input_main.cpp

 

replace ProcessTextTag function by:

 

 


	int ProcessTextTag(LPCHARACTER ch, const char * c_pszText, size_t len)
{
    //2012.05.17 ±čżëżí
    //0 : Á¤»óŔűŔ¸·Î »çżë
    //1 : ±Ý°­°ć şÎÁ·
    //2 : ±Ý°­°ćŔĚ ŔÖŔ¸łŞ, °łŔλóÁˇżˇĽ­ »çżëÁß
    //3 : ±łČŻÁß
    //4 : żˇ·Ż
    int hyperlinks;
    bool colored;
    
    GetTextTagInfo(c_pszText, len, hyperlinks, colored);
	    if (colored == true && hyperlinks == 0)
        return 4;
	    if (ch->GetExchange())
    {
        if (hyperlinks == 0)
            return 0;
        else
            return 3;
    }
	    if(!glass_enable)
        return 0;
	    int nPrismCount = ch->CountSpecifyItem(ITEM_PRISM);
	    if (nPrismCount < hyperlinks && glass_needed)
        return 1;
	
    if (!ch->GetMyShop())
    {
        if(glass_needed)
            ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
        return 0;
    } else
    {
        int sellingNumber = ch->GetMyShop()->GetNumberByVnum(ITEM_PRISM);
        if(nPrismCount - sellingNumber < hyperlinks)
        {
            return 2;
        } else
        {
            if(glass_needed)
                ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
            return 0;
        }
    }
    
    return 4;
}

 

1468667824.png

I got this error.

Edited by Metin2 Dev
Core X - External 2 Internal

I'll be always helpful!  😉

Add this on top of the config.cpp file, alongside others.

 

bool glass_enable = true;
bool glass_needed = true;

 

and this on top of the input_main.cpp alongside other variables

 

extern bool glass_enable;
extern bool glass_needed;

  • Active+ Member
4 minutes ago, takbardzo said:

Add this on top of the config.cpp file, alongside others.

 

 


bool glass_enable = true;
bool glass_needed = true;

 

 

and this on top of the input_main.cpp alongside other variables

 

extern bool glass_enable;
extern bool glass_needed;

Thank you, but I solved this :D I didn't saw return 0 on top of the function.

  • Love 1

I'll be always helpful!  😉

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.