Jump to content

Recommended Posts

  • Bot

This exploit appears in the more recent item_proto.txt from official servers. They added ITEM_TUNABLE flag for all refineable items. The problem is the source have no check for USE_DETACHMENT to only work on weapons or armors. 

How the exploit works:
1. You get a necklace and you add ORE on it
2. You wait until the time of ore arrives at a perfect vnum like 80012 (DR Voucher)
3. You use USE_DETACHEMENT scroll on that necklace and you will get a DR Voucher 🤣


The fix: 
Add a check in char_item.cpp inside case USE_DETACHMENT: like this:

                    if(item2->GetType() != ITEM_WEAPON && !(item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY))
                        return false;


Have fun! 

  • Metin2 Dev 3
  • kekw 2
  • Facepalm 2
  • Love 4

english_banner.gif

  • 3 weeks later...
  • Active Member

USE_TUNING and USE_DETACHMENT cases are handled together in the same switch block.
If you add Tiger's condition, you gonna have the problem that you can't longer refine other items than armor and weapons.
So you need to separate the cases 


 

                   case USE_TUNING:
                        {
                            LPITEM item2;

                            if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                return false;

                            if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114
                                return false;

                            if (item2->GetVnum() >= 28330 && item2->GetVnum() <= 28343)
                            {
                                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("+3_STONES_CANT_BE_IMPROVED_WITH_THIS"));
                                return false;
                            }

                            if (item2->GetVnum() >= 28430 && item2->GetVnum() <= 28443)
                            {
                                if (item->GetVnum() == 71056)
                                {
                                    RefineItem(item, item2);
                                }
                                else
                                {
                                    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("STONES_CANT_BE_UPGRADED_WITH_THIS"));
                                }
                            }
                            else
                            {
                                RefineItem(item, item2);
                            }
                        }
                        break;


                    case USE_DETACHMENT:
                        {
                            LPITEM item2;

                            if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                return false;

                            if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114
                                return false;

                            if(item2->GetType() != ITEM_WEAPON && !(item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY))
                            {
                                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can only use this item on weapons or armor."));
                                return false;
                            }

#ifdef __SASH_SYSTEM__
                            if (item->GetValue(0) == SASH_CLEAN_ATTR_VALUE0)
                            {
                                if (!CleanSashAttr(item, item2))
                                    return false;
                                
                                return true;
                            }
#endif

#ifdef __CHANGELOOK_SYSTEM__
                            if (item->GetValue(0) == CL_CLEAN_ATTR_VALUE0)
                            {
                                if (!CleanTransmutation(item, item2))
                                    return false;
                                
                                return true;
                            }
#endif
                        }
                        break;

(Do the cases as you have in your source)

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.