Jump to content
×
×
  • Create New...
  • 0

OFFLINESHOP DUPLICATE ITEM EXPLOIT


DeYaN.

Question

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

4 answers to this question

Recommended Posts

  • 0
  • Moon

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
  • 0
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Read our Rules
  • Activity

    1. 2

      Fix CursorImage 'NoneType' object is not callable.

    2. 0

      [Land of Heroes] We are looking for Game / Game Economy Designers

    3. 177

      Render Target Remastered

    4. 1

      MySQL stop when start server

    5. 0

    6. 59

      Emoji in TextLine

  • Recently Browsing

    No registered users viewing this page.

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.