Lucian

Member
In lootpack.cs I could not understand these two things :

What is this "5d100+500" returns and how it calculating? I know it's called Dice but I dont know how.

C#:
                new LootPackEntry(  true, Gold,            100.00, "5d100+500" ),

And Why is this chances are more than 1?

C#:
    public static readonly LootPackItem[] AosMagicItemsFilthyRichType2 = new LootPackItem[]
            {
                new LootPackItem( typeof( BaseWeapon ), 239 ),
                new LootPackItem( typeof( BaseRanged ), 60 ),
                new LootPackItem( typeof( BaseArmor ), 343 ),
                new LootPackItem( typeof( BaseShield ), 90 ),
                new LootPackItem( typeof( BaseJewel ), 45 )
            };
 
Dice rolls vs Random number generators give you better averages. On our server we replaced spell and weapon damage because of this reason. So instead of getting 1 to 10 all the time evenly, you get more 5s and 6s and better minimum and maximums.

5 Dice, 100 times, + 50, on a graph, it looks like this... Giving us an average of 755 gold.

CLCaqNs.png


Also, the number next to the lootpack item is the chance, not the amount. I could be wrong, but it appears it's calculated using

C#:
        public static bool CheckLuck(int chance)
        {
            return (chance > Utility.Random(10000));
        }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back