Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Perk: Mysterious Stranger - Tests
- *
- * Description: Check perk_ms_h.fos
- * Author: Slowhand
- * Reviewer: n/a
- */
- #include "perk_ms_h.fos"
- #include "_defines.fos"
- #include "_macros.fos"
- #include "perk_ms.fos"
- /**< Prototype of target dummy. */
- #define TARGET_DUMMY_PID (80) // Gecko.
- /**< Dialogue scripts */
- void r_spawnTargetDummy(Critter& player, Critter@ npc)
- {
- npc.Say(SAY_NORM, "Spawning a Target Dummy!");
- Log("Spawning a Target Dummy!");
- int[] params =
- {
- ST_TEAM_ID, 0,
- ST_NPC_ROLE, 0,
- ST_REPLICATION_TIME, REPLICATION_NEVER
- };
- Map@ map = player.GetMap();
- Critter@ monster = map.AddNpc(TARGET_DUMMY_PID, player.HexX + 5, player.HexY + 5, 5, params, null, "mob@critter_init");
- if(valid(monster))
- {
- monster.SpawnedBy = player.Id;
- monster.Say(SAY_NORM, "You target dummy has arrived " + GetCritter(monster.SpawnedBy).Name + "!");
- }
- }
- void r_spawnMs(Critter& player, Critter@ npc)
- {
- if (isMsReadyToSpawn(player.Id))
- {
- npc.Say(SAY_NORM, "Spawning a Mysterious Stranger!");
- Log("Spawning a Mysterious Stranger!");
- spawnMysteriousStranger(player.Id);
- }
- }
- void r_despawnMs(Critter& player, Critter@ npc)
- {
- if (isMsSpawned(player.Id))
- {
- npc.Say(SAY_NORM, "Despawning a Mysterious Stranger!");
- Log("Despawning a Mysterious Stranger!");
- despawnMysteriousStranger(player.Id);
- }
- else
- {
- npc.Say(SAY_NORM, "Your Mysterious Stranger was not spawned!");
- Log("Your Mysterious Stranger was not spawned!");
- }
- }
- void r_resetMsPerkVars(Critter& player, Critter@ npc)
- {
- MS_LOG("r_addMsPerk - called from dialogue.");
- givePlayerMsPerkInit(player.Id);
- }
- void r_queryMsPerkStatus(Critter& player, Critter@ npc)
- {
- uint playerId = player.Id;
- string message = "Spawned = " + isMsSpawned(playerId)
- + ", Dead = " + isMsDead(playerId)
- + ", NormalSpawnAvail = " + isMsNormalSpawnAvailable(playerId)
- + ", MedicalSpawnAvail = " + isMsMedicalSpawnAvailable(playerId)
- + ", FirstAidAvail = " + isMsFirstAidAvailable(playerId)
- + ", DoctorAvail = " + isMsDoctorAvailable(playerId);
- MS_LOG(message);
- }
- void r_cripplePlayer(Critter& player, Critter@ npc)
- {
- player.DamageBase[DAMAGE_EYE] = 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement