Jump to content

xbruntix

Inactive Member
  • Posts

    1
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by xbruntix

  1. 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

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