Jump to content

privateshopbuilder yang


Recommended Posts

  • Active Member

I don't know but i think, you need edit Shop.cpp i think if you edit this :

Spoiler

if ((int)dwPrice>0

for example, to :

Spoiler

if ((int)dwPrice<0

Maybe work, i can't tell u because i'm using offline shop and i have many editions, but i think if you search "price" you can find something... sorry but is a good question Won system use a similar function cheque>0 and cheque<0  

  • Metin2 Dev 1
  • Love 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active Member

Hello again! :), go to shop.cpp and search:

Spoiler

if (r_item.price < 0)

replace all:

Spoiler

if (r_item.price < 0 || (IsPCShop() && r_item.price <= 0))

Open now in uiprivateshopbuilder.py and search

Spoiler

            if int(text) <= 0:
                return True

change with:

Spoiler

            if int(text) <= -1:
                return True

and you can put 0 yang on shop

thanks to  Draveniou1 because he put a system to not sell items and you need 0 yang to put, but my idea is correct!!! so thanks me too XD!!  tell me something if you try 🙂 regards bro.

  • Love 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

6 hours ago, nazox said:

Hello again! :), go to shop.cpp and search:

  Reveal hidden contents

if (r_item.price < 0)

replace all:

  Reveal hidden contents

if (r_item.price < 0 || (IsPCShop() && r_item.price <= 0))

Open now in uiprivateshopbuilder.py and search

  Reveal hidden contents

            if int(text) <= 0:
                return True

change with:

  Reveal hidden contents

            if int(text) <= -1:
                return True

and you can put 0 yang on shop

thanks to  Draveniou1 because he put a system to not sell items and you need 0 yang to put, but my idea is correct!!! so thanks me too XD!!  tell me something if you try 🙂 regards bro.

Niceeeeeee

Link to comment
Share on other sites

  • Active Member
1 hour ago, narcisxb said:

Using 0 or numbers that are smaller than 0 (negative numbers) in shops and pretty much everywhere outside of maths is a sure way to get nasty bugs. I d recommend against this feature.

Is there security in the sources that prevents you from buying with 0 yang, My method is safe and has been tested with 1k player online for 5 months🙂

 

SAFEZONE:

    if (r_item.price <= 0)
    {
        LogManager::instance().HackLog("SHOP_BUY_GOLD_OVERFLOW", ch);
        return SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY;
    }

 

    if (IsPCShop())
    {
        if (!pkSelectedItem)
        {
            sys_log(0, "Shop::Buy : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d",
                    ch->GetPlayerID(),
                    m_pkPC->GetPlayerID());

            return SHOP_SUBHEADER_GC_SOLD_OUT; // @fixme132 false to SHOP_SUBHEADER_GC_SOLD_OUT
        }

        if ((pkSelectedItem->GetOwner() != m_pkPC))
        {
            sys_log(0, "Shop::Buy : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d",
                    ch->GetPlayerID(),
                    m_pkPC->GetPlayerID());

            return SHOP_SUBHEADER_GC_SOLD_OUT; // @fixme132 false to SHOP_SUBHEADER_GC_SOLD_OUT
        }
    }

    DWORD dwPrice = r_item.price;

    if (ch->GetGold() < (int) dwPrice)
    {
        sys_log(1, "Shop::Buy : Not enough money : %s has %d, price %d", ch->GetName(), ch->GetGold(), dwPrice);
        return SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY;
    }

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



×
×
  • 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.