A while back I designed a random_gem code, with the help of some of you. At that time I also attempted to do a random_equipment code, failed. Within db.c in the load_old_obj I attempted to do an if obj->vnum equals 18 (the number I had defined) to call out to the random_equipment code to change all the values that gets set up within the load_old_obj. It ended up not changing the values and resetting a blank obj to the mob. To save me some more mental frustration and embarrassment I sought out snippets here, but found only random item codes that load the objects upon death. That's a start for me, at least I can get random objects to start loading once I get it coded in. However, the idea of objects loading upon death is quite lame to me, because I figure what monster is going to carry around a bunch of armour/weapons and not wear any of them? If there is a link I have missed with a random_item that loads the objects to the character before death I'd appreciate it, or psuedo code. I often over look aspects of code when I try to psuedo code. –Silence Tyire of Reanimation
If you are using [link=file]2580[/link] just do as Koron suggested; create the object when you load the mob vs on death. I only use mine loading on death to prevent people from look-checking mobs to see what mob is "of value" to kill for gear. All gear in the game the code is used in is from random drops only.