Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case USE_COSTUME_ADD_ATTRIBUTE1:
- {
- LPITEM item2;
- if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
- return false;
- if (item2->IsExchanging())
- return false;
- if (item2->IsEquipped())
- return false;
- if (item2->GetSubType() != COSTUME_BODY)
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Mozna dodac tylko w kostiumie"));
- return false;
- }
- if (item2->GetType() == ITEM_ARMOR)
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Mozna dodac tylko w kostiumie"));
- return false;
- }
- if (item2->GetType() == ITEM_WEAPON)
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Mozna dodac tylko w kostiumie"));
- return false;
- }
- if (item->GetVnum() == 76028)
- {
- if (item2->GetAttributeCount() > 0)
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nie mozesz dodac wiecej bonusow"));
- return false;
- }
- if (number(1, 100) <= 80)
- {
- char buf[21];
- snprintf(buf, sizeof(buf), "%u", item2->GetID());
- item2->SetForceAttribute(0, APPLY_MAX_HP, 2000);
- item2->SetForceAttribute(1, APPLY_RESIST_MONSTER, 3);
- item2->SetForceAttribute(2, APPLY_ATTBONUS_MONSTER, 5);
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Bon wszedl"));
- }
- else
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Bon nie wszedl"));
- }
- item->SetCount(item->GetCount() - 1);
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement