Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[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