Advertisement
Guest User

boi

a guest
Jun 23rd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using Microsoft.Xna.Framework;
  4. using Microsoft.Xna.Framework.Graphics;
  5. using Terraria;
  6. using Terraria.ID;
  7. using Terraria.ModLoader;
  8. using Terraria.Localization;
  9.  
  10. namespace retrocity.NPCs.Town
  11. {
  12. public class Miner : ModNPC
  13. {
  14. public override bool Autoload(ref string name)
  15. {
  16. name = "Miner";
  17. return mod.Properties.Autoload;
  18. }
  19. public override void SetDefaults()
  20. {
  21. npc.townNPC = true;
  22. npc.friendly = true;
  23. npc.width = 18;
  24. npc.height = 40;
  25. npc.aiStyle = 7;
  26. npc.damage = 10;
  27. npc.defense = 15;
  28. npc.lifeMax = 250;
  29. npc.knockBackResist = 0.5f;
  30. Main.npcFrameCount[npc.type] = 16;
  31. animationType = NPCID.Guide;
  32. }
  33. public override bool CanTownNPCSpawn(int numTownNPCs, int money)
  34. {
  35.  
  36. return false;// this make that he will spawn when a house is available
  37. }
  38.  
  39.  
  40.  
  41. public override string TownNPCName()
  42. { //NPC names
  43. switch (WorldGen.genRand.Next(4))
  44. {
  45. case 0:
  46. return "Sully";
  47. case 1:
  48. return "Steve";
  49. case 2:
  50. return "Rocky";
  51. default:
  52. return "Isaac";
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement