Thread: adding total killed kill count!

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 adding total killed kill count! 
    Registered Member
    Join Date
    Apr 2012
    Posts
    23
    Thanks given
    1
    Thanks received
    2
    Rep Power
    44
    right i am trying to add new npc like this : https://gyazo.com/c90fe06f21ad053930e2b2b1955b0dd7
    Code:
    	case "laboratory slime":
    			if (add)
    				killStats[132] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(132);
    is code im using it not working i am not use sure if i am missing somthing prob am lol


    code is from player then this:
    Code:
    public int increaseKillStatistics(String name, boolean add) {
    		switch (name.toLowerCase()) {

    i want it so everytime i kill laboratory it pops up in chat like green dragons does in chat ones im able get this working then this will work in my ed2 kill count at top left: https://gyazo.com/9eb952c8c28053cfd821163ed3e18c47

    https://gyazo.com/4b94a8a091937cdf5cd1100bc7732b31

    Code:
    	case "green dragon":
    			if (add)
    				killStats[41] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(41);
    this works for green dragons
    Reply With Quote  
     

  2. #2  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    27
    Posts
    3,334
    Thanks given
    807
    Thanks received
    1,185
    Rep Power
    190
    so you're saying it works for green dragons but not for the slimes?

    if so then seems as if the code is working but just not executing, could be a few things.

    Are you calling the increaseKillStatistics method when you kill a slime, like does this method get executed on every npc death?

    if you're using Eclipse or IntelliJ editor you can use the debugger to see if the method is executed when you kill a slime.

    May want to show us where the increaseKillStatistics method is being called


    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Apr 2012
    Posts
    23
    Thanks given
    1
    Thanks received
    2
    Rep Power
    44
    Quote Originally Posted by Santa Hat View Post
    so you're saying it works for green dragons but not for the slimes?

    if so then seems as if the code is working but just not executing, could be a few things.

    Are you calling the increaseKillStatistics method when you kill a slime, like does this method get executed on every npc death?

    if you're using Eclipse or IntelliJ editor you can use the debugger to see if the method is executed when you kill a slime.

    May want to show us where the increaseKillStatistics method is being called

    this is full code list of npcs that being called i added laboratory slimes at buttom... 132 code is called in. player.java. if i kill a green dragon or any others npc it works but laboratory slimes does not


    Code:
    public int increaseKillStatistics(String name, boolean add) {
    		switch (name.toLowerCase()) {
    		case "rock crab":
    			if (add)
    				killStats[0]++;
    			setPVMPoints(getPVMPoints() + 1);
    			getAchManager().addKeyAmount("rocky", 1);
    			return getKillStatistics(0);
    		case "general graardor":
    			if (add)
    				killStats[1]++;
    			getAchManager().addKeyAmount("bandos", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(1);
    		case "k'ril tsutsaroth":
    			if (add)
    				killStats[2]++;
    			getAchManager().addKeyAmount("zamorak", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(2);
    		case "kree'arra":
    			if (add)
    				killStats[3]++;
    			getAchManager().addKeyAmount("armadyl", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(3);
    		case "commander zilyana":
    			if (add)
    				killStats[4]++;
    			getAchManager().addKeyAmount("saradomin", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(4);
    		case "nex":
    			if (add)
    				killStats[5]++;
    			getAchManager().addKeyAmount("nex", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(5);
    		case "corporeal beast":
    			if (add)
    				killStats[6]++;
    			getAchManager().addKeyAmount("corporeal", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(6);
    		case "queen black dragon":
    			if (add)
    				killStats[7]++;
    			setPVMPoints(getPVMPoints() + 8);
    			return getKillStatistics(7);
    		case "king black dragon":
    			if (add)
    				killStats[8]++;
    			getAchManager().addKeyAmount("kbd", 1);
    			setPVMPoints(getPVMPoints() + 8);
    			return getKillStatistics(8);
    		case "bork":
    			if (add)
    				killStats[9]++;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(9);
    		case "chaos elemental":
    			if (add)
    				killStats[10]++;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(10);
    		case "crawling Hand":
    			if (add)
    				killStats[11] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(11);
    		case "abyssal demon":
    			if (add)
    				killStats[12] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(12);
    		case "ice strykewyrm":
    			if (add)
    				killStats[13] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(13);
    		case "jungle strykewyrm":
    			if (add)
    				killStats[14] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(14);
    		case "desert strykewyrm":
    			if (add)
    				killStats[15] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(15);
    		case "nechryael":
    			if (add)
    				killStats[16] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(16);
    		case "aberrant spectre":
    			if (add)
    				killStats[17] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(17);
    		case "hellhound":
    			if (add)
    				killStats[18] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(18);
    		case "mature grotworm":
    			if (add)
    				killStats[19] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(19);
    		case "tztok-jad":
    			if (add)
    				killStats[20] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(20);
    		case "greater demon":
    			if (add)
    				killStats[21] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(21);
    		case "mutated jadinko baby":
    			if (add)
    				killStats[22] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(22);
    		case "mutated jadinko male":
    			if (add)
    				killStats[23] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(23);
    		case "mutated jadinko guard":
    			if (add)
    				killStats[24] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(24);
    		case "blue dragon":
    			if (add)
    				killStats[25] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(25);
    		case "iron dragon":
    			if (add)
    				killStats[26] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(26);
    		case "steel dragon":
    			if (add)
    				killStats[27] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(27);
    		case "frost dragon":
    			if (add)
    				killStats[28] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			getAchManager().addKeyAmount("dragon", 1);
    			return getKillStatistics(28);
    		case "glacor":
    			if (add)
    				killStats[29] += 1;
    			getAchManager().addKeyAmount("glacor", 1);
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(29);
    		case "infernal mage":
    			if (add)
    				killStats[30] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(30);
    		case "ganodermic beast":
    			if (add)
    				killStats[31] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(31);
    		case "gargoyle":
    			if (add)
    				killStats[32] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(32);
    		case "jelly":
    			if (add)
    				killStats[33] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(33);
    		case "dark beast":
    			if (add)
    				killStats[34] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(34);
    		case "bloodveld":
    			if (add)
    				killStats[35] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(35);
    		case "black guard":
    			if (add)
    				killStats[36] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(36);
    		case "chaos dwarf hand cannoneer":
    			if (add)
    				killStats[37] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(37);
    		case "chaos dwogre":
    			if (add)
    				killStats[38] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(38);
    		case "pyrefiend":
    			if (add)
    				killStats[39] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(39);
    		case "cockatrice":
    			if (add)
    				killStats[40] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(40);
    		case "brutal green dragon":
    		case "green dragon":
    			if (add)
    				killStats[41] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(41);
    
    		case "fungal rodent":
    			if (add)
    				killStats[42] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(42);
    		case "grifolaroo":
    			if (add)
    				killStats[43] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(43);
    		case "grifolapine":
    			if (add)
    				killStats[44] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(44);
    		case "mithril dragon":
    			if (add)
    				killStats[45] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(45);
    		case "bronze dragon":
    			if (add)
    				killStats[46] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(46);
    		case "moss giant":
    			if (add)
    				killStats[47] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(47);
    		case "fire giant":
    			if (add)
    				killStats[48] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(48);
    		case "hill giant":
    			if (add)
    				killStats[49] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(49);
    		case "turoth":
    			if (add)
    				killStats[50] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(50);
    		case "basilisk":
    			if (add)
    				killStats[51] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(51);
    		case "kurask":
    			if (add)
    				killStats[52] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(52);
    		case "black demon":
    			if (add)
    				killStats[53] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(53);
    		case "kalphite queen":
    			if (add)
    				killStats[54] += 1;
    			getAchManager().addKeyAmount("kalphitequeen", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(54);
    		case "tormented demon":
    			if (add)
    				killStats[55] += 1;
    			setPVMPoints(getPVMPoints() + 8);
    			return getKillStatistics(55);
    		case "baby blue dragon":
    			if (add)
    				killStats[56] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(56);
    		case "lesser demon":
    			if (add)
    				killStats[57] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(57);
    		case "skeleton":
    			if (add)
    				killStats[58] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(58);
    		case "man":
    		case "farmer":
    		case "woman":
    			if (add)
    				killStats[59] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(59);
    		case "waterfiend":
    			if (add)
    				killStats[60] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(60);
    		case "banshee":
    			if (add)
    				killStats[61] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(61);
    		case "dog":
    		case "terror dog":
    		case "wild dog":
    			if (add)
    				killStats[62] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(62);
    		case "cave crawler":
    			if (add)
    				killStats[63] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(63);
    		case "black dragon":
    			if (add)
    				killStats[64] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(64);
    		case "chaos druid":
    			if (add)
    				killStats[65] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(65);
    		case "black knight":
    			if (add)
    				killStats[66] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(66);
    		case "barrelchest":
    			if (add)
    				killStats[67] += 1;
    			getAchManager().addKeyAmount("barrel", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(67);
    		case "dagannoth supreme":
    			if (add)
    				killStats[68] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(68);
    		case "dagannoth prime":
    			if (add)
    				killStats[69] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(69);
    		case "dagannoth rex":
    			if (add)
    				killStats[70] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(70);
    		case "araxxor":
    			if (add)
    				killStats[71] += 1;
    			getAchManager().addKeyAmount("araxxor", 1);
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(71);
    		case "vampyre":
    			if (add)
    				killStats[72] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(72);
    		case "werewolf":
    			if (add)
    				killStats[73] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(73);
    		case "goblin":
    		case "hobgoblin":
    			if (add)
    				killStats[74] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(74);
    		case "imp":
    			if (add)
    				killStats[75] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(75);
    		case "icefiend":
    			if (add)
    				killStats[76] += 1;
    			return getKillStatistics(76);
    		case "ogre":
    			if (add)
    				killStats[77] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(77);
    		case "cyclops":
    			if (add)
    				killStats[78] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(78);
    		case "rorarius":
    			if (add)
    				killStats[79] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(79);
    		case "gladius":
    			if (add)
    				killStats[80] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(80);
    		case "capsarius":
    			if (add)
    				killStats[81] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(81);
    		case "scutarius":
    			if (add)
    				killStats[82] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(82);
    		case "legio primus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1026, 632, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[83] += 1;
    			getAchManager().addKeyAmount("primus", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(83);
    		case "legio secundus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1106, 670, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[84] += 1;
    			getAchManager().addKeyAmount("secundus", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(84);
    		case "legio tertius":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1099, 665, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[85] += 1;
    			getAchManager().addKeyAmount("tertius", 1);
    			return getKillStatistics(85);
    		case "legio quartus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1177, 634, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[86] += 1;
    			getAchManager().addKeyAmount("quartus", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(86);
    		case "legio quintus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1191, 634, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[87] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(87);
    		case "legio sextus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1184, 623, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[88] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(88);
    		case "Giant Mole":
    			if (add)
    				killStats[89] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(89);
    		case "kalphite king":
    			if (add)
    				killStats[90] += 1;
    			getAchManager().addKeyAmount("kalphiteking", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(90);
    		case "ork":
    			if (add)
    				killStats[91] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(91);
    		case "aviansie":
    			if (add)
    				killStats[92] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(92);
    		case "vorago":
    			if (add)
    				killStats[93] += 1;
    			getAchManager().addKeyAmount("vorago", 1);
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(93);
    		case "adamant dragon":
    			if (add)
    				killStats[94] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(94);
    		case "rune dragon":
    			if (add)
    				killStats[95] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(95);
    		case "edimmu":
    			if (add)
    				killStats[96] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(96);
    		case "blink":
    			if (add)
    				killStats[97] += 1;
    			getAchManager().addKeyAmount("blink", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(97);
    		case "party demon":
    			if (add)
    				killStats[98] += 1;
    			getAchManager().addKeyAmount("partydemon", 1);
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(98);
    		case "sunfreet":
    			if (add)
    				killStats[99] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(99);
    		case "dark lord":
    			if (add)
    				killStats[100] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(100);
    		case "Mercenary Mage":
    			if (add)
    				killStats[101] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(101);
    		case "wyvern":
    			if (add)
    				killStats[102] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(102);
    		case "onyx dragon":
    			if (add)
    				killStats[103] += 1;
    			setPVMPoints(getPVMPoints() + 4);
    			return getKillStatistics(103);
    		case "hydrix dragon":
    			if (add)
    				killStats[104] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(104);
    		case "dragonstone dragon":
    			if (add)
    				killStats[105] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(105);
    		case "telos, the warden":
    			if (add)
    				killStats[106] += 1;
    			setPVMPoints(getPVMPoints() + 20);
    			return getKillStatistics(106);
    		case "airut":
    			if (add)
    				killStats[107] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(107);
    		case "acheron mammoth":
    			if (add)
    				killStats[108] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(108);
    		case "ripper demon":
    			if (add)
    				killStats[109] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(109);
    		case "wildywyrm":
    			if (add)
    				killStats[110] += 1;
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(110);
    		case "the magister":
    			if (add)
    				killStats[111] += 1;
    			setPVMPoints(getPVMPoints() + 20);
    			return getKillStatistics(111);
    		case "solak":
    			if (add)
    				killStats[112] += 1;
    			setPVMPoints(getPVMPoints() + 25);
    			return getKillStatistics(112);
    		case "elegorn the celestial":
    			if (add)
    				killStats[113] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			getAchManager().addKeyAmount("eregorn", 1);
    			return getKillStatistics(113);
    		case "verak lith":
    			if (add)
    				killStats[114] += 1;
    			setPVMPoints(getPVMPoints() + 25);
    			return getKillStatistics(114);
    
    		// gw2
    		case "nymora":
    		case "avaryss":
    			if (add)
    				killStats[115] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(115);
    		case "gregorovic":
    			if (add)
    				killStats[116] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(116);
    		case "helwyr":
    			if (add)
    				killStats[117] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(117);
    		case "vindicta":
    			if (add)
    				killStats[118] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(118);
    		case "red dragon":
    			if (add)
    				killStats[119] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(119);
    		case "skeletal wyvern":
    			if (add)
    				killStats[120] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(120);
    		case "skeletal minion":
    			if (add)
    				killStats[121] += 1;
    			return getKillStatistics(121);
    		case "skeletal warrior":
    			if (add)
    				killStats[122] += 1;
    			return getKillStatistics(122);
    		case "ice elemental":
    			if (add)
    				killStats[123] += 1;
    			return getKillStatistics(123);
    		case "ice  warrior":
    			if (add)
    				killStats[124] += 1;
    			return getKillStatistics(124);
    		case "ice  fiend":
    			if (add)
    				killStats[125] += 1;
    			return getKillStatistics(125);
    		case "earth warrior":
    			if (add)
    				killStats[126] += 1;
    			return getKillStatistics(126);
    		case "dungeon rat":
    			if (add)
    				killStats[127] += 1;
    			return getKillStatistics(127);
    		case "dungeon spider":
    			if (add)
    				killStats[128] += 1;
    			return getKillStatistics(128);
    		case "armoured zombie":
    			if (add)
    				killStats[129] += 1;
    			return getKillStatistics(129);
    		case "ghost":
    			if (add)
    				killStats[130] += 1;
    			return getKillStatistics(130);
    		case "masuta the ascended":
    			if (add)
    				killStats[131] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(131);
    		case "laboratory slime":
    			if (add)
    				killStats[132] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(132);
    		}
    		return -1;
    	}



    Code:
    	protected void increaseKillStatistics(Player killer, String name) {
    
    		if (killer.increaseKillStatistics(name, false) != -1) {
    			killer.sendMessage("You've killed a total of " + Colors.red + killer.increaseKillStatistics(name, true) + ""
    					+ "</col> x " + Colors.red + name + "'s</col>.", true);
    		}
    		int amount = killer.increaseKillStatistics(name, false);
    		if (amount % 100 == 0 && amount != 0) {
    			World.sendWorldMessage(Colors.gold + "<img=6> [Kill Count] </col>" + Colors.red
    					+ Utils.formatPlayerNameForDisplay(killer.getDisplayName()) + "</col> has reached " + amount + " "
    					+ Colors.red + Utils.formatPlayerNameForDisplay(name) + " </col>kills milestone! " + "<img=6>",
    					false);
    		}
    
    	}
    Reply With Quote  
     

  4. #4  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    27
    Posts
    3,334
    Thanks given
    807
    Thanks received
    1,185
    Rep Power
    190
    Quote Originally Posted by lord kurt6 View Post
    this is full code list of npcs that being called i added laboratory slimes at buttom... 132 code is called in. player.java


    Code:
    public int increaseKillStatistics(String name, boolean add) {
    		switch (name.toLowerCase()) {
    		case "rock crab":
    			if (add)
    				killStats[0]++;
    			setPVMPoints(getPVMPoints() + 1);
    			getAchManager().addKeyAmount("rocky", 1);
    			return getKillStatistics(0);
    		case "general graardor":
    			if (add)
    				killStats[1]++;
    			getAchManager().addKeyAmount("bandos", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(1);
    		case "k'ril tsutsaroth":
    			if (add)
    				killStats[2]++;
    			getAchManager().addKeyAmount("zamorak", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(2);
    		case "kree'arra":
    			if (add)
    				killStats[3]++;
    			getAchManager().addKeyAmount("armadyl", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(3);
    		case "commander zilyana":
    			if (add)
    				killStats[4]++;
    			getAchManager().addKeyAmount("saradomin", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(4);
    		case "nex":
    			if (add)
    				killStats[5]++;
    			getAchManager().addKeyAmount("nex", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(5);
    		case "corporeal beast":
    			if (add)
    				killStats[6]++;
    			getAchManager().addKeyAmount("corporeal", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(6);
    		case "queen black dragon":
    			if (add)
    				killStats[7]++;
    			setPVMPoints(getPVMPoints() + 8);
    			return getKillStatistics(7);
    		case "king black dragon":
    			if (add)
    				killStats[8]++;
    			getAchManager().addKeyAmount("kbd", 1);
    			setPVMPoints(getPVMPoints() + 8);
    			return getKillStatistics(8);
    		case "bork":
    			if (add)
    				killStats[9]++;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(9);
    		case "chaos elemental":
    			if (add)
    				killStats[10]++;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(10);
    		case "crawling Hand":
    			if (add)
    				killStats[11] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(11);
    		case "abyssal demon":
    			if (add)
    				killStats[12] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(12);
    		case "ice strykewyrm":
    			if (add)
    				killStats[13] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(13);
    		case "jungle strykewyrm":
    			if (add)
    				killStats[14] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(14);
    		case "desert strykewyrm":
    			if (add)
    				killStats[15] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(15);
    		case "nechryael":
    			if (add)
    				killStats[16] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(16);
    		case "aberrant spectre":
    			if (add)
    				killStats[17] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(17);
    		case "hellhound":
    			if (add)
    				killStats[18] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(18);
    		case "mature grotworm":
    			if (add)
    				killStats[19] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(19);
    		case "tztok-jad":
    			if (add)
    				killStats[20] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(20);
    		case "greater demon":
    			if (add)
    				killStats[21] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(21);
    		case "mutated jadinko baby":
    			if (add)
    				killStats[22] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(22);
    		case "mutated jadinko male":
    			if (add)
    				killStats[23] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(23);
    		case "mutated jadinko guard":
    			if (add)
    				killStats[24] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(24);
    		case "blue dragon":
    			if (add)
    				killStats[25] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(25);
    		case "iron dragon":
    			if (add)
    				killStats[26] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(26);
    		case "steel dragon":
    			if (add)
    				killStats[27] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(27);
    		case "frost dragon":
    			if (add)
    				killStats[28] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			getAchManager().addKeyAmount("dragon", 1);
    			return getKillStatistics(28);
    		case "glacor":
    			if (add)
    				killStats[29] += 1;
    			getAchManager().addKeyAmount("glacor", 1);
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(29);
    		case "infernal mage":
    			if (add)
    				killStats[30] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(30);
    		case "ganodermic beast":
    			if (add)
    				killStats[31] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(31);
    		case "gargoyle":
    			if (add)
    				killStats[32] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(32);
    		case "jelly":
    			if (add)
    				killStats[33] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(33);
    		case "dark beast":
    			if (add)
    				killStats[34] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(34);
    		case "bloodveld":
    			if (add)
    				killStats[35] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(35);
    		case "black guard":
    			if (add)
    				killStats[36] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(36);
    		case "chaos dwarf hand cannoneer":
    			if (add)
    				killStats[37] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(37);
    		case "chaos dwogre":
    			if (add)
    				killStats[38] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(38);
    		case "pyrefiend":
    			if (add)
    				killStats[39] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(39);
    		case "cockatrice":
    			if (add)
    				killStats[40] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(40);
    		case "brutal green dragon":
    		case "green dragon":
    			if (add)
    				killStats[41] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(41);
    
    		case "fungal rodent":
    			if (add)
    				killStats[42] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(42);
    		case "grifolaroo":
    			if (add)
    				killStats[43] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(43);
    		case "grifolapine":
    			if (add)
    				killStats[44] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(44);
    		case "mithril dragon":
    			if (add)
    				killStats[45] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(45);
    		case "bronze dragon":
    			if (add)
    				killStats[46] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(46);
    		case "moss giant":
    			if (add)
    				killStats[47] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(47);
    		case "fire giant":
    			if (add)
    				killStats[48] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(48);
    		case "hill giant":
    			if (add)
    				killStats[49] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(49);
    		case "turoth":
    			if (add)
    				killStats[50] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(50);
    		case "basilisk":
    			if (add)
    				killStats[51] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(51);
    		case "kurask":
    			if (add)
    				killStats[52] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(52);
    		case "black demon":
    			if (add)
    				killStats[53] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(53);
    		case "kalphite queen":
    			if (add)
    				killStats[54] += 1;
    			getAchManager().addKeyAmount("kalphitequeen", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(54);
    		case "tormented demon":
    			if (add)
    				killStats[55] += 1;
    			setPVMPoints(getPVMPoints() + 8);
    			return getKillStatistics(55);
    		case "baby blue dragon":
    			if (add)
    				killStats[56] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(56);
    		case "lesser demon":
    			if (add)
    				killStats[57] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(57);
    		case "skeleton":
    			if (add)
    				killStats[58] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(58);
    		case "man":
    		case "farmer":
    		case "woman":
    			if (add)
    				killStats[59] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(59);
    		case "waterfiend":
    			if (add)
    				killStats[60] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(60);
    		case "banshee":
    			if (add)
    				killStats[61] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(61);
    		case "dog":
    		case "terror dog":
    		case "wild dog":
    			if (add)
    				killStats[62] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(62);
    		case "cave crawler":
    			if (add)
    				killStats[63] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(63);
    		case "black dragon":
    			if (add)
    				killStats[64] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(64);
    		case "chaos druid":
    			if (add)
    				killStats[65] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(65);
    		case "black knight":
    			if (add)
    				killStats[66] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(66);
    		case "barrelchest":
    			if (add)
    				killStats[67] += 1;
    			getAchManager().addKeyAmount("barrel", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(67);
    		case "dagannoth supreme":
    			if (add)
    				killStats[68] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(68);
    		case "dagannoth prime":
    			if (add)
    				killStats[69] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(69);
    		case "dagannoth rex":
    			if (add)
    				killStats[70] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(70);
    		case "araxxor":
    			if (add)
    				killStats[71] += 1;
    			getAchManager().addKeyAmount("araxxor", 1);
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(71);
    		case "vampyre":
    			if (add)
    				killStats[72] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(72);
    		case "werewolf":
    			if (add)
    				killStats[73] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(73);
    		case "goblin":
    		case "hobgoblin":
    			if (add)
    				killStats[74] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(74);
    		case "imp":
    			if (add)
    				killStats[75] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(75);
    		case "icefiend":
    			if (add)
    				killStats[76] += 1;
    			return getKillStatistics(76);
    		case "ogre":
    			if (add)
    				killStats[77] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(77);
    		case "cyclops":
    			if (add)
    				killStats[78] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(78);
    		case "rorarius":
    			if (add)
    				killStats[79] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(79);
    		case "gladius":
    			if (add)
    				killStats[80] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(80);
    		case "capsarius":
    			if (add)
    				killStats[81] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(81);
    		case "scutarius":
    			if (add)
    				killStats[82] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(82);
    		case "legio primus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1026, 632, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[83] += 1;
    			getAchManager().addKeyAmount("primus", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(83);
    		case "legio secundus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1106, 670, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[84] += 1;
    			getAchManager().addKeyAmount("secundus", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(84);
    		case "legio tertius":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1099, 665, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[85] += 1;
    			getAchManager().addKeyAmount("tertius", 1);
    			return getKillStatistics(85);
    		case "legio quartus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1177, 634, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[86] += 1;
    			getAchManager().addKeyAmount("quartus", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(86);
    		case "legio quintus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1191, 634, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[87] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(87);
    		case "legio sextus":
    			if (add)
    				new java.util.Timer().schedule(new java.util.TimerTask() {
    					@Override
    					public void run() {
    						if (!canTeleport() || legioarea()) {
    							sendMessage("");
    							return;
    						}
    						setNextWorldTile(new WorldTile(1184, 623, 1));
    						sendMessage("in location!");
    
    					}
    				}, 10000);
    			killStats[88] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(88);
    		case "Giant Mole":
    			if (add)
    				killStats[89] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(89);
    		case "kalphite king":
    			if (add)
    				killStats[90] += 1;
    			getAchManager().addKeyAmount("kalphiteking", 1);
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(90);
    		case "ork":
    			if (add)
    				killStats[91] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(91);
    		case "aviansie":
    			if (add)
    				killStats[92] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(92);
    		case "vorago":
    			if (add)
    				killStats[93] += 1;
    			getAchManager().addKeyAmount("vorago", 1);
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(93);
    		case "adamant dragon":
    			if (add)
    				killStats[94] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(94);
    		case "rune dragon":
    			if (add)
    				killStats[95] += 1;
    			setPVMPoints(getPVMPoints() + 2);
    			return getKillStatistics(95);
    		case "edimmu":
    			if (add)
    				killStats[96] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(96);
    		case "blink":
    			if (add)
    				killStats[97] += 1;
    			getAchManager().addKeyAmount("blink", 1);
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(97);
    		case "party demon":
    			if (add)
    				killStats[98] += 1;
    			getAchManager().addKeyAmount("partydemon", 1);
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(98);
    		case "sunfreet":
    			if (add)
    				killStats[99] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(99);
    		case "dark lord":
    			if (add)
    				killStats[100] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(100);
    		case "Mercenary Mage":
    			if (add)
    				killStats[101] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(101);
    		case "wyvern":
    			if (add)
    				killStats[102] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(102);
    		case "onyx dragon":
    			if (add)
    				killStats[103] += 1;
    			setPVMPoints(getPVMPoints() + 4);
    			return getKillStatistics(103);
    		case "hydrix dragon":
    			if (add)
    				killStats[104] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(104);
    		case "dragonstone dragon":
    			if (add)
    				killStats[105] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(105);
    		case "telos, the warden":
    			if (add)
    				killStats[106] += 1;
    			setPVMPoints(getPVMPoints() + 20);
    			return getKillStatistics(106);
    		case "airut":
    			if (add)
    				killStats[107] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(107);
    		case "acheron mammoth":
    			if (add)
    				killStats[108] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(108);
    		case "ripper demon":
    			if (add)
    				killStats[109] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(109);
    		case "wildywyrm":
    			if (add)
    				killStats[110] += 1;
    			setPVMPoints(getPVMPoints() + 10);
    			return getKillStatistics(110);
    		case "the magister":
    			if (add)
    				killStats[111] += 1;
    			setPVMPoints(getPVMPoints() + 20);
    			return getKillStatistics(111);
    		case "solak":
    			if (add)
    				killStats[112] += 1;
    			setPVMPoints(getPVMPoints() + 25);
    			return getKillStatistics(112);
    		case "elegorn the celestial":
    			if (add)
    				killStats[113] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			getAchManager().addKeyAmount("eregorn", 1);
    			return getKillStatistics(113);
    		case "verak lith":
    			if (add)
    				killStats[114] += 1;
    			setPVMPoints(getPVMPoints() + 25);
    			return getKillStatistics(114);
    
    		// gw2
    		case "nymora":
    		case "avaryss":
    			if (add)
    				killStats[115] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(115);
    		case "gregorovic":
    			if (add)
    				killStats[116] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(116);
    		case "helwyr":
    			if (add)
    				killStats[117] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(117);
    		case "vindicta":
    			if (add)
    				killStats[118] += 1;
    			setPVMPoints(getPVMPoints() + 15);
    			return getKillStatistics(118);
    		case "red dragon":
    			if (add)
    				killStats[119] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(119);
    		case "skeletal wyvern":
    			if (add)
    				killStats[120] += 1;
    			setPVMPoints(getPVMPoints() + 5);
    			return getKillStatistics(120);
    		case "skeletal minion":
    			if (add)
    				killStats[121] += 1;
    			return getKillStatistics(121);
    		case "skeletal warrior":
    			if (add)
    				killStats[122] += 1;
    			return getKillStatistics(122);
    		case "ice elemental":
    			if (add)
    				killStats[123] += 1;
    			return getKillStatistics(123);
    		case "ice  warrior":
    			if (add)
    				killStats[124] += 1;
    			return getKillStatistics(124);
    		case "ice  fiend":
    			if (add)
    				killStats[125] += 1;
    			return getKillStatistics(125);
    		case "earth warrior":
    			if (add)
    				killStats[126] += 1;
    			return getKillStatistics(126);
    		case "dungeon rat":
    			if (add)
    				killStats[127] += 1;
    			return getKillStatistics(127);
    		case "dungeon spider":
    			if (add)
    				killStats[128] += 1;
    			return getKillStatistics(128);
    		case "armoured zombie":
    			if (add)
    				killStats[129] += 1;
    			return getKillStatistics(129);
    		case "ghost":
    			if (add)
    				killStats[130] += 1;
    			return getKillStatistics(130);
    		case "masuta the ascended":
    			if (add)
    				killStats[131] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(131);
    		case "laboratory slime":
    			if (add)
    				killStats[132] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(132);
    		}
    		return -1;
    	}
    Can you show us where "increaseKillStatistics" method is being called from?

    If the green dragons work then there shouldn't be a problem with that code but where that code is being called.

    One thing to do is put a print message in here

    Code:
    	case "laboratory slime":
    			if (add)
    				killStats[132] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(132);
    		}
    to see if that part is being run, if not then its an issue with that method not being executed when kiling a slime


    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Apr 2012
    Posts
    23
    Thanks given
    1
    Thanks received
    2
    Rep Power
    44
    Quote Originally Posted by Santa Hat View Post
    Can you show us where "increaseKillStatistics" method is being called from?

    If the green dragons work then there shouldn't be a problem with that code but where that code is being called.

    One thing to do is put a print message in here

    Code:
    	case "laboratory slime":
    			if (add)
    				killStats[132] += 1;
    			setPVMPoints(getPVMPoints() + 3);
    			return getKillStatistics(132);
    		}
    to see if that part is being run, if not then its an issue with that method not being executed when kiling a slime


    Code:
    protected void increaseKillStatistics(Player killer, String name) {
    
    		if (killer.increaseKillStatistics(name, false) != -1) {
    			killer.sendMessage("You've killed a total of " + Colors.red + killer.increaseKillStatistics(name, true) + ""
    					+ "</col> x " + Colors.red + name + "'s</col>.", true);
    		}
    		int amount = killer.increaseKillStatistics(name, false);
    		if (amount % 100 == 0 && amount != 0) {
    			World.sendWorldMessage(Colors.gold + "<img=6> [Kill Count] </col>" + Colors.red
    					+ Utils.formatPlayerNameForDisplay(killer.getDisplayName()) + "</col> has reached " + amount + " "
    					+ Colors.red + Utils.formatPlayerNameForDisplay(name) + " </col>kills milestone! " + "<img=6>",
    					false);
    		}
    
    	}
    and i done that no message is coming up but does with green dragon lol it werid i donno why it aint working
    Reply With Quote  
     

  6. #6  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,647
    Thanks given
    175
    Thanks received
    257
    Rep Power
    358
    Send me the full class where increaseKillStatistics method is at
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Apr 2012
    Posts
    23
    Thanks given
    1
    Thanks received
    2
    Rep Power
    44
    Quote Originally Posted by Armo View Post
    Send me the full class where increaseKillStatistics method is at

    method is in NPC.java AND other with npcs is in player.java that all i can find related to this iv looked everywhere i think xd
    Code:
    protected void increaseKillStatistics(Player killer, String name) {
    
    		if (killer.increaseKillStatistics(name, false) != -1) {
    			killer.sendMessage("You've killed a total of " + Colors.red + killer.increaseKillStatistics(name, true) + ""
    					+ "</col> x " + Colors.red + name + "'s</col>.", true);
    		}
    		int amount = killer.increaseKillStatistics(name, false);
    		if (amount % 100 == 0 && amount != 0) {
    			World.sendWorldMessage(Colors.gold + "<img=6> [Kill Count] </col>" + Colors.red
    					+ Utils.formatPlayerNameForDisplay(killer.getDisplayName()) + "</col> has reached " + amount + " "
    					+ Colors.red + Utils.formatPlayerNameForDisplay(name) + " </col>kills milestone! " + "<img=6>",
    					false);
    		}
    Reply With Quote  
     

  8. #8  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,647
    Thanks given
    175
    Thanks received
    257
    Rep Power
    358
    Quote Originally Posted by lord kurt6 View Post
    method is in NPC.java AND other with npcs is in player.java that all i can find related to this iv looked everywhere i think xd
    Code:
    protected void increaseKillStatistics(Player killer, String name) {
    
    		if (killer.increaseKillStatistics(name, false) != -1) {
    			killer.sendMessage("You've killed a total of " + Colors.red + killer.increaseKillStatistics(name, true) + ""
    					+ "</col> x " + Colors.red + name + "'s</col>.", true);
    		}
    		int amount = killer.increaseKillStatistics(name, false);
    		if (amount % 100 == 0 && amount != 0) {
    			World.sendWorldMessage(Colors.gold + "<img=6> [Kill Count] </col>" + Colors.red
    					+ Utils.formatPlayerNameForDisplay(killer.getDisplayName()) + "</col> has reached " + amount + " "
    					+ Colors.red + Utils.formatPlayerNameForDisplay(name) + " </col>kills milestone! " + "<img=6>",
    					false);
    		}
    I need to see the whole file
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Apr 2012
    Posts
    23
    Thanks given
    1
    Thanks received
    2
    Rep Power
    44
    Quote Originally Posted by Armo View Post
    I need to see the whole file
    Code:
    package com.rs.game.npc;
    
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.util.concurrent.CopyOnWriteArrayList;
    import java.util.concurrent.TimeUnit;
    
    import com.rs.DiscordMessageHandler;
    //import com.rs.DiscordMessageHandler;
    import com.rs.Settings;
    import com.rs.cache.loaders.ItemDefinitions;
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.cores.CoresManager;
    import com.rs.game.Animation;
    import com.rs.game.Entity;
    import com.rs.game.ForceTalk;
    import com.rs.game.Graphics;
    import com.rs.game.HeadIcon;
    import com.rs.game.Hit;
    import com.rs.game.Hit.HitLook;
    import com.rs.game.World;
    import com.rs.game.WorldTile;
    import com.rs.game.activites.ZombieOutpost.ZOControler;
    import com.rs.game.activites.ZombieOutpost.ZOGame;
    import com.rs.game.activites.ZombieOutpost.ZombieManager;
    import com.rs.game.item.Item;
    import com.rs.game.map.bossInstance.BossInstance;
    import com.rs.game.npc.combat.NPCCombat;
    import com.rs.game.npc.combat.NPCCombatDefinitions;
    import com.rs.game.npc.corp.CorporealBeast;
    import com.rs.game.npc.familiar.Familiar;
    import com.rs.game.npc.godwars.armadyl.KreeArra;
    import com.rs.game.npc.godwars.bandos.GeneralGraardor;
    import com.rs.game.npc.godwars.saradomin.CommanderZilyana;
    import com.rs.game.npc.godwars.zammorak.KrilTsutsaroth;
    import com.rs.game.npc.godwars.zaros.Nex;
    import com.rs.game.npc.others.TormentedDemon;
    import com.rs.game.player.Player;
    import com.rs.game.player.SlayerManager;
    import com.rs.game.player.actions.herblore.herbicide.Herbicide;
    import com.rs.game.player.content.Combat;
    import com.rs.game.player.content.FriendChatsManager;
    import com.rs.game.player.content.Slayer.SlayerMaster;
    import com.rs.game.player.content.clans.ClansManager;
    import com.rs.game.player.content.clans.content.perks.ClanPerk;
    //import com.rs.game.player.content.SlayerTask;
    import com.rs.game.player.content.contracts.ContractHandler;
    import com.rs.game.player.content.items.Bonecrusher;
    import com.rs.game.player.content.items.CharmingImp;
    import com.rs.game.player.content.items.CoinAccumulator;
    import com.rs.game.player.content.items.Defenders;
    import com.rs.game.player.content.items.RingOfWealth;
    import com.rs.game.player.controllers.DTController;
    import com.rs.game.player.controllers.Dungeoneering;
    import com.rs.game.player.controllers.GodWars;
    import com.rs.game.player.controllers.WarriorsGuild;
    import com.rs.game.player.controllers.Wilderness;
    import com.rs.game.route.RouteFinder;
    import com.rs.game.route.strategy.FixedTileStrategy;
    import com.rs.game.tasks.WorldTask;
    import com.rs.game.tasks.WorldTasksManager;
    import com.rs.utils.Colors;
    import com.rs.utils.Logger;
    import com.rs.utils.MapAreas;
    import com.rs.utils.NPCBonuses;
    import com.rs.utils.NPCCombatDefinitionsL;
    import com.rs.utils.NPCDrops;
    import com.rs.utils.Utils;
    import com.rs.utils.npcNames;
    
    /*import mysql.impl.NewsManager;*/
    
    /**
     * A class holding all NPC data.
     * 
     * @author Zeus
     */
    public class NPC extends Entity implements Serializable {
    
    	/**
    	 * The generated serial UID for Serializable.
    	 */
    	private static final long serialVersionUID = -4794678936277614443L;
    
    	/**
    	 * Integers representing NPC movement masks.
    	 */
    	public static int NORMAL_WALK = 0x2, WATER_WALK = 0x4, FLY_WALK = 0x8;
    
    	/**
    	 * NPC Configurations.
    	 */
    	protected int id;
    	private WorldTile respawnTile;
    	private int mapAreaNameHash;
    	private boolean canBeAttackFromOutOfArea;
    	private boolean randomwalk;
    	private int[] bonuses; // NPC bonuses go up to 9
    	private boolean spawned;
    	private transient NPCCombat combat;
    
    	public WorldTile forceWalk;
    	private long lastAttackedByTarget;
    	private boolean cantInteract;
    	private int capDamage;
    	private int lureDelay;
    	private int walkType;
    	private boolean cantFollowUnderCombat;
    	private boolean forceAgressive;
    	private int forceTargetDistance;
    	private boolean forceFollowClose;
    	private boolean forceMultiAttacked;
    
    	public int ZOType;
    	public int ZOScriptPause;
    
    	private boolean noDistanceCheck;
    	// npc masks
    	private transient Transformation nextTransformation;
    	private transient boolean changedName;
    	private transient boolean changedCombatLevel;
    	private transient boolean refreshHeadIcon;
    	// name changing masks
    	private String name;
    	private int combatLevel;
    
    	private transient boolean locked;
    	private ArrayList<Entity> BossTimeUpdate;
    
    	/**
    	 * Initializes the NPC.
    	 * 
    	 * @Param id
    	 *            The NPC ID.
    	 * @Param tile
    	 *            The WorldTIle.
    	 * @Param mapAreaNameHash
    	 *            The Region area name.
    	 * @Param canBeAttackFromOutOfArea
    	 *            if Can be attacked out of Region.
    	 */
    	public NPC(int id, WorldTile tile, int mapAreaNameHash, boolean canBeAttackFromOutOfArea) {
    		this(id, tile, mapAreaNameHash, canBeAttackFromOutOfArea, false);
    	}
    
    	/*
    	 * creates and adds npc
    	 */
    	public NPC(int id, WorldTile tile, int mapAreaNameHash, boolean canBeAttackFromOutOfArea, boolean spawned) {
    		super(tile);
    		this.id = id;
    		this.respawnTile = new WorldTile(tile);
    		this.mapAreaNameHash = mapAreaNameHash;
    		this.canBeAttackFromOutOfArea = canBeAttackFromOutOfArea;
    		this.spawned = spawned;
    		this.setMaxDistance(-1);
    		combatLevel = -1;
    		setHitpoints(getMaxHitpoints());
    		setDirection(getRespawnDirection());
    		setRandomWalk(getDefinitions().movementCapabilities);
    		setBonuses();
    		combat = new NPCCombat(this);
    		capDamage = -1;
    		lureDelay = 12000;
    		initEntity();
    		World.addNPC(this);
    		World.updateEntityRegion(this);
    		loadMapRegions();
    		BossTimeUpdate = new ArrayList<>();
    		checkMultiArea();
    	}
    
    	public boolean canBeAttackedByAutoRetaliate() {
    		return Utils.currentTimeMillis() - lastAttackedByTarget > lureDelay;
    	}
    
    	public boolean canBeAttackFromOutOfArea() {
    		return canBeAttackFromOutOfArea;
    	}
    
    	/**
    	 * Checks if the NPC should force aggression towards the entities around it.
    	 * 
    	 * @Return if should be agressive.
    	 */
    	public boolean checkAgressivity() {
    		if (!forceAgressive) {
    			NPCCombatDefinitions defs = getCombatDefinitions();
    			if (defs.getAgressivenessType() == NPCCombatDefinitions.PASSIVE)
    				return false;
    		}
    		ArrayList<Entity> possibleTarget = getPossibleTargets();
    		if (!possibleTarget.isEmpty()) {
    			Entity target = possibleTarget.get(Utils.random(possibleTarget.size()));
    			if (target instanceof Player) {
    				Player player = (Player) target;
    				int aggressionLevel = (getCombatLevel() * 2) + 1;
    				if (player.getControlerManager().getControler() != null || forceAgressive) {
    					setTarget(target);
    					target.setAttackedBy(target);
    					target.setFindTargetDelay(Utils.currentTimeMillis() + 5000);
    					return true;
    				}
    				if (player.getSkills().getCombatLevel() <= aggressionLevel) {
    					if ((System.currentTimeMillis() - player.toleranceTimer) < Utils.random(600000, 700000)) {
    						setTarget(target);
    						target.setAttackedBy(target);
    						target.setFindTargetDelay(Utils.currentTimeMillis() + 5000);
    						return true;
    					}
    					return false;
    				}
    				return false;
    				
    			}
    			return false;
    		}
    		return false;
    	}
    
    	public void checkGodwarsKillcount() {
    		Player killer = getMostDamageReceivedSourcePlayer();
    		if (killer == null)
    			return;
    		if (killer.getControlerManager().getControler() instanceof GodWars)
    			((GodWars) killer.getControlerManager().getControler()).handleKC(this);
    	}
    
    	public boolean containsItem(int id) {
    		Item item = new Item(id);
    		return containsItem(item);
    	}
    
    	public boolean containsItem(Item item) {
    		Player killer = getMostDamageReceivedSourcePlayer();
    		return killer.getInventory().getItems().contains(new Item(item.getId(), 1))
    				|| killer.getEquipment().getItems().contains(new Item(item.getId(), 1));
    	}
    
    	public void deserialize() {
    		if (combat == null)
    			combat = new NPCCombat(this);
    		spawn();
    	}
    
    	/**
    	 * Handles increasing NPC kill statistics.
    	 * 
    	 * @Param killer
    	 *            The killer.
    	 * @Param name
    	 *            The NPC name.
    	 * @Param id
    	 *            The statistic ID.
    	 */
    	protected void increaseKillStatistics(Player killer, String name) {
    
    		if (killer.increaseKillStatistics(name, false) != -1) {
    			killer.sendMessage("You've killed a total of " + Colors.red + killer.increaseKillStatistics(name, true) + ""
    					+ "</col> x " + Colors.red + name + "'s</col>.", true);
    		}
    		int amount = killer.increaseKillStatistics(name, false);
    		if (amount % 100 == 0 && amount != 0) {
    			World.sendWorldMessage(Colors.gold + "<img=6> [Kill Count] </col>" + Colors.red
    					+ Utils.formatPlayerNameForDisplay(killer.getDisplayName()) + "</col> has reached " + amount + " "
    					+ Colors.red + Utils.formatPlayerNameForDisplay(name) + " </col>kills milestone! " + "<img=6>",
    					false);
    		}
    
    	}
    
    	protected void handlePetDrop(Player killer, String name) {
    		Item pet = null;
    		String image = null;
    		if (name.toLowerCase().equalsIgnoreCase("general graardor")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 3750 : 5000) == 1) {
    				pet = new Item(33806);
    				image = "bandos.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant dragon")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39082);
    			}
    		}
    		
    		if (name.toLowerCase().equalsIgnoreCase("revenant knight")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39081);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant darkbeast")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39080);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant ork")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39079);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant lesser demon")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39078);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant hellhound")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39077);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant cyclops")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39076);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant werewolf")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39075);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant vampyre")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39074);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant hobgoblin")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39073);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant pyrefirend")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39072);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant icefiend")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39071);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant goblin")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39070);
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("revenant imp")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1000 : 1500) == 1) {
    				pet = new Item(39069);
    			}
    		}
    
    		if (name.toLowerCase().equalsIgnoreCase("the magister")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(40669);
    				// image = "bandos.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("solak")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(42843);
    				// image = "bandos.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("telos, the warden")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(37679);
    				// image = "bandos.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("k'ril tsutsaroth")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 3750 : 5000) == 1) {
    				pet = new Item(33805);
    				image = "zammy.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("commander zilyana")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 3750 : 5000) == 1) {
    				pet = new Item(33807);
    				image = "sara.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("kree'arra")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 3750 : 5000) == 1) {
    				pet = new Item(33804);
    				image = "arma.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("dagannoth prime")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33826);
    				image = "dag.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("dagannoth supreme")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33828);
    				image = "dag.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("dagannoth rex")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33827);
    				image = "dag.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("chaos elemental")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1500 : 2000) == 1) {
    				pet = new Item(33811);
    				image = "ellie.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("kalphite queen")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1500 : 2000) == 1) {
    				if (Utils.random(1) == 0) {
    					pet = new Item(33816);
    					image = "kq1.png";
    				} else {
    					pet = new Item(33817);
    					image = "kq2.png";
    				}
    			}
    		}
    		if (name.equalsIgnoreCase("araxxor")) {
    			int petChance = Utils.random(killer.getPerkManager().petChanter ? 4900 : 6250);
    			{
    				image = "araxx.png";
    				switch (petChance) {
    				case 1:
    					pet = new Item(33748);
    					break;
    				case 2012:
    					pet = new Item(33749);
    					break;
    				case 63:
    					pet = new Item(33750);
    					break;
    				case 4874:
    					pet = new Item(33751);
    					break;
    				case 0:
    					pet = new Item(33752);
    					break;
    				case 3728:
    					pet = new Item(33753);
    					break;
    				default:
    					break;
    				}
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("corporeal beast")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33812);
    				image = "corp.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("king black dragon")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33818);
    				image = "kbd.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("nex")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 750 : 1000) == 1) {
    				pet = new Item(33808);
    				image = "nex.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("queen black dragon")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 750 : 1000) == 1) {
    				pet = new Item(33825);
    				image = "qbd.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("kalphite king")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33815);
    				image = "kalking.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("vorago")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 375 : 500) == 1) {
    				pet = new Item(28630);
    				image = "vitalis.png";
    			}
    			if (Utils.random(killer.getPerkManager().petChanter ? 185 : 250) == 1) {
    				pet = new Item(33717);
    				image = "bombii.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("legio primus")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33819);
    				image = "legio.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("legio secundus")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33820);
    				image = "legio.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("legio tertius")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33821);
    				image = "legio.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("legio quartus")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33822);
    				image = "legio.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("legio quintus")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33823);
    				image = "legio.png";
    			}
    		}
    		if (name.toLowerCase().equalsIgnoreCase("legio sextus")) {
    			if (Utils.random(killer.getPerkManager().petChanter ? 1875 : 2500) == 1) {
    				pet = new Item(33824);
    				image = "legio.png";
    			}
    		}
    		if (pet != null && !killer.hasItem(pet)) {
    			World.sendWorldMessage(Colors.orange + "<shad=000000><img=6>News: " + killer.getDisplayName()
    					+ " received a " + pet.getName() + " pet drop.", false);
    
    			killer.addItem(pet);
    
    			/*
    			 * new Thread(new NewsManager(killer, "<b><img src=\"./bin/images/news/" + image
    			 * + "\" width=15> " + killer.getDisplayName() + " received a " + pet.getName()
    			 * + " pet drop.")).start();
    			 */
    		}
    	}
    
    	private static Item[] easterDropsCommon = { new Item(12158, Utils.random(1, 4)), // gold
    			new Item(12159, Utils.random(1, 3)), // green
    			new Item(12160, Utils.random(1, 2)), // crimson
    			new Item(12163, 1), // blue
    			new Item(532, 1), // bigbones
    			// bronze set
    			new Item(1155, 1), new Item(1117, 1), new Item(1075, 1), new Item(1189, 1)
    
    	};
    	private static Item[] easterDropsNonCommon = {
    			// rune set
    			new Item(1163, 1), new Item(1127, 1), new Item(1093, 1), new Item(1201, 1),
    			// dbones
    			new Item(536, 1),
    			// tooth half
    			new Item(985, 1),
    			// loop half
    			new Item(987, 1),
    			// fdbones
    			new Item(18830, 1), };
    	private static Item[] easterDropsRare = {
    			// easter eggs
    			new Item(7928, 1), new Item(7929, 1), new Item(7930, 1), new Item(7931, 1), new Item(7932, 1),
    			new Item(7933, 1),
    			// dragon set
    			new Item(11335, 1), new Item(14479, 1), new Item(4087, 1), new Item(1187, 1), };
    	// DarkLord droprate
    	private static Item[] DarkLordCommon = { new Item(450, Utils.random(1)), new Item(537, Utils.random(5, 15)),
    			new Item(450, 1), new Item(995, Utils.random(10000, 100000)), new Item(8781, 1), new Item(1401, 1),
    			new Item(7060, 1), new Item(563, 1), new Item(566, 1), new Item(384, 1), new Item(4093, 1),
    			new Item(1403, 1), new Item(1405, 1), new Item(4091, 1), new Item(1407, 1)
    
    	};
    	private static Item[] DarkLordNoNCommon = { new Item(1249, 1), new Item(989, 1), new Item(830, 1),
    			new Item(2366, 1), new Item(5295, 1), new Item(11133, 1), new Item(1463, 1), new Item(9245, 1) };
    
    	private static Item[] DarkLordRareDrop = { new Item(34222, 1), new Item(34223, 1), new Item(34224, 1),
    			new Item(34225, 1), new Item(34226, 1), new Item(37485, 1), new Item(32703, 1) };
    
    	private void dropnormalbones(Player player) {
    		World.addGroundItem(new Item(526, 1), new WorldTile(this), player, true, 60);
    	}
    
    	/**
    	 * Sends the Drop.
    	 */
    	public void drop() {
    		try {
    			Drop[] drops = NPCDrops.getDrops(id);
    			Player killer = getMostDamageReceivedSourcePlayer();
    			if (killer == null)
    				return;
    			if (killer.getControlerManager().getControler() instanceof DTController)
    				return;
    			if (killer.getControlerManager().getControler() instanceof ZOControler) {
    				int points = this.getMaxHitpoints();
    				int reward = (points + Utils.random(points));
    				killer.ZOPoints += reward;
    				killer.ZOPoints += reward;
    				killer.ZOKills++;
    				ZOGame.sendInterface(killer);
    				return;
    			}
    			Player otherPlayer = killer.getSlayerManager().getSocialPlayer();
    			SlayerManager manager = killer.getSlayerManager();
    			if (manager.isValidTask(npcNames.getNPCName(getId())))
    				manager.checkCompletedTask(getDamageReceived(killer),
    						otherPlayer != null ? getDamageReceived(otherPlayer) : 0);
    			// easter
    			int rng = Utils.random(100);
    			if (id == 1320) {
    				dropnormalbones(killer);
    				if (rng >= 0 && rng <= 70) {
    					World.addGroundItem(easterDropsCommon[Utils.random(easterDropsCommon.length)], new WorldTile(this),
    							killer, true, 60);
    				} else if (rng > 70 && rng <= 95) {
    					World.addGroundItem(easterDropsNonCommon[Utils.random(easterDropsNonCommon.length)],
    							new WorldTile(this), killer, true, 60);
    				} else {
    					Item drop = easterDropsRare[Utils.random(easterDropsRare.length)];
    					World.addGroundItem(drop, new WorldTile(this), killer, true, 60);
    					if (drop.getName().contains("Easter")) {
    						World.sendWorldMessage(Colors.orange + "<shad=000000><img=6>News: " + killer.getDisplayName()
    								+ " received " + drop.getName() + " from " + getName() + ".", false);
    					}
    				}
    			}
    			int dropRate = Utils.random(100);
    			if (id == 19553) {
    				dropnormalbones(killer);
    				if (dropRate >= 0 && dropRate <= 80) {
    					World.addGroundItem(DarkLordCommon[Utils.random(DarkLordCommon.length)], new WorldTile(this),
    							killer, true, 60);
    				} else if (dropRate > 80 && dropRate <= 98) {
    					World.addGroundItem(DarkLordNoNCommon[Utils.random(DarkLordNoNCommon.length)], new WorldTile(this),
    							killer, true, 60);
    				} else {
    					Item drop = DarkLordRareDrop[Utils.random(DarkLordRareDrop.length)];
    					World.addGroundItem(drop, new WorldTile(this), killer, true, 60);
    					if (drop.getName().contains("Dark Lord")) {
    						World.sendWorldMessage(Colors.orange + "<shad=000000><img=6>News: " + killer.getDisplayName()
    								+ " received " + drop.getName() + " from " + getName() + ".", false);
    					}
    				}
    			}
    
    			if (drops == null || getMaxHitpoints() == 1)
    				return;
    			if ((bossInstance != null && (bossInstance.isFinished() || bossInstance.getSettings().isPractiseMode())))
    				return;
    
    			Dungeoneering.handleDrop(killer, this);
    			String name = getDefinitions().name.toLowerCase();
    			increaseKillStatistics(killer, name);
    			handlePetDrop(killer, name);
    			if (name.contains("kalphite king") || name.contains("araxx") || name.contains("vorago")
    					|| name.contains("graardor") || name.contains("zilyana") || name.contains("kree")
    					|| name.contains("tsutsaroth") || name.contains("king black dragon")
    					|| name.contains("queen black dragon") || name.contains("chaos elemental")
    					|| name.contains("corporeal beast") || name.contains("nex") || name.contains("kalphite queen")
    					|| name.contains("dagannoth ")) {
    				/*
    				 * if(Utils.random(1, 250) == 1 || killer.getUsername().contains("Zeus")) {
    				 * sendDrop(killer, new Drop(33611, 1, 1, 1, false)); World.sendLootbeam(killer,
    				 * this); killer.getXmas().
    				 * announceDrop(" has received a big Christmas present from "
    				 * +getDefinitions().name+"!"); }
    				 */
    			}
    			if (name.contains("kalphite king")) {
    				if (Defenders.getCurrentTier(killer, 1) && Utils.random(74) == 0) {
    					sendDrop(killer, new Drop(36163, 1, 1));
    					World.sendWorldMessage(Colors.cyan + "<shad=000000><img=6>News: " + killer.getDisplayName()
    							+ " received a perfect chitin from Kalphite King!", false);
    					/*
    					 * new Thread(new NewsManager(killer,
    					 * "<b><img src=\"./bin/images/news/drop.png\" height=14> " +
    					 * killer.getDisplayName() +
    					 * " received a perfect chitin from Kalphite King.")).start();
    					 */
    
    				}
    			}
    			if (name.contains("nex")) {
    				if (Defenders.getCurrentTier(killer, 0) && Utils.random(59) == 0) {
    					sendDrop(killer, new Drop(36159, 1, 1));
    					World.sendWorldMessage(Colors.cyan + "<shad=000000><img=6>News: " + killer.getDisplayName()
    							+ " received an ancient emblem from Nex!", false);
    					/*
    					 * new Thread(new NewsManager(killer,
    					 * "<b><img src=\"./bin/images/news/drop.png\" height=14> " +
    					 * killer.getDisplayName() + " received an ancient emblem from Nex!")).start();
    					 */
    
    				}
    			}
    			if (name.contains("Commander Zilyana") && Utils.random(500) == 0) {
    				World.addGroundItem(new Item(21476), new WorldTile(this), killer, true, 60);// vanguard
    																							// boots
    			}
    			if (name.contains("revenant") && Utils.random(RingOfWealth.checkRow(killer) ? 150 : 200) == 0) {
    				/*
    				 * int random = Utils.random(475 - getCombatLevel()); if (random <= (1 +
    				 * Settings.getDropQuantityRate(killer) + (RingOfWealth.checkRow(killer) ? 1 :
    				 * 0))) {
    				 */
    
    				int pvpItem = PVP_ITEMS[Utils.random(PVP_ITEMS.length - 1)];
    				/*
    				 * World.updateGroundItem( new Item(pvpItem, pvpItem == 13882 ? Utils.random(30)
    				 * : pvpItem == 13879 ? Utils.random(30) : 1), new WorldTile(this), killer, 60,
    				 * 0, true);
    				 */
    				World.addGroundItem(new Item(pvpItem), new WorldTile(this), killer, true, 60);
    				// World.sendWorldMessage(Colors.cyan + "<shad=000000><img=6>News: " +
    				// killer.getDisplayName()
    				// + " received a rare reward from Revenant!", false);
    
    				/*
    				 * } return;
    				 */
    			}
    			if (getCombatLevel() >= 90 && Utils.random(750) == 0)
    				World.addGroundItem(new Item(18778), new WorldTile(this), killer, true, 60);
    			int level = Combat.getSlayerLevelForNPC(getId());
    			if (level >= 78 && Utils.random(250) == 0) {
    				World.updateGroundItem(new Item(29863), new WorldTile(this), killer, 60, 0, true);
    
    			}
    			if (isCyclops(getDefinitions().name) && Utils.random(500) > 450) {
    				if (killer.getControlerManager().getControler() instanceof WarriorsGuild) {
    					World.updateGroundItem(new Item(whatDefender()), new WorldTile(this), killer, 60, 0, true);
    
    				}
    			}
    			if (isClueScrollNPC(getDefinitions().name) && Utils.random(300) <= 1) {
    				if (!killer.getTreasureTrails().hasClueScrollItem()) {
    					killer.getTreasureTrails().resetCurrentClue();
    					int itemId = getCombatLevel() < 50 ? 2677
    							: getCombatLevel() < 150 ? 2801 : getCombatLevel() < 250 ? 2722 : 19043;
    					World.updateGroundItem(new Item(itemId), new WorldTile(this), killer, 60, 0, true);
    
    				}
    			}
    			if (killer.isHCIronMan() && Utils.random(50) <= 1) {
    				if (name.contains("crab") || name.contains("crawling hand") || name.contains("banshee")
    						|| name.contains("slug"))
    					World.updateGroundItem(new Item(10498), new WorldTile(this), killer, 60, 0, true);
    			}
    			if (this.getId() == 19553) {
    				killer.setPAdamage(killer.getPAdamage() + 10);
    				killer.sm("The dark lord has now increased damage on you.");
    			}
    			if (killer.getEquipment().getRingId() == 31869) {
    				if (Utils.random(100) >= 50) {
    					int toRestore = getMaxHitpoints() / 150;
    					int special = killer.getCombatDefinitions().getSpecialAttackPercentage();
    					if ((toRestore > 0 || toRestore <= 5) && (special + toRestore <= 100))
    						killer.getCombatDefinitions().setSpecialAttackPercentage(special + toRestore);
    				}
    			}
    
    			Drop[] possibleDrops = new Drop[drops.length];
    			int possibleDropsCount = 0;
    			for (Drop drop : drops) {
    				if (killer.getTreasureTrails().isScroll(drop.getItemId())) {
    					if (killer.getTreasureTrails().hasClueScrollItem())
    						continue;
    				}
    				if (drop.getRate() == 100)
    					sendDrop(killer, drop);
    				else {
    					if ((Utils.getRandomDouble(99) + 1) <= (drop.getRate() + Settings.getDropQuantityRate(killer)))
    						possibleDrops[possibleDropsCount++] = drop;
    				}
    			}
    			if (possibleDropsCount > 0)
    				sendDrop(killer, possibleDrops[Utils.getRandom(possibleDropsCount - 1)]);
    			// SlayerTask.onKill(killer, this);
    			ContractHandler.checkContract(killer, id, this);
    		} catch (Exception e) {
    			e.printStackTrace();
    		} catch (Error e) {
    			e.printStackTrace();
    		}
    	}
    
    	@Override
    	public void finish() {
    		if (hasFinished())
    			return;
    		setFinished(true);
    		World.updateEntityRegion(this);
    		World.removeNPC(this);
    	}
    
    	public void forceWalkRespawnTile() {
    		setForceWalk(respawnTile);
    	}
    
    	public int[] getBonuses() {
    		return bonuses;
    	}
    
    	public int getCapDamage() {
    		return capDamage;
    	}
    
    	public NPCCombat getCombat() {
    		return combat;
    	}
    
    	public NPCCombatDefinitions getCombatDefinitions() {
    		return NPCCombatDefinitionsL.getNPCCombatDefinitions(id);
    	}
    
    	public int getCombatLevel() {
    		return combatLevel >= 0 ? combatLevel : getDefinitions().combatLevel;
    	}
    
    	public int getCustomCombatLevel() {
    		return combatLevel;
    	}
    
    	public Item getDefender() {
    		int id = 8844;
    		if (containsItem(8850) || containsItem(20072)) {
    			id = 20072;
    		} else if (containsItem(8849) || containsItem(8850)) {
    			id = 8850;
    		} else if (containsItem(8848)) {
    			id = 8849;
    		} else if (containsItem(8847)) {
    			id = 8848;
    		} else if (containsItem(8846)) {
    			id = 8847;
    		} else if (containsItem(8845)) {
    			id = 8846;
    		} else if (containsItem(8844)) {
    			id = 8845;
    		} else {
    			id = 8844;
    		}
    		return new Item(id);
    	}
    
    	public NPCDefinitions getDefinitions() {
    		return NPCDefinitions.getNPCDefinitions(id);
    	}
    
    	public int getForceTargetDistance() {
    		return forceTargetDistance;
    	}
    
    	public int getId() {
    		return id;
    	}
    
    	public int getLureDelay() {
    		return lureDelay;
    	}
    
    	@Override
    	public double getMagePrayerMultiplier() {
    		return 0;
    	}
    
    	public int getMapAreaNameHash() {
    		return mapAreaNameHash;
    	}
    
    	public int getMaxHit() {
    		return getCombatDefinitions().getMaxHit();
    	}
    
    	public int getMaxHit(int attackStyle) {
    		return getCombatDefinitions().getMaxHit();
    	}
    
    	@Override
    	public int getMaxHitpoints() {
    		if (ZombieManager.isZombie(this)) {
    			return 100 * ZOGame.waveCount;
    		}
    		return getCombatDefinitions().getHitpoints();
    	}
    
    	@Override
    	public double getMeleePrayerMultiplier() {
    		return 0;
    	}
    
    	public WorldTile getMiddleWorldTile() {
    		int size = getSize();
    		return new WorldTile(getCoordFaceX(size), getCoordFaceY(size), getPlane());
    	}
    
    	public String getName() {
    		return name != null ? name : getDefinitions().name;
    	}
    
    	public Transformation getNextTransformation() {
    		return nextTransformation;
    	}
    
    	public ArrayList<Entity> getPossibleTargets(boolean checkNPCs, boolean checkPlayers) {
    		int size = getSize();
    		int agroRatio = 1;
    		ArrayList<Entity> possibleTarget = new ArrayList<Entity>();
    		for (int regionId : getMapRegionsIds()) {
    			if (checkPlayers) {
    				List<Integer> playerIndexes = World.getRegion(regionId).getPlayerIndexes();
    				if (playerIndexes != null) {
    					for (int playerIndex : playerIndexes) {
    						Player player = World.getPlayers().get(playerIndex);
    						if (player == null || player.isDead() || player.hasFinished() || !player.isRunning()
    						/* || player.getGlobalPlayerUpdater().isHidden() */
    								|| !Utils.isOnRange(getX(), getY(), size, player.getX(), player.getY(),
    										player.getSize(), forceTargetDistance > 0 ? forceTargetDistance : agroRatio)
    								|| (!forceMultiAttacked && (!isAtMultiArea() || !player.isAtMultiArea())
    										&& (player.getAttackedBy() != this
    												&& (player.getAttackedByDelay() > Utils.currentTimeMillis()
    														|| player.getFindTargetDelay() > Utils.currentTimeMillis())))
    								|| !clipedProjectile(player, false) || (!forceAgressive && !Wilderness.isAtWild(this)
    										&& player.getSkills().getCombatLevelWithSummoning() >= getCombatLevel() * 2))
    							continue;
    						possibleTarget.add(player);
    					}
    				}
    			}
    			if (checkNPCs) {
    				List<Integer> npcsIndexes = World.getRegion(regionId).getNPCsIndexes();
    				if (npcsIndexes != null) {
    					for (int npcIndex : npcsIndexes) {
    						NPC npc = World.getNPCs().get(npcIndex);
    						if (npc == null || npc == this || npc.isDead() || npc.hasFinished()
    								|| !Utils.isOnRange(getX(), getY(), size, npc.getX(), npc.getY(), npc.getSize(),
    										forceTargetDistance > 0 ? forceTargetDistance : agroRatio)
    								|| !npc.getDefinitions().hasAttackOption()
    								|| ((!isAtMultiArea() || !npc.isAtMultiArea()) && npc.getAttackedBy() != this
    										&& npc.getAttackedByDelay() > Utils.currentTimeMillis())
    								|| !clipedProjectile(npc, false))
    							continue;
    						possibleTarget.add(npc);
    					}
    				}
    			}
    		}
    		return possibleTarget;
    	}
    
    	public ArrayList<Entity> getPossibleTargets() {
    		return getPossibleTargets(false, true);
    	}
    
    	@Override
    	public double getRangePrayerMultiplier() {
    		return 0;
    	}
    
    	public int getRespawnDirection() {
    		NPCDefinitions definitions = getDefinitions();
    		if (definitions.contrast << 32 != 0 && definitions.respawnDirection > 0 && definitions.respawnDirection <= 8)
    			return (4 + definitions.respawnDirection) << 11;
    		return 0;
    	}
    
    	public WorldTile getRespawnTile() {
    		return respawnTile;
    	}
    
    	@Override
    	public int getSize() {
    		return getDefinitions().size;
    	}
    
    	@Override
    	public void handleIngoingHit(final Hit hit) {
    		if (capDamage != -1 && hit.getDamage() > capDamage)
    			hit.setDamage(capDamage);
    		if (hit.getLook() != HitLook.MELEE_DAMAGE && hit.getLook() != HitLook.RANGE_DAMAGE
    				&& hit.getLook() != HitLook.MAGIC_DAMAGE)
    			return;
    		Entity source = hit.getSource();
    		if (source == null)
    			return;
    		if (getName().equalsIgnoreCase("Barrelchest") && hit.getLook() != HitLook.MELEE_DAMAGE) {
    			hit.setDamage(0);
    			if (hit.getSource() instanceof Player) {
    				((Player) source).sm("You need melee to hit this boss.");
    			}
    		}
    		if (source instanceof Player) {
    			final Player p2 = (Player) source;
    			if (BossTimeUpdate == null) {
    				BossTimeUpdate = new ArrayList<>();
    			}
    			if (getHitpoints() > getMaxHitpoints() - getMaxHitpoints() / 12) {
    				if (!BossTimeUpdate.contains(source)) {
    					if (((Player) source).getEquipment().getWeaponId() != 25202) {
    						BossTimeUpdate.add(source);
    					}
    				}
    			}
    			if (p2.getPrayer().hasPrayersOn()) {
    				if (p2.getPrayer().usingPrayer(1, 18))
    					sendSoulSplit(hit, p2);
    				if (hit.getDamage() == 0)
    					return;
    				if (!p2.getPrayer().isBoostedLeech()) {
    					if (hit.getLook() == HitLook.MELEE_DAMAGE) {
    						if (p2.getPrayer().usingPrayer(1, 19) || p2.getPrayer().usingPrayer(1, 20)
    								|| p2.getPrayer().usingPrayer(1, 21) || p2.getPrayer().usingPrayer(1, 22)
    								|| p2.getPrayer().usingPrayer(1, 23) || p2.getPrayer().usingPrayer(1, 24)) {
    							int type = p2.getPrayer().usingPrayer(1, 19) ? 0
    									: p2.getPrayer().usingPrayer(1, 20) ? 1
    											: p2.getPrayer().usingPrayer(1, 21) ? 2
    													: p2.getPrayer().usingPrayer(1, 22) ? 3
    															: p2.getPrayer().usingPrayer(1, 23) ? 4 : 5;
    							p2.getPrayer().increaseTurmoilBonus(this, type);
    							p2.getPrayer().setBoostedLeech(true);
    							return;
    						} else if (p2.getPrayer().usingPrayer(1, 1)) { // sap
    							// att
    							if (Utils.getRandom(4) == 0) {
    								if (p2.getPrayer().reachedMax(0)) {
    									p2.getPackets().sendGameMessage(
    											"Your opponent has been weakened so much that your sap curse has no effect.",
    											true);
    								} else {
    									p2.getPrayer().increaseLeechBonus(0);
    									p2.getPackets().sendGameMessage(
    											"Your curse drains Attack from the enemy, boosting your Attack.", true);
    								}
    								p2.setNextAnimation(new Animation(12569));
    								p2.setNextGraphics(new Graphics(2214));
    								p2.getPrayer().setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2215, 35, 35, 20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2216));
    									}
    								}, 1);
    								return;
    							}
    						} else {
    							if (p2.getPrayer().usingPrayer(1, 10)) {
    								if (Utils.getRandom(7) == 0) {
    									if (p2.getPrayer().reachedMax(3)) {
    										p2.getPackets().sendGameMessage(
    												"Your opponent has been weakened so much that your leech curse has no effect.",
    												true);
    									} else {
    										p2.getPrayer().increaseLeechBonus(3);
    										p2.getPackets().sendGameMessage(
    												"Your curse drains Attack from the enemy, boosting your Attack.", true);
    									}
    									p2.setNextAnimation(new Animation(12575));
    									p2.getPrayer().setBoostedLeech(true);
    									World.sendProjectile(p2, this, 2231, 35, 35, 20, 5, 0, 0);
    									WorldTasksManager.schedule(new WorldTask() {
    										@Override
    										public void run() {
    											setNextGraphics(new Graphics(2232));
    										}
    									}, 1);
    									return;
    								}
    							}
    							if (p2.getPrayer().usingPrayer(1, 14)) {
    								if (Utils.getRandom(7) == 0) {
    									if (p2.getPrayer().reachedMax(7)) {
    										p2.getPackets().sendGameMessage(
    												"Your opponent has been weakened so much that your leech curse has no effect.",
    												true);
    									} else {
    										p2.getPrayer().increaseLeechBonus(7);
    										p2.getPackets().sendGameMessage(
    												"Your curse drains Strength from the enemy, boosting your Strength.",
    												true);
    									}
    									p2.setNextAnimation(new Animation(12575));
    									p2.getPrayer().setBoostedLeech(true);
    									World.sendProjectile(p2, this, 2248, 35, 35, 20, 5, 0, 0);
    									WorldTasksManager.schedule(new WorldTask() {
    										@Override
    										public void run() {
    											setNextGraphics(new Graphics(2250));
    										}
    									}, 1);
    									return;
    								}
    							}
    
    						}
    					}
    					if (hit.getLook() == HitLook.RANGE_DAMAGE) {
    						if (p2.getPrayer().usingPrayer(1, 2)) { // sap range
    							if (Utils.getRandom(4) == 0) {
    								if (p2.getPrayer().reachedMax(1)) {
    									p2.getPackets().sendGameMessage(
    											"Your opponent has been weakened so much that your sap curse has no effect.",
    											true);
    								} else {
    									p2.getPrayer().increaseLeechBonus(1);
    									p2.getPackets().sendGameMessage(
    											"Your curse drains Range from the enemy, boosting your Range.", true);
    								}
    								p2.setNextAnimation(new Animation(12569));
    								p2.setNextGraphics(new Graphics(2217));
    								p2.getPrayer().setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2218, 35, 35, 20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2219));
    									}
    								}, 1);
    								return;
    							}
    						} else if (p2.getPrayer().usingPrayer(1, 11)) {
    							if (Utils.getRandom(7) == 0) {
    								if (p2.getPrayer().reachedMax(4)) {
    									p2.getPackets().sendGameMessage(
    											"Your opponent has been weakened so much that your leech curse has no effect.",
    											true);
    								} else {
    									p2.getPrayer().increaseLeechBonus(4);
    									p2.getPackets().sendGameMessage(
    											"Your curse drains Range from the enemy, boosting your Range.", true);
    								}
    								p2.setNextAnimation(new Animation(12575));
    								p2.getPrayer().setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2236, 35, 35, 20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2238));
    									}
    								});
    								return;
    							}
    						}
    					}
    					if (hit.getLook() == HitLook.MAGIC_DAMAGE) {
    						if (p2.getPrayer().usingPrayer(1, 3)) { // sap mage
    							if (Utils.getRandom(4) == 0) {
    								if (p2.getPrayer().reachedMax(2)) {
    									p2.getPackets().sendGameMessage(
    											"Your opponent has been weakened so much that your sap curse has no effect.",
    											true);
    								} else {
    									p2.getPrayer().increaseLeechBonus(2);
    									p2.getPackets().sendGameMessage(
    											"Your curse drains Magic from the enemy, boosting your Magic.", true);
    								}
    								p2.setNextAnimation(new Animation(12569));
    								p2.setNextGraphics(new Graphics(2220));
    								p2.getPrayer().setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2221, 35, 35, 20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2222));
    									}
    								}, 1);
    								return;
    							}
    						} else if (p2.getPrayer().usingPrayer(1, 12)) {
    							if (Utils.getRandom(7) == 0) {
    								if (p2.getPrayer().reachedMax(5)) {
    									p2.getPackets().sendGameMessage(
    											"Your opponent has been weakened so much that your leech curse has no effect.",
    											true);
    								} else {
    									p2.getPrayer().increaseLeechBonus(5);
    									p2.getPackets().sendGameMessage(
    											"Your curse drains Magic from the enemy, boosting your Magic.", true);
    								}
    								p2.setNextAnimation(new Animation(12575));
    								p2.getPrayer().setBoostedLeech(true);
    								World.sendProjectile(p2, this, 2240, 35, 35, 20, 5, 0, 0);
    								WorldTasksManager.schedule(new WorldTask() {
    									@Override
    									public void run() {
    										setNextGraphics(new Graphics(2242));
    									}
    								}, 1);
    								return;
    							}
    						}
    					}
    
    					// overall
    
    					if (p2.getPrayer().usingPrayer(1, 13)) { // leech defence
    						if (Utils.getRandom(10) == 0) {
    							if (p2.getPrayer().reachedMax(6)) {
    								p2.getPackets().sendGameMessage(
    										"Your opponent has been weakened so much that your leech curse has no effect.",
    										true);
    							} else {
    								p2.getPrayer().increaseLeechBonus(6);
    								p2.getPackets().sendGameMessage(
    										"Your curse drains Defence from the enemy, boosting your Defence.", true);
    							}
    							p2.setNextAnimation(new Animation(12575));
    							p2.getPrayer().setBoostedLeech(true);
    							World.sendProjectile(p2, this, 2244, 35, 35, 20, 5, 0, 0);
    							WorldTasksManager.schedule(new WorldTask() {
    								@Override
    								public void run() {
    									setNextGraphics(new Graphics(2246));
    								}
    							}, 1);
    							return;
    						}
    					}
    				}
    			}
    		}
    
    	}
    
    	public boolean hasChangedCombatLevel() {
    		return changedCombatLevel;
    	}
    
    	public boolean hasDefender() {
    		if (containsItem(8844) || containsItem(8845) || containsItem(8846) || containsItem(8847) || containsItem(8848)
    				|| containsItem(8849) || containsItem(8850) || containsItem(20072)) {
    			return true;
    		}
    		return false;
    	}
    
    	public boolean hasForceWalk() {
    		return forceWalk != null;
    	}
    
    	public boolean hasRandomWalk() {
    		return randomwalk;
    	}
    
    	public boolean isCantFollowUnderCombat() {
    		return cantFollowUnderCombat;
    	}
    
    	public boolean isCantInteract() {
    		return cantInteract;
    	}
    
    	public boolean isClueScrollNPC(String npcName) {
    		switch (npcName) {
    		case "'Rum'-pumped crab":
    		case "Aberrant spectre":
    		case "Abyssal demon":
    		case "Abyssal leech":
    		case "Air elemental":
    		case "Ancient mage":
    		case "Ancient ranger":
    		case "Ankou":
    		case "Armoured zombie":
    		case "Arrg":
    		case "Aviansie":
    		case "Bandit":
    		case "Banshee":
    		case "Barbarian":
    		case "Barbarian woman":
    		case "Basilisk":
    		case "Black Guard":
    		case "Black Guard Berserker":
    		case "Black Guard crossbowdwarf":
    		case "Black Heather":
    		case "Black Knight":
    		case "Black Knight Titan":
    		case "Black demon":
    		case "Black dragon":
    		case "Laboratory slime":
    		case "Blood reaver":
    		case "Bloodveld":
    		case "Blue dragon":
    		case "Bork":
    		case "Brine rat":
    		case "Bronze dragon":
    		case "Brutal green dragon":
    		case "Catablepon":
    		case "Cave bug":
    		case "Cave crawler":
    		case "Cave horror":
    		case "Cave slime":
    		case "Chaos Elemental":
    		case "Chaos druid":
    		case "Chaos druid warrior":
    		case "Chaos dwarf":
    		case "Chaos dwarf hand cannoneer":
    		case "Chaos dwogre":
    		case "Cockatrice":
    		case "Cockroach drone":
    		case "Cockroach soldier":
    		case "Cockroach worker":
    		case "Columbarium":
    		case "Columbarium key":
    		case "Commander Zilyana":
    		case "Corporeal Beast":
    		case "Crawling Hand":
    		case "Cyclops":
    		case "Cyclossus":
    		case "Dagannoth":
    		case "Dagannoth Prime":
    		case "Dagannoth Rex":
    		case "Dagannoth Supreme":
    		case "Dagannoth guardian":
    		case "Dagannoth spawn":
    		case "Dark beast":
    		case "Desert Lizard":
    		case "Desert strykewyrm":
    		case "Dried zombie":
    		case "Dust devil":
    		case "Dwarf":
    		case "Earth elemental":
    		case "Earth warrior":
    		case "Elf warrior":
    		case "Elite Black Knight":
    		case "Elite Dark Ranger":
    		case "Elite Khazard guard":
    		case "Exiled Kalphite Queen":
    		case "Exiled kalphite guardian":
    		case "Exiled kalphite marauder":
    		case "Ferocious barbarian spirit":
    		case "Fire elemental":
    		case "Fire giant":
    		case "Flesh Crawler":
    		case "Forgotten Archer":
    		case "Forgotten Mage":
    		case "Forgotten Warrior":
    		case "Frog":
    		case "Frost dragon":
    		case "Ganodermic beast":
    		case "Gargoyle":
    		case "General Graardor":
    		case "General malpractitioner":
    		case "Ghast":
    		case "Ghostly warrior":
    		case "Giant Mole":
    		case "Giant ant soldier":
    		case "Giant ant worker":
    		case "Giant rock crab":
    		case "Giant skeleton":
    		case "Giant wasp":
    		case "Glacor":
    		case "Glod":
    		case "Gnoeals":
    		case "Goblin statue":
    		case "Gorak":
    		case "Greater demon":
    		case "Greater reborn mage":
    		case "Greater reborn ranger":
    		case "Greater reborn warrior":
    		case "Green dragon":
    		case "Grotworm":
    		case "Haakon the Champion":
    		case "Harold":
    		case "Harpie Bug Swarm":
    		case "Hill giant":
    		case "Hobgoblin":
    		case "Ice giant":
    		case "Ice strykewyrm":
    		case "Ice troll":
    		case "Ice troll female":
    		case "Ice troll male":
    		case "Ice troll runt":
    		case "Ice warrior":
    		case "Icefiend":
    		case "Iron dragon":
    		case "Jelly":
    		case "Jogre":
    		case "Jungle horror":
    		case "Jungle strykewyrm":
    		case "K'ril Tsutsaroth":
    		case "Kalphite Guardian":
    		case "Kalphite King":
    		case "Kalphite Queen":
    		case "Kalphite Soldier":
    		case "Kalphite Worker":
    		case "Killerwatt":
    		case "King Black Dragon":
    		case "Kraka":
    		case "Kree'arra":
    		case "Kurask":
    		case "Lanzig":
    		case "Lesser demon":
    		case "Lesser reborn mage":
    		case "Lesser reborn ranger":
    		case "Lesser reborn warrior":
    		case "Lizard":
    		case "Locust lancer":
    		case "Locust ranger":
    		case "Locust rider":
    		case "Mature grotworm":
    		case "Mighty banshee":
    		case "Minotaur":
    		case "Mithril dragon":
    		case "Molanisk":
    		case "Moss giant":
    		case "Mountain troll":
    		case "Mummy":
    		case "Mutated bloodveld":
    		case "Mutated jadinko male":
    		case "Mutated zygomite":
    		case "Nechryael":
    		case "Nex":
    		case "Ogre":
    		case "Ogre statue":
    		case "Ork statue":
    		case "Otherworldly being":
    		case "Ourg statue":
    		case "Paladin":
    		case "Pee Hat":
    		case "Pirate":
    		case "Pyrefiend":
    		case "Queen Black Dragon":
    		case "Red dragon":
    		case "Rock lobster":
    		case "Rockslug":
    		case "Salarin the Twisted":
    		case "Scabaras lancer":
    		case "Scarab mage":
    		case "Sea Snake Hatchling":
    		case "Shadow warrior":
    		case "Skeletal Wyvern":
    		case "Skeletal miner":
    		case "Skeleton":
    		case "Skeleton fremennik":
    		case "Skeleton thug":
    		case "Skeleton warlord":
    		case "Small Lizard":
    		case "Soldier":
    		case "Sorebones":
    		case "Speedy Keith":
    		case "Spiritual mage":
    		case "Spiritual warrior":
    		case "Steel dragon":
    		case "Stick":
    		case "Suqah":
    		case "Terror dog":
    		case "Thrower Troll":
    		case "Thug":
    		case "Tortured soul":
    		case "Trade floor guard":
    		case "Tribesman":
    		case "Troll general":
    		case "Troll spectator":
    		case "Tstanon Karlak":
    		case "Turoth":
    		case "Tyras guard":
    		case "TzHaar-Hur":
    		case "TzHaar-Ket":
    		case "TzHaar-Mej":
    		case "TzHaar-Xil":
    		case "Undead troll":
    		case "Vampyre":
    		case "Vyre corpse":
    		case "Vyrelady":
    		case "Vyrelord":
    		case "Vyrewatch":
    		case "Wallasalki":
    		case "Warped terrorbird":
    		case "Warped tortoise":
    		case "Warrior":
    		case "Water elemental":
    		case "Waterfiend":
    		case "Werewolf":
    		case "White Knight":
    		case "WildyWyrm":
    		case "Yeti":
    		case "Yuri":
    		case "Zakl'n Gritch":
    		case "Zombie":
    		case "Zombie hand":
    		case "Zombie swab":
    			return true;
    		}
    		return false;
    	}
    
    	public boolean isCyclops(String npcName) {
    		switch (npcName) {
    		case "Cyclops":
    			return true;
    		}
    		return false;
    	}
    
    	public boolean isFamiliar() {
    		return this instanceof Familiar;
    	}
    
    	public boolean isForceAgressive() {
    		return forceAgressive;
    	}
    
    	public boolean isForceFollowClose() {
    		return forceFollowClose;
    	}
    
    	public boolean isForceMultiAttacked() {
    		return forceMultiAttacked;
    	}
    
    	public boolean isForceWalking() {
    		return forceWalk != null;
    	}
    
    	/**
    	 * Gets the locked.
    	 * 
    	 * @Return The locked.
    	 */
    	public boolean isLocked() {
    		return locked;
    	}
    
    	public boolean isNoDistanceCheck() {
    		return noDistanceCheck;
    	}
    
    	public boolean isSpawned() {
    		return spawned;
    	}
    
    	public boolean isUnderCombat() {
    		return combat.underCombat();
    	}
    
    	@Override
    	public boolean needMasksUpdate() {
    		return super.needMasksUpdate() || refreshHeadIcon || nextTransformation != null || changedCombatLevel
    				|| changedName;
    	}
    
    	public void setNextNPCTransformation(int id) {
    		setNPC(id);
    		nextTransformation = new Transformation(id);
    		if (getCustomCombatLevel() != -1)
    			changedCombatLevel = true;
    		if (getCustomName() != null)
    			changedName = true;
    	}
    
    	public String getCustomName() {
    		return name;
    	}
    
    	@Override
    	public void processEntity() {
    		super.processEntity();
    		processNPC();
    	}
    
    	/**
    	 * We init custom NPC settings.
    	 */
    	public void loadNPCSettings() {
    		if (id == 6892) {
    			setName("Pet Manager");
    			setRandomWalk(0);
    		}
    		for (int npcId : Settings.NON_WALKING_NPCS) {
    			if (npcId == id) {
    				setRandomWalk(0);
    				break;
    			}
    		}
    		for (SlayerMaster master : SlayerMaster.values()) {
    			if (master == null)
    				continue;
    			if (master.getNPCId() == id) {
    				setRandomWalk(0);
    				break;
    			}
    		}
    		for (int npcId : Settings.FORCE_WALKING_NPCS) {
    			if (npcId == id) {
    				setRandomWalk(NORMAL_WALK);
    				break;
    			}
    		}
    		if (id == 6139) {
    			setName(Settings.SERVER_NAME + "'s welcomer");
    			setRandomWalk(0);
    		}
    	}
    
    	public void processNPC() {
    		if (isDead() || locked || isLock())
    			return;
    		loadNPCSettings();
    		if (!combat.process()) {
    			if (!isForceWalking()) {
    				if (!cantInteract) {
    					if (!checkAgressivity()) {
    						if (getFreezeDelay() < Utils.currentTimeMillis()) {
    							if (!ZombieManager.isZombie(this)) {
    								if (!hasWalkSteps() && (walkType & NORMAL_WALK) != 0) {
    									boolean can = false;
    									for (int i = 0; i < 2; i++) {
    										if (Math.random() * 1000.0 < 100.0) {
    											can = true;
    											break;
    										}
    									}
    									if (can) {
    										int moveX = (int) Math.round(Math.random() * 10.0 - 5.0);
    										int moveY = (int) Math.round(Math.random() * 10.0 - 5.0);
    										resetWalkSteps();
    										if (getMapAreaNameHash() != -1) {
    											if (!MapAreas.isAtArea(getMapAreaNameHash(), this)) {
    												forceWalkRespawnTile();
    												return;
    											}
    											addWalkSteps(getX() + moveX, getY() + moveY, 5, (walkType & FLY_WALK) == 0);
    										} else
    											addWalkSteps(respawnTile.getX() + moveX, respawnTile.getY() + moveY, 5,
    													(walkType & FLY_WALK) == 0);
    									}
    								}
    							}
    						}
    					}
    				}
    			}
    		}
    
    		if (isBoss(this) && BossTimeUpdate.size() > 0) {
    			ArrayList<Entity> PossibleTargs = this.getPossibleTargets();
    			for (Iterator<Entity> iter = BossTimeUpdate.iterator(); iter.hasNext();) {
    				Entity e = iter.next();
    				if (e instanceof Player) {
    					if (!PossibleTargs.contains(e)) {
    						iter.remove();
    					}
    				}
    			}
    		}
    		if (isForceWalking()) {
    			if (getFreezeDelay() < Utils.currentTimeMillis()) {
    				if (getX() != forceWalk.getX() || getY() != forceWalk.getY()) {
    					if (!hasWalkSteps()) {
    						int steps = RouteFinder.findRoute(RouteFinder.WALK_ROUTEFINDER, getX(), getY(), getPlane(),
    								getSize(), new FixedTileStrategy(forceWalk.getX(), forceWalk.getY()), true);
    						int[] bufferX = RouteFinder.getLastPathBufferX();
    						int[] bufferY = RouteFinder.getLastPathBufferY();
    						for (int i = steps - 1; i >= 0; i--) {
    							if (!addWalkSteps(bufferX[i], bufferY[i], 25, true))
    								break;
    						}
    					}
    					if (!hasWalkSteps()) {
    						setNextWorldTile(new WorldTile(forceWalk));
    						forceWalk = null;
    					}
    				} else
    					forceWalk = null;
    			}
    		}
    		if (ZombieManager.isZombie(this)) {
    			setName("Wave " + ZOGame.waveCount + " zombie");
    		}
    		if (id == 2998 && Utils.random(50) == 0)
    			setNextForceTalk(new ForceTalk("Welcome to Casino!"));
    		if (id == 162 && Utils.random(20) == 0)
    			setNextForceTalk(new ForceTalk(gnomeTrainerForceTalk[Utils.random(gnomeTrainerForceTalk.length)]));
    		if (id == 15786 && Utils.random(20) == 0)
    			setNextForceTalk(new ForceTalk(trialAnnouncerForceTalk[Utils.random(trialAnnouncerForceTalk.length)]));
    	}
    
    	public void removeTarget() {
    		if (combat.getTarget() == null)
    			return;
    		combat.removeTarget();
    	}
    
    	@Override
    	public void reset() {
    		super.reset();
    		setDirection(getRespawnDirection());
    		combat.reset();
    		bonuses = NPCBonuses.getBonuses(id); // back to real bonuses
    		forceWalk = null;
    	}
    
    	/**
    	 * checks if the npc is a boss from the settings array
    	 * 
    	 * @Param npc
    	 * @Return
    	 */
    	private boolean isBoss(NPC npc) {
    		for (int bossId : Settings.BOSS_IDS) {
    			if (npc.getId() == bossId) {
    				return true;
    			}
    		}
    		return false;
    	}
    
    	@Override
    	public void resetMasks() {
    		super.resetMasks();
    		nextTransformation = null;
    		changedCombatLevel = false;
    		changedName = false;
    		refreshHeadIcon = false;
    	}
    
    	@Override
    	public void sendDeath(final Entity source) {
    		final NPCCombatDefinitions defs = getCombatDefinitions();
    		resetWalkSteps();
    		combat.removeTarget();
    		setNextAnimation(null);
    		WorldTasksManager.schedule(new WorldTask() {
    			int loop;
    
    			@Override
    			public void run() {
    				if (loop == 0)
    					setNextAnimation(new Animation(defs.getDeathEmote()));
    				else if (loop >= defs.getDeathDelay()) {
    					if (source instanceof Player) {
    						Player player = (Player) source;
    						player.getControlerManager().processNPCDeath(NPC.this);
    					}
    					drop();
    					BossTimeUpdate = new ArrayList<>();
    					reset();
    					setLocation(respawnTile);
    					finish();
    					if (!isSpawned())
    						setRespawnTask();
    					stop();
    					if (ZombieManager.isZombie(NPC.this)) {
    						ZombieManager.sendZombieDeath(NPC.this);
    					}
    				}
    				loop++;
    			}
    		}, 0, 1);
    	}
    
    	protected void sendDrop(final Player player, Drop drop) {
    		final WorldTile tile = new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane());
    		final String dropName = ItemDefinitions.getItemDefinitions(drop.getItemId()).getName().toLowerCase();
    		boolean dropOk = true;
    		int random = Utils.random(1, 100);
    		ArrayList<Entity> PossibleTargs = this.getPossibleTargets();
    		for (Iterator<Entity> iter = BossTimeUpdate.iterator(); iter.hasNext();) {
    			Entity e = iter.next();
    			// for(Entity e: BossTimeUpdate){
    			if (e instanceof Player) {
    				if (PossibleTargs.contains(e)) {
    					Player p = (Player) e;
    					p.getBossTimerManager().recieveDeath(this);
    					// BossTimeUpdate.remove(iter);
    					iter.remove();
    				}
    			}
    		}
    		if (drop.getItemId() == 618)
    			dropOk = false;
    		if (drop.getItemId() == 995)
    			dropOk = false;
    		if (drop.getItemId() == 0)
    			dropOk = false;
    
    		if (drop.getItemId() == 11286) {
    			if (Utils.random(100) < 75)
    				dropOk = false;
    		}
    		if (drop.getItemId() == 31203) {
    			if (Utils.random(100) < 90)
    				dropOk = false;
    		}
    
    		ClansManager manager = player.getClanManager();
    		/*
    		 * if(!(manager == null)) { if(random >= 55) {
    		 * if(player.getClanManager().getClan().getClanPerks().hasPerk(ClanPerk.Perks.
    		 * TIER_3_INCREASED_REVENUE)) {
    		 * player.getClanManager().getClan().getClanRevenue().addClanRevenue(player,
    		 * Utils.random(257, 348));
    		 * 
    		 * } else
    		 * if(player.getClanManager().getClan().getClanPerks().hasPerk(ClanPerk.Perks.
    		 * TIER_2_INCREASED_REVENUE)) {
    		 * player.getClanManager().getClan().getClanRevenue().addClanRevenue(player,
    		 * Utils.random(184, 224));
    		 * 
    		 * } else
    		 * if(player.getClanManager().getClan().getClanPerks().hasPerk(ClanPerk.Perks.
    		 * INCREASED_REVENUE)) {
    		 * player.getClanManager().getClan().getClanRevenue().addClanRevenue(player,
    		 * Utils.random(124, 164)); } } }
    		 */
    		CharmingImp.handleCharmDrops(player, this);
    		if (player.getPerkManager().herbivore) {
    			if (Utils.getRandom(150) <= 1) {
    				World.updateGroundItem(new Item(3062), tile, player, 60, 0, true);
    				player.sendMessage("You've received a Herb Box drop thanks to your Herbivore perk.", true);
    			}
    		}
    		int bonus = 1;
    		Item item2 = ItemDefinitions.getItemDefinitions(drop.getItemId()).isStackable()
    				? new Item(drop.getItemId(),
    						(drop.getMinAmount() * Settings.DROP_RATE * bonus)
    								+ Utils.getRandom(drop.getExtraAmount() * Settings.DROP_RATE * bonus))
    				: new Item(drop.getItemId(), drop.getMinAmount() + Utils.getRandom(drop.getExtraAmount()));
    		FriendChatsManager fc = player.getCurrentFriendChat();
    		if (player.isToogleLootShare()) {
    			if (fc != null) {
    				CopyOnWriteArrayList<Player> players = fc.getPlayers();
    				CopyOnWriteArrayList<Player> playersWithLs = new CopyOnWriteArrayList<Player>();
    				for (Player p : players) {
    					if (p.isToogleLootShare() && p.getRegionId() == player.getRegionId())
    						playersWithLs.add(p);
    				}
    				if (item2.getDefinitions().getTipitPrice() >= 1000000) {
    					int playeramount = playersWithLs.size();
    					int dividedamount = (item2.getDefinitions().getTipitPrice() / playeramount);
    					for (Player p : playersWithLs) {
    						p.getInventory().addItemMoneyPouch(new Item(995, dividedamount));
    						p.sendMessage(
    								String.format("<col=115b0d>You received: %sx coins from a split of the item %s.</col>",
    										dividedamount, dropName));
    						return;
    					}
    				} else {
    					Player luckyPlayer = playersWithLs.get((int) (Math.random() * playersWithLs.size())); // Choose
    																											// a
    																											// random
    																											// player
    																											// to
    																											// get
    																											// the
    																											// drop.
    					World.addGroundItem(item2,
    							new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()), luckyPlayer,
    							true, 180);
    					luckyPlayer.sendMessage(
    							String.format("<col=115b0d>You received: %sx %s.</col>", item2.getAmount(), dropName));
    					for (Player p : playersWithLs) {
    						if (!p.equals(luckyPlayer))
    							p.sendMessage(String.format("%s received: %sx %s.", luckyPlayer.getDisplayName(),
    									item2.getAmount(), dropName));
    					}
    				}
    				return;
    			}
    		}
    
    		/**
    		 * christmas gift
    		 * 
    		 * if (Utils.getRandom(2000) <= 1) { World.updateGroundItem(new Item(33610),
    		 * tile, player, 60, 0, true); player.sendMessage("You've found a Christmas
    		 * gift!", true); World.sendGraphics(player, new Graphics(94), new
    		 * WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane())); }
    		 */
    
    		/**
    		 * Clue Scroll
    		 * 
    		 */
    		if (Utils.getRandom(1000) <= 1) {
    			World.updateGroundItem(new Item(2677), tile, player, 60, 0, true);
    			player.sendMessage("You've found a Easy clue scroll.", true);
    			World.sendGraphics(player, new Graphics(1274),
    					new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    		}
    		if (Utils.getRandom(2000) <= 1) {
    			World.updateGroundItem(new Item(2801), tile, player, 60, 0, true);
    			player.sendMessage("You've found a Medium clue scroll.", true);
    			World.sendGraphics(player, new Graphics(1274),
    					new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    		}
    		if (Utils.getRandom(4000) <= 1) {
    			World.updateGroundItem(new Item(2722), tile, player, 60, 0, true);
    			player.sendMessage("You've found a Hard clue scroll.", true);
    			World.sendGraphics(player, new Graphics(1274),
    					new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    		}
    		if (Utils.getRandom(8000) <= 1) {
    			World.updateGroundItem(new Item(19043), tile, player, 60, 0, true);
    			player.sendMessage("You've found a Elite clue scroll.", true);
    			World.sendGraphics(player, new Graphics(1274),
    					new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    		}
    		if (player.getEquipment().getRingId() == 39812) {
    			if (Utils.getRandom(200000) <= 1) {
    				World.updateGroundItem(new Item(39814), tile, player, 60, 0, true);
    				World.sendGraphics(player, new Graphics(5596),
    						new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    				player.sendMessage("You've received a Hazelmere's signet ring.", true);
    			}
    		}
    		if (player.getEquipment().getRingId() == 2572) {
    			if (Utils.getRandom(400000) <= 1) {
    				World.updateGroundItem(new Item(39814), tile, player, 60, 0, true);
    				World.sendGraphics(player, new Graphics(5596),
    						new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    				player.sendMessage("You've received a Hazelmere's signet ring.", true);
    			}
    		}
    
    		if (player.getEquipment().getRingId() == 39814) {
    			int amount = drop.getMinAmount() + Utils.getRandom(drop.getExtraAmount());
    			if (Utils.getRandom(200) <= 1) {
    				World.updateGroundItem(new Item(drop.getItemId(), amount), tile, player, 60, 0, true);
    				World.sendGraphics(player, new Graphics(5599),
    						new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    				player.sendMessage(" You feel the luck of Hazelmere shine .", true);
    
    			}
    		}
    		if (player.getPerkManager().HazelmereLuck) {
    			int amount = drop.getMinAmount() + Utils.getRandom(drop.getExtraAmount());
    			if (Utils.getRandom(400) <= 1) {
    				World.updateGroundItem(new Item(drop.getItemId(), amount), tile, player, 60, 0, true);
    				World.sendGraphics(player, new Graphics(5599),
    						new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    				player.sendMessage(" You feel the luck of Hazelmere shine .", true);
    
    			}
    		}
    		if (dropName.contains("Clue"))
    			dropOk = false;
    		if (getName().equalsIgnoreCase("Green dragon")) {
    			if (Utils.getRandom((player.getPerkManager().dragonTrainer ? 1000 : 1500)) == 0) {
    				if (!player.hasItem(new Item(12473))) {
    					World.updateGroundItem(new Item(12473, 1), tile, player, 60, 0, true);
    					player.sendMessage("This green dragon was carrying an egg which hatched when dropped.", true);
    				}
    			}
    		}
    		if (getName().equalsIgnoreCase("Blue dragon")) {
    			if (Utils.getRandom((player.getPerkManager().dragonTrainer ? 1000 : 1500)) == 0) {
    				if (!player.hasItem(new Item(12471))) {
    					World.updateGroundItem(new Item(12471, 1), tile, player, 60, 0, true);
    					player.sendMessage("This blue dragon was carrying an egg which hatched when dropped.", true);
    				}
    			}
    		}
    		if (getName().equalsIgnoreCase("Red dragon")) {
    			if (Utils.getRandom((player.getPerkManager().dragonTrainer ? 1000 : 1500)) == 0) {
    				if (!player.hasItem(new Item(12469))) {
    					World.updateGroundItem(new Item(12469, 1), tile, player, 60, 0, true);
    					player.sendMessage("This red dragon was carrying an egg which hatched when dropped.", true);
    				}
    			}
    		}
    		if (getName().equalsIgnoreCase("Black dragon")
    				|| getName().equalsIgnoreCase("King black dragon") && !getName().contains("Queen")) {
    			if (Utils.getRandom((player.getPerkManager().dragonTrainer ? 1000 : 1500)) == 0) {
    				if (!player.hasItem(new Item(12475))) {
    					World.updateGroundItem(new Item(12475, 1), tile, player, 60, 0, true);
    					player.sendMessage("This black dragon was carrying an egg which hatched when dropped.", true);
    				}
    			}
    		}
    		if (dropOk) {
    			Item item = new Item(drop.getItemId());
    			int amount = drop.getMinAmount() + Utils.getRandom(drop.getExtraAmount());
    			if (item.getDefinitions().getValue() >= player.setLootBeam) {
    				World.sendGraphics(player, new Graphics(7),
    						new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    				WorldTasksManager.schedule(new WorldTask() {
    
    					@Override
    					public void run() {
    						int loop = 0;
    						if (loop == 1) {
    							World.sendGraphics(player, new Graphics(7),
    									new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    						}
    						if (loop == 2) {
    							World.sendGraphics(player, new Graphics(7),
    									new WorldTile(getCoordFaceX(getSize()), getCoordFaceY(getSize()), getPlane()));
    						}
    						if (loop == 3) {
    							stop();
    						}
    						loop++;
    					}
    
    				}, 0, 1);
    
    				player.sm("<col=ff8c38>A rainbow of wealth came from one of your items.");
    			}
    			if (player.getInventory().containsItem(18337, 1)) {
    				if (Bonecrusher.handleDrop(player, item))
    					return;
    			}
    			if (player.getInventory().containsItem(19675, 1)) {
    				if (Herbicide.handleDrop(player, item))
    					return;
    			}
    			if (this.getId() == 22908) { //TELOS
    			player.getBank().addItem(new Item(drop.getItemId(), amount), false);
                       		 player.setNextWorldTile(new WorldTile(3167, 2729, 0));
                   
                        		player.getPackets().sendGameMessage("YOUR TELOS LOOT HAS BEEN SENT TO YOUR BANK");
    				 }
    			
    			if (player.getPetManager().isReceivePet() && item.getDefinitions().getValue() >= (player.setLootBeam * 1.50)
    					&& player.setLootBeam > 100000) {
    				player.getBank().addItem(new Item(drop.getItemId(), amount), false);
    				player.sm(
    						"<col=ff8c38>Your legendary pet has collected your drop of 50% greater than your loot beam threshold, and has send it to your bank.");
    				return;
    			}
    			int coins = (int) (Utils.random(getCombatLevel() * Utils.random(2, 100))
    					* Settings.getDropQuantityRate(player));
    			CoinAccumulator.handleCoinAccumulator(player, this, coins);
    			// DOUBLE DROP ADD *2 ON AMOUNT
    			boolean doubledrop = false;
    			if (Settings.doubleDrop) {
    				World.updateGroundItem(new Item(drop.getItemId(), amount), tile, player, 60, 0, true);
    				World.updateGroundItem(new Item(drop.getItemId(), amount), tile, player, 60, 0, true);
    				doubledrop = true;// hiondi pde, kasi dapat copy pa natin ang dropname.contains method kasi para
    									// sa rare, pag eto lang ginawa natin, lahat ng drop mag aanounce to
    			} else {
    				World.updateGroundItem(new Item(drop.getItemId(), amount), tile, player, 60, 0, true);
    			}
    			// World.updateGroundItem(new Item(drop.getItemId(), amount), tile, player, 60,
    			// 0, true);
    			if (dropName.contains("pernix") || dropName.contains("torva") || dropName.contains("virtus")
    					|| dropName.contains("Ascension")  || dropName.contains("Ascension Signet") || dropName.contains("bandos") || dropName.contains("hilt")
    					|| dropName.contains("sirenic")
    					|| (dropName.contains("armadyl") && !dropName.contains("rune") && !dropName.contains("shard"))
    					|| dropName.contains("spirit shield") || dropName.contains("fire warrior")
    					|| (dropName.contains("saradomin ") && !dropName.contains("brew"))
    					|| dropName.contains("dragon claw") || dropName.contains("dragon full")
    					|| dropName.contains("dragon pick") || dropName.contains("zaryte") || dropName.contains("boogie")
    					|| dropName.contains("High Armour") || dropName.contains("Thalassia's Revenge")
    					|| dropName.contains("Rage of Hyu-Ji") || dropName.contains("Winds of Waiko")
    					|| dropName.contains("steadf") || dropName.contains("glaiven") || dropName.contains("ragef")
    					|| dropName.contains("hiss") || dropName.contains("murmur") || dropName.contains("whisper")
    					|| dropName.contains("dragon claw") || dropName.contains("ascension grip")
    					|| dropName.contains("drygore") || dropName.contains("razor") || dropName.contains("subjugation")
    					|| dropName.contains("draconic") || dropName.contains("crest")
    					|| (dropName.contains("zamorak") && !dropName.contains("wine") && !dropName.contains("brew"))
    					|| dropName.contains("dragon kite") || dropName.contains("dragon pick")
    					|| dropName.contains("dragon rider lance") || dropName.contains("scythe")
    					|| dropName.contains("seismic") || dropName.contains("elixi") || dropName.contains("sigil")
    					|| dropName.contains("zamorakian spear") || dropName.contains("cywir")
    					|| dropName.contains("vanguard") || dropName.contains("dormant") || dropName.contains("magister")
    					|| dropName.contains("anima") || dropName.contains("achto") || dropName.contains("retro")
    					|| dropName.contains("raptor") || dropName.contains("ripper")
    					|| dropName.contains("wyvern crossbow") || dropName.contains("gloves of passage")
    					|| dropName.contains("hazelmere") || dropName.contains("chest") || dropName.contains("hazelmere")
    					|| dropName.contains("imperium core") || dropName.contains("wand of the praesul")
    					|| dropName.contains("Cinderbane") || dropName.contains("blightbound")
    					|| dropName.contains("staff of light") || dropName.contains("hydrix")
    					|| dropName.contains("luck of dwarves")) {
    
    				String message = Utils.getAorAn(dropName) + " " + dropName;
    
    				if (dropName.contains("gloves") || dropName.contains("boots"))
    					message = "a pair of " + dropName;
    
    				if (dropName.contains("chaps") || dropName.contains("tassets"))
    					message = dropName;
    
    				if (doubledrop)// ayus na pala
    					World.sendWorldMessage(Colors.orange + "<shad=000000><img=6>News: " + player.getDisplayName()
    							+ " received a double drop of " + message + " from " + getName() + ".", false);
    				else
    					World.sendWorldMessage(Colors.orange + "<shad=000000><img=6>News: " + player.getDisplayName()
    							+ " received a drop of " + message + " from " + getName() + ".", false);
    
    				
    				  DiscordMessageHandler.sendMessage("ingame-live-feed", ":loudspeaker: " +
    				  player.getDisplayName() + " received " + message + " from " +
    				  (getName().equalsIgnoreCase("large mound") ? "WildyWyrm" : getName()) + ".");
    				 
    				
    				  new Thread(new NewsManager(player,
    				 "<b><img src=\"./bin/images/news/drop.png\" height=14> " +
    				  player.getDisplayName() + " received " + message + " from " + getName() +
    				  ".")).start();
    				
    			}
    		}
    	}
    
    	/**
    	 * Sends Soulsplit - Player to NPC.
    	 * 
    	 * @Param hit
    	 *            The Hit.
    	 * @Param user
    	 *            The Entity (Player) using SoulSplit.
    	 */
    	public void sendSoulSplit(final Hit hit, final Entity user) {
    		final NPC target = this;
    		if (hit.getDamage() > 0)
    			World.sendProjectile(user, this, 2263, 11, 11, 20, 5, 0, 0);
    		double heal = 5.0;
    		/** Amulet of Souls **/
    		if (((Player) user).getEquipment().getAmuletId() == 31875 && Utils.random(100) >= 50)
    			heal -= Utils.random(1.25, 2.5); // We reduce since it divides
    												// damage by heal
    		user.heal((int) (hit.getDamage() / heal));
    		WorldTasksManager.schedule(new WorldTask() {
    
    			@Override
    			public void run() {
    				setNextGraphics(new Graphics(2264));
    				if (hit.getDamage() > 0)
    					World.sendProjectile(target, user, 2263, 11, 11, 20, 5, 0, 0);
    			}
    		}, 1);
    	}
    
    	@Override
    	public void setAttackedBy(Entity target) {
    		super.setAttackedBy(target);
    		if (target == combat.getTarget() && !(combat.getTarget() instanceof Familiar))
    			lastAttackedByTarget = Utils.currentTimeMillis();
    	}
    
    	public void tripleBonuses() {
    		for (int i = 0; i < bonuses.length; i++)
    			this.bonuses[i] = bonuses[i] * 3;
    	}
    
    	public void resetBonuses() {
    		this.bonuses = NPCBonuses.getBonuses(this.getId());
    	}
    
    	public void setBonuses() {
    		bonuses = NPCBonuses.getBonuses(id);
    		if (bonuses == null) {
    			bonuses = new int[10];
    			int level = getCombatLevel();
    			for (int i = 0; i < bonuses.length; i++)
    				bonuses[i] = level;
    		}
    	}
    
    	public void setCanBeAttackFromOutOfArea(boolean b) {
    		canBeAttackFromOutOfArea = b;
    	}
    
    	public void setCantFollowUnderCombat(boolean canFollowUnderCombat) {
    		this.cantFollowUnderCombat = canFollowUnderCombat;
    	}
    
    	public void setCantInteract(boolean cantInteract) {
    		this.cantInteract = cantInteract;
    		if (cantInteract)
    			combat.reset();
    	}
    
    	public void setCapDamage(int capDamage) {
    		this.capDamage = capDamage;
    	}
    
    	public void setCombatLevel(int level) {
    		combatLevel = getDefinitions().combatLevel == level ? -1 : level;
    		changedCombatLevel = true;
    	}
    
    	public void setForceAgressive(boolean forceAgressive) {
    		this.forceAgressive = forceAgressive;
    	}
    
    	public void setForceFollowClose(boolean forceFollowClose) {
    		this.forceFollowClose = forceFollowClose;
    	}
    
    	public void setForceMultiAttacked(boolean forceMultiAttacked) {
    		this.forceMultiAttacked = forceMultiAttacked;
    	}
    
    	public void setForceTargetDistance(int forceTargetDistance) {
    		this.forceTargetDistance = forceTargetDistance;
    	}
    
    	public void setForceWalk(WorldTile tile) {
    		resetWalkSteps();
    		forceWalk = tile;
    	}
    
    	/**
    	 * Sets the locked.
    	 * 
    	 * @Param locked
    	 *            The locked to set.
    	 */
    	public void setLocked(boolean locked) {
    		this.locked = locked;
    	}
    
    	public void setLureDelay(int lureDelay) {
    		this.lureDelay = lureDelay;
    	}
    
    	// test
    	// end
    
    	public void setName(String string) {
    		this.name = getDefinitions().name.equals(string) ? null : string;
    		changedName = true;
    	}
    
    	public boolean hasChangedName() {
    		return changedName;
    	}
    
    	public void setNoDistanceCheck(boolean noDistanceCheck) {
    		this.noDistanceCheck = noDistanceCheck;
    	}
    
    	public void setNPC(int id) {
    		this.id = id;
    		setBonuses();
    	}
    
    	public void setRandomWalk(int forceRandomWalk) {
    		this.walkType = forceRandomWalk;
    	}
    
    	public void setRespawnTask() {
    		if (bossInstance != null && (bossInstance.isFinished()
    				|| (!bossInstance.isPublic() && !bossInstance.getSettings().hasTimeRemaining())))
    			return;
    		if (!hasFinished()) {
    			reset();
    			setLocation(respawnTile);
    			finish();
    		}
    		long respawnDelay = getCombatDefinitions().getRespawnDelay() * 600;
    		if (getId() == 6898)
    			respawnDelay = 600;
    		if (getName().toLowerCase().contains("impling"))
    			respawnDelay *= 3;
    		if (bossInstance != null)
    			respawnDelay /= bossInstance.getSettings().getSpawnSpeed();
    		if (Settings.DEBUG)
    			System.out.println("Respawn task initiated: [" + getName() + "]; time: [" + respawnDelay + "].");
    		CoresManager.slowExecutor.schedule(new Runnable() {
    			@Override
    			public void run() {
    				try {
    					spawn();
    				} catch (Throwable e) {
    					Logger.handle(e);
    				}
    			}
    		}, respawnDelay, TimeUnit.MILLISECONDS);
    	}
    
    	public void setSpawned(boolean spawned) {
    		this.spawned = spawned;
    	}
    
    	public void setTarget(Entity entity) {
    		if (isForceWalking()) // if force walk not gonna get target
    			return;
    		if ((this instanceof GeneralGraardor) || (this instanceof KrilTsutsaroth) || (this instanceof CommanderZilyana)
    				|| (this instanceof KreeArra) || (this instanceof com.rs.game.npc.vorago.Vorago)
    				|| (this instanceof CorporealBeast) || (this instanceof Nex) || (this instanceof TormentedDemon)) {
    			if (entity instanceof Familiar) {
    				if (((Familiar) entity).getOwner() != null) {
    					combat.setTarget(((Familiar) entity).getOwner());
    					lastAttackedByTarget = Utils.currentTimeMillis();
    					return;
    				}
    			}
    		}
    		combat.setTarget(entity);
    		lastAttackedByTarget = Utils.currentTimeMillis();
    	}
    
    	public void spawn() {
    		setFinished(false);
    		World.addNPC(this);
    		setLastRegionId(0);
    		World.updateEntityRegion(this);
    		loadMapRegions();
    		checkMultiArea();
    	}
    
    	@Override
    	public String toString() {
    		return getDefinitions().name + " - " + id + " - " + getX() + " " + getY() + " " + getPlane();
    	}
    
    	public void transformIntoNPC(int id) {
    		setNPC(id);
    		nextTransformation = new Transformation(id);
    	}
    
    	public int whatDefender() {
    		int id = 8844;
    		if (containsItem(8850) || containsItem(20072)) {
    			id = 20072;
    		} else if (containsItem(8849) || containsItem(8850)) {
    			id = 8850;
    		} else if (containsItem(8848)) {
    			id = 8849;
    		} else if (containsItem(8847)) {
    			id = 8848;
    		} else if (containsItem(8846)) {
    			id = 8847;
    		} else if (containsItem(8845)) {
    			id = 8846;
    		} else if (containsItem(8844)) {
    			id = 8845;
    		} else {
    			id = 8844;
    		}
    		return id;
    	}
    
    	public boolean withinDistance(Player tile, int distance) {
    		return super.withinDistance(tile, distance);
    	}
    
    	private boolean intelligentRouteFinder;
    
    	public boolean isIntelligentRouteFinder() {
    		return intelligentRouteFinder;
    	}
    
    	public void setIntelligentRouteFinder(boolean intelligentRouteFinder) {
    		this.intelligentRouteFinder = intelligentRouteFinder;
    	}
    
    	private transient BossInstance bossInstance; // if its a instance npc
    
    	public void setBossInstance(BossInstance instance) {
    		bossInstance = instance;
    	}
    
    	public BossInstance getBossInstance() {
    		return bossInstance;
    	}
    
    	/**
    	 * Head Icons.
    	 */
    	public HeadIcon[] getIcons() {
    		return new HeadIcon[0];
    	}
    
    	public void requestIconRefresh() {
    		refreshHeadIcon = true;
    	}
    
    	public boolean isRefreshHeadIcon() {
    		return refreshHeadIcon;
    	}
    
    	private String[] gnomeTrainerForceTalk = { "That's it, straight up!", "Come on scaredy cat get across that rope!",
    			"My granny can move faster than you!", "Move it, move it, move it!" };
    
    	private String[] trialAnnouncerForceTalk = { "Welcome to the world of " + Settings.SERVER_NAME + "!",
    			"Fear Botany Bay, citizens!", "Fear the wild...", "Hmm... Who will it be today?",
    			"Beware! You may be next.", "Who will be the next victim?", "The wild is a ruthless place!",
    			"Muhahaha.. who's next?", "The wild has NO remorse!", "I can smell the blood from here... Ooh.",
    			"Another death; another blood stain!" };
    
    	private int[] PVP_ITEMS = { 13887, 13893, 13899, 13905, 13911, 13917, 13923, 13929, 13884, 13890, 13896, 13902,
    			13908, 13914, 13920, 13926, 13870, 13873, 13876, 13879, 13882, 13944, 13947, 13950, 13858, 13861, 13864,
    			13867, 13938, 13941, 13944, 13947, 13950, 13953, 13958, 13961, 13964, 13967, 13970, 13973, 13976, 13979,
    			13982, 13985, 13988, 14876, 14877, 14878, 14879, 14880, 14881, 14882, 14883, 14884, 14885, 14886, 14887,
    			14888, 14889, 14890, 14891, 14892, 13845, 13846, 13847, 13848, 13849, 13850, 13851, 13852, 13853, 13854,
    			13855, 13856, 13857 };
    
    	/**
    	 * Exclusively used for the Impetuous Impulses minigame.
    	 */
    	public void setRespawnTaskImpling() {
    		if (!hasFinished()) {
    			reset();
    			setLocation(respawnTile);
    			finish();
    			if (Settings.DEBUG)
    				System.out.println("Finishing NPC: [" + toString() + "].");
    		}
    		/*
    		 * id = FlyingEntities.values()[Utils.random(FlyingEntities.values().length)]
    		 * .getNpcId(); setLocation(new WorldTile(Utils.random(2558 + 3, 2626 - 3),
    		 * Utils.random(4285 + 3, 4354 - 3), 0)); long respawnDelay =
    		 * getCombatDefinitions().getRespawnDelay() * 600;
    		 */
    		if (id == 7420) {
    			setLocation(new WorldTile(respawnTile));
    		} else
    			setLocation(new WorldTile(Utils.random(2558 + 3, 2626 - 3), Utils.random(4285 + 3, 4354 - 3), 0));
    		long respawnDelay = 1000 * 30;
    		if (Settings.DEBUG)
    			System.out.println("Respawn task initiated: [" + toString() + "]; time: [" + respawnDelay + "].");
    		CoresManager.slowExecutor.schedule(new Runnable() {
    			@Override
    			public void run() {
    				try {
    					spawn();
    				} catch (Throwable e) {
    					Logger.handle(e);
    				}
    			}
    		}, respawnDelay, TimeUnit.MILLISECONDS);
    	}
    
    	private transient boolean cantSetTargetAutoRelatio;
    
    	public boolean isCantSetTargetAutoRelatio() {
    		return cantSetTargetAutoRelatio;
    	}
    
    	public void setCantSetTargetAutoRelatio(boolean cantSetTargetAutoRelatio) {
    		this.cantSetTargetAutoRelatio = cantSetTargetAutoRelatio;
    	}
    
    	public int getAttackSpeed() {
    		return getCombatDefinitions().getAttackDelay();
    	}
    
    	public void setRespawnTile(WorldTile respawnTile) {
    		this.respawnTile = respawnTile;
    	}
    
    	public int getAttackStyle() {
    		return getCombatDefinitions().getAttackStyle();
    	}
    
    	@Override
    	public boolean canMove(int dir) {
    		return true;
    	}
    
    	private boolean cannotMove;
    
    	public boolean isCannotMove() {
    		return cannotMove;
    	}
    
    	public void setCannotMove(boolean canMove) {
    		this.cannotMove = canMove;
    	}
    
    	public void setMaxDistance(int maxDistance) {
    		this.maxDistance = maxDistance;
    	}
    
    	public void setRangedBonuses(int level) {
    		bonuses[4] = level;
    	}
    
    	public int getBonus(int index) {
    		return bonuses[index];
    	}
    
    	private int maxDistance;
    
    	public int getMaxDistance() {
    		return maxDistance;
    	}
    
    	private transient long lock;
    
    	public void lock(long time) {
    		lock = Utils.currentTimeMillis() + time;
    	}
    
    	/**
    	 * Gets the locked.
    	 *
    	 * @Return The locked.
    	 */
    	public boolean isLock() {
    		return lock > Utils.currentTimeMillis();
    	}
    
    	/**
    	 * Sets the locked.
    	 *
    	 * @Param locked
    	 *            The locked to set.
    	 */
    	public void setLock(boolean lock) {
    		this.lock = lock ? Integer.MAX_VALUE : 0;
    	}
    
    	public void setBonuses(int[] bonuses) {
    		this.bonuses = bonuses;
    	}
    
    	public void setBonus(int index, int level) {
    		bonuses[index] = level;
    	}
    
    }
    Reply With Quote  
     

  10. #10  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,647
    Thanks given
    175
    Thanks received
    257
    Rep Power
    358
    Quote Originally Posted by lord kurt6 View Post


    I need to see the whole file that contains this:

    Code:
    		case "chaos dwogre":
    			if (add)
    				killStats[38] += 1;
    			setPVMPoints(getPVMPoints() + 1);
    			return getKillStatistics(38);
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] adding xp when killing a player
    By Toxicx in forum Help
    Replies: 2
    Last Post: 12-07-2013, 11:11 PM
  2. Players total/average combat counting
    By Bubletan in forum Help
    Replies: 0
    Last Post: 08-31-2012, 10:05 PM
  3. adding total level to my 602 skilltab
    By OodlesOfNoodles in forum Help
    Replies: 0
    Last Post: 01-23-2012, 12:12 PM
  4. adding xp to kills and teleports
    By Pirate in forum Help
    Replies: 2
    Last Post: 09-06-2011, 07:30 PM
  5. [PI]Adding exp for killing a player
    By Ed17 in forum Help
    Replies: 4
    Last Post: 07-22-2011, 07:13 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •