Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int egg_preconditions()
- {
- int required_resupplies;
- int chance_of_occuring;
- int rand;
- // Has the mission already been played?
- // stat 15476 is a boolean flag which is set once the mission is triggered (we believe)
- // if that flag has been set, return false
- if (get_stat_bool(15476, -1, -1))
- {
- return 0;
- }
- // Has the player completed 600 resupplies
- required_resupplies = Global_262145.f_14865; /* 600 */
- if (get_gunrunning_stat(get_mp_character(), 5) < required_resupplies)
- {
- return 0;
- }
- // Is the time between 2100 and 2300?
- if (Global_2445989.f_3066.f_174 < Global_262145.f_14866 || Global_2445989.f_3066.f_174 >= Global_262145.f_14867)
- {
- return 0;
- }
- // This global value is set to 100 by default, but it's a tunable value.
- // It's effectively a % chance of occuring. The value is currently always 100 so it always passes.
- chance_of_occuring = Global_262145.f_14868;
- rand = GAMEPLAY::GET_RANDOM_INT_IN_RANGE(1, 100);
- if (rand > chance_of_occuring)
- {
- return 0;
- }
- // If all of the above conditions are met, the mission is entered into the regular rotation
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement