Jump to content

OFFLINESHOP DUPLICATE ITEM EXPLOIT


Recommended Posts

Yeap , my players find a bug .  

In the past i solve that exploit with add item in shop offline with crafting/acce window open. But i never thought that this bug is working with first function of shopoffline "open a shop".

So the exploit are : you add 2 acce for combination and before click ok , you open a offline shop with same acce, after the offlineshop it`s created, you click ok at window acce combination and if the combination is succesfull you win a acce with absorbtion and old 2 acce in shop offline :)) :P

 

I try to make the function ,

from original:

Spoiler

LPOFFLINESHOP COfflineShopManager::CreateOfflineShop(LPCHARACTER npc, DWORD dwOwnerPID)
{
    if (FindOfflineShop(npc->GetVID()))
        return NULL;


    }

    LPOFFLINESHOP pkOfflineShop = M2_NEW COfflineShop;
    pkOfflineShop->SetOfflineShopNPC(npc);

    m_map_pkOfflineShopByNPC.insert(TShopMap::value_type(npc->GetVID(), pkOfflineShop));
    m_Map_pkOfflineShopByNPC2.insert(TOfflineShopMap::value_type(dwOwnerPID, npc->GetVID()));
    return pkOfflineShop;
}

in

Spoiler

LPOFFLINESHOP COfflineShopManager::CreateOfflineShop(LPCHARACTER ch, DWORD dwOwnerPID)
{
    // verificari
    if (FindOfflineShop(ch->GetVID()))
        return NULL;

    if (!ch)
        return false;
    if ((ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner()) || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen())
    {
        ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti folosi aceasta optiune,ai fereastra magazinului offline deschisa!"));
        return false;


    }
    //

    LPOFFLINESHOP pkOfflineShop = M2_NEW COfflineShop;
    pkOfflineShop->SetOfflineShopNPC(ch);

    m_map_pkOfflineShopByNPC.insert(TShopMap::value_type(ch->GetVID(), pkOfflineShop));
    m_Map_pkOfflineShopByNPC2.insert(TOfflineShopMap::value_type(dwOwnerPID, ch->GetVID()));
    return pkOfflineShop;
}

 

But is not working :P

 

I copy that function from FIX of add item:

Spoiler

void COfflineShopManager::AddItem(LPCHARACTER ch, BYTE bDisplayPos, BYTE bPos, int iPrice)
#endif
{
    if (!ch)
        return;
    if ((ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner()) || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen())
    {
        ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti folosi aceasta optiune,ai fereastra magazinului offline deschisa!"));
        return;

    }

 

  • Love 1
Link to comment
Share on other sites

  • Active+ Member

In input_main.cpp in function : int CInputMain::MyOfflineShop(LPCHARACTER ch, const char * c_pData, size_t uiBytes)

add:

    if (ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner() || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen())
    {
        ch->ChatPacket(CHAT_TYPE_NOTICE, ("This nigga try to make a bug -> %s."), ch->GetName());
        return (iExtraLen);
    }

  • Love 1
Link to comment
Share on other sites

1 hour ago, Abel(Tiger) said:

In input_main.cpp in function : int CInputMain::MyOfflineShop(LPCHARACTER ch, const char * c_pData, size_t uiBytes)

add:

    if (ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner() || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen())
    {
        ch->ChatPacket(CHAT_TYPE_NOTICE, ("This nigga try to make a bug -> %s."), ch->GetName());
        return (iExtraLen);
    }

 

 

You are great , thank you ! I have that function but without "ch->IsAcceOpen" :D

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 11

      Metin2 Closed Beta Content (2003-2004)

    2. 11

      Metin2 Closed Beta Content (2003-2004)

    3. 0

      Football Ground

    4. 11

      Metin2 Closed Beta Content (2003-2004)

    5. 0

      Error compile binary Zentoria2

    6. 11

      Metin2 Closed Beta Content (2003-2004)

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.