Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

privateshopbuilder yang


CITY

Question

5 answers to this question

Recommended Posts

  • 0

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

  • 0

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

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

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

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


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