Advertisement
Guest User

help me

a guest
Sep 4th, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.71 KB | None | 0 0
  1.         public override bool PreAI()
  2.         {
  3.             if (npc.ai[0] == 0)
  4.             {
  5.                 Main.NewText("The power of sock fetishes overwhelms you...", 224, 147, 4, true);
  6.                 npc.ai[0] = 1;
  7.             }
  8.             int hazumekAttackConj = 0;
  9.             int hazumekAttackIDCurrent = 0;
  10.  
  11.             npc.TargetClosest(true);
  12.             Player player = Main.player[npc.target];
  13.  
  14.             Random random = new Random();
  15.             // Run one of 4 normal attacks
  16.             Main.NewText(hazumekAttackIDCurrent);
  17.             if (hazumekAttackIDCurrent == 1)
  18.             {
  19.                 npc.ai[1]++;
  20.                 if (npc.ai[1] > 900)
  21.                 {
  22.                     Main.NewText("Hazumek NRM Attack 1", 224, 147, 4, true);
  23.                     hazumekAttackIDCurrent = random.Next(1,5);
  24.                     npc.ai[1] = 0;      
  25.                 }
  26.             }
  27.             if (hazumekAttackIDCurrent == 2)
  28.             {  
  29.                 npc.ai[1]++;                  
  30.                 if (npc.ai[1] > 900)
  31.                 {
  32.                     Main.NewText("Hazumek NRM Attack 2", 224, 147, 4, true);
  33.                     hazumekAttackIDCurrent = random.Next(1,5);
  34.                     npc.ai[1] = 0;      
  35.                 }
  36.             }
  37.             if (hazumekAttackIDCurrent == 3)
  38.             {
  39.                 npc.ai[1]++;
  40.                 if (npc.ai[1] > 900)
  41.                 {
  42.                     Main.NewText("Hazumek NRM Attack 3", 224, 147, 4, true);
  43.                     hazumekAttackIDCurrent = random.Next(1,5);  
  44.                     npc.ai[1] = 0;                      
  45.                 }
  46.             }
  47.             if (hazumekAttackIDCurrent == 4)
  48.             {
  49.                 npc.ai[1]++;
  50.                 if (npc.ai[1] > 900)
  51.                 {
  52.                     Main.NewText("Hazumek NRM Attack 4", 224, 147, 4, true);
  53.                     hazumekAttackIDCurrent = random.Next(1,5);    
  54.                     npc.ai[1] = 0;            
  55.                 }    
  56.             }
  57.  
  58.             // Run conjunction attack
  59.             if (hazumekAttackConj == 0)
  60.             {
  61.                 npc.ai[1]++;
  62.                 if (npc.ai[1] > 600)
  63.                 {
  64.                     Main.NewText("Hazumek CNJ Attack S1", 224, 147, 4, true);                    
  65.                     npc.ai[1] = 0;
  66.                 }
  67.                 hazumekAttackConj = 1;
  68.             }
  69.             if (hazumekAttackConj == 1)
  70.             {
  71.                 npc.ai[1]++;
  72.                 if (npc.ai[1] > 600)
  73.                 {
  74.                     Main.NewText("Hazumek CNJ Attack S2", 224, 147, 4, true);                    
  75.                     npc.ai[1] = 0;
  76.                 }
  77.                 hazumekAttackConj = 0;
  78.             }
  79.         return false;
  80.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement