Code: Select all
// 9000 default; the lower the greater the Weapon/Armor/Wand Drop
// 35% Drop 40% of that is an Item
[B]dTmp1 = m_pClientList[sAttackerH]->m_iRating*m_cRepDropModifier;
if (dTmp1 > 3000) dTmp1 = 3000;
if (dTmp1 < -3000) dTmp1 = -3000;
dTmp2 = (m_iSecondaryDropRate - (dTmp1));
if (iDice(1,10000) <= dTmp2) { [/B]
// 40% Drop 90% of that is a standard drop
// Standard Drop Calculation: (35/100) * (40/100) * (90/100) = 12.6%
iResult = iDice(1,12000);
if ((iResult >= 1) && (iResult <= 3000)) dwValue = 1;
else if ((iResult >= 3001) && (iResult <= 4000)) dwValue = 2;
else if ((iResult >= 4001) && (iResult <= 5500)) dwValue = 3;
else if ((iResult >= 5501) && (iResult <= 7000)) dwValue = 4;
else if ((iResult >= 7001) && (iResult <= 8500)) dwValue = 5;
else if ((iResult >= 8501) && (iResult <= 9200)) dwValue = 6;
else if ((iResult >= 9201) && (iResult <= 9800)) dwValue = 7;
else if ((iResult >= 9801) && (iResult <= 10000)) dwValue = 8;
else if ((iResult >= 10001) && (iResult <= 12000)) dwValue = 9;
switch (dwValue) {
case 1: iItemID = 95; break; // Green Potion
case 2: iItemID = 91; break; // Red Potion
case 3: iItemID = 93; break; // Blue Potion
case 4: iItemID = 96; break; // Big Green Potion
case 5: iItemID = 92; break; // Big Red Potion
case 6: iItemID = 94; break; // Big Blue Potion
case 7: switch(iDice(1,2)) {
case 1: iItemID = 390; break; // Power Green Potion
case 2: iItemID = 95; break; // Green Potion
}
break;
Let's say m_cRepDropModifier = 5
And character m_iRating = 200
So dTmp1 = 5*200 = 1000
Now....
dTmp2 = (m_iSecondaryDropRate - (dTmp1));
m_iSecondaryDropRate = 5000
So dTmp2 = 5000 - 1000 = 4000
if (iDice(1,10000) <= dTmp2) {
So you have a success of any number lower than 4000 or equal will make it drop right?
Something wrong uh? positive rep should give more drop uh? :unsure: