Diablo Loot System menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Diablo Loot System

    Does such a thing exist? I've seen a Wrath server with such a loot system, but I'm not sure if there's a public release for it.

    If there is, would love to get a link to a git repo or pack.


    Diablo Loot System
  2. #2
    IChangedMyUsername's Avatar Contributor Dance! ;^) CoreCoins Purchaser
    Reputation
    169
    Join Date
    Mar 2013
    Posts
    722
    Thanks G/R
    257/65
    Trade Feedback
    5 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where stuff just drops randomly? Or random stats? I know of a server where items themselves have unique effects to abilities like diablo, if thats what you mean.

    Let me know, i can think of examples for most of what I said xD

  3. #3
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Awkwerdness View Post
    Where stuff just drops randomly? Or random stats? I know of a server where items themselves have unique effects to abilities like diablo, if thats what you mean.

    Let me know, i can think of examples for most of what I said xD
    Random stats/rolls/abilities on Legendaries.


  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I have written such a system, and I am the only person I think to fix the issue of the random items not having entries in the item.dbc appearing as question marks.

    But unfortunately I don't want to release it to the public because it is part of an original set of features for my server. I can answer how you would go about doing it or if you are stuck with anything...

  5. #5
    Iaccidentallytwink's Avatar Elite User
    Reputation
    591
    Join Date
    Aug 2007
    Posts
    1,020
    Thanks G/R
    1/16
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    I have written such a system, and I am the only person I think to fix the issue of the random items not having entries in the item.dbc appearing as question marks.

    But unfortunately I don't want to release it to the public because it is part of an original set of features for my server. I can answer how you would go about doing it or if you are stuck with anything...
    Stoneharry always having the best custom solutions.

    Guess I gotta get to work writing the system myself.

    Do you have a publicly available server that people play on?


  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Iaccidentallytwink View Post
    Stoneharry always having the best custom solutions.

    Guess I gotta get to work writing the system myself.

    Do you have a publicly available server that people play on?
    A project that I work on and others work on in our free time. It's difficult to do much emulation with life and work.

    Light's Dawn - Index page

    But the way I fixed the item.dbc problem was with a program like this to pregenerate a pool of a few million records that can be selected from for display/sheath etc and the rest randomised each time. I GC items that no longer exist in the game (i.e: deleted).

    Code:
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Collections;
    
    namespace ItemDBCGenerator
    {
        class Program
        {
            private static Boolean debug = false;
    
            private static ItemRange[] RANGES = {
                new ItemRange(new UInt32[] { 1000000, 1830378 }, Constants.ItemClass.ARMOR, Constants.ArmorSubclass.MISC),
                new ItemRange(new UInt32[] { 1830379, 2660757 }, Constants.ItemClass.ARMOR, Constants.ArmorSubclass.CLOTH),
                new ItemRange(new UInt32[] { 2660758, 3491136 }, Constants.ItemClass.ARMOR, Constants.ArmorSubclass.LEATHER),
                new ItemRange(new UInt32[] { 3491137, 4321515 }, Constants.ItemClass.ARMOR, Constants.ArmorSubclass.MAIL),
                new ItemRange(new UInt32[] { 4321516, 5151894 }, Constants.ItemClass.ARMOR, Constants.ArmorSubclass.PLATE),
                new ItemRange(new UInt32[] { 5151895, 5982273 }, Constants.ItemClass.ARMOR, Constants.ArmorSubclass.SHIELD),
                new ItemRange(new UInt32[] { 5982274, 6812652 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.AXE_ONEH),
                new ItemRange(new UInt32[] { 6812653, 7643031 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.AXE_TWOH),
                new ItemRange(new UInt32[] { 7643032, 8473410 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.BOW),
                new ItemRange(new UInt32[] { 8473411, 9303789 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.GUN),
                new ItemRange(new UInt32[] { 9303790, 10134168 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.MACE_1H),
                new ItemRange(new UInt32[] { 10134169, 10964547 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.MACE_2H),
                new ItemRange(new UInt32[] { 10964548, 11794926 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.POLEARM),
                new ItemRange(new UInt32[] { 11794927, 12625305 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.SWORD_1H),
                new ItemRange(new UInt32[] { 12625306, 13455684 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.SWORD_2H),
                new ItemRange(new UInt32[] { 13455685, 14286063 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.STAFF),
                new ItemRange(new UInt32[] { 14286064, 15116442}, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.FIST_WEAPON),
                new ItemRange(new UInt32[] { 15116443, 15946821 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.DAGGER),
                new ItemRange(new UInt32[] { 15946822, 16777200 }, Constants.ItemClass.WEAPON, Constants.WeaponSubclass.CROSSBOW)
            };
    
            public static void print(String message, params Object[] arguments)
            {
                Console.WriteLine(String.Format(message, arguments));
            }
    
            static void Main(string[] args)
            {
                try
                {
                    print("Reading config...");
                    Config config = new Config();
                    config.loadFile();
    
                    print("Creating MySQL connection...");
                    MySQL mySQL = new MySQL(config);
    
                    Item dbc = new Item();
                    print("Loaded Item.dbc, records: {0}", dbc.header.RecordCount);
    
                    foreach (ItemRange range in RANGES)
                    {
                        Constants.WeaponSubclass weapon = range.weaponSubClass;
                        String type = "";
                        if (weapon != Constants.WeaponSubclass.NULL)
                            type = weapon.ToString();
                        else
                            type = range.armorSubClass.ToString();
                        UInt32[] r = range.range;
                        print("{0} type {1} has range:\t\t{2} - {3}", range.itemClass.ToString(), type, r[0], r[1]);
                    }
    
                    List<Item.DBC_Record> newRecords = new List<Item.DBC_Record>();
                    Random rand = new Random();
                    foreach (ItemRange range in RANGES)
                    {
                        int subClass = 0;
                        if (range.itemClass == Constants.ItemClass.ARMOR)
                            subClass = (int)range.armorSubClass;
                        else
                            subClass = (int)range.weaponSubClass;
                        print("Generating: {0}, {1}, {2}...", range.itemClass.ToString(), range.weaponSubClass.ToString(), range.armorSubClass.ToString());
                        String query = String.Format(@"
                            SELECT entry,class,subclass,SoundOverrideSubclass,displayid,inventoryType,Material,sheath FROM item_template WHERE
    	                        class = '{0}' AND
                                subclass = '{1}' AND
    	                        itemlevel < '{2}' AND
    	                        itemlevel > '{3}' AND
    	                        quality < '{4}' AND
                                quality > '{5}'
    	                        ORDER BY entry;",
                                (int)range.itemClass, subClass, 58, 10, 4, 1);
                        UInt32[] ranges = range.range;
                        var resultSet = mySQL.query(query).Rows;
                        int count = resultSet.Count - 1;
                        for (uint i = ranges[0]; i < ranges[1]; ++i)
                        {
                            var row = resultSet[rand.Next(0, count)];
                            Item.DBC_Record record = new Item.DBC_Record();
                            record.ID = i;
                            record.itemClass = UInt32.Parse(row[1].ToString());
                            record.itemSubClass = UInt32.Parse(row[2].ToString());
                            record.sound_override_subclassid = Int32.Parse(row[3].ToString());
                            record.itemDisplayInfo = UInt32.Parse(row[4].ToString());
                            record.inventorySlotID = UInt32.Parse(row[5].ToString());
                            record.materialID = Int32.Parse(row[6].ToString());
                            record.sheathID = Int32.Parse(row[7].ToString());
                            newRecords.Add(record);
                            if (debug)
                                print("[{0},\t{1},\t{2},\t{3},\t{4},\t{5},\t{6},\t{7},\t{8}]", record.ID, record.itemClass,
                                    record.itemSubClass, record.sound_override_subclassid, record.itemDisplayInfo,
                                    record.inventorySlotID, record.materialID, record.sheathID);
                        }
                    }
    
                    print("Generated {0} new records.", newRecords.Count);
    
                    print("Saving new Item.dbc...");
                    dbc.SaveDBCFile(newRecords.ToArray());
    
                    print("Done. Program terminating.");
                }
                catch (Exception e)
                {
                    print("ERROR: {0}", e.Message);
                }
            }
        }
    }
    I have a few public resources on my GitHub: https://github.com/stoneharry

Similar Threads

  1. Diablo III System Specifications
    By HI5 in forum Diablo 3 General
    Replies: 0
    Last Post: 09-07-2011, 10:16 PM
  2. [Guide] Loot Systems: DKP
    By Sn00p in forum World of Warcraft Guides
    Replies: 3
    Last Post: 04-26-2011, 03:06 PM
  3. [MaNGOS] loot system
    By blukkiee in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 04-12-2010, 06:06 PM
  4. how to fix loot options on group loot system
    By brain24 in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 11-21-2009, 02:35 AM
  5. [Guide] Easy Manigable Loot Systems
    By Airwavez in forum World of Warcraft Guides
    Replies: 3
    Last Post: 12-07-2007, 05:30 AM
All times are GMT -5. The time now is 04:34 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search