Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void SpawnSkeletron()
- {
- bool flag = true;
- bool flag2 = false;
- Vector2 vector = default(Vector2);
- int num = 0;
- int num2 = 0;
- for (int i = 0; i < 200; i++)
- {
- if (Main.npc[i].active && Main.npc[i].type == 35)
- {
- flag = false;
- break;
- }
- }
- for (int j = 0; j < 200; j++)
- {
- if (Main.npc[j].active && Main.npc[j].type == 37)
- {
- flag2 = true;
- Main.npc[j].ai[3] = 1f;
- vector = Main.npc[j].position;
- num = Main.npc[j].width;
- num2 = Main.npc[j].height;
- if (Main.netMode == 2)
- {
- NetMessage.SendData(23, -1, -1, "", j, 0f, 0f, 0f, 0);
- }
- }
- }
- if (flag && flag2)
- {
- int num3 = NPC.NewNPC((int)vector.X + num / 2, (int)vector.Y + num2 / 2, 35, 0);
- Main.npc[num3].netUpdate = true;
- string str = "Skeletron";
- if (Main.netMode == 0)
- {
- Main.NewText(str + " " + Lang.misc[16], 175, 75, 255);
- return;
- }
- if (Main.netMode == 2)
- {
- NetMessage.SendData(25, -1, -1, str + " " + Lang.misc[16], 255, 175f, 75f, 255f, 0);
- }
- }
- }
Add Comment
Please, Sign In to add comment