• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[snippet] number of items from superzombie

Joined
Oct 22, 2013
Messages
421
Reaction score
176
look for
Code:
void obj_Zombie::DoDeath(bool fakeDeath)
and make it look like this
Code:
void obj_Zombie::DoDeath(bool fakeDeath){
    extern wiInventoryItem RollItem(const LootBoxConfig* lootCfg, int depth);
    
    // drop loot
    if(!fakeDeath && spawnObject->lootBoxCfg)
    {
        int HowManyToDrop = 1;
        if( IsSuperZombie()) HowManyToDrop = 20;


        for(int Amount = 0; Amount < HowManyToDrop; Amount++)
        {
            wiInventoryItem wi = RollItem(spawnObject->lootBoxCfg, 0);
            if(wi.itemID > 0)
            {
                // create random position around zombie
                r3dPoint3D pos = GetPosition();
                pos.y += 0.4f;
                pos.x += u_GetRandom(-1, 1);
                pos.z += u_GetRandom(-1, 1);


                // create network object
                obj_DroppedItem* obj = (obj_DroppedItem*)srv_CreateGameObject("obj_DroppedItem", "obj_DroppedItem", pos);
                obj->SetNetworkID(gServerLogic.GetFreeNetId());
                obj->NetworkLocal = true;
                // vars
                obj->m_Item       = wi;
            }
        }
    }

you can change the
HowManyToDrop = 20;
for how many items you want to drop



Credits: GetRektBambi
 
Last edited:
Back
Top