if (item->GetVnum() == 76033) { const int32_t fixedValue1 = 40; // Sabit değer int32_t value1 = fixedValue1; int chance = number(1, 100); // Rastgele bir sayı üret if (chance > 5 && chance <= 15) { value1 = 29; // %10 şans ile 29 } else if (chance > 15) { value1 = number(1, fixedValue1); // %85 şans ile 1-40 arası değer alır } int attribute94Value = 0; bool hasAttribute94 = false; for (int i = 0; i < item2->GetAttributeCount(); i++) { if (item2->GetAttributeType(i) == 94) { attribute94Value = item2->GetAttributeValue(i); hasAttribute94 = true; break; } } if (hasAttribute94 && attribute94Value < 15) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ESYANIZDA_15_ORAN_94_EFSUN_OLMALI")); return false; } if (item2->GetAttributeCount() < 5 && !hasAttribute94) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ESYANIZDA_ENAZ_5EFSUN_OLMALI")); return false; } if (!hasAttribute94) { item2->SetForceAttribute(item2->GetAttributeCount(), 94, value1); } }