Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // put code after this part
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // Called when a critter enters a map.
- void map_critter_in(Map& map, Critter& cr)
- {
- SetWalkRunTimeForNpcs(map, 0);
- RemoveArenaItems(cr);
- Location@ loc = map.GetLocation();
- //// from here
- // Check for Mysterious Stranger perk, and spawn the stranger if needed.
- if (_IsRealPlayer(cr) && doesPlayerHaveMsPerk(cr.Id))
- {
- MS_LOG("Player has MS perk and entering map.");
- if (loc.IsEncounter())
- {
- MS_LOG("Checking and possibly spawning MS for encounter.");
- spawnMysteriousStrangerForEncounter(cr.Id);
- }
- if (isMsAvailableOnMap(cr.Id))
- {
- // Add MS special spawn event for FA or Doctor appearance.
- MS_LOG("MS is allowed on this map, adding spawn event to player-attacked.");
- addMsSpawnEventsToPlayer(cr);
- }
- else
- {
- MS_LOG("MS is not allowed on this map, removing spawn event from player-attacked");
- removeMsSpawnEventsFromPlayer(cr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement