Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function zombie_spawn()
- {
- can_drop = false;
- drop_type = undefined;
- if(RandomInt(0, 100) <= PERK_VULTUREAID_DROP_CHANCE)
- can_drop = true;
- if(self is_stink_zombie())
- drop_type = "stink";
- if(IS_TRUE(can_drop) && !isdefined(drop_type))
- {
- roll RandomInt(0, 100);
- chance_ammo = PERK_VULTUREAID_DROP_AMMO_CHANCE;
- chance_points = PERK_VULTUREAID_DROP_POINTS_CHANCE;
- chance_stink = PERK_VULTUREAID_STINK_DROP_CHANCE;
- chance_ammo_points= chance_ammo + chance_points;
- if(roll <= chance_ammo_points)
- {
- if(RandomInt(0, 100) <= 50)
- drop_type = "ammo";
- else
- drop_type = "points";
- }
- else if(roll <= chance_stink)
- drop_type = "stink";
- }
- if(isdefined(drop_type))
- {
- if(isdefined(level.perk_vulture.drop_count[drop_type]))
- {
- count = level.perk_vulture.drop_count[drop_type];
- max = level.perk_vulture.drop_count_max[drop_type];
- if(count >= max)
- {
- can_drop = false;
- drop_type = undefined;
- }
- }
- else
- {
- // Assume ammo / points
- ammo_count = level.perk_vulture.drop_count["ammo"];
- points_count = level.perk_vulture.drop_count["points"];
- max = level.perk_vulture.drop_count_max["ammo_points"];
- if(ammo_count + points_count >= max)
- {
- can_drop = false;
- drop_type = undefined;
- }
- }
- }
- if(IS_TRUE(can_drop) && isdefined(drop_type))
- {
- level.perk_vulture.drop_count[drop_type]++;
- IPrintLnBold("Zombie can drop");
- IPrintLnBold(drop_type);
- self._vulture_drop_type = drop_type;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement