#Zombie Events

4 messages · Page 1 of 1 (latest)

gentle quarry
#

I'm working on a plugin that involves custom quests. Is there some sort of event to subscribe to that deals with zombies like an OnZombieKill event?

gentle quarry
#

Also, what is the best way to quickly find events?

warm kettle
# gentle quarry I'm working on a plugin that involves custom quests. Is there some sort of event...

RocketMod Example -

DamageTool.damageZombieRequested += OnDamageZombie;

private void OnDamageZombie(ref DamageZombieParameters parameters, ref bool shouldAllow)
{
    if (shouldAllow && parameters.zombie.health <= parameters.damage)
    {
        string questType = GetZombieQuestType(parameters.zombie);
    }
}

private string GetZombieQuestType(Zombie zombie)
{
    switch (zombie.speciality)
    {
        case EZombieSpeciality.NORMAL: return "KILLS_ZOMBIES_NORMAL";
        case EZombieSpeciality.MEGA: return "KILLS_ZOMBIES_MEGA";
        case EZombieSpeciality.CRAWLER: return "KILLS_ZOMBIES_CRAWLER";
        case EZombieSpeciality.SPRINTER: return "KILLS_ZOMBIES_SPRINTER";
        case EZombieSpeciality.FLANKER_STALK: return "KILLS_ZOMBIES_FLANKER";
        case EZombieSpeciality.BURNER: return "KILLS_ZOMBIES_BURNER";
        case EZombieSpeciality.ACID: return "KILLS_ZOMBIES_ACID";
        case EZombieSpeciality.BOSS_ELECTRIC:
        case EZombieSpeciality.BOSS_FIRE:
        case EZombieSpeciality.BOSS_WIND:
        case EZombieSpeciality.BOSS_ALL: return "KILLS_ZOMBIES_BOSS";
        default: return "KILLS_ZOMBIES_NORMAL";
    }
}