using Server using Server Mobiles using Server Items using System name

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using Server;
using Server.Mobiles;
using Server.Items;
using System;
namespace Server.Customs.Framework.Loot
{
public class ItemTier
{
public static double[] BaseDropChances = {0.000,0.001,0.005,0.025,0.050,0.075,0.100,0.125,0.150,0.175,0.200,0.250,0.300};
public static int[] GetBaseDropChance(BaseCreature bc)
{
var val = new int[5]{0,0,0,0,0};
var dif = BaseInstrument.GetBaseDifficulty(bc);
if (dif > 160)
dif = 160;
int tier = Convert.ToInt32(Math.Truncate((dif/160)*10));
switch (tier)
{
case 0 :
val = new int[5] {0, 0, 1, 2, 3};
break;
case 1 :
val = new int[5] {0, 0, 2, 3, 4};
break;
case 2 :
val = new int[5] {0, 0, 3, 4, 5};
break;
case 3 :
val = new int[5] {0, 1, 2, 3, 4};
break;
case 4 :
val = new int[5] {0, 2, 3, 4, 5};
break;
case 5 :
val = new int[5] {0, 3, 4, 5, 6};
break;
case 6 :
val = new int[5] {1, 2, 3, 4, 5};
break;
case 7 :
val = new int[5] {2, 3, 4, 5, 6};
break;
case 8 :
val = new int[5] {3, 4, 5, 6, 7};
break;
case 9:
val = new int[5] { 3, 4, 5, 6, 7 };
break;
case 10:
val = new int[5] { 3, 4, 5, 6, 7 };
break;
case 11:
val = new int[5] { 3, 4, 5, 6, 7 };
break;
}
return val;
}
}
}