Thread: Weird startup error.

Results 1 to 5 of 5
  1. #1 Weird startup error. 
    Zodiac Owner.

    Join Date
    Mar 2013
    Age
    27
    Posts
    387
    Thanks given
    46
    Thanks received
    34
    Rep Power
    37
    I have no clue why it keeps saying this i have no clue what could be wrong with NPC file.

    Attached image

    NPC.java
    Code:
    package com.rs2hd.model;
    
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.*;
    import com.rs2hd.event.Event;
    import com.rs2hd.io.XStreamPlayerLoader;
    import com.rs2hd.GameEngine;
    import com.rs2hd.content.Combat.CombatType;
    import com.rs2hd.content.clans.Clan;
    import com.rs2hd.content.minigames.dungman;
    import com.rs2hd.content.minigames.clanminis.WKInvasion;
    import com.rs2hd.content.DeathEvent;
    import com.rs2hd.model.Hits.Hit;
    import com.rs2hd.util.Misc;
    
    /**
     * Represents a 'non-player' character in the game.
     * @author Graham
     *
     */
    public class NPC extends Entity {
    	public static int dragD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 1215, 5321, 5322, 5328, 5329, 5333};
    	public static int dragD() {
    		return dragD[(int) (Math.random() * dragD.length)];
    	}
    	public static int runeD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 8850};
    	public static int runeD() {
    		return runeD[(int) (Math.random() * runeD.length)];
    	}
    	public static int addyD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 8849};
    	public static int addyD() {
    		return addyD[(int) (Math.random() * addyD.length)];
    	}
    	public static int mithD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 8848};
    	public static int mithD() {
    		return mithD[(int) (Math.random() * mithD.length)];
    	}
    	public static int blackD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 8847};
    	public static int blackD() {
    		return blackD[(int) (Math.random() * blackD.length)];
    	}
    	public static int steelD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 8846};
    	public static int steelD() {
    		return steelD[(int) (Math.random() * steelD.length)];
    	}
    	public static int ironD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 8845};
    	public static int ironD() {
    		return ironD[(int) (Math.random() * ironD.length)];
    	}
    	public static int bronD[] = {7562, 5320, 5323, 5291, 5292, 5295, 5299, 5293, 995, 8844};
    	public static int bronD() {
    		return bronD[(int) (Math.random() * bronD.length)];
    	}
    	public static int Frosts[] = {16701, 16657, 16679, 16899, 16945, 16945, 17029, 17103, 17249, 17351, 15332, 7158, 4587, 13970, 13988, 13958};
    	public static int Frosts() {
    		return Frosts[(int) (Math.random() * Frosts.length)];
    	}
    
    	public int giveDrop = 0;
    	public int NPCForceChat = 0;
    	private transient boolean IsFamiliar = false;
    	public transient int AttackStyle = 0;
    	public transient int NPCCharges = 0;
    	public transient boolean UsingThis = false;
    	public transient int NPCDamage[] = new int[14];
    	public transient boolean npccanloot=false;
    	public transient Player partner;
    	public transient int npcOpp;
    	private transient NpcWalk NpcWalk;
    	public Item dropId(int id, int amt) {
    		return new Item(id, amt);
    	}
    	public void resetNpcDef() {
    		AttackStyle = 0;
    		NPCCharges = 0;
    		UsingThis = false;
    		NPCDamage = new int[14];
    		if (this.getId() == 8324) {
    			NPCCharges = 20;
    		}
    	}
    	public void npcDiedBones(Player p, int npcID) {	
    		switch(npcID) {
    		case 115:
    			World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(532, 1));
    			giveDrop = 0;
    			break;
    		case 2025:
    			p.ahrim2 = 0;
    			break;
    case 116:
        if (p.getInventory().contains(8844)){
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(ironD(), 1));
            p.getInventory().deleteItem(8851, 2);
            p.sm("The cyclops are currently dropping IRON deffenders!"); 
            giveDrop = 0;        
        } else if (p.getInventory().contains(8845)){
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(steelD(), 1));
            p.getInventory().deleteItem(8851, 2);
            p.sm("The cyclops are currently dropping STEEL deffenders!"); 
            giveDrop = 0;
        } else if (p.getInventory().contains(8846)){
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(blackD(), 1));
            p.getInventory().deleteItem(8851, 2);
            p.sm("The cyclops are currently dropping BLACK deffenders!"); 
            giveDrop = 0;
        } else if (p.getInventory().contains(8847)){
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(mithD(), 1));
            p.getInventory().deleteItem(8851, 2);
            p.sm("The cyclops are currently dropping MITHRIL deffenders!"); 
            giveDrop = 0;
        } else if (p.getInventory().contains(8848)){
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(addyD(), 1));
            p.getInventory().deleteItem(8851, 2);
            p.sm("The cyclops are currently dropping ADDY deffenders!"); 
            giveDrop = 0;
        } else if (p.getInventory().contains(8849)){
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(runeD(), 1));
            p.getInventory().deleteItem(8851, 3);
            p.sm("The cyclops are currently dropping RUNE deffenders!"); 
            giveDrop = 0;
        } else if (p.getInventory().contains(8850)){
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(dragD(), 1));
            p.getInventory().deleteItem(8851, 4);
            p.sm("The cyclops are currently dropping DRAGON deffenders!"); 
            giveDrop = 0;
        } else {
            World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(bronD(), 1));
            p.getInventory().deleteItem(8851, 2);
            p.sm("The cyclops are currently dropping BRONZE deffenders!"); 
            giveDrop = 0;
        }
    break;
    case 4284:
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1079, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1163, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1127, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 40));
        p.guild = 0;
        p.sm("You killed the animated armour good job!");
        giveDrop = 0;
    break;
    case 4283:
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1073, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1123, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1061, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 30));
        p.guild = 0;
        p.sm("You killed the animated armour good job!");
        giveDrop = 0;
    break;
    case 4282:
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1071, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1121, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1059, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 25));
        p.guild = 0;
        p.sm("You killed the animated armour good job!");
        giveDrop = 0;
    break;
    case 4281:
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1077, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1125, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1065, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 20));
        p.guild = 0;
        p.sm("You killed the animated armour good job!");
        giveDrop = 0;
    break;
    case 4280:
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1157, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1119, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1069, 1));
        World.getInstance().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 15));
        p.guild = 0;
        p.sm("You killed the animated armour good job!");
        giveDrop = 0;
    break;
    		case 2027:
    			p.guthan2 = 0;
    			break;
    		case 2026:
    			p.dh2 = 0;
    			break;
    		case 2030:
    			p.verac2 = 0;
    			break;
    		case 2028:
    			p.karil2 = 0;
    			break;
                    case 2029:
    			p.torag2 = 0;
    			break;
                    case 10775:
    			World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(Frosts(), 1));
    			World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(536, 1));
    			break;
    		case 50:
    		case 941:
    			if(getId() == 941) {
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1753, 1));
    				giveDrop = 0;
    			}else{
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1747, 1));
    				giveDrop = 0;
    			}
    			World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(536, 1));
    			giveDrop = 0;
    			break;
    		default:
    			World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(526, 1));
    			giveDrop = 0;
    			break;
    		}
    	}
    
    	public static Random rand = new Random();
    
    	public void npcDied(Player p, int npcID) {
    		switch(npcID) {
    		case 757:
    			if(p.halloweenStage == 4) {
    				p.halloweenStage = 5;
    				p.sm("You beat the count and received a green h'ween!");
    				if(!p.getInventory().addItem(13538, 1)) {
    					p.sm("That item has been banked!");
    					p.getBank().getContainer().add(new Item(13538, 1));
    				}
    				return;
    			} else {
    				if(p.halloweenStage != 7) {
    					return;
    				}
    			}
    			break;
    		}
    		try {
    			BufferedReader in = new BufferedReader(new FileReader("data/npcdrops.cfg"));
    			String input;
    			String[] splitEQL;
    			String[] splitCOM;
    			String[] splitDSH;
    			String[] splitCLN;
    			String[] splitSCL;
    			while ((input = in.readLine()) != null) {
    				splitEQL = null; splitEQL = null; splitDSH = null; splitCLN = null; splitSCL = null;
    				if (!input.startsWith("/") && input.contains("=") && input.contains(",") && input.contains("-") && input.contains(":")) {
    					try {
    						splitEQL = input.split("=");
    						if (Integer.parseInt(splitEQL[0]) == npcID) {
    							splitSCL = splitEQL[1].split(";");
    							for (int i = 0; i < splitSCL.length; i++) {
    								splitCOM = splitSCL[i].split(",");
    								splitDSH = splitCOM[1].split("-");
    								splitCLN = splitCOM[2].split(":");
    								int item = Integer.parseInt(splitCOM[0]);
    								int min = Integer.parseInt(splitDSH[0]);
    								int max = Integer.parseInt(splitDSH[1]);
    								int chance = Integer.parseInt(splitCLN[0]);
    								int outOf = Integer.parseInt(splitCLN[1]);
    								int amount = rand.nextInt((max - min)+1) + min; 
    								int ifDrop = rand.nextInt(outOf)+1;
    								boolean wealthInc = false;
    								Clan clan = World.getWorld().getClanManager().getClans(p.getSettings().getClanOwner());
    								if(p.getEquipment().get(Equipment.SLOT_RING) != null) {
    									if (p.getEquipment().get(Equipment.SLOT_RING).getId() == 2572) {
    										int wealth = Misc.random(100);
    										if(wealth <= 60) {
    											wealthInc = true;
    										}
    									}
    								}
    								if(clan != null && clan.isLootsharing()) {
    									wealthInc = false;
    								}
    								if(wealthInc) {
    									ifDrop -= 3;
    								}
    								if (ifDrop <= chance) {
    									World.getWorld().getItemManager().createDropGroundItem(getLooter(p, item, amount, clan, getLocation()), this.getLocation(), dropId(item, amount));
    									npccanloot = false;
    									giveDrop = 0;
    								}
    							}
    						}
    					} catch (Exception e) {		
    						if(e instanceof NullPointerException) {
    							for(StackTraceElement stack : e.getStackTrace()) {
    								XStreamPlayerLoader.punish.writeTo(stack.toString(), "data/text/errors");
    							}
    							XStreamPlayerLoader.punish.writeTo("", "data/text/errors");
    							XStreamPlayerLoader.punish.writeTo("", "data/text/errors");
    						}
    						//System.out.println("Exception dropping item:\n"+e);
    					}
    				}
    			}
    			in.close();
    		} catch (IOException e) {
    			System.out.println(e);
    		}
    	}
    
    	public Player getLooter(Player player, int id, int amount, Clan clan, Location location) {
    		Player done = player;
    		if(clan != null) {
    			if(clan.isLootsharing()) {
    				List<Player> playersGetLoot = new LinkedList<Player>();
    				int best = 0;
    				for(Player pl : clan.getMembers()) {
    					if(location.withinDistance(pl.getLocation(), 16)) {
    						if(!killerHits.containsKey(pl.getUsername())) {
    							continue;
    						}
    						int damage = killerHits.get(pl.getUsername()) + pl.getSettings().getChances();
    						if(damage > best) {
    							playersGetLoot.add(pl);
    							best = damage;
    						} else {
    							if(Misc.random(2) == 1) {
    								playersGetLoot.add(pl);
    							}
    						}
    						pl.getSettings().incChances();
    						if(pl.getSettings().getChances() < 0) {
    							pl.getSettings().setChances(0);
    						}
    					}
    				}
    				for(Player pl : playersGetLoot) {
    					if(Misc.random(2) == 1) {
    						done = pl;
    						for(int i = 0; i < 5; i++) {
    							pl.getSettings().decChances();
    						}
    						break;
    					}
    				}
    			}
    		}
    		if(clan != null && clan.isLootsharing()) {
    			done.getActionSender().sendMessage("<col=009900>You received: " + amount + " " + ItemDefinition.forId(id).getName());
    			for(final Player pl : clan.getMembers()) {
    				if(pl.getIndex() == done.getIndex()) {
    					continue;
    				}
    				if(location.withinDistance(pl.getLocation(), 16)) {
    					pl.getActionSender().sendMessage(done.getUsername() + " received: " + amount + " " + ItemDefinition.forId(id).getName());
    					World.getWorld().registerEvent(new Event(3000) {
    						public void execute() {
    							pl.getActionSender().sendMessage("Your chance of receiving loot has improved.");
    							this.stop();
    						}
    					});
    				}
    			}
    		}
    		return done;
    	}
    
    	public static enum WalkType {
    		STATIC,
    		RANGE,
    	}
    	//public int pfollow = 0;	
    	public int pid = 0;
    	public boolean Attacking = false;
    	public int combatDelay = 0;
    	private int id;
    	private transient boolean followIsDelayed;
    	private transient NPCDefinition definition;
    	private transient NPCUpdateFlags updateFlags;
    	private transient ForceText forceText;
    	public transient int sprite;
    	private transient int hp;
    	private transient Queue<Hit> queuedHits;
    	private WalkType walkType;
    	private transient Location originalLocation;
    	private Location minimumCoords = Location.location(0, 0, 0);
    	private Location maximumCoords = Location.location(0, 0, 0);
    	public transient int pfollow = -1;
    
    	public void setFollowDelayed(boolean b) {
    		try {
    			this.followIsDelayed = b;
    		} catch(Exception e) {
    		}
    	}
    	public boolean isFollowDelayed() {
    		return followIsDelayed;
    	}
    	public NPC(int id) {
    		this.id = id;
    		this.definition = NPCDefinition.forId(id);
    		this.setWalkType(WalkType.STATIC);
    	}
    	public boolean FullEliteBlackEquipped(Player p) {
    		try {
    			if(p.getEquipment().get(0).getDefinition().getId() == 14494 && p.getEquipment().get(4).getDefinition().getId() == 14492 && p.getEquipment().get(7).getDefinition().getId() == 14490)
    			{
    				return true;
    			}
    			return false;	
    		} catch (Exception e) {
    			return false;
    		}
    	}
    	public void Agressive() {
    		if (this.isDead() || this.isDestroyed()) {
    			return;
    		}
    		for(int i : WKInvasion.KNIGHTS) {
    			if(id == i) {
    				for(Player pl : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    					if(Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), pl.getLocation().getX(), pl.getLocation().getY()) <= 8) {
    						this.pid = pl.getIndex();
    						this.Attacking = true;
    					}
    				}
    				break;
    			}
    		}
    		switch (this.getId()) {
    		case 6815: //melee
    		case 6816: //range
    
    			break;
    		case 50:
    			for(Player ppp : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if(Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), ppp.getLocation().getX(), ppp.getLocation().getY()) <= 8) {
    					this.pid = ppp.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 8325: //melee
    		case 8326: //range
    		case 8327: //magic
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (p.IsAtBlackCastle() && !FullEliteBlackEquipped(p)) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			if (!this.Attacking)
    				this.setId(8324);
    			break;
    		case 6222: //melee
    		case 6223: //range
    		case 6225: //magic
    		case 6227:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 4) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 6260: //melee
    		case 6261: //range
    		case 6263: //magic
    		case 6265:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 4) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 6247: //melee
    		case 6248: //range
    		case 6250: //magic
    		case 6252:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 4) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 2881: //melee
    		case 2882: //range
    		case 2883: //magic
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 22) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 3200: //all
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 4) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 8130: 
    		case 7136:
    		case 1915:
    		case 1472:
    		case 8501:
    		case 1974:
    		case 1975:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 4) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 7133:
    		case 7135:
    		case 7134:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 12) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    
    
    		case 3706:
    		case 1290:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 26) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 9161:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 8) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 7084:
    		case 7085:
    		case 7086:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 40) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 2745: //all
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 4) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 6203: //melee
    		case 6208: //range
    		case 6206: //magic
    		case 6204:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) <= 4) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 8350:
    		case 8351:
    		case 8352:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {	
    				this.pid = p.getIndex();
    				this.Attacking = true;				
    			}
    			break;
    		case 8454:
    			if (UsingThis == true) {
    				return;
    			}
    			for(Player ballenergy : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if(Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), ballenergy.getLocation().getX(), ballenergy.getLocation().getY()) <= 1) {
    					ballenergy.NpcDialogue().StartTalkingTo(this);
    					return;
    
    				}
    			}
    			break;
    		case 8127:
    		case 8133:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if (p.IsAtCorporeal()) {
    					this.pid = p.getIndex();
    					this.Attacking = true;
    				}
    			}
    			break;
    		case 1158:
    		case 1160:
    			for(Player p : World.getWorld().getRegionManager().getLocalPlayers(getLocation())) {
    				if(Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) < 30) {
    					this.pid = p.getIndex();
    					this.Attacking = true;		
    				}
    			}
    			break;
    		}
    	}
    	public void FollowNoAgressive(Player p) {
    		if (this.isDead()||this.isDestroyed()) {
    			return;
    		}
    		switch (this.getId()) {
    		case 8324:
    		case 8325: //melee
    		case 8326: //range
    		case 8327: //magic
    			if (p.IsAtBlackCastle() && !FullEliteBlackEquipped(p)) {
    				this.getNpcWalk().followPlayer(p,1);
    			}else{
    				this.resetAttack();	
    			}
    			break;
    		case 8127: //follow lol no walk
    			this.resetAttack();
    			break;
    		case 8133:
    			if (p.IsAtCorporeal())
    				this.getNpcWalk().followPlayer(p,1);
    			else
    				this.resetAttack();
    			break;
    		case 8350:
    		case 8351:
    			// portals
    		case 6142:
    			GameEngine.pcPurple = 1;
    			p.getActionSender().sendString("DEAD", 408, 13);
    			GameEngine.pcGamebeat += 1;
    			break;			
    		case 6144:
    			GameEngine.pcGamebeat += 1;
    			p.getActionSender().sendString("DEAD", 408, 15);
    			GameEngine.pcYellow = 1;
    			break;			
    		case 6145:
    			GameEngine.pcGamebeat += 1;
    			p.getActionSender().sendString("DEAD", 408, 16);
    			GameEngine.pcRed = 1;				
    			break;			
    		case 6143:		
    			GameEngine.pcGamebeat += 1;
    			p.getActionSender().sendString("DEAD", 408, 14);
    			GameEngine.pcBlue = 1;
    			break;	
    		case 8352:
    			if (p.IsAtTormented()) {
    				this.getNpcWalk().followPlayer(p,1);			
    			} else {
    				this.resetAttack();	
    				break;
    			}
    		case 6815:
    		case 6816:
    			this.getNpcWalk().followPlayer(p,1);
    			break;
    		default:
    			if(Misc.getDistance(this.getLocation().getX(), this.getLocation().getY(), p.getLocation().getX(), p.getLocation().getY()) < 16)
    				this.getNpcWalk().followPlayer(p,1);	
    			else
    				this.resetAttack();
    			break;
    		}
    	}
    	public void followPlayer(Entity p, int Size) {
    		if (isIsFamiliar()) {
    			if(this.getLocation().getDistance(p.getLocation()) == 3) {
    				this.setFollowDelayed(false);
    				return;
    			}
    			if(!this.isFollowDelayed()) {
    				this.setFollowDelayed(true);
    				return;
    			}
    		}
    		sprite = -1;
    		int moveX = 0, moveY = 0;
    		int pX = p.getLocation().getX();
    		int pY = p.getLocation().getY();
    		int nabsX = this.getLocation().getX();
    		int nabsY = this.getLocation().getY();
    
    		if(pY < nabsY && pX == nabsX) {
    			moveX = 0;
    			moveY = NpcWalk.getMove(nabsY, pY + 1);
    		}
    		else if(pY > nabsY && pX == nabsX) {
    			moveX = 0;
    			moveY = NpcWalk.getMove(nabsY, pY - 1);
    		}
    		else if(pX < nabsX && pY == nabsY) {
    			moveX = NpcWalk.getMove(nabsX, pX + 1);
    			moveY = 0;
    		}
    		else if(pX > nabsX && pY == nabsY) {
    			moveX = NpcWalk.getMove(nabsX, pX - 1);
    			moveY = 0;
    		}
    		else if(pX < nabsX && pY < nabsY) {
    			moveX = NpcWalk.getMove(nabsX, pX + 1);
    			moveY = NpcWalk.getMove(nabsY, pY + 1);
    		}
    		else if(pX > nabsX && pY > nabsY) {
    			moveX = NpcWalk.getMove(nabsX, pX - 1);
    			moveY = NpcWalk.getMove(nabsY, pY - 1);
    		}
    		else if(pX < nabsX && pY > nabsY) {
    			moveX = NpcWalk.getMove(nabsX, pX + 1);
    			moveY = NpcWalk.getMove(nabsY, pY - 1);
    		}
    		else if(pX > nabsX && pY < nabsY) {
    			moveX = NpcWalk.getMove(nabsX, pX - 1);
    			moveY = NpcWalk.getMove(nabsY, pY + 1);
    		}
    		int tgtX = this.getLocation().getX() + moveX;
    		int tgtY = this.getLocation().getY() + moveY;
    		sprite = Misc.direction(this.getLocation().getX(), this.getLocation().getY(), tgtX, tgtY);
    		if(sprite != -1) {
    			sprite >>= 1;
    		this.setLocation(Location.location(tgtX, tgtY, this.getLocation().getZ()));
    		}	
    	}
    
    	public void giveSlayer(Player winner) {
    		if (isDead()) {
    			final Player p = winner;	
    			this.npccanloot = true;
    			npcDied(p, id);
    			npcDiedBones(p, id);
    			switch (getId()) {
    						case 10797:
    				if (p.Dungquest == 3) {
    				p.FIRST = true;
    				p.dungStage = 2;
    				}
    				break;
    			case 10791:
    				if (p.Dungquest == 3) {
    				p.SECOND = true;
    				p.dungStage = 3;
    				}
    				break;
    			case 10776:
    				if (p.Dungquest == 3) {
    				p.THIRD = true;
    				p.dungStage = 4;
    				}
    				break;
    			case 10771:
    				if (p.Dungquest == 3) {
    				p.FOURTH = true;
    				p.dungStage = 5;
    				}
    				break;
    			case 10757:
    				if (p.Dungquest == 3) {
    				p.FITH = true;
    				p.dungStage = 6;
    				}
    				break;
    			case 10820:
    				if (p.Dungquest == 3) {
    				p.SIX = true;
    				p.dungStage = 7;
    				}
    				break;
    			case 10224:
    				if (p.Dungquest == 3) {
    				p.SEVENTH = true;
    				p.dungStage = 8;
    				}
    				break;
    			case 10141:
    				if (p.Dungquest == 4) {
    				p.BOSS = true;
    				dungman.COMPLETE = true;
    				}
    				break;
    			case 2030:
    				p.verac = 1;
    				p.sm("You have defeated Verac");
    				break;
    			case 2026:
    				p.dh = 1;
    				p.sm("You have defeated Dharok");
    				break;
    			case 2027:
    				p.guthan = 1;
    				p.sm("You have defeated Guthan");
    				break;
    			case 2025:
    				p.ahrim = 1;
    				p.sm("You have defeated Ahrim");
    				break;
    			case 2028:
    				p.karil = 1;
    				p.sm("You have defeated Karil");
    				break;
    			case 2029:
    				p.torag = 1;
    				p.sm("You have defeated Torag");
    				break;
    			case 6142:
    				GameEngine.pcPurple = 1;
    				p.getActionSender().sendString("DEAD", 408, 13);
    				GameEngine.pcGamebeat += 1;
    				break;			
    			case 6144:
    				GameEngine.pcGamebeat += 1;
    				p.getActionSender().sendString("DEAD", 408, 15);
    				GameEngine.pcYellow = 1;
    				break;			
    			case 6145:
    				GameEngine.pcGamebeat += 1;
    				p.getActionSender().sendString("DEAD", 408, 16);
    				GameEngine.pcRed = 1;				
    				break;			
    			case 6143:		
    				GameEngine.pcGamebeat += 1;
    				p.getActionSender().sendString("DEAD", 408, 14);
    				GameEngine.pcBlue = 1;
    				break;
    
    			case 4971:
    				p.killcount ++;
    				break;
    			case 4972:
    				p.killcount ++;
    				break;
    			case 6999:
    				p.killcount ++;
    				break;
    				//slayer
    			case 1648:
    			case 1612:
    			case 1643:
    			case 1604:
    			case 1610:
    			case 1613:
    			case 1615:
    			case 6215:
    			case 2783:
    			case 1637:
    				p.getSlayer().decreaseSlayerAmount(this.getId());
    				break;
    				//end slayer
    			case 116:
    				if (p.getInventory().contains(8844)){
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(ironD(), 1));
    					p.getInventory().deleteItem(8851, 2);
    					p.sm("The cyclops are currently dropping IRON deffeners!"); 
    					giveDrop = 0;        
    				} else if (p.getInventory().contains(8845)){
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(steelD(), 1));
    					p.getInventory().deleteItem(8851, 2);
    					p.sm("The cyclops are currently dropping STEEL deffeners!"); 
    					giveDrop = 0;
    				} else if (p.getInventory().contains(8846)){
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(blackD(), 1));
    					p.getInventory().deleteItem(8851, 2);
    					p.sm("The cyclops are currently dropping BLACK deffeners!"); 
    					giveDrop = 0;
    				} else if (p.getInventory().contains(8847)){
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(mithD(), 1));
    					p.getInventory().deleteItem(8851, 2);
    					p.sm("The cyclops are currently dropping MITHRIL deffeners!"); 
    					giveDrop = 0;
    				} else if (p.getInventory().contains(8848)){
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(addyD(), 1));
    					p.getInventory().deleteItem(8851, 2);
    					p.sm("The cyclops are currently dropping ADDY deffeners!"); 
    					giveDrop = 0;
    				} else if (p.getInventory().contains(8849)){
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(runeD(), 1));
    					p.getInventory().deleteItem(8851, 3);
    					p.sm("The cyclops are currently dropping RUNE deffeners!"); 
    					giveDrop = 0;
    				} else if (p.getInventory().contains(8850)){
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(dragD(), 1));
    					p.getInventory().deleteItem(8851, 4);
    					p.sm("The cyclops are currently dropping DRAGON deffeners!"); 
    					giveDrop = 0;
    				} else {
    					World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(bronD(), 1));
    					p.getInventory().deleteItem(8851, 2);
    					p.sm("The cyclops are currently dropping BRONZE deffeners!"); 
    					giveDrop = 0;
    				}
    				break;
    			case 4284:
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1079, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1163, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1127, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 40));
    				p.guild = 0;
    				p.sm("You killed the animated armour good job!");
    				giveDrop = 0;
    				break;
    			case 4283:
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1073, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1123, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1061, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 30));
    				p.guild = 0;
    				p.sm("You killed the animated armour good job!");
    				giveDrop = 0;
    				break;
    			case 4282:
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1071, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1121, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1059, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 25));
    				p.guild = 0;
    				p.sm("You killed the animated armour good job!");
    				giveDrop = 0;
    				break;
    			case 4281:
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1077, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1125, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1065, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 20));
    				p.guild = 0;
    				p.sm("You killed the animated armour good job!");
    				giveDrop = 0;
    				break;
    			case 4280:
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1157, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1119, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(1069, 1));
    				World.getWorld().getItemManager().createDropGroundItem(p, this.getLocation(), dropId(8851, 15));
    				p.guild = 0;
    				p.sm("You killed the animated armour good job!");
    				giveDrop = 0;
    				break;
    			case 6204:
    			case 6208:
    			case 6219:
    			case 1619:
    			case 49:
    			case 6203:
    			case 6210:
    			case 6212:
    			case 6218:
    				World.getWorld().registerEvent(new Event(200) {
    					public void execute() {
    						p.godWarsKills[3]++;
    						p.getActionSender().sendString(""+p.godWarsKills[3]+"", 601, 9);
    						this.stop();
    					}
    				});
    				break;
    			default:
    			}
    		}
    	}
    	public  void tick() {	
    		if (combatDelay > 0) {
    			combatDelay--;
    		}
    		if (NPCForceChat == 0) {
    			NPCForceChat = 60;
    		}
    		if (NPCForceChat > 1) {
    			NPCForceChat--;
    		}	
    		if (getId() == 4946 && NPCForceChat == 2 && GameEngine.PitsWinner2 == true) {
    			forceChat("Welcome to the Oldscape shopzone! "+GameEngine.PitsWinner+"");
    			NPCForceChat = 60;
    		}
    		if (getId() == 4946 && NPCForceChat == 2 && GameEngine.PitsWinner2 == false) {
    			forceChat("Welcome to the Oldscape shopzone!");
    			NPCForceChat = 60;
    		}
    		sprite = -1;
    		if (!this.isAttacking() && Math.random() > 0.8 && walkType == WalkType.RANGE) {
    			int moveX = (int) (Math.floor((Math.random() * 3)) - 1);
    			int moveY = (int) (Math.floor((Math.random() * 3)) - 1);
    			int tgtX = this.getLocation().getX() + moveX;
    			int tgtY = this.getLocation().getY() + moveY;
    			sprite = Misc.direction(this.getLocation().getX(), this.getLocation().getY(), tgtX, tgtY);
    			if (tgtX > this.maximumCoords.getX() || tgtX < this.minimumCoords.getX() || tgtY > this.maximumCoords.getY() || tgtY < this.minimumCoords.getY()) {
    				sprite = -1;
    			}
    			if (sprite != -1) {
    				sprite >>= 1;
    			setLocation(Location.location(tgtX, tgtY, this.getLocation().getZ()));
    			}
    		}
    		if(partner != null && !Attacking) {
    			for(NPC n : World.getWorld().getRegionManager().getLocalNpcs(getLocation())) {
    				if(n.pid == partner.getIndex()) {
    					npcOpp = n.getIndex();
    					Attacking = true;
    				}
    			}
    		}
    		if(partner != null && Attacking && npcOpp > -1) {
    			NPC n = World.getWorld().getNpcs().get(npcOpp);
    			if(n != null && !n.isDead() && !n.isDestroyed()) {
    				followPlayer(n, 0);
    				if(combatDelay == 0) {
    					animate(451);
    					n.hit(Misc.random(30));
    					n.animate(n.getDefinition().getDefenceAnimation());
    					combatDelay = 5;
    					return;
    				}
    			} else {
    				resetAttack();
    			}
    		}
    		if (Attacking == true) {
    		final Player p = World.getWorld().getPlayers().get(pid);
    			if (p == null) {
    				this.resetAttack();
    				return;
    			}
    			GameEngine.nvp.Attack(p, this);
    		} else {
    			Agressive();
    		}
    	}
    
    	public int getId() {
    		return id;
    	}
    	public void setId(int npcid) {
    		this.npcswitch(npcid);
    		this.id = npcid;
    		this.definition = NPCDefinition.forId(npcid);
    	}
    	public int getSprite() {
    		return sprite;
    	}
    	public NPCDefinition getDefinition() {
    		return definition;
    	}
    
    	public Object readResolve() {
    		super.readResolve();
    		npcOpp = -1;
    		followIsDelayed = false;
    		NpcWalk = new NpcWalk(this);
    		definition = NPCDefinition.forId(id);
    		updateFlags = new NPCUpdateFlags();
    		sprite = -1;
    		hp = definition.getHitpoints();
    		this.queuedHits = new LinkedList<Hit>();
    		this.originalLocation = this.getLocation();
    		forceText = null;
    		return this;
    	}
    	public NpcWalk getNpcWalk() {
    		return NpcWalk;
    	}
    	public void processQueuedHits() {
    		if(!updateFlags.isHit1UpdateRequired()) {
    			if(queuedHits.size() > 0) {
    				Hit h = queuedHits.poll();
    				hit(h.getDamage(), h.getType());
    			}
    		}
    		if(!updateFlags.isHit2UpdateRequired()) {
    			if(queuedHits.size() > 0) {
    				Hit h = queuedHits.poll();
    				hit(h.getDamage(), h.getType());
    			}
    		}
    	}
    
    	public NPCUpdateFlags getUpdateFlags() {
    		return updateFlags;
    	}
    	public void setForceText(ForceText forceText) {
    		this.forceText = forceText;
    		updateFlags.setForceTextUpdateRequired(true);
    	}
    
    	public ForceText getForceText() {
    		return forceText;
    	}
    	public void forceChat(String message) {
    		setForceText(new ForceText(message));
    	}
    	/**
    	 * @param minimumCoords the minimumCoords to set
    	 */
    	public void setMinimumCoords(Location minimumCoords) {
    		this.minimumCoords = minimumCoords;
    	}
    
    	/**
    	 * @return the minimumCoords
    	 */
    	public Location getMinimumCoords() {
    		return minimumCoords;
    	}
    
    	/**
    	 * @param walkType the walkType to set
    	 */
    	public void setWalkType(WalkType walkType) {
    		this.walkType = walkType;
    	}
    
    	/**
    	 * @return the walkType
    	 */
    	public WalkType getWalkType() {
    		return walkType;
    	}
    
    	/**
    	 * @param maximumCoords the maximumCoords to set
    	 */
    	public void setMaximumCoords(Location maximumCoords) {
    		this.maximumCoords = maximumCoords;
    	}
    
    	/**
    	 * @return the maximumCoords
    	 */
    	public Location getMaximumCoords() {
    		return maximumCoords;
    	}
    
    	public void heal(int amount) {
    		this.hp += amount;
    		if(hp >= this.getDefinition().getHitpoints()) {
    			hp = this.getDefinition().getHitpoints();
    		}
    	}
    
    	public void hit(int damage) {
    		if(damage == 0) {
    			hit(damage, Hits.HitType.NO_DAMAGE);
    		} else {
    			hit(damage, Hits.HitType.NORMAL_DAMAGE);
    		}
    	}
    
    	public void hit(int damage, Hits.HitType type) {
    		if(damage > hp) {
    			damage = hp;
    		}
    		if(!updateFlags.isHit1UpdateRequired()) {
    			getHits().setHit1(new Hit(damage, type));
    			updateFlags.setHit1UpdateRequired(true);
    		} else {
    			if(!updateFlags.isHit2UpdateRequired()) {
    				getHits().setHit2(new Hit(damage, type));
    				updateFlags.setHit2UpdateRequired(true);
    			} else {
    				queuedHits.add(new Hit(damage, type));
    			}
    		}
    		hp -= damage;
    		if(hp <= 0) {
    			hp = 0;
    			this.resetAttack();
    			if(!this.isDead()) {
    				World.getWorld().registerEvent(new DeathEvent(this));
    			}
    			this.setDead(true);
    		}
    	}
    
    	@Override
    	public void turnTo(Entity entity) {
    		this.getUpdateFlags().setFaceToUpdateRequired(true, entity.getClientIndex());
    	}
    
    	public void delete(Entity entity) {
    		entity.setHidden(true);
    	}
    	@Override
    	public void turnTemporarilyTo(Entity entity) {
    		this.getUpdateFlags().setFaceToUpdateRequired(true, entity.getClientIndex());
    		this.getUpdateFlags().setClearFaceTo(true);
    	}
    
    	@Override
    	public void resetTurnTo() {
    		this.getUpdateFlags().setFaceToUpdateRequired(true, 0);
    	}
    
    	public void graphics(int id) {
    			graphics(id, 0);
    	}
    	public void graphics(int id, int delay) {
    		this.setLastGraphics(new Graphics(id, delay));
    		updateFlags.setGraphicsUpdateRequired(true);
    	}
    	public void npcswitch(int id) {
    		this.setLastNpcSwitch(new NpcSwitch(id));
    		updateFlags.setNpcSwitchUpdateRequired(true);
    	}
    
    	public void animate(int id) {
    		animate(id, 0);
    	}
    	public void resetAttack() {
    		npcOpp = -1;
    		this.Attacking = false;
    		this.pid = 0;
    	}	
    	public void animate(int id, int delay) {
    		this.setLastAnimation(new Animation(id, delay));
    		updateFlags.setAnimationUpdateRequired(true);
    	}
    
    	public int getHitpoints() {
    		return hp;
    	}
    
    	public int getAttackAnimation() {
    		return this.getDefinition().getAttackAnimation();
    	}
    
    	public int getAttackSpeed() {
    		return this.getDefinition().getAttackSpeed();
    	}
    
    	public int getDefenceAnimation() {
    		return this.getDefinition().getDefenceAnimation();
    	}
    
    	public boolean isAnimating() {
    		return this.getUpdateFlags().isAnimationUpdateRequired();
    	}
    
    	public int getDeathAnimation() {
    		return this.getDefinition().getDeathAnimation();
    	}
    
    	public Location getOriginalLocation() {
    		return this.originalLocation;
    	}
    
    	public int getHp() {
    		return hp;
    	}
    
    	public int getMaxHp() {
    		return this.definition.getHitpoints();
    	}
    
    	public void setHp(int val) {
    		hp = val;
    	}
    
    
    	@Override
    	public void dropLoot(Player winner) {
    	}
    	@Override
    	public void dropLoot2(Player winner) {
    	}
    
    	public boolean isAutoRetaliating() {
    		return this.definition.getHitpoints() > 0;
    	}
    	@Override
    	public CombatType getCombatType() {
    		return CombatType.MELEE;
    	}
    	@Override
    	public int getMaxHit() {
    		return this.getDefinition().getMaxHit();
    	}
    	public int getDrawBackGraphics() {
    		return 18; // TODO atm bronze arrow
    	}
    
    	public int getProjectileId() {
    		return 10; // TODO atm bronze(?) arrow
    	}
    
    	public boolean hasAmmo() {
    		return true;
    	}
    	public void setIsFamiliar(boolean isFamiliar) {
    		IsFamiliar = isFamiliar;
    	}
    	public boolean isIsFamiliar() {
    		return IsFamiliar;
    	}
    
    	public void hit(Player p, int damage) {
    		if(p == null) {
    			return;
    		}
    		if(damage > 0) {
    			Clan clan = World.getWorld().getClanManager().getClans(p.getSettings().getClanOwner());
    			if(clan == null) {
    				addKillerHit(p, damage);
    			} else {
    				if(clan.isLootsharing()) {
    					addKillerHit(p, damage);
    					for(Player pl : clan.getMembers()) {
    						if(pl.getIndex() != p.getIndex()) {
    							addKillerHit(pl, damage - getDecrements(clan));
    						}
    					}
    				}
    			}
    		}
    		hit(damage);
    	}
    
    	public int getDecrements(Clan clan) {
    		int size = clan.getMembers().size();
    		if(size >= 1 && size <= 20) return 5;
    		if(size >= 20 && size <= 50) return 10;
    		if(size >= 50 && size <= 80) return 15;
    		if(size >= 80 && size <= 100) return 20;
    		if(size >= 100 && size <= 140) return 25;
    		if(size >= 140 && size <= 180) return 30;
    		return 5;
    	}
    
    }
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Nov 2014
    Age
    34
    Posts
    113
    Thanks given
    338
    Thanks received
    4
    Rep Power
    0
    ur missing an argument according to that error
    Reply With Quote  
     

  3. #3  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    I think you're trying to do this:

    Code:
    NPC npc = new NPC();
    instead of this:

    Code:
    int npcId = 5000;
    NPC npc = new NPC(npcId);
    Project thread
    Reply With Quote  
     

  4. #4  
    Zodiac Owner.

    Join Date
    Mar 2013
    Age
    27
    Posts
    387
    Thanks given
    46
    Thanks received
    34
    Rep Power
    37
    Quote Originally Posted by clem585 View Post
    I think you're trying to do this:

    Code:
    NPC npc = new NPC();
    instead of this:

    Code:
    int npcId = 5000;
    NPC npc = new NPC(npcId);
    Could you give me a bit more information about what you mean exactly?
    Reply With Quote  
     

  5. #5  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by xChaos View Post
    Could you give me a bit more information about what you mean exactly?
    To spawn an NPC you need the parameter Id. Basically put an id in the ( ).

    The error is saying that you tried to spawn an NPC without putting anything in the ( ) I think.
    Project thread
    Reply With Quote  
     

  6. Thankful user:



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. Weird Startup Error
    By mr koer in forum Help
    Replies: 4
    Last Post: 12-16-2012, 02:30 PM
  2. Weird HD error
    By mige5 in forum Help
    Replies: 2
    Last Post: 06-17-2009, 03:08 AM
  3. Weird run error bug
    By Ziya in forum Help
    Replies: 2
    Last Post: 05-19-2009, 09:04 PM
  4. Weird Startup Problem.
    By ballin in forum Help
    Replies: 13
    Last Post: 05-02-2009, 02:48 PM
  5. Realy weird pking error!?
    By Oh my gawd in forum Help
    Replies: 13
    Last Post: 01-27-2009, 04:50 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •