Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void process() {
- for (int i = 0; i < maxNPCs; i++) {
- if (npcs[i] != null) {
- if (npcs[i].initialized)
- npcs[i].clearUpdateFlags();
- else npcs[i].initialized = true;
- if (npcs[i].actionTimer > 0) {
- npcs[i].actionTimer -= 1;
- }
- if (npcs[i].immune > 0)
- npcs[i].immune--;
- if (npcs[i].npcType == 396 && misc.random(6) == 1) {
- npcs[i].textUpdate = "IM HUNGRY FOR SUM FISHIEZ, I WANT " + (400 - PlayerHandler.trollfish) + " MOAR!";
- npcs[i].textUpdateRequired = true;
- npcs[i].updateRequired = true;
- }
- if (npcs[i].npcType == 409) {
- if (server.playerHandler.players[npcs[i].barrowsyours] == null) {
- npcs[i] = null;
- continue;
- }
- if (npcs[i].actionTimer == 32)
- npcs[i].textUpdate = "Greetings, master " + server.playerHandler.players[npcs[i].barrowsyours].playerName;
- if (npcs[i].actionTimer == 20)
- npcs[i].textUpdate = "I'm losing my patience, talk to me NOW!";
- if (npcs[i].actionTimer == 0) {
- server.playerHandler.players[npcs[i].barrowsyours].teleportToX = 3222;
- server.playerHandler.players[npcs[i].barrowsyours].teleportToY = 3222;
- server.playerHandler.players[npcs[i].barrowsyours].heightLevel = 0;
- npcs[i].absX = 0;
- npcs[i].absY = 0;
- npcs[i] = null;
- continue;
- }
- if (npcs[i].actionTimer == 20 || npcs[i].actionTimer == 32) {
- npcs[i].textUpdateRequired = true;
- npcs[i].updateRequired = true;
- }
- }
- if (npcs[i].npcType == 2618 && misc.random(5) == 1) {
- if (!PlayerHandler.pitschampion.equalsIgnoreCase("nobody"))
- npcs[i].textUpdate = PlayerHandler.pitschampion + " is the current Fight Pits champion!";
- else
- npcs[i].textUpdate = "There is no current champion.";
- npcs[i].textUpdateRequired = true;
- npcs[i].updateRequired = true;
- }
- if (npcs[i].EntangleDelay > 0) npcs[i].EntangleDelay -= 1;
- if (npcs[i].blocktimer > 0) npcs[i].blocktimer -= 1;
- if (npcs[i].hurtrangedelay > 0) {
- npcs[i].hurtrangedelay -= 1;
- if (npcs[i].hurtrangedelay == 1) {
- client RAWR = (client) server.playerHandler.players[npcs[i].StartKilling];
- if (RAWR == null) continue;
- if (RAWR.defendnpcrange(i) || RAWR.PRange) {
- npcs[i].hurtrange = 0;
- } else {
- if (RAWR.playerEquipment[RAWR.playerRing] == 2550) {
- int recoildmg = 0;
- recoildmg += npcs[i].hurtrange * .1;
- if (recoildmg <= 0) {
- recoildmg = 1;
- }
- if (!server.npcHandler.npcs[i].hitUpdateRequired) {
- server.npcHandler.npcs[i].hitDiff = recoildmg;
- server.npcHandler.npcs[i].HP -= recoildmg;
- server.npcHandler.npcs[i].hitUpdateRequired = true;
- server.npcHandler.npcs[i].updateRequired = true;
- } else if (server.npcHandler.npcs[i].hitUpdateRequired && !server.npcHandler.npcs[i].hitUpdateRequired2) {
- server.npcHandler.npcs[i].hitDiff2 = recoildmg;
- server.npcHandler.npcs[i].HP -= recoildmg;
- server.npcHandler.npcs[i].hitUpdateRequired2 = true;
- server.npcHandler.npcs[i].updateRequired = true;
- }
- RAWR.recoil += 1;
- if (RAWR.recoil == 40) {
- RAWR.recoil = 0;
- RAWR.sendMessage("Your ring crumbles to dust");
- RAWR.playerEquipment[RAWR.playerRing] = -1;
- RAWR.playerEquipmentN[RAWR.playerRing] = -1;
- RAWR.outStream.createFrameVarSizeWord(34);
- RAWR.outStream.writeWord(1688);
- RAWR.outStream.writeByte(RAWR.playerRing);
- RAWR.outStream.writeWord(0);
- RAWR.outStream.writeByte(0); //amount
- RAWR.outStream.endFrameVarSizeWord();
- }
- }
- }
- if (RAWR.blocktimer == 0) {
- RAWR.startAnimation(RAWR.GetBlockAnim(RAWR.playerEquipment[RAWR.playerWeapon]));
- }
- RAWR.gethurt(npcs[i].hurtrange);
- }
- }
- if (npcs[i].hurtmagedelay > 0) {
- npcs[i].hurtmagedelay--;
- if (npcs[i].hurtmagedelay == 1) {
- boolean dontanim = false;
- client RAWR = (client) server.playerHandler.players[npcs[i].StartKilling];
- if (RAWR == null) continue;
- if (npcs[i].npcType == 13) {
- RAWR.gfx100(101);
- }
- if (npcs[i].npcType == 2025) {
- RAWR.gfx100(157);
- }
- if (npcs[i].npcType == 2745) {
- RAWR.gfx100(157);
- }
- if (npcs[i].npcType == 2743) {
- RAWR.gfx100(446);
- }
- if (npcs[i].npcType == 1643) {
- RAWR.gfx100(331);
- }
- if (npcs[i].npcType == 174) {
- if (npcs[i].attacktype == 1)
- RAWR.gfx100(104);
- else
- RAWR.gfx100(95);
- } else if (npcs[i].npcType >= 907 && npcs[i].npcType <= 911) {
- int number = misc.random(2);
- if (number == 2) {
- RAWR.gfx100(77);
- } else if (number == 1) {
- RAWR.gfx100(78);
- } else {
- RAWR.gfx100(76);
- }
- } else if (npcs[i].npcType == 2882 || npcs[i].npcType == 2884) {
- RAWR.gfx100(477);
- }
- if (npcs[i].npcType == 3200) {
- if (npcs[i].attacktype == 0) {
- RAWR.gfx100(558);
- } else if (npcs[i].attacktype == 1) {
- RAWR.startAnimation(3170);
- dontanim = true;
- RAWR.ResetAttackNPC();
- RAWR.gfx100(552);
- } else if (npcs[i].attacktype == 2) {
- RAWR.remove(RAWR.playerEquipment[3], 3);
- RAWR.gfx100(555);
- }
- }
- if (npcs[i].npcType == 50) {
- boolean splashed = false;
- if (!RAWR.npcsplash(i)) {
- splashed = true;
- }
- if (npcs[i].attacktype == 0) {
- RAWR.gfx100(430);
- }
- if (npcs[i].attacktype == 1) {
- RAWR.gfx100(429);
- if (!splashed)
- RAWR.poison(8);
- else
- RAWR.poison(4);
- }
- if (npcs[i].attacktype == 2) {
- RAWR.gfx100(431);
- if (!splashed)
- RAWR.EntangleDelay = 8;
- else
- RAWR.EntangleDelay = 4;
- }
- if (npcs[i].attacktype == 3) {
- RAWR.gfx100(428);
- if (!splashed)
- RAWR.lowerstats(npcs[i].hurtmage / 6);
- else
- RAWR.lowerstats(npcs[i].hurtmage / 10);
- }
- }
- if ((npcs[i].npcType == 174 && npcs[i].attacktype == 1) || (!RAWR.npcsplash(i) || RAWR.PMage) && npcs[i].npcType != 742 && npcs[i].npcType != 942 && npcs[i].npcType != 50 && npcs[i].npcType != 3200 && npcs[i].npcType != 1592 && npcs[i].npcType != 1590 && npcs[i].npcType != 1591) {
- npcs[i].hurtmage = 0;
- if (npcs[i].npcType == 174 && npcs[i].attacktype == 1) {
- if (RAWR.playerLevel[1] > 0) {
- RAWR.playerLevel[2]--;
- RAWR.writestats();
- }
- } else {
- if (npcs[i].npcType != 2745)
- RAWR.gfx100(85);
- }
- } else {
- if (npcs[i].npcType == 1913) {
- RAWR.EntangleDelay = 20;
- RAWR.stillgfx(369, RAWR.absY, RAWR.absX);
- RAWR.WalkTo(0, 0);
- }
- if (npcs[i].npcType == 1961) {
- RAWR.EntangleDelay = 10;
- RAWR.gfx100(179);
- RAWR.teleportToX = RAWR.absX;
- RAWR.teleportToY = RAWR.absY;
- }
- if (RAWR.blocktimer == 0 && !dontanim) {
- RAWR.startAnimation(RAWR.GetBlockAnim(RAWR.playerEquipment[RAWR.playerWeapon]));
- }
- RAWR.gethurt(npcs[i].hurtmage);
- }
- }
- }
- if (npcs[i].poisonTimer > 0) {
- npcs[i].poisonTimer -= 1;
- npcs[i].poisondmg = false;
- if (npcs[i].poisonTimer == 1 && npcs[i].poisondamage != 0) {
- Poison(i);
- }
- if (npcs[i].poisondamg == 1) {
- npcs[i].poisondamg = 4;
- npcs[i].poisondamage -= 1;
- }
- }
- if (npcs[i].npcType >= 3732 && npcs[i].npcType <= 3771 && !npcs[i].fighting) {
- if (npcs[i].npcType >= 3747 && npcs[i].npcType <= 3751) {
- } else {
- npcs[i].IsAttackingNPC = true;
- npcs[i].attacknpc = server.playerHandler.voidknight;
- npcs[i].RandomWalk = false;
- }
- }
- if ((npcs[i].npcType == 1265 || npcs[i].npcType == 1267 || npcs[i].npcType == 2889 || npcs[i].npcType == 2452) && npcs[i].RandomWalk && misc.random(3) == 1) {
- boolean spawned = false;
- try {
- for (int H = 0; H < PlayerHandler.maxPlayers; H++) {
- if (spawned) continue;
- if (server.playerHandler.players[H] == null) continue;
- client WQ = (client) server.playerHandler.players[H];
- if (WQ.GoodDistance(WQ.absX, WQ.absY, npcs[i].absX, npcs[i].absY, 1)) {
- newNPC(npcs[i].npcType + 1, npcs[i].absX, npcs[i].absY, npcs[i].heightLevel, npcs[i].moverangeX1, npcs[i].moverangeY1, npcs[i].moverangeX2, npcs[i].moverangeY2, 0, 50, true);
- npcs[i].absX = 1;
- npcs[i].absY = 1;
- spawned = true;
- npcs[i] = null;
- continue;
- }
- }
- } catch (Exception E) {
- }
- if (spawned) continue;
- }
- if (npcs[i].npcType == 1266 || npcs[i].npcType == 1268 || npcs[i].npcType == 2890 || npcs[i].npcType == 2453) {
- boolean spawned = false;
- try {
- for (int H = 0; H < PlayerHandler.maxPlayers; H++) {
- if (spawned) ;
- if (server.playerHandler.players[H] == null) continue;
- client WQ = (client) server.playerHandler.players[H];
- if (WQ.GoodDistance(WQ.absX, WQ.absY, npcs[i].absX, npcs[i].absY, 1)) {
- newNPC(npcs[i].npcType - 1, npcs[i].absX, npcs[i].absY, npcs[i].heightLevel, npcs[i].moverangeX1, npcs[i].moverangeY1, npcs[i].moverangeX2, npcs[i].moverangeY2, 0, 50, true);
- npcs[i].absX = 1;
- npcs[i].absY = 1;
- spawned = true;
- npcs[i] = null;
- continue;
- }
- }
- } catch (Exception E) {
- }
- if (spawned) continue;
- }
- if (npcs[i].walkTimer > 0) {
- npcs[i].walkTimer--;
- }
- if (npcs[i].npcType == 3777 && !npcs[i].IsDead) {
- if (npcs[i].actionTimer == 0) {
- npcs[i].actionTimer = 30;
- int pc = randompcnpc();
- if (!GetNpcName(pc).toLowerCase().contains("shifter")) {
- newNPC(pc, 2631, 2592 + misc.random(1), npcs[i].heightLevel, 2681, 2598, 2630, 2569, 1, GetNpcListHP(pc), false);
- } else {
- newNPC(pc, 2648 + misc.random(10), 2585 + misc.random(10), npcs[i].heightLevel, 2662, 2599, 2648, 2585, 1, GetNpcListHP(pc), false);
- }
- }
- }
- if (npcs[i].npcType == 3778 && !npcs[i].IsDead) {
- if (npcs[i].actionTimer == 0) {
- npcs[i].actionTimer = 30;
- int pc = randompcnpc();
- if (!GetNpcName(pc).toLowerCase().contains("shifter")) {
- newNPC(pc, 2679, 2592 + misc.random(1), npcs[i].heightLevel, 2681, 2598, 2630, 2569, 1, GetNpcListHP(pc), false);
- } else {
- newNPC(pc, 2648 + misc.random(10), 2585 + misc.random(10), npcs[i].heightLevel, 2662, 2599, 2648, 2585, 1, GetNpcListHP(pc), false);
- }
- }
- }
- if ((npcs[i].npcType == 3779 || npcs[i].npcType == 3780) && !npcs[i].IsDead) {
- if (npcs[i].actionTimer == 0) {
- npcs[i].actionTimer = 30;
- int pc = randompcnpc();
- if (!GetNpcName(pc).toLowerCase().contains("shifter")) {
- newNPC(pc, npcs[i].absX, npcs[i].absY + 1, npcs[i].heightLevel, 2681, 2598, 2630, 2569, 1, GetNpcListHP(pc), false);
- } else {
- newNPC(pc, 2648 + misc.random(10), 2585 + misc.random(10), npcs[i].heightLevel, 2662, 2599, 2648, 2585, 1, GetNpcListHP(pc), false);
- }
- }
- }
- if (!npcs[i].IsDead) {
- if (npcs[i].npcType >= 3747 && npcs[i].npcType <= 3751 && !npcs[i].fighting && npcs[i].actionTimer == 0) {
- if (PlayerHandler.purpleportal != -1 && npcs[PlayerHandler.purpleportal].HP < 200 && !npcs[PlayerHandler.purpleportal].IsDead) {
- if (npcs[i].closeenough(npcs[PlayerHandler.purpleportal].absX, npcs[PlayerHandler.purpleportal].absY, 7)) {
- if (npcs[i].closeenough(npcs[PlayerHandler.purpleportal].absX, npcs[PlayerHandler.purpleportal].absY, 1))
- healport(i, PlayerHandler.purpleportal);
- else
- FollowNpc(i, PlayerHandler.purpleportal);
- }
- }
- }
- if (npcs[i].npcType >= 3747 && npcs[i].npcType <= 3751 && !npcs[i].fighting && npcs[i].actionTimer == 0) {
- if (PlayerHandler.blueportal != -1 && npcs[PlayerHandler.blueportal].HP < 200 && !npcs[PlayerHandler.blueportal].IsDead) {
- if (npcs[i].closeenough(npcs[PlayerHandler.blueportal].absX, npcs[PlayerHandler.blueportal].absY, 7)) {
- if (npcs[i].closeenough(npcs[PlayerHandler.blueportal].absX, npcs[PlayerHandler.blueportal].absY, 1))
- healport(i, PlayerHandler.blueportal);
- else
- FollowNpc(i, PlayerHandler.blueportal);
- }
- }
- }
- if (npcs[i].npcType >= 3747 && npcs[i].npcType <= 3751 && !npcs[i].fighting && npcs[i].actionTimer == 0) {
- if (PlayerHandler.yellowportal != -1 && npcs[PlayerHandler.yellowportal].HP < 200 && !npcs[PlayerHandler.yellowportal].IsDead) {
- if (npcs[i].closeenough(npcs[PlayerHandler.yellowportal].absX, npcs[PlayerHandler.yellowportal].absY, 7)) {
- if (npcs[i].closeenough(npcs[PlayerHandler.yellowportal].absX, npcs[PlayerHandler.yellowportal].absY, 1))
- healport(i, PlayerHandler.yellowportal);
- else
- FollowNpc(i, PlayerHandler.yellowportal);
- }
- }
- }
- if (npcs[i].npcType >= 3747 && npcs[i].npcType <= 3751 && !npcs[i].fighting && npcs[i].actionTimer == 0) {
- if (PlayerHandler.redportal != -1 && npcs[PlayerHandler.redportal].HP < 200 && !npcs[PlayerHandler.redportal].IsDead) {
- if (npcs[i].closeenough(npcs[PlayerHandler.redportal].absX, npcs[PlayerHandler.redportal].absY, 7)) {
- if (npcs[i].closeenough(npcs[PlayerHandler.redportal].absX, npcs[PlayerHandler.redportal].absY, 1))
- healport(i, PlayerHandler.redportal);
- else
- FollowNpc(i, PlayerHandler.redportal);
- }
- }
- }
- if (npcs[i].npcType == 708 && misc.random(50) == 1) {
- Graphics(86, npcs[i].absX, npcs[i].absY);
- Imp(npcs[i].HP);
- npcs[i].absX = 0;
- npcs[i].absY = 0;
- npcs[i] = null;
- continue;
- }
- if (npcs[i].npcType == 1431 || npcs[i].npcType == 1432) {
- if (npcs[i].actionTimer == 0) {
- if (npcs[i].IsDead == false) {
- for (int r = 0; r < PlayerHandler.maxPlayers; r++) {
- if (server.playerHandler.players[r] != null) {
- client PLAYER = (client) server.playerHandler.players[r];
- if (PLAYER.distanceToPoint(npcs[i].absX, npcs[i].absY) == 1) {
- npcs[i].animNumber = 1402;
- npcs[i].updateRequired = true;
- npcs[i].animUpdateRequired = true;
- PLAYER.jailtimer = 5;
- if (!PLAYER.hitUpdateRequired) {
- PLAYER.hitDiff = 15;
- PLAYER.NewHP -= 15;
- PLAYER.updateRequired = true;
- PLAYER.hitUpdateRequired = true;
- } else if (PLAYER.hitUpdateRequired && !PLAYER.hitUpdateRequired2) {
- PLAYER.hitDiff2 = 15;
- PLAYER.NewHP -= 15;
- PLAYER.updateRequired = true;
- PLAYER.hitUpdateRequired2 = true;
- } else {
- PLAYER.appendHitUpdate(PLAYER.inStream);
- }
- npcs[i].actionTimer = 6;
- }
- }
- }
- }
- }
- }
- if (!npcs[i].fighting && npcs[i].RandomWalk) {
- boolean AGGRESSIVE = false;
- for (int WTF = 0; WTF < Aggressive.length; WTF++) {
- if (Aggressive[WTF] == npcs[i].npcType) {
- AGGRESSIVE = true;
- }
- }
- if (AGGRESSIVE) {
- for (int PLAYER = 0; PLAYER < PlayerHandler.maxPlayers; PLAYER++) {
- if (server.playerHandler.players[PLAYER] == null) continue;
- if (server.playerHandler.players[PLAYER].areatimer > 500) continue;
- client person = (client) server.playerHandler.players[PLAYER];
- if (npcs[i].closeenough(person.absX, person.absY, npcs[i].npcType == 2894 || npcs[i].npcType == 2892 ? 10 : 5))
- npcs[i].RandomWalk = false;
- npcs[i].IsUnderAttack = true;
- npcs[i].StartKilling = PLAYER;
- }
- }
- }
- if (npcs[i].RandomWalk == true && npcs[i].walkTimer == 0 && npcs[i].moverangeX1 > 0 && npcs[i].moverangeY1 > 0 && npcs[i].moverangeX2 > 0 && npcs[i].moverangeY2 > 0 && npcs[i].npcType != 2892 && npcs[i].npcType != 2894 & npcs[i].npcType != 1456) { //Move NPC
- if (npcs[i].npcType == 1266 || npcs[i].npcType == 1268 || npcs[i].npcType == 2890 || npcs[i].npcType == 2453)
- continue;
- if (npcs[i].npcType == 1431 || npcs[i].npcType == 1432) {
- int X = npcs[i].absX;
- int Y = npcs[i].absY;
- if (X == 2767 && Y == 2801 && npcs[i].back == false) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2767 && Y == 2800) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2767 && Y == 2799) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2767 && Y == 2798) {
- npcs[i].moveX = 1;
- npcs[i].moveY = 0;
- }
- if (X == 2768 && Y == 2798) {
- npcs[i].moveX = 1;
- npcs[i].moveY = 0;
- }
- if (X == 2769 && Y == 2798) {
- npcs[i].moveX = 1;
- npcs[i].moveY = 0;
- }
- if (X == 2770 && Y == 2798) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2770 && Y == 2799) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2770 && Y == 2800) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2770 && Y == 2801) {
- npcs[i].moveX = 1;
- npcs[i].moveY = 0;
- }
- if (X == 2771 && Y == 2801) {
- npcs[i].moveX = 1;
- npcs[i].moveY = 0;
- }
- if (X == 2772 && Y == 2801) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2772 && Y == 2800) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2772 && Y == 2799) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2772 && Y == 2798) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2772 && Y == 2797) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2772 && Y == 2796) {
- npcs[i].moveX = -1;
- npcs[i].moveY = 0;
- }
- if (X == 2771 && Y == 2796) {
- npcs[i].moveX = -1;
- npcs[i].moveY = 0;
- npcs[i].back = true;
- }
- if (npcs[i].back) {
- if (X == 2770 && Y == 2796) {
- npcs[i].moveX = 1;
- npcs[i].moveY = 0;
- }
- if (X == 2771 && Y == 2796) {
- npcs[i].moveX = 1;
- npcs[i].moveY = 0;
- }
- if (X == 2772 && Y == 2796) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2772 && Y == 2797) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2772 && Y == 2798) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2772 && Y == 2799) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2772 && Y == 2800) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2772 && Y == 2801) {
- npcs[i].moveX = -1;
- npcs[i].moveY = 0;
- }
- if (X == 2771 && Y == 2801) {
- npcs[i].moveX = -1;
- npcs[i].moveY = 0;
- }
- if (X == 2770 && Y == 2801) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2770 && Y == 2800) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2770 && Y == 2799) {
- npcs[i].moveX = 0;
- npcs[i].moveY = -1;
- }
- if (X == 2770 && Y == 2798) {
- npcs[i].moveX = -1;
- npcs[i].moveY = 0;
- }
- if (X == 2769 && Y == 2798) {
- npcs[i].moveX = -1;
- npcs[i].moveY = 0;
- }
- if (X == 2768 && Y == 2798) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2768 && Y == 2799) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2768 && Y == 2800) {
- npcs[i].moveX = 0;
- npcs[i].moveY = 1;
- }
- if (X == 2768 && Y == 2801) {
- for (int E = 0; E < maxNPCs; E++) {
- if (npcs[E] != null) {
- if (npcs[E].absX == 2767 && npcs[E].absY == 2801 && npcs[E] != npcs[i]) {
- npcs[E].back = false;
- npcs[E].moveX = 0;
- npcs[E].moveY = -1;
- npcs[E].walkTimer = 5;
- npcs[E].updateRequired = true;
- if (npcs[E].npcType == 1432) {
- npcs[E].getNextNPCMovement();
- }
- }
- }
- }
- npcs[i].moveX = -1;
- npcs[i].moveY = 0;
- }
- }
- npcs[i].updateRequired = true;
- npcs[i].walkTimer = 4;
- } else {
- boolean minus = false;
- if (npcs[i].walkToX == 0 && npcs[i].walkToY == 0) {
- npcs[i].walkToX = -4 + misc.random(8);
- npcs[i].walkToY = -4 + misc.random(8);
- } else
- minus = true;
- int movetoX = npcs[i].walkToX;
- int movetoY = npcs[i].walkToY;
- if (movetoX > 1) movetoX = 1;
- if (movetoX < -1) movetoX = -1;
- if (movetoY > 1) movetoY = 1;
- if (movetoY < -1) movetoY = -1;
- npcs[i].moveX = movetoX;
- npcs[i].moveY = movetoY;
- if (minus) {
- npcs[i].walkToX -= movetoX;
- npcs[i].walkToY -= movetoY;
- }
- if (npcs[i].walkToX != 0 || npcs[i].walkToY != 0) npcs[i].walkTimer = 0;
- else npcs[i].walkTimer = 2 + misc.random(6);
- npcs[i].updateRequired = true;
- }
- } else if (npcs[i].IsAttackingNPC && !npcs[i].fighting) {
- int npcType = npcs[i].npcType;
- if (npcType >= 3752 && npcType <= 3771)
- AttackNPCMage(i);
- else
- AttackNPC(i);
- } else if (npcs[i].RandomWalk == false && npcs[i].IsUnderAttack == true) {
- if (server.playerHandler.players[npcs[i].StartKilling] != null) {
- int EnemyX = server.playerHandler.players[npcs[i].StartKilling].absX;
- int EnemyY = server.playerHandler.players[npcs[i].StartKilling].absY;
- if (MageNPC(npcs[i].npcType) || (npcs[i].npcType <= 1592 && npcs[i].npcType >= 1590) && !npcs[i].closeenough(EnemyX, EnemyY, 1) || npcs[i].npcType == 3200 || npcs[i].npcType == 2743 || ((npcs[i].npcType == 1158 || npcs[i].npcType == 1160) && ((npcs[i].closeenough(EnemyX, EnemyY, 1) && misc.random(1) == 1) || (!npcs[i].closeenough(EnemyX, EnemyY, 1)) && misc.random(2) == 1)) || (npcs[i].npcType >= 3752 && npcs[i].npcType <= 3761) || (npcs[i].npcType == 1961 || npcs[i].npcType == 1913 || npcs[i].npcType == 1914 || npcs[i].npcType == 742 || npcs[i].npcType == 50) && (misc.random(1) == 1 || !npcs[i].closeenough(EnemyX, EnemyY, 1)) || (npcs[i].npcType >= 907 && npcs[i].npcType <= 911) || npcs[i].npcType == 1472 && (misc.random(2) == 1 || !npcs[i].closeenough(EnemyX, EnemyY, 1)) || npcs[i].npcType == 2894 || npcs[i].npcType == 2884 || npcs[i].npcType == 2882 || npcs[i].npcType == 174 || npcs[i].npcType == 172 || npcs[i].npcType == 2025 || npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 2745 && ((misc.random(1) == 1 && !npcs[i].closeenough(EnemyX, EnemyY, 1)) || (misc.random(2) == 1 && !npcs[i].closeenough(EnemyX, EnemyY, 1))) || npcs[i].npcType == 910 || npcs[i].npcType == 913 || npcs[i].npcType == 912 || npcs[i].npcType == 1007) {
- AttackPlayerMage(i);
- } else if (npcs[i].npcType == 2739 || ((npcs[i].npcType == 1158 || npcs[i].npcType == 1160) && (!npcs[i].closeenough(EnemyX, EnemyY, 1) || (npcs[i].closeenough(EnemyX, EnemyY, 1) && misc.random(2) == 1))) || (npcs[i].npcType >= 3762 && npcs[i].npcType <= 3771) || npcs[i].npcType == 2028 || npcs[i].npcType == 1183 || npcs[i].npcType == 1456 || npcs[i].npcType == 2892 || npcs[i].npcType == 2881 || npcs[i].npcType == 1246 || !npcs[i].closeenough(EnemyX, EnemyY, 1) && (npcs[i].npcType == 2456 || npcs[i].npcType == 2455 || npcs[i].npcType == 1347 || npcs[i].npcType == 1346 || npcs[i].npcType == 1345 || npcs[i].npcType == 1344 || npcs[i].npcType == 1343 || npcs[i].npcType == 1342 || npcs[i].npcType == 1341 || npcs[i].npcType == 1340 || npcs[i].npcType == 1338 || npcs[i].npcType == 1339) || npcs[i].npcType == 2025 || npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 2745 && !npcs[i].closeenough(EnemyX, EnemyY, 1) || npcs[i].npcType == 2745 && misc.random(3) == 1 || npcs[i].npcType == 910 || npcs[i].npcType == 913 || npcs[i].npcType == 912 || npcs[i].npcType == 1007) {
- AttackPlayerRange(i);
- } else if (npcs[i].npcType != 3777 && npcs[i].npcType != 3778 && npcs[i].npcType != 3779 && npcs[i].npcType != 3780) {
- AttackPlayer(i);
- }
- if (npcs[i] == null) {
- continue;
- }
- }
- }
- if (npcs[i].RandomWalk == true) {
- npcs[i].getNextNPCMovement();
- }
- } else if (npcs[i].IsDead == true) {
- if (npcs[i].actionTimer == 0 && npcs[i].DeadApply == false && npcs[i].NeedRespawn == false) {
- int killer = npcs[i].getKiller();
- ResetAttackPlayer(i);
- if (server.playerHandler.players[killer] != null) {
- client zee = (client) server.playerHandler.players[killer];
- if (GetNpcName(npcs[i].npcType).toLowerCase().equals(GetNpcName(zee.SlayTaskNPC).toLowerCase())) {
- try {
- zee.addSkillXP(npcs[i].MaxHP * 10, 18);
- zee.AmToKillNPC--;
- if (zee.AmToKillNPC == 0) zee.finishtask();
- } catch (Exception E) {
- }
- }
- switch (npcs[i].npcType) {
- case 90:
- npcs[i].animNumber = 263;
- break;
- case 3727://splatter
- npcs[i].gfx100(661);
- case 3728://splatter
- if (npcs[i].npcType == 3728)
- npcs[i].gfx100(662);
- case 3729://splatter
- if (npcs[i].npcType == 3729)
- npcs[i].gfx100(663);
- case 3730://splatter
- if (npcs[i].npcType == 3730)
- npcs[i].gfx100(664);
- case 3731://splatter
- if (npcs[i].npcType == 3731)
- npcs[i].gfx100(665);
- Splat(npcs[i]);
- break;
- case 1265:
- case 1267:
- case 2452:
- npcs[i].animNumber = 1314;
- break;
- case 751://Zombies!!
- npcs[i].animNumber = 302;
- case 2607:
- case 2616:
- npcs[i].animNumber = 2608;
- break;
- case 907: // Kolodion
- npcs[i].animNumber = 714;
- break;
- case 908: // Kolodion
- npcs[i].animNumber = 133;
- break;
- case 909: // Kolodion
- npcs[i].animNumber = 148;
- break;
- case 910: // Kolodion
- npcs[i].animNumber = 714;
- break;
- case 911: // Kolodion
- npcs[i].animNumber = 71;
- break;
- case 655://tree spirit, from lost city.
- npcs[i].animNumber = 126;
- zee.qstage[1] = 3;
- zee.summonedspirit = false;
- break;
- case 397:
- case 1766:
- case 1767:
- case 1768:
- npcs[i].animNumber = 0x03E; //cow dead
- break;
- case 41:
- case 2693:
- case 2694:
- npcs[i].animNumber = 0x039; //chicken dead
- break;
- case 87:
- npcs[i].animNumber = 0x08D; //rat dead
- break;
- case 2028:
- npcs[i].animNumber = 0x900; //Human
- break;
- case 2025:
- npcs[i].animNumber = 0x900; //Human
- break;
- case 2026:
- npcs[i].animNumber = 0x900; //Human
- break;
- case 2030:
- npcs[i].animNumber = 0x900; //Human
- break;
- case 2027:
- npcs[i].animNumber = 0x900; //Human
- break;
- case 2029:
- npcs[i].animNumber = 0x900; //Human
- break;
- case 2628: //fightcaves lvl 22
- npcs[i].animNumber = 2620;
- break;
- case 2738: //fightcaves fat 22
- npcs[i].animNumber = 2627;
- break;
- case 2629: //fightcaves lvl 45
- npcs[i].animNumber = 2627;
- break;
- case 2739: //fightcaves lvl 90
- npcs[i].animNumber = 2630;
- break;
- case 2741: //fightcaves lvl 180
- npcs[i].animNumber = 2638;
- break;
- case 2743: //fightcaves lvl 360
- npcs[i].animNumber = 2646;
- break;
- case 2745: //fightcaves Jad
- npcs[i].animNumber = 2654;
- break;
- case 1626:
- case 1627:
- case 1628:
- case 1629:
- case 1630:
- case 1631:
- case 1632: //turoth!
- npcs[i].animNumber = 1597;
- break;
- case 1616: //basilisk
- npcs[i].animNumber = 1548;
- break;
- case 1653: //hand
- npcs[i].animNumber = 1590;
- break;
- case 1612: //banshee
- npcs[i].animNumber = 1524;
- break;
- case 742:
- npcs[i].animNumber = 92;
- break;
- case 1340:
- case 1341:
- case 1351:
- npcs[i].animNumber = 1342;
- break;
- case 82:
- case 83:
- case 84://demon dead
- npcs[i].animNumber = 67;
- break;
- case 1913://kamil dead
- npcs[i].animNumber = 843;
- break;
- case 3200:
- npcs[i].animNumber = 3147; // drags: chaos ele emote ( YESSS )
- break;
- case 1605:
- npcs[i].animNumber = 1508; // drags: abberant spector ( YAY )
- break;
- case 50: //King Black Dragon
- case 53: //Red Dragon
- case 54: //Black Dragon
- case 55: //Blue Dragon
- case 941: //Green Dragon
- case 1590: //Bronze Dragon
- case 1591: //Iron Dragon
- case 1592://Steel Dragon
- npcs[i].animNumber = 92;
- break;
- case 1158:
- npcs[i].animNumber = 1187;
- break;
- case 1160:
- npcs[i].animNumber = 1182;
- break;
- case 3772://Brawlers(Pest Control)
- case 3773://Brawlers(Pest Control)
- case 3774://Brawlers(Pest Control)
- case 3775://Brawlers(Pest Control)
- case 3776://Brawlers(Pest Control)
- npcs[i].animNumber = 3894;
- break;
- case 3732://shifters(Pest Control)
- case 3733://shifters(Pest Control)
- case 3734://shifters(Pest Control)
- case 3735://shifters(Pest Control)
- case 3736://shifters(Pest Control)
- case 3737://shifters(Pest Control)
- case 3738://shifters(Pest Control)
- case 3739://shifters(Pest Control)
- case 3740://shifters(Pest Control)
- case 3741://shifters(Pest Control)
- case 3742://shifters(Pest Control)
- case 3747://Spinners(Pest Control)
- case 3748://Spinners(Pest Control)
- case 3749://Spinners(Pest Control)
- case 3750://Spinners(Pest Control)
- case 3751://Spinners(Pest Control)
- npcs[i].animNumber = 3903;
- break;
- case 3752://Torcher(Pest Control)
- case 3753://Torcher(Pest Control)
- case 3754://Torcher(Pest Control)
- case 3755://Torcher(Pest Control)
- case 3756://Torcher(Pest Control)
- case 3757://Torcher(Pest Control)
- case 3758://Torcher(Pest Control)
- case 3759://Torcher(Pest Control)
- case 3760://Torcher(Pest Control)
- case 3761://Torcher(Pest Control)
- npcs[i].animNumber = 3881;
- break;
- case 3762://Defiler(Pest Control)
- case 3763://Defiler(Pest Control)
- case 3764://Defiler(Pest Control)
- case 3765://Defiler(Pest Control)
- case 3766://Defiler(Pest Control)
- case 3767://Defiler(Pest Control)
- case 3768://Defiler(Pest Control)
- case 3769://Defiler(Pest Control)
- case 3770://Defiler(Pest Control)
- case 3771://Defiler(Pest Control)
- npcs[i].animNumber = 3922;
- break;
- case 2889:
- npcs[i].animNumber = 2862;
- case 51: //Baby Dragon
- case 52: //Baby Blue Dragon
- case 1589: //Baby Red Dragon
- case 3376: //Baby Black Dragon
- npcs[i].animNumber = 28;
- /**End of Dragon Death Emotes **/
- break;
- /**Start Of Slayer Monster Death Emotes **/
- case 1610: //Gargoyle
- case 1611://Gargoyle
- npcs[i].animNumber = 1518;
- break;
- case 1618: //Bloodveld
- case 1619://Bloodveld
- npcs[i].animNumber = 1553;
- break;
- case 1620: //Cockatrice
- case 1621://Cockatrice
- npcs[i].animNumber = 1563;
- break;
- case 1622: //Rockslug
- case 1623://Rockslug
- npcs[i].animNumber = 1568;
- break;
- case 1608: //Kurask
- case 1609://Kurask
- npcs[i].animNumber = 1513;
- break;
- case 2783: //Dark Beast
- npcs[i].animNumber = 2732;
- break;
- case 1615: //Abyssal Deamon
- npcs[i].animNumber = 1538;
- break;
- case 1624: //Dustdevil
- npcs[i].animNumber = 1558;
- break;
- case 1613: //Nechryael
- npcs[i].animNumber = 1530;
- break;
- case 1633: //Pyrefiend
- case 1634: //Pyrefiend
- case 1635: //Pyrefiend
- case 1636: //Pyrefiend
- npcs[i].animNumber = 1580;
- break;
- case 1637: //Jelly
- case 1638: //Jelly
- case 1639: //Jelly
- case 1640: //Jelly
- case 1641: //Jelly
- case 1642: //Jelly
- npcs[i].animNumber = 1587;
- break;
- case 1648: //Crawling Hand
- case 1649: //Crawling Hand
- case 1650: //Crawling Hand
- case 1651: //Crawling Hand
- case 1652: //Crawling Hand
- case 1654: //Crawling Hand
- case 1655: //Crawling Hand
- case 1656: //Crawling Hand
- case 1657: //Crawling Hand
- npcs[i].animNumber = 1590;
- break;
- /** End Of Slayer NPC Death Emotes **/
- /** Start Of Tzhaar NPC Death Emotes **/
- case 2734: //Tz-Kih
- case 2735://Tz-Kih
- npcs[i].animNumber = 1513;
- break;
- case 2736: //Tz-Kek
- case 2737: //Tz-Kek
- npcs[i].animNumber = 2627;
- break;
- /**End of TzHaar NPC Death Emotes **/
- /**Start Of Misc NPC Death Emotes **/
- case 2919: //Agrith Naar
- npcs[i].animNumber = 3503;
- break;
- case 3340: //Giant Mole
- npcs[i].animNumber = 3310;
- break;
- case 107: //Scorpion
- case 108: //Poison Scorpion
- npcs[i].animNumber = 248;
- break;
- case 708: //Imp
- case 709: //Imp
- npcs[i].animNumber = 172;
- break;
- case 100: //Goblin
- case 101: //Goblin
- case 102: //Goblin
- npcs[i].animNumber = 313;
- break;
- case 105: //Bear
- case 106: //Bear
- npcs[i].animNumber = 44;
- break;
- case 89: //Unicorn
- npcs[i].animNumber = 292;
- break;
- case 654:
- break;
- case 412: //Bat
- case 78: //Giant Bat
- npcs[i].animNumber = 36;
- break;
- case 122: //Hobgoblin
- case 123: //Hobgoblin
- npcs[i].animNumber = 167;
- break;
- case 58: //Shadow Spider
- case 59: //Giant Spider
- case 60: //Giant Spider
- case 61: //Spider
- case 62: //Jungle Spider
- case 63: //Deadly Red Spider
- case 64: //Ice Spider
- case 134:
- npcs[i].animNumber = 146;
- break;
- case 1153: //Kalphite Worker
- case 1154: //Kalphite Soldier
- case 1155: //Kalphite guardian
- case 1156: //Kalphite worker
- case 1157: //Kalphite guardian
- npcs[i].animNumber = 1190;
- break;
- case 103: //Ghost
- case 104://Ghost
- npcs[i].animNumber = 123;
- break;
- case 118: //Dwarf
- case 119://Chaos Dwarf
- npcs[i].animNumber = 102;
- break;
- case 3201: //Killerwatt
- case 3202: //Killerwatt
- npcs[i].animNumber = 3163;
- break;
- case 2881: //Dagannoth Supreme
- case 2882: //Dagannoth Prime
- case 2883://Dagannoth Rex
- npcs[i].animNumber = 2856;
- break;
- case 2455: //Dagannoth
- case 1338: //Dagannoth
- case 1339: //Dagannoth
- case 1342: //Dagannoth
- case 1343: //Dagannoth
- case 2456: //Dagannoth
- case 2887: //Dagannoth
- case 2888://Dagannoth
- npcs[i].animNumber = 1342;
- break;
- case 2884:
- npcs[i].animNumber = 2367;
- break;
- case 2892:
- npcs[i].animNumber = 2865;
- break;
- case 879: //Delrith
- case 752: //Lesser Demon
- npcs[i].animNumber = 67;
- break;
- case 677: //Black Demon
- case 1472://Jungle Demon
- npcs[i].animNumber = 68;
- break;
- case 66: //Gnome
- case 67: //Gnome
- case 68: //Gnome
- case 914: //Gnome Battle Mage
- case 163: //Gnome Guard W/ Mini Halberd
- case 164: //Gnome Guard W/ Sword & Sheild
- case 168: //Gnome Woman
- case 169://Gnome Woman
- npcs[i].animNumber = 196;
- break;
- case 1030: //Wolfman
- case 1031: //Wolfman
- case 1032: //Wolfman
- case 1033: //Wolfwoman
- case 1034: //Wolfwoman
- case 1035://Wolfwoman
- npcs[i].animNumber = 1841;
- break;
- //I've Never Noticed These In Real RS After 7 Years Playing... (0.0!)
- case 1851: //Arzinian Avatar of Strength
- case 1852: //Arzinian Avatar of Strength
- case 1854: //Arzinian Avatar of Ranging
- case 1855: //Arzinian Avatar of Ranging
- case 1857: //Arzinian Avatar of Magic
- case 1858: //Arzinian Avatar of Magic
- case 1859://Arzinian Being of Bordanzan
- npcs[i].animNumber = 1841;
- break;
- case 110: //Fire Giant
- case 111: //Ice Giant
- case 112: //Moss Giant
- case 113: //Jogre Giant
- case 116: //Cyclopse
- case 117://Hill Giant
- npcs[i].animNumber = 131;
- break;
- /**End Of Misc NPC Death Emotes**/
- default:
- npcs[i].animNumber = 0x900; //Human
- break;
- }
- }
- npcs[i].updateRequired = true;
- npcs[i].animUpdateRequired = true;
- npcs[i].DeadApply = true;
- npcs[i].actionTimer = 3;//THIS IS DEATH DELAY ITS HOW LONG TILL THEY DISAPEAR AFTER THEY DIE
- } else if (npcs[i].actionTimer == 0 && npcs[i].DeadApply == true && npcs[i].NeedRespawn == false && npcs[i] != null) {
- if (npcs[i].barrowsyours == -1)
- DropItemNPC(i);
- if (npcs[i].npcType == 1158) {
- newNPC(1160, npcs[i].absX, npcs[i].absY, npcs[i].heightLevel, npcs[i].moverangeX1, npcs[i].moverangeY1, npcs[i].moverangeX2, npcs[i].moverangeY2, 1, npcs[i].MaxHP, true);
- npcs[i].absX = 0;
- npcs[i].absY = 0;
- npcs[i] = null;
- continue;
- }
- if (server.playerHandler.players[npcs[i].StartKilling] != null)
- if (server.playerHandler.players[npcs[i].StartKilling].playerEquipment[12] == 2572 && misc.random(6) == 1) {
- DropItemNPC(i);
- client h = (client) server.playerHandler.players[npcs[i].StartKilling];
- h.sendMessage("Your ring starts to steam...");
- if (misc.random(20) == 1) {
- h.sendMessage("Your ring falls off, and shatters on the ground.");
- h.deleteequipment(12);
- }
- }
- npcs[i].NeedRespawn = true;
- npcs[i].actionTimer = 30;
- npcs[i].absX = npcs[i].makeX;
- npcs[i].absY = npcs[i].makeY;
- npcs[i].animNumber = 0x328;
- if (npcs[i].npcType == 3777) {
- npcs[server.playerHandler.voidknight].HP += 50;
- PlayerHandler.purpleportal = -1;
- npcs[i].absX = 0;
- npcs[i].absY = 0;
- }
- if (npcs[i].npcType == 3778) {
- npcs[server.playerHandler.voidknight].HP += 50;
- PlayerHandler.blueportal = -1;
- npcs[i].absX = 0;
- npcs[i].absY = 0;
- }
- if (npcs[i].npcType == 3779) {
- npcs[server.playerHandler.voidknight].HP += 50;
- PlayerHandler.yellowportal = -1;
- npcs[i].absX = 0;
- npcs[i].absY = 0;
- }
- if (npcs[i].npcType == 3780) {
- npcs[server.playerHandler.voidknight].HP += 50;
- PlayerHandler.redportal = -1;
- npcs[i].absX = 0;
- npcs[i].absY = 0;
- }
- if (npcs[i].npcType >= 3777 && npcs[i].npcType <= 3780)
- if (PlayerHandler.redportal == -1 && PlayerHandler.yellowportal == -1 && PlayerHandler.blueportal == -1 && PlayerHandler.purpleportal == -1) {
- PlayerHandler.winpcgame();
- continue;
- }
- if (npcs[i].npcType == 3785) {
- PlayerHandler.losepcgame();
- continue;
- }
- if (npcs[i].barrowsyours != -1) {
- client war = (client) server.playerHandler.players[npcs[i].barrowsyours];
- switch (npcs[i].npcType) {
- case 2028:
- war.killcount += 1; //Karil dead
- war.karil = 1;
- break;
- case 2025:
- war.killcount += 1; //Ahrim dead
- war.ahrim = 1;
- break;
- case 2026:
- war.killcount += 1; //Dharok dead
- war.dharok = 1;
- break;
- case 2030:
- war.killcount += 1; //verac dead
- war.verac = 1;
- break;
- case 2027:
- war.killcount += 1; //guthan dead
- war.guthan = 1;
- break;
- case 2029:
- war.killcount += 1; //torag dead
- war.torag = 1;
- break;
- case 1264:
- war.nextclue();
- war.sendMessage("As you kill the holy protector the script of your clue scroll changes.");
- war.sendMessage("and you become free from his magic.");
- war.EntangleDelay = 0;
- break;
- case 2629: //fightcaves lvl 45
- NewBarrowsNPC(2738, npcs[i].absX + 1, npcs[i].absY, npcs[i].heightLevel, 2423, 5117, 2371, 5062, npcs[i].MaxHP, war.playerId);
- NewBarrowsNPC(2738, npcs[i].absX, npcs[i].absY + 1, npcs[i].heightLevel, 2423, 5117, 2371, 5062, npcs[i].MaxHP, war.playerId);
- break;
- case 2628: //fightcaves lvl 22
- case 2738: //fightcaves fat 22
- case 2739: //fightcaves lvl 90
- case 2741: //fightcaves lvl 180
- case 2743: //fightcaves lvl 360
- war.fightmonster += 1;
- war.respawnneeded = 1;
- break;
- case 2745: //fightcaves Jad
- war.fightmonster = 250;
- war.respawnneeded = 0;
- break;
- case 1913:
- ItemHandler.addItem(4671, war.absX, war.absY, 1, war.playerId, false);
- war.killedkamil = true;
- break;
- case 742:
- war.showInterface(297);
- war.qstage[4] = 3;
- war.sendQuest("You have completed Dragon Slayer!", 301);
- break;
- }
- if (npcs[i].npcType == 1914) {
- ItemHandler.addItem(4670, war.absX, war.absY, 1, war.playerId, false);
- }
- if (npcs[i].npcType == 907) { // Kolodion
- NewBarrowsNPC(908, npcs[i].absX, npcs[i].absY, 0, 3110, 3938, 3100, 3933, GetNpcListHP(908), npcs[i].barrowsyours);
- }
- if (npcs[i].npcType == 908) { // Kolodion
- NewBarrowsNPC(909, npcs[i].absX, npcs[i].absY, 0, 3110, 3938, 3100, 3933, GetNpcListHP(909), npcs[i].barrowsyours);
- }
- if (npcs[i].npcType == 909) { // Kolodion
- NewBarrowsNPC(910, npcs[i].absX, npcs[i].absY, 0, 3110, 3938, 3100, 3933, GetNpcListHP(910), npcs[i].barrowsyours);
- }
- if (npcs[i].npcType == 910) { // Kolodion
- NewBarrowsNPC(911, npcs[i].absX, npcs[i].absY, 0, 3110, 3938, 3100, 3933, GetNpcListHP(911), npcs[i].barrowsyours);
- }
- if (npcs[i].npcType == 911) { // Kolodion
- client c = (client) server.playerHandler.players[npcs[i].barrowsyours];
- c.defeatkolodion();
- }
- }
- if (npcs[i].npcType == 1158) {
- npcs[i].NeedRespawn = false;
- }
- npcs[i].updateRequired = true;
- npcs[i].animUpdateRequired = true;
- } else if (npcs[i].actionTimer == 0 && npcs[i].NeedRespawn == true) {
- for (int j = 1; j < server.playerHandler.maxPlayers; j++) {
- if (server.playerHandler.players[j] != null) {
- server.playerHandler.players[j].buildnpc = true;
- server.playerHandler.players[j].npcbuild[i] = true;
- }
- }
- if (npcs[i].Respawns) {
- int old1 = npcs[i].npcType;
- if (old1 == 1267 || old1 == 1265) {
- old1 += 1;
- }
- if (old1 == 1160) {
- old1 -= 2;
- }
- if (old1 == 1160) {
- old1 -= 2;
- }
- if (old1 == 1265) {
- old1++;
- }
- if (old1 == 1267) {
- old1++;
- }
- int old2 = npcs[i].makeX;
- int old3 = npcs[i].makeY;
- int old4 = npcs[i].heightLevel;
- int old5 = npcs[i].moverangeX1;
- int old6 = npcs[i].moverangeY1;
- int old7 = npcs[i].moverangeX2;
- int old8 = npcs[i].moverangeY2;
- int old9 = npcs[i].walkingType;
- int old10 = npcs[i].MaxHP;
- npcs[i] = null;
- newNPC(old1, old2, old3, old4, old5, old6, old7, old8, old9, old10, true);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement