Jump to content

Need Help With Char_Item.cpp


Recommended Posts

Greetings! This will be my first post on the forum!

I'm currently working on an attribute system. I've played around with case USE_ADD_ATTRIBUTE codes but got stuck at one point.

The system uses an item "71353" which gives a specific attribute "APPLY_STR" to sword item.

The code seems to work but the problem is that everytime I try to use the item, I get random attributes on the sword.

Any help would be appreciated!

Quote

case USE_ADD_ATTRIBUTE3:
                                    if (item2->GetAttributeCount() < 4)
                                    {
                                        if (item->GetVnum() == 71353)
                                        {
                                            if (item2->GetType() == ITEM_WEAPON)
                                            {
                                                item2->ClearAttribute();
                                                item2->SetForceAttribute(0, APPLY_STR, 5); //Güç +5
                                                ChatPacket(CHAT_TYPE_INFO, "Başarıyla Eklendi");
                                            }
                                        }
                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, "Eklenemedi");
                                    }
                                    break;

item_length.h > defined case USE_ADD_ATTRIBUTE3

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 13

      Metin2 Closed Beta Content (2003-2004)

    2. 0

      PRESENTATION PAGE [OLDGODSMT2 RELEASE]

    3. 25

      [SRC] Metin2 on LINUX - The Old Metin2 Project

    4. 2

      United/Club/Midgard serverfiles?

    5. 13

      Metin2 Closed Beta Content (2003-2004)

    6. 13

      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.