• 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.

[HELP] Zombies are weak

Newbie Spellweaver
Joined
Apr 14, 2015
Messages
27
Reaction score
0
Using PandemicZ source, zombies too weak-minded how to modify
 
Newbie Spellweaver
Joined
Apr 14, 2015
Messages
27
Reaction score
0
Re: [HELP] Zopmbie are weak

Thanks, it has been working, so where to set the BOSS drop?



Look in the Server source, and the zombie cpp file.
void obj_Zombie::DoDeath(bool fakeDeath)
{
extern wiInventoryItem RollItem(const LootBoxConfig* lootCfg, int depth);

// drop loot
{
if(u_GetRandom() < 0.8f) // 30% to drop that helmet
{
// 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.itemID = 'GOLD'; // HGear_Pumpkin_01
obj->m_Item.quantity = (int)u_GetRandom((float)25, (float)200) * 2;
}

if(!fakeDeath && spawnObject->lootBoxCfg)
{
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;
}
}

if(!fakeDeath && HalloweenZombie && u_GetRandom() < 0.3f) // 30% to drop that helmet//
{
// 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.itemID = 101112; // Christmas special//
obj->m_Item.quantity = 1;//
}
}
// remove from active zombies, but keep object - so it'll be visible for some time on all clients
StopNavAgent();
DeleteZombieNavAgent(navAgent);
navAgent = NULL;

SetTarget( invalidGameObjectID );
spawnObject->OnZombieKilled(this);

SwitchToState(EZombieStates::ZState_Dead);
}
I would like to know the role of these codes?
 
Upvote 0
Back
Top